mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
SCUMM: Work around problem with inactive verbs being drawn in a scene
There is at least one scene in the game where inactive verbs are drawn, and then the scene background is drawn over them. This should mean the verbs are no longer visible, but the way we implement high-resolution text on a scaled low-resolution background all text is assumed to have a text mask on the text surface. We work around this by only drawin verbs in standard rooms, where "standard" is defined as being 128 pixels tall.
This commit is contained in:
committed by
Torbjörn Andersson
parent
1c352471bd
commit
276381dac2
@@ -1073,6 +1073,33 @@ void ScummEngine::drawVerb(int verb, int mode) {
|
||||
if (!verb)
|
||||
return;
|
||||
|
||||
// The way we implement high-resolution font on a scaled low-resolution
|
||||
// background requires there to always be a text surface telling which
|
||||
// pixels have been drawn on. This means that the "has mask" feature is
|
||||
// not correctly implemented, and in most cases this works just fine
|
||||
// for both Loom and Indiana Jones and the Last Crusade.
|
||||
//
|
||||
// However, there is at least one scene in Indiana Jones - room 80,
|
||||
// where you escape from the zeppelin on a biplane - where the game
|
||||
// (sloppily, in my opinion) draws two disabled verbs (Travel and Talk)
|
||||
// and then counts on the background to draw over them. Obviously that
|
||||
// won't work here.
|
||||
//
|
||||
// As far as I can tell, all normal rooms, i.e. rooms that could
|
||||
// sensibly have verbs, are 128 pixels tall. Other heights I've seen
|
||||
// are 136, 176, 184, 192 and 200, probably depending at least partly
|
||||
// on how much text is displayed in them.
|
||||
//
|
||||
// So to work around the issue, we only draw verbs in rooms that are
|
||||
// 128 pixels tall and hope for the best.
|
||||
//
|
||||
// Note that with the low-resolution font, which does implement the
|
||||
// "has mask" feature, the Macintosh version still needs a hack in
|
||||
// printChar() for black text to work properly. This version of the
|
||||
// game is weird.
|
||||
if (_game.id == GID_INDY3 && _macScreen && _roomHeight > 128)
|
||||
return;
|
||||
|
||||
vs = &_verbs[verb];
|
||||
|
||||
if (!vs->saveid && vs->curmode && vs->verbid) {
|
||||
|
||||
Reference in New Issue
Block a user