From b6fbe6ec4ef8ec17875b89d50fffd550ba94d787 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 22 Nov 2007 10:09:26 +0000 Subject: [PATCH] Changed animation constants to clarify standard indexes versus custom voice bubble Ids svn-id: r29603 --- engines/lure/hotspots.cpp | 18 ++++++++---------- engines/lure/luredefs.h | 9 +++++---- engines/lure/res.cpp | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 91142d077d5..e8e83019111 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -105,8 +105,6 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) { assert(character); Common::Language language = LureEngine::getReference().getLanguage(); - uint16 animId = 0x5810; - if (language == IT_ITA) animId = 0x58D0; _originalId = objType; _data = NULL; @@ -125,7 +123,7 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) { _skipFlag = false; switch (objType) { - case VOICE_ANIM_INDEX: + case VOICE_ANIM_IDX: _roomNumber = character->roomNumber(); _destHotspotId = character->hotspotId(); _startX = character->x() + character->talkX() + 12; @@ -143,11 +141,11 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) { _voiceCtr = 40; _tickHandler = HotspotTickHandlers::getHandler(VOICE_TICK_PROC_ID); - setAnimation(animId); + setAnimationIndex(VOICE_ANIM_INDEX); break; - case PUZZLED_ANIM_INDEX: - case EXCLAMATION_ANIM_INDEX: + case PUZZLED_ANIM_IDX: + case EXCLAMATION_ANIM_IDX: _roomNumber = character->roomNumber(); _hotspotId = 0xfffe; _startX = character->x() + character->talkX() + 12; @@ -163,8 +161,8 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) { _destHotspotId = character->hotspotId(); _tickHandler = HotspotTickHandlers::getHandler(PUZZLED_TICK_PROC_ID); - setAnimation(animId); - setFrameNumber(objType == PUZZLED_ANIM_INDEX ? 1 : 2); + setAnimation(VOICE_ANIM_INDEX); + setFrameNumber(objType == PUZZLED_ANIM_IDX ? 1 : 2); character->setFrameCtr(_voiceCtr); break; @@ -787,12 +785,12 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) { if (idVal == 0x76) { // Special code id for showing the puzzled talk bubble - hotspot = new Hotspot(this, PUZZLED_ANIM_INDEX); + hotspot = new Hotspot(this, PUZZLED_ANIM_IDX); res.addHotspot(hotspot); } else if (idVal == 0x120) { // Special code id for showing the exclamation talk bubble - hotspot = new Hotspot(this, EXCLAMATION_ANIM_INDEX); + hotspot = new Hotspot(this, EXCLAMATION_ANIM_IDX); res.addHotspot(hotspot); } else if (idVal >= 0x8000) { diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h index c873a38c369..40bc7121fca 100644 --- a/engines/lure/luredefs.h +++ b/engines/lure/luredefs.h @@ -34,7 +34,7 @@ namespace Lure { #define SUPPORT_FILENAME "lure.dat" #define LURE_DAT_MAJOR 1 -#define LURE_DAT_MINOR 24 +#define LURE_DAT_MINOR 25 #define LURE_DEBUG 1 @@ -286,13 +286,14 @@ enum CursorType {CURSOR_ARROW = 0, CURSOR_DISK = 1, CURSOR_TIME_START = 2, // Misc constants #define GENERAL_MAGIC_ID 42 -#define VOICE_ANIM_INDEX 1 -#define PUZZLED_ANIM_INDEX 2 -#define EXCLAMATION_ANIM_INDEX 3 +#define VOICE_ANIM_IDX 1 +#define PUZZLED_ANIM_IDX 2 +#define EXCLAMATION_ANIM_IDX 3 #define DEFAULT_VOLUME 192 // Animation record indexes #define PLAYER_FIGHT_ANIM_INDEX 10 +#define VOICE_ANIM_INDEX 20 #define BLACKSMITH_HAMMERING_ANIM_INDEX 21 #define EWAN_ANIM_INDEX 22 #define EWAN_ALT_ANIM_INDEX 23 diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 40d8c4cc3c4..eb68be75984 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -498,7 +498,7 @@ void Resources::setTalkingCharacter(uint16 id) { assert(character); // Add the special "voice" animation above the character - Hotspot *hotspot = new Hotspot(character, VOICE_ANIM_INDEX); + Hotspot *hotspot = new Hotspot(character, VOICE_ANIM_IDX); addHotspot(hotspot); } }