partial checkin of patch #655594 (handling Y/N questions); cleanup
svn-id: r6042
This commit is contained in:
parent
3b28dcbe34
commit
060562c277
7 changed files with 23 additions and 16 deletions
|
@ -87,9 +87,9 @@ const VersionSettings version_settings[] = {
|
|||
|
||||
/* Scumm Version 3 */
|
||||
{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, 0, 22,
|
||||
GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_OLD256 | GF_NO_SCALLING | GF_ADLIB_DEFAULT, "00.LFL"},
|
||||
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_OLD256 | GF_NO_SCALLING | GF_ADLIB_DEFAULT, "00.LFL"},
|
||||
{"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, 0, 0,
|
||||
GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_OLD256 | GF_AUDIOTRACKS | GF_NO_SCALLING, "00.LFL"},
|
||||
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_OLD256 | GF_AUDIOTRACKS | GF_NO_SCALLING, "00.LFL"},
|
||||
{"loom", "Loom", GID_LOOM, 3, 5, 40,
|
||||
GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_OLD_BUNDLE | GF_16COLOR | GF_NO_SCALLING, "00.LFL"},
|
||||
|
||||
|
|
|
@ -120,10 +120,8 @@ public:
|
|||
{ close(); }
|
||||
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers)
|
||||
{
|
||||
if (ascii == ' ') // Close pause dialog if space key is pressed
|
||||
setResult(ascii);
|
||||
close();
|
||||
else
|
||||
ScummDialog::handleKeyDown(ascii, keycode, modifiers);
|
||||
}
|
||||
protected:
|
||||
void setInfoText (const String& message);
|
||||
|
@ -132,6 +130,13 @@ protected:
|
|||
class PauseDialog : public InfoDialog {
|
||||
public:
|
||||
PauseDialog(NewGui *gui, Scumm *scumm);
|
||||
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers)
|
||||
{
|
||||
if (ascii == ' ') // Close pause dialog if space key is pressed
|
||||
close();
|
||||
else
|
||||
ScummDialog::handleKeyDown(ascii, keycode, modifiers);
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
|
|
@ -410,7 +410,10 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b)
|
|||
if (height > _vm->_realHeight)
|
||||
height = _vm->_realHeight;
|
||||
|
||||
assert(_vm->_screenTop >= 0);
|
||||
// Normally, _vm->_screenTop should always be >= 0, but for some old save games
|
||||
// it is not, hence we check & correct it here.
|
||||
if (_vm->_screenTop < 0)
|
||||
_vm->_screenTop = 0;
|
||||
|
||||
ptr = vs->screenPtr + (x + vs->xstart) + (_vm->_screenTop + t) * _vm->_realWidth;
|
||||
_vm->_system->copy_rect(ptr, _vm->_realWidth, x, vs->topline + t, w, height);
|
||||
|
|
|
@ -54,7 +54,7 @@ void Scumm::openRoom(int room)
|
|||
}
|
||||
|
||||
/* Either xxx.lfl or monkey.xxx file name */
|
||||
while (!_resFilePrefix) {
|
||||
while (1) {
|
||||
if (_features & GF_SMALL_NAMES)
|
||||
roomlimit = 98;
|
||||
else
|
||||
|
@ -64,7 +64,7 @@ void Scumm::openRoom(int room)
|
|||
else
|
||||
room_offs = room ? _roomFileOffsets[room] : 0;
|
||||
|
||||
if (room_offs == (int)0xFFFFFFFF)
|
||||
if (room_offs == -1)
|
||||
break;
|
||||
|
||||
if (room_offs != 0 && room != 0) {
|
||||
|
@ -96,10 +96,7 @@ void Scumm::openRoom(int room)
|
|||
}
|
||||
} else {
|
||||
sprintf(buf, "%.2d.lfl", room);
|
||||
if (_features & GF_OLD_BUNDLE)
|
||||
_encbyte = 0xFF;
|
||||
else
|
||||
_encbyte = 0;
|
||||
_encbyte = (_features & GF_USE_KEY) ? 0xFF : 0;
|
||||
}
|
||||
|
||||
if (openResourceFile(buf)) {
|
||||
|
|
|
@ -533,7 +533,6 @@ public:
|
|||
/* Should be in Resource class */
|
||||
byte _encbyte;
|
||||
File _fileHandle;
|
||||
char *_resFilePrefix, *_resFilePath;
|
||||
uint32 _fileOffset;
|
||||
char *_exe_name; // This is the name we use for opening resource files
|
||||
char *_game_name; // This is the game the user calls it, so use for saving
|
||||
|
@ -578,7 +577,6 @@ public:
|
|||
void nukeCharset(int i);
|
||||
|
||||
int _lastLoadedRoom, _roomResource;
|
||||
byte _resFilePathId, _fileReadFailed;
|
||||
byte *findResourceData(uint32 tag, byte *ptr);
|
||||
int getResourceDataSize(byte *ptr);
|
||||
|
||||
|
@ -952,6 +950,7 @@ public:
|
|||
#endif
|
||||
|
||||
/* Scumm Vars */
|
||||
byte VAR_KEYPRESS;
|
||||
byte VAR_EGO;
|
||||
byte VAR_CAMERA_POS_X;
|
||||
byte VAR_HAVE_MSG;
|
||||
|
|
|
@ -423,7 +423,9 @@ void Scumm::unkMessage2()
|
|||
_string[3].color = 4;
|
||||
|
||||
InfoDialog* dialog = new InfoDialog(_newgui, this, (char*)buf);
|
||||
runDialog (dialog);
|
||||
// FIXME: I know this is the right thing to do for MI1 and MI2. For
|
||||
// all other games it's just a guess.
|
||||
_vars[VAR_KEYPRESS] = runDialog (dialog);
|
||||
delete dialog;
|
||||
|
||||
_messagePtr = tmp;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
void Scumm::setupScummVars()
|
||||
{
|
||||
VAR_KEYPRESS = 0;
|
||||
VAR_EGO = 1;
|
||||
VAR_CAMERA_POS_X = 2;
|
||||
VAR_HAVE_MSG = 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue