Jump to content

Incorrect Container Type


Smoketest

Recommended Posts

Added. Nonvisible containers still have a sound that sounds like a drawer opening, so I went with corpse types. Planar sphere had a bag icon for its corpse container.

 

// incorrect container icon
COPY_EXISTING ~ar0201.are~ ~override~
 READ_LONG  0x70 "cont_off"
 READ_SHORT 0x74 "cont_num"
 FOR (index = 0; index < cont_num; index = index + 1) BEGIN
READ_SHORT ("%cont_off%" + 0x20 + ("%index%" * 0xc0)) "x_coord"
READ_SHORT ("%cont_off%" + 0x22 + ("%index%" * 0xc0)) "y_coord"
PATCH_IF (("%x_coord%" = 1310) AND ("%y_coord%" = 1611)) BEGIN
  WRITE_SHORT ("%cont_off%" + 0x24 + ("%index%" * 0xc0)) 10 // body
  SET "index" = "%cont_num%" // kills loop
END
 END
 BUT_ONLY_IF_IT_CHANGES

// incorrect container icon
COPY_EXISTING ~ar0319.are~ ~override~
 READ_LONG  0x70 "cont_off"
 READ_SHORT 0x74 "cont_num"
 FOR (index = 0; index < cont_num; index = index + 1) BEGIN
READ_SHORT ("%cont_off%" + 0x20 + ("%index%" * 0xc0)) "x_coord"
READ_SHORT ("%cont_off%" + 0x22 + ("%index%" * 0xc0)) "y_coord"
PATCH_IF (("%x_coord%" = 477) AND ("%y_coord%" = 357)) BEGIN
  WRITE_SHORT ("%cont_off%" + 0x24 + ("%index%" * 0xc0)) 5 // table
  SET "index" = "%cont_num%" // kills loop
END
 END
 BUT_ONLY_IF_IT_CHANGES

// incorrect container icon
COPY_EXISTING ~ar0411.are~ ~override~
 READ_LONG  0x70 "cont_off"
 READ_SHORT 0x74 "cont_num"
 FOR (index = 0; index < cont_num; index = index + 1) BEGIN
READ_SHORT ("%cont_off%" + 0x20 + ("%index%" * 0xc0)) "x_coord"
READ_SHORT ("%cont_off%" + 0x22 + ("%index%" * 0xc0)) "y_coord"
PATCH_IF (("%x_coord%" = 2443) AND ("%y_coord%" = 642)) BEGIN
  WRITE_SHORT ("%cont_off%" + 0x24 + ("%index%" * 0xc0))  10 // body
  SET "index" = "%cont_num%" // kills loop
END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...