From f490db074b6a5d9cdfb59cdf0db796f73c8b6388 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 28 Sep 2007 07:58:11 +0000 Subject: Fix to correctly reset action sequence list between languages svn-id: r29116 --- tools/create_lure/process_actions.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/create_lure/process_actions.cpp b/tools/create_lure/process_actions.cpp index 0048f1a2a9..8541753943 100644 --- a/tools/create_lure/process_actions.cpp +++ b/tools/create_lure/process_actions.cpp @@ -94,7 +94,7 @@ uint16 get_sequence_index(uint16 offset, int supportIndex) { } } - for (index = 0; index <= numSupportEntries; ++index) { + for (index = 0; index < numSupportEntries; ++index) { SupportStructure &rec = supportList[index]; if ((rec.numInstructions > 0) && @@ -298,15 +298,16 @@ void process_entry(uint16 offset, byte *data, uint16 &totalSize) { supportList[numSupportEntries].offset = offset; supportList[numSupportEntries].numInstructions = 0; supportList[numSupportEntries].resourceOffset = totalSize; -//printf("process_entry index=%d, offset=%xh\n", numSupportEntries + 1, offset); - totalSize += process_action_sequence_entry(numSupportEntries, - data + totalSize, MAX_DATA_SIZE - totalSize); ++numSupportEntries; if (numSupportEntries == MAX_BUFFER_ENTRIES) { printf("Ran out of buffer space in processing NPC schedules\n"); exit(1); } + +//printf("process_entry index=%d, offset=%xh\n", numSupportEntries, offset); + totalSize += process_action_sequence_entry(numSupportEntries - 1, + data + totalSize, MAX_DATA_SIZE - totalSize); } } -- cgit v1.2.3