diff options
author | Colin Snover | 2017-09-23 13:40:39 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-23 20:57:02 -0500 |
commit | 6972c9ae46acba424bcdfb5a002ca03b0edf2874 (patch) | |
tree | e211581314441b8b4db0eed8a83dae1671836eba /engines | |
parent | 602de8363b0c35e5fa4525432cc176b1843b808d (diff) | |
download | scummvm-rg350-6972c9ae46acba424bcdfb5a002ca03b0edf2874.tar.gz scummvm-rg350-6972c9ae46acba424bcdfb5a002ca03b0edf2874.tar.bz2 scummvm-rg350-6972c9ae46acba424bcdfb5a002ca03b0edf2874.zip |
SCI32: Fix bad default text scaling in RAMA
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index b12b63bdee..0937e9f6be 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -6222,6 +6222,25 @@ static const uint16 ramaBenchmarkPatch[] = { PATCH_END }; +// RAMA initialises the font system with an incorrect text resolution (it uses +// the resolution from Phant1) which causes text to be scaled incorrectly. +static const uint16 ramaTextResolutionSignature[] = { + 0x39, 0x03, // pushi 3 + 0x78, // push1 + SIG_MAGICDWORD, + 0x38, SIG_UINT16(0x276), // pushi 630 + 0x38, SIG_UINT16(0x1c2), // pushi 450 + 0x43, 0x49, SIG_UINT16(0x06), // callk Font, 6 + SIG_END +}; + +static const uint16 ramaTextResolutionPatch[] = { + PATCH_ADDTOOFFSET(+3), // pushi 3, push1 + 0x38, PATCH_UINT16(0x280), // pushi 640 + 0x38, PATCH_UINT16(0x1e0), // pushi 480 + PATCH_END +}; + // RAMA uses a custom save game format that game scripts read and write // manually. The save game format serialises object references, which in the // original engine could be done just by writing int16s (since object references @@ -6251,6 +6270,7 @@ static const uint16 ramaSerializeRegTPatch1[] = { }; static const SciScriptPatcherEntry ramaSignatures[] = { + { true, 0, "fix bad text resolution", 1, ramaTextResolutionSignature, ramaTextResolutionPatch }, { true, 85, "fix SaveManager to use normal readWord calls", 1, ramaSerializeRegTSignature1, ramaSerializeRegTPatch1 }, { true, 64908, "disable video benchmarking", 1, ramaBenchmarkSignature, ramaBenchmarkPatch }, SCI_SIGNATUREENTRY_TERMINATOR |