aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/actor.cpp3
-rw-r--r--engines/m4/animation.cpp4
-rw-r--r--engines/m4/compression.cpp1
-rw-r--r--engines/m4/console.cpp2
-rw-r--r--engines/m4/converse.cpp5
-rw-r--r--engines/m4/detection.cpp15
-rw-r--r--engines/m4/dialogs.cpp9
-rw-r--r--engines/m4/events.cpp2
-rw-r--r--engines/m4/font.cpp8
-rw-r--r--engines/m4/font.h4
-rw-r--r--engines/m4/globals.cpp2
-rw-r--r--engines/m4/graphics.cpp31
-rw-r--r--engines/m4/graphics.h33
-rw-r--r--engines/m4/gui.cpp13
-rw-r--r--engines/m4/m4.cpp12
-rw-r--r--engines/m4/m4_menus.cpp1
-rw-r--r--engines/m4/m4_scene.cpp15
-rw-r--r--engines/m4/m4_scene.h6
-rw-r--r--engines/m4/m4_views.cpp2
-rw-r--r--engines/m4/mads_anim.cpp4
-rw-r--r--engines/m4/mads_logic.cpp2
-rw-r--r--engines/m4/mads_menus.cpp22
-rw-r--r--engines/m4/mads_scene.cpp11
-rw-r--r--engines/m4/mads_views.cpp21
-rw-r--r--engines/m4/mads_views.h12
-rw-r--r--engines/m4/midi.cpp1
-rw-r--r--engines/m4/resource.cpp1
-rw-r--r--engines/m4/scene.cpp2
-rw-r--r--engines/m4/script.cpp1
-rw-r--r--engines/m4/sound.cpp1
-rw-r--r--engines/m4/sprite.cpp11
-rw-r--r--engines/m4/woodscript.cpp1
-rw-r--r--engines/m4/woodscript.h6
-rw-r--r--engines/m4/ws_sequence.cpp2
34 files changed, 149 insertions, 117 deletions
diff --git a/engines/m4/actor.cpp b/engines/m4/actor.cpp
index f342ca6b46..c61c6fe7d8 100644
--- a/engines/m4/actor.cpp
+++ b/engines/m4/actor.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/array.h"
+#include "common/textconsole.h"
#include "m4/actor.h"
#include "m4/m4_views.h"
#include "m4/assets.h"
@@ -59,7 +60,7 @@ void Actor::placeWalkerSpriteAt(int spriteNum, int x, int y) {
info.height = info.sprite->height();
info.scaleX = info.scaleY = _scaling;
info.palette = _walkerSprites[_direction]->getPalette();
- info.inverseColourTable = _m4Vm->scene()->getInverseColourTable();
+ info.inverseColorTable = _m4Vm->scene()->getInverseColorTable();
_vm->_scene->drawSprite(x, y, info, Common::Rect(640, 400));
}
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index 37314eff44..3fe050e604 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/assets.h"
#include "m4/animation.h"
#include "m4/compression.h"
@@ -426,7 +428,7 @@ void MadsAnimation::update() {
// Start displaying the message
AnimMessage &me = _messages[idx];
- // The colour index to use is dependant on how many messages are currently on-screen
+ // The color index to use is dependant on how many messages are currently on-screen
uint8 colIndex;
switch (_messageCtr) {
case 1:
diff --git a/engines/m4/compression.cpp b/engines/m4/compression.cpp
index 9b1416945c..8fe4fbf1eb 100644
--- a/engines/m4/compression.cpp
+++ b/engines/m4/compression.cpp
@@ -27,6 +27,7 @@
#include "m4/m4.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp
index 88b4240901..cbcaa04669 100644
--- a/engines/m4/console.cpp
+++ b/engines/m4/console.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/console.h"
#include "m4/dialogs.h"
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp
index 2d1b8e7e4f..46c4b35b79 100644
--- a/engines/m4/converse.cpp
+++ b/engines/m4/converse.cpp
@@ -26,6 +26,7 @@
#include "common/array.h"
#include "common/hashmap.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "m4/converse.h"
#include "m4/resource.h"
@@ -97,7 +98,7 @@ void ConversationView::setNode(int32 nodeIndex) {
_vm->_font->setFont(FONT_CONVERSATION);
// TODO: Conversation styles and colors
- _vm->_font->current()->setColours(2, 1, 3);
+ _vm->_font->current()->setColors(2, 1, 3);
_currentNodeIndex = nodeIndex;
@@ -164,7 +165,7 @@ void ConversationView::onRefresh(RectList *rects, M4Surface *destSurface) {
if (i > CONV_MAX_SHOWN_ENTRIES - 1)
break;
- _vm->_font->current()->setColour((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED :
+ _vm->_font->current()->setColor((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED :
CONVERSATION_ENTRY_NORMAL);
_vm->_font->current()->writeString(this, _activeItems[i]->text, CONV_ENTRIES_X_OFFSET,
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index 4b204996f3..e0983e3327 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -44,11 +44,11 @@ uint32 MadsM4Engine::getFeatures() const { return _gameDescription->features; }
Common::Language MadsM4Engine::getLanguage() const { return _gameDescription->desc.language; }
Common::Platform MadsM4Engine::getPlatform() const { return _gameDescription->desc.platform; }
-}
+} // End of namespace M4
static const PlainGameDescriptor m4Games[] = {
{"m4", "MADS/M4 engine game"},
- {"riddle", "Riddle of Master Lu: Believe it or Not!"},
+ {"riddle", "Ripley's Believe It or Not!: The Riddle of Master Lu"},
{"burger", "Orion Burger"},
{"rex", "Rex Nebular and the Cosmic Gender Bender"},
{"dragon", "DragonSphere"},
@@ -380,7 +380,12 @@ static const M4GameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER, 0, 0 }
};
-}
+} // End of namespace M4
+
+static const char *directoryGlobs[] = {
+ "option1",
+ 0
+};
static const ADParams detectionParams = {
// Pointer to ADGameDescription or its superset structure
@@ -402,9 +407,9 @@ static const ADParams detectionParams = {
// Additional GUI options (for every game}
Common::GUIO_NOMIDI,
// Maximum directory depth
- 1,
+ 2,
// List of directory globs
- 0
+ directoryGlobs
};
class M4MetaEngine : public AdvancedMetaEngine {
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp
index da828ccf5b..bc6228658d 100644
--- a/engines/m4/dialogs.cpp
+++ b/engines/m4/dialogs.cpp
@@ -25,6 +25,7 @@
#include "m4/dialogs.h"
#include "common/file.h"
+#include "common/textconsole.h"
namespace M4 {
@@ -444,7 +445,7 @@ void Dialog::draw() {
int dialogY = (_vm->_screen->height() - dlgHeight) / 2;
// Create the surface for the dialog
- create(dlgWidth, dlgHeight, 1);
+ create(dlgWidth, dlgHeight, Graphics::PixelFormat::createFormatCLUT8());
_coords.left = dialogX;
_coords.top = dialogY;
_coords.right = dialogX + dlgWidth + 1;
@@ -452,7 +453,7 @@ void Dialog::draw() {
// Set up the dialog
fillRect(Common::Rect(0, 0, width(), height()), 3);
- setColour(2);
+ setColor(2);
hLine(1, width() - 1, height() - 2); // Bottom edge
hLine(0, width(), height() - 1);
vLine(width() - 2, 2, height()); // Right edge
@@ -480,8 +481,8 @@ void Dialog::draw() {
}
// Handle drawing the text contents
- _vm->_font->current()->setColours(7, 7, 7);
- setColour(7);
+ _vm->_font->current()->setColors(7, 7, 7);
+ setColor(7);
for (uint lineCtr = 0, yp = 5; lineCtr < _lines.size(); ++lineCtr, yp += _vm->_font->current()->getHeight() + 1) {
diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp
index 29b243aceb..a9641eb542 100644
--- a/engines/m4/events.cpp
+++ b/engines/m4/events.cpp
@@ -257,7 +257,7 @@ bool Mouse::setCursorNum(int cursorIndex) {
// Set the cursor to the sprite
CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
- _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOUR_INDEX);
+ _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOR_INDEX);
return true;
}
diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp
index 3ed419675d..582fbaebc7 100644
--- a/engines/m4/font.cpp
+++ b/engines/m4/font.cpp
@@ -159,14 +159,14 @@ Font::~Font() {
}
}
-void Font::setColour(uint8 colour) {
+void Font::setColor(uint8 color) {
if (_sysFont)
- _fontColors[1] = colour;
+ _fontColors[1] = color;
else
- _fontColors[3] = colour;
+ _fontColors[3] = color;
}
-void Font::setColours(uint8 col1, uint8 col2, uint8 col3) {
+void Font::setColors(uint8 col1, uint8 col2, uint8 col3) {
if (_sysFont)
_fontColors[1] = col3;
else {
diff --git a/engines/m4/font.h b/engines/m4/font.h
index 19d15faa1e..64e54f35b5 100644
--- a/engines/m4/font.h
+++ b/engines/m4/font.h
@@ -62,8 +62,8 @@ public:
Font(MadsM4Engine *vm, const char *filename);
~Font();
- void setColour(uint8 colour);
- void setColours(uint8 col1, uint8 col2, uint8 col3);
+ void setColor(uint8 color);
+ void setColors(uint8 col1, uint8 col2, uint8 col3);
int32 getWidth(const char *text, int spaceWidth = -1);
int32 getHeight() const { return _maxHeight; }
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index d982ecad0e..3db9934cec 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/globals.h"
#include "m4/graphics.h"
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 5fc46d3881..689a6ab8b4 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -23,11 +23,12 @@
*
*/
-#include "common/file.h"
-#include "common/endian.h"
#include "common/system.h"
#include "common/util.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "m4/globals.h"
#include "m4/graphics.h"
@@ -96,7 +97,7 @@ void M4Surface::loadCodesM4(Common::SeekableReadStream *source) {
uint16 widthVal = source->readUint16LE();
uint16 heightVal = source->readUint16LE();
- create(widthVal, heightVal, 1);
+ create(widthVal, heightVal, Graphics::PixelFormat::createFormatCLUT8());
source->read(pixels, widthVal * heightVal);
}
@@ -110,7 +111,7 @@ void M4Surface::loadCodesMads(Common::SeekableReadStream *source) {
uint16 heightVal = 156;
byte *walkMap = new byte[source->size()];
- create(widthVal, heightVal, 1);
+ create(widthVal, heightVal, Graphics::PixelFormat::createFormatCLUT8());
source->read(walkMap, source->size());
byte *ptr = (byte *)getBasePtr(0, 0);
@@ -300,7 +301,7 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c
r = CLIP((info.palette[destPixel].r * pixel) >> 10, 0, 31);
g = CLIP((info.palette[destPixel].g * pixel) >> 10, 0, 31);
b = CLIP((info.palette[destPixel].b * pixel) >> 10, 0, 31);
- pixel = info.inverseColourTable[(b << 10) | (g << 5) | r];
+ pixel = info.inverseColorTable[(b << 10) | (g << 5) | r];
}
}
@@ -361,7 +362,7 @@ void M4Surface::fillRect(const Common::Rect &r, uint8 color) {
}
void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY,
- int transparentColour) {
+ int transparentColor) {
// Validation of the rectangle and position
if ((destX >= w) || (destY >= h))
return;
@@ -390,13 +391,13 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
byte *destPtr = (byte *)pixels + (destY * width()) + destX;
for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) {
- if (transparentColour == -1)
+ if (transparentColor == -1)
// No transparency, so copy line over
Common::copy(srcPtr, srcPtr + copyRect.width(), destPtr);
else {
// Copy each byte one at a time checking for the transparency color
for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr)
- if (srcPtr[xCtr] != transparentColour) destPtr[xCtr] = srcPtr[xCtr];
+ if (srcPtr[xCtr] != transparentColor) destPtr[xCtr] = srcPtr[xCtr];
}
srcPtr += src->width();
@@ -411,7 +412,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
* the specified depth requirement on a secondary surface contain depth information
*/
void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
- M4Surface *depthsSurface, int scale, int transparentColour) {
+ M4Surface *depthsSurface, int scale, int transparentColor) {
if (scale == 100) {
// Copy the specified area
@@ -443,7 +444,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) {
// Copy each byte one at a time checking against the depth
for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) {
- if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColour))
+ if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColor))
destPtr[xCtr] = srcPtr[xCtr];
}
@@ -557,7 +558,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
// Not a display pixel
continue;
- if ((*srcP != transparentColour) && (depth <= (*depthP & 0x7f)))
+ if ((*srcP != transparentColor) && (depth <= (*depthP & 0x7f)))
*destP = *srcP;
++destP;
@@ -760,7 +761,7 @@ void M4Surface::rexLoadBackground(Common::SeekableReadStream *source, RGBList **
sourceUnc = packData.getItemStream(1);
assert((int)sourceUnc->size() >= sceneSize);
- create(sceneWidth, sceneHeight, 1);
+ create(sceneWidth, sceneHeight, Graphics::PixelFormat::createFormatCLUT8());
byte *pData = (byte *)pixels;
sourceUnc->read(pData, sceneSize);
@@ -813,7 +814,7 @@ void M4Surface::m4LoadBackground(Common::SeekableReadStream *source) {
assert(width() == (int)widthVal);
//debugCN(kDebugGraphics, "width(): %d, widthVal: %d, height(): %d, heightVal: %d\n", width(), widthVal, height(), heightVal);
- tileBuffer->create(tileWidth, tileHeight, 1);
+ tileBuffer->create(tileWidth, tileHeight, Graphics::PixelFormat::createFormatCLUT8());
for (curTileY = 0; curTileY < tilesY; curTileY++) {
clipY = MIN(heightVal, (1 + curTileY) * tileHeight) - (curTileY * tileHeight);
@@ -854,7 +855,7 @@ void M4Surface::madsLoadInterface(const Common::String &filename) {
// Chunk 1, data
intStream = intFile.getItemStream(1);
- create(320, 44, 1);
+ create(320, 44, Graphics::PixelFormat::createFormatCLUT8());
intStream->read(pixels, 320 * 44);
delete intStream;
@@ -933,7 +934,7 @@ void M4Surface::translate(RGBList *list, bool isTransparent) {
byte *palIndexes = list->palIndexes();
for (int i = 0; i < width() * height(); ++i, ++p) {
- if (!isTransparent || (*p != TRANSPARENT_COLOUR_INDEX)) {
+ if (!isTransparent || (*p != TRANSPARENT_COLOR_INDEX)) {
if (*p < list->size())
*p = palIndexes[*p];
else
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index d58ed69403..96e81f746e 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -40,7 +40,7 @@ namespace M4 {
#define MADS_SCREEN_HEIGHT 200
#define MADS_Y_OFFSET ((MADS_SCREEN_HEIGHT - MADS_SURFACE_HEIGHT) / 2)
-#define TRANSPARENT_COLOUR_INDEX 0xFF
+#define TRANSPARENT_COLOR_INDEX 0xFF
struct BGR8 {
uint8 b, g, r;
@@ -89,7 +89,7 @@ struct SpriteInfo {
int width, height;
int scaleX, scaleY;
uint8 encoding;
- byte *inverseColourTable;
+ byte *inverseColorTable;
RGB8 *palette;
};
@@ -105,19 +105,19 @@ private:
void m4LoadBackground(Common::SeekableReadStream *source);
public:
M4Surface(bool isScreen = false) {
- create(g_system->getWidth(), isScreen ? g_system->getHeight() : MADS_SURFACE_HEIGHT, 1);
+ create(g_system->getWidth(), isScreen ? g_system->getHeight() : MADS_SURFACE_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_isScreen = isScreen;
_rgbList = NULL;
_ownsData = true;
}
M4Surface(int width_, int height_) {
- create(width_, height_, 1);
+ create(width_, height_, Graphics::PixelFormat::createFormatCLUT8());
_isScreen = false;
_rgbList = NULL;
_ownsData = true;
}
M4Surface(int width_, int height_, byte *srcPixels, int pitch_) {
- bytesPerPixel = 1;
+ format = Graphics::PixelFormat::createFormatCLUT8();
w = width_;
h = height_;
pitch = pitch_;
@@ -141,7 +141,6 @@ public:
void madsLoadInterface(const Common::String &filename);
void setColor(byte value) { _color = value; }
- void setColour(byte value) { _color = value; }
inline byte getColor() const { return _color; }
void vLine(int x, int y1, int y2);
void hLine(int x1, int x2, int y);
@@ -158,7 +157,7 @@ public:
inline int width() const { return w; }
inline int height() const { return h; }
inline int getPitch() const { return pitch; }
- void setSize(int sizeX, int sizeY) { create(sizeX, sizeY, 1); }
+ void setSize(int sizeX, int sizeY) { create(sizeX, sizeY, Graphics::PixelFormat::createFormatCLUT8()); }
inline byte *getBasePtr() {
return (byte *)pixels;
}
@@ -173,9 +172,9 @@ public:
void reset();
void frameRect(const Common::Rect &r, uint8 color);
void fillRect(const Common::Rect &r, uint8 color);
- void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColour = -1);
+ void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColor = -1);
void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface,
- int scale, int transparentColour = -1);
+ int scale, int transparentColor = -1);
void update() {
if (_isScreen) {
@@ -185,19 +184,19 @@ public:
}
// copyTo methods
- inline void copyTo(M4Surface *dest, int transparentColour = -1) {
- dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColour);
+ inline void copyTo(M4Surface *dest, int transparentColor = -1) {
+ dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColor);
}
- inline void copyTo(M4Surface *dest, int x, int y, int transparentColour = -1) {
- dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColour);
+ inline void copyTo(M4Surface *dest, int x, int y, int transparentColor = -1) {
+ dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColor);
}
inline void copyTo(M4Surface *dest, const Common::Rect &srcBounds, int destX, int destY,
- int transparentColour = -1) {
- dest->copyFrom(this, srcBounds, destX, destY, transparentColour);
+ int transparentColor = -1) {
+ dest->copyFrom(this, srcBounds, destX, destY, transparentColor);
}
inline void copyTo(M4Surface *dest, int destX, int destY, int depth, M4Surface *depthsSurface, int scale,
- int transparentColour = -1) {
- dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColour);
+ int transparentColor = -1) {
+ dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColor);
}
void scrollX(int xAmount);
diff --git a/engines/m4/gui.cpp b/engines/m4/gui.cpp
index 8665b4e767..56cf96b589 100644
--- a/engines/m4/gui.cpp
+++ b/engines/m4/gui.cpp
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/keyboard.h"
+#include "common/textconsole.h"
#include "m4/globals.h"
#include "m4/events.h"
@@ -290,26 +291,26 @@ void MenuButton::onRefresh() {
case OBJTYPE_SL_TEXT:
switch (_objectState) {
case OS_MOUSEOVER:
- _vm->_font->current()->setColours(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND,
TEXT_COLOR_MOUSEOVER_HILIGHT);
sprite = sprites[SL_LINE_MOUSEOVER];
break;
case OS_PRESSED:
- _vm->_font->current()->setColours(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND,
TEXT_COLOR_PRESSED_HILIGHT);
sprite = sprites[SL_LINE_PRESSED];
break;
case OS_GREYED:
- _vm->_font->current()->setColours(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND,
TEXT_COLOR_GREYED_HILIGHT);
sprite = sprites[SL_LINE_NORMAL];
break;
default:
case OS_NORMAL:
- _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
TEXT_COLOR_NORMAL_HILIGHT);
sprite = sprites[SL_LINE_NORMAL];
break;
@@ -955,7 +956,7 @@ void MenuTextField::onRefresh() {
// Draw the text
_vm->_font->setFont(FONT_MENU);
- _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
TEXT_COLOR_NORMAL_HILIGHT);
int xp = _bounds.left + 4;
@@ -1140,7 +1141,7 @@ GUITextField::GUITextField(View *owner, const Common::Rect &bounds): GUIRect(own
void GUITextField::onRefresh() {
_parent->fillRect(_bounds, _vm->_palette->BLACK);
- _vm->_font->current()->setColours(3, 3, 3);
+ _vm->_font->current()->setColors(3, 3, 3);
_vm->_font->setFont(FONT_INTERFACE);
_vm->_font->current()->writeString(_parent, _text.c_str(), _bounds.left, _bounds.top, 0, 1);
}
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 4cc2bf8783..e88140cd26 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -30,7 +30,6 @@
#include "m4/burger_data.h"
#include "m4/m4.h"
#include "m4/resource.h"
-#include "m4/sprite.h"
#include "m4/hotspot.h"
#include "m4/font.h"
#include "m4/rails.h"
@@ -50,17 +49,15 @@
#include "m4/mads_anim.h"
#include "m4/mads_menus.h"
+#include "common/error.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/endian.h"
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/textconsole.h"
#include "engines/util.h"
-#include "graphics/surface.h"
-#include "audio/mididrv.h"
namespace M4 {
@@ -118,6 +115,7 @@ MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) :
SearchMan.addSubDirectoryMatching(gameDataDir, "goodstuf");
SearchMan.addSubDirectoryMatching(gameDataDir, "resource");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "option1");
DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level");
@@ -416,7 +414,7 @@ Common::Error M4Engine::run() {
_scene->loadScene(_kernel->currentRoom);
_ws->setBackgroundSurface(_scene->getBackgroundSurface());
- _ws->setInverseColourTable(scene()->getInverseColourTable());
+ _ws->setInverseColorTable(scene()->getInverseColorTable());
_kernel->loadSectionScriptFunctions();
_kernel->loadRoomScriptFunctions();
@@ -554,7 +552,7 @@ Common::Error MadsEngine::run() {
_scene->show();
_font->setFont(FONT_MAIN_MADS);
- _font->current()->setColours(2, 1, 3);
+ _font->current()->setColors(2, 1, 3);
_font->current()->writeString(_scene->getBackgroundSurface(), "Testing the M4/MADS ScummVM engine", 5, 160, 310, 2);
_font->current()->writeString(_scene->getBackgroundSurface(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 5, 180, 310, 2);
diff --git a/engines/m4/m4_menus.cpp b/engines/m4/m4_menus.cpp
index 118b09f50b..a20bb2660b 100644
--- a/engines/m4/m4_menus.cpp
+++ b/engines/m4/m4_menus.cpp
@@ -24,6 +24,7 @@
*/
#include "common/algorithm.h" // for find()
+#include "common/textconsole.h"
#include "gui/dialog.h"
#include "gui/message.h"
diff --git a/engines/m4/m4_scene.cpp b/engines/m4/m4_scene.cpp
index 738f414add..a0d8a503ab 100644
--- a/engines/m4/m4_scene.cpp
+++ b/engines/m4/m4_scene.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/m4_scene.h"
#include "m4/dialogs.h"
@@ -41,7 +42,7 @@ namespace M4 {
M4Scene::M4Scene(M4Engine *vm): _sceneResources(), Scene(vm, &_sceneResources) {
_vm = vm;
_sceneSprites = NULL;
- _inverseColourTable = NULL;
+ _inverseColorTable = NULL;
_sceneResources.hotspots = new HotSpotList();
_sceneResources.parallax = new HotSpotList();
@@ -110,15 +111,15 @@ void M4Scene::loadSceneResources(int sceneNumber) {
}
}
-void M4Scene::loadSceneInverseColourTable(int sceneNumber) {
+void M4Scene::loadSceneInverseColorTable(int sceneNumber) {
char filename[kM4MaxFilenameSize];
Common::SeekableReadStream *iplS;
sprintf(filename, "%i.ipl", sceneNumber);
iplS = _vm->res()->openFile(filename);
- delete[] _inverseColourTable;
- _inverseColourTable = new byte[iplS->size()];
- iplS->read(_inverseColourTable, iplS->size());
+ delete[] _inverseColorTable;
+ _inverseColorTable = new byte[iplS->size()];
+ iplS->read(_inverseColorTable, iplS->size());
_vm->res()->toss(filename);
}
@@ -163,7 +164,7 @@ void M4Scene::loadScene(int sceneNumber) {
loadSceneCodes(sceneNumber);
// Load inverse color table file (*.IPL)
- loadSceneInverseColourTable(sceneNumber);
+ loadSceneInverseColorTable(sceneNumber);
if (_vm->getGameType() != GType_Burger) {
// Load scene sprites file (*.SSB)
@@ -202,7 +203,7 @@ void M4Scene::leaveScene() {
_sceneResources.parallax->clear();
delete _sceneResources.parallax;
- delete[] _inverseColourTable;
+ delete[] _inverseColorTable;
Scene::leaveScene();
}
diff --git a/engines/m4/m4_scene.h b/engines/m4/m4_scene.h
index 2216779a3e..9c2edbc06c 100644
--- a/engines/m4/m4_scene.h
+++ b/engines/m4/m4_scene.h
@@ -53,11 +53,11 @@ private:
M4SceneResources _sceneResources;
SpriteAsset *_sceneSprites;
SpriteAsset *_walkerSprite;
- byte *_inverseColourTable;
+ byte *_inverseColorTable;
void loadSceneSprites(int sceneNumber);
void loadSceneResources(int sceneNumber);
- void loadSceneInverseColourTable(int sceneNumber);
+ void loadSceneInverseColorTable(int sceneNumber);
void loadSceneSpriteCodes(int sceneNumber);
void nextCommonCursor();
public:
@@ -75,7 +75,7 @@ public:
virtual void update();
virtual void showHotSpots();
- byte *getInverseColourTable() const { return _inverseColourTable; }
+ byte *getInverseColorTable() const { return _inverseColorTable; }
M4InterfaceView *getInterface() { return (M4InterfaceView *)_interfaceSurface; }
M4SceneResources &getSceneResources() { return _sceneResources; }
void setStatusText(const char *text);
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp
index f4345787df..83f23edd3d 100644
--- a/engines/m4/m4_views.cpp
+++ b/engines/m4/m4_views.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4_views.h"
#include "m4/events.h"
#include "m4/font.h"
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index 1d15cbbaf7..e7ca9cb14d 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/mads_anim.h"
#include "m4/m4.h"
#include "m4/compression.h"
@@ -60,7 +62,7 @@ TextviewView::TextviewView(MadsM4Engine *vm):
_vm->_palette->setPalette(&palData[0], 4, 3);
_vm->_palette->blockRange(4, 3);
- _vm->_font->current()->setColours(5, 6, 4);
+ _vm->_font->current()->setColors(5, 6, 4);
clear();
_bgSurface.clear();
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index 878e86c573..98a0d06412 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/dialogs.h"
#include "m4/mads_logic.h"
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index 91db7d343a..437e9d2a6b 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/mads_menus.h"
#include "m4/m4.h"
@@ -695,11 +697,11 @@ void RexDialogView::updateState() {
void RexDialogView::onRefresh(RectList *rects, M4Surface *destSurface) {
// Draw the framed base area
fillRect(this->bounds(), _madsVm->_palette->BLACK);
- setColour(2);
+ setColor(2);
hLine(0, width(), MADS_Y_OFFSET - 2);
hLine(0, width(), MADS_Y_OFFSET + MADS_SURFACE_HEIGHT + 2);
- // Add in the loaded background vertically centred
+ // Add in the loaded background vertically centered
_backgroundSurface->copyTo(this, 0, (height() - MADS_SURFACE_HEIGHT) / 2);
// Check whether any of the dialog text entries need to be refreshed
@@ -943,20 +945,20 @@ void RexDialogView::refreshText() {
if (!_dialogText[i].in_use)
continue;
- // Get the item's colours
- uint colour;
+ // Get the item's colors
+ uint color;
if (_dialogText[i].state == STATE_DESELECTED)
- colour = 0xB0A;
+ color = 0xB0A;
else if (_dialogText[i].state == STATE_SELECTED)
- colour = 0xD0C;
+ color = 0xD0C;
else
- colour = 0xF0E;
+ color = 0xF0E;
- // If there's an associated text display entry, check to see if it's colour needs to change
+ // If there's an associated text display entry, check to see if it's color needs to change
if (_dialogText[i].textDisplay_index >= 0) {
MadsTextDisplayEntry &tdEntry = _textDisplay[_dialogText[i].textDisplay_index];
- if ((tdEntry.colour1 == (colour & 0xff)) && (tdEntry.colour2 == (colour >> 8)))
+ if ((tdEntry.color1 == (color & 0xff)) && (tdEntry.color2 == (color >> 8)))
// It's still the same, so no further action needed
continue;
@@ -967,7 +969,7 @@ void RexDialogView::refreshText() {
// Create a new text display entry for the dialog text line
_dialogText[i].textDisplay_index = _textDisplay.add(_dialogText[i].pos.x, _dialogText[i].pos.y,
- colour, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font);
+ color, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font);
}
}
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index fd8a609b53..7b82480ee2 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/mads_scene.h"
#include "m4/dialogs.h"
@@ -855,13 +856,13 @@ MadsInterfaceView::~MadsInterfaceView() {
void MadsInterfaceView::setFontMode(InterfaceFontMode newMode) {
switch (newMode) {
case ITEM_NORMAL:
- _vm->_font->current()->setColours(4, 4, 0xff);
+ _vm->_font->current()->setColors(4, 4, 0xff);
break;
case ITEM_HIGHLIGHTED:
- _vm->_font->current()->setColours(5, 5, 0xff);
+ _vm->_font->current()->setColors(5, 5, 0xff);
break;
case ITEM_SELECTED:
- _vm->_font->current()->setColours(6, 6, 0xff);
+ _vm->_font->current()->setColors(6, 6, 0xff);
break;
}
}
@@ -939,7 +940,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
int actionIndex = 0;
for (int x = 0; x < 2; ++x) {
for (int y = 0; y < 5; ++y, ++actionIndex) {
- // Determine the font colour depending on whether an item is selected. Note that the first action,
+ // Determine the font color depending on whether an item is selected. Note that the first action,
// 'Look', is always 'selected', even when another action is clicked on
setFontMode((_highlightedElement == actionIndex) ? ITEM_HIGHLIGHTED :
((actionIndex == 0) ? ITEM_SELECTED : ITEM_NORMAL));
@@ -994,7 +995,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
// Display object sprite. Note that the frame number isn't used directly, because it would result
// in too fast an animation
M4Sprite *spr = _objectSprites->getFrame(_objectFrameNumber / INV_ANIM_FRAME_SPEED);
- spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOUR_INDEX);
+ spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOR_INDEX);
if (!_madsVm->globals()->_config.invObjectsStill && !dialogVisible) {
// If objects need to be animated, move to the next frame
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index cc127032eb..33c679c9bd 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -34,6 +34,7 @@
#include "m4/staticres.h"
#include "common/algorithm.h"
+#include "common/textconsole.h"
namespace M4 {
@@ -244,10 +245,10 @@ void MadsAction::refresh() {
}
// Add a new text display entry to display the status text at the bottom of the screen area
- uint colours = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
+ uint colors = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
_statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
- MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colours, textSpacing, _statusText, font);
+ MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colors, textSpacing, _statusText, font);
}
}
@@ -616,7 +617,7 @@ void MadsTextDisplay::clear() {
_entries[i].active = false;
}
-int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font) {
+int MadsTextDisplay::add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font) {
int usedSlot = -1;
for (int idx = 0; idx < TEXT_DISPLAY_SIZE; ++idx) {
@@ -629,8 +630,8 @@ int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const
_entries[idx].msg = msg;
_entries[idx].bounds.setWidth(font->getWidth(msg, charSpacing));
_entries[idx].bounds.setHeight(font->getHeight());
- _entries[idx].colour1 = fontColour & 0xff;
- _entries[idx].colour2 = fontColour >> 8;
+ _entries[idx].color1 = fontColor & 0xff;
+ _entries[idx].color2 = fontColor >> 8;
_entries[idx].spacing = charSpacing;
_entries[idx].expire = 1;
_entries[idx].active = true;
@@ -666,7 +667,7 @@ void MadsTextDisplay::setDirtyAreas2() {
void MadsTextDisplay::draw(M4Surface *view) {
for (uint idx = 0; idx < _entries.size(); ++idx) {
if (_entries[idx].active && (_entries[idx].expire >= 0)) {
- _entries[idx].font->setColours(_entries[idx].colour1, _entries[idx].colour2, 0);
+ _entries[idx].font->setColors(_entries[idx].color1, _entries[idx].color2, 0);
_entries[idx].font->writeString(view, _entries[idx].msg,
_entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(),
_entries[idx].spacing);
@@ -707,7 +708,7 @@ void MadsKernelMessageList::clear() {
_talkFont = _vm->_font->getFont(FONT_CONVERSATION_MADS);
}
-int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) {
+int MadsKernelMessageList::add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) {
// Find a free slot
uint idx = 0;
while ((idx < _entries.size()) && ((_entries[idx].flags & KMSG_ACTIVE) != 0))
@@ -722,8 +723,8 @@ int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 f
MadsKernelMessageEntry &rec = _entries[idx];
strcpy(rec.msg, msg);
rec.flags = flags | KMSG_ACTIVE;
- rec.colour1 = fontColour & 0xff;
- rec.colour2 = fontColour >> 8;
+ rec.color1 = fontColor & 0xff;
+ rec.color2 = fontColor >> 8;
rec.position = pt;
rec.textDisplayIndex = -1;
rec.timeout = timeout;
@@ -918,7 +919,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
if (msg.textDisplayIndex < 0) {
// Need to create a new text display entry for this message
- int idx = _owner._textDisplay.add(x1, y1, msg.colour1 | (msg.colour2 << 8), _owner._textSpacing, msg.msg, _talkFont);
+ int idx = _owner._textDisplay.add(x1, y1, msg.color1 | (msg.color2 << 8), _owner._textSpacing, msg.msg, _talkFont);
if (idx >= 0)
msg.textDisplayIndex = idx;
}
diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h
index c93d0beda3..ce5ba9c4e5 100644
--- a/engines/m4/mads_views.h
+++ b/engines/m4/mads_views.h
@@ -174,8 +174,8 @@ public:
int expire;
int spacing;
Common::Rect bounds;
- uint8 colour1;
- uint8 colour2;
+ uint8 color1;
+ uint8 color2;
Font *font;
const char *msg;
@@ -201,7 +201,7 @@ public:
_entries[idx].expire = -1;
}
- int add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font);
+ int add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font);
void clear();
void draw(M4Surface *view);
void setDirtyAreas();
@@ -221,8 +221,8 @@ public:
int sequenceIndex;
char asciiChar;
char asciiChar2;
- int colour1;
- int colour2;
+ int color1;
+ int color2;
Common::Point position;
int textDisplayIndex;
int msgOffset;
@@ -251,7 +251,7 @@ public:
MadsKernelMessageList(MadsView &owner);
void clear();
- int add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg);
+ int add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg);
int addQuote(int quoteId, int abortTimers, uint32 timeout);
void scrollMessage(int msgIndex, int numTicks, bool quoted);
void setSeqIndex(int msgIndex, int seqIndex);
diff --git a/engines/m4/midi.cpp b/engines/m4/midi.cpp
index e49dbfa2e7..24ac60c22e 100644
--- a/engines/m4/midi.cpp
+++ b/engines/m4/midi.cpp
@@ -31,6 +31,7 @@
#include "audio/midiparser.h"
#include "common/config-manager.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 192cab0c83..1946797f75 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -28,6 +28,7 @@
#include "m4/events.h"
#include "common/substream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index 0f684ebced..c0cbd879b2 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -163,7 +163,7 @@ void Scene::showCodes() {
// Show all the scene's walk nodes
SceneNodeList &nodeList = _madsVm->scene()->getSceneResources()._nodes;
- _backgroundSurface->setColour(_madsVm->_palette->WHITE);
+ _backgroundSurface->setColor(_madsVm->_palette->WHITE);
for (uint i = 0; i < nodeList.size() - 2; ++i) {
// Draw a little cross at the node's position
_backgroundSurface->hLine(nodeList[i].pt.x - 2, nodeList[i].pt.x + 2, nodeList[i].pt.y);
diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp
index 42d55c6dc7..cc60ec310d 100644
--- a/engines/m4/script.cpp
+++ b/engines/m4/script.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/m4.h"
#include "m4/script.h"
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index 14c60c1c58..fb90cea5cc 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -28,6 +28,7 @@
#include "m4/compression.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp
index 641b93baea..cef9917381 100644
--- a/engines/m4/sprite.cpp
+++ b/engines/m4/sprite.cpp
@@ -24,6 +24,7 @@
*/
#include "common/rect.h"
+#include "common/textconsole.h"
#include "m4/globals.h"
#include "m4/graphics.h"
@@ -124,7 +125,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
bool spriteEnd = false;
// Set entire sprite contents to transparent pixels
- fillRect(bounds(), TRANSPARENT_COLOUR_INDEX);
+ fillRect(bounds(), TRANSPARENT_COLOR_INDEX);
// Major line loop
for (int yp = 0; yp < h; ++yp) {
@@ -153,7 +154,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
byte v = source->readByte();
while (cmd-- > 0) {
if (x2 < w)
- *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v;
+ *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v;
++x2;
}
}
@@ -173,13 +174,13 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
byte v = source->readByte();
while (cmd-- > 0) {
if (x2 < w) {
- *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v;
+ *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v;
}
++x2;
}
} else {
// Handle writing out single pixel
- *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOUR_INDEX : cmd;
+ *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOR_INDEX : cmd;
++x2;
}
}
@@ -203,7 +204,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
}
byte M4Sprite::getTransparencyIndex() const {
- return TRANSPARENT_COLOUR_INDEX;
+ return TRANSPARENT_COLOR_INDEX;
}
} // End of namespace M4
diff --git a/engines/m4/woodscript.cpp b/engines/m4/woodscript.cpp
index 1b9d9859ef..dc24548f84 100644
--- a/engines/m4/woodscript.cpp
+++ b/engines/m4/woodscript.cpp
@@ -26,6 +26,7 @@
#include "m4/woodscript.h"
#include "common/memstream.h"
+#include "graphics/palette.h"
namespace M4 {
diff --git a/engines/m4/woodscript.h b/engines/m4/woodscript.h
index 4b0f457193..a9a884a4b0 100644
--- a/engines/m4/woodscript.h
+++ b/engines/m4/woodscript.h
@@ -319,8 +319,8 @@ public:
RGB8 *getMainPalette() const;
- void setInverseColourTable(byte *inverseColourTable) { _inverseColourTable = inverseColourTable; }
- byte *getInverseColourTable() const { return _inverseColourTable; }
+ void setInverseColorTable(byte *inverseColorTable) { _inverseColorTable = inverseColorTable; }
+ byte *getInverseColorTable() const { return _inverseColorTable; }
protected:
MadsM4Engine *_vm;
@@ -338,7 +338,7 @@ protected:
/* Misc */
int16 *_depthTable;
- byte *_inverseColourTable;
+ byte *_inverseColorTable;
M4Surface *_backgroundSurface;
View *_surfaceView;
diff --git a/engines/m4/ws_sequence.cpp b/engines/m4/ws_sequence.cpp
index bb6230d041..3ee496da0d 100644
--- a/engines/m4/ws_sequence.cpp
+++ b/engines/m4/ws_sequence.cpp
@@ -291,7 +291,7 @@ void Sequence::draw(M4Surface *surface, const Common::Rect &clipRect, Common::Re
info.hotX = _curFrame->xOffset;
info.hotY = _curFrame->yOffset;
info.encoding = _curFrame->encoding;
- info.inverseColourTable = _m4Vm->scene()->getInverseColourTable();
+ info.inverseColorTable = _m4Vm->scene()->getInverseColorTable();
info.palette = _ws->getMainPalette();
info.width = _curFrame->width();
info.height = _curFrame->height();