aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/enums.h4
-rw-r--r--engines/avalanche/ghostroom.cpp16
-rw-r--r--engines/avalanche/ghostroom.h10
-rw-r--r--engines/avalanche/graphics.cpp2
-rw-r--r--engines/avalanche/graphics.h2
5 files changed, 18 insertions, 16 deletions
diff --git a/engines/avalanche/enums.h b/engines/avalanche/enums.h
index 2b5db67609..cadcae528c 100644
--- a/engines/avalanche/enums.h
+++ b/engines/avalanche/enums.h
@@ -29,6 +29,10 @@
#define AVALANCHE_ENUMS_H
namespace Avalanche {
+
+
+enum Flavour { kFlavourEga, kFlavourBgi, kFlavourNatural, kFlavourTwo, kFlavourOne };
+
enum Color {
kColorBlack = 0, kColorBlue, kColorGreen, kColorCyan, kColorRed,
kColorMagenta = 5, kColorBrown, kColorLightgray, kColorDarkgray, kColorLightblue,
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index 752da658a4..345d2a43b8 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -74,13 +74,13 @@ void GhostRoom::bigGreenEyes(byte how) {
warning("STUB: bigGreenEyes()");
}
-ChunkBlockType GhostRoom::readChunkBlock(Common::File &file) {
- ChunkBlockType cb;
- cb._flavour = (FlavourType)file.readByte();
+ChunkBlock GhostRoom::readChunkBlock(Common::File &file) {
+ ChunkBlock cb;
+ cb._flavour = (Flavour)file.readByte();
cb._x = file.readSint16LE();
cb._y = file.readSint16LE();
- cb._xl = file.readSint16LE();
- cb._yl = file.readSint16LE();
+ cb._width = file.readSint16LE();
+ cb._height = file.readSint16LE();
cb._size = file.readSint32LE();
return cb;
}
@@ -105,10 +105,10 @@ void GhostRoom::run() {
// Reading in the pictures of the ghost.
for (int i = 0; i < 5; i++) {
- ChunkBlockType cb = readChunkBlock(_file);
+ ChunkBlock cb = readChunkBlock(_file);
for (int j = 0; j < 2; j++)
- for (uint16 y = 0; y <= cb._yl; y++)
- _file.read(_ghost[i][j][y], cb._xl / 8);
+ for (uint16 y = 0; y <= cb._height; y++)
+ _file.read(_ghost[i][j][y], cb._width / 8);
}
// Load some smaller pictures.
diff --git a/engines/avalanche/ghostroom.h b/engines/avalanche/ghostroom.h
index 0693ecf215..9a2a5448e2 100644
--- a/engines/avalanche/ghostroom.h
+++ b/engines/avalanche/ghostroom.h
@@ -34,12 +34,10 @@
namespace Avalanche {
class AvalancheEngine;
-enum FlavourType { ch_EGA, ch_BGI, ch_Natural, ch_Two, ch_One };
-
-struct ChunkBlockType {
- FlavourType _flavour;
+struct ChunkBlock {
+ Flavour _flavour;
int16 _x, _y;
- int16 _xl, _yl;
+ int16 _width, _height;
int32 _size;
};
@@ -49,7 +47,7 @@ public:
~GhostRoom();
void run();
- ChunkBlockType readChunkBlock(Common::File &file);
+ ChunkBlock readChunkBlock(Common::File &file);
private:
AvalancheEngine *_vm;
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index a11773a6e2..cc6519603a 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -531,7 +531,7 @@ void GraphicManager::ghostDrawGhost(byte ghostArr[2][66][26], uint16 destX, uint
* @remarks Originally called 'get_me' and was located in Ghostroom.
*/
Graphics::Surface GraphicManager::ghostLoadPicture(Common::File &file) {
- ChunkBlockType cb = _vm->_ghostroom->readChunkBlock(file);
+ ChunkBlock cb = _vm->_ghostroom->readChunkBlock(file);
Graphics::Surface picture = loadPictureGraphic(file);
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index ed5a47b7a1..2978468987 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -38,7 +38,7 @@ namespace Avalanche {
class AvalancheEngine;
class AnimationType;
struct SpriteType;
-struct ChunkBlockType;
+struct ChunkBlock;
typedef byte FontType[256][16];
typedef byte ManiType[2049];