[Scummvm-cvs-logs] CVS: scummvm/sword1 logic.cpp,1.18,1.19 sworddefs.h,1.9,1.10
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Sun Dec 21 13:59:01 CET 2003
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv20972/sword1
Modified Files:
logic.cpp sworddefs.h
Log Message:
added workaround for scriptbug (fixes ending sequence).
Sword1 is completable now with some graphical glitches left to fix.
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- logic.cpp 21 Dec 2003 16:50:02 -0000 1.18
+++ logic.cpp 21 Dec 2003 21:58:36 -0000 1.19
@@ -192,8 +192,15 @@
break;
case LOGIC_bookmark:
memcpy(&(compact->o_tree.o_script_level), &(compact->o_bookmark.o_script_level), sizeof(ScriptTree));
- compact->o_logic = LOGIC_script;
- logicRet = 1;
+ if (id == GMASTER_79) {
+ // workaround for ending script.
+ // GMASTER_79 is not prepared for mega_interact receiving INS_quit
+ fnSuicide(compact, id, 0, 0, 0, 0, 0, 0);
+ logicRet = 0;
+ } else {
+ compact->o_logic = LOGIC_script;
+ logicRet = 1;
+ }
break;
case LOGIC_speech:
logicRet = speechDriver(compact);
@@ -600,7 +607,7 @@
}
break;
case IT_SKIPONTRUE: // skip if expression true
- debug(9, "IT_SKIPONFALSE: %d (%s)", scriptCode[pc], (stack[stackIdx-1] ? "IS TRUE (SKIPPED)" : "IS FALSE (NOT SKIPPED)"));
+ debug(9, "IT_SKIPONTRUE: %d (%s)", scriptCode[pc], (stack[stackIdx-1] ? "IS TRUE (SKIPPED)" : "IS FALSE (NOT SKIPPED)"));
stackIdx--;
if (stack[stackIdx])
pc += scriptCode[pc];
@@ -856,8 +863,7 @@
}
int SwordLogic::fnFadeUp(BsObject *cpt, int32 id, int32 speed, int32 d, int32 e, int32 f, int32 z, int32 x) {
- warning("fnFadeUp speed = %d", speed);
- //_screen->fadeUpPalette();
+ _scriptVars[NEW_PALETTE] = 1;
return SCRIPT_CONT;
}
Index: sworddefs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sworddefs.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sworddefs.h 21 Dec 2003 16:50:02 -0000 1.9
+++ sworddefs.h 21 Dec 2003 21:58:36 -0000 1.10
@@ -1533,6 +1533,7 @@
POCKET_52
};
+#define GMASTER_79 5177345
#define SCR_std_off (0*0x10000 + 6)
#define SCR_exit0 (0*0x10000 + 7)
#define SCR_exit1 (0*0x10000 + 8)
More information about the Scummvm-git-logs
mailing list