diff options
Diffstat (limited to 'engines/agi/saveload.cpp')
-rw-r--r-- | engines/agi/saveload.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 94df063609..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" @@ -53,7 +54,7 @@ namespace Agi { -static const uint32 AGIflag = MKID_BE('AGI:'); +static const uint32 AGIflag = MKTAG('A','G','I',':'); int AgiEngine::saveGame(const char *fileName, const char *description) { char gameIDstring[8] = "gameIDX"; @@ -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(); |