diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 1 | ||||
-rw-r--r-- | engines/agi/agi.h | 14 | ||||
-rw-r--r-- | engines/agi/detection.cpp | 4 | ||||
-rw-r--r-- | engines/agi/graphics.cpp | 11 | ||||
-rw-r--r-- | engines/agi/inv.cpp | 2 | ||||
-rw-r--r-- | engines/agi/keyboard.cpp | 4 | ||||
-rw-r--r-- | engines/agi/loader_v2.cpp | 2 | ||||
-rw-r--r-- | engines/agi/loader_v3.cpp | 1 | ||||
-rw-r--r-- | engines/agi/lzw.cpp | 2 | ||||
-rw-r--r-- | engines/agi/menu.cpp | 2 | ||||
-rw-r--r-- | engines/agi/objects.cpp | 2 | ||||
-rw-r--r-- | engines/agi/op_cmd.cpp | 1 | ||||
-rw-r--r-- | engines/agi/op_test.cpp | 6 | ||||
-rw-r--r-- | engines/agi/picture.cpp | 8 | ||||
-rw-r--r-- | engines/agi/preagi.cpp | 1 | ||||
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 1 | ||||
-rw-r--r-- | engines/agi/preagi_troll.cpp | 1 | ||||
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 52 | ||||
-rw-r--r-- | engines/agi/preagi_winnie.h | 2 | ||||
-rw-r--r-- | engines/agi/predictive.cpp | 1 | ||||
-rw-r--r-- | engines/agi/saveload.cpp | 25 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 2 | ||||
-rw-r--r-- | engines/agi/sound_2gs.cpp | 1 | ||||
-rw-r--r-- | engines/agi/sound_midi.cpp | 1 | ||||
-rw-r--r-- | engines/agi/sound_sarien.cpp | 4 | ||||
-rw-r--r-- | engines/agi/text.cpp | 4 | ||||
-rw-r--r-- | engines/agi/wagparser.cpp | 1 | ||||
-rw-r--r-- | engines/agi/words.cpp | 2 |
28 files changed, 90 insertions, 68 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 632587f7f7..a69d19f06c 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -32,6 +32,7 @@ #include "common/config-manager.h" #include "common/debug-channels.h" #include "common/random.h" +#include "common/textconsole.h" #include "engines/util.h" diff --git a/engines/agi/agi.h b/engines/agi/agi.h index df19f55b52..c71a0ebf64 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -27,9 +27,10 @@ #define AGI_H #include "common/scummsys.h" -#include "common/endian.h" +#include "common/error.h" #include "common/util.h" #include "common/file.h" +#include "common/rect.h" #include "common/stack.h" #include "common/system.h" @@ -45,7 +46,9 @@ #include "agi/sound.h" -namespace Common { class RandomSource; } +namespace Common { +class RandomSource; +} /** * This is the namespace of the AGI engine. @@ -92,7 +95,7 @@ typedef signed int Err; #define CRYPT_KEY_SIERRA "Avis Durgan" #define CRYPT_KEY_AGDS "Alex Simkin" -#define MSG_BOX_COLOUR 0x0f // White +#define MSG_BOX_COLOR 0x0f // White #define MSG_BOX_TEXT 0x00 // Black #define MSG_BOX_LINE 0x04 // Red #define BUTTON_BORDER 0x00 // Black @@ -693,7 +696,6 @@ public: class GfxMgr; class SpritesMgr; class Menu; -class SearchTree; // Image stack support struct ImageStackElement { @@ -727,7 +729,7 @@ protected: virtual Common::Error run() { Common::Error err; err = init(); - if (err != Common::kNoError) + if (err.getCode() != Common::kNoError) return err; return go(); } @@ -935,7 +937,7 @@ public: private: // Some submethods of testIfCode uint8 testObjRight(uint8, uint8, uint8, uint8, uint8); - uint8 testObjCentre(uint8, uint8, uint8, uint8, uint8); + uint8 testObjCenter(uint8, uint8, uint8, uint8, uint8); uint8 testObjInBox(uint8, uint8, uint8, uint8, uint8); uint8 testPosn(uint8, uint8, uint8, uint8, uint8); uint8 testSaid(uint8, uint8 *); diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 0a53f0c4f4..fb92344de2 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -23,12 +23,16 @@ * */ +// FIXME: Avoid using printf +#define FORBIDDEN_SYMBOL_EXCEPTION_printf + #include "base/plugins.h" #include "engines/advancedDetector.h" #include "common/config-manager.h" #include "common/file.h" #include "common/savefile.h" +#include "common/textconsole.h" #include "graphics/thumbnail.h" #include "graphics/surface.h" diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 58982a2931..f0d38761d0 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -24,9 +24,10 @@ */ #include "common/file.h" - +#include "common/textconsole.h" #include "graphics/cursorman.h" +#include "graphics/palette.h" #include "agi/agi.h" #include "agi/graphics.h" @@ -685,14 +686,14 @@ void GfxMgr::drawFrame(int x1, int y1, int x2, int y2, int c1, int c2) { } } -void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int colour1, int colour2, int m) { +void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int color1, int color2, int m) { x1 += m; y1 += m; x2 -= m; y2 -= m; - drawRectangle(x1, y1, x2, y2, colour1); - drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, colour2, colour2); + drawRectangle(x1, y1, x2, y2, color1); + drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, color2, color2); flushBlock(x1, y1, x2, y2); } @@ -752,7 +753,7 @@ void GfxMgr::rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor // Draw a filled rectangle that's larger than the button. Used for drawing // a border around the button as the button itself is drawn after this. - drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOUR); + drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOR); while (*s) { putTextCharacter(0, x + textOffset, y + textOffset, *s++, fgcolor, bgcolor); diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp index 46dfcb2b43..f1d9523887 100644 --- a/engines/agi/inv.cpp +++ b/engines/agi/inv.cpp @@ -66,7 +66,7 @@ namespace Agi { #define SELECT_MSG_RU "ENTER - \xa2\xeb\xa1\xe0\xa0\xe2\xec, ESC - \xae\xe2\xac\xa5\xad\xa8\xe2\xec." void AgiEngine::printItem(int n, int fg, int bg) { - printText(objectName(_intobj[n]), 0, n % 2 ? 39 - strlen(objectName(_intobj[n])) : 1, + printText(objectName(_intobj[n]), 0, ((n % 2) ? 39 - strlen(objectName(_intobj[n])) : 1), (n / 2) + 2, 40, fg, bg); } diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index 344654128d..95211f8e3c 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -279,7 +279,7 @@ void AgiEngine::handleGetstring(int key) { void AgiEngine::handleKeys(int key) { uint8 *p = NULL; int c = 0; - static uint8 formattedEntry[256]; + static uint8 formattedEntry[40]; int l = _game.lineUserInput; int fg = _game.colorFg, bg = _game.colorBg; int promptLength = strlen(agiSprintf(_game.strings[0])); @@ -298,7 +298,7 @@ void AgiEngine::handleKeys(int key) { ; // Copy to internal buffer - for (; *p; p++) { + for (; *p && c < 40-1; p++) { // Squash spaces if (*p == 0x20 && *(p + 1) == 0x20) { p++; diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp index 8780e1dab8..0141a61065 100644 --- a/engines/agi/loader_v2.cpp +++ b/engines/agi/loader_v2.cpp @@ -23,6 +23,8 @@ * */ +#include "common/textconsole.h" + #include "agi/agi.h" namespace Agi { diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp index 18ea4cae7d..025e755c8b 100644 --- a/engines/agi/loader_v3.cpp +++ b/engines/agi/loader_v3.cpp @@ -28,6 +28,7 @@ #include "common/config-manager.h" #include "common/fs.h" +#include "common/textconsole.h" namespace Agi { diff --git a/engines/agi/lzw.cpp b/engines/agi/lzw.cpp index f645cb16d3..495d6458da 100644 --- a/engines/agi/lzw.cpp +++ b/engines/agi/lzw.cpp @@ -36,6 +36,8 @@ #include "agi/agi.h" #include "agi/lzw.h" +#include "common/textconsole.h" + namespace Agi { diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp index 5ec4908e4a..b62bcd9ad8 100644 --- a/engines/agi/menu.cpp +++ b/engines/agi/menu.cpp @@ -117,7 +117,7 @@ void Menu::drawMenuOptionHilite(int hMenu, int vMenu) { AgiMenuOption *d = getMenuOption(hMenu, vMenu); // Disabled menu items are "greyed out" with a checkerboard effect, - // rather than having a different colour. -- dsymonds + // rather than having a different color. -- dsymonds _vm->printText(d->text, 0, m->wincol + 1, vMenu + 2, m->width + 2, MENU_BG, MENU_FG, !d->enabled); } diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp index d942a2b538..bea53d7fa4 100644 --- a/engines/agi/objects.cpp +++ b/engines/agi/objects.cpp @@ -25,6 +25,8 @@ #include "agi/agi.h" +#include "common/textconsole.h" + namespace Agi { int AgiEngine::allocObjects(int n) { diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index 2ea53e57ad..e1f99456e8 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -32,6 +32,7 @@ #include "agi/menu.h" #include "common/random.h" +#include "common/textconsole.h" namespace Agi { diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index ab4f6cadc5..f5234d4e6c 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -132,8 +132,8 @@ uint8 AgiEngine::testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { v->yPos >= y1 && v->xPos + v->xSize - 1 <= x2 && v->yPos <= y2; } -// if n is in centre of box -uint8 AgiEngine::testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { +// if n is in center of box +uint8 AgiEngine::testObjCenter(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { VtEntry *v = &_game.viewTable[n]; return v->xPos + v->xSize / 2 >= x1 && @@ -311,7 +311,7 @@ int AgiEngine::testIfCode(int lognum) { ec = testObjInBox(p[0], p[1], p[2], p[3], p[4]); break; case 0x11: - ec = testObjCentre(p[0], p[1], p[2], p[3], p[4]); + ec = testObjCenter(p[0], p[1], p[2], p[3], p[4]); break; case 0x12: ec = testObjRight(p[0], p[1], p[2], p[3], p[4]); diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp index 47b72cc8c6..8951fc81df 100644 --- a/engines/agi/picture.cpp +++ b/engines/agi/picture.cpp @@ -26,6 +26,8 @@ #include "agi/agi.h" #include "agi/graphics.h" +#include "common/textconsole.h" + namespace Agi { PictureMgr::PictureMgr(AgiBase *agi, GfxMgr *gfx) { @@ -601,7 +603,7 @@ void PictureMgr::drawPicture() { _patCode = nextByte(); plotBrush(); break; - case 0xf0: // set colour on screen (AGI pic v2) + case 0xf0: // set color on screen (AGI pic v2) if (_pictureVersion == AGIPIC_V15) break; @@ -615,7 +617,7 @@ void PictureMgr::drawPicture() { _scrColor &= 0xF; // for v3 drawing diff _scrOn = true; _priOn = false; - } else if (_pictureVersion == AGIPIC_V15) { // set colour on screen + } else if (_pictureVersion == AGIPIC_V15) { // set color on screen _scrColor = nextByte(); _scrColor &= 0xF; _scrOn = true; @@ -623,7 +625,7 @@ void PictureMgr::drawPicture() { _scrOn = false; } break; - case 0xf2: // set colour on priority (AGI pic v2) + case 0xf2: // set color on priority (AGI pic v2) if (_pictureVersion == AGIPIC_V15) break; diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp index 7457a317c2..c51c53e76e 100644 --- a/engines/agi/preagi.cpp +++ b/engines/agi/preagi.cpp @@ -26,6 +26,7 @@ #include "common/config-manager.h" #include "common/debug-channels.h" #include "common/random.h" +#include "common/textconsole.h" #include "audio/mididrv.h" diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 10ca797587..64fc4e9ae5 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -25,6 +25,7 @@ #include "common/events.h" #include "common/savefile.h" +#include "common/textconsole.h" #include "graphics/cursorman.h" diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp index 4e87c8063c..76849949c7 100644 --- a/engines/agi/preagi_troll.cpp +++ b/engines/agi/preagi_troll.cpp @@ -28,6 +28,7 @@ #include "agi/graphics.h" #include "common/events.h" +#include "common/textconsole.h" #include "graphics/cursorman.h" diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index e97c144872..ef35a0b4e0 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -32,6 +32,7 @@ #include "common/events.h" #include "common/memstream.h" #include "common/savefile.h" +#include "common/textconsole.h" namespace Agi { @@ -216,15 +217,9 @@ int Winnie::getObjInRoom(int iRoom) { return 0; } -#define setTakeDrop() {\ - if (getObjInRoom(_room))\ - fCanSel[IDI_WTP_SEL_TAKE] = true;\ - else\ - fCanSel[IDI_WTP_SEL_TAKE] = false;\ - if (_game.iObjHave)\ - fCanSel[IDI_WTP_SEL_DROP] = true;\ - else\ - fCanSel[IDI_WTP_SEL_DROP] = false;\ +void Winnie::setTakeDrop(int fCanSel[]) { + fCanSel[IDI_WTP_SEL_TAKE] = getObjInRoom(_room); + fCanSel[IDI_WTP_SEL_DROP] = _game.iObjHave; } void Winnie::setFlag(int iFlag) { @@ -280,7 +275,7 @@ int Winnie::parser(int pc, int index, uint8 *buffer) { fCanSel[IDI_WTP_SEL_EAST] = fCanSel[IDI_WTP_SEL_WEST] = true; // check if object in room or player carrying one - setTakeDrop(); + setTakeDrop(fCanSel); // check which rows have a menu option for (iSel = 0; iSel < IDI_WTP_MAX_OPTION; iSel++) { @@ -366,11 +361,11 @@ int Winnie::parser(int pc, int index, uint8 *buffer) { break; case IDI_WTP_SEL_TAKE: takeObj(_room); - setTakeDrop(); + setTakeDrop(fCanSel); break; case IDI_WTP_SEL_DROP: dropObj(_room); - setTakeDrop(); + setTakeDrop(fCanSel); break; } } @@ -795,13 +790,12 @@ void Winnie::getMenuMouseSel(int *iSel, int fCanSel[], int x, int y) { } } -#define makeSel() {\ - if (fCanSel[*iSel]) {\ - return;\ - } else {\ - keyHelp();\ - clrMenuSel(iSel, fCanSel);\ - }\ +void Winnie::makeSel(int *iSel, int fCanSel[]) { + if (fCanSel[*iSel]) + return; + + keyHelp(); + clrMenuSel(iSel, fCanSel); } void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { @@ -843,22 +837,22 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { // Click to move if (fCanSel[IDI_WTP_SEL_NORTH] && hotspotNorth.contains(event.mouse.x, event.mouse.y)) { *iSel = IDI_WTP_SEL_NORTH; - makeSel(); + makeSel(iSel, fCanSel); _vm->_gfx->setCursorPalette(false); return; } else if (fCanSel[IDI_WTP_SEL_SOUTH] && hotspotSouth.contains(event.mouse.x, event.mouse.y)) { *iSel = IDI_WTP_SEL_SOUTH; - makeSel(); + makeSel(iSel, fCanSel); _vm->_gfx->setCursorPalette(false); return; } else if (fCanSel[IDI_WTP_SEL_WEST] && hotspotWest.contains(event.mouse.x, event.mouse.y)) { *iSel = IDI_WTP_SEL_WEST; - makeSel(); + makeSel(iSel, fCanSel); _vm->_gfx->setCursorPalette(false); return; } else if (fCanSel[IDI_WTP_SEL_EAST] && hotspotEast.contains(event.mouse.x, event.mouse.y)) { *iSel = IDI_WTP_SEL_EAST; - makeSel(); + makeSel(iSel, fCanSel); _vm->_gfx->setCursorPalette(false); return; } else { @@ -943,31 +937,31 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { break; case Common::KEYCODE_n: *iSel = IDI_WTP_SEL_NORTH; - makeSel(); + makeSel(iSel, fCanSel); break; case Common::KEYCODE_s: if (event.kbd.flags & Common::KBD_CTRL) { _vm->flipflag(fSoundOn); } else { *iSel = IDI_WTP_SEL_SOUTH; - makeSel(); + makeSel(iSel, fCanSel); } break; case Common::KEYCODE_e: *iSel = IDI_WTP_SEL_EAST; - makeSel(); + makeSel(iSel, fCanSel); break; case Common::KEYCODE_w: *iSel = IDI_WTP_SEL_WEST; - makeSel(); + makeSel(iSel, fCanSel); break; case Common::KEYCODE_t: *iSel = IDI_WTP_SEL_TAKE; - makeSel(); + makeSel(iSel, fCanSel); break; case Common::KEYCODE_d: *iSel = IDI_WTP_SEL_DROP; - makeSel(); + makeSel(iSel, fCanSel); break; case Common::KEYCODE_RETURN: switch (*iSel) { diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h index 5a5472feb0..0187d80326 100644 --- a/engines/agi/preagi_winnie.h +++ b/engines/agi/preagi_winnie.h @@ -342,6 +342,8 @@ private: void saveGame(); void loadGame(); void dropObjRnd(); + void setTakeDrop(int[]); + void makeSel(int*, int[]); void wind(); void mist(); diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp index 0230b9bd74..96ad78ace5 100644 --- a/engines/agi/predictive.cpp +++ b/engines/agi/predictive.cpp @@ -28,6 +28,7 @@ #include "agi/keyboard.h" #include "common/config-manager.h" +#include "common/textconsole.h" #ifdef __DS__ #include "wordcompletion.h" diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 9194cc642c..c8df726fc7 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -31,6 +31,7 @@ #include "common/file.h" #include "common/config-manager.h" #include "common/savefile.h" +#include "common/textconsole.h" #include "graphics/thumbnail.h" #include "graphics/surface.h" @@ -597,7 +598,7 @@ int AgiEngine::selectSlot() { int hm = 1, vm = 3; // box margins int xmin, xmax, slotClicked; char desc[NUM_VISIBLE_SLOTS][40]; - int textCentre, buttonLength, buttonX[2], buttonY; + int textCenter, buttonLength, buttonX[2], buttonY; const char *buttonText[] = { " OK ", "Cancel", NULL }; _noSaveLoadAllowed = true; @@ -606,10 +607,10 @@ int AgiEngine::selectSlot() { getSavegameDescription(_firstSlot + i, desc[i]); } - textCentre = GFX_WIDTH / CHAR_LINES / 2; + textCenter = GFX_WIDTH / CHAR_LINES / 2; buttonLength = 6; - buttonX[0] = (textCentre - 3 * buttonLength / 2) * CHAR_COLS; - buttonX[1] = (textCentre + buttonLength / 2) * CHAR_COLS; + buttonX[0] = (textCenter - 3 * buttonLength / 2) * CHAR_COLS; + buttonX[1] = (textCenter + buttonLength / 2) * CHAR_COLS; buttonY = (vm + 17) * CHAR_LINES; for (i = 0; i < 2; i++) @@ -642,8 +643,8 @@ int AgiEngine::selectSlot() { for (i = 0; i < NUM_VISIBLE_SLOTS; i++) { sprintf(dstr, "[%2d. %-28.28s]", i + _firstSlot, desc[i]); printText(dstr, 0, hm + 1, vm + 4 + i, - (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOUR : MSG_BOX_TEXT, - i == active ? MSG_BOX_TEXT : MSG_BOX_COLOUR); + (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOR : MSG_BOX_TEXT, + i == active ? MSG_BOX_TEXT : MSG_BOX_COLOR); } char upArrow[] = "^"; @@ -651,11 +652,11 @@ int AgiEngine::selectSlot() { char scrollBar[] = " "; for (i = 1; i < NUM_VISIBLE_SLOTS - 1; i++) - printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOUR, 7, true); + printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOR, 7, true); printText(upArrow, 35, hm + 1, vm + 4, 1, 8, 7); printText(downArrow, 35, hm + 1, vm + 4 + NUM_VISIBLE_SLOTS - 1, 1, 8, 7); - printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOUR, MSG_BOX_TEXT); + printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOR, MSG_BOX_TEXT); oldActive = active; oldFirstSlot = _firstSlot; @@ -808,7 +809,7 @@ int AgiEngine::saveGameDialog() { do { drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp); printText("Select a slot in which you wish to\nsave the game:", - 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR); slot = selectSlot(); if (slot + _firstSlot == 0) messageBox("That slot is for Autosave only."); @@ -819,7 +820,7 @@ int AgiEngine::saveGameDialog() { drawWindow(hp, vp + 5 * CHAR_LINES, GFX_WIDTH - hp, GFX_HEIGHT - vp - 9 * CHAR_LINES); printText("Enter a description for this game:", - 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOR); _gfx->drawRectangle(3 * CHAR_COLS, 11 * CHAR_LINES - 1, 37 * CHAR_COLS, 12 * CHAR_LINES, MSG_BOX_TEXT); _gfx->flushBlock(3 * CHAR_COLS, 11 * CHAR_LINES - 1, @@ -844,7 +845,7 @@ int AgiEngine::saveGameDialog() { for (numChars = 0; numChars < 28 && name[numChars]; numChars++) handleGetstring(name[numChars]); - _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOUR, MSG_BOX_TEXT); + _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOR, MSG_BOX_TEXT); do { mainCycle(); } while (_game.inputMode == INPUT_GETSTRING); @@ -902,7 +903,7 @@ int AgiEngine::loadGameDialog() { drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp); printText("Select a game which you wish to\nrestore:", - 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR); slot = selectSlot(); diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index b215822917..b40cef67ef 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -31,6 +31,8 @@ #include "agi/sound_sarien.h" #include "agi/sound_pcjr.h" +#include "common/textconsole.h" + namespace Agi { // diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp index 11bf5a9034..f5758ed140 100644 --- a/engines/agi/sound_2gs.cpp +++ b/engines/agi/sound_2gs.cpp @@ -28,6 +28,7 @@ #include "common/md5.h" #include "common/memstream.h" #include "common/str-array.h" +#include "common/textconsole.h" #include "agi/agi.h" #include "agi/sound_2gs.h" diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp index 986715721f..997c1edd6b 100644 --- a/engines/agi/sound_midi.cpp +++ b/engines/agi/sound_midi.cpp @@ -49,6 +49,7 @@ #include "common/file.h" #include "common/memstream.h" #include "common/stream.h" +#include "common/textconsole.h" #include "agi/agi.h" diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp index 4ed7f8d029..6f2f3c5ad3 100644 --- a/engines/agi/sound_sarien.cpp +++ b/engines/agi/sound_sarien.cpp @@ -23,11 +23,7 @@ * */ -#include "common/md5.h" -#include "common/config-manager.h" -#include "common/fs.h" #include "common/random.h" -#include "common/str-array.h" #include "audio/mididrv.h" diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index af3881170a..f85c4c1cdd 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -166,7 +166,7 @@ void AgiEngine::blitTextbox(const char *p, int y, int x, int len) { drawWindow(xoff, yoff, xoff + w - 1, yoff + h - 1); printText2(2, msg, 0, CHAR_COLS + xoff, CHAR_LINES + yoff, - len + 1, MSG_BOX_TEXT, MSG_BOX_COLOUR); + len + 1, MSG_BOX_TEXT, MSG_BOX_COLOR); free(msg); @@ -730,7 +730,7 @@ void AgiEngine::drawWindow(int x1, int y1, int x2, int y2) { debugC(4, kDebugLevelText, "x1=%d, y1=%d, x2=%d, y2=%d", x1, y1, x2, y2); _gfx->saveBlock(x1, y1, x2, y2, _game.window.buffer); - _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOUR, MSG_BOX_LINE, 2); + _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOR, MSG_BOX_LINE, 2); } } // End of namespace Agi diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp index 22de66712d..fab3b5cf50 100644 --- a/engines/agi/wagparser.cpp +++ b/engines/agi/wagparser.cpp @@ -27,6 +27,7 @@ #include "common/util.h" #include "common/fs.h" #include "common/debug.h" +#include "common/textconsole.h" #include "agi/wagparser.h" diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp index c48ed90ad8..d8596dec97 100644 --- a/engines/agi/words.cpp +++ b/engines/agi/words.cpp @@ -29,6 +29,8 @@ #include "agi/agi.h" +#include "common/textconsole.h" + namespace Agi { static uint8 *words; // words in the game |