aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-15 14:43:04 -0500
committerPaul Gilbert2015-02-15 14:43:04 -0500
commit93e5fd7c20a69a052625293133d7d93728444c3b (patch)
tree75cc4e78c8e038abe0a6e41e8c5718a519b3a6f4
parentadde24a338eafc5aab0c3e51c439aea64bfdbfb7 (diff)
downloadscummvm-rg350-93e5fd7c20a69a052625293133d7d93728444c3b.tar.gz
scummvm-rg350-93e5fd7c20a69a052625293133d7d93728444c3b.tar.bz2
scummvm-rg350-93e5fd7c20a69a052625293133d7d93728444c3b.zip
XEEN: Moved more variables out of InterfaceMap that belong in Interface
-rw-r--r--engines/xeen/interface.cpp28
-rw-r--r--engines/xeen/interface.h15
-rw-r--r--engines/xeen/interface_map.cpp27
-rw-r--r--engines/xeen/interface_map.h17
4 files changed, 41 insertions, 46 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 0d488d1645..cebd14d6a0 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -127,12 +127,25 @@ Interface::Interface(XeenEngine *vm) : ButtonContainer(), InterfaceMap(vm),
_buttonsLoaded = false;
_intrIndex1 = 0;
_steppingFX = 0;
+ _falling = false;
+ _blessedUIFrame = 0;
+ _powerShieldUIFrame = 0;
+ _holyBonusUIFrame = 0;
+ _heroismUIFrame = 0;
+ _flipUIFrame = 0;
+ _face1UIFrame = 0;
+ _face2UIFrame = 0;
+ _batUIFrame = 0;
+ _spotDoorsUIFrame = 0;
+ _dangerSenseUIFrame = 0;
+ _face1State = _face2State = 0;
+ _upDoorText = false;
+ _tillMove = 0;
Common::fill(&_combatCharIds[0], &_combatCharIds[8], 0);
initDrawStructs();
}
-
void Interface::initDrawStructs() {
_mainList[0] = DrawStruct(7, 232, 74);
_mainList[1] = DrawStruct(0, 235, 75);
@@ -1162,6 +1175,15 @@ void Interface::draw3d(bool updateFlag) {
if (screen._windows[11]._enabled)
return;
+ _flipUIFrame = (_flipUIFrame + 1) % 4;
+ if (_flipUIFrame == 0)
+ _flipWater = !_flipWater;
+ if (_tillMove && (_vm->_mode == MODE_1 || _vm->_mode == MODE_COMBAT) &&
+ !_flag1 && _vm->_moveMonsters) {
+ if (--_tillMove == 0)
+ moveMonsters();
+ }
+
// Draw the map
drawMap();
@@ -1200,7 +1222,6 @@ void Interface::draw3d(bool updateFlag) {
party._stepped = false;
if (_vm->_mode == MODE_9) {
// TODO: Save current scripts data?
- error("TODO: save scripts?");
}
// TODO: Check use of updateFlag here. Original doesn't have it, but I
@@ -1772,5 +1793,8 @@ void Interface::assembleBorder() {
screen._windows[12].frame();
}
+void Interface::moveMonsters() {
+ // TODO
+}
} // End of namespace Xeen
diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h
index 8d3044fd72..fa5f1aaec1 100644
--- a/engines/xeen/interface.h
+++ b/engines/xeen/interface.h
@@ -73,6 +73,11 @@ private:
bool _buttonsLoaded;
int _steppingFX;
+ int _blessedUIFrame;
+ int _powerShieldUIFrame;
+ int _holyBonusUIFrame;
+ int _heroismUIFrame;
+ int _flipUIFrame;
void initDrawStructs();
@@ -103,6 +108,14 @@ public:
int _intrIndex1;
Common::String _interfaceText;
int _falling;
+ int _face1State, _face2State;
+ int _face1UIFrame, _face2UIFrame;
+ int _spotDoorsUIFrame;
+ int _dangerSenseUIFrame;
+ int _batUIFrame;
+ bool _upDoorText;
+ Common::String _screenText;
+ byte _tillMove;
public:
Interface(XeenEngine *vm);
@@ -127,6 +140,8 @@ public:
void draw3d(bool updateFlag);
void assembleBorder();
+
+ void moveMonsters();
};
} // End of namespace Xeen
diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp
index 837971b2fb..6f4f708382 100644
--- a/engines/xeen/interface_map.cpp
+++ b/engines/xeen/interface_map.cpp
@@ -381,21 +381,8 @@ InterfaceMap::InterfaceMap(XeenEngine *vm): _vm(vm) {
_combatFloatCounter = 0;
_thinWall = false;
_isAnimReset = false;
- _upDoorText = false;
- _batUIFrame = 0;
- _spotDoorsUIFrame = 0;
- _dangerSenseUIFrame = 0;
- _face1UIFrame = 0;
- _face2UIFrame = 0;
- _blessedUIFrame = 0;
- _powerShieldUIFrame = 0;
- _holyBonusUIFrame = 0;
- _heroismUIFrame = 0;
- _flipUIFrame = 0;
- _tillMove = 0;
_flag1 = false;
_overallFrame = 0;
- _face1State = _face2State = 0;
}
void InterfaceMap::drawMap() {
@@ -408,15 +395,6 @@ void InterfaceMap::drawMap() {
const int OUTDOOR_INDEXES[3] = { 119, 113, 116 };
const int COMBAT_OFFSET_X[4] = { 8, 6, 4, 2 };
- _flipUIFrame = (_flipUIFrame + 1) % 4;
- if (_flipUIFrame == 0)
- _flipWater = !_flipWater;
- if (_tillMove && (_vm->_mode == MODE_1 || _vm->_mode == MODE_COMBAT) &&
- !_flag1 && _vm->_moveMonsters) {
- if (--_tillMove == 0)
- moveMonsters();
- }
-
MazeObject &objObject = map._mobData._objects[_objNumber];
Direction partyDirection = _vm->_party->_mazeDirection;
int objNum = _objNumber - 1;
@@ -4434,9 +4412,4 @@ void InterfaceMap::drawOutdoors() {
_charsShooting = _isShooting;
}
-
-void InterfaceMap::moveMonsters() {
- // TODO
-}
-
} // End of namespace Xeen
diff --git a/engines/xeen/interface_map.h b/engines/xeen/interface_map.h
index 9ac9222b67..761e99760c 100644
--- a/engines/xeen/interface_map.h
+++ b/engines/xeen/interface_map.h
@@ -88,7 +88,6 @@ public:
int size() const { return 170; }
};
-
class InterfaceMap {
private:
XeenEngine *_vm;
@@ -108,11 +107,6 @@ protected:
bool _isShooting;
bool _thinWall;
bool _isAnimReset;
- int _blessedUIFrame;
- int _powerShieldUIFrame;
- int _holyBonusUIFrame;
- int _heroismUIFrame;
- int _flipUIFrame;
bool _flag1;
void setMazeBits();
@@ -124,16 +118,8 @@ public:
OutdoorDrawList _outdoorList;
IndoorDrawList _indoorList;
SpriteResource _charPowSprites;
- bool _upDoorText;
- Common::String _screenText;
- int _face1State, _face2State;
- int _face1UIFrame, _face2UIFrame;
- int _spotDoorsUIFrame;
- int _dangerSenseUIFrame;
- byte _tillMove;
int _objNumber;
int _overallFrame;
- int _batUIFrame;
bool _charsShooting;
public:
InterfaceMap(XeenEngine *vm);
@@ -153,9 +139,6 @@ public:
void setOutdoorsObjects();
void drawOutdoors();
-
- void moveMonsters();
-
};
} // End of namespace Xeen