diff options
author | Filippos Karapetis | 2009-05-14 07:28:06 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-14 07:28:06 +0000 |
commit | 2ca7605050c25eff88931fe523c2b005856803f1 (patch) | |
tree | f6e2c44ba06c4d2e0cb90f2d92e86a639197950b | |
parent | f63cf2df8f137fc85b7493f9d60b2a1acc3162ea (diff) | |
download | scummvm-rg350-2ca7605050c25eff88931fe523c2b005856803f1.tar.gz scummvm-rg350-2ca7605050c25eff88931fe523c2b005856803f1.tar.bz2 scummvm-rg350-2ca7605050c25eff88931fe523c2b005856803f1.zip |
- Enabled the code which puts the text inside the screen if it doesn't fit for all SCI versions
- Removed the check for the mechanism to resume suspended songs (it's no longer used)
svn-id: r40551
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 18 | ||||
-rw-r--r-- | engines/sci/sci.h | 19 | ||||
-rw-r--r-- | engines/sci/scicore/versions.h | 14 |
3 files changed, 13 insertions, 38 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 2cded826e1..ab9bbcf354 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -3260,18 +3260,16 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) { } } - if (s->version >= SCI_VERSION_FTU_DISPLAY_COORDS_FUZZY) { - if (halign == ALIGN_LEFT) - GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL)); + // If the text does not fit on the screen, move it to the left and upwards until it does + if (halign == ALIGN_LEFT) + GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL)); - // Make the text fit on the screen - if (area.x + area.width > 320) - area.x += 320 - area.x - area.width; // Plus negative number = subtraction + // Make the text fit on the screen + if (area.x + area.width > 320) + area.x += 320 - area.x - area.width; // Plus negative number = subtraction - if (area.y + area.height > 200) { - area.y += 200 - area.y - area.height; // Plus negative number = subtraction - } - } + if (area.y + area.height > 200) + area.y += 200 - area.y - area.height; // Plus negative number = subtraction if (gray) color1 = &bg_color; diff --git a/engines/sci/sci.h b/engines/sci/sci.h index 3a4ce5e5fe..ac2d7288c8 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -94,25 +94,18 @@ enum SciGameFlags { */ GF_OLDANGLES = (1 << 1), - /* Applies to all versions before 0.000.490 (PQ2-new) - ** When a new song is initialized, we store its state and - ** resume it when the new one finishes. Older versions completely - ** clobbered the old songs. - */ - GF_OLDRESUMESONG = (1 << 2), - /* 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). ** Also, they used 15 priority zones from 42 to 200 instead of 14 priority ** zones from 42 to 190. */ - GF_OLDGFXFUNCTIONS = (1 << 3), + GF_OLDGFXFUNCTIONS = (1 << 2), /* Applies to all versions before 0.000.629 ** Older SCI versions had simpler code for GetTime() */ - GF_OLDGETTIME = (1 << 4), + GF_OLDGETTIME = (1 << 3), // ---------------------------------------------------------------------------- @@ -124,14 +117,12 @@ enum SciGameFlags { ** In later SCI1 versions, the argument of lofs[as] ** instructions is absolute rather than relative. */ - GF_LOFSABSOLUTE = (1 << 5), + GF_LOFSABSOLUTE = (1 << 4), /* Applies to all versions from 1.000.510 onwards - ** Also in kDisplay(), if the text would not fit on the screen, it - ** is moved to the left and upwards until it fits. - ** Finally, kDoSound() is different than in earlier SCI1 versions. + ** kDoSound() is different than in earlier SCI1 versions. */ - GF_LATESCI1 = (1 << 6) + GF_NEWDOSOUND = (1 << 5) }; class SciEngine : public Engine { diff --git a/engines/sci/scicore/versions.h b/engines/sci/scicore/versions.h index 22decff28d..bae643066d 100644 --- a/engines/sci/scicore/versions.h +++ b/engines/sci/scicore/versions.h @@ -59,13 +59,6 @@ namespace Sci { ** Later versions use an even 90 degree distribution. */ -#define SCI_VERSION_RESUME_SUSPENDED_SONG SCI_VERSION(0,000,490) -/* First version (PQ2-new) known to use the different song resumption - mechanism -- When a new song is initialized, we store its state and - resume it when the new one finishes. Older versions completely - clobbered the old songs. -*/ - #define SCI_VERSION_FTU_NEWER_DRAWPIC_PARAMETERS SCI_VERSION(0,000,502) /* Last version known not to do this: 0.000.435 ** Old SCI versions used to interpret the third DrawPic() parameter inversely, @@ -88,13 +81,6 @@ namespace Sci { instructions is absolute rather than relative. */ -#define SCI_VERSION_FTU_DISPLAY_COORDS_FUZZY SCI_VERSION(1,000,510) -/* First version known to do this: ? - In later versions of SCI1 kDisplay(), if the text would not fit on - the screen, the text is moved to the left and upwards until it - fits. -*/ - #define SCI_VERSION_FTU_DOSOUND_VARIANT_2 SCI_VERSION(1,000,510) |