diff options
author | Max Horn | 2011-05-17 12:31:21 +0200 |
---|---|---|
committer | Max Horn | 2011-05-17 12:31:21 +0200 |
commit | 64bcb731bf0b28d9bf1391ac265ea47ba0a2f374 (patch) | |
tree | bd3b30a23f0d1a0c48f58124891c307e28137d6d | |
parent | a3c326456110f9f5b71ff3a91bbad15b5232c5d7 (diff) | |
download | scummvm-rg350-64bcb731bf0b28d9bf1391ac265ea47ba0a2f374.tar.gz scummvm-rg350-64bcb731bf0b28d9bf1391ac265ea47ba0a2f374.tar.bz2 scummvm-rg350-64bcb731bf0b28d9bf1391ac265ea47ba0a2f374.zip |
LURE: Rename method random() -> getRandom()
Also get rid of a slight bias for 0 in the random numbers (it was
selected twice as often as any other number).
-rw-r--r-- | engines/lure/res.h | 2 | ||||
-rw-r--r-- | engines/lure/scripts.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/lure/res.h b/engines/lure/res.h index f5c8711c2b..a0a908f53d 100644 --- a/engines/lure/res.h +++ b/engines/lure/res.h @@ -114,7 +114,7 @@ public: MemoryBlock *messagesData() { return _messagesData; } uint16 getHotspotScript(uint16 index); HotspotList &activeHotspots() { return _activeHotspots; } - uint16 random() { return _rnd.getRandomNumber(65536) & 0xffff; } + uint16 getRandom() { return _rnd.getRandomNumber(0xffff); } HotspotData *getHotspot(uint16 hotspotId); Hotspot *getActiveHotspot(uint16 hotspotId); HotspotOverrideData *getHotspotOverride(uint16 hotspotId); diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 7cd8be43d2..22656dd3fe 100644 --- a/engines/lure/scripts.cpp +++ b/engines/lure/scripts.cpp @@ -1127,7 +1127,7 @@ uint16 Script::execute(uint16 startOffset) { break; case S_OPCODE_RANDOM: - param = r.random() >> 8; // make number between 0 to 255 + param = r.getRandom() >> 8; // make number between 0 to 255 break; case S_OPCODE_END: |