[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.28,1.29 events.cpp,1.10,1.11 events.h,1.5,1.6 sound.cpp,1.25,1.26 sword2.cpp,1.53,1.54 sync.cpp,1.8,1.9 sync.h,1.5,1.6 walker.cpp,1.13,1.14

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Fri Oct 10 09:16:09 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv18417

Modified Files:
	anims.cpp events.cpp events.h sound.cpp sword2.cpp sync.cpp 
	sync.h walker.cpp 
Log Message:
cleanup


Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- anims.cpp	8 Oct 2003 18:02:52 -0000	1.28
+++ anims.cpp	10 Oct 2003 16:14:52 -0000	1.29
@@ -44,7 +44,7 @@
 namespace Sword2 {
 
 // stores resource id of wav to use as lead-out from smacker
-uint32 smackerLeadOut = 0;
+static uint32 smackerLeadOut = 0;
 
 int32 Animate(int32 *params, uint8 reverse_flag);
 int32 Mega_table_animate(int32 *params, uint8 reverse_flag);

Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/events.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- events.cpp	5 Oct 2003 15:28:13 -0000	1.10
+++ events.cpp	10 Oct 2003 16:14:52 -0000	1.11
@@ -74,12 +74,12 @@
 	if (j == MAX_events)
 		Con_fatal_error("FN_set_event out of event slots");
 
-	//found that slot
+	// found that slot
 
-	//id of person to stop
+	// id of person to stop
 	event_list[j].id = params[0];
 
-	//full script id to interact with - megas run their own 7th script
+	// full script id to interact with - megas run their own 7th script
 	event_list[j].interact_id = (params[0] * 65536) + 6;
 
 	return IR_CONT;
@@ -276,15 +276,13 @@
 	}
 }
 
-uint32 Check_event_waiting(void) {
-	// returns yes/no
-
+bool Check_event_waiting(void) {
 	for (int j = 0; j < MAX_events; j++) {
 		if (event_list[j].id == ID)
-			return 1;
+			return true;
 	}
 
-	return 0;
+	return false;
 }
 
 int32 FN_clear_event(int32 *params) {
@@ -334,7 +332,7 @@
 
 	// oh dear - stop the system
 	Con_fatal_error("FN_start_event can't find event for id %d", ID);
-	return 0;	//never called - but lets stop them bloody errors
+	return 0;	// never called - but lets stop them bloody errors
 }
 
 void Kill_all_ids_events(uint32 id) {

Index: events.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/events.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- events.h	5 Oct 2003 15:28:13 -0000	1.5
+++ events.h	10 Oct 2003 16:14:52 -0000	1.6
@@ -39,7 +39,7 @@
 int32 FN_check_event_waiting(void);
 void Start_event(void);
 int32 FN_start_event(void);
-uint32 Check_event_waiting(void);
+bool Check_event_waiting(void);
 void Kill_all_ids_events(uint32 id);
 
 #ifdef _SWORD2_DEBUG 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- sound.cpp	8 Oct 2003 18:02:53 -0000	1.25
+++ sound.cpp	10 Oct 2003 16:14:52 -0000	1.26
@@ -51,13 +51,11 @@
 // max number of fx in queue at once [DO NOT EXCEED 255]
 #define FXQ_LENGTH 32
 
-_fxq_entry fxq[FXQ_LENGTH];
+static _fxq_entry fxq[FXQ_LENGTH];
 
 // used to store id of tunes that loop, for save & restore
 uint32 looping_music_id = 0;
 
-char musicDirectory[120];
-
 void Trigger_fx(uint8 j);
 
 // initialise the fxq by clearing all the entries
@@ -254,7 +252,7 @@
 }
 
 int32 FN_sound_fetch(int32 *params) {
-	return (IR_CONT);
+	return IR_CONT;
 }
 
 // to alter the volume and pan of a currently playing fx

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- sword2.cpp	10 Oct 2003 13:55:06 -0000	1.53
+++ sword2.cpp	10 Oct 2003 16:14:52 -0000	1.54
@@ -395,8 +395,6 @@
 #endif
 		}
 
-		// James (24mar97)
-
 #ifdef _SWORD2_DEBUG
 		// if not in console & 'renderSkip' is set, only render
 		// display once every 4 game-cycles

Index: sync.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sync.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sync.cpp	4 Oct 2003 08:07:02 -0000	1.8
+++ sync.cpp	10 Oct 2003 16:14:52 -0000	1.9
@@ -34,7 +34,7 @@
 // there wont be many will there. probably 2 at most i reckon
 #define	MAX_syncs 10
 
