fixed some bow related draw bugs and a selected item infinite loop bug
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
asar.exe
|
||||
oos111.sfc
|
||||
oos111x-1.bst
|
||||
oos111x-2.bst
|
||||
oos111x-3.bst
|
||||
oos111x.bp
|
||||
oos111x.cht
|
||||
oos111x.cpu.sym
|
||||
oos111x.sfc
|
||||
oos111x.smp.sym
|
||||
oos111x.srm
|
||||
oos111x.sym
|
||||
@@ -14,7 +14,7 @@ pushpc
|
||||
; update in game hud colors
|
||||
org $1BD662 : dw hexto555($814f16), hexto555($552903)
|
||||
org $1BD66A : dw hexto555($d51d00), hexto555($f9f9f9)
|
||||
org $1DB672 : dw hexto555($d1a452), hexto555($f9f9f9)
|
||||
org $1DB672 : dw hexto555($d0a050), hexto555($f9f9f9)
|
||||
org $1DB67A : dw hexto555($5987e0), hexto555($f9f9f9)
|
||||
org $1DB682 : dw hexto555($7b7b83), hexto555($bbbbbb)
|
||||
org $1DB68A : dw hexto555($a58100), hexto555($dfb93f)
|
||||
@@ -158,11 +158,10 @@ Menu_ScrollDown:
|
||||
INX : INX
|
||||
LDA.w Menu_Scroll, X
|
||||
STA.b $EA
|
||||
CMP.w #$FF12 : BNE .loop
|
||||
|
||||
CMP.w #$FF12 : BNE .notDoneScrolling
|
||||
JMP Menu_InitItemScreen
|
||||
|
||||
.loop
|
||||
.notDoneScrolling
|
||||
STX.w MenuScrollLevelV
|
||||
RTS
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
; =========================================================
|
||||
; Tilemap Menu background
|
||||
|
||||
; This function is bled into via the previous menu.asm function.
|
||||
|
||||
Menu_DrawBackground:
|
||||
{
|
||||
REP #$30
|
||||
LDX.w #$FE ; $1700-17FF
|
||||
|
||||
.loop
|
||||
.loop
|
||||
LDA.w menu_frame, X
|
||||
STA.w $1000, X
|
||||
LDA.w menu_frame+$100, X
|
||||
|
||||
@@ -12,7 +12,7 @@ NothingGFX:
|
||||
|
||||
BowsGFX:
|
||||
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
|
||||
dw $28BA, $28BB, $24CA, $28CB ; Bow and arrows
|
||||
dw $28BA, $28BB, $28CA, $28CB ; Bow and arrows
|
||||
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
|
||||
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
|
||||
|
||||
|
||||
@@ -216,30 +216,26 @@ MagicTilemap:
|
||||
dw MostlyFull, Full, Full, Full
|
||||
|
||||
; =========================================================
|
||||
; *$6FAFD-$6FB90 LOCAL
|
||||
|
||||
; $06FAFD-$06FB90 LOCAL
|
||||
HUD_UpdateItemBox:
|
||||
{
|
||||
SEP #$30
|
||||
; Dost thou haveth the the bow?
|
||||
LDA $7EF340 : BEQ .no_bow
|
||||
|
||||
CMP.b #$03 : BCC .no_silver_arrows
|
||||
|
||||
; check how many arrows the player has
|
||||
LDA $7EF377 : BNE .draw_bow_item_icon
|
||||
LDX.b #$03
|
||||
BRA .draw_bow_item_icon
|
||||
|
||||
.no_silver_arrows
|
||||
.no_silver_arrows
|
||||
|
||||
LDX.b #$02
|
||||
|
||||
LDA $7EF377 : BNE .draw_bow_item_icon
|
||||
|
||||
LDX.b #$01
|
||||
|
||||
.draw_bow_item_icon
|
||||
.draw_bow_item_icon
|
||||
; values of X correspond to how the icon will end up drawn:
|
||||
; 0x01 - normal bow with no arrows
|
||||
; 0x02 - normal bow with arrows
|
||||
@@ -247,46 +243,54 @@ HUD_UpdateItemBox:
|
||||
; 0x04 - silver bow with silver arrows
|
||||
TXA : STA $7EF340
|
||||
|
||||
.no_bow
|
||||
.no_bow
|
||||
|
||||
REP #$30
|
||||
LDX $0202 : BEQ .no_equipped_item
|
||||
LDA $7EF33F, X : AND.w #$00FF
|
||||
CPX.w #$0004 : BNE .bombs_not_equipped
|
||||
LDA.w #$0001
|
||||
|
||||
.bombs_not_equipped
|
||||
.bombs_not_equipped
|
||||
|
||||
CPX.w #$0006 : BNE .bottle1_not_equipped
|
||||
JMP .load_bottle_content
|
||||
|
||||
.bottle1_not_equipped
|
||||
.bottle1_not_equipped
|
||||
|
||||
CPX.w #$000C : BNE .bottle2_not_equipped
|
||||
LDA.w #$0002 : JMP .load_bottle_content
|
||||
|
||||
.bottle2_not_equipped
|
||||
.bottle2_not_equipped
|
||||
|
||||
CPX.w #$0012 : BNE .bottle3_not_equipped
|
||||
LDA.w #$0003 : JMP .load_bottle_content
|
||||
|
||||
.bottle3_not_equipped
|
||||
.bottle3_not_equipped
|
||||
|
||||
CPX.w #$0018 : BNE .bottle_not_equipped
|
||||
LDA.w #$0004
|
||||
|
||||
.load_bottle_content
|
||||
.load_bottle_content
|
||||
|
||||
TXY : TAX : LDA $7EF35B, X : AND.w #$00FF : TYX
|
||||
|
||||
.bottle_not_equipped
|
||||
.bottle_not_equipped
|
||||
|
||||
CPX.w #$000D : BNE .flute_not_equipped
|
||||
LDA $030F
|
||||
|
||||
.flute_not_equipped
|
||||
.flute_not_equipped
|
||||
|
||||
CPX.w #$0003 : BNE .hookshot_not_equipped
|
||||
LDA.w GoldstarOrHookshot : BEQ .hookshot_not_equipped
|
||||
SEC : SBC.b #$01
|
||||
|
||||
.hookshot_not_equipped
|
||||
.hookshot_not_equipped
|
||||
|
||||
JSR HUD_DrawItem
|
||||
|
||||
.no_equipped_item
|
||||
.no_equipped_item
|
||||
|
||||
RTS
|
||||
}
|
||||
@@ -401,7 +405,7 @@ HudItems:
|
||||
org $0DF629
|
||||
dw $20F5, $20F5, $20F5, $20F5 ; No bow
|
||||
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
|
||||
dw $28BA, $28BB, $24CA, $28CB ; Bow and arrows
|
||||
dw $28BA, $28BB, $28CA, $28CB ; Bow and arrows
|
||||
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
|
||||
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Menu_Palette:
|
||||
dw hexto555($f9f9f9)
|
||||
dw hexto555($000000)
|
||||
dw hexto555($000000) ; transparent
|
||||
dw hexto555($d1a452)
|
||||
dw hexto555($d0a050)
|
||||
dw hexto555($f9f9f9)
|
||||
dw hexto555($000000)
|
||||
dw hexto555($000000) ; transparent
|
||||
|
||||
@@ -167,8 +167,9 @@ Menu_InitItemScreen:
|
||||
{
|
||||
SEP #$30
|
||||
LDY.w $0202 : BNE .all_good
|
||||
|
||||
.loop
|
||||
; Loop through the SRM of each item to see if we have
|
||||
; one of them so we can start with that one selected.
|
||||
.loop
|
||||
INY : CPY.b #$25 : BCS .bad
|
||||
LDX.w Menu_AddressIndex-1, Y
|
||||
LDA.l $7EF300, X
|
||||
@@ -177,10 +178,24 @@ Menu_InitItemScreen:
|
||||
STY.w $0202
|
||||
BRA .all_good
|
||||
|
||||
.bad
|
||||
.bad
|
||||
; If we made it here that means there are no items
|
||||
; available but one was still selected.
|
||||
; This should never happen.
|
||||
STZ.w $0202
|
||||
|
||||
.all_good
|
||||
STZ $0207
|
||||
LDA.b #$04
|
||||
STA.w $0200
|
||||
RTS
|
||||
|
||||
.all_good
|
||||
; Double check we still have the item that was selected.
|
||||
; This is to prevent a bug where we can get stuck in an
|
||||
; infinite loop later on.
|
||||
LDX.w Menu_AddressIndex-1, Y
|
||||
LDA.l $7EF300, X
|
||||
CMP.b #$01 : BCC .bad
|
||||
STZ $0207
|
||||
LDA.b #$04
|
||||
STA.w $0200
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace Oracle
|
||||
; -------------------------------------------------------
|
||||
incsrc "Util/all_items.asm"
|
||||
|
||||
incsrc "Dungeons/house_walls.asm"
|
||||
;incsrc "Dungeons/house_walls.asm"
|
||||
|
||||
print ""
|
||||
print "Finished applying patches"
|
||||
|
||||
Reference in New Issue
Block a user