aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/map_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/map_v2.cpp')
-rw-r--r--engines/gob/map_v2.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp
index e1ed11c607..5133ac1286 100644
--- a/engines/gob/map_v2.cpp
+++ b/engines/gob/map_v2.cpp
@@ -38,15 +38,13 @@
namespace Gob {
Map_v2::Map_v2(GobEngine *vm) : Map_v1(vm) {
+ _screenHeight = 200;
}
Map_v2::~Map_v2() {
_passMap = 0;
}
-void Map_v2::init(void) {
-}
-
void Map_v2::loadMapObjects(const char *avjFile) {
uint8 wayPointsCount;
int16 var;
@@ -86,7 +84,7 @@ void Map_v2::loadMapObjects(const char *avjFile) {
_tilesHeight &= 0xFF;
_mapWidth = _screenWidth / _tilesWidth;
- _mapHeight = 200 / _tilesHeight;
+ _mapHeight = _screenHeight / _tilesHeight;
passPos = mapData.pos();
mapData.skip(_mapWidth * _mapHeight);
@@ -96,9 +94,7 @@ void Map_v2::loadMapObjects(const char *avjFile) {
else
wayPointsCount = _wayPointsCount == 0 ? 1 : _wayPointsCount;
- if (_wayPoints)
- delete[] _wayPoints;
-
+ delete[] _wayPoints;
_wayPoints = new Point[wayPointsCount];
for (int i = 0; i < _wayPointsCount; i++) {
_wayPoints[i].x = mapData.readSByte();
@@ -113,7 +109,7 @@ void Map_v2::loadMapObjects(const char *avjFile) {
byte *sizes;
_passMap = (int8 *) variables;
- mapHeight = 200 / _tilesHeight;
+ mapHeight = _screenHeight / _tilesHeight;
mapWidth = _screenWidth / _tilesWidth;
sizes = _vm->_global->_inter_variablesSizes +
(((byte *) _passMap) - _vm->_global->_inter_variables);