diff --git a/Sprites/NPCs/eon_owl.asm b/Sprites/NPCs/eon_owl.asm index ba76227..74a595d 100644 --- a/Sprites/NPCs/eon_owl.asm +++ b/Sprites/NPCs/eon_owl.asm @@ -44,16 +44,13 @@ Sprite_EonOwl_Long: JSR Sprite_KaeporaGaebora_Draw JMP .HandleSprite .NotGaebora - JSR Sprite_EonOwl_Draw ; Call the draw code + JSR Sprite_EonOwl_Draw .HandleSprite - JSL Sprite_CheckActive ; Check if game is not paused - BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive - - JSR Sprite_EonOwl_Main ; Call the main sprite code - + JSL Sprite_CheckActive : BCC .SpriteIsNotActive + JSR Sprite_EonOwl_Main .SpriteIsNotActive - PLB ; Get back the databank we stored previously - RTL ; Go back to original code + PLB + RTL .Despawn STZ.w SprState, X PLB @@ -97,7 +94,6 @@ Sprite_EonOwl_Main: EonOwl_Idle: { %PlayAnimation(0,1,16) - LDA.w POSX : STA $02 LDA.w POSY : STA $03 LDA.w SprX, X : STA $04 @@ -105,26 +101,21 @@ Sprite_EonOwl_Main: JSL GetDistance8bit_Long : CMP #$28 : BCS .not_too_close %GotoAction(1) .not_too_close - RTS } EonOwl_IntroDialogue: { %PlayAnimation(0,1,16) - %ShowUnconditionalMessage($00E6) - LDA.b #$C0 : STA.w SprTimerA, X %GotoAction(2) RTS } - EonOwl_FlyingAway: { %PlayAnimation(2,3,10) - LDA.b #$F8 : STA.w SprYSpeed, X JSL Sprite_Move @@ -153,8 +144,8 @@ Sprite_EonOwl_Main: KaeporaGaebora_Respond: { LDA $1CE8 : BNE .player_said_no - %GotoAction(5) - RTS + %GotoAction(5) + RTS .player_said_no %GotoAction(5) LDA.b #$60 : STA.w SprTimerA, X @@ -168,7 +159,7 @@ Sprite_EonOwl_Main: LDA.b #-FlyAwaySpeed : STA.w SprYSpeed, X JSL Sprite_Move LDA.w SprTimerA, X : BNE .not_ready - STZ.w SprState, X + STZ.w SprState, X .not_ready RTS } @@ -184,7 +175,6 @@ Sprite_EonOwl_Draw: LDA.w SprFrame, X : TAY ;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 @@ -266,7 +256,6 @@ Sprite_KaeporaGaebora_Draw: LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 diff --git a/Sprites/NPCs/eon_zora_elder.asm b/Sprites/NPCs/eon_zora_elder.asm index 2783141..b5ba504 100644 --- a/Sprites/NPCs/eon_zora_elder.asm +++ b/Sprites/NPCs/eon_zora_elder.asm @@ -2,8 +2,8 @@ Sprite_EonZoraElder_Main: { - LDA.w SprAction, X; Load the SprAction - JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in + LDA.w SprAction, X + JSL UseImplicitRegIndexedLocalJumpTable dw EonZoraElder_Idle dw EonZoraElder_Surprised @@ -29,7 +29,6 @@ Sprite_EonZoraElder_Draw: LDA.w SprFrame, X : TAY ;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 diff --git a/Sprites/NPCs/farore.asm b/Sprites/NPCs/farore.asm index 3782c91..c0f9564 100644 --- a/Sprites/NPCs/farore.asm +++ b/Sprites/NPCs/farore.asm @@ -1,6 +1,5 @@ ; ========================================================= -; Farore Sprite Properties -; ========================================================= +; Farore !SPRID = Sprite_Farore !NbrTiles = 2 ; Number of tiles used in a frame @@ -30,8 +29,6 @@ !ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks !Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss -; ========================================================= - %Set_Sprite_Properties(Sprite_Farore_Prep, Sprite_Farore_Long) ; ========================================================= @@ -39,16 +36,12 @@ Sprite_Farore_Long: { PHB : PHK : PLB - - JSR Sprite_Farore_Draw ; Call the draw code - JSL Sprite_CheckActive ; Check if game is not paused - BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive - - JSR Sprite_Farore_Main ; Call the main sprite code - -.SpriteIsNotActive - PLB ; Get back the databank we stored previously - RTL ; Go back to original code + JSR Sprite_Farore_Draw + JSL Sprite_CheckActive : BCC .SpriteIsNotActive + JSR Sprite_Farore_Main + .SpriteIsNotActive + PLB + RTL } ; ========================================================= @@ -56,12 +49,10 @@ Sprite_Farore_Long: Sprite_Farore_Prep: { PHB : PHK : PLB - LDA.b #$80 : STA.w SprDefl, X ; Don't kill Farore when she goes off screen LDA.l $7EF300 : BEQ .PlayIntro STZ.w SprState, X ; Kill the sprite .PlayIntro - PLB RTL } @@ -75,8 +66,8 @@ STORY_STATE = $B6 Sprite_Farore_Main: { - LDA.w SprAction, X; Load the SprAction - JSL UseImplicitRegIndexedLocalJumpTable ; Goto the SprAction we are currently in + LDA.w SprAction, X + JSL UseImplicitRegIndexedLocalJumpTable dw IntroStart dw MoveUpTowardsFarore @@ -144,13 +135,12 @@ Sprite_Farore_Main: JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_MoveVert LDA.w SprTimerA, X : BNE + - - STZ $2F - LDA #$00 : STA InCutScene - %ShowUnconditionalMessage($0E) ; "I am Farore, the Oracle of Secrets." - - %GotoAction(4) - + + STZ $2F + LDA #$00 : STA InCutScene + ; "I am Farore, the Oracle of Secrets." + %ShowUnconditionalMessage($0E) + %GotoAction(4) + + RTS } @@ -171,7 +161,6 @@ Sprite_Farore_Main: LDA.b #$08 : STA.b $49 ; Auto-movement north %PlayAnimation(3, 4, 8) - LDA.b #$15 JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_MoveVert @@ -188,16 +177,13 @@ Sprite_Farore_Main: ; 06 MakuArea_FaroreFollowPlayer: { - ;.keep_walking %PlayAnimation(3, 4, 8) LDA.b #$15 JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_MoveVert - ; LDA $B6 : CMP.b #$02 : BEQ .keep_walking %GotoAction(6) - RTS } @@ -228,7 +214,7 @@ Sprite_Farore_Draw: PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 -.nextTile + .nextTile PHX ; Save current Tile Index? diff --git a/Sprites/NPCs/impa.asm b/Sprites/NPCs/impa.asm index de6266a..e377bf1 100644 --- a/Sprites/NPCs/impa.asm +++ b/Sprites/NPCs/impa.asm @@ -1,5 +1,3 @@ - - ; 0x00 - Link's house ; 0x01 - Sanctuary (Hall of Secrets) ; 0x02 - Castle Prison @@ -46,10 +44,10 @@ org $05ED10 NOP #5 ; LDA.b #$19 ; SONG 19 -;#_05ED12: STA.w $012C +; STA.w $012C org $05ED63 NOP #5 ; #_05ED63: LDA.b #$10 ; SONG 10 ; #_05ED65: STA.w $012C -pullpc \ No newline at end of file +pullpc diff --git a/Sprites/NPCs/korok.asm b/Sprites/NPCs/korok.asm index 93d1387..0c63a25 100644 --- a/Sprites/NPCs/korok.asm +++ b/Sprites/NPCs/korok.asm @@ -170,7 +170,6 @@ Sprite_Korok_DrawMakar: LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 @@ -298,7 +297,6 @@ Sprite_Korok_DrawHollo: LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 @@ -426,7 +424,6 @@ Sprite_Korok_DrawRown: LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA .start_index, Y : STA $06 - PHX LDX .nbr_of_tiles, Y ;amount of tiles -1 LDY.b #$00 diff --git a/Sprites/NPCs/mermaid.asm b/Sprites/NPCs/mermaid.asm index 6659063..f7bcc98 100644 --- a/Sprites/NPCs/mermaid.asm +++ b/Sprites/NPCs/mermaid.asm @@ -35,7 +35,6 @@ Sprite_Mermaid_Long: { PHB : PHK : PLB - LDA.w SprMiscE, X : BEQ .MermaidDraw CMP.b #$02 : BEQ .LibrarianDraw JSR Sprite_Maple_Draw diff --git a/Sprites/NPCs/piratian.asm b/Sprites/NPCs/piratian.asm index 8b42e9f..2d6e180 100644 --- a/Sprites/NPCs/piratian.asm +++ b/Sprites/NPCs/piratian.asm @@ -58,7 +58,7 @@ Sprite_Piratian_Prep: Sprite_Piratian_Main: { - JSR Sprite_Piratian_Move ; Call the move code + JSR Sprite_Piratian_Move LDA.w SprAction, X JSL UseImplicitRegIndexedLocalJumpTable