-_sync_unit sync_list[MAX_syncs];
+static _sync_unit sync_list[MAX_syncs];
 
 void Init_sync_system(void) {
 	// set list to 0's
@@ -43,8 +43,8 @@
 }
 
 int32 FN_send_sync(int32 *params) {
-	//param	0 sync's recipient
-	//param	1 sync value
+	// param	0 sync's recipient
+	//		1 sync value
 
 	for (int i = 0; i < MAX_syncs; i++) {
 		if (sync_list[i].id == 0) {
@@ -76,7 +76,7 @@
 	}
 }
 
-uint32 Get_sync(void) {
+bool Get_sync(void) {
 	// check for a sync waiting for this character
 	// - called from system code eg. from inside FN_anim(), to see if
 	// animation to be quit
@@ -84,12 +84,12 @@
 	for (int i = 0; i < MAX_syncs; i++) {
 		if (sync_list[i].id == ID) {
 			// means sync found
-			return 1;
+			return true;
 		}
 	}
 
 	// no sync found
-	return 0;
+	return false;
 }
 
 int32 FN_get_sync(int32 *params) {

Index: sync.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sync.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sync.h	4 Oct 2003 08:07:02 -0000	1.5
+++ sync.h	10 Oct 2003 16:14:52 -0000	1.6
@@ -26,7 +26,7 @@
 
 void Init_sync_system(void);
 void Clear_syncs(uint32	id);
-uint32 Get_sync(void);
+bool Get_sync(void);
 
 } // End of namespace Sword2
 

Index: walker.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/walker.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- walker.cpp	8 Oct 2003 06:58:34 -0000	1.13
+++ walker.cpp	10 Oct 2003 16:14:52 -0000	1.14
@@ -22,17 +22,6 @@
 // script functions for moving megas about the place & also for keeping tabs
 // on them
 
-// FN_walk()			// walk to (x,y,dir)
-// FN_walk_to_anim()		// walk to start position of anim
-// FN_turn()			// turn to (dir)
-// FN_stand_at()		// stand at (x,y,dir)
-// FN_stand()			// stand facing (dir)
-// FN_stand_after_anim()	// stand at end position of anim
-// FN_face_id()			// turn to face object (id)
-// FN_face_xy()			// turn to face point (x,y)
-// FN_is_facing()		// is mega (id) facing us?
-// FN_get_pos()			// get details of another mega's position
-
 #include "stdafx.h"
 #include "bs2/console.h"
 #include "bs2/defs.h"
@@ -51,7 +40,9 @@
 int16 standby_y;
 uint8 standby_dir;
 
-// walk mega to (x,y,dir)
+/**
+ * Walk mega to (x,y,dir)
+ */
 
 int32 FN_walk(int32 *params) {
 	// params:	0 pointer to object's logic structure
@@ -252,7 +243,9 @@
 	return IR_REPEAT;
 }
 
-// walk mega to start position of anim
+/**
+ * Walk mega to start position of anim
+ */
 
 int32 FN_walk_to_anim(int32 *params) {
 	// params:	0 pointer to object's logic structure
@@ -313,9 +306,11 @@
 	return FN_walk(pars);
 }
 
-// turn mega to <direction>
-// just needs to call FN_walk() with current feet coords, so router can
-// produce anim of turn frames
+/**
+ * turn mega to <direction>
+ * just needs to call FN_walk() with current feet coords, so router can
+ * produce anim of turn frames
+ */
 
 int32 FN_turn(int32 *params) {
 	// params:	0 pointer to object's logic structure
@@ -355,9 +350,11 @@
 	return FN_walk(pars);
 }
 
-// stand mega at (x,y,dir)
-// sets up the graphic object, but also needs to set the new 'current_dir' in
-// the mega object, so the router knows in future
+/**
+ * stand mega at (x,y,dir)
+ * sets up the graphic object, but also needs to set the new 'current_dir' in
+ * the mega object, so the router knows in future
+ */
 
 int32 FN_stand_at(int32 *params) {
 	// params:	0 pointer to object's graphic structure
@@ -416,7 +413,9 @@
 	return FN_stand_at(pars);
 }
 
-// stand mega at end position of anim
+/**
+ * stand mega at end position of anim
+ */
 
 int32 FN_stand_after_anim(int32 *params) {
 	// params:	0 pointer to object's graphic structure
@@ -542,9 +541,11 @@
 	return (deltaY > 0) ? 5 : 7;
 }
 
-// turn mega to face point (x,y) on the floor
-// just needs to call FN_walk() with current feet coords & direction computed
-// by What_target()
+/**
+ * turn mega to face point (x,y) on the floor
+ * just needs to call FN_walk() with current feet coords & direction computed
+ * by What_target()
+ */
 
 int32 FN_face_xy(int32 *params) {
 	// params:	0 pointer to object's logic structure





More information about the Scummvm-git-logs mailing list