mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
Added enum constant for the dragon object (kDragonObject) and made Script::start() a bit more readable.
svn-id: r42236
This commit is contained in:
parent
c258eefc82
commit
fd2ab9e3c0
@ -134,7 +134,7 @@ Game::Game(DraciEngine *vm) : _vm(vm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Game::init() {
|
void Game::init() {
|
||||||
loadObject(0);
|
loadObject(kDragonObject);
|
||||||
|
|
||||||
_vm->_script->run(getObject(0)->_program, getObject(0)->_init);
|
_vm->_script->run(getObject(0)->_program, getObject(0)->_init);
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@ namespace Draci {
|
|||||||
|
|
||||||
class DraciEngine;
|
class DraciEngine;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kDragonObject
|
||||||
|
};
|
||||||
|
|
||||||
enum StructSizes {
|
enum StructSizes {
|
||||||
personSize = sizeof(uint16) * 2 + sizeof(byte)
|
personSize = sizeof(uint16) * 2 + sizeof(byte)
|
||||||
};
|
};
|
||||||
|
@ -234,8 +234,10 @@ void Script::start(Common::Queue<int> ¶ms) {
|
|||||||
int animID = params.pop() - 1;
|
int animID = params.pop() - 1;
|
||||||
|
|
||||||
GameObject *obj = _vm->_game->getObject(objID);
|
GameObject *obj = _vm->_game->getObject(objID);
|
||||||
|
|
||||||
|
bool visible = (objID == kDragonObject || obj->_visible);
|
||||||
|
|
||||||
if ( ((objID == 0) || (obj->_visible)) && (obj->_location == _vm->_game->getRoomNum()))
|
if (visible && (obj->_location == _vm->_game->getRoomNum()))
|
||||||
_vm->_anims->play(animID);
|
_vm->_anims->play(animID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user