mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
fixed cutscene override in V8; cleanup
svn-id: r6316
This commit is contained in:
parent
0ab1edf809
commit
53a8fc24fe
@ -335,10 +335,10 @@ protected:
|
||||
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 @@ protected:
|
||||
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();
|
||||
|
@ -918,7 +918,6 @@ int Scumm::getVerbEntrypoint(int obj, int entry)
|
||||
void Scumm::endCutscene()
|
||||
{
|
||||
ScriptSlot *ss = &vm.slot[_currentScript];
|
||||
uint32 *csptr;
|
||||
int args[16];
|
||||
|
||||
memset(args, 0, sizeof(args));
|
||||
@ -929,12 +928,11 @@ void Scumm::endCutscene()
|
||||
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 @@ bool Scumm::isRoomScriptRunning(int script)
|
||||
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::beginOverride()
|
||||
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 @@ void Scumm::exitCutscene()
|
||||
if (ss->cutsceneOverride > 0)
|
||||
ss->cutsceneOverride--;
|
||||
|
||||
printf("exitCutscene()\n");
|
||||
_vars[VAR_OVERRIDE] = 1;
|
||||
vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
|
||||
}
|
||||
|
@ -268,10 +268,10 @@ void Scumm_v6::setupOpcodes()
|
||||
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 @@ void Scumm_v6::o6_stopSentence()
|
||||
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);
|
||||
}
|
||||
|
@ -223,11 +223,11 @@ void Scumm_v8::setupOpcodes()
|
||||
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),
|
||||
@ -726,30 +726,6 @@ void Scumm_v8::o8_arrayOps()
|
||||
}
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
// FIXME
|
||||
|
@ -235,7 +235,7 @@ void Scumm_v8::setupScummVars()
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user