diff options
author | Filippos Karapetis | 2008-05-30 07:16:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-05-30 07:16:17 +0000 |
commit | eb28418d4b2c6a3a96c2ecbf87325bfd45f6d7ba (patch) | |
tree | d7f05d6b62808eb4cd5645dd4d1821b2d90ac76b /engines/drascula | |
parent | 8aa1b04043b7fb60dbe4ef826217293995ee2258 (diff) | |
download | scummvm-rg350-eb28418d4b2c6a3a96c2ecbf87325bfd45f6d7ba.tar.gz scummvm-rg350-eb28418d4b2c6a3a96c2ecbf87325bfd45f6d7ba.tar.bz2 scummvm-rg350-eb28418d4b2c6a3a96c2ecbf87325bfd45f6d7ba.zip |
Changed color defines to more meaningful names in an enum
svn-id: r32375
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/animation.cpp | 18 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 48 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 25 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 10 | ||||
-rw-r--r-- | engines/drascula/talk.cpp | 54 |
5 files changed, 79 insertions, 76 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 6f2bc1bc2d..7cff21047b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -64,7 +64,7 @@ void DrasculaEngine::animation_1_1() { delay(900); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_abc(RED); + color_abc(kColorRed); centerText(_textmisc[_lang][1], 160, 100); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -201,7 +201,7 @@ void DrasculaEngine::animation_1_1() { if (anima("lib2.bin", 16)) break; clearRoom(); - color_solo = RED; + color_solo = kColorRed; loadPic("plan1.alg"); decompressPic(screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -384,7 +384,7 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); if (hay_sb == 1) { sku = new Common::File; @@ -479,7 +479,7 @@ void DrasculaEngine::animation_2_1() { stopMusic(); musicStopped = 1; memset(screenSurface, 0, 64000); - color_solo = WHITE; + color_solo = kColorWhite; pause(80); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -497,7 +497,7 @@ void DrasculaEngine::animation_2_1() { fadeFromBlack(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_solo = YELLOW; + color_solo = kColorYellow; talk_solo(_text[_lang][214], "214.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -581,7 +581,7 @@ void DrasculaEngine::animation_2_1() { talk_solo(_text[_lang][223], "223.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_solo = WHITE; + color_solo = kColorWhite; updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -1001,7 +1001,7 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang != kSpanish) - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); loadPic("his1.alg"); decompressPic(drawSurface1, HALF_PAL); @@ -2446,7 +2446,7 @@ void DrasculaEngine::animation_9_6() { clearRoom(); loadPic("nota.alg"); decompressPic(drawSurface1, COMPLETE_PAL); - color_abc(WHITE); + color_abc(kColorWhite); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); talk_solo(_textbj[_lang][26], "bj26.als"); @@ -2467,7 +2467,7 @@ void DrasculaEngine::animation_9_6() { updateRoom(); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadPic("nota2.alg"); decompressPic(drawSurface1, 1); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0893cb34bb..26ab9590c3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1073,7 +1073,7 @@ martini: changeColor = -1; if (num_ejec == 2) - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); if (num_ejec != 2) { for (l = 0; l <= suelo_y1; l++) @@ -1217,10 +1217,10 @@ void DrasculaEngine::moveCursor() { updateRefresh(); if (!strcmp(textName, "hacker") && hasName == 1) { - if (_color != RED && menuScreen == 0) - color_abc(RED); - } else if (menuScreen == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (_color != kColorRed && menuScreen == 0) + color_abc(kColorRed); + } else if (menuScreen == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); if (hasName == 1 && menuScreen == 0) centerText(textName, mouseX, mouseY); if (menuScreen == 1) @@ -1524,7 +1524,7 @@ bool DrasculaEngine::saves() { loadPic("savescr.alg"); decompressPic(drawSurface1, HALF_PAL); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); for (;;) { y = 27; @@ -1764,7 +1764,7 @@ void DrasculaEngine::delay(int ms) { bool DrasculaEngine::confirma_salir() { byte key; - color_abc(RED); + color_abc(kColorRed); updateRoom(); centerText(_textsys[_lang][1], 160, 87); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -3815,7 +3815,7 @@ void DrasculaEngine::converse(const char *nom_fich) { // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); bucle_opc: @@ -3835,22 +3835,22 @@ bucle_opc: updateEvents(); if (mouseY > 0 && mouseY < 9) { - if (used1 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used1 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used1 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used1 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); } else if (mouseY > 8 && mouseY < 17) { - if (used2 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used2 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used2 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used2 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); } else if (mouseY > 16 && mouseY < 25) { - if (used3 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used3 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); - } else if (_color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used3 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used3 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (_color != kColorLightGreen) + color_abc(kColorLightGreen); if (mouseY > 0 && mouseY < 9) game1 = 2; @@ -3900,7 +3900,7 @@ bucle_opc: if (button_izq == 1) { delay(100); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); } game1 = (used1 == 0) ? 1 : 3; @@ -4411,7 +4411,7 @@ void DrasculaEngine::showMap() { void DrasculaEngine::grr() { int length = 30; - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); if (hay_sb == 1) { sku = new Common::File; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 15382aafcf..fd1e55faec 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -66,6 +66,20 @@ enum Verbs { kVerbMove = 6 }; +enum Colors { + kColorBrown = 1, + kColorDarkBlue = 2, + kColorLightGreen = 3, + kColorDarkGreen = 4, + kColorYellow = 5, + kColorOrange = 6, + kColorRed = 7, + kColorMaroon = 8, + kColorPurple = 9, + kColorWhite = 10, + kColorPink = 11 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -135,17 +149,6 @@ struct RoomTalkAction; #define SPACE 250 #define ALTO_TALK_HARE 25 #define ANCHO_TALK_HARE 23 -#define VON_BRAUN 1 -#define DARK_BLUE 2 -#define LIGHT_GREEN 3 -#define DARK_GREEN 4 -#define YELLOW 5 -#define ORANGE 6 -#define RED 7 -#define MAROON 8 -#define PURPLE 9 -#define WHITE 10 -#define PINK 11 #define PASO_HARE_X 8 #define PASO_HARE_Y 3 #define CHARACTER_HEIGHT 70 diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 2553e34296..ede8e99f66 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1179,19 +1179,19 @@ void DrasculaEngine::room_59(int fl) { decompressPic(backSurface, 1); talk_htel(_text[_lang][240], "240.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][58], "VB58.als"); talk_htel(_text[_lang][241], "241.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][59], "VB59.als"); talk_htel(_text[_lang][242], "242.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][60], "VB60.als"); talk_htel(_text[_lang][196], "196.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][61],"VB61.als"); talk_htel(_text[_lang][244], "244.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); loadPic("aux59.alg"); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index afd2988162..81341a3153 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -53,7 +53,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -115,7 +115,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -183,7 +183,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -249,7 +249,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { if (num_ejec == 1) color_abc(color_solo); else if (num_ejec == 4) - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -297,7 +297,7 @@ void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -368,7 +368,7 @@ void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -430,7 +430,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -523,10 +523,10 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (num_ejec == 4) { if (roomNumber == 24 || flags[29] == 0) { - color_abc(YELLOW); + color_abc(kColorYellow); } } else { - color_abc(YELLOW); + color_abc(kColorYellow); } talkInit(filename); @@ -636,7 +636,7 @@ void DrasculaEngine::talk_pianista(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -701,7 +701,7 @@ bebiendo: goto bebiendo; } - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); talkInit(filename); @@ -770,7 +770,7 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talkInit(filename); @@ -829,7 +829,7 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talkInit(filename); @@ -867,7 +867,7 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch int pos_blind[6]; int length = strlen(said); - color_abc(VON_BRAUN); + color_abc(kColorBrown); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -940,7 +940,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -974,7 +974,7 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -1023,7 +1023,7 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1078,7 +1078,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1131,7 +1131,7 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1182,7 +1182,7 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -1237,7 +1237,7 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1287,7 +1287,7 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1340,7 +1340,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha int p, cara = 0; int length = strlen(said); - color_abc(YELLOW); + color_abc(kColorYellow); if (num_ejec == 1) { if (factor_red[hare_y + alto_hare] == 100) @@ -1455,7 +1455,7 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { cara_antes = flags[19]; - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -1501,7 +1501,7 @@ void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1538,7 +1538,7 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1587,7 +1587,7 @@ void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); |