Skip to content

Commit

Permalink
Start implementing cutscenes for the "reactivate" ending
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Nov 4, 2024
1 parent 28fbaa6 commit 1711d6e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cutscene.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
.IMPORT DataA_Cutscene_TownOutdoorsGaveRemote_sCutscene
.IMPORT DataA_Cutscene_TownOutdoorsGetCaught_sCutscene
.IMPORT DataA_Cutscene_TownOutdoorsOrcAttack_sCutscene
.IMPORT DataA_Cutscene_TownOutdoorsReactivate_sCutscene
.IMPORT DataA_Cutscene_TownOutdoorsYearsLater_sCutscene
.IMPORT FuncA_Actor_TickAllDevicesAndActors
.IMPORT FuncA_Actor_TickAllDevicesAndSmokeActors
Expand Down Expand Up @@ -273,6 +274,8 @@ _Finish:
DataA_Cutscene_TownOutdoorsGetCaught_sCutscene
d_entry table, TownOutdoorsOrcAttack, \
DataA_Cutscene_TownOutdoorsOrcAttack_sCutscene
d_entry table, TownOutdoorsReactivate, \
DataA_Cutscene_TownOutdoorsReactivate_sCutscene
d_entry table, TownOutdoorsYearsLater, \
DataA_Cutscene_TownOutdoorsYearsLater_sCutscene
D_END
Expand Down
1 change: 1 addition & 0 deletions src/cutscene.inc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ kMaxForks = 4
TownOutdoorsGaveRemote
TownOutdoorsGetCaught
TownOutdoorsOrcAttack
TownOutdoorsReactivate
TownOutdoorsYearsLater
NUM_VALUES
.ENDENUM
Expand Down
34 changes: 34 additions & 0 deletions src/finale.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
jmp_prga MainA_Death_EnterFinaleGaveRemoteCutsceneRoom
.ENDPROC

;;; Mode for transitioning to the cutscene that plays in TownOutdoors after
;;; reactivating the complex.
;;; @prereq Rendering is enabled.
.EXPORT Main_Finale_Reactivate
.PROC Main_Finale_Reactivate
jsr Func_FadeOutToBlackSlowly
ldx #eRoom::TownOutdoors ; param: room to load
ldy #eMusic::Silence ; param: music to play
jsr FuncM_SwitchPrgcAndLoadRoomWithMusic
jmp_prga MainA_Death_EnterFinaleReactivateCutsceneRoom
.ENDPROC

;;; Mode for displaying the "years later" text as part of the self-destruct
;;; finale, before switching to the "years later" cutscene.
;;; @prereq Rendering is enabled.
Expand Down Expand Up @@ -181,4 +193,26 @@ _ReturnRoomAndMusic:
jmp Main_Explore_EnterRoom
.ENDPROC

;;; Sets up the avatar, room scrolling, and next cutscene for the "reactivate"
;;; cutscene, then jumps to Main_Explore_EnterRoom.
;;; @prereq Rendering is disabled.
;;; @prereq Static room data is loaded.
.PROC MainA_Death_EnterFinaleReactivateCutsceneRoom
;; Hide the player avatar.
lda #eAvatar::Hidden
sta Zp_AvatarPose_eAvatar
;; Position the (hidden) player avatar so as to make the room scroll
;; position be what we want. (We don't want to do this by locking
;; scrolling, because we want e.g. the vertical scroll to be able to shift
;; while the dialog window is open.)
ldax #$02c4
stax Zp_AvatarPosX_i16
ldax #$00c8
stax Zp_AvatarPosY_i16
;; Enter the room and start the cutscene.
lda #eCutscene::TownOutdoorsReactivate
sta Zp_Next_eCutscene
jmp Main_Explore_EnterRoom
.ENDPROC

;;;=========================================================================;;;
8 changes: 7 additions & 1 deletion src/rooms/core_boss.asm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
.IMPORT Func_SetScrollGoalFromPoint
.IMPORT Func_ShakeRoom
.IMPORT Main_Finale_GaveRemote
.IMPORT Main_Finale_Reactivate
.IMPORT Main_Finale_YearsLater
.IMPORT Ppu_ChrObjBoss3
.IMPORT Ram_ActorFlags_bObj_arr
Expand Down Expand Up @@ -2202,7 +2203,12 @@ _LookAtTopOfCore:

.EXPORT DataA_Cutscene_CoreBossFinaleReactivate_sCutscene
.PROC DataA_Cutscene_CoreBossFinaleReactivate_sCutscene
act_ContinueExploring ; TODO: implement CoreBossFinaleReactivate cutscene
act_CallFunc Func_PlaySfxPoof
act_WaitFrames 60
act_CallFunc Func_PlaySfxExplodeBig
act_ShakeRoom 30
act_WaitFrames 60
act_JumpToMain Main_Finale_Reactivate
.ENDPROC

.EXPORT DataA_Cutscene_CoreBossFinaleSelfDestruct_sCutscene
Expand Down
7 changes: 7 additions & 0 deletions src/rooms/town_outdoors.asm
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,13 @@ _InitThurgAndGrunt:
act_ForkStart 0, DataA_Cutscene_TownOutdoorsGaveRemote_sCutscene
.ENDPROC

.EXPORT DataA_Cutscene_TownOutdoorsReactivate_sCutscene
.PROC DataA_Cutscene_TownOutdoorsReactivate_sCutscene
;; TODO: Implement TownOutdoorsReactivate cutscene.
act_WaitFrames 60
act_ForkStart 0, DataA_Cutscene_TownOutdoorsReactivate_sCutscene
.ENDPROC

.EXPORT DataA_Cutscene_TownOutdoorsYearsLater_sCutscene
.PROC DataA_Cutscene_TownOutdoorsYearsLater_sCutscene
;; TODO: Implement TownOutdoorsYearsLater cutscene.
Expand Down

0 comments on commit 1711d6e

Please sign in to comment.