NPC cleanup, add deku scrub dialogue ID and map marker

This commit is contained in:
scawful
2025-01-11 21:09:43 -05:00
parent 03478c4f04
commit 01289b10e9
5 changed files with 88 additions and 85 deletions

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_DekuScrub_Prep, Sprite_DekuScrub_Long) %Set_Sprite_Properties(Sprite_DekuScrub_Prep, Sprite_DekuScrub_Long)
; =========================================================
Sprite_DekuScrub_Long: Sprite_DekuScrub_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -45,15 +43,13 @@ Sprite_DekuScrub_Long:
RTL RTL
} }
; =========================================================
Sprite_DekuScrub_Prep: Sprite_DekuScrub_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.b #$80 : STA.w SprDefl, X LDA.b #$80 : STA.w SprDefl, X
; Peacetime Deku Scrub NPCs ; Peacetime Deku Scrub NPCs
LDA.b $8A : CMP.b #$2E : BNE .check_next LDA.b AreaIndex : CMP.b #$2E : BNE .check_next
; Deku Butler ; Deku Butler
LDA.b #$07 : STA.w SprAction, X LDA.b #$07 : STA.w SprAction, X
JMP + JMP +
@@ -75,15 +71,13 @@ Sprite_DekuScrub_Prep:
LDA.b #$06 : STA.w SprAction, X LDA.b #$06 : STA.w SprAction, X
++ ++
; Check if tail palace is cleared ; Check if tail palace is cleared
LDA.l CRYSTALS : AND #$10 : BEQ + LDA.l Crystals : AND #$10 : BEQ +
STZ.w SprState, X STZ.w SprState, X
+ +
PLB PLB
RTL RTL
} }
; =========================================================
Sprite_DekuScrub_Main: Sprite_DekuScrub_Main:
{ {
LDA.w SprAction, X LDA.w SprAction, X
@@ -100,7 +94,6 @@ Sprite_DekuScrub_Main:
dw DekuButler_Peacetime dw DekuButler_Peacetime
dw DekuPrinces_Peacetime dw DekuPrinces_Peacetime
EstadoInactivo: EstadoInactivo:
{ {
%PlayAnimation(0, 1, 16) %PlayAnimation(0, 1, 16)
@@ -114,8 +107,8 @@ Sprite_DekuScrub_Main:
QuiereCuracion: QuiereCuracion:
{ {
%PlayAnimation(0, 1, 16) %PlayAnimation(0, 1, 16)
LDA $FE : BEQ .ninguna_cancion LDA $FE : BEQ .ninguna_cancion
STZ $FE STZ $FE
LDA.b #$C0 : STA.w SprTimerD, X LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2) %GotoAction(2)
.ninguna_cancion .ninguna_cancion
@@ -171,7 +164,9 @@ Sprite_DekuScrub_Main:
%StartOnFrame(3) %StartOnFrame(3)
%PlayAnimation(3, 3, 10) %PlayAnimation(3, 3, 10)
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
; %ShowSolicitedMessage($0C4) %ShowSolicitedMessage($1B9) : BCC +
LDA.b #$02 : STA.l MapIcon
+
RTS RTS
} }
@@ -180,13 +175,13 @@ Sprite_DekuScrub_Main:
%StartOnFrame(4) %StartOnFrame(4)
%PlayAnimation(4, 4, 10) %PlayAnimation(4, 4, 10)
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
; %ShowSolicitedMessage($0C5) %ShowSolicitedMessage($1BA) : BCC +
LDA.b #$02 : STA.l MapIcon
+
RTS RTS
} }
} }
; =========================================================
Sprite_DekuScrub_Draw: Sprite_DekuScrub_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord

View File

@@ -62,13 +62,15 @@ Sprite_EonOwl_Long:
Sprite_EonOwl_Prep: Sprite_EonOwl_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
STZ.w SprHitbox, X
LDA.b $8A : CMP.b #$0E : BNE .NotGaebora LDA.b $8A : CMP.b #$0E : BNE .NotGaebora
LDA.b #$03 : STA.w SprAction, X LDA.b #$03 : STA.w SprAction, X
.NotGaebora .NotGaebora
LDA.w AreaIndex : CMP.b #$50 : BNE .not_intro LDA.w AreaIndex : CMP.b #$50 : BNE .not_intro
; If Map 0x50, don't spawn after getting sword ; If Map 0x50, don't spawn after getting sword
LDA.l SWORD : CMP.b #$01 : BCC .continue LDA.l SWORD : CMP.b #$01 : BCC .continue
.Despawn
STZ.w SprState, X STZ.w SprState, X
.continue .continue
.not_intro .not_intro

View File

@@ -31,8 +31,6 @@
%Set_Sprite_Properties(Sprite_Farore_Prep, Sprite_Farore_Long) %Set_Sprite_Properties(Sprite_Farore_Prep, Sprite_Farore_Long)
; =========================================================
Sprite_Farore_Long: Sprite_Farore_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -50,8 +48,6 @@ Sprite_Farore_Long:
RTL RTL
} }
; =========================================================
Sprite_Farore_Prep: Sprite_Farore_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -67,8 +63,6 @@ Sprite_Farore_Prep:
RTL RTL
} }
; =========================================================
; Movement key bitwise ---- udlr ; Movement key bitwise ---- udlr
WALKSPEED = 14 WALKSPEED = 14
@@ -198,10 +192,6 @@ Sprite_Farore_Main:
} }
; 07 ; 07
; Look at the RAM SprY to SprYRound, the first few are the actual positions of the sprite
; that you can just set manually or SprYSpeed and SprXSpeed are the "speeds" of the sprites irrc
; You can set one of the speeds and then call the function called Sprite_Move
; And then that will handle it applying the speed for you
MakuArea_FaroreWaitForKydrog: MakuArea_FaroreWaitForKydrog:
{ {
%PlayAnimation(5, 5, 8) %PlayAnimation(5, 5, 8)
@@ -210,7 +200,6 @@ Sprite_Farore_Main:
} }
} }
; =========================================================
Sprite_Farore_Draw: Sprite_Farore_Draw:
{ {
@@ -220,16 +209,13 @@ Sprite_Farore_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06 LDA .start_index, Y : STA $06
PHX PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1 LDX .nbr_of_tiles, Y ;amount of tiles -1
LDY.b #$00 LDY.b #$00
.nextTile .nextTile
PHX ; Save current Tile Index? PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset? PHA ; Keep the value with animation index offset?
ASL A : TAX ASL A : TAX
@@ -246,7 +232,7 @@ Sprite_Farore_Draw:
LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way
STA $0E STA $0E
.on_screen_y .on_screen_y
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore) PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
INY INY
@@ -268,50 +254,48 @@ Sprite_Farore_Draw:
RTS RTS
; ========================================================= .start_index
db $00, $02, $04, $06, $08, $0A, $0C
.start_index .nbr_of_tiles
db $00, $02, $04, $06, $08, $0A, $0C db 1, 1, 1, 1, 1, 1, 1
.nbr_of_tiles .x_offsets
db 1, 1, 1, 1, 1, 1, 1 dw 0, 0
.x_offsets dw 0, 0
dw 0, 0 dw 0, 0
dw 0, 0 dw 0, 0
dw 0, 0 dw 0, 0
dw 0, 0 dw 0, 0
dw 0, 0 dw 0, -1
dw 0, 0 .y_offsets
dw 0, -1 dw -8, 4
.y_offsets dw -8, 4
dw -8, 4 dw 4, -8
dw -8, 4 dw -8, 4
dw 4, -8 dw 4, -7
dw -8, 4 dw -8, 4
dw 4, -7 dw 4, -7
dw -8, 4 .chr
dw 4, -7 db $A8, $AA
.chr db $A8, $88
db $A8, $AA db $AA, $A8
db $A8, $88 db $8A, $8C
db $AA, $A8 db $8C, $8A
db $8A, $8C db $8A, $AC
db $8C, $8A db $AA, $86
db $8A, $AC .properties
db $AA, $86 db $3B, $3B
.properties db $3B, $7B
db $3B, $3B db $3B, $3B
db $3B, $7B db $3B, $3B
db $3B, $3B db $7B, $3B
db $3B, $3B db $3B, $3B
db $7B, $3B db $3B, $7B
db $3B, $3B .sizes
db $3B, $7B db $02, $02
.sizes db $02, $02
db $02, $02 db $02, $02
db $02, $02 db $02, $02
db $02, $02 db $02, $02
db $02, $02 db $02, $02
db $02, $02 db $02, $02
db $02, $02
db $02, $02
} }

View File

@@ -1003,12 +1003,42 @@ LinkState_Minecart:
db -1, 0, 0, 0 db -1, 0, 0, 0
} }
TileBehavior_TL_Long:
{
LDA.w !MinecartDirection : CMP.b #East : BNE +
+
CMP.b #West
RTL
}
TileBehavior_StopLeft_Long:
{
; Transition back to sprite, put link in state default
LDA.w !LinkInCart : BEQ +
JSL MinecartFollower_TransitionToSprite
STZ.w LinkState
STZ.w !LinkInCart
+
RTL
}
pushpc pushpc
org $07A5F7 org $07A5F7
JSL LinkState_Minecart JSL LinkState_Minecart
RTS RTS
TileBehavior_TL:
JSL TileBehavior_TL_Long
RTS
TileBehavior_StopLeft:
JSL TileBehavior_StopLeft_Long
RTS
assert pc() <= $07A64B assert pc() <= $07A64B
; Minecart Track tile types ; Minecart Track tile types

View File

@@ -31,8 +31,6 @@
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss !Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_Vasu_Prep, Sprite_Vasu_Long) %Set_Sprite_Properties(Sprite_Vasu_Prep, Sprite_Vasu_Long)
; =========================================================
Sprite_Vasu_Long: Sprite_Vasu_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -51,8 +49,6 @@ Sprite_Vasu_Long:
RTL RTL
} }
; =========================================================
Sprite_Vasu_Prep: Sprite_Vasu_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -64,8 +60,6 @@ Sprite_Vasu_Prep:
RTL RTL
} }
; =========================================================
Sprite_Vasu_Main: Sprite_Vasu_Main:
{ {
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
@@ -180,8 +174,6 @@ Sprite_Vasu_Main:
} }
} }
; =========================================================
Sprite_Vasu_Draw: Sprite_Vasu_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord