diff options
-rw-r--r-- | engines/agi/agi.h | 3 | ||||
-rw-r--r-- | engines/agi/detection.cpp | 24 | ||||
-rw-r--r-- | engines/agi/keyboard.cpp | 6 |
3 files changed, 18 insertions, 15 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 6c89edf1dd..942c4df72e 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -112,7 +112,8 @@ enum AgiGameFeatures { GF_AGIPAL = (1 << 4), GF_MACGOLDRUSH = (1 << 5), GF_FANMADE = (1 << 6), - GF_MENUS = (1 << 7) + GF_MENUS = (1 << 7), + GF_ESCPAUSE = (1 << 8) }; enum AgiGameID { diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 381444f5ff..be5a3bbb36 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -648,10 +648,10 @@ static const AGIGameDescription gameDescriptions[] = { 0x2440, }, -#if 0 + { // King's Quest 3 (ST) 1.02 11/18/86 - // Problematic: does not have menus, crashes if menus are enforced + // Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game { "kq3", "1.02 1986-11-18", @@ -662,10 +662,10 @@ static const AGIGameDescription gameDescriptions[] = { }, GID_KQ3, GType_V2, - 0, + GF_ESCPAUSE, 0x2272, }, -#endif + { // King's Quest 3 (Mac) 2.14 3/15/88 @@ -717,10 +717,10 @@ static const AGIGameDescription gameDescriptions[] = { 0x3086, }, -#if 0 + { // King's Quest 3 (PC) 1.01 11/08/86 [AGI 2.272] - // Problematic: does not have menus, crashes if menus are enforced + // Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game { "kq3", "1.01 1986-11-08", @@ -731,10 +731,10 @@ static const AGIGameDescription gameDescriptions[] = { }, GID_KQ3, GType_V2, - 0, + GF_ESCPAUSE, 0x2272, }, -#endif + { // King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435] @@ -1411,10 +1411,10 @@ static const AGIGameDescription gameDescriptions[] = { 0x2917, }, -#if 0 + { // Space Quest 1 (PC) 1.0X [AGI 2.089] - // Problematic: does not have menus, crashes if menus are enforced + // Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game { "sq1", "1.0X 1986-09-24", @@ -1425,10 +1425,10 @@ static const AGIGameDescription gameDescriptions[] = { }, GID_SQ1, GType_V2, - 0, + GF_ESCPAUSE, 0x2089, }, -#endif + { diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index d41100d5d8..2b7559f754 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -107,8 +107,10 @@ int AgiEngine::handleController(int key) { VtEntry *v = &_game.viewTable[0]; int i; - /* AGI 3.149 games and The Black Cauldron need KEY_ESCAPE to use menus */ - if (key == 0 || (key == KEY_ESCAPE && agiGetRelease() != 0x3149 && getGameID() != GID_BC) ) + // AGI 3.149 games and The Black Cauldron need KEY_ESCAPE to use menus + // Games with the GF_ESCPAUSE flag need KEY_ESCAPE to pause the game + if (key == 0 || + (key == KEY_ESCAPE && agiGetRelease() != 0x3149 && getGameID() != GID_BC && !(getFeatures() & GF_ESCPAUSE)) ) return false; if ((getGameID() == GID_MH1 || getGameID() == GID_MH2) && (key == KEY_ENTER) && |