[Scummvm-cvs-logs] SF.net SVN: scummvm: [32786] scummvm/trunk/engines/cine
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Wed Jun 25 19:14:44 CEST 2008
Revision: 32786
http://scummvm.svn.sourceforge.net/scummvm/?rev=32786&view=rev
Author: buddha_
Date: 2008-06-25 10:14:44 -0700 (Wed, 25 Jun 2008)
Log Message:
-----------
Implemented opcode:
- 0x82: o2_modifySeqListElement (Was o2_op82)
Seeks a matching element from the seqList and modifies its values.
Modified Paths:
--------------
scummvm/trunk/engines/cine/script.h
scummvm/trunk/engines/cine/script_os.cpp
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/script.h
===================================================================
--- scummvm/trunk/engines/cine/script.h 2008-06-25 15:09:24 UTC (rev 32785)
+++ scummvm/trunk/engines/cine/script.h 2008-06-25 17:14:44 UTC (rev 32786)
@@ -237,7 +237,7 @@
int o2_playSample();
int o2_playSampleAlt();
int o2_op81();
- int o2_op82();
+ int o2_modifySeqListElement();
int o2_isSeqRunning();
int o2_gotoIfSupNearest();
int o2_gotoIfSupEquNearest();
Modified: scummvm/trunk/engines/cine/script_os.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_os.cpp 2008-06-25 15:09:24 UTC (rev 32785)
+++ scummvm/trunk/engines/cine/script_os.cpp 2008-06-25 17:14:44 UTC (rev 32786)
@@ -202,7 +202,7 @@
/* 80 */
{ &FWScript::o2_removeSeq, "bb" },
{ &FWScript::o2_op81, "" }, /* TODO: Name this opcode properly. */
- { &FWScript::o2_op82, "bbwwb" }, /* TODO: Name this opcode properly. */
+ { &FWScript::o2_modifySeqListElement, "bbwwb" },
{ &FWScript::o2_isSeqRunning, "bb" },
/* 84 */
{ &FWScript::o2_gotoIfSupNearest, "b" },
@@ -449,15 +449,15 @@
return 0;
}
-/*! \todo Implement this instruction
- */
-int FWScript::o2_op82() {
+int FWScript::o2_modifySeqListElement() {
byte a = getNextByte();
byte b = getNextByte();
uint16 c = getNextWord();
uint16 d = getNextWord();
byte e = getNextByte();
- warning("STUB: o2_op82(%x, %x, %x, %x, %x)", a, b, c, d, e);
+ debugC(5, kCineDebugScript, "Line: %d: o2_modifySeqListElement(%d,%d,%d,%d,%d)", _line, a, b, c, d, e);
+
+ modifySeqListElement(a, 0, b, c, d, e);
return 0;
}
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2008-06-25 15:09:24 UTC (rev 32785)
+++ scummvm/trunk/engines/cine/various.cpp 2008-06-25 17:14:44 UTC (rev 32786)
@@ -1618,6 +1618,19 @@
seqList.insert(it, tmp);
}
+void modifySeqListElement(uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4) {
+ // Find a suitable list element and modify it
+ for (Common::List<SeqListElement>::iterator it = seqList.begin(); it != seqList.end(); ++it) {
+ if (it->objIdx == objIdx && it->var4 == var4Test) {
+ it->varC = param1;
+ it->var18 = param2;
+ it->var1A = param3;
+ it->var10 = it->var12 = param4;
+ break;
+ }
+ }
+}
+
void computeMove1(SeqListElement &element, int16 x, int16 y, int16 param1,
int16 param2, int16 x2, int16 y2) {
element.var16 = 0;
Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h 2008-06-25 15:09:24 UTC (rev 32785)
+++ scummvm/trunk/engines/cine/various.h 2008-06-25 17:14:44 UTC (rev 32786)
@@ -138,6 +138,7 @@
void removeSeq(uint16 param1, uint16 param2, uint16 param3);
uint16 isSeqRunning(uint16 param1, uint16 param2, uint16 param3);
void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);
+void modifySeqListElement(uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4);
void processSeqList(void);
bool makeTextEntryMenu(const char *caption, char *string, int strLen, int y);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list