Ticket #8668: indy3_iq_points.diff
File indy3_iq_points.diff, 2.7 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
513 513 saveloadkey = -1; 514 514 } 515 515 516 // i brings up an IQ dialog in Indy3 517 518 if (lastKeyHit == 105 && _game.id == GID_INDY3) { 519 indy3IQPointsDialog(_scummVars[244], _scummVars[245]); 520 } 521 516 522 if (lastKeyHit == saveloadkey) { 517 523 if (VAR_SAVELOAD_SCRIPT != 0xFF && _currentRoom != 0) 518 524 runScript(VAR(VAR_SAVELOAD_SCRIPT), 0, 0, 0); -
scumm.cpp
2281 2281 runDialog(*_pauseDialog); 2282 2282 } 2283 2283 2284 void ScummEngine::indy3IQPointsDialog(int a, int b) { 2285 char text[50]; 2286 2287 //Since series score doesn't work right, set it equal to episode score 2288 if (!b) 2289 b = a; 2290 2291 sprintf (text, "IQ Points: Episode = %d, Series = %d", a, b); 2292 if (!_indy3IQPointsDialog) 2293 _indy3IQPointsDialog = new Indy3IQPointsDialog(this, text); 2294 runDialog(*_indy3IQPointsDialog); 2295 delete _indy3IQPointsDialog; 2296 _indy3IQPointsDialog = 0; 2297 } 2298 2284 2299 void ScummEngine::versionDialog() { 2285 2300 if (!_versionDialog) 2286 2301 _versionDialog = new PauseDialog(this, 1); -
scumm.h
498 498 499 499 protected: 500 500 Dialog *_pauseDialog; 501 Dialog *_indy3IQPointsDialog; 501 502 Dialog *_versionDialog; 502 503 Dialog *_mainMenuDialog; 503 504 504 505 virtual int runDialog(Dialog &dialog); 505 506 void confirmExitDialog(); 506 507 void confirmRestartDialog(); 508 void indy3IQPointsDialog(int a, int b); 507 509 void pauseDialog(); 508 510 void versionDialog(); 509 511 void mainMenuDialog();