diff --git a/Regions.py b/Regions.py index 9e6f18ac..435f7622 100644 --- a/Regions.py +++ b/Regions.py @@ -1284,32 +1284,32 @@ bonk_prize_table = { 'Kakariko Welcome Tree': (0x0d, 0x08, False, '', 'Kakariko Area', 'in a tree'), 'Forgotten Forest Southwest Tree': (0x0e, 0x10, False, '', 'Forgotten Forest Area', 'in a tree'), 'Forgotten Forest Central Tree': (0x0f, 0x08, False, '', 'Forgotten Forest Area', 'in a tree'), - #'Forgotten Forest Southeast Tree': (0x??, 0x04, False, '', 'Forgotten Forest Area', 'in a tree'), - 'Hyrule Castle Tree': (0x10, 0x10, False, '', 'Hyrule Castle Courtyard', 'in a tree'), - 'Wooden Bridge Tree': (0x11, 0x10, False, '', 'Wooden Bridge Area', 'in a tree'), - 'Eastern Palace Tree': (0x12, 0x10, True, '', 'Eastern Palace Area', 'in a tree'), - 'Flute Boy South Tree': (0x13, 0x10, True, '', 'Flute Boy Area', 'in a tree'), - 'Flute Boy East Tree': (0x14, 0x08, True, '', 'Flute Boy Area', 'in a tree'), - 'Central Bonk Rocks Tree': (0x15, 0x10, False, '', 'Central Bonk Rocks Area', 'in a tree'), - 'Tree Line Tree 2': (0x16, 0x10, True, '', 'Tree Line Area', 'in a tree'), - 'Tree Line Tree 4': (0x17, 0x08, True, '', 'Tree Line Area', 'in a tree'), - 'Flute Boy Approach South Tree': (0x18, 0x10, False, '', 'Flute Boy Approach Area', 'in a tree'), - 'Flute Boy Approach North Tree': (0x19, 0x08, False, '', 'Flute Boy Approach Area', 'in a tree'), - 'Dark Lumberjack Tree': (0x1a, 0x10, False, '', 'Dark Lumberjack Area', 'in a tree'), - 'Dark Fortune Bonk Rocks (Drop 1)': (0x1b, 0x10, False, '', 'Dark Fortune Area', 'encased in stone'), - 'Dark Fortune Bonk Rocks (Drop 2)': (0x1c, 0x08, False, '', 'Dark Fortune Area', 'encased in stone'), - 'Dark Graveyard West Bonk Rocks': (0x1d, 0x10, False, '', 'Dark Graveyard Area', 'encased in stone'), - 'Dark Graveyard North Bonk Rocks': (0x1e, 0x08, False, '', 'Dark Graveyard North', 'encased in stone'), - 'Dark Graveyard Tomb Bonk Rocks': (0x1f, 0x04, False, '', 'Dark Graveyard North', 'encased in stone'), - 'Qirn Jump West Tree': (0x20, 0x10, False, '', 'Qirn Jump Area', 'in a tree'), - 'Qirn Jump East Tree': (0x21, 0x08, False, '', 'Qirn Jump East Bank', 'in a tree'), - 'Dark Witch Tree': (0x22, 0x10, False, '', 'Dark Witch Area', 'in a tree'), - 'Pyramid Tree': (0x23, 0x10, False, '', 'Pyramid Area', 'in a tree'), - 'Palace of Darkness Tree': (0x24, 0x10, False, '', 'Palace of Darkness Area', 'in a tree'), - 'Dark Tree Line Tree 2': (0x25, 0x10, False, '', 'Dark Tree Line Area', 'in a tree'), - 'Dark Tree Line Tree 3': (0x26, 0x08, False, '', 'Dark Tree Line Area', 'in a tree'), - 'Dark Tree Line Tree 4': (0x27, 0x04, False, '', 'Dark Tree Line Area', 'in a tree'), - 'Hype Cave Statue': (0x28, 0x10, False, '', 'Hype Cave Area', 'encased in stone') + #'Forgotten Forest Southeast Tree': (0x10, 0x04, False, '', 'Forgotten Forest Area', 'in a tree'), + 'Hyrule Castle Tree': (0x11, 0x10, False, '', 'Hyrule Castle Courtyard', 'in a tree'), + 'Wooden Bridge Tree': (0x12, 0x10, False, '', 'Wooden Bridge Area', 'in a tree'), + 'Eastern Palace Tree': (0x13, 0x10, True, '', 'Eastern Palace Area', 'in a tree'), + 'Flute Boy South Tree': (0x14, 0x10, True, '', 'Flute Boy Area', 'in a tree'), + 'Flute Boy East Tree': (0x15, 0x08, True, '', 'Flute Boy Area', 'in a tree'), + 'Central Bonk Rocks Tree': (0x16, 0x10, False, '', 'Central Bonk Rocks Area', 'in a tree'), + 'Tree Line Tree 2': (0x17, 0x10, True, '', 'Tree Line Area', 'in a tree'), + 'Tree Line Tree 4': (0x18, 0x08, True, '', 'Tree Line Area', 'in a tree'), + 'Flute Boy Approach South Tree': (0x19, 0x10, False, '', 'Flute Boy Approach Area', 'in a tree'), + 'Flute Boy Approach North Tree': (0x1a, 0x08, False, '', 'Flute Boy Approach Area', 'in a tree'), + 'Dark Lumberjack Tree': (0x1b, 0x10, False, '', 'Dark Lumberjack Area', 'in a tree'), + 'Dark Fortune Bonk Rocks (Drop 1)': (0x1c, 0x10, False, '', 'Dark Fortune Area', 'encased in stone'), + 'Dark Fortune Bonk Rocks (Drop 2)': (0x1d, 0x08, False, '', 'Dark Fortune Area', 'encased in stone'), + 'Dark Graveyard West Bonk Rocks': (0x1e, 0x10, False, '', 'Dark Graveyard Area', 'encased in stone'), + 'Dark Graveyard North Bonk Rocks': (0x1f, 0x08, False, '', 'Dark Graveyard North', 'encased in stone'), + 'Dark Graveyard Tomb Bonk Rocks': (0x20, 0x04, False, '', 'Dark Graveyard North', 'encased in stone'), + 'Qirn Jump West Tree': (0x21, 0x10, False, '', 'Qirn Jump Area', 'in a tree'), + 'Qirn Jump East Tree': (0x22, 0x08, False, '', 'Qirn Jump East Bank', 'in a tree'), + 'Dark Witch Tree': (0x23, 0x10, False, '', 'Dark Witch Area', 'in a tree'), + 'Pyramid Tree': (0x24, 0x10, False, '', 'Pyramid Area', 'in a tree'), + 'Palace of Darkness Tree': (0x25, 0x10, False, '', 'Palace of Darkness Area', 'in a tree'), + 'Dark Tree Line Tree 2': (0x26, 0x10, False, '', 'Dark Tree Line Area', 'in a tree'), + 'Dark Tree Line Tree 3': (0x27, 0x08, False, '', 'Dark Tree Line Area', 'in a tree'), + 'Dark Tree Line Tree 4': (0x28, 0x04, False, '', 'Dark Tree Line Area', 'in a tree'), + 'Hype Cave Statue': (0x29, 0x10, False, '', 'Hype Cave Area', 'encased in stone') } bonk_table_by_location_id = {0x153B00+(data[0]*6)+3: name for name, data in bonk_prize_table.items()} diff --git a/Rom.py b/Rom.py index 37962bc7..68768420 100644 --- a/Rom.py +++ b/Rom.py @@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'c80605a079983f1a9dac37273e2b377a' +RANDOMIZERBASEHASH = '61e3137ae471ed8772deb7f84cc85fb9' class JsonRom(object): diff --git a/asm/owrando.asm b/asm/owrando.asm index b1c1ebdf..07ab9f55 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -385,7 +385,7 @@ OWBonkDrops: ; loop thru rando bonk table to find match PHB : PHK : PLB LDA.b $8A - LDX.b #(40*6) ; 40 bonk items, 6 bytes each + LDX.b #(41*6) ; 41 bonk items, 6 bytes each - CMP.w OWBonkPrizeData,X : BNE + INX LDA.w $0D10,Y : LSR A : LSR A : LSR A : LSR A @@ -1311,6 +1311,47 @@ db 0, 0, 0, 0, 0, 0, 0, 0 db 0, 0 +;================================================================================ +; Bonk Prize Data ($AABB00 - $AABBFB) +;-------------------------------------------------------------------------------- +; 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 @@ -1330,7 +1371,7 @@ db $18, $a8, $10, $b2, $00, $20 db $18, $36, $08, $35, $00, $20 db $1a, $8a, $10, $42, $00, $20 db $1a, $1d, $08, $b2, $00, $20 -;db $1a, $77, $04, $35, $00, $20 ; pre aga ONLY ; hijacked murahdahla bonk tree +db $ff, $77, $04, $35, $00, $20 ; pre aga ONLY ; hijacked murahdahla bonk tree db $1b, $46, $10, $b1, $00, $10 db $1d, $6b, $10, $b1, $00, $20 db $1e, $72, $10, $b2, $00, $20 diff --git a/data/base2current.bps b/data/base2current.bps index d51dc56e..c56129a9 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