[Scummvm-cvs-logs] CVS: scummvm/scumm input.cpp,2.35,2.36 intern.h,2.521,2.522 script.cpp,1.228,1.229 script_c64.cpp,2.18,2.19 vars.cpp,1.143,1.144
kirben
kirben at users.sourceforge.net
Wed Sep 14 03:36:16 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9182/scumm
Modified Files:
input.cpp intern.h script.cpp script_c64.cpp vars.cpp
Log Message:
Fix skipping cutscenes in C64 maniac.
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/input.cpp,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -d -r2.35 -r2.36
--- input.cpp 3 Sep 2005 19:49:25 -0000 2.35
+++ input.cpp 14 Sep 2005 10:35:04 -0000 2.36
@@ -417,8 +417,9 @@
else
saveloadkey = VAR(VAR_MAINMENU_KEY);
- if (_lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY) ||
- ((VAR(VAR_CUTSCENEEXIT_KEY) == 4 || VAR(VAR_CUTSCENEEXIT_KEY) == 64) && _lastKeyHit == 27)) {
+ if ((_platform == Common::kPlatformC64 && _gameId == GID_MANIAC && _lastKeyHit == 27) ||
+ ((VAR(VAR_CUTSCENEEXIT_KEY) == 4 || VAR(VAR_CUTSCENEEXIT_KEY) == 64) && _lastKeyHit == 27) ||
+ _lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY)) {
#ifndef DISABLE_SCUMM_7_8
// Skip cutscene (or active SMUSH video). For the V2 games, which
// normally use F4 for this, we add in a hack that makes escape work,
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.521
retrieving revision 2.522
diff -u -d -r2.521 -r2.522
--- intern.h 14 Sep 2005 08:20:37 -0000 2.521
+++ intern.h 14 Sep 2005 10:35:04 -0000 2.522
@@ -405,6 +405,8 @@
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
+ virtual void setupScummVars();
+
virtual int getVarOrDirectWord(byte mask);
virtual uint fetchScriptWord();
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -d -r1.228 -r1.229
--- script.cpp 14 Sep 2005 05:31:18 -0000 1.228
+++ script.cpp 14 Sep 2005 10:35:04 -0000 1.229
@@ -1170,7 +1170,7 @@
if (ss->cutsceneOverride > 0)
ss->cutsceneOverride--;
- VAR(VAR_OVERRIDE) = 1;
+ VAR(6) = 1;
vm.cutScenePtr[idx] = 0;
// HACK to fix issues with SMUSH and the way it does keyboard handling.
Index: script_c64.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_c64.cpp,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -d -r2.18 -r2.19
--- script_c64.cpp 14 Sep 2005 08:20:37 -0000 2.18
+++ script_c64.cpp 14 Sep 2005 10:35:04 -0000 2.19
@@ -651,9 +651,20 @@
}
void ScummEngine_c64::o_beginOverride() {
+ const int idx = vm.cutSceneStackPointer;
+ assert(0 <= idx && idx < 5);
+
+ 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();
- fetchScriptByte();
- fetchScriptByte();
+ ScummEngine::fetchScriptWord();
+
+ // This is based on disassembly
+ VAR(VAR_OVERRIDE) = 0;
}
void ScummEngine_c64::o_isEqual() {
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- vars.cpp 2 Sep 2005 11:24:16 -0000 1.143
+++ vars.cpp 14 Sep 2005 10:35:04 -0000 1.144
@@ -104,6 +104,42 @@
}
}
+void ScummEngine_c64::setupScummVars() {
+ VAR_EGO = 0;
+ VAR_CAMERA_POS_X = 2;
+ VAR_HAVE_MSG = 3;
+ VAR_ROOM = 4;
+ VAR_OVERRIDE = 6;
+ VAR_CHARCOUNT = 7;
+ VAR_ACTIVE_VERB = 8;
+ VAR_ACTIVE_OBJECT1 = 9;
+ VAR_ACTIVE_OBJECT2 = 10;
+ VAR_NUM_ACTOR = 11;
+ VAR_CURRENT_LIGHTS = 12;
+ VAR_CURRENTDRIVE = 13;
+ VAR_MUSIC_TIMER = 17;
+ VAR_VERB_ALLOWED = 18;
+ VAR_ACTOR_RANGE_MIN = 19;
+ VAR_ACTOR_RANGE_MAX = 20;
+ VAR_CURSORSTATE = 21;
+ VAR_CAMERA_MIN_X = 23;
+ VAR_CAMERA_MAX_X = 24;
+ VAR_TIMER_NEXT = 25;
+ VAR_SENTENCE_VERB = 26;
+ VAR_SENTENCE_OBJECT1 = 27;
+ VAR_SENTENCE_OBJECT2 = 28;
+ VAR_SENTENCE_PREPOSITION = 29;
+ VAR_VIRT_MOUSE_X = 30;
+ VAR_VIRT_MOUSE_Y = 31;
+ VAR_CLICK_AREA = 32;
+ VAR_ROOM_RESOURCE = 36;
+ VAR_LAST_SOUND = 37;
+ VAR_BACKUP_VERB = 38;
+ VAR_KEYPRESS = 39;
+ VAR_CUTSCENEEXIT_KEY = 40;
+ VAR_TALK_ACTOR = 41;
+}
+
void ScummEngine_v2::setupScummVars() {
VAR_EGO = 0;
VAR_CAMERA_POS_X = 2;
More information about the Scummvm-git-logs
mailing list