aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/pcode.h
diff options
context:
space:
mode:
authorPaul Gilbert2009-07-15 08:55:12 +0000
committerPaul Gilbert2009-07-15 08:55:12 +0000
commit544bf83f33d41499b14e891a8eb395e556673b97 (patch)
tree03c2eb250455d945d187c0d4e419cad39636158f /engines/tinsel/pcode.h
parent9c06549d318be73de69e7e42ccbe49f99bbdc7cd (diff)
downloadscummvm-rg350-544bf83f33d41499b14e891a8eb395e556673b97.tar.gz
scummvm-rg350-544bf83f33d41499b14e891a8eb395e556673b97.tar.bz2
scummvm-rg350-544bf83f33d41499b14e891a8eb395e556673b97.zip
Created a system for inserting arbitrary code fragments into game scripts, and added an initial fragment to fix the bug of being stuck in the past in the DW1 SCN version
svn-id: r42500
Diffstat (limited to 'engines/tinsel/pcode.h')
-rw-r--r--engines/tinsel/pcode.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h
index 4bdfcf5626..fad50cdb9d 100644
--- a/engines/tinsel/pcode.h
+++ b/engines/tinsel/pcode.h
@@ -54,6 +54,17 @@ enum GSORT {
enum RESCODE {RES_WAITING, RES_FINISHED, RES_CUTSHORT};
+// The following structure is used to introduce bug fixes into the scripts used by the games
+
+struct WorkaroundEntry {
+ TinselEngineVersion version;
+ bool scnFlag; // Only applicable for Tinsel 1 (DW 1)
+ SCNHANDLE hCode; // Script to apply fragment to
+ int ip; // Script offset to run this fragment before
+ int numBytes; // Number of bytes in the script
+ const byte *script; // Instruction(s) to execute
+};
+
struct INT_CONTEXT {
// Elements for interpret context management
@@ -82,6 +93,9 @@ struct INT_CONTEXT {
RESCODE resumeCode;
RESUME_STATE resumeState;
+ // Used to store execution state within a script workaround fragment
+ const WorkaroundEntry *fragmentPtr;
+
void syncWithSerializer(Common::Serializer &s);
};
typedef INT_CONTEXT *PINT_CONTEXT;