diff options
Diffstat (limited to 'engines/m4')
-rw-r--r-- | engines/m4/actor.cpp | 1 | ||||
-rw-r--r-- | engines/m4/animation.cpp | 2 | ||||
-rw-r--r-- | engines/m4/compression.cpp | 1 | ||||
-rw-r--r-- | engines/m4/console.cpp | 2 | ||||
-rw-r--r-- | engines/m4/converse.cpp | 1 | ||||
-rw-r--r-- | engines/m4/dialogs.cpp | 3 | ||||
-rw-r--r-- | engines/m4/globals.cpp | 2 | ||||
-rw-r--r-- | engines/m4/graphics.cpp | 15 | ||||
-rw-r--r-- | engines/m4/graphics.h | 8 | ||||
-rw-r--r-- | engines/m4/gui.cpp | 1 | ||||
-rw-r--r-- | engines/m4/m4.cpp | 7 | ||||
-rw-r--r-- | engines/m4/m4_menus.cpp | 1 | ||||
-rw-r--r-- | engines/m4/m4_scene.cpp | 1 | ||||
-rw-r--r-- | engines/m4/m4_views.cpp | 2 | ||||
-rw-r--r-- | engines/m4/mads_anim.cpp | 2 | ||||
-rw-r--r-- | engines/m4/mads_logic.cpp | 2 | ||||
-rw-r--r-- | engines/m4/mads_menus.cpp | 2 | ||||
-rw-r--r-- | engines/m4/mads_scene.cpp | 1 | ||||
-rw-r--r-- | engines/m4/mads_views.cpp | 1 | ||||
-rw-r--r-- | engines/m4/midi.cpp | 1 | ||||
-rw-r--r-- | engines/m4/resource.cpp | 1 | ||||
-rw-r--r-- | engines/m4/script.cpp | 1 | ||||
-rw-r--r-- | engines/m4/sound.cpp | 1 | ||||
-rw-r--r-- | engines/m4/sprite.cpp | 1 | ||||
-rw-r--r-- | engines/m4/woodscript.cpp | 1 |
25 files changed, 44 insertions, 17 deletions
diff --git a/engines/m4/actor.cpp b/engines/m4/actor.cpp index ce8574a134..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" diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp index 26de121611..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" 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 f67291f0a6..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" diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp index 7efbc523f8..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; 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 a3eca13e1e..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); @@ -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; diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h index dbf6fac8c8..96e81f746e 100644 --- a/engines/m4/graphics.h +++ b/engines/m4/graphics.h @@ -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_; @@ -157,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; } diff --git a/engines/m4/gui.cpp b/engines/m4/gui.cpp index 6619b37707..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" diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index d9a1bf940f..1a484322fd 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 { 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 0ace40bfc5..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" 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 571a6fa899..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" 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 4ca8154793..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" diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index fd972cc6ea..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" diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp index b4385dbead..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 { 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/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 77528ec8a6..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" 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 { |