diff options
author | Joost Peters | 2003-06-06 20:54:52 +0000 |
---|---|---|
committer | Joost Peters | 2003-06-06 20:54:52 +0000 |
commit | 0f9d447bd450ad65727c925371773be0519e3d2a (patch) | |
tree | 93331e815271fbc56c4b9a21df1100555f2b99ea /sky | |
parent | 89c6d29c95df0767e6068337ec0e77cf5170cdf5 (diff) | |
download | scummvm-rg350-0f9d447bd450ad65727c925371773be0519e3d2a.tar.gz scummvm-rg350-0f9d447bd450ad65727c925371773be0519e3d2a.tar.bz2 scummvm-rg350-0f9d447bd450ad65727c925371773be0519e3d2a.zip |
add fnRandom()
svn-id: r8359
Diffstat (limited to 'sky')
-rw-r--r-- | sky/logic.cpp | 2 | ||||
-rw-r--r-- | sky/logic.h | 3 | ||||
-rw-r--r-- | sky/sky.cpp | 1 | ||||
-rw-r--r-- | sky/sky.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index 4f2b45fa2e..4295b126d6 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -1964,7 +1964,7 @@ bool SkyLogic::fnAskThis(uint32 textNo, uint32 animNo, uint32 c) { } bool SkyLogic::fnRandom(uint32 a, uint32 b, uint32 c) { - warning("Stub: fnRandom"); + _scriptVariables[RND] = _rnd.getRandomNumber(65536) & a; return true; } diff --git a/sky/logic.h b/sky/logic.h index 614e555af4..1167bda185 100644 --- a/sky/logic.h +++ b/sky/logic.h @@ -62,6 +62,7 @@ enum scriptVariableOffsets { MENU_LENGTH = 100, SCROLL_OFFSET = 101, MENU = 102, + RND = 115, CUR_SECTION = 143, REICH_DOOR_FLAG = 470 }; @@ -235,6 +236,8 @@ protected: uint32 _currentSection; uint32 _saveCurrentSection; + + RandomSource _rnd; SkyScreen *_skyScreen; SkyDisk *_skyDisk; diff --git a/sky/sky.cpp b/sky/sky.cpp index ecfe120dcf..d4d6075638 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -266,7 +266,6 @@ void SkyState::delay(uint amount) { //copied and mutilated from Simon.cpp uint32 start = _system->get_msecs(); uint32 cur = start; _key_pressed = 0; //reset - _rnd.getRandomNumber(2); do { while (_system->poll_event(&event)) { @@ -138,8 +138,6 @@ protected: void shutdown(); void showQuitMsg(void); - - RandomSource _rnd; }; #endif |