diff options
author | Filippos Karapetis | 2008-05-30 10:21:29 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-05-30 10:21:29 +0000 |
commit | d0b396f062890f1904229a5085221faf549c7c94 (patch) | |
tree | 3f7f8ada719255fbfda38c5f8908edbe0971c019 | |
parent | d261c93049b9d14f4c8e70242229368f9f8eae00 (diff) | |
download | scummvm-rg350-d0b396f062890f1904229a5085221faf549c7c94.tar.gz scummvm-rg350-d0b396f062890f1904229a5085221faf549c7c94.tar.bz2 scummvm-rg350-d0b396f062890f1904229a5085221faf549c7c94.zip |
Moved SSN frame definitions into their own enum and removed unused definitions for the escape and F1-F10 keys
svn-id: r32391
-rw-r--r-- | engines/drascula/drascula.cpp | 15 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 28 |
2 files changed, 18 insertions, 25 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 6eee9ec8b7..ab47e31bca 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -3240,7 +3240,7 @@ void DrasculaEngine::enterName() { select2[v] = key; else if (key == Common::KEYCODE_SPACE) select2[v] = '\167'; - else if (key == ESC) + else if (key == Common::KEYCODE_ESCAPE) break; else if (key == Common::KEYCODE_RETURN) { select2[v] = '\0'; @@ -3297,8 +3297,9 @@ int DrasculaEngine::playFrameSSN() { memcpy(&CHUNK, mSession, 1); mSession += 1; } + switch (CHUNK) { - case SET_PAL: + case kFrameSetPal: if (!UsingMem) _Session->read(dacSSN, 768); else { @@ -3307,10 +3308,10 @@ int DrasculaEngine::playFrameSSN() { } set_dacSSN(dacSSN); break; - case EMPTY_FRAME: + case kFrameEmptyFrame: WaitFrameSSN(); break; - case INIT_FRAME: + case kFrameInit: if (!UsingMem) { _Session->read(&CMP, 1); _Session->read(&Lengt, 4); @@ -3320,7 +3321,7 @@ int DrasculaEngine::playFrameSSN() { memcpy(&Lengt, mSession, 4); mSession += 4; } - if (CMP == CMP_RLE) { + if (CMP == kFrameCmpRle) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); _Session->read(BufferSSN, Lengt); @@ -3343,7 +3344,7 @@ int DrasculaEngine::playFrameSSN() { _system->updateScreen(); FrameSSN++; } else { - if (CMP == CMP_OFF) { + if (CMP == kFrameCmpOff) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); _Session->read(BufferSSN, Lengt); @@ -3368,7 +3369,7 @@ int DrasculaEngine::playFrameSSN() { } } break; - case END_ANIM: + case kFrameEndAnim: Exit = 1; break; default: diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 5a43d5702e..f6696ff820 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -80,6 +80,16 @@ enum Colors { kColorPink = 11 }; +enum SSNFrames { + kFrameInit = 0, + kFrameCmpRle = 1, + kFrameCmpOff = 2, + kFrameEndAnim = 3, + kFrameSetPal = 4, + kFrameMouseKey = 5, // unused + kFrameEmptyFrame = 6 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -87,16 +97,6 @@ struct RoomTalkAction; #define NUM_SAVES 10 #define NUM_FLAGS 50 -#define ESC 0x01 -#define F1 0x3B -#define F2 0x3C -#define F3 0x3D -#define F4 0x3E -#define F5 0x3F -#define F6 0x40 -#define F8 0x42 -#define F9 0x43 -#define F10 0x44 #define DIF_MASK 55 #define OBJWIDTH 40 #define OBJHEIGHT 25 @@ -200,14 +200,6 @@ struct RoomTalkAction; #define X_N0_OPC 213 #define NO_DOOR 99 -#define INIT_FRAME 0 -#define CMP_RLE 1 -#define CMP_OFF 2 -#define END_ANIM 3 -#define SET_PAL 4 -#define MOUSE_KEY 5 -#define EMPTY_FRAME 6 - #define COMPLETE_PAL 256 #define HALF_PAL 128 |