From df77882206a01b7c5b68c4091e11ba037b0798b3 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 25 Oct 2024 17:49:03 -0400 Subject: [PATCH] Add KalyxoGoron mines opening dialogue and logic --- Sprites/NPCs/goron.asm | 63 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/Sprites/NPCs/goron.asm b/Sprites/NPCs/goron.asm index 0770715..df4e1f6 100644 --- a/Sprites/NPCs/goron.asm +++ b/Sprites/NPCs/goron.asm @@ -11,7 +11,7 @@ !SmallShadow = 00 ; 01 = small shadow, 00 = no shadow !Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow !Palette = 00 ; Unused in this template (can be 0 to 7) -!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool +!Hitbox = 02 ; 00 to 31, can be viewed in sprite draw tool !Persist = 00 ; 01 = your sprite continue to live offscreen !Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room) !CollisionLayer = 00 ; 01 = will check both layer for collision @@ -53,45 +53,84 @@ Sprite_Goron_Long: Sprite_Goron_Prep: { PHB : PHK : PLB + LDA.w WORLDFLAG : BEQ + + LDA.b #$03 : STA.w SprAction, X + JMP ++ + + + PHX + LDX $8A + LDA.l $7EF280,X : CMP.b #$20 : BEQ +++ + PLX + STZ.w SprAction, X + ++ + PLB + RTL + +++ + PLX + LDA.b #$02 : STA.w SprAction, X PLB RTL } Sprite_Goron_Main: { + JSL Sprite_PlayerCantPassThrough + LDA.w SprAction, X JSL UseImplicitRegIndexedLocalJumpTable dw KalyxoGoron_Main - + dw KalyxoGoron_OpenMines + dw KalyxoGoron_MinesOpened dw EonGoron_Main dw EonGoron_Sing dw EonGoron_Punch KalyxoGoron_Main: { - JSL Sprite_PlayerCantPassThrough + LDA.l RockMeat : BEQ + + CMP.b #$05 : BCC ++ + %ShowSolicitedMessage($01A9) : BCC +++ + INC.w SprAction, X + +++ + RTS + + + %ShowSolicitedMessage($01A7) + RTS + ++ + %ShowSolicitedMessage($01A8) + RTS + } + + KalyxoGoron_OpenMines: + { + %PlayAnimation(1,1,10) + LDA.b #$04 : STA $04C6 + INC.w SprAction, X + RTS + } + + KalyxoGoron_MinesOpened: + { + %PlayAnimation(1,1,10) RTS } EonGoron_Main: { %PlayAnimation(0, 1, 10) - JSL Sprite_PlayerCantPassThrough RTS } EonGoron_Sing: { %PlayAnimation(2, 3, 10) - JSL Sprite_PlayerCantPassThrough RTS } EonGoron_Punch: { %PlayAnimation(4, 5, 10) - JSL Sprite_PlayerCantPassThrough RTS } } @@ -153,19 +192,25 @@ Sprite_KalyxoGoron_Draw: RTS .start_index - db $00 + db $00, $04 .nbr_of_tiles - db 3 + db 3, 3 .x_offsets dw -8, -8, 8, 8 + dw -8, -8, 8, 8 .y_offsets dw -8, 8, -8, 8 + dw -8, 8, -8, 8 .chr db $8C, $AC, $8C, $AC + db $8A, $AA, $8A, $AA .properties db $37, $37, $77, $77 + db $37, $37, $77, $77 .sizes db $02, $02, $02, $02 + db $02, $02, $02, $02 + } Sprite_EonGoron_Draw: @@ -263,4 +308,4 @@ Sprite_EonGoron_Draw: db $02 db $02, $00 db $02, $00 -} \ No newline at end of file +}