M4: Fixes for compiler errors

svn-id: r52365
This commit is contained in:
Paul Gilbert 2010-08-25 06:55:11 +00:00
parent 212479ab79
commit 4395e75aef
3 changed files with 11 additions and 4 deletions

View File

@ -182,6 +182,7 @@ void MadsSceneLogic::initialiseDataMap() {
MAP_DATA(&_madsVm->_player._playerPos.y);
MAP_DATA(&_madsVm->_player._direction);
MAP_DATA(&_madsVm->_player._visible);
MAP_DATA(&_madsVm->scene()->_animActive);
}
DataMap &MadsSceneLogic::dataMap() {
@ -537,7 +538,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_DSTORE: { // Stores data variable
param = getParam(scriptOffset, opcode);
ScriptVar v = stack.pop();
dataMap().set(param, v.isInt() ? v : 0);
dataMap().set(param, v.isInt() ? v.get() : 0);
break;
}
@ -876,8 +877,8 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
case 19: {
// Action_isAction
int verbId = stack.pop();
int objectNameId = (verbId == 0) ? 0 : stack.pop();
int indirectObjectId = (objectNameId == 0) ? 0 : stack.pop();
int objectNameId = (verbId == 0) ? 0 : stack.pop().get();
int indirectObjectId = (objectNameId == 0) ? 0 : stack.pop().get();
stack.push(ScriptVar(_madsVm->scene()->_action.isAction(verbId, objectNameId, indirectObjectId)));
break;
@ -928,4 +929,4 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
#undef EXTRACT_PARAMS
}
}

View File

@ -62,6 +62,7 @@ void SceneNode::load(Common::SeekableReadStream *stream) {
MadsScene::MadsScene(MadsEngine *vm): _sceneResources(), Scene(vm, &_sceneResources), MadsView(this) {
_vm = vm;
_activeAnimation = NULL;
_animActive = false;
MadsView::_bgSurface = Scene::_backgroundSurface;
MadsView::_depthSurface = Scene::_walkSurface;
@ -216,6 +217,7 @@ void MadsScene::leaveScene() {
if (_activeAnimation) {
delete _activeAnimation;
_activeAnimation = NULL;
_animActive = false;
}
Scene::leaveScene();
@ -384,6 +386,7 @@ void MadsScene::updateState() {
if (((MadsAnimation *) _activeAnimation)->freeFlag() || freeFlag) {
delete _activeAnimation;
_activeAnimation = NULL;
_animActive = false;
}
}
@ -455,6 +458,7 @@ void MadsScene::freeAnimation() {
delete _activeAnimation;
_activeAnimation = NULL;
_animActive = false;
}
@ -574,6 +578,7 @@ void MadsScene::loadAnimation(const Common::String &animName, int abortTimers) {
MadsAnimation *anim = new MadsAnimation(_vm, this);
anim->load(animName.c_str(), abortTimers);
_activeAnimation = anim;
_animActive = true;
}
bool MadsScene::getDepthHighBit(const Common::Point &pt) {

View File

@ -108,6 +108,7 @@ public:
Common::Point _destPos;
int _destFacing;
Common::Point _customDest;
bool _animActive;
public:
MadsScene(MadsEngine *vm);
virtual ~MadsScene();