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

View File

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

View File

@@ -31,8 +31,6 @@
%Set_Sprite_Properties(Sprite_Farore_Prep, Sprite_Farore_Long)
; =========================================================
Sprite_Farore_Long:
{
PHB : PHK : PLB
@@ -50,8 +48,6 @@ Sprite_Farore_Long:
RTL
}
; =========================================================
Sprite_Farore_Prep:
{
PHB : PHK : PLB
@@ -67,8 +63,6 @@ Sprite_Farore_Prep:
RTL
}
; =========================================================
; Movement key bitwise ---- udlr
WALKSPEED = 14
@@ -198,10 +192,6 @@ Sprite_Farore_Main:
}
; 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:
{
%PlayAnimation(5, 5, 8)
@@ -210,7 +200,6 @@ Sprite_Farore_Main:
}
}
; =========================================================
Sprite_Farore_Draw:
{
@@ -220,16 +209,13 @@ Sprite_Farore_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
.nextTile
PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset?
ASL A : TAX
@@ -268,8 +254,6 @@ Sprite_Farore_Draw:
RTS
; =========================================================
.start_index
db $00, $02, $04, $06, $08, $0A, $0C
.nbr_of_tiles

View File

@@ -1003,12 +1003,42 @@ LinkState_Minecart:
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
org $07A5F7
JSL LinkState_Minecart
RTS
TileBehavior_TL:
JSL TileBehavior_TL_Long
RTS
TileBehavior_StopLeft:
JSL TileBehavior_StopLeft_Long
RTS
assert pc() <= $07A64B
; Minecart Track tile types

View File

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