Ticket #8668: indy3_iq_points_updated.diff
File indy3_iq_points_updated.diff, 2.0 KB (added by , 17 years ago) |
---|
-
dialogs.cpp
910 910 _timer = getMillis() + kDisplayDelay; 911 911 } 912 912 913 Indy3IQPointsDialog::Indy3IQPointsDialog(ScummEngine *scumm, char* text) 914 : InfoDialog(scumm, text) { 915 } 913 916 917 void Indy3IQPointsDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { 918 if (ascii == 'i') 919 close(); 920 else 921 ScummDialog::handleKeyDown(ascii, keycode, modifiers); 922 } 914 923 915 924 } // End of namespace Scumm 916 925 -
dialogs.h
232 232 uint32 _timer; 233 233 }; 234 234 235 236 //The Indy IQ dialog 237 class Indy3IQPointsDialog : public InfoDialog { 238 public: 239 Indy3IQPointsDialog(ScummEngine *scumm, char* text); 240 virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers); 241 }; 242 235 243 } // End of namespace Scumm 236 244 237 245 #endif -
input.cpp
496 496 // Fall back to default behavior 497 497 ScummEngine::processKeyboard(lastKeyHit); 498 498 } 499 500 // i brings up an IQ dialog in Indy3 501 502 if (lastKeyHit == 105 && _game.id == GID_INDY3) { 503 //SCUMM var 244 is the episode score 504 //and var 245 is the series score 505 Dialog *indy3IQPointsDialog; 506 char text[50]; 507 508 //FIXME: Currently, the series score does not work properly 509 //This workaround just sets it equal to the episode score 510 //However, at the end of the game, it does show the episode 511 //score by itself 512 int a = _scummVars[245]; 513 if (!a) 514 a = _scummVars[244]; 515 516 sprintf (text, "IQ Points: Episode = %d, Series = %d", _scummVars[244], a); 517 indy3IQPointsDialog = new Indy3IQPointsDialog(this, text); 518 runDialog(*indy3IQPointsDialog); 519 delete indy3IQPointsDialog; 520 } 499 521 } 500 522 501 523 void ScummEngine::processKeyboard(int lastKeyHit) {