I'm currently working on a spawn point fix for Tutu. As part of it, I'm patching area files and removing the spawn point info (instead I'm simulating them via scripts) and found a bug with BUT_ONLY_IF_IT_CHANGES in v155. I also rolled back a version and confirmed this bug also exists in v154.
The following code will not patch the area file:
COPY_EXISTING ~FW2700.are~ ~override/FW2700.are~
READ_LONG 0x60 "spawnpt_offset"
READ_LONG 0x64 "spawnpt_num"
READ_LONG 0x68 "entrances_offset"
READ_LONG 0x70 "container_offset"
READ_LONG 0x78 "item_offset"
READ_LONG 0x7C "vertices_offset"
READ_LONG 0x84 "ambients_offset"
READ_LONG 0x88 "variables_offset"
READ_LONG 0xA0 "explored_offset"
READ_LONG 0xA8 "doors_offset"
READ_LONG 0xB0 "animations_offset"
READ_LONG 0xB8 "tiled_offset"
READ_LONG 0xBC "songs_offset"
READ_LONG 0xC0 "restspawn_offset"
READ_LONG 0xC4 "mapnote_offset"
DELETE_BYTES ("%spawnpt_offset%") ("%spawnpt_num%" * 0xC8)
WRITE_LONG 0x64 0
WRITE_LONG 0x68 ("%entrances_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0x70 ("%container_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0x78 ("%item_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0x7C ("%vertices_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0x84 ("%ambients_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0x88 ("%variables_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xA0 ("%explored_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xA8 ("%doors_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xB0 ("%animations_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xB8 ("%tiled_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xBC ("%songs_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xC0 ("%restspawn_offset%" - ("%spawnpt_num%" * 0xC8))
WRITE_LONG 0xC4 ("%mapnote_offset%" - ("%spawnpt_num%" * 0xC8))
BUT_ONLY_IF_IT_CHANGESas confirmed by the DEBUG file:
Copying and patching 1 file ... [./override/FW2700.are] loaded, 9748 bytes Not copying [FW2700.are] to [override/FW2700.are] because it did not change
A quick check with NI also confirms no changes to the file. However, if the BUT_ONLY_IF_IT_CHANGES line is commented out, the file is patched, confirmed by NI and the DEBUG file:
Copying and patching 1 file ... [./override/FW2700.are] loaded, 9748 bytes [override/FW2700.are] loaded, 9748 bytes [override/FW2700.are] backed up to [tutufix/backup/0/FW2700.are] Copied [FW2700.are] to [override/FW2700.are]
Edited by CamDawg, 06 May 2004 - 08:50 PM.






