[Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.2,1.3 actionmap.h,1.3,1.4 actionmap_mod.h,1.2,1.3 actor.cpp,1.6,1.7 actor.h,1.3,1.4 actor_mod.h,1.3,1.4 actordata.cpp,1.1,1.2 actordata.h,1.2,1.3 animation.cpp,1.2,1.3 animation.h,1.3,1.4 animation_mod.h,1.2,1.3

Pawel Kolodziejski aquadran at users.sourceforge.net
Fri Apr 30 23:18:00 CEST 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30093

Modified Files:
	actionmap.cpp actionmap.h actionmap_mod.h actor.cpp actor.h 
	actor_mod.h actordata.cpp actordata.h animation.cpp 
	animation.h animation_mod.h 
Log Message:
indent

Index: actionmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actionmap.cpp	30 Apr 2004 23:02:23 -0000	1.2
+++ actionmap.cpp	1 May 2004 06:16:56 -0000	1.3
@@ -22,231 +22,183 @@
  */
 /*
 
- Description:   
- 
-    Action map module
-
- Notes: 
-*/
+/* Action map module */
 
 #include "reinherit.h"
 
 #include "yslib.h"
 
-
-/*
- * Uses the following modules:
-\*--------------------------------------------------------------------------*/
 #include "cvar_mod.h"
 #include "console_mod.h"
 #include "gfx_mod.h"
 
-/*
- * Begin module component
-\*--------------------------------------------------------------------------*/
 #include "actionmap_mod.h"
 #include "actionmap.h"
 
 namespace Saga {
+	static R_ACTIONMAP_INFO ActmapModule;
 
-static R_ACTIONMAP_INFO ActmapModule;
-
-int ACTIONMAP_Register(void)
-{
-
-	CVAR_RegisterFunc(CF_action_info,
-	    "action_info", NULL, R_CVAR_NONE, 0, 0);
-
-	return R_SUCCESS;
-}
-
-int ACTIONMAP_Init(void)
-{
-	R_printf(R_STDOUT, "ACTIONMAP Module: Initializing...\n");
-
-	ActmapModule.init = 1;
-	return R_SUCCESS;
-}
-
-int ACTIONMAP_Load(const byte * exmap_res, size_t exmap_res_len)
-/*--------------------------------------------------------------------------*\
- * Loads exit map data from specified exit map resource
-\*--------------------------------------------------------------------------*/
-{
-
-	R_ACTIONMAP_ENTRY *exmap_entry;
-	R_POINT *exmap_pt_tbl;
-
-	int exit_ct;
-	int i, pt;
-
-	const byte *read_p = exmap_res;
-	size_t read_len = exmap_res_len;
-
-	assert(ActmapModule.init);
-	assert(exmap_res != NULL);
-
-	(void)read_len;
+	int ACTIONMAP_Register(void) {
+		CVAR_RegisterFunc(CF_action_info,
+			"action_info", NULL, R_CVAR_NONE, 0, 0);
+		return R_SUCCESS;
+	}
 
-	/* Load exits
-	 * \*------------------------------------------------------------- */
-	exit_ct = ys_read_s16_le(read_p, &read_p);
-	if (exit_ct < 0) {
-		return R_FAILURE;
+	int ACTIONMAP_Init(void) {
+		R_printf(R_STDOUT, "ACTIONMAP Module: Initializing...\n");
+		ActmapModule.init = 1;
+		return R_SUCCESS;
 	}
 
-	exmap_entry = (R_ACTIONMAP_ENTRY *)malloc(exit_ct * sizeof *exmap_entry);
-	if (exmap_entry == NULL) {
+	int ACTIONMAP_Load(const byte * exmap_res, size_t exmap_res_len) {
+		//Loads exit map data from specified exit map resource
+		R_ACTIONMAP_ENTRY *exmap_entry;
+		R_POINT *exmap_pt_tbl;
 
-		R_printf(R_STDERR, "Memory allocation failure.\n");
-		return R_MEM;
-	}
+		int exit_ct;
+		int i, pt;
 
-	for (i = 0; i < exit_ct; i++) {
+		const byte *read_p = exmap_res;
+		size_t read_len = exmap_res_len;
 
-		exmap_entry[i].unknown00 = ys_read_s16_le(read_p, &read_p);
-		exmap_entry[i].unknown02 = ys_read_s16_le(read_p, &read_p);
-		exmap_entry[i].exit_scene = ys_read_s16_le(read_p, &read_p);
-		exmap_entry[i].unknown06 = ys_read_s16_le(read_p, &read_p);
+		assert(ActmapModule.init);
+		assert(exmap_res != NULL);
 
-		exmap_entry[i].pt_count = ys_read_s16_le(read_p, &read_p);
-		if (exmap_entry[i].pt_count < 0) {
+		(void)read_len;
 
-			free(exmap_entry);
+		// Load exits
+		exit_ct = ys_read_s16_le(read_p, &read_p);
+		if (exit_ct < 0) {
 			return R_FAILURE;
 		}
 
-		exmap_pt_tbl =
-		    (R_POINT *)malloc(exmap_entry[i].pt_count * sizeof *exmap_pt_tbl);
-		if (exmap_pt_tbl == NULL) {
-
+		exmap_entry = (R_ACTIONMAP_ENTRY *)malloc(exit_ct * sizeof *exmap_entry);
+		if (exmap_entry == NULL) {
 			R_printf(R_STDERR, "Memory allocation failure.\n");
 			return R_MEM;
 		}
 
-		for (pt = 0; pt < exmap_entry[i].pt_count; pt++) {
-
-			exmap_pt_tbl[pt].x = ys_read_s16_le(read_p, &read_p);
-			exmap_pt_tbl[pt].y = ys_read_s16_le(read_p, &read_p);
-		}
+		for (i = 0; i < exit_ct; i++) {
+			exmap_entry[i].unknown00 = ys_read_s16_le(read_p, &read_p);
+			exmap_entry[i].unknown02 = ys_read_s16_le(read_p, &read_p);
+			exmap_entry[i].exit_scene = ys_read_s16_le(read_p, &read_p);
+			exmap_entry[i].unknown06 = ys_read_s16_le(read_p, &read_p);
 
-		exmap_entry[i].pt_tbl = exmap_pt_tbl;
-	}
+			exmap_entry[i].pt_count = ys_read_s16_le(read_p, &read_p);
+			if (exmap_entry[i].pt_count < 0) {
+				free(exmap_entry);
+				return R_FAILURE;
+			}
 
-	ActmapModule.exits_loaded = 1;
-	ActmapModule.n_exits = exit_ct;
-	ActmapModule.exits_tbl = exmap_entry;
+			exmap_pt_tbl = (R_POINT *)malloc(exmap_entry[i].pt_count * sizeof *exmap_pt_tbl);
+			if (exmap_pt_tbl == NULL) {
+				R_printf(R_STDERR, "Memory allocation failure.\n");
+				return R_MEM;
+			}
 
-	ActmapModule.exmap_res = exmap_res;
-	ActmapModule.exmap_res_len = exmap_res_len;
+			for (pt = 0; pt < exmap_entry[i].pt_count; pt++) {
+				exmap_pt_tbl[pt].x = ys_read_s16_le(read_p, &read_p);
+				exmap_pt_tbl[pt].y = ys_read_s16_le(read_p, &read_p);
+			}
 
-	return R_SUCCESS;
-}
+			exmap_entry[i].pt_tbl = exmap_pt_tbl;
+		}
 
-int ACTIONMAP_Free(void)
-/*--------------------------------------------------------------------------*\
- * Frees the currently loaded exit map data
-\*--------------------------------------------------------------------------*/
-{
+		ActmapModule.exits_loaded = 1;
+		ActmapModule.n_exits = exit_ct;
+		ActmapModule.exits_tbl = exmap_entry;
 
-	R_ACTIONMAP_ENTRY *exmap_entry;
-	int i;
+		ActmapModule.exmap_res = exmap_res;
+		ActmapModule.exmap_res_len = exmap_res_len;
 
-	if (!ActmapModule.exits_loaded) {
 		return R_SUCCESS;
 	}
 
-	for (i = 0; i < ActmapModule.n_exits; i++) {
-
-		exmap_entry = &ActmapModule.exits_tbl[i];
-
-		free(exmap_entry->pt_tbl);
-	}
-
-	free(ActmapModule.exits_tbl);
-
-	ActmapModule.exits_loaded = 0;
-	ActmapModule.exits_tbl = NULL;
-	ActmapModule.n_exits = 0;
+	int ACTIONMAP_Free(void) {
+		// Frees the currently loaded exit map data
+		R_ACTIONMAP_ENTRY *exmap_entry;
+		int i;
 
-	return R_SUCCESS;
-}
+		if (!ActmapModule.exits_loaded) {
+			return R_SUCCESS;
+		}
 
-int ACTIONMAP_Shutdown(void)
-/*--------------------------------------------------------------------------*\
-\*--------------------------------------------------------------------------*/
-{
+		for (i = 0; i < ActmapModule.n_exits; i++) {
+			exmap_entry = &ActmapModule.exits_tbl[i];
 
-	return R_SUCCESS;
-}
+			free(exmap_entry->pt_tbl);
+		}
 
-int ACTIONMAP_Draw(R_SURFACE * ds, int color)
-{
+		free(ActmapModule.exits_tbl);
 
-	int i;
+		ActmapModule.exits_loaded = 0;
+		ActmapModule.exits_tbl = NULL;
+		ActmapModule.n_exits = 0;
 
-	assert(ActmapModule.init);
+		return R_SUCCESS;
+	}
 
-	if (!ActmapModule.exits_loaded) {
-		return R_FAILURE;
+	int ACTIONMAP_Shutdown(void) {
+		return R_SUCCESS;
 	}
 
-	for (i = 0; i < ActmapModule.n_exits; i++) {
+	int ACTIONMAP_Draw(R_SURFACE * ds, int color) {
+		int i;
 
-		if (ActmapModule.exits_tbl[i].pt_count == 2) {
+		assert(ActmapModule.init);
 
-			GFX_DrawFrame(ds,
-			    &ActmapModule.exits_tbl[i].pt_tbl[0],
-			    &ActmapModule.exits_tbl[i].pt_tbl[1], color);
+		if (!ActmapModule.exits_loaded) {
+			return R_FAILURE;
+		}
 
-		} else if (ActmapModule.exits_tbl[i].pt_count > 2) {
+		for (i = 0; i < ActmapModule.n_exits; i++) {
 
-			GFX_DrawPolyLine(ds,
-			    ActmapModule.exits_tbl[i].pt_tbl,
-			    ActmapModule.exits_tbl[i].pt_count, color);
+			if (ActmapModule.exits_tbl[i].pt_count == 2) {
 
+			GFX_DrawFrame(ds,
+				&ActmapModule.exits_tbl[i].pt_tbl[0],
+				&ActmapModule.exits_tbl[i].pt_tbl[1], color);
+			} else if (ActmapModule.exits_tbl[i].pt_count > 2) {
+				GFX_DrawPolyLine(ds, ActmapModule.exits_tbl[i].pt_tbl,
+						ActmapModule.exits_tbl[i].pt_count, color);
+			}
 		}
-	}
-
-	return R_SUCCESS;
-}
 
-void CF_action_info(int argc, char *argv[])
-{
-	R_POINT *pt;
+		return R_SUCCESS;
+	}
 
-	int i;
-	int pt_i;
+	void CF_action_info(int argc, char *argv[]) {
+		R_POINT *pt;
 
-	YS_IGNORE_PARAM(argc);
-	YS_IGNORE_PARAM(argv);
+		int i;
+		int pt_i;
 
-	if (!ActmapModule.exits_loaded) {
-		return;
-	}
+		YS_IGNORE_PARAM(argc);
+		YS_IGNORE_PARAM(argv);
 
-	CON_Print("%d exits loaded.\n", ActmapModule.n_exits);
+		if (!ActmapModule.exits_loaded) {
+			return;
+		}
 
-	for (i = 0; i < ActmapModule.n_exits; i++) {
+		CON_Print("%d exits loaded.\n", ActmapModule.n_exits);
 
-		CON_Print
-		    ("Action %d: Exit to: %d; Pts: %d; Unk0: %d Unk2: %d Scr_N: %d",
-		    i, ActmapModule.exits_tbl[i].exit_scene,
-		    ActmapModule.exits_tbl[i].pt_count,
-		    ActmapModule.exits_tbl[i].unknown00,
-		    ActmapModule.exits_tbl[i].unknown02,
-		    ActmapModule.exits_tbl[i].unknown06);
+		for (i = 0; i < ActmapModule.n_exits; i++) {
 
-		for (pt_i = 0; pt_i < ActmapModule.exits_tbl[i].pt_count;
-		    pt_i++) {
+			CON_Print ("Action %d: Exit to: %d; Pts: %d; Unk0: %d Unk2: %d Scr_N: %d",
+					i, ActmapModule.exits_tbl[i].exit_scene,
+					ActmapModule.exits_tbl[i].pt_count,
+					ActmapModule.exits_tbl[i].unknown00,
+					ActmapModule.exits_tbl[i].unknown02,
+					ActmapModule.exits_tbl[i].unknown06);
 
-			pt = &ActmapModule.exits_tbl[i].pt_tbl[pt_i];
+			for (pt_i = 0; pt_i < ActmapModule.exits_tbl[i].pt_count; pt_i++) {
+				pt = &ActmapModule.exits_tbl[i].pt_tbl[pt_i];
 
-			CON_Print("   pt: %d (%d, %d)", pt_i, pt->x, pt->y);
+				CON_Print("   pt: %d (%d, %d)", pt_i, pt->x, pt->y);
+			}
 		}
-	}
 
-	return;
-}
+		return;
+	}
 
 } // End of namespace Saga

Index: actionmap.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- actionmap.h	30 Apr 2004 23:02:23 -0000	1.3
+++ actionmap.h	1 May 2004 06:16:57 -0000	1.4
@@ -20,14 +20,8 @@
  * $Header$
  *
  */
-/*
-
- Description:   
- 
-    Action map module - private header
 
- Notes: 
-*/
+// Action map module - private header
 
 #ifndef SAGA_ACTIONMAP_H_
 #define SAGA_ACTIONMAP_H_
@@ -35,7 +29,6 @@
 namespace Saga {
 
 struct R_ACTIONMAP_ENTRY {
-
 	int unknown00;
 	int unknown02;
 	int exit_scene;
@@ -43,25 +36,19 @@
 
 	int pt_count;
 	R_POINT *pt_tbl;
-
 };
 
 struct R_ACTIONMAP_INFO {
-
 	int init;
-
 	int exits_loaded;
 	int n_exits;
 	R_ACTIONMAP_ENTRY *exits_tbl;
-
 	const byte *exmap_res;
 	size_t exmap_res_len;
-
 };
 
 void CF_action_info(int argc, char *argv[]);
 
 } // End of namespace Saga
 
-#endif				/* R_ACTIONMAP_H_ */
-/* end "r_actionmap.h" */
+#endif

Index: actionmap_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actionmap_mod.h	30 Apr 2004 23:02:23 -0000	1.2
+++ actionmap_mod.h	1 May 2004 06:16:57 -0000	1.3
@@ -20,14 +20,8 @@
  * $Header$
  *
  */
-/*
-
- Description:   
- 
-    Action map module - public module header
 
- Notes: 
-*/
+// Action map module - public module header
 
 #ifndef SAGA_ACTIONMAP_MOD_H_
 #define SAGA_ACTIONMAP_MOD_H_
@@ -37,13 +31,12 @@
 int ACTIONMAP_Register(void);
 int ACTIONMAP_Init(void);
 
-int ACTIONMAP_Load(const byte * exmap_res, size_t exmap_res_len);
-int ACTIONMAP_Draw(R_SURFACE * ds, int color);
+int ACTIONMAP_Load(const byte *exmap_res, size_t exmap_res_len);
+int ACTIONMAP_Draw(R_SURFACE *ds, int color);
 
 int ACTIONMAP_Free(void);
 int ACTIONMAP_Shutdown(void);
 
 } // End of namespace Saga
 
-#endif				/* R_ACTIONMAP_MOD_H_ */
-/* end "r_actionmap_mod.h" */
+#endif

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- actor.cpp	30 Apr 2004 23:02:23 -0000	1.6
+++ actor.cpp	1 May 2004 06:16:57 -0000	1.7
@@ -20,24 +20,12 @@
  * $Header$
  *
  */
-/*
- Description:   
- 
-    Actor management module
-
- Notes: 
- 
-    Hardcoded actor table present in r_actordata.c
[...1200 lines suppressed...]
-{
+static void CF_actor_setact(int argc, char *argv[]) {
 	int index = 0;
 	int action_n = 0;
 
@@ -1445,10 +1164,10 @@
 	}
 
 	CON_Print("Action frame counts: %d %d %d %d.",
-	    actor->act_tbl[action_n].dir[0].frame_count,
-	    actor->act_tbl[action_n].dir[1].frame_count,
-	    actor->act_tbl[action_n].dir[2].frame_count,
-	    actor->act_tbl[action_n].dir[3].frame_count);
+			actor->act_tbl[action_n].dir[0].frame_count,
+			actor->act_tbl[action_n].dir[1].frame_count,
+			actor->act_tbl[action_n].dir[2].frame_count,
+			actor->act_tbl[action_n].dir[3].frame_count);
 
 	ACTOR_SetAction(index, action_n, ACTION_LOOP);
 

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- actor.h	30 Apr 2004 23:02:23 -0000	1.3
+++ actor.h	1 May 2004 06:16:57 -0000	1.4
@@ -20,15 +20,8 @@
  * $Header$
  *
  */
-/*
- Description:	
- 
-	Actor management module header file
 
- Notes: 
- 
-	Hardcoded actor table present in r_actordata.c
-*/
+// Actor management module header file
 
 #ifndef SAGA_ACTOR_H__
 #define SAGA_ACTOR_H__
@@ -49,27 +42,21 @@
 #define R_ACTOR_LMULT 4
 
 enum R_ACTOR_INTENTS {
-
 	INTENT_NONE = 0,
 	INTENT_PATH = 1,
 	INTENT_SPEAK = 2
 };
 
 struct R_ACTORACTIONITEM {
-
 	int frame_index;
 	int frame_count;
-
 };
 
 struct R_ACTORACTION {
-
 	R_ACTORACTIONITEM dir[4];
-
 };
 
 struct R_WALKINTENT {
-
 	int wi_active;
 	uint16 wi_flags;
 	int wi_init;
@@ -85,158 +72,112 @@
 
 	int sem_held;
 	R_SEMAPHORE *sem;
-	
-	R_WALKINTENT() { memset(this, 0, sizeof(*this)); }
 
+	R_WALKINTENT() { memset(this, 0, sizeof(*this)); }
 };
 
 struct R_WALKNODE {
-
 	int calc_flag;
 	R_POINT node_pt;
-
 };
 
 struct R_SPEAKINTENT {
-
 	int si_init;
 	uint16 si_flags;
 	int si_last_action;
-
 	YS_DL_LIST *si_diaglist;	/* Actor dialogue list */
-
 };
 
 struct R_ACTORINTENT {
-
 	int a_itype;
 	uint16 a_iflags;
 	int a_idone;
-
 	void *a_data;
-	
-	R_ACTORINTENT() { memset(this, 0, sizeof(*this)); }
 
+	R_ACTORINTENT() { memset(this, 0, sizeof(*this)); }
 };
 
 struct R_ACTOR {
-
-	int id;			/* Actor id */
-	int name_i;		/* Actor's index in actor name string list */
+	int id;            // Actor id
+	int name_i;        // Actor's index in actor name string list
 	uint16 flags;
 
-	R_POINT a_pt;		/* Actor's logical coordinates */
-	R_POINT s_pt;		/* Actor's screen coordinates */
+	R_POINT a_pt;      // Actor's logical coordinates
+	R_POINT s_pt;      // Actor's screen coordinates
 
-	int sl_rn;		/* Actor's sprite list res # */
-	int si_rn;		/* Actor's sprite index res # */
-	R_SPRITELIST *sl_p;	/* Actor's sprite list data */
+	int sl_rn;         // Actor's sprite list res #
+	int si_rn;         // Actor's sprite index res #
+	R_SPRITELIST *sl_p;// Actor's sprite list data
 
 	int idle_time;
 	int orient;
 	int speaking;
 
-	int a_dcolor;		/* Actor dialogue color */
+	int a_dcolor;      // Actor dialogue color
 
-	/* The actor intent list describes what the actor intends to do;
-	 * multiple intents can be queued. The actor must complete an 
-	 * intent before moving on to the next; thus actor movements, esp
-	 * as described from scripts, can be serialized */
+	// The actor intent list describes what the actor intends to do;
+	// multiple intents can be queued. The actor must complete an 
+	// intent before moving on to the next; thus actor movements, esp
+	// as described from scripts, can be serialized
 
 	YS_DL_LIST *a_intentlist;
-/*	
-    R_WALKPATH path;
-*/
+
+//	R_WALKPATH path;
 
 	int def_action;
 	uint16 def_action_flags;
 
 	int action;
 	uint16 action_flags;
-
 	int action_frame;
 	int action_time;
 
-	R_ACTORACTION *act_tbl;	/* Action lookup table */
-	int action_ct;		/* Number of actions in the action LUT */
-
-	YS_DL_NODE *node;	/* Actor's node in the actor list */
-	
+	R_ACTORACTION *act_tbl; // Action lookup table
+	int action_ct;          // Number of actions in the action LUT
+	YS_DL_NODE *node;       // Actor's node in the actor list
 	R_ACTOR() { memset(this, 0, sizeof(*this)); }
-
 };
 
 struct R_ACTORDIALOGUE {
-
 	int d_playing;
 	const char *d_string;
 	uint16 d_voice_rn;
-
 	long d_time;
 	int d_sem_held;
 	R_SEMAPHORE *d_sem;
-	
 	R_ACTORDIALOGUE() { memset(this, 0, sizeof(*this)); }
-
 };
 
 struct R_ACTIONTIMES {
-
 	int action;
 	int time;
-
 };
 
 struct R_ACTOR_MODULE {
-
 	int init;
-
 	R_RSCFILE_CONTEXT *actor_ctxt;
-
 	uint16 count;
-
 	int *alias_tbl;
 	YS_DL_NODE **tbl;
 	YS_DL_LIST *list;
-
 	int err_n;
 	const char *err_str;
-
 };
 
 R_ACTOR *LookupActor(int index);
-
 int AddActor(R_ACTOR * actor);
-
 int Z_Compare(const void *elem1, const void *elem2);
-
-int
-HandleWalkIntent(R_ACTOR * actor,
-    R_WALKINTENT * a_walk_int, int *complete_p, int msec);
-
-int
-HandleSpeakIntent(R_ACTOR * actor,
-    R_SPEAKINTENT * a_speakint, int *complete_p, int msec);
-
-int
-ACTOR_SetPathNode(R_WALKINTENT * walk_int,
-    R_POINT * src_pt, R_POINT * dst_pt, R_SEMAPHORE * sem);
-
-int LoadActorSpriteIndex(R_ACTOR * actor, int si_rn, int *last_frame_p);
-
+int HandleWalkIntent(R_ACTOR *actor, R_WALKINTENT *a_walk_int, int *complete_p, int msec);
+int HandleSpeakIntent(R_ACTOR *actor, R_SPEAKINTENT *a_speakint, int *complete_p, int msec);
+int ACTOR_SetPathNode(R_WALKINTENT *walk_int, R_POINT *src_pt, R_POINT *dst_pt, R_SEMAPHORE *sem);
+int LoadActorSpriteIndex(R_ACTOR *actor, int si_rn, int *last_frame_p);
 static void CF_actor_add(int argc, char *argv[]);
-
 static void CF_actor_del(int argc, char *argv[]);
-
 static void CF_actor_move(int argc, char *argv[]);
-
 static void CF_actor_moverel(int argc, char *argv[]);
-
 static void CF_actor_seto(int argc, char *argv[]);
-
 static void CF_actor_setact(int argc, char *argv[]);
 
 } // End of namespace Saga
 
-#endif				/* R_ACTOR_H__ */
-/* end "r_actor.h" */
+#endif

Index: actor_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor_mod.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- actor_mod.h	30 Apr 2004 23:02:23 -0000	1.3
+++ actor_mod.h	1 May 2004 06:16:57 -0000	1.4
@@ -20,13 +20,8 @@
  * $Header$
  *
  */
-/*
- Description:	
- 
-	Actor management module public header file
 
- Notes: 
-*/
+// Actor management module public header file
 
 #ifndef SAGA_ACTOR_MOD_H
 #define SAGA_ACTOR_MOD_H
@@ -34,13 +29,11 @@
 namespace Saga {
 
 enum R_ACTOR_WALKFLAGS {
-
 	WALK_NONE = 0x00,
 	WALK_NOREORIENT = 0x01
 };
 
 enum R_ACTOR_ORIENTATIONS {
-
 	ORIENT_N = 0,
 	ORIENT_NE = 1,
 	ORIENT_E = 2,
@@ -52,7 +45,6 @@
 };
 
 enum R_ACTOR_ACTIONS {
-
 	ACTION_IDLE = 0,
 	ACTION_WALK = 1,
 	ACTION_SPEAK = 2,
@@ -60,34 +52,33 @@
 };
 
 enum R_ACTOR_ACTIONFLAGS {
-
 	ACTION_NONE = 0x00,
 	ACTION_LOOP = 0x01
 };
 
-int ACTOR_Register(void);
-int ACTOR_Init(void);
-int ACTOR_Shutdown(void);
+int ACTOR_Register();
+int ACTOR_Init();
+int ACTOR_Shutdown();
 
 int ACTOR_Direct(int msec);
 
 int ACTOR_Create(int actor_id, int x, int y);
 int ACTOR_ActorExists(uint16 actor_id);
 
-int ACTOR_DrawList(void);
-int ACTOR_AtoS(R_POINT * logical, const R_POINT * actor);
-int ACTOR_StoA(R_POINT * actor, const R_POINT * screen);
+int ACTOR_DrawList();
+int ACTOR_AtoS(R_POINT *logical, const R_POINT *actor);
+int ACTOR_StoA(R_POINT *actor, const R_POINT *screen);
 
-int ACTOR_Move(int index, R_POINT * move_pt);
-int ACTOR_MoveRelative(int index, R_POINT * move_pt);
+int ACTOR_Move(int index, R_POINT *move_pt);
+int ACTOR_MoveRelative(int index, R_POINT *move_pt);
 
-int ACTOR_WalkTo(int index, R_POINT * walk_pt, uint16 flags, R_SEMAPHORE * sem);
+int ACTOR_WalkTo(int index, R_POINT *walk_pt, uint16 flags, R_SEMAPHORE *sem);
 
 int ACTOR_GetActorIndex(uint16 actor_id);
 
-int ACTOR_Speak(int index, const char *d_string, uint16 d_voice_rn, R_SEMAPHORE * sem);
+int ACTOR_Speak(int index, const char *d_string, uint16 d_voice_rn, R_SEMAPHORE *sem);
 
-int ACTOR_SkipDialogue(void);
+int ACTOR_SkipDialogue();
 
 int ACTOR_GetSpeechTime(const char *d_string, uint16 d_voice_rn);
 int ACTOR_SetOrientation(int index, int orient);
@@ -96,5 +87,4 @@
 
 } // End of namespace Saga
 
-#endif				/* R_ACTOR_MOD_H */
-/* end "r_actor_mod.h" */
+#endif

Index: actordata.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actordata.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- actordata.cpp	12 Apr 2004 21:40:46 -0000	1.1
+++ actordata.cpp	1 May 2004 06:16:57 -0000	1.2
@@ -20,28 +20,23 @@
  * $Header$
  *
  */
-/*
- Description:	
- 
-	Actor data table
 
- Notes: 
-*/
+// Actor data table
 
 #include "actordata.h"
 
 namespace Saga {
 
-/* Lookup table to convert 8 cardinal directions to 4 */
+// Lookup table to convert 8 cardinal directions to 4
 int ActorOrientationLUT[] = { 2, 0, 0, 0, 3, 1, 1, 1 };
 
 R_ACTORTABLE ActorTable[R_ACTORCOUNT] = {
 
-/*   namei                         sl_rn si_rn        col
-     -----                         ----- -----        ---              */
+//   namei                         sl_rn si_rn        col
+//   -----                         ----- -----        ---
 	{0, 1, 0, 0, 0, 37, 135, 0, 1, 0, 0, 0},
-	/* original okk entry
-	 * { 1,    0,    0,    0,    0,    0,    0,    1,    132, 0,   0,   0 }, */
+	// original okk entry
+	// { 1,    0,    0,    0,    0,    0,    0,    1,    132, 0,   0,   0 },
 	{1, 0, 0, 0, 0, 45, 144, 1, 132, 0, 0, 0},
 	{2, 0, 0, 0, 0, 48, 143, 2, 161, 0, 0, 0},
 	{3, 0, 240, 480, 0, 115, 206, 0, 25, 0, 0, 0},

Index: actordata.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actordata.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actordata.h	25 Apr 2004 14:42:13 -0000	1.2
+++ actordata.h	1 May 2004 06:16:57 -0000	1.3
@@ -20,13 +20,8 @@
  * $Header$
  *
  */
-/*
- Description:	
- 
-	Actor data table header file
 
- Notes: 
-*/
+// Actor data table header file
 
 #ifndef SAGA_ACTORDATA_H
 #define SAGA_ACTORDATA_H
@@ -34,7 +29,6 @@
 namespace Saga {
 
 struct R_ACTORTABLE {
-
 	int name_index;
 	int unknown1;
 	int unknown2;
@@ -47,7 +41,6 @@
 	unsigned char unknown6;
 	unsigned char unknown7;
 	unsigned char unknown8;
-
 };
 
 #define R_ACTORCOUNT 181
@@ -57,6 +50,4 @@
 
 } // End of namespace Saga
 
-#endif				/* R_ACTORDATA_H */
-
-/* end "r_actordata.h" */
+#endif

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animation.cpp	30 Apr 2004 23:02:23 -0000	1.2
+++ animation.cpp	1 May 2004 06:16:57 -0000	1.3
@@ -20,30 +20,18 @@
  * $Header$
  *
  */
-/*
- Description:   
- 
-    Background animation management module
 
- Notes: 
-*/
+// Background animation management module
[...1080 lines suppressed...]
 	uint16 anim_ct;
 	uint16 i;
 	uint16 idx;
@@ -1175,15 +909,11 @@
 	CON_Print("There are %d animations loaded:", anim_ct);
 
 	for (idx = 0, i = 0; i < anim_ct; idx++, i++) {
-
 		while (AnimInfo.anim_tbl[idx] == NULL) {
 			idx++;
 		}
 
-		CON_Print("%02d: Frames: %u Flags: %u",
-		    i,
-		    AnimInfo.anim_tbl[idx]->n_frames,
-		    AnimInfo.anim_tbl[idx]->flags);
+		CON_Print("%02d: Frames: %u Flags: %u", i, AnimInfo.anim_tbl[idx]->n_frames, AnimInfo.anim_tbl[idx]->flags);
 	}
 
 	return;

Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- animation.h	30 Apr 2004 23:02:23 -0000	1.3
+++ animation.h	1 May 2004 06:16:57 -0000	1.4
@@ -20,13 +20,8 @@
  * $Header$
  *
  */
-/*
- Description:   
- 
-    Background animation management module private header
 
- Notes: 
-*/
+// Background animation management module private header
 
 #ifndef SAGA_ANIMATION_H_
 #define SAGA_ANIMATION_H_
@@ -39,12 +34,10 @@
 #define SAGA_FRAME_HEADER_MAGIC 15
 #define SAGA_FRAME_HEADER_LEN 12
 
-/* All animation resources begin with an ANIMATION_HEADER
- * at 0x00, followed by a RLE code stream
-\*--------------------------------------------------------------------------*/
+// All animation resources begin with an ANIMATION_HEADER
+// at 0x00, followed by a RLE code stream
 
 struct R_ANIMATION_HEADER {
-
 	uint16 magic;
 
 	uint16 screen_w;
@@ -61,12 +54,7 @@
 
 };
 
-/* A byte from the code stream of FRAME_HEADER_MAGIC signifies that a
- * FRAME_HEADER structure follows
-\*--------------------------------------------------------------------------*/
-
 struct R_FRAME_HEADER {
-
 	int x_start;
 	int y_start;
 
@@ -75,10 +63,9 @@
 
 	int width;
 	int height;
-
 };
 
-/* Animation info array member */
+// Animation info array member
 struct R_ANIMATION {
 
 	const byte *resdata;
@@ -86,51 +73,31 @@
 
 	uint16 n_frames;
 	size_t *frame_offsets;
-
 	uint16 current_frame;
 	uint16 end_frame;
 	uint16 stop_frame;
-
 	const byte *cur_frame_p;
 	size_t cur_frame_len;
-
 	int frame_time;
 
 	uint16 play_flag;
 	int link_flag;
 	uint16 link_id;
-
 	uint16 flags;
-
 };
 
 struct R_ANIMINFO {
-
 	int initialized;
-
 	uint16 anim_count;
 	uint16 anim_limit;
-
 	R_ANIMATION *anim_tbl[R_MAX_ANIMATIONS];
-
 };
 
-int ANIM_GetNumFrames(const byte * anim_resource, uint16 * n_frames);
-
-int
-ITE_DecodeFrame(const byte * anim_resource,
-    size_t frame_offset, byte * buf, size_t buf_len);
-
-int
-IHNM_DecodeFrame(byte * decode_buf,
-    size_t decode_buf_len,
-    const byte * thisf_p,
-    size_t thisf_len, const byte ** nextf_p, size_t * nextf_len);
-
-int
-ANIM_GetFrameOffset(const byte * anim_resource,
-    uint16 find_frame, size_t * frame_offset);
-
+int ANIM_GetNumFrames(const byte *anim_resource, uint16 *n_frames);
+int ITE_DecodeFrame(const byte * anim_resource, size_t frame_offset, byte * buf, size_t buf_len);
+int IHNM_DecodeFrame(byte * decode_buf, size_t decode_buf_len, const byte * thisf_p,
+					size_t thisf_len, const byte ** nextf_p, size_t * nextf_len);
+int ANIM_GetFrameOffset(const byte * anim_resource, uint16 find_frame, size_t * frame_offset);
 static void CF_anim_info(int argc, char *argv[]);
 
 } // End of namespace Saga

Index: animation_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animation_mod.h	30 Apr 2004 23:02:23 -0000	1.2
+++ animation_mod.h	1 May 2004 06:16:57 -0000	1.3
@@ -20,13 +20,8 @@
  * $Header$
  *
  */
-/*
- Description:	
- 
-	Background animation management module public header
 
- Notes: 
-*/
+// Background animation management module public header
 
 #ifndef SAGA_ANIMATION_MOD_H__
 #define SAGA_ANIMATION_MOD_H__
@@ -34,34 +29,21 @@
 namespace Saga {
 
 enum ANIM_FLAGS {
-
 	ANIM_LOOP = 0x01,
-	ANIM_ENDSCENE = 0x80	/* When animation ends, dispatch scene end event */
+	ANIM_ENDSCENE = 0x80	// When animation ends, dispatch scene end event
 };
 
 int ANIM_Register(void);
-
 int ANIM_Init(void);
-
 int ANIM_Shutdown(void);
-
-int
-ANIM_Load(const byte * anim_resdata,
-    size_t anim_resdata_len, uint16 * anim_id_p);
-
+int ANIM_Load(const byte *anim_resdata, size_t anim_resdata_len, uint16 *anim_id_p);
 int ANIM_Free(uint16 anim_id);
-
 int ANIM_Play(uint16 anim_id, int vector_time);
-
 int ANIM_Link(uint16 anim_id1, uint16 anim_id2);
-
 int ANIM_SetFlag(uint16 anim_id, uint16 flag);
-
 int ANIM_SetFrameTime(uint16 anim_id, int time);
-
 int ANIM_Reset(void);
 
 } // End of namespace Saga
 
-#endif				/* R_ANIMATION_MOD_H__ */
-/* end "r_animation_mod.h__ */
+#endif





More information about the Scummvm-git-logs mailing list