Intro Cutscene Sequence and Sprite Movement
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
Sprite_Kydrog_Long:
|
Sprite_Kydrog_Long:
|
||||||
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
JSR Sprite_Kydrog_Draw ; Call the draw code
|
JSR Sprite_Kydrog_Draw ; Call the draw code
|
||||||
@@ -45,16 +46,18 @@ JSR Sprite_Kydrog_Main ; Call the main sprite code
|
|||||||
.SpriteIsNotActive
|
.SpriteIsNotActive
|
||||||
PLB ; Get back the databank we stored previously
|
PLB ; Get back the databank we stored previously
|
||||||
RTL ; Go back to original code
|
RTL ; Go back to original code
|
||||||
|
}
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
Sprite_Kydrog_Prep:
|
Sprite_Kydrog_Prep:
|
||||||
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
; Add more code here to initialize data
|
; Add more code here to initialize data
|
||||||
|
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
|
}
|
||||||
|
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
@@ -92,7 +95,7 @@ Sprite_Kydrog_Main:
|
|||||||
{
|
{
|
||||||
LDA.w SprTimerA, X : BNE +
|
LDA.w SprTimerA, X : BNE +
|
||||||
%ShowUnconditionalMessage($21)
|
%ShowUnconditionalMessage($21)
|
||||||
LDA.b #$00 : STA.b $49 ; Stop Link's auto-movement
|
LDA.b #$02 : STA.b $B6 ; Update story flag for Farore
|
||||||
%GotoAction(2)
|
%GotoAction(2)
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
@@ -100,18 +103,30 @@ Sprite_Kydrog_Main:
|
|||||||
|
|
||||||
Kydrog_SpawnOffspring:
|
Kydrog_SpawnOffspring:
|
||||||
{
|
{
|
||||||
|
STZ.b $49 ; Stop Link from moving
|
||||||
%GotoAction(3)
|
%GotoAction(3)
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
Kydrog_TurnPlayerToDeku:
|
Kydrog_TurnPlayerToDeku:
|
||||||
{
|
{
|
||||||
|
; LDA.b #$03 : STA.b $B6
|
||||||
|
|
||||||
|
; JSL AddTransformationCloud
|
||||||
|
; LDA.b #$14 : JSR Player_DoSfx2
|
||||||
|
|
||||||
|
; JSL Palette_ArmorAndGloves
|
||||||
|
LDA #$35 : STA $BC
|
||||||
|
|
||||||
%GotoAction(4)
|
%GotoAction(4)
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
Kydrog_WarpPlayerAway:
|
Kydrog_WarpPlayerAway:
|
||||||
{
|
{
|
||||||
|
LDA #$29
|
||||||
|
JSL $02B40F
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,3 +206,6 @@ Sprite_Kydrog_Draw:
|
|||||||
.sizes
|
.sizes
|
||||||
db $02, $02, $02, $02, $02, $02
|
db $02, $02, $02, $02, $02, $02
|
||||||
}
|
}
|
||||||
|
|
||||||
|
org $02ECF8
|
||||||
|
dw $0029
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
;==============================================================================
|
;==============================================================================
|
||||||
; Farore/Maku Tree - Sprite Uncle/Priest
|
; Farore/Maku Tree - Sprite Uncle/Priest
|
||||||
;
|
;
|
||||||
|
; STZ.w $0DD0, X ; Kill the sprite since it's not needed anymore
|
||||||
;
|
;
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
@@ -81,6 +82,8 @@ Sprite_Farore_Prep:
|
|||||||
; STZ.w $0DD0, X ; Kill the sprite
|
; STZ.w $0DD0, X ; Kill the sprite
|
||||||
; .PlayIntro
|
; .PlayIntro
|
||||||
|
|
||||||
|
LDA.b #$80 : STA $0CAA, X ; Don't kill Farore when she goes off screen
|
||||||
|
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
@@ -89,7 +92,8 @@ Sprite_Farore_Prep:
|
|||||||
|
|
||||||
; Movement key bitwise ---- udlr
|
; Movement key bitwise ---- udlr
|
||||||
|
|
||||||
WALKSPEED = 09
|
WALKSPEED = 14
|
||||||
|
STORY_STATE = $B6
|
||||||
|
|
||||||
Sprite_Farore_Main:
|
Sprite_Farore_Main:
|
||||||
{
|
{
|
||||||
@@ -101,13 +105,24 @@ Sprite_Farore_Main:
|
|||||||
dw MoveLeftTowardsFarore
|
dw MoveLeftTowardsFarore
|
||||||
dw WaitAndMessage
|
dw WaitAndMessage
|
||||||
dw FaroreFollowPlayer
|
dw FaroreFollowPlayer
|
||||||
|
|
||||||
dw MakuArea_FaroreFollowPlayer
|
dw MakuArea_FaroreFollowPlayer
|
||||||
|
dw MakuArea_FaroreWaitForKydrog
|
||||||
|
|
||||||
|
|
||||||
IntroStart:
|
IntroStart:
|
||||||
{
|
{
|
||||||
|
; JSR SetupMovieEffect
|
||||||
|
; JSR MovieEffect
|
||||||
|
LDA $B6 : CMP #$01 : BEQ .maku_area
|
||||||
|
CMP #$02 : BEQ .waiting
|
||||||
|
|
||||||
%GotoAction(1)
|
%GotoAction(1)
|
||||||
|
|
||||||
|
.maku_area
|
||||||
|
JSR MakuArea_FaroreFollowPlayer
|
||||||
|
.waiting
|
||||||
|
JSR MakuArea_FaroreWaitForKydrog
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +134,6 @@ Sprite_Farore_Main:
|
|||||||
LDA.b $20 ; Link's Y Position
|
LDA.b $20 ; Link's Y Position
|
||||||
CMP.b #$9C ; Y = 6C
|
CMP.b #$9C ; Y = 6C
|
||||||
BCC .linkistoofar
|
BCC .linkistoofar
|
||||||
|
|
||||||
%GotoAction(2)
|
%GotoAction(2)
|
||||||
|
|
||||||
.linkistoofar
|
.linkistoofar
|
||||||
@@ -150,58 +164,64 @@ Sprite_Farore_Main:
|
|||||||
|
|
||||||
WaitAndMessage:
|
WaitAndMessage:
|
||||||
{
|
{
|
||||||
|
|
||||||
%PlayAnimation(1, 2, 8)
|
%PlayAnimation(1, 2, 8)
|
||||||
%MoveTowardPlayer(15)
|
%MoveTowardPlayer(15)
|
||||||
LDA.w SprTimerA, X : BNE +
|
LDA.w SprTimerA, X : BNE +
|
||||||
|
STZ $2F
|
||||||
%ShowUnconditionalMessage($24)
|
%ShowUnconditionalMessage($24)
|
||||||
LDA.b #$01 : STA.l $7EF300 ; prevent intro from playing again with sram set
|
|
||||||
; STZ.w $0DD0, X ; Kill the sprite since it's not needed anymore
|
|
||||||
%GotoAction(4)
|
%GotoAction(4)
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
; you could just squeeze it between link and the 1st follower
|
; 04
|
||||||
; by reusing the follow code but with lower delay
|
|
||||||
; $1A00[0x14] - (Tagalong)
|
|
||||||
|
|
||||||
; Low bytes of tagalong states' Y coordinates.
|
|
||||||
|
|
||||||
; $1A14[0x14] - (Tagalong)
|
|
||||||
|
|
||||||
; High bytes of tagalong states' Y coordinates.
|
|
||||||
|
|
||||||
; $1A28[0x14] - (Tagalong)
|
|
||||||
|
|
||||||
; Low bytes of tagalong states' X coordinates.
|
|
||||||
|
|
||||||
; $1A3C[0x14] - (Tagalong)
|
|
||||||
|
|
||||||
; High bytes of tagalong states' X coordinates.
|
|
||||||
; load current follower position divide it by 2
|
|
||||||
; and use that as index
|
|
||||||
|
|
||||||
|
|
||||||
FaroreFollowPlayer:
|
FaroreFollowPlayer:
|
||||||
{
|
{
|
||||||
LDA WALKSPEED : STA.b $57 ; Slow Link down for the cutscene
|
LDA WALKSPEED : STA.b $57 ; Slow Link down for the cutscene
|
||||||
LDA.b #$08 : STA.b $49 ; Auto-movement north
|
LDA.b #$08 : STA.b $49 ; Auto-movement north
|
||||||
%PlayAnimation(3, 4, 8)
|
%PlayAnimation(3, 4, 8)
|
||||||
%MoveTowardPlayer(9)
|
%MoveTowardPlayer(16)
|
||||||
|
|
||||||
LDA #$02 : STA $7EF3C5 ; (0 - intro, 1 - pendants, 2 - crystals)
|
LDA #$02 : STA $7EF3C5 ; (0 - intro, 1 - pendants, 2 - crystals)
|
||||||
LDA #$05 : STA $012D ; turn off rain sound
|
LDA #$05 : STA $012D ; turn off rain sound
|
||||||
LDA #$01 : STA $0728
|
JSL $00FC41 ; fix monsters
|
||||||
|
LDA #$01 : STA $B6 ; Set Story State
|
||||||
|
%GotoAction(0)
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 05
|
||||||
MakuArea_FaroreFollowPlayer:
|
MakuArea_FaroreFollowPlayer:
|
||||||
{
|
{
|
||||||
|
.keep_walking
|
||||||
%PlayAnimation(3, 4, 8)
|
%PlayAnimation(3, 4, 8)
|
||||||
%MoveTowardPlayer(9)
|
%MoveTowardPlayer(18)
|
||||||
|
LDA $B6 : CMP.b #$02 : BEQ .keep_walking
|
||||||
|
JSR MakuArea_FaroreWaitForKydrog
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 06
|
||||||
|
; Look at the RAM $0D00 to $0D60, the first few are the actual positions of the sprite that you can just set manually or $0D40 and $0D50 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)
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; 07
|
||||||
|
MakuArea_FaroreWalkToPosition:
|
||||||
|
{
|
||||||
|
%PlayAnimation(3, 4, 8)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user