From 5396cd5dedd039fa40b46ef0f86cd757de4de259 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 20:35:15 +0000 Subject: Cleanup svn-id: r32370 --- engines/drascula/drascula.cpp | 52 ++++++++++--------------------------------- 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3d80b28e6f..3faede05f6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1939,48 +1939,20 @@ void DrasculaEngine::FundeDelNegro(int VelocidadDeFundido) { void DrasculaEngine::color_abc(int cl) { _color = cl; - if (cl == 0) { - gamePalette[254][0] = 0; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0; - } else if (cl == 1) { - gamePalette[254][0] = 0x10; - gamePalette[254][1] = 0x3E; - gamePalette[254][2] = 0x28; - } else if (cl == 3) { - gamePalette[254][0] = 0x16; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x16; - } else if (cl == 4) { - gamePalette[254][0] = 0x9; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x12; - } else if (cl == 5) { - gamePalette[254][0] = 0x3F; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x15; - } else if (cl == 7) { - gamePalette[254][0] = 0x38; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0; - } else if (cl == 8) { - gamePalette[254][0] = 0x3F; - gamePalette[254][1] = 0x27; - gamePalette[254][2] = 0x0B; - } else if (cl == 9) { - gamePalette[254][0] = 0x2A; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0x2A; - } else if (cl == 10) { - gamePalette[254][0] = 0x30; - gamePalette[254][1] = 0x30; - gamePalette[254][2] = 0x30; - } else if (cl == 11) { - gamePalette[254][0] = 98; - gamePalette[254][1] = 91; - gamePalette[254][2] = 100; + char colorTable[][3] = { + { 0, 0, 0 }, { 0x10, 0x3E, 0x28 }, + { 0, 0, 0 }, // unused + { 0x16, 0x3F, 0x16 }, { 0x09, 0x3F, 0x12 }, + { 0x3F, 0x3F, 0x15 }, + { 0, 0, 0 }, // unused + { 0x38, 0, 0 }, { 0x3F, 0x27, 0x0B }, + { 0x2A, 0, 0x2A }, { 0x30, 0x30, 0x30 }, + { 98, 91, 100 } }; + for (int i = 0; i <= 2; i++) + gamePalette[254][i] = colorTable[cl][i]; + setPalette((byte *)&gamePalette); } -- cgit v1.2.3