Big ROM changes
- New Item GFX code - Fixed Bonk Dupe issue - Fixed Bonk Despawn issue
This commit is contained in:
2
Rom.py
2
Rom.py
@@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127
|
|||||||
|
|
||||||
|
|
||||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||||
RANDOMIZERBASEHASH = 'f5f779f1820204cd019ca5293594f955'
|
RANDOMIZERBASEHASH = '3c651a38ea79504029c71b382c9c17da'
|
||||||
|
|
||||||
|
|
||||||
class JsonRom(object):
|
class JsonRom(object):
|
||||||
|
|||||||
@@ -424,14 +424,16 @@ LoadMapDarkOrMixed:
|
|||||||
|
|
||||||
OWBonkGoodBeeDrop:
|
OWBonkGoodBeeDrop:
|
||||||
{
|
{
|
||||||
LDA.l OWFlags+1 : AND.b #$02 : BNE .shuffled
|
LDA.l OWFlags+1 : AND.b #!FLAG_OW_BONKDROP : BNE .shuffled
|
||||||
.vanilla ; what we wrote over
|
.vanilla ; what we wrote over
|
||||||
STZ.w $0DD0,X
|
STZ.w $0DD0,X
|
||||||
LDA.l BottleContentsOne : ORA.l BottleContentsTwo
|
LDA.l BottleContentsOne : ORA.l BottleContentsTwo
|
||||||
ORA.l BottleContentsThree : ORA.l BottleContentsFour
|
ORA.l BottleContentsThree : ORA.l BottleContentsFour
|
||||||
RTL
|
RTL
|
||||||
.shuffled
|
.shuffled
|
||||||
PHY : TXY
|
LDA.w $0DD0,X : BNE +
|
||||||
|
JMP .return+1
|
||||||
|
+ PHY : TXY
|
||||||
LDA.l RoomDataWRAM[$0120].high : AND.b #$02 : PHA : BNE + ; check if collected
|
LDA.l RoomDataWRAM[$0120].high : AND.b #$02 : PHA : BNE + ; check if collected
|
||||||
LDA.b #$1B : STA $12F ; JSL Sound_SetSfx3PanLong ; seems that when you bonk, there is a pending bonk sfx, so we clear that out and replace with reveal secret sfx
|
LDA.b #$1B : STA $12F ; JSL Sound_SetSfx3PanLong ; seems that when you bonk, there is a pending bonk sfx, so we clear that out and replace with reveal secret sfx
|
||||||
+
|
+
|
||||||
@@ -495,23 +497,29 @@ OWBonkGoodBeeDrop:
|
|||||||
; spawn itemget item
|
; spawn itemget item
|
||||||
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected
|
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected
|
||||||
PLX : BEQ + : LDA.b #$00 : STA.w $0DD0,Y : BRA .return
|
PLX : BEQ + : LDA.b #$00 : STA.w $0DD0,Y : BRA .return
|
||||||
+ LDA.b #$01 : STA !REDRAW
|
+ PHA
|
||||||
|
|
||||||
|
LDA.b #$01 : STA !FORCE_HEART_SPAWN
|
||||||
|
|
||||||
LDA.b #$EB : STA.l $7FFE00
|
LDA.b #$EB : STA.l $7FFE00
|
||||||
JSL Sprite_SpawnDynamically+15 ; +15 to skip finding a new slot, use existing sprite
|
JSL Sprite_SpawnDynamically+15 ; +15 to skip finding a new slot, use existing sprite
|
||||||
|
|
||||||
TYX : STZ.w $0F20,X ; layer the sprite is on
|
LDA.b #$01 : STA.w !SPRITE_REDRAW,Y
|
||||||
|
|
||||||
|
PLA : STA.w $0E80,Y
|
||||||
|
|
||||||
; affects the rate the item moves in the Y/X direction
|
; affects the rate the item moves in the Y/X direction
|
||||||
STZ.w $0D40,X
|
LDA.b #$00 : STA.w $0D40,Y
|
||||||
LDA.b #$0A : STA.w $0D50,Y
|
LDA.b #$0A : STA.w $0D50,Y
|
||||||
|
|
||||||
LDA.b #$1A : STA.w $0F80,Y ; amount of force (gives height to the arch)
|
LDA.b #$1A : STA.w $0F80,Y ; amount of force (gives height to the arch)
|
||||||
LDA.b #$FF : STA.w $0B58,Y ; stun timer
|
LDA.b #$FF : STA.w $0B58,Y ; stun timer
|
||||||
LDA.b #$30 : STA.w $0F10,Y ; aux delay timer 4 ?? dunno what that means
|
LDA.b #$30 : STA.w $0F10,Y ; aux delay timer 4 ?? dunno what that means
|
||||||
|
|
||||||
|
LDA.b #$00 : STA.w $0F20,Y ; layer the sprite is on
|
||||||
|
|
||||||
; sets the tile type that is underneath the sprite, water
|
; sets the tile type that is underneath the sprite, water
|
||||||
LDA.b #$09 : STA.l $7FF9C2,X ; TODO: Figure out how to get the game to set this
|
TYX : LDA.b #$09 : STA.l $7FF9C2,X ; TODO: Figure out how to get the game to set this
|
||||||
|
|
||||||
; sets OW event bitmask flag, uses free RAM
|
; sets OW event bitmask flag, uses free RAM
|
||||||
LDA.l OWBonkPrizeTable[42].flag : STA.w $0ED0,Y
|
LDA.l OWBonkPrizeTable[42].flag : STA.w $0ED0,Y
|
||||||
@@ -520,8 +528,6 @@ OWBonkGoodBeeDrop:
|
|||||||
LDA.w $0D00,Y : SEC : SBC.l OWBonkPrizeTable[42].vert_offset : STA.w $0D00,Y
|
LDA.w $0D00,Y : SEC : SBC.l OWBonkPrizeTable[42].vert_offset : STA.w $0D00,Y
|
||||||
LDA.w $0D20,Y : SBC #$00 : STA.w $0D20,Y
|
LDA.w $0D20,Y : SBC #$00 : STA.w $0D20,Y
|
||||||
|
|
||||||
LDA.b #$01 : STA !REDRAW
|
|
||||||
|
|
||||||
.return
|
.return
|
||||||
PLY
|
PLY
|
||||||
LDA #$08 ; makes original good bee not spawn
|
LDA #$08 ; makes original good bee not spawn
|
||||||
@@ -533,8 +539,10 @@ OWBonkDrops:
|
|||||||
{
|
{
|
||||||
CMP.b #$D8 : BEQ +
|
CMP.b #$D8 : BEQ +
|
||||||
RTL
|
RTL
|
||||||
+ LDA.l OWFlags+1 : AND.b #!FLAG_OW_CROSSED : BNE +
|
+ LDA.l OWFlags+1 : AND.b #!FLAG_OW_BONKDROP : BNE +
|
||||||
JSL.l Sprite_TransmuteToBomb : RTL
|
JSL.l Sprite_TransmuteToBomb : RTL
|
||||||
|
+ LDA.w $0DD0,Y : BNE +
|
||||||
|
RTL
|
||||||
+
|
+
|
||||||
|
|
||||||
; loop thru rando bonk table to find match
|
; loop thru rando bonk table to find match
|
||||||
@@ -618,13 +626,17 @@ OWBonkDrops:
|
|||||||
; spawn itemget item
|
; spawn itemget item
|
||||||
.spawn_item ; A = item id ; Y = tree sprite slot ; S = Collected, FlagBitmask, X (row + 2)
|
.spawn_item ; A = item id ; Y = tree sprite slot ; S = Collected, FlagBitmask, X (row + 2)
|
||||||
PLX : BEQ + : LDA.b #$00 : STA.w $0DD0,Y : JMP .return ; S = FlagBitmask, X (row + 2)
|
PLX : BEQ + : LDA.b #$00 : STA.w $0DD0,Y : JMP .return ; S = FlagBitmask, X (row + 2)
|
||||||
+ LDA 2,S : TAX : INX
|
+ PHA
|
||||||
|
|
||||||
LDA.b #$01 : STA !REDRAW
|
LDA.b #$01 : STA !FORCE_HEART_SPAWN
|
||||||
|
|
||||||
LDA.b #$EB : STA.l $7FFE00
|
LDA.b #$EB : STA.l $7FFE00
|
||||||
JSL Sprite_SpawnDynamically+15 ; +15 to skip finding a new slot, use existing sprite
|
JSL Sprite_SpawnDynamically+15 ; +15 to skip finding a new slot, use existing sprite
|
||||||
|
|
||||||
|
LDA.b #$01 : STA.w !SPRITE_REDRAW,Y
|
||||||
|
|
||||||
|
PLA : STA.w $0E80,Y
|
||||||
|
|
||||||
; affects the rate the item moves in the Y/X direction
|
; affects the rate the item moves in the Y/X direction
|
||||||
LDA.b #$00 : STA.w $0D40,Y
|
LDA.b #$00 : STA.w $0D40,Y
|
||||||
LDA.b #$0A : STA.w $0D50,Y
|
LDA.b #$0A : STA.w $0D50,Y
|
||||||
@@ -643,8 +655,6 @@ OWBonkDrops:
|
|||||||
LDA.w $0D00,Y : SEC : SBC.w OWBonkPrizeData,X : STA.w $0D00,Y
|
LDA.w $0D00,Y : SEC : SBC.w OWBonkPrizeData,X : STA.w $0D00,Y
|
||||||
LDA.w $0D20,Y : SBC #$00 : STA.w $0D20,Y
|
LDA.w $0D20,Y : SBC #$00 : STA.w $0D20,Y
|
||||||
|
|
||||||
LDA.b #$01 : STA !REDRAW
|
|
||||||
|
|
||||||
PLB : RTL
|
PLB : RTL
|
||||||
|
|
||||||
.return
|
.return
|
||||||
@@ -958,7 +968,9 @@ OWNewDestination:
|
|||||||
OWLoadSpecialArea:
|
OWLoadSpecialArea:
|
||||||
{
|
{
|
||||||
LDA.l Overworld_LoadSpecialOverworld_RoomId,X : STA.b $A0
|
LDA.l Overworld_LoadSpecialOverworld_RoomId,X : STA.b $A0
|
||||||
JSL Overworld_LoadSpecialOverworld ; sets M and X flags
|
CMP.w #$0182 : BNE +
|
||||||
|
JSL ZoraSplashGfxFix
|
||||||
|
+ JSL Overworld_LoadSpecialOverworld ; sets M and X flags
|
||||||
TYX
|
TYX
|
||||||
LDY.b #$00
|
LDY.b #$00
|
||||||
CPX.b #$01 : BNE + ; check if going to water transition
|
CPX.b #$01 : BNE + ; check if going to water transition
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user