NPC Housekeeping
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
JSR Sprite_Farore_Draw
|
||||
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
|
||||
JSR Sprite_Farore_Main
|
||||
.SpriteIsNotActive
|
||||
PLB ; Get back the databank we stored previously
|
||||
RTL ; Go back to original code
|
||||
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,11 +135,10 @@ 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."
|
||||
|
||||
; "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
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
; 0x00 - Link's house
|
||||
; 0x01 - Sanctuary (Hall of Secrets)
|
||||
; 0x02 - Castle Prison
|
||||
@@ -46,7 +44,7 @@ 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user