CGE: some more cleanup
This commit is contained in:
parent
4778ff720c
commit
38deee5a88
3 changed files with 3 additions and 8 deletions
|
@ -184,6 +184,7 @@ public:
|
||||||
Fx *_fx;
|
Fx *_fx;
|
||||||
Sound *_sound;
|
Sound *_sound;
|
||||||
ResourceManager *_resman;
|
ResourceManager *_resman;
|
||||||
|
Sprite *_pocket[kPocketNX];
|
||||||
|
|
||||||
Common::RandomSource _randomSource;
|
Common::RandomSource _randomSource;
|
||||||
MusicPlayer *_midiPlayer;
|
MusicPlayer *_midiPlayer;
|
||||||
|
|
|
@ -50,10 +50,6 @@
|
||||||
|
|
||||||
namespace CGE {
|
namespace CGE {
|
||||||
|
|
||||||
uint16 _stklen = (kStackSize * 2);
|
|
||||||
|
|
||||||
Sprite *_pocket[kPocketNX];
|
|
||||||
|
|
||||||
const char *savegameStr = "SCUMMVM_CGE";
|
const char *savegameStr = "SCUMMVM_CGE";
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -951,7 +947,7 @@ void Sprite::touch(uint16 mask, int x, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mask & kMouseRightUp) && _vm->_snail->idle()) {
|
if ((mask & kMouseRightUp) && _vm->_snail->idle()) {
|
||||||
Sprite *ps = (_vm->_pocLight->_seqPtr) ? _pocket[_vm->_pocPtr] : NULL;
|
Sprite *ps = (_vm->_pocLight->_seqPtr) ? _vm->_pocket[_vm->_pocPtr] : NULL;
|
||||||
if (ps) {
|
if (ps) {
|
||||||
if (_flags._kept || _hero->distance(this) < kDistMax) {
|
if (_flags._kept || _hero->distance(this) < kDistMax) {
|
||||||
if (works(ps)) {
|
if (works(ps)) {
|
||||||
|
@ -994,7 +990,7 @@ void Sprite::touch(uint16 mask, int x, int y) {
|
||||||
if ((mask & kMouseLeftUp) && _vm->_snail->idle()) {
|
if ((mask & kMouseLeftUp) && _vm->_snail->idle()) {
|
||||||
if (_flags._kept) {
|
if (_flags._kept) {
|
||||||
for (int n = 0; n < kPocketNX; n++) {
|
for (int n = 0; n < kPocketNX; n++) {
|
||||||
if (_pocket[n] == this) {
|
if (_vm->_pocket[n] == this) {
|
||||||
_vm->selectPocket(n);
|
_vm->selectPocket(n);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,8 +109,6 @@ private:
|
||||||
CGEEngine *_vm;
|
CGEEngine *_vm;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Sprite *_pocket[];
|
|
||||||
|
|
||||||
} // End of namespace CGE
|
} // End of namespace CGE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue