diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/avalot.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/color.h | 34 | ||||
-rw-r--r-- | engines/avalanche/dropdown2.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/dropdown2.h | 12 | ||||
-rw-r--r-- | engines/avalanche/gyro2.cpp | 32 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 40 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/scrolls2.cpp | 42 | ||||
-rw-r--r-- | engines/avalanche/trip6.cpp | 8 |
9 files changed, 94 insertions, 92 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index a51d9e62e3..2bc3ce3463 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -220,7 +220,7 @@ void Avalot::run(Common::String arg) { for (byte i = 0; i < _vm->_gyro->numfields; i++) { if (_vm->_gyro->fields[i].x1 < 640) - _vm->_graphics->_surface.frameRect(Common::Rect(_vm->_gyro->fields[i].x1, _vm->_gyro->fields[i].y1, _vm->_gyro->fields[i].x2, _vm->_gyro->fields[i].y2), lightmagenta); + _vm->_graphics->_surface.frameRect(Common::Rect(_vm->_gyro->fields[i].x1, _vm->_gyro->fields[i].y1, _vm->_gyro->fields[i].x2, _vm->_gyro->fields[i].y2), kColorLightmagenta); } // ONLY FOR TESTING!!! #endif diff --git a/engines/avalanche/color.h b/engines/avalanche/color.h index 1a8e69da83..c0c348f9ab 100644 --- a/engines/avalanche/color.h +++ b/engines/avalanche/color.h @@ -34,22 +34,24 @@ namespace Avalanche { -const byte black = 0; -const byte blue = 1; -const byte green = 2; -const byte cyan = 3; -const byte red = 4; -const byte magenta = 5; -const byte brown = 6; -const byte lightgray = 7; -const byte darkgray = 8; -const byte lightblue = 9; -const byte lightgreen = 10; -const byte lightcyan = 11; -const byte lightred = 12; -const byte lightmagenta = 13; -const byte yellow = 14; -const byte white = 15; +enum Color { + kColorBlack, + kColorBlue, + kColorGreen, + kColorCyan, + kColorRed, + kColorMagenta, + kColorBrown, + kColorLightgray, + kColorDarkgray, + kColorLightblue, + kColorLightgreen, + kColorLightcyan, + kColorLightred, + kColorLightmagenta, + kColorYellow, + kColorWhite +}; } // End of namespace Avalanche diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp index d15bebb0d0..d54e667328 100644 --- a/engines/avalanche/dropdown2.cpp +++ b/engines/avalanche/dropdown2.cpp @@ -318,11 +318,11 @@ void Dropdown::drawMenuText(int16 x, int16 y, char trigger, Common::String text, byte fontColor; byte backgroundColor; if (highlighted) { - fontColor = white; - backgroundColor = black; + fontColor = kColorWhite; + backgroundColor = kColorBlack; } else { - fontColor = black; - backgroundColor = lightgray; + fontColor = kColorBlack; + backgroundColor = kColorLightgray; } byte ander; diff --git a/engines/avalanche/dropdown2.h b/engines/avalanche/dropdown2.h index ad9dc77501..4122d3fae4 100644 --- a/engines/avalanche/dropdown2.h +++ b/engines/avalanche/dropdown2.h @@ -133,12 +133,12 @@ private: static const byte kIndent = 5; static const byte kSpacing = 10; - static const byte kMenuBackgroundColor = lightgray; - static const byte kMenuFontColor = black; - static const byte kMenuBorderColor = black; - static const byte kHighlightBackgroundColor = black; - static const byte kHighlightFontColor = white; - static const byte kDisabledColor = darkgray; + static const byte kMenuBackgroundColor = kColorLightgray; + static const byte kMenuFontColor = kColorBlack; + static const byte kMenuBorderColor = kColorBlack; + static const byte kHighlightBackgroundColor = kColorBlack; + static const byte kHighlightFontColor = kColorWhite; + static const byte kDisabledColor = kColorDarkgray; AvalancheEngine *_vm; diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp index aa28f20031..58a38c73c0 100644 --- a/engines/avalanche/gyro2.cpp +++ b/engines/avalanche/gyro2.cpp @@ -164,22 +164,22 @@ const int32 Gyro::catamap[8][8] = { const char Gyro::spludwick_order[3] = {onion, ink, mushroom}; const quasiped_type Gyro::quasipeds[16] = { - {2, lightgray, 19, brown, pdogfood}, // A: Dogfood (screen 19). - {3, green, 19, white, pibythneth}, // B: Ibythneth (screen 19). - {3, white, 1, magenta, parkata}, // C: Arkata (screen 1). - {3, black, 23, red, 177}, // D: Hawk (screen 23). - {3, lightgreen, 50, brown, ptrader}, // E: Trader (screen 50). - {6, yellow, 42, red, pavalot}, // F: Avvy, tied up (scr.42) - {2, blue, 16, white, payles}, // G: Ayles (screen 16). - {2, brown, 7, white, pjacques}, // H: Jacques (screen 7). - {2, lightgreen, 47, green, pspurge}, // I: Spurge (screen 47). - {3, yellow, 47, red, pavalot}, // J: Avalot (screen 47). - {2, lightgray, 23, black, pdulustie}, // K: du Lustie (screen 23). - {2, yellow, 27, red, pavalot}, // L: Avalot (screen 27). - {3, white, 27, red, 177}, // M: Avaroid (screen 27). - {4, lightgray, 19, darkgray, pmalagauche}, // N: Malagauche (screen 19). - {5, lightmagenta, 47, red, pport}, // O: Port (screen 47). - {2, lightgreen, 51, darkgray, pdrduck} // P: Duck (screen 51). + {2, kColorLightgray, 19, kColorBrown, pdogfood}, // A: Dogfood (screen 19). + {3, kColorGreen, 19, kColorWhite, pibythneth}, // B: Ibythneth (screen 19). + {3, kColorWhite, 1, kColorMagenta, parkata}, // C: Arkata (screen 1). + {3, kColorBlack, 23, kColorRed, 177}, // D: Hawk (screen 23). + {3, kColorLightgreen, 50, kColorBrown, ptrader}, // E: Trader (screen 50). + {6, kColorYellow, 42, kColorRed, pavalot}, // F: Avvy, tied up (scr.42) + {2, kColorBlue, 16, kColorWhite, payles}, // G: Ayles (screen 16). + {2, kColorBrown, 7, kColorWhite, pjacques}, // H: Jacques (screen 7). + {2, kColorLightgreen, 47, kColorGreen, pspurge}, // I: Spurge (screen 47). + {3, kColorYellow, 47, kColorRed, pavalot}, // J: Avalot (screen 47). + {2, kColorLightgray, 23, kColorBlack, pdulustie}, // K: du Lustie (screen 23). + {2, kColorYellow, 27, kColorRed, pavalot}, // L: Avalot (screen 27). + {3, kColorWhite, 27, kColorRed, 177}, // M: Avaroid (screen 27). + {4, kColorLightgray, 19, kColorDarkgray, pmalagauche}, // N: Malagauche (screen 19). + {5, kColorLightmagenta, 47, kColorRed, pport}, // O: Port (screen 47). + {2, kColorLightgreen, 51, kColorDarkgray, pdrduck} // P: Duck (screen 51). }; const char Gyro::keys[] = "QWERTYUIOP[]"; diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index e7ef5a1df5..fe604cc70a 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -446,7 +446,7 @@ void Lucerna::enterroom(byte x, byte ped) { if (_vm->_gyro->dna.geida_follows) put_geida_at(5, ped); if (_vm->_gyro->dna.cwytalot_gone) { - _vm->_gyro->magics[lightred - 1].op = _vm->_gyro->nix; + _vm->_gyro->magics[kColorLightred - 1].op = _vm->_gyro->nix; _vm->_gyro->whereis[_vm->_gyro->pcwytalot - 150] = r__nowhere; } else { if (ped > 0) { @@ -486,7 +486,7 @@ void Lucerna::enterroom(byte x, byte ped) { if (_vm->_gyro->dna.drawbridge_open == 4) { // open _vm->_celer->drawBackgroundSprite(-1, -1, 3); // Position of drawbridge _vm->_graphics->refreshBackground(); - _vm->_gyro->magics[green - 1].op = _vm->_gyro->nix; // You may enter the drawbridge. + _vm->_gyro->magics[kColorGreen - 1].op = _vm->_gyro->nix; // You may enter the drawbridge. } if (_vm->_gyro->dna.geida_follows) put_geida_at(ped + 3, ped); // load Geida @@ -628,7 +628,7 @@ void Lucerna::enterroom(byte x, byte ped) { _vm->_celer->drawBackgroundSprite(-1, -1, 2); _vm->_graphics->refreshBackground(); _vm->_celer->drawBackgroundSprite(-1, -1, 4); - _vm->_gyro->magics[brown - 1].op = _vm->_gyro->nix; + _vm->_gyro->magics[kColorBrown - 1].op = _vm->_gyro->nix; _vm->_gyro->whereis[_vm->_gyro->pjacques - 150] = 0; } if (ped != 0) { @@ -960,34 +960,34 @@ void Lucerna::mouseway(const Common::Point &cursorPos) { byte col = *(byte *)_vm->_graphics->_surface.getBasePtr(cursorPos.x, cursorPos.y / 2); switch (col) { - case green: { + case kColorGreen: { _vm->_gyro->dna.rw = _vm->_trip->up; _vm->_trip->rwsp(0, _vm->_trip->up); showrw(); } break; - case brown: { + case kColorBrown: { _vm->_gyro->dna.rw = _vm->_trip->down; _vm->_trip->rwsp(0, _vm->_trip->down); showrw(); } break; - case cyan: { + case kColorCyan: { _vm->_gyro->dna.rw = _vm->_trip->left; _vm->_trip->rwsp(0, _vm->_trip->left); showrw(); } break; - case lightmagenta: { + case kColorLightmagenta: { _vm->_gyro->dna.rw = _vm->_trip->right; _vm->_trip->rwsp(0, _vm->_trip->right); showrw(); } break; - case red: - case white: - case lightcyan: - case yellow: { // Fall-throughs are intended. + case kColorRed: + case kColorWhite: + case kColorLightcyan: + case kColorYellow: { // Fall-throughs are intended. _vm->_trip->stopwalking(); showrw(); } @@ -1243,15 +1243,15 @@ void Lucerna::refresh_hands() { void Lucerna::plothands() { // off; //setactivepage(3); - calchand(_vm->_gyro->onh, 14, ah, yellow); - calchand(_vm->_gyro->om * 6, 17, am, yellow); - hand(ah, brown); - hand(am, brown); - - calchand(nh, 14, ah, brown); - calchand(_vm->_gyro->minutes * 6, 17, am, brown); - hand(ah, yellow); - hand(am, yellow); + calchand(_vm->_gyro->onh, 14, ah, kColorYellow); + calchand(_vm->_gyro->om * 6, 17, am, kColorYellow); + hand(ah, kColorBrown); + hand(am, kColorBrown); + + calchand(nh, 14, ah, kColorBrown); + calchand(_vm->_gyro->minutes * 6, 17, am, kColorBrown); + hand(ah, kColorYellow); + hand(am, kColorYellow); //setactivepage(1 - cp); diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index fc705abcd5..c45ddf9699 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -113,9 +113,9 @@ void Parser::plotText() { cursorOff(); - _vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), black); // Black out the line of the text. + _vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), kColorBlack); // Black out the line of the text. - _vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->characters, 8, 24, 161, white); + _vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->characters, 8, 24, 161, kColorWhite); cursorOn(); CursorMan.showMouse(true); @@ -149,7 +149,7 @@ int16 Parser::pos(const Common::String &crit, const Common::String &src) { void Parser::drawCursor() { // Draw the '_' character. for (byte bit = 0; bit < 8; bit++) - *(byte *)_vm->_graphics->_surface.getBasePtr(24 + _inputTextPos * 8 + 7 - bit, 168) = white; + *(byte *)_vm->_graphics->_surface.getBasePtr(24 + _inputTextPos * 8 + 7 - bit, 168) = kColorWhite; bytefield bf; bf.x1 = _inputTextPos + 1; @@ -166,7 +166,7 @@ void Parser::wipeText() { cursorOff(); - _vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), black); // Black out the line of the text. + _vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), kColorBlack); // Black out the line of the text. _quote = true; _inputTextPos = 0; diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp index 62b8b5e215..147bc21fe7 100644 --- a/engines/avalanche/scrolls2.cpp +++ b/engines/avalanche/scrolls2.cpp @@ -57,15 +57,15 @@ void Scrolls::state(byte x) { // Sets "Ready" light to whatever if (_vm->_gyro->ledstatus == x) return; // Already like that! - byte color = black; + byte color = kColorBlack; switch (x) { case 0: - color = black; + color = kColorBlack; break; // Off case 1: case 2: case 3: - color = green; + color = kColorGreen; break; // Hit a key } warning("STUB: Scrolls::state()"); @@ -107,7 +107,7 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { // Fancy FAST screenwrit // We have to draw the characters one-by-one because of the accidental font changes. i++; Common::String chr(z[xx]); - _vm->_graphics->drawText(_vm->_graphics->_scrolls, chr, itw, 12, (x - 1) * 8 + offset * 4 + i * 8, y, black); + _vm->_graphics->drawText(_vm->_graphics->_scrolls, chr, itw, 12, (x - 1) * 8 + offset * 4 + i * 8, y, kColorBlack); } } } @@ -353,29 +353,29 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t CursorMan.showMouse(false); // The right corners of the scroll. - _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, lightgray); - _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx + lx, my + ly, 270, 360, 15, lightgray); - _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, red); - _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my + ly, 270, 360, 15, red); + _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, kColorLightgray); + _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx + lx, my + ly, 270, 360, 15, kColorLightgray); + _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, kColorRed); + _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my + ly, 270, 360, 15, kColorRed); // The body of the scroll. - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly, mx + lx, my + ly + 6), lightgray); - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly + 1), lightgray); - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx + lx + 15, my + ly + 1), lightgray); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly, mx + lx, my + ly + 6), kColorLightgray); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly + 1), kColorLightgray); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx + lx + 15, my + ly + 1), kColorLightgray); // The left corners of the scroll. - _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx - lx - 31, my - ly, 0, 180, 15, darkgray); - _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my - ly, 0, 180, 15, red); - _vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my - ly, mx - lx - 31 + 15, my - ly, red); - _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx - lx - 31, my + ly, 180, 360, 15, darkgray); - _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my + ly, 180, 360, 15, red); - _vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my + ly, mx - lx - 31 + 15, my + ly, red); + _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx - lx - 31, my - ly, 0, 180, 15, kColorDarkgray); + _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my - ly, 0, 180, 15, kColorRed); + _vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my - ly, mx - lx - 31 + 15, my - ly, kColorRed); + _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx - lx - 31, my + ly, 180, 360, 15, kColorDarkgray); + _vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my + ly, 180, 360, 15, kColorRed); + _vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my + ly, mx - lx - 31 + 15, my + ly, kColorRed); // The rear borders of the scroll. - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly - 5), red); - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly + 6, mx + lx, my + ly + 7), red); - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx - lx - 14, my + ly), red); - _vm->_graphics->_scrolls.fillRect(Common::Rect(mx + lx + 15, my - ly, mx + lx + 16, my + ly), red); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly - 5), kColorRed); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly + 6, mx + lx, my + ly + 7), kColorRed); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx - lx - 14, my + ly), kColorRed); + _vm->_graphics->_scrolls.fillRect(Common::Rect(mx + lx + 15, my - ly, mx + lx + 16, my + ly), kColorRed); ex = mx - lx; // int16 ey = my - ly; diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index 2444d432e5..6a1aeddf01 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -1074,14 +1074,14 @@ void Trip::newspeed() { //setactivepage(3); if (tr[0].xs == _vm->_gyro->run) - _vm->_graphics->_surface.drawLine(371, 199, 373, 199, yellow); + _vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorYellow); else - _vm->_graphics->_surface.drawLine(336, 199, 338, 199, yellow); + _vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorYellow); if (tr[0].xs == _vm->_gyro->run) - _vm->_graphics->_surface.drawLine(336, 199, 338, 199, lightblue); + _vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorLightblue); else - _vm->_graphics->_surface.drawLine(371, 199, 373, 199, lightblue); + _vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorLightblue); //setactivepage(1 - cp); |