[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.139,1.140 simon.cpp,1.547,1.548 simon.h,1.167,1.168 vga.cpp,1.163,1.164
kirben
kirben at users.sourceforge.net
Fri Nov 18 06:22:35 CET 2005
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14103/simon
Modified Files:
items.cpp simon.cpp simon.h vga.cpp
Log Message:
Updates to FF path finding.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- items.cpp 18 Nov 2005 02:31:24 -0000 1.139
+++ items.cpp 18 Nov 2005 14:15:03 -0000 1.140
@@ -1096,25 +1096,31 @@
// Feeble opcodes
case 191:
- warning("STUB: script opcode 191");
if (_bitArray[5] & 0x0008) {
- // Clear some variables
+ _PVCount1 = 0;
+ _GPVCount1 = 0;
} else {
- // Clear some other variables
+ _PVCount = 0;
+ _GPVCount = 0;
}
break;
case 192:{
- uint a = getVarOrByte();
- uint b = getVarOrByte();
- uint c = getVarOrByte();
- uint d = getVarOrByte();
+ uint8 a = getVarOrByte();
+ uint8 b = getVarOrByte();
+ uint8 c = getVarOrByte();
+ uint8 d = getVarOrByte();
if (_bitArray[5] & 0x0008) {
- // Set some variables
+ _pathValues1[_PVCount1++] = a;
+ _pathValues1[_PVCount1++] = b;
+ _pathValues1[_PVCount1++] = c;
+ _pathValues1[_PVCount1++] = d;
} else {
- // Set some other variables
+ _pathValues[_PVCount++] = a;
+ _pathValues[_PVCount++] = b;
+ _pathValues[_PVCount++] = c;
+ _pathValues[_PVCount++] = d;
}
- warning("STUB: script opcode 192 (%d, %d, %d, %d)", a, b, c, d);
}
break;
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.547
retrieving revision 1.548
diff -u -d -r1.547 -r1.548
--- simon.cpp 18 Nov 2005 12:40:03 -0000 1.547
+++ simon.cpp 18 Nov 2005 14:15:03 -0000 1.548
@@ -468,6 +468,14 @@
memset(_pathFindArray, 0, sizeof(_pathFindArray));
+ memset(_pathValues, 0, sizeof(_pathValues));
+ _PVCount = 0;
+ _GPVCount = 0;
+
+ memset(_pathValues1, 0, sizeof(_pathValues1));
+ _PVCount1 = 0;
+ _GPVCount1 = 0;
+
memset(_paletteBackup, 0, sizeof(_paletteBackup));
memset(_palette, 0, sizeof(_palette));
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- simon.h 18 Nov 2005 13:47:47 -0000 1.167
+++ simon.h 18 Nov 2005 14:15:03 -0000 1.168
@@ -379,6 +379,14 @@
const uint16 *_pathFindArray[100];
+ uint8 _pathValues[100];
+ uint8 _PVCount;
+ uint8 _GPVCount;
+
+ uint8 _pathValues1[100];
+ uint8 _PVCount1;
+ uint8 _GPVCount1;
+
uint8 _paletteBackup[1024];
uint8 _palette[1024];
@@ -753,7 +761,7 @@
void vc79_computePosNum();
void vc80_setOverlayImage();
void vc81_setRandom();
- void vc82_pathUnk3();
+ void vc82_getPathValue();
void vc83_playSoundLoop();
void vc84_stopSoundLoop();
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- vga.cpp 18 Nov 2005 13:47:47 -0000 1.163
+++ vga.cpp 18 Nov 2005 14:15:03 -0000 1.164
@@ -114,7 +114,7 @@
&SimonEngine::vc79_computePosNum,
&SimonEngine::vc80_setOverlayImage,
&SimonEngine::vc81_setRandom,
- &SimonEngine::vc82_pathUnk3,
+ &SimonEngine::vc82_getPathValue,
&SimonEngine::vc83_playSoundLoop,
&SimonEngine::vc84_stopSoundLoop,
};
@@ -2163,11 +2163,18 @@
writeVariable(var, _rnd.getRandomNumber(value - 1));
}
-void SimonEngine::vc82_pathUnk3() {
- // Set var to path position
- int var = vc_read_next_word();
+void SimonEngine::vc82_getPathValue() {
+ uint8 val;
- debug(0, "STUB: vc82_pathUnk3: var %d", var);
+ uint16 var = vc_read_next_word();
+
+ if (vc_get_bit(88) == true) {
+ val = _pathValues1[_GPVCount1++];
+ } else {
+ val = _pathValues[_GPVCount++];
+ }
+
+ writeVariable(var, val);
}
void SimonEngine::vc83_playSoundLoop() {
More information about the Scummvm-git-logs
mailing list