aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorRobert Göffringmann2005-02-20 18:33:36 +0000
committerRobert Göffringmann2005-02-20 18:33:36 +0000
commitc81fa31a5cce9e6f153ed378b2efebce6390cd2a (patch)
treefbc84e3f3d8977873bbde7b320173b89437152ca /sky
parent807b33ec29797006dd13e4627102166344cc8901 (diff)
downloadscummvm-rg350-c81fa31a5cce9e6f153ed378b2efebce6390cd2a.tar.gz
scummvm-rg350-c81fa31a5cce9e6f153ed378b2efebce6390cd2a.tar.bz2
scummvm-rg350-c81fa31a5cce9e6f153ed378b2efebce6390cd2a.zip
fix missing speech animations. I introduced that bug when I moved the compacts out of the scummvm executable.
svn-id: r16828
Diffstat (limited to 'sky')
-rw-r--r--sky/compact.cpp5
-rw-r--r--sky/compact.h5
-rw-r--r--sky/control.cpp2
-rw-r--r--sky/logic.cpp7
4 files changed, 8 insertions, 11 deletions
diff --git a/sky/compact.cpp b/sky/compact.cpp
index 199e2a5462..de9b5c7b3b 100644
--- a/sky/compact.cpp
+++ b/sky/compact.cpp
@@ -288,10 +288,9 @@ uint16 *SkyCompact::getSub(Compact *cpt, uint16 mode) {
uint16 *SkyCompact::getGrafixPtr(Compact *cpt) {
uint16 *gfxBase = (uint16*)fetchCpt(cpt->grafixProgId);
- if ((gfxBase == NULL) && cpt->grafixProgPos) {
- debug(1, "SkyCompact::getGrafixPtr: got offset for null ptr");
+ if (gfxBase == NULL)
return NULL;
- }
+
return gfxBase + cpt->grafixProgPos;
}
diff --git a/sky/compact.h b/sky/compact.h
index 95d3d0dde2..972c7b60d1 100644
--- a/sky/compact.h
+++ b/sky/compact.h
@@ -33,7 +33,8 @@ enum CptIds {
CPT_FOSTER = 3,
CPT_MENU_BAR = 0x2E,
CPT_REICH_DOOR_20 = 0x30AB,
- CPT_MOVE_LIST = 0xBD //0x8000
+ CPT_MOVE_LIST = 0xBD,
+ CPT_TALK_TABLE_LIST = 0xBC
};
enum CptTypeIds {
@@ -47,8 +48,6 @@ enum CptTypeIds {
MAINLIST
};
-#define TALKTABLE_LIST_ID 0x7000
-
namespace Sky {
class SkyCompact {
diff --git a/sky/control.cpp b/sky/control.cpp
index 4dfc99c4b5..44230cdef5 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -1219,7 +1219,7 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems
else if (graphType == OG_COMPACT)
destCpt->grafixProgId = target;
else if (graphType == OG_TALKTABLE)
- destCpt->grafixProgId = TALKTABLE_LIST_ID | target;
+ destCpt->grafixProgId = ((uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST))[target];
else if (graphType == OG_COMPACTELEM)
destCpt->grafixProgId = *(uint16*)_skyCompact->getCompactElem(destCpt, target);
else
diff --git a/sky/logic.cpp b/sky/logic.cpp
index c764e3eb80..f384b17c29 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -2474,14 +2474,13 @@ bool Logic::fnPrintf(uint32 a, uint32 b, uint32 c) {
void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 base) {
- uint16 *animPtr;
-
animNum += target->megaSet / NEXT_MEGA_SET;
animNum &= 0xFF;
- target->grafixProgId = TALKTABLE_LIST_ID + animNum;
+ uint16 *talkTable = (uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST);
+ target->grafixProgId = talkTable[animNum];
target->grafixProgPos = 0;
- animPtr = _skyCompact->getGrafixPtr(target);
+ uint16 *animPtr = _skyCompact->getGrafixPtr(target);
if (animPtr) {
target->offset = *animPtr++;