aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/game.cpp
diff options
context:
space:
mode:
authorStrangerke2011-09-15 07:58:31 +0200
committerStrangerke2011-09-15 08:00:54 +0200
commitc99310820720714083b34d7d01080c54c977eb75 (patch)
treee7ebfefba735fd1934373817f63f678130726676 /engines/cge/game.cpp
parentfc6fce22212fad5a9c8d15f0b8649eed3b0104b4 (diff)
downloadscummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.tar.gz
scummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.tar.bz2
scummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.zip
CGE: Transform some static and globals into class members
Diffstat (limited to 'engines/cge/game.cpp')
-rw-r--r--engines/cge/game.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/cge/game.cpp b/engines/cge/game.cpp
index 0c4f5971bc..f3855c147d 100644
--- a/engines/cge/game.cpp
+++ b/engines/cge/game.cpp
@@ -50,17 +50,17 @@ const int Fly::_l = 20,
Fly::Fly(CGEEngine *vm, Bitmap **shpl)
: Sprite(vm, shpl), _tx(0), _ty(0), _vm(vm) {
- step(newRandom(2));
- gotoxy(_l + newRandom(_r - _l - _w), _t + newRandom(_b - _t - _h));
+ step(_vm->newRandom(2));
+ gotoxy(_l + _vm->newRandom(_r - _l - _w), _t + _vm->newRandom(_b - _t - _h));
}
void Fly::tick() {
step();
if (_flags._kept)
return;
- if (newRandom(10) < 1) {
- _tx = newRandom(3) - 1;
- _ty = newRandom(3) - 1;
+ if (_vm->newRandom(10) < 1) {
+ _tx = _vm->newRandom(3) - 1;
+ _ty = _vm->newRandom(3) - 1;
}
if (_x + _tx < _l || _x + _tx + _w > _r)
_tx = -_tx;