[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.512,1.513 simon.h,1.143,1.144 vga.cpp,1.132,1.133

kirben kirben at users.sourceforge.net
Wed Oct 5 05:18:24 CEST 2005


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

Modified Files:
	simon.cpp simon.h vga.cpp 
Log Message:

Cleanup


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.512
retrieving revision 1.513
diff -u -d -r1.512 -r1.513
--- simon.cpp	5 Oct 2005 11:37:26 -0000	1.512
+++ simon.cpp	5 Oct 2005 12:16:49 -0000	1.513
@@ -2694,11 +2694,11 @@
 void SimonEngine::o_force_lock() {
 	if (_game & GF_SIMON2) {
 		_lockWord |= 0x8000;
-		vc34_forceLock();
+		vc34_setMouseOff();
 		_lockWord &= ~0x8000;
 	} else {
 		_lockWord |= 0x4000;
-		vc34_forceLock();
+		vc34_setMouseOff();
 		_lockWord &= ~0x4000;
 	}
 }
@@ -3817,7 +3817,7 @@
 
 	loadIconFile();
 
-	vc34_forceLock();
+	vc34_setMouseOff();
 
 	runSubroutine101();
 	startUp_helper_2();

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- simon.h	5 Oct 2005 11:37:26 -0000	1.143
+++ simon.h	5 Oct 2005 12:16:49 -0000	1.144
@@ -612,10 +612,10 @@
 
 public:
 	// Simon1/Simon2 video script opcodes
-	void vc1_dummy_op();
+	void vc1_fadeOut();
 	void vc2_call();
 	void vc3_loadSprite();
-	void vc4_dummy_op();
+	void vc4_fadeIn();
 	void vc5_skip_if_neq();
 	void vc6_skip_ifn_sib_with_a();
 	void vc7_skip_if_sib_with_a();
@@ -631,23 +631,23 @@
 	void vc17_setPathfinderItem();
 	void vc18_jump();
 	void vc19_chain_to_script();
-	void vc20_set_code_word();
-	void vc21_jump_if_code_word();
+	void vc20_setRepeat();
+	void vc21_endRepeat();
 	void vc22_setSpritePalette();
 	void vc23_setSpritePriority();
 	void vc24_setSpriteXY();
 	void vc25_halt_sprite();
-	void vc26_setWindow();
+	void vc26_setSubWindow();
 	void vc27_resetSprite();
 	void vc28_dummy_op();
 	void vc29_stopAllSounds();
 	void vc30_setFrameRate();
 	void vc31_setWindow();
 	void vc32_copyVar();
-	void vc33_forceUnlock();
-	void vc34_forceLock();
-	void vc35();
-	void vc36_saveLoadDialog();
+	void vc33_setMouseOn();
+	void vc34_setMouseOff();
+	void vc35_clearWindow();
+	void vc36_setWindowImage();
 	void vc37_addToSpriteY();
 	void vc38_skipIfVarZero();
 	void vc39_setVar();

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- vga.cpp	5 Oct 2005 11:37:26 -0000	1.132
+++ vga.cpp	5 Oct 2005 12:16:49 -0000	1.133
@@ -34,10 +34,10 @@
 // Opcode tables
 static const VgaOpcodeProc vga_opcode_table[] = {
 	NULL,
-	&SimonEngine::vc1_dummy_op,
+	&SimonEngine::vc1_fadeOut,
 	&SimonEngine::vc2_call,
 	&SimonEngine::vc3_loadSprite,
-	&SimonEngine::vc4_dummy_op,
+	&SimonEngine::vc4_fadeIn,
 	&SimonEngine::vc5_skip_if_neq,
 	&SimonEngine::vc6_skip_ifn_sib_with_a,
 	&SimonEngine::vc7_skip_if_sib_with_a,
@@ -53,23 +53,23 @@
 	&SimonEngine::vc17_setPathfinderItem,
 	&SimonEngine::vc18_jump,
 	&SimonEngine::vc19_chain_to_script,
-	&SimonEngine::vc20_set_code_word,
-	&SimonEngine::vc21_jump_if_code_word,
+	&SimonEngine::vc20_setRepeat,
+	&SimonEngine::vc21_endRepeat,
 	&SimonEngine::vc22_setSpritePalette,
 	&SimonEngine::vc23_setSpritePriority,
 	&SimonEngine::vc24_setSpriteXY,
 	&SimonEngine::vc25_halt_sprite,
-	&SimonEngine::vc26_setWindow,
+	&SimonEngine::vc26_setSubWindow,
 	&SimonEngine::vc27_resetSprite,
 	&SimonEngine::vc28_dummy_op,
 	&SimonEngine::vc29_stopAllSounds,
 	&SimonEngine::vc30_setFrameRate,
 	&SimonEngine::vc31_setWindow,
 	&SimonEngine::vc32_copyVar,
-	&SimonEngine::vc33_forceUnlock,
-	&SimonEngine::vc34_forceLock,
-	&SimonEngine::vc35,
-	&SimonEngine::vc36_saveLoadDialog,
+	&SimonEngine::vc33_setMouseOn,
+	&SimonEngine::vc34_setMouseOff,
+	&SimonEngine::vc35_clearWindow,
+	&SimonEngine::vc36_setWindowImage,
 	&SimonEngine::vc37_addToSpriteY,
 	&SimonEngine::vc38_skipIfVarZero,
 	&SimonEngine::vc39_setVar,
@@ -214,7 +214,7 @@
 }
 
 // VGA Script commands
-void SimonEngine::vc1_dummy_op() {
+void SimonEngine::vc1_fadeOut() {
 	/* dummy opcode */
 	_vcPtr += 6;
 }
@@ -356,7 +356,7 @@
 	_curVgaFile1 = old_file_1;
 }
 
-void SimonEngine::vc4_dummy_op() {
+void SimonEngine::vc4_fadeIn() {
 	/* dummy opcode */
 	_vcPtr += 6;
 }
@@ -1100,7 +1100,7 @@
 
 /* helper routines */
 
-void SimonEngine::vc20_set_code_word() {
+void SimonEngine::vc20_setRepeat() {
 	/* FIXME: This opcode is somewhat strange: it first reads a BE word from
 	 * the script (advancing the script pointer in doing so); then it writes
 	 * back the same word, this time as LE, into the script.
@@ -1110,7 +1110,7 @@
 	_vcPtr += 2;
 }
 
-void SimonEngine::vc21_jump_if_code_word() {
+void SimonEngine::vc21_endRepeat() {
 	int16 a = vc_read_next_word();
 	const byte *tmp = _vcPtr + a;
 	if (_game & GF_SIMON2)
@@ -1211,12 +1211,12 @@
 	_vgaSpriteChanged++;
 }
 
-void SimonEngine::vc26_setWindow() {
-	uint16 *as = &_video_windows[vc_read_next_word() * 4];
-	as[0] = vc_read_next_word();
-	as[1] = vc_read_next_word();
-	as[2] = vc_read_next_word();
-	as[3] = vc_read_next_word();
+void SimonEngine::vc26_setSubWindow() {
+	uint16 *as = &_video_windows[vc_read_next_word() * 4]; // number
+	as[0] = vc_read_next_word(); // x
+	as[1] = vc_read_next_word(); // y
+	as[2] = vc_read_next_word(); // width
+	as[3] = vc_read_next_word(); // height
 }
 
 void SimonEngine::vc27_resetSprite() {
@@ -1295,38 +1295,38 @@
 	vc_write_var(vc_read_next_word(), a);
 }
 
-void SimonEngine::vc33_forceUnlock() {
+void SimonEngine::vc33_setMouseOn() {
 	if (_lockCounter != 0) {
 		_lockCounter = 1;
 		unlock();
 	}
 }
 
-void SimonEngine::vc34_forceLock() {
+void SimonEngine::vc34_setMouseOff() {
 	lock();
 	_lockCounter = 200;
 	_leftButtonDown = 0;
 }
 
-void SimonEngine::vc35() {
+void SimonEngine::vc35_clearWindow() {
 	/* unused */
 	_vcPtr += 4;
 	_vgaSpriteChanged++;
 }
 
-void SimonEngine::vc36_saveLoadDialog() {
+void SimonEngine::vc36_setWindowImage() {
 	_videoVar8 = false;
 	uint vga_res = vc_read_next_word();
-	uint mode = vc_read_next_word();
+	uint windowNum = vc_read_next_word();
 
 	if (_game & GF_SIMON1) {
-		if (mode == 16) {
+		if (windowNum == 16) {
 			_copyPartialMode = 2;
 		} else {
-			set_video_mode_internal(mode, vga_res);
+			set_video_mode_internal(windowNum, vga_res);
 		}
 	} else {
-		set_video_mode_internal(mode, vga_res);
+		set_video_mode_internal(windowNum, vga_res);
 	}
 }
 





More information about the Scummvm-git-logs mailing list