[Scummvm-cvs-logs] CVS: scummvm/simon debug.h,1.13,1.14 items.cpp,1.78,1.79 simon.cpp,1.225,1.226

Travis Howell kirben at users.sourceforge.net
Fri May 30 02:40:12 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv16885/simon

Modified Files:
	debug.h items.cpp simon.cpp 
Log Message:

Small cleanup


Index: debug.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- debug.h	29 May 2003 07:02:14 -0000	1.13
+++ debug.h	30 May 2003 09:39:20 -0000	1.14
@@ -240,9 +240,9 @@
 	"|VGA_POINTER_OP_1",
 	/* 176 */
 	"|VGA_POINTER_OP_2",
-	"BBI|UNK_177",
+	"BBI|INVENTORY_DESCRIPTION",
 	"WWBB|PATHFIND",
-	"BBB|UNK_179",
+	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
 	"|FORCE_UNLOCK",
 	"|FORCE_LOCK",
@@ -478,9 +478,9 @@
 	"|VGA_POINTER_OP_1",
 	/* 176 */
 	"|VGA_POINTER_OP_2",
-	"BBI|UNK_177",
+	"BBI|INVENTORY_DESCRIPTION",
 	"WWBB|PATHFIND",
-	"BBB|UNK_179",
+	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
 	"|FORCE_UNLOCK",
 	"|FORCE_LOCK",
@@ -716,9 +716,9 @@
 	"|VGA_POINTER_OP_1",
 	/* 176 */
 	"|VGA_POINTER_OP_2",
-	"BBI|UNK_177",
+	"BBI|INVENTORY_DESCRIPTION",
 	"WWBB|PATHFIND",
-	"BBB|UNK_179",
+	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
 	"|FORCE_UNLOCK",
 	"|FORCE_LOCK",
@@ -958,9 +958,9 @@
 	"|VGA_POINTER_OP_1",
 	/* 176 */
 	"|VGA_POINTER_OP_2",
-	"BBI|UNK_177",
+	"BBI|INVENTORY_DESCRIPTION",
 	"WWBB|PATHFIND",
-	"BBB|UNK_179",
+	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
 	"|FORCE_UNLOCK",
 	"|FORCE_LOCK",

Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- items.cpp	30 May 2003 07:46:44 -0000	1.78
+++ items.cpp	30 May 2003 09:39:21 -0000	1.79
@@ -918,6 +918,7 @@
 			break;
 
 		case 163:{									/* sound 1 */
+				// Is this opcode actually used in games?
 				o_unk_163(getVarOrWord());
 			}
 			break;
@@ -969,7 +970,7 @@
 			}
 			break;
 
-		case 177:{									/* Inventory descriptions */
+		case 177:{									/* inventory descriptions */
 				o_inventory_descriptions();
 			}
 			break;
@@ -983,7 +984,7 @@
 			}
 			break;
 
-		case 179:{									/* Room descriptions */
+		case 179:{									/* room descriptions */
 				uint b = getVarOrByte();
 				uint c = getVarOrByte();
 				uint a = getVarOrByte();
@@ -1035,7 +1036,7 @@
 			}
 			break;
 
-		case 185:{
+		case 185:{									/* midi sfx file number */
 				if (_game & GF_SIMON2)
 					goto invalid_opcode;
 				_midi_sfx = getVarOrWord();
@@ -1064,7 +1065,7 @@
 			}
 			break;
 
-		case 189:{
+		case 189:{									/* clear_op189_flag */
 				if (!(_game & GF_SIMON2))
 					goto invalid_opcode;
 				_op_189_flags = 0;

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- simon.cpp	30 May 2003 05:39:14 -0000	1.225
+++ simon.cpp	30 May 2003 09:39:21 -0000	1.226
@@ -1142,7 +1142,6 @@
 	// not needed
 }
 
-// Simon1DOS load tables file
 uint SimonState::loadTextFile_simon1(const char *filename, byte *dst) {
 	File fo;
 	fo.open(filename, _gameDataPath);
@@ -2723,8 +2722,7 @@
 #endif
 }
 
-void SimonState::o_wait_for_vga(uint a) {
-	_vga_wait_for = a;
+void SimonState::o_wait_for_vga(uint _vga_wait_for) {
 	_timer_1 = 0;
 	_exit_cutscene = false;
 	_skip_speech = false;
@@ -3240,43 +3238,33 @@
 }
 
 VgaSprite *SimonState::find_cur_sprite() {
-	if (_game & GF_SIMON2) {
-		VgaSprite *vsp = _vga_sprites;
-		while (vsp->id) {
+	VgaSprite *vsp = _vga_sprites;
+	while (vsp->id) {
+		if (_game & GF_SIMON2) {
 			if (vsp->id == _vga_cur_sprite_id && vsp->unk7 == _vga_cur_file_id)
 				break;
-			vsp++;
-		}
-		return vsp;
-	} else {
-		VgaSprite *vsp = _vga_sprites;
-		while (vsp->id) {
+		} else {
 			if (vsp->id == _vga_cur_sprite_id)
 				break;
-			vsp++;
 		}
-		return vsp;
+		vsp++;
 	}
+	return vsp;
 }
 
 bool SimonState::has_vgastruct_with_id(uint16 id, uint16 file) {
-	if (_game & GF_SIMON2) {
-		VgaSprite *vsp = _vga_sprites;
-		while (vsp->id) {
+	VgaSprite *vsp = _vga_sprites;
+	while (vsp->id) {
+		if (_game & GF_SIMON2) {
 			if (vsp->id == id && vsp->unk7 == file)
 				return true;
-			vsp++;
-		}
-		return false;
-	} else {
-		VgaSprite *vsp = _vga_sprites;
-		while (vsp->id) {
+		} else {
 			if (vsp->id == id)
 				return true;
-			vsp++;
 		}
-		return false;
+		vsp++;
 	}
+	return false;
 }
 
 void SimonState::processSpecialKeys() {





More information about the Scummvm-git-logs mailing list