SCI32: Fix bad text rendering in RAMA
In SCI3, Sierra removed the ability of the main renderer to automatically scale CelObjs with different source resolutions. Instead, in SCI3, all CelObjs are treated as having the same resolution as the screen (i.e. 640x480). In all SCI3 games other than RAMA, keeping the code paths for resolution-dependent scaling is not a problem because all the assets and game code are correctly designed to use the same 640x480 resolution throughout. RAMA, on the other hand, was written with the text subsystem set to a resolution of 630x450 (Phant1's screen resolution), and in SSCI, resolution-dependent scaling code was not removed from the *text* subsystem. As a result, RAMA's game scripts rely on the slightly larger scaled dimensions coming out of the text system when determining the size of screen items for rendering, and then also rely on the main renderer ignoring the 630x450 resolution baked into the bitmaps generated by the text subsystem when drawing them to the screen.
This commit is contained in:
parent
a99c6774ff
commit
3cdf26b355
4 changed files with 41 additions and 36 deletions
|
@ -6382,25 +6382,6 @@ 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
|
||||
|
@ -6474,7 +6455,6 @@ static const uint16 ramaChangeDirPatch[] = {
|
|||
};
|
||||
|
||||
static const SciScriptPatcherEntry ramaSignatures[] = {
|
||||
{ true, 0, "fix bad text resolution", 1, ramaTextResolutionSignature, ramaTextResolutionPatch },
|
||||
{ true, 55, "fix bad DocReader::init priority calculation", 1, ramaDocReaderInitSignature, ramaDocReaderInitPatch },
|
||||
{ true, 85, "fix SaveManager to use normal readWord calls", 1, ramaSerializeRegTSignature1, ramaSerializeRegTPatch1 },
|
||||
{ true, 64908, "disable video benchmarking", 1, ramaBenchmarkSignature, ramaBenchmarkPatch },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue