[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.27,2.28 script.cpp,1.36,1.37 script_v6.cpp,1.32,1.33 script_v8.cpp,2.89,2.90 vars.cpp,1.28,1.29
Max Horn
fingolfin at users.sourceforge.net
Wed Jan 1 09:58:35 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.18,2.19
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.47,1.48 actor.h,1.9,1.10 script.cpp,1.37,1.38 script_v5.cpp,1.11,1.12 script_v6.cpp,1.33,1.34 scumm.h,1.124,1.125
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv22011
Modified Files:
intern.h script.cpp script_v6.cpp script_v8.cpp vars.cpp
Log Message:
fixed cutscene override in V8; cleanup
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.27
retrieving revision 2.28
diff -u -d -r2.27 -r2.28
--- intern.h 31 Dec 2002 17:28:50 -0000 2.27
+++ intern.h 1 Jan 2003 17:57:13 -0000 2.28
@@ -335,10 +335,10 @@
void o6_delaySeconds();
void o6_delayMinutes();
void o6_stopSentence();
- void o6_print_0();
- void o6_print_1();
- void o6_print_2();
- void o6_print_3();
+ void o6_printLine();
+ void o6_printCursor();
+ void o6_printDebug();
+ void o6_printSystem();
void o6_printActor();
void o6_printEgo();
void o6_talkActor();
@@ -413,10 +413,6 @@
void o8_dim();
void o8_dim2();
void o8_arrayOps();
- void o8_printLine();
- void o8_printCursor();
- void o8_printDebug();
- void o8_printSystem();
void o8_blastText();
void o8_cursorCommand();
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- script.cpp 30 Dec 2002 02:11:33 -0000 1.36
+++ script.cpp 1 Jan 2003 17:57:13 -0000 1.37
@@ -918,7 +918,6 @@
void Scumm::endCutscene()
{
ScriptSlot *ss = &vm.slot[_currentScript];
- uint32 *csptr;
int args[16];
memset(args, 0, sizeof(args));
@@ -929,12 +928,11 @@
args[0] = vm.cutSceneData[vm.cutSceneStackPointer];
_vars[VAR_OVERRIDE] = 0;
- csptr = &vm.cutScenePtr[vm.cutSceneStackPointer];
- if (*csptr && (ss->cutsceneOverride > 0)) // Only terminate if active
+ if (vm.cutScenePtr[vm.cutSceneStackPointer] && (ss->cutsceneOverride > 0)) // Only terminate if active
ss->cutsceneOverride--;
vm.cutSceneScript[vm.cutSceneStackPointer] = 0;
- *csptr = 0;
+ vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
vm.cutSceneStackPointer--;
if (_vars[VAR_CUTSCENE_END_SCRIPT])
@@ -998,14 +996,16 @@
void Scumm::beginOverride()
{
int idx;
- uint32 *ptr;
idx = vm.cutSceneStackPointer;
- ptr = &vm.cutScenePtr[idx];
+ assert(idx < 5);
- *ptr = _scriptPointer - _scriptOrgPointer;
+ vm.cutScenePtr[idx] = _scriptPointer - _scriptOrgPointer;
vm.cutSceneScript[idx] = _currentScript;
+ // Skip the jump instruction following the override instruction
+ // (the jump is responsible for "skipping" cutscenes, and the reason
+ // why we record the current script position in vm.cutScenePtr).
fetchScriptByte();
fetchScriptWord();
_vars[VAR_OVERRIDE] = 0;
@@ -1014,12 +1014,11 @@
void Scumm::endOverride()
{
int idx;
- uint32 *ptr;
idx = vm.cutSceneStackPointer;
- ptr = &vm.cutScenePtr[idx];
+ assert(idx < 5);
- *ptr = 0;
+ vm.cutScenePtr[idx] = 0;
vm.cutSceneScript[idx] = 0;
_vars[VAR_OVERRIDE] = 0;
}
@@ -1152,6 +1151,7 @@
if (ss->cutsceneOverride > 0)
ss->cutsceneOverride--;
+printf("exitCutscene()\n");
_vars[VAR_OVERRIDE] = 1;
vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
}
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- script_v6.cpp 30 Dec 2002 02:06:18 -0000 1.32
+++ script_v6.cpp 1 Jan 2003 17:57:13 -0000 1.33
@@ -268,10 +268,10 @@
OPCODE(o6_delayMinutes),
OPCODE(o6_stopSentence),
/* B4 */
- OPCODE(o6_print_0),
- OPCODE(o6_print_1),
- OPCODE(o6_print_2),
- OPCODE(o6_print_3),
+ OPCODE(o6_printLine),
+ OPCODE(o6_printCursor),
+ OPCODE(o6_printDebug),
+ OPCODE(o6_printSystem),
/* B8 */
OPCODE(o6_printActor),
OPCODE(o6_printEgo),
@@ -2259,23 +2259,23 @@
clearClickedStatus();
}
-void Scumm_v6::o6_print_0()
+void Scumm_v6::o6_printLine()
{
_actorToPrintStrFor = 0xFF;
decodeParseString(0, 0);
}
-void Scumm_v6::o6_print_1()
+void Scumm_v6::o6_printCursor()
{
decodeParseString(1, 0);
}
-void Scumm_v6::o6_print_2()
+void Scumm_v6::o6_printDebug()
{
decodeParseString(2, 0);
}
-void Scumm_v6::o6_print_3()
+void Scumm_v6::o6_printSystem()
{
decodeParseString(3, 0);
}
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.89
retrieving revision 2.90
diff -u -d -r2.89 -r2.90
--- script_v8.cpp 1 Jan 2003 11:38:59 -0000 2.89
+++ script_v8.cpp 1 Jan 2003 17:57:13 -0000 2.90
@@ -223,11 +223,11 @@
OPCODE(o6_printEgo),
OPCODE(o6_talkActor),
OPCODE(o6_talkEgo),
- OPCODE(o8_printLine),
+ OPCODE(o6_printLine),
/* 94 */
- OPCODE(o8_printCursor),
- OPCODE(o8_printDebug),
- OPCODE(o8_printSystem),
+ OPCODE(o6_printCursor),
+ OPCODE(o6_printDebug),
+ OPCODE(o6_printSystem),
OPCODE(o8_blastText),
/* 98 */
OPCODE(o6_invalid),
@@ -724,30 +724,6 @@
default:
error("o8_arrayOps: default case %d (array %d)", subOp, array);
}
-}
-
-void Scumm_v8::o8_printLine()
-{
- // FIXME
- decodeParseString(0, 0);
-}
-
-void Scumm_v8::o8_printCursor()
-{
- // FIXME
- decodeParseString(1, 0);
-}
-
-void Scumm_v8::o8_printDebug()
-{
- // FIXME
- decodeParseString(2, 0);
-}
-
-void Scumm_v8::o8_printSystem()
-{
- // FIXME
- decodeParseString(3, 0);
}
void Scumm_v8::o8_blastText()
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- vars.cpp 1 Jan 2003 02:56:22 -0000 1.28
+++ vars.cpp 1 Jan 2003 17:57:14 -0000 1.29
@@ -235,7 +235,7 @@
VAR_TIMEDATE_MINUTE = 28;
VAR_TIMEDATE_SECOND = 29;
- //VAR_OVERRIDE = 30; // Oops. 30 has something to do with overrides, but this isn't it..
+ VAR_OVERRIDE = 30;
VAR_ROOM = 31;
//VAR_VOICE_MODE = 39; // 0 is voice, 1 is voice+text, 2 is text only
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.18,2.19
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.47,1.48 actor.h,1.9,1.10 script.cpp,1.37,1.38 script_v5.cpp,1.11,1.12 script_v6.cpp,1.33,1.34 scumm.h,1.124,1.125
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list