Added struct for OW Bonk Prize data table

This commit is contained in:
codemann8
2022-07-28 18:53:01 -05:00
parent 6f58eb7c2c
commit 324014bb54
2 changed files with 125 additions and 91 deletions

View File

@@ -1311,6 +1311,47 @@ db 0, 0, 0, 0, 0, 0, 0, 0
db 0, 0
;================================================================================
; Bonk Prize Data ($AABB00 - $AABBF5)
;--------------------------------------------------------------------------------
; This table stores data relating to bonk locations for Bonk Drop Shuffle
;
; Example: We can use OWBonkPrizeTable[$09].loot to read what item is in the
; east tree on the Sanctuary screen
;--------------------------------------------------------------------------------
; Search Criteria - The following two fields are used as a unique index
; .owid = OW screen ID
; .yx = Y & X coordinate data *see below*
;
; .flag = OW event flag bitmask
; .loot = Loot ID
; .mw_player = Multiworld player ID
; .vert_offset = Vertical offset, # of pixels the sprite moves up when activated
;
; .yx field is a combination of both the least significant digits of the Y and X
; coordinates of the static location of the sprite located in a bonk location.
; All sprites, when initialized, are aligned by a 16 pixel increment.
; The coordinate system in LTTP is handled by two bytes:
; (high) (low)
; - - - w w w w s s s s s s s s s
; w = world absolute coords, every screen is $200 pixels in each dimension
; s = local screen coords, coords relative to the bounds of the current screen
; Because of the 16 pixel alignment of sprites, the last four bits of the coords
; are unset. This leaves 5 bits remaining, we simply disregard the highest bit
; and then combine the Y and X coords together to be used as search criteria.
; This does open the possibility of a false positive match from 3 other coords
; on the same screen (15 on megatile screens) but there are no bonk sprites that
; have collision in this regard.
;--------------------------------------------------------------------------------
struct OWBonkPrizeTable $AABB00
.owid: skip 1
.yx: skip 1
.flag: skip 1
.loot: skip 1
.mw_player: skip 1
.vert_offset: skip 1
endstruct align 6
org $aabb00 ;PC 153b00
OWBonkPrizeData:
; OWID YX Flag Item MW Offset