diff options
author | Jordi Vilalta Prat | 2010-06-07 17:14:42 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2010-06-07 17:14:42 +0000 |
commit | 0e95d8a5faee7f674665067505635a9d31cc174b (patch) | |
tree | 42c2cc0e9e3eb6237ffe2514fcb6b1011f3dc614 | |
parent | 2c950b321c3354144debd6a7f5e7d19cbc6c3a32 (diff) | |
download | scummvm-rg350-0e95d8a5faee7f674665067505635a9d31cc174b.tar.gz scummvm-rg350-0e95d8a5faee7f674665067505635a9d31cc174b.tar.bz2 scummvm-rg350-0e95d8a5faee7f674665067505635a9d31cc174b.zip |
Groovie:
- Rewritten T7G's font code to subclass Graphics::Font and make it cleaner.
- Use theme fonts for the Mac version of T7G (which used ugly system fonts
originally). With this the Mac version should be completable.
- Cleanup include interdependencies.
svn-id: r49487
-rw-r--r-- | engines/groovie/cell.h | 6 | ||||
-rw-r--r-- | engines/groovie/cursor.h | 3 | ||||
-rw-r--r-- | engines/groovie/debug.cpp | 6 | ||||
-rw-r--r-- | engines/groovie/debug.h | 4 | ||||
-rw-r--r-- | engines/groovie/detection.cpp | 4 | ||||
-rw-r--r-- | engines/groovie/font.cpp | 157 | ||||
-rw-r--r-- | engines/groovie/font.h | 36 | ||||
-rw-r--r-- | engines/groovie/graphics.cpp | 3 | ||||
-rw-r--r-- | engines/groovie/graphics.h | 2 | ||||
-rw-r--r-- | engines/groovie/groovie.cpp | 33 | ||||
-rw-r--r-- | engines/groovie/groovie.h | 19 | ||||
-rw-r--r-- | engines/groovie/music.cpp | 3 | ||||
-rw-r--r-- | engines/groovie/music.h | 10 | ||||
-rw-r--r-- | engines/groovie/player.cpp | 2 | ||||
-rw-r--r-- | engines/groovie/resource.cpp | 2 | ||||
-rw-r--r-- | engines/groovie/roq.cpp | 3 | ||||
-rw-r--r-- | engines/groovie/script.cpp | 62 | ||||
-rw-r--r-- | engines/groovie/script.h | 15 | ||||
-rw-r--r-- | engines/groovie/vdx.cpp | 3 | ||||
-rw-r--r-- | engines/groovie/vdx.h | 4 |
20 files changed, 223 insertions, 154 deletions
diff --git a/engines/groovie/cell.h b/engines/groovie/cell.h index 39ee529beb..a5feab4017 100644 --- a/engines/groovie/cell.h +++ b/engines/groovie/cell.h @@ -26,11 +26,7 @@ #ifndef GROOVIE_CELL_H #define GROOVIE_CELL_H -#include "common/file.h" -#include "common/util.h" - -#include "groovie/cell.h" -#include "groovie/groovie.h" +#include "common/textconsole.h" #define BOARDSIZE 7 #define CELL_CLEAR 0 diff --git a/engines/groovie/cursor.h b/engines/groovie/cursor.h index 83aebb37d3..7a1f3ccc0e 100644 --- a/engines/groovie/cursor.h +++ b/engines/groovie/cursor.h @@ -26,9 +26,8 @@ #ifndef GROOVIE_CURSOR_H #define GROOVIE_CURSOR_H -#include "common/system.h" #include "common/array.h" -#include "common/file.h" +#include "common/system.h" namespace Common { class MacResManager; diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp index 41ebb2fbcd..7055965917 100644 --- a/engines/groovie/debug.cpp +++ b/engines/groovie/debug.cpp @@ -24,15 +24,17 @@ */ #include "groovie/debug.h" +#include "groovie/graphics.h" #include "groovie/groovie.h" #include "groovie/script.h" #include "common/debug-channels.h" +#include "common/system.h" namespace Groovie { Debugger::Debugger(GroovieEngine *vm) : - _vm (vm), _script(_vm->_script), _syst(_vm->_system) { + _vm(vm), _script(_vm->_script) { // Register the debugger comands DCmd_Register("step", WRAP_METHOD(Debugger, cmd_step)); @@ -136,7 +138,7 @@ bool Debugger::cmd_playref(int argc, const char **argv) { bool Debugger::cmd_dumppal(int argc, const char **argv) { uint16 i; byte palettedump[256 * 4]; - _syst->grabPalette(palettedump, 0, 256); + _vm->_system->grabPalette(palettedump, 0, 256); for (i = 0; i < 256; i++) { DebugPrintf("%3d: %3d,%3d,%3d,%3d\n", i, palettedump[(i * 4)], palettedump[(i * 4) + 1], palettedump[(i * 4) + 2], palettedump[(i * 4) + 3]); diff --git a/engines/groovie/debug.h b/engines/groovie/debug.h index dadba9482c..e21746a426 100644 --- a/engines/groovie/debug.h +++ b/engines/groovie/debug.h @@ -27,12 +27,11 @@ #define GROOVIE_DEBUG_H #include "gui/debugger.h" -#include "engines/engine.h" namespace Groovie { -class Script; class GroovieEngine; +class Script; class Debugger : public GUI::Debugger { public: @@ -42,7 +41,6 @@ public: private: GroovieEngine *_vm; Script *_script; - OSystem *_syst; int getNumber(const char *arg); diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp index 5b0fa4b3b1..ec401e7d24 100644 --- a/engines/groovie/detection.cpp +++ b/engines/groovie/detection.cpp @@ -23,12 +23,12 @@ * */ -#include "common/savefile.h" - #include "groovie/groovie.h" #include "groovie/detection.h" #include "groovie/saveload.h" +#include "common/system.h" + namespace Groovie { static const PlainGameDescriptor groovieGames[] = { diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp index ece8447735..6aa6c89d31 100644 --- a/engines/groovie/font.cpp +++ b/engines/groovie/font.cpp @@ -23,106 +23,105 @@ * */ -#include "common/file.h" -#include "graphics/surface.h" - #include "groovie/font.h" namespace Groovie { -Font::Font(OSystem *syst) : - _syst(syst), _sphinxfnt(NULL) { - - Common::File fontfile; - if (!fontfile.open("sphinx.fnt")) { - error("Groovie::Font: Couldn't open sphinx.fnt"); - } - uint16 fontfilesize = fontfile.size(); - _sphinxfnt = fontfile.readStream(fontfilesize); - fontfile.close(); +T7GFont::T7GFont() : _maxHeight(0), _maxWidth(0), _glyphs(0) { } -Font::~Font() { - delete _sphinxfnt; +T7GFont::~T7GFont() { + delete[] _glyphs; } -void Font::printstring(const char *messagein) { - uint16 totalwidth = 0, currxoffset, i; +bool T7GFont::load(Common::SeekableReadStream &stream) { + // Read the mapping of characters to glyphs + if (stream.read(_mapChar2Glyph, 128) < 128) { + error("Groovie::T7GFont: Couldn't read the character to glyph map"); + return false; + } - char message[15]; - memset(message, 0, 15); + // Calculate the number of glyphs + byte numGlyphs = 0; + for (int i = 0; i < 128; i++) + if (_mapChar2Glyph[i] >= numGlyphs) + numGlyphs = _mapChar2Glyph[i] + 1; - // Clear the top bar - Common::Rect topbar(640, 80); - Graphics::Surface *gamescreen; - gamescreen = _syst->lockScreen(); - gamescreen->fillRect(topbar, 0); - _syst->unlockScreen(); + // Read the glyph offsets + uint16 *glyphOffsets = new uint16[numGlyphs]; + for (int i = 0; i < numGlyphs; i++) + glyphOffsets[i] = stream.readUint16LE(); - for (i = 0; i < 14; i++) { - char chartocopy = messagein[i]; - if (chartocopy <= 0x00 || chartocopy == 0x24) { - break; - } - message[i] = chartocopy; + if (stream.eos()) { + error("Groovie::T7GFont: Couldn't read the glyph offsets"); + return false; } - Common::rtrim(message); - for (i = 0; i < strlen(message); i++) { - totalwidth += letterwidth(message[i]); - } - currxoffset = (640 - totalwidth) / 2; - char *currpos = message; - while (*(currpos) != 0) { - currxoffset += printletter(*(currpos++), currxoffset); - } -} -uint16 Font::letteroffset(char letter) { - uint16 offset; - offset = letter; - _sphinxfnt->seek(offset); - offset = _sphinxfnt->readByte() * 2 + 128; - _sphinxfnt->seek(offset); - offset = _sphinxfnt->readUint16LE(); - return offset; -} + // Allocate the glyph data + delete[] _glyphs; + _glyphs = new Glyph[numGlyphs]; + + // Read the glyphs + _maxHeight = _maxWidth = 0; + for (int i = 0; (i < numGlyphs) && !stream.eos(); i++) { + // Verify we're at the expected stream position + if (stream.pos() != glyphOffsets[i]) { + error("Groovie::T7GFont: Glyph %d starts at %d but the current " + "offset is %d", i, glyphOffsets[i], stream.pos()); + return false; + } -uint8 Font::letterwidth(char letter) { - uint16 offset = letteroffset(letter); - _sphinxfnt->seek(offset); - return _sphinxfnt->readByte(); -} + // Read the glyph information + Glyph *g = &_glyphs[i]; + g->width = stream.readByte(); + g->julia = stream.readByte(); + + // Read the pixels data into a dynamic array (we don't know its length) + Common::Array<byte> data; + data.reserve(300); + byte b = stream.readByte(); + while (!stream.eos() && (b != 0xFF)) { + data.push_back(b); + b = stream.readByte(); + } + + // Verify the pixel data size + assert (data.size() % g->width == 0); + g->height = data.size() / g->width; -uint8 Font::letterheight(char letter) { - uint16 offset, width, julia, data, counter = 0; - offset = letteroffset(letter); - _sphinxfnt->seek(offset); - width = _sphinxfnt->readByte(); - julia = _sphinxfnt->readByte(); - data = _sphinxfnt->readByte(); - while (data != 0xFF) { - data = _sphinxfnt->readByte(); - counter++; + // Copy the pixel data into the definitive static array + g->pixels = new byte[data.size()]; + memcpy(g->pixels, data.begin(), data.size()); + + // Update the max values + if (g->width > _maxWidth) + _maxWidth = g->width; + if (g->height > _maxHeight) + _maxHeight = g->height; } - if (counter % width != 0) assert("font file corrupt"); - return counter / width; + + delete[] glyphOffsets; + return true; } +void T7GFont::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const { + // We ignore the color, as the font is already colored + const Glyph *glyph = getGlyph(chr); + const byte *src = glyph->pixels; + byte *target = (byte *)dst->getBasePtr(x, y); -uint8 Font::printletter(char letter, uint16 xoffset) { - uint16 offset, width, height, julia; - offset = letteroffset(letter); - height = letterheight(letter); - _sphinxfnt->seek(offset); - width = _sphinxfnt->readByte(); - julia = _sphinxfnt->readByte(); + for (int i = 0; i < glyph->height; i++) { + memcpy(target, src, glyph->width); + src += glyph->width; + target += dst->pitch; + } +} - byte *data = new byte[width * height]; - _sphinxfnt->read(data, width * height); - _syst->copyRectToScreen(data, width, xoffset, 16, width, height); - delete[] data; +const T7GFont::Glyph *T7GFont::getGlyph(byte chr) const { + assert (chr < 128); - return width; + byte numGlyph = _mapChar2Glyph[chr]; + return &_glyphs[numGlyph]; } } // End of Groovie namespace diff --git a/engines/groovie/font.h b/engines/groovie/font.h index 1a4a967fa6..71f8393d28 100644 --- a/engines/groovie/font.h +++ b/engines/groovie/font.h @@ -27,24 +27,38 @@ #define GROOVIE_FONT_H #include "common/stream.h" -#include "common/system.h" +#include "graphics/font.h" namespace Groovie { -class Font { +class T7GFont : public Graphics::Font { public: - Font(OSystem *syst); - ~Font(); - void printstring(const char *messagein); + T7GFont(); + ~T7GFont(); + + bool load(Common::SeekableReadStream &stream); + + int getFontHeight() const { return _maxHeight; } + int getMaxCharWidth() const { return _maxWidth; } + int getCharWidth(byte chr) const { return getGlyph(chr)->width; } + void drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const; private: - OSystem *_syst; - Common::MemoryReadStream *_sphinxfnt; + int _maxHeight, _maxWidth; + + struct Glyph { + Glyph() : pixels(0) {} + ~Glyph() { delete[] pixels; } + + byte width; + byte height; + byte julia; + byte *pixels; + }; - uint16 letteroffset(char letter); - uint8 letterwidth(char letter); - uint8 letterheight(char letter); - uint8 printletter(char letter, uint16 xoffset); + byte _mapChar2Glyph[128]; + Glyph *_glyphs; + const Glyph *getGlyph(byte chr) const; }; } // End of Groovie namespace diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp index 1e54f0e79b..8546a13d40 100644 --- a/engines/groovie/graphics.cpp +++ b/engines/groovie/graphics.cpp @@ -23,8 +23,9 @@ * */ -#include "groovie/groovie.h" #include "groovie/graphics.h" +#include "groovie/groovie.h" +#include "common/system.h" namespace Groovie { diff --git a/engines/groovie/graphics.h b/engines/groovie/graphics.h index ea3261c85f..c9bade9538 100644 --- a/engines/groovie/graphics.h +++ b/engines/groovie/graphics.h @@ -26,6 +26,8 @@ #ifndef GROOVIE_GRAPHICS_H #define GROOVIE_GRAPHICS_H +#include "graphics/surface.h" + namespace Groovie { class GroovieEngine; diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index ba18b37690..e0760e1d41 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -23,27 +23,30 @@ * */ +#include "groovie/groovie.h" +#include "groovie/cursor.h" +#include "groovie/detection.h" +#include "groovie/graphics.h" +#include "groovie/music.h" +#include "groovie/resource.h" +#include "groovie/roq.h" +#include "groovie/vdx.h" + #include "common/config-manager.h" #include "common/debug-channels.h" #include "common/events.h" #include "common/macresman.h" #include "engines/util.h" - +#include "graphics/fontman.h" #include "sound/mixer.h" -#include "groovie/groovie.h" -#include "groovie/detection.h" -#include "groovie/music.h" -#include "groovie/roq.h" -#include "groovie/vdx.h" - namespace Groovie { GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) : Engine(syst), _gameDescription(gd), _debugger(NULL), _script(NULL), _resMan(NULL), _grvCursorMan(NULL), _videoPlayer(NULL), _musicPlayer(NULL), - _graphicsMan(NULL), _macResFork(NULL), _waitingForInput(false) { + _graphicsMan(NULL), _macResFork(NULL), _waitingForInput(false), _font(NULL) { // Adding the default directories const Common::FSNode gameDataDir(ConfMan.get("path")); @@ -104,12 +107,26 @@ Common::Error GroovieEngine::run() { _graphicsMan = new GraphicsMan(this); // Create the resource and cursor managers and the video player + // Prepare the font too switch (_gameDescription->version) { case kGroovieT7G: if (_gameDescription->desc.platform == Common::kPlatformMacintosh) { _macResFork = new Common::MacResManager(); if (!_macResFork->open(_gameDescription->desc.filesDescriptions[0].fileName)) error("Could not open %s as a resource fork", _gameDescription->desc.filesDescriptions[0].fileName); + // The Macintosh release used system fonts. We use GUI fonts. + _font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont); + } else { + Common::File fontfile; + if (!fontfile.open("sphinx.fnt")) { + error("Couldn't open sphinx.fnt"); + return Common::kNoGameDataFoundError; + } else if (!_sphinxFont.load(fontfile)) { + error("Error loading sphinx.fnt"); + return Common::kUnknownError; + } + fontfile.close(); + _font = &_sphinxFont; } _resMan = new ResMan_t7g(_macResFork); diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index dae2df0595..437debfd17 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -26,15 +26,11 @@ #ifndef GROOVIE_H #define GROOVIE_H -#include "engines/engine.h" -#include "graphics/surface.h" - -#include "groovie/cursor.h" #include "groovie/debug.h" -#include "groovie/graphics.h" -#include "groovie/player.h" -#include "groovie/resource.h" -#include "groovie/script.h" +#include "groovie/font.h" + +#include "engines/engine.h" +#include "graphics/pixelformat.h" namespace Common { class MacResManager; @@ -57,7 +53,12 @@ namespace Common { */ namespace Groovie { +class GraphicsMan; +class GrvCursorMan; class MusicPlayer; +class ResMan; +class Script; +class VideoPlayer; enum DebugLevels { kGroovieDebugAll = 1 << 0, @@ -106,6 +107,7 @@ public: VideoPlayer *_videoPlayer; MusicPlayer *_musicPlayer; GraphicsMan *_graphicsMan; + const Graphics::Font *_font; Common::MacResManager *_macResFork; @@ -113,6 +115,7 @@ private: const GroovieGameDescription *_gameDescription; Debugger *_debugger; bool _waitingForInput; + T7GFont _sphinxFont; }; } // End of namespace Groovie diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index f6670da716..2ea7454256 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -23,13 +23,14 @@ * */ -#include "groovie/lzss.h" #include "groovie/music.h" +#include "groovie/groovie.h" #include "groovie/resource.h" #include "common/config-manager.h" #include "common/macresman.h" #include "sound/audiocd.h" +#include "sound/midiparser.h" namespace Groovie { diff --git a/engines/groovie/music.h b/engines/groovie/music.h index 6302c81dcc..2feef9cbf7 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -26,14 +26,16 @@ #ifndef GROOVIE_MUSIC_H #define GROOVIE_MUSIC_H -#include "groovie/groovie.h" - -#include "sound/mididrv.h" -#include "sound/midiparser.h" +#include "common/array.h" #include "common/mutex.h" +#include "sound/mididrv.h" + +class MidiParser; namespace Groovie { +class GroovieEngine; + class MusicPlayer { public: MusicPlayer(GroovieEngine *vm); diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp index 5bac190701..8badd90012 100644 --- a/engines/groovie/player.cpp +++ b/engines/groovie/player.cpp @@ -23,8 +23,8 @@ * */ -#include "groovie/groovie.h" #include "groovie/player.h" +#include "groovie/groovie.h" namespace Groovie { diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp index 42de1a804d..32cc1735ef 100644 --- a/engines/groovie/resource.cpp +++ b/engines/groovie/resource.cpp @@ -26,8 +26,8 @@ #include "common/archive.h" #include "common/macresman.h" -#include "groovie/groovie.h" #include "groovie/resource.h" +#include "groovie/groovie.h" namespace Groovie { diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index de91bb2067..11bacef8e8 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -26,8 +26,9 @@ // ROQ video player based on this specification by Dr. Tim Ferguson: // http://www.csse.monash.edu.au/~timf/videocodec/idroq.txt -#include "groovie/groovie.h" #include "groovie/roq.h" +#include "groovie/graphics.h" +#include "groovie/groovie.h" #include "graphics/jpeg.h" diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 15a0a473c0..297da6ccc2 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -23,18 +23,19 @@ * */ -#include "groovie/debug.h" -#include "groovie/music.h" #include "groovie/script.h" -#include "groovie/groovie.h" #include "groovie/cell.h" +#include "groovie/cursor.h" +#include "groovie/graphics.h" +#include "groovie/groovie.h" +#include "groovie/music.h" +#include "groovie/player.h" +#include "groovie/resource.h" #include "groovie/saveload.h" #include "common/archive.h" #include "common/config-manager.h" #include "common/debug-channels.h" -#include "common/endian.h" -#include "common/events.h" #include "common/EventRecorder.h" #include "common/macresman.h" @@ -63,9 +64,8 @@ static void debugScript(int level, bool nl, const char *s, ...) { } Script::Script(GroovieEngine *vm, EngineVersion version) : - _code(NULL), _savedCode(NULL), _stacktop(0), - _debugger(NULL), _vm(vm), - _videoFile(NULL), _videoRef(0), _font(NULL), _staufsMove(NULL) { + _code(NULL), _savedCode(NULL), _stacktop(0), _debugger(NULL), _vm(vm), + _videoFile(NULL), _videoRef(0), _staufsMove(NULL) { // Initialize the opcode set depending on the engine version switch (version) { case kGroovieT7G: @@ -112,7 +112,6 @@ Script::~Script() { delete[] _code; delete[] _savedCode; - delete _font; delete _videoFile; } @@ -429,6 +428,22 @@ void Script::savegame(uint slot) { _saveNames[slot] = save; } +void Script::printString(Graphics::Surface *surface, const char *str) { + char message[15]; + memset(message, 0, 15); + + // Preprocess the string + for (int i = 0; i < 14; i++) { + if (str[i] <= 0x00 || str[i] == 0x24) + break; + message[i] = str[i]; + } + Common::rtrim(message); + + // Draw the string + _vm->_font->drawString(surface, message, 0, 16, 640, 0xE2, Graphics::kTextAlignCenter); +} + // OPCODES void Script::o_invalid() { @@ -1249,11 +1264,16 @@ void Script::o_printstring() { stringstorage[counter] = 0; - // Load the font if required - if (!_font) { - _font = new Font(_vm->_system); - } - _font->printstring(stringstorage); + Common::Rect topbar(640, 80); + Graphics::Surface *gamescreen = _vm->_system->lockScreen(); + + // Clear the top bar + gamescreen->fillRect(topbar, 0); + + // Draw the string + printString(gamescreen, stringstorage); + + _vm->_system->unlockScreen(); } void Script::o_hotspot_slot() { @@ -1273,11 +1293,15 @@ void Script::o_hotspot_slot() { return; } - // Load the font if required - if (!_font) { - _font = new Font(_vm->_system); - } - _font->printstring(_saveNames[slot].c_str()); + Common::Rect topbar(640, 80); + Graphics::Surface *gamescreen = _vm->_system->lockScreen(); + + // Clear the top bar + gamescreen->fillRect(topbar, 0); + + printString(gamescreen, _saveNames[slot].c_str()); + + _vm->_system->unlockScreen(); // Save the currently highlighted slot _hotspotSlot = slot; diff --git a/engines/groovie/script.h b/engines/groovie/script.h index e4a6a288e6..43b7c06a54 100644 --- a/engines/groovie/script.h +++ b/engines/groovie/script.h @@ -26,12 +26,16 @@ #ifndef GROOVIE_SCRIPT_H #define GROOVIE_SCRIPT_H -#include "common/file.h" #include "common/random.h" #include "common/rect.h" -#include "groovie/font.h" -#include "groovie/cell.h" +namespace Common { +class SeekableReadStream; +} + +namespace Graphics { +class Surface; +} namespace Groovie { @@ -40,8 +44,9 @@ enum EngineVersion { kGroovieV2 }; -class GroovieEngine; class CellGame; +class Debugger; +class GroovieEngine; class Script { friend class Debugger; @@ -112,7 +117,6 @@ private: uint16 _hotspotSlot; // Video - Font *_font; Common::SeekableReadStream *_videoFile; uint32 _videoRef; uint16 _bitflags; @@ -140,6 +144,7 @@ private: void loadgame(uint slot); void savegame(uint slot); bool playvideofromref(uint32 fileref); + void printString(Graphics::Surface *surface, const char *str); // Opcodes typedef void (Script::*OpcodeFunc)(); diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index fb6377349f..1d3108a2cc 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -23,9 +23,10 @@ * */ +#include "groovie/vdx.h" +#include "groovie/graphics.h" #include "groovie/groovie.h" #include "groovie/lzss.h" -#include "groovie/vdx.h" #include "common/debug-channels.h" #include "sound/mixer.h" diff --git a/engines/groovie/vdx.h b/engines/groovie/vdx.h index 207d2e0c18..0b29493108 100644 --- a/engines/groovie/vdx.h +++ b/engines/groovie/vdx.h @@ -28,6 +28,10 @@ #include "groovie/player.h" +namespace Common { + class ReadStream; +} + namespace Groovie { class VDXPlayer : public VideoPlayer { |