mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-03 07:59:38 +00:00
* Made Game::_variables private and, instead, added Game::{get,set}Variable() methods.
* Removed obsolete comment about the cyclic field not being used in Game::loadAnimation() svn-id: r42246
This commit is contained in:
parent
bab9293f97
commit
dd955bb08e
@ -211,7 +211,9 @@ int Game::loadAnimation(uint animNum, uint z) {
|
||||
// FIXME: handle these properly
|
||||
animationReader.readByte(); // Memory logic field, not used
|
||||
animationReader.readByte(); // Disable erasing field, not used
|
||||
bool cyclic = animationReader.readByte(); // Cyclic field, not used
|
||||
|
||||
bool cyclic = animationReader.readByte();
|
||||
|
||||
animationReader.readByte(); // Relative field, not used
|
||||
|
||||
Animation *anim = _vm->_anims->addAnimation(animNum, z, false);
|
||||
@ -339,6 +341,14 @@ int Game::getRoomNum() {
|
||||
return _currentRoom._roomNum;
|
||||
}
|
||||
|
||||
int Game::getVariable(int numVar) {
|
||||
return _variables[numVar];
|
||||
}
|
||||
|
||||
void Game::setVariable(int numVar, int value) {
|
||||
_variables[numVar] = value;
|
||||
}
|
||||
|
||||
Game::~Game() {
|
||||
delete[] _persons;
|
||||
delete[] _variables;
|
||||
|
@ -129,11 +129,12 @@ public:
|
||||
|
||||
GameObject *getObject(uint objNum);
|
||||
|
||||
int *_variables;
|
||||
int getVariable(int varNum);
|
||||
void setVariable(int varNum, int value);
|
||||
|
||||
private:
|
||||
DraciEngine *_vm;
|
||||
|
||||
int *_variables;
|
||||
GameInfo *_info;
|
||||
Person *_persons;
|
||||
uint16 *_dialogOffsets;
|
||||
|
@ -303,10 +303,10 @@ int Script::handleMathExpression(Common::MemoryReadStream &reader) {
|
||||
case kMathVariable:
|
||||
value = reader.readUint16LE();
|
||||
|
||||
stk.push(_vm->_game->_variables[value-1]);
|
||||
stk.push(_vm->_game->getVariable(value-1));
|
||||
|
||||
debugC(3, kDraciBytecodeDebugLevel, "\t\tvariable: %d (%d)", value,
|
||||
_vm->_game->_variables[value-1]);
|
||||
_vm->_game->getVariable(value-1));
|
||||
break;
|
||||
|
||||
case kMathFunctionCall:
|
||||
|
Loading…
Reference in New Issue
Block a user