diff options
author | Paul Gilbert | 2007-02-26 02:46:32 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-02-26 02:46:32 +0000 |
commit | 04159e06227f2ef67535e72e574663ab486d14a8 (patch) | |
tree | 9fae6029d57b73ce1ae56b52c94d35e3ac6ed966 | |
parent | ca597dbf50bbc5c43a07f306e2407dd314411077 (diff) | |
download | scummvm-rg350-04159e06227f2ef67535e72e574663ab486d14a8.tar.gz scummvm-rg350-04159e06227f2ef67535e72e574663ab486d14a8.tar.bz2 scummvm-rg350-04159e06227f2ef67535e72e574663ab486d14a8.zip |
Added extra talk records needed by NPC opcode 29, which lets the script engine override an NPC's current talk record
svn-id: r25873
-rw-r--r-- | tools/create_lure/create_lure_dat.cpp | 11 | ||||
-rw-r--r-- | tools/create_lure/create_lure_dat.h | 3 | ||||
-rw-r--r-- | tools/create_lure/process_actions.cpp | 10 |
3 files changed, 10 insertions, 14 deletions
diff --git a/tools/create_lure/create_lure_dat.cpp b/tools/create_lure/create_lure_dat.cpp index 1a3da38932..93c3cfc564 100644 --- a/tools/create_lure/create_lure_dat.cpp +++ b/tools/create_lure/create_lure_dat.cpp @@ -910,12 +910,6 @@ void read_room_exit_hotspots_data(byte *&data, uint16 &totalSize) { totalSize += sizeof(uint16); } -void read_ratpouch_schedules(byte *&data, uint16 &totalSize) { - // TODO: Parse out the schedules Ratpouch has for each room - data = (byte *) malloc(1); - totalSize = 1; -} - #define NUM_TEXT_ENTRIES 40 const char *text_strings[NUM_TEXT_ENTRIES] = { "Get", NULL, "Push", "Pull", "Operate", "Open", "Close", "Lock", "Unlock", "Use", @@ -1063,11 +1057,6 @@ void getEntry(uint8 entryIndex, uint16 &resourceId, byte *&data, uint16 &size) break; case 21: - // Read in Ratpouch's room specific schedules - read_ratpouch_schedules(data, size); - break; - - case 22: // Set up the list of text strings used by the game save_text_strings(data, size); break; diff --git a/tools/create_lure/create_lure_dat.h b/tools/create_lure/create_lure_dat.h index 6ee6c3e08d..e4384b5238 100644 --- a/tools/create_lure/create_lure_dat.h +++ b/tools/create_lure/create_lure_dat.h @@ -27,7 +27,7 @@ #include "common/endian.h" #define VERSION_MAJOR 1 -#define VERSION_MINOR 14 +#define VERSION_MINOR 15 #define ENGLISH_LURE #define DATA_SEGMENT 0xac50 @@ -404,5 +404,6 @@ public: }; extern File lure_exe; +extern void add_talk_offset(uint16 offset); #endif diff --git a/tools/create_lure/process_actions.cpp b/tools/create_lure/process_actions.cpp index 7c99de187c..114d96f594 100644 --- a/tools/create_lure/process_actions.cpp +++ b/tools/create_lure/process_actions.cpp @@ -29,7 +29,7 @@ enum Action { UNLOCK = 9, USE = 10, GIVE = 11, TALK_TO = 12, TELL = 13, BUY = 14, LOOK = 15, LOOK_AT = 16, LOOK_THROUGH = 17, ASK = 18, DRINK = 20, STATUS = 21, GO_TO = 22, RETURN = 23, BRIBE = 24, EXAMINE = 25, - NPC_SET_ROOM_AND_BLOCKED_OFFSET = 28, NPC_UNKNOWN1 = 29, NPC_EXEC_SCRIPT = 30, + NPC_SET_ROOM_AND_BLOCKED_OFFSET = 28, NPC_HEY_SIR = 29, NPC_EXEC_SCRIPT = 30, NPC_UNKNOWN2 = 31, NPC_SET_RAND_DEST = 32, NPC_WALKING_CHECK = 33, NPC_SET_SUPPORT_OFFSET = 34, NPC_SUPPORT_OFFSET_COND = 35, NPC_DISPATCH_ACTION = 36, NPC_UNKNOWN3 = 37, NPC_UNKNOWN4 = 38, @@ -70,7 +70,6 @@ uint16 numSupportEntries = 0; #define FORWARD_JUMP_ALLOWANCE 0x30 - uint16 get_sequence_index(uint16 offset, int supportIndex) { int index; @@ -207,6 +206,13 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain } break; + case NPC_HEY_SIR: + // The 'Hey Sir' opcode causes the NPC to request your attention, and sets the active talk + // record to a designated offset. So any offset occurances need to be saved so that it can + // be included in the resource for talk records + add_talk_offset(params[0]); + break; + default: break; } |