diff options
Diffstat (limited to 'engines/sci/engine/kernel.h')
-rw-r--r-- | engines/sci/engine/kernel.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 9c92519cf0..e73914a7e7 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -57,7 +57,7 @@ struct KernelFuncWithSignature { class Kernel { public: - Kernel(ResourceManager *resmgr, bool isOldSci0); + Kernel(ResourceManager *resmgr); ~Kernel(); uint getOpcodesSize() const { return _opcodes.size(); } @@ -84,6 +84,16 @@ public: bool hasKernelFunction(const char *functionName) const; /** + * Applies to all versions before 0.000.395 (i.e. KQ4 old, XMAS 1988 and LSL2). + * Old SCI versions used two word header for script blocks (first word equal + * to 0x82, meaning of the second one unknown). New SCI versions used one + * word header. + * Also, old SCI versions assign 120 degrees to left & right, and 60 to up + * and down. Later versions use an even 90 degree distribution. + */ + bool hasOldScriptHeader() const { return _oldScriptHeader; } + + /** * Applies to all versions before 0.000.502 * Old SCI versions used to interpret the third DrawPic() parameter inversely, * with the opposite default value (obviously). @@ -127,7 +137,12 @@ private: /** * Loads the kernel selector names. */ - void loadSelectorNames(bool isOldSci0); + void loadSelectorNames(); + + /** + * Maps special selectors + */ + void mapSelectors(); /** * Prints auto-detected features from selectors @@ -135,9 +150,9 @@ private: void printAutoDetectedFeatures(); /** - * Maps special selectors + * Detects if the game is using older script headers */ - void mapSelectors(); + void detectOldScriptHeader(); /** * Maps kernel functions @@ -151,6 +166,7 @@ private: bool loadOpcodes(); ResourceManager *_resmgr; + bool _oldScriptHeader; bool _oldGfxFunctions; bool _hasLofsAbsolute; |