Ticket #8914: scumm-talkspeed-slider-3.patch
File scumm-talkspeed-slider-3.patch, 2.7 KB (added by , 16 years ago) |
---|
-
engines/scumm/input.cpp
527 527 _defaultTalkDelay = 9 - runDialog(dlg); 528 528 529 529 // Save the new talkspeed value to ConfMan 530 setTalk speed(_defaultTalkDelay);530 setTalkDelay(_defaultTalkDelay); 531 531 532 532 if (VAR_CHARINC != 0xFF) 533 533 VAR(VAR_CHARINC) = _defaultTalkDelay; -
engines/scumm/scumm.cpp
1690 1690 if (VAR_VOICE_MODE != 0xFF) 1691 1691 VAR(VAR_VOICE_MODE) = _voiceMode; 1692 1692 1693 _defaultTalkDelay = getTalk speed();1693 _defaultTalkDelay = getTalkDelay(); 1694 1694 if (VAR_CHARINC != 0xFF) 1695 1695 VAR(VAR_CHARINC) = _defaultTalkDelay; 1696 1696 } 1697 1697 1698 void ScummEngine::setTalk speed(int talkspeed) {1699 ConfMan.setInt("talkspeed", ( talkspeed* 255 + 9 / 2) / 9);1698 void ScummEngine::setTalkDelay(int talkdelay) { 1699 ConfMan.setInt("talkspeed", ((9 - talkdelay) * 255 + 9 / 2) / 9); 1700 1700 } 1701 1701 1702 int ScummEngine::getTalk speed() {1703 return (ConfMan.getInt("talkspeed") * 9 + 255 / 2) / 255;1702 int ScummEngine::getTalkDelay() { 1703 return 9 - (ConfMan.getInt("talkspeed") * 9 + 255 / 2) / 255; 1704 1704 } 1705 1705 1706 1706 -
engines/scumm/scumm.h
463 463 void loadCJKFont(); 464 464 void setupMusic(int midi); 465 465 void updateSoundSettings(); 466 void setTalk speed(int talkspeed);467 int getTalk speed();466 void setTalkDelay(int talkdelay); 467 int getTalkDelay(); 468 468 469 469 // Scumm main loop & helper functions. 470 470 virtual void scummLoop(int delta); -
engines/scumm/script_v8.cpp
424 424 425 425 if (var == VAR_CHARINC) { 426 426 if (ConfMan.hasKey("talkspeed")) { 427 value = getTalk speed();427 value = getTalkDelay(); 428 428 } else { 429 429 // Save the new talkspeed value to ConfMan 430 setTalk speed(value);430 setTalkDelay(value); 431 431 } 432 432 } 433 433 -
engines/scumm/script.cpp
625 625 626 626 if (var == VAR_CHARINC) { 627 627 if (ConfMan.hasKey("talkspeed")) { 628 value = getTalk speed();628 value = getTalkDelay(); 629 629 } else { 630 630 // Save the new talkspeed value to ConfMan 631 setTalk speed(value);631 setTalkDelay(value); 632 632 } 633 633 } 634 634