equip mask fix, wolf mask hook, include boat gfx

This commit is contained in:
scawful
2022-12-21 12:33:32 -05:00
parent fbabd08dbb
commit 2833312b98
5 changed files with 112 additions and 63 deletions

View File

@@ -24,21 +24,21 @@ org $07A494
LinkItem_Ether: LinkItem_Ether:
{ {
JSR Link_CheckNewY_ButtonPress : BCC .return JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
LDA $6C : BNE .return ; doorway LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; cant open menu LDA $0FFC : BNE .return ; can't open menu
LDY.b #$04
LDA.b #$23
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud JSL AddTransformationCloud
LDA $02B2 : CMP #$01 : BNE .continue ; is the hood already on? LDA.b #$14 : JSR Player_DoSfx2
LDA #$10 : STA $BC ; take the hood off
STZ $02B2 LDA $02B2 : CMP #$04 : BEQ .unequip ; is the hood already on?
BRA .return ; do not. LDA #$37 : STA $BC ; change link's sprite
.continue LDA #$04 : STA $02B2
LDA #$37 : STA $BC BRA .return
LDA #$01 : STA $02B2 ; set the bunny hood on .unequip
LDA #$10 : STA $BC : STZ $02B2 ; take the hood off
.return .return
CLC CLC
@@ -48,11 +48,7 @@ LinkItem_Ether:
org $378000 org $378000
incbin bunny_link.4bpp incbin bunny_link.4bpp
namespace BunnyHood
{
Main:
{
lorom
org $87E330 org $87E330
JSR $FD66 JSR $FD66
CLC CLC
@@ -79,6 +75,3 @@ namespace BunnyHood
org $20AF70 ; this selects the new speed values org $20AF70 ; this selects the new speed values
db $20, $12, $0a, $18, $10, $08, $08, $04, $0c, $10, $09, $19, $14, $0d, $10, $08, $40 db $20, $12, $0a, $18, $10, $08, $08, $04, $0c, $10, $09, $19, $14, $0d, $10, $08, $40
} ; label Main
} ; namespace BunnyHood

View File

@@ -5,29 +5,42 @@ incsrc "../Sprites/sprite_functions_hooks.asm"
org $008A01 org $008A01
LDA $BC LDA $BC
; =============================================================================
org $07A64B org $07A64B
LinkItem_Quake: LinkItem_Quake:
{ {
JSR Link_CheckNewY_ButtonPress : BCC .return JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
LDA $6C : BNE .return ; doorway LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
LDA $0FFC : BNE .return ; cantopen menu
LDY.b #$04
LDA.b #$23
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2
LDA #$35 : STA $BC LDA $02B2 : CMP #$01 : BEQ .unequip ; is the deku mask on?
LDA #$35 : STA $BC ; put the mask on
LDA #$01 : STA $02B2
BRA .return
.unequip
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return .return
RTS RTS
} }
; =============================================================================
org $358000 org $358000
incbin deku_link.bin incbin deku_link.bin
; =============================================================================
org $1BEDF9 org $1BEDF9
JSL Palette_ArmorAndGloves ; 4bytes JSL Palette_ArmorAndGloves ; 4bytes
RTL ; 1byte RTL ; 1byte
@@ -37,6 +50,8 @@ org $1BEE1B
JSL Palette_ArmorAndGloves_part_two JSL Palette_ArmorAndGloves_part_two
RTL RTL
; =============================================================================
; Code : ; Code :
org $308000 org $308000
Palette_ArmorAndGloves: Palette_ArmorAndGloves:
@@ -92,7 +107,6 @@ Palette_ArmorAndGloves:
RTL RTL
} }
; org $07A666 ; org $07A666
; Deku_Entry: ; Deku_Entry:
; { ; {

View File

@@ -1,9 +1,41 @@
org $318000 org $07A3DB
LinkItem_WolfMask: LinkItem_Flute:
{
org $07A313
LinkItem_ShovelAndFlute:
{
; Play flute or use the Wolf Mask
LDA $0202 : CMP.b #$0D : BNE LinkItem_WolfMask
BRL LinkItem_Flute
} }
; TODO: Make sure there's no inaccessible code issues past here
; LinkItem_Shovel
org $07A32C
LinkItem_WolfMask:
{
JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2
LDA $02B2 : CMP #$03 : BEQ .unequip ; is the wolf mask already on?
LDA #$38 : STA $BC ; change link's sprite
LDA #$03 : STA $02B2
BRA .return
.unequip
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return
CLC
RTS
}
org $388000 org $388000
incbin wolf_link.4bpp incbin wolf_link.4bpp

View File

@@ -4,21 +4,24 @@ org $07A569
LinkItem_ZoraMask: LinkItem_ZoraMask:
{ {
JSR Link_CheckNewY_ButtonPress : BCC .return JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
LDA $6C : BNE .return ; doorway LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
LDA $0FFC : BNE .return ; cantopen menu
LDY.b #$04
LDA.b #$23
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2 LDA.b #$14 : JSR Player_DoSfx2
LDA $02B2 : CMP #$02 : BEQ .unequip ; is the zora mask on?
LDA #$36 : STA $BC LDA #$36 : STA $BC
LDA #$02 : STA $02B2
BRA .return
.unequip
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return .return
CLC
RTS RTS
} }

View File

@@ -22,6 +22,9 @@ namespace Oracle
incsrc "Util/ram.asm" incsrc "Util/ram.asm"
incsrc "Util/functions.asm" incsrc "Util/functions.asm"
incsrc "Graphics/boat_gfx.asm"
print "End of Graphics/boat_gfx.asm ", pc
; --------------------------------------------------------- ; ---------------------------------------------------------
incsrc "KeyBlock/keyblock.asm" incsrc "KeyBlock/keyblock.asm"
print "End of KeyBlock/keyblock.asm ", pc print "End of KeyBlock/keyblock.asm ", pc
@@ -61,15 +64,19 @@ namespace Oracle
; --------------------------------------------------------- ; ---------------------------------------------------------
incsrc "Masks/mask_routines.asm" incsrc "Masks/mask_routines.asm"
; ---------------------------------------------------------
incsrc "Masks/deku_mask.asm" incsrc "Masks/deku_mask.asm"
print "End of Masks/deku_mask.asm ", pc print "End of Masks/deku_mask.asm ", pc
; ---------------------------------------------------------
incsrc "Masks/zora_mask.asm" incsrc "Masks/zora_mask.asm"
print "End of Masks/zora_mask.asm ", pc print "End of Masks/zora_mask.asm ", pc
; ---------------------------------------------------------
incsrc "Masks/wolf_mask.asm" incsrc "Masks/wolf_mask.asm"
print "End of Masks/wolf_mask.asm ", pc print "End of Masks/wolf_mask.asm ", pc
; ---------------------------------------------------------
incsrc "Masks/bunny_hood.asm" incsrc "Masks/bunny_hood.asm"
print "End of Masks/bunny_hood.asm ", pc print "End of Masks/bunny_hood.asm ", pc