From 05301c240b3ccc195c533cf7a2eddde683ee7d06 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 11 Jun 2019 00:47:42 +0300 Subject: STARTREK: Load more messages from RDF files The whole Demon chapter has been converted to the new logic. The offsets for the extra room messages have been hardcoded, for now, inside loadOtherRoomMessages(), until we figure out how they are referenced. --- engines/startrek/room.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines/startrek/room.h') diff --git a/engines/startrek/room.h b/engines/startrek/room.h index 8f39b6b33e..a5bf463ff3 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -143,8 +143,6 @@ public: */ Common::Point getSpawnPosition(int crewmanIndex); - int showText(TextRef speaker, TextRef text, bool fromRDF = false); - public: byte *_rdfData; @@ -155,11 +153,15 @@ private: const RoomAction *_roomActionList; int _numRoomActions; + Common::String _rdfName; int _roomIndex; // ie. for DEMON2, this is 2 Common::HashMap _lookMessages; + Common::HashMap _lookWithTalkerMessages; Common::HashMap _talkMessages; void loadRoomMessages(); + void loadOtherRoomMessages(); + void loadRoomMessage(const char *text); int findFunctionPointer(int action, void (Room::*funcPtr)()); @@ -186,8 +188,10 @@ private: * Cmd 0x03 */ int showRoomSpecificText(const char **textAddr); - int showText(const TextRef *text, bool fromRDF = false); - int showText(TextRef text, bool fromRDF = false); + int showText(const TextRef *text, bool fromRDF = false, bool lookWithTalker = false); + int showText(TextRef text, bool fromRDF = false, bool lookWithTalker = false); + int showText(TextRef speaker, TextRef text, bool fromRDF = false, bool lookWithTalker = false); + /** * Cmd 0x04 */ -- cgit v1.2.3