aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/pcode.h
diff options
context:
space:
mode:
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;