Skip to content

Commit

Permalink
Make Alex meet up with Anna after the city boss
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Jul 26, 2024
1 parent 7f0f80f commit 33562a7
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/chr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ _chr_begin:
chr_inc "upgrade_opsync"
chr_res $06
chr_inc "minicore1"
chr_res $07
chr_res $06
chr_inc "minicore2"
chr_inc "paper"
END_CHR_BANK
Expand Down
2 changes: 2 additions & 0 deletions src/dialog.asm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

.IMPORT DataA_Dialog_CityBuilding2Screen_sDialog
.IMPORT DataA_Dialog_CityBuilding6Screen_sDialog
.IMPORT DataA_Dialog_CityCenterAlex_sDialog
.IMPORT DataA_Dialog_CityCenterBreakerCity1_sDialog
.IMPORT DataA_Dialog_CityFlowerOrcAngry_sDialog
.IMPORT DataA_Dialog_CityFlowerOrcCalm_sDialog
Expand Down Expand Up @@ -441,6 +442,7 @@ _Finish:
D_TABLE .enum, eDialog
d_entry t, CityBuilding2Screen, DataA_Dialog_CityBuilding2Screen_sDialog
d_entry t, CityBuilding6Screen, DataA_Dialog_CityBuilding6Screen_sDialog
d_entry t, CityCenterAlex, DataA_Dialog_CityCenterAlex_sDialog
d_entry t, CityCenterBreakerCity1, \
DataA_Dialog_CityCenterBreakerCity1_sDialog
d_entry t, CityFlowerOrcAngry, DataA_Dialog_CityFlowerOrcAngry_sDialog
Expand Down
1 change: 1 addition & 0 deletions src/dialog.inc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ kDialogEntryCutscene = $ff ; ends the dialog and starts a new cutscene
.ENUM eDialog
CityBuilding2Screen
CityBuilding6Screen
CityCenterAlex
CityCenterBreakerCity1
CityFlowerOrcAngry
CityFlowerOrcCalm
Expand Down
2 changes: 2 additions & 0 deletions src/flag.inc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ kSaveMagicNumber = $b2
CityCenterDoorUnlocked
CityCenterEnteredCity
CityCenterKeygenConnected
CityCenterTalkedToAlex
CityOutskirtsBlastedRocks
CityOutskirtsTalkedToAlex
CoreSouthCorraHelped
Expand Down Expand Up @@ -187,6 +188,7 @@ kSaveMagicNumber = $b2
ShadowHeartTaggedGhost
ShadowOfficeRemovedWall
ShadowOfficeTaggedGhost
ShadowTeleportEnteredLab
ShadowTrapDisarmed
TempleAltarColumnBroken
TempleEntryColumnRaised
Expand Down
6 changes: 6 additions & 0 deletions src/marker.asm
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@
D_END
D_STRUCT sMarker
d_byte Row_u8, 13
d_byte Col_u8, 13 ; room: LavaTeleport
d_byte If_eFlag, eFlag::CityCenterTalkedToAlex
d_byte Not_eFlag, eFlag::ShadowTeleportEnteredLab
D_END
D_STRUCT sMarker
d_byte Row_u8, 13
d_byte Col_u8, 23 ; room: MinePit
d_byte If_eFlag, 0
d_byte Not_eFlag, eFlag::UpgradeOpSync
Expand Down
2 changes: 1 addition & 1 deletion src/minimap.asm
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ _Finish:
.byte $fd
.ENDPROC
.PROC DataA_Pause_MinimapQuestMarkerTiles_u8_arr
.byte $f0, '?', $ed, '?', '?', $ee, '?', '?'
.byte $f0, $a9, $ed, '?', '?', $ee, '?', '?'
.byte '?', '?', '?', '?', '?', $ef, '?', '?'
.byte '?', '?', '?', '?', '?', $f9, '?', '?'
.byte $f4, '?', '?', '?', '?', '?', $fe, '?'
Expand Down
2 changes: 2 additions & 0 deletions src/newgame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ _SetFlags:
.byte eFlag::BossCity
.byte eFlag::UpgradeBRemote
.byte eFlag::BreakerCity
.byte eFlag::CityCenterTalkedToAlex
.byte eFlag::ShadowTeleportEnteredLab
.byte eFlag::PaperJerome01
.byte eFlag::ShadowHallInitialized
.byte eFlag::ShadowHallGlassBroken
Expand Down
95 changes: 92 additions & 3 deletions src/rooms/city_center.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
;;;=========================================================================;;;

.INCLUDE "../actor.inc"
.INCLUDE "../actors/child.inc"
.INCLUDE "../charmap.inc"
.INCLUDE "../cutscene.inc"
.INCLUDE "../device.inc"
Expand Down Expand Up @@ -48,6 +49,7 @@
.IMPORT Func_UnlockDoorDevice
.IMPORT Main_Breaker_FadeBackToBreakerRoom
.IMPORT Ppu_ChrObjCity
.IMPORT Ram_ActorType_eActor_arr
.IMPORT Ram_DeviceType_eDevice_arr
.IMPORT Ram_MachineGoalHorz_u8_arr
.IMPORT Ram_MachineState1_byte_arr
Expand All @@ -59,6 +61,12 @@

;;;=========================================================================;;;

;;; The actor index for Alex in this room.
kAlexActorIndex = 0
;;; The talk device indices for Alex in this room.
kAlexDeviceIndexRight = 14
kAlexDeviceIndexLeft = 15

;;; The device index for the locked door in this room.
kLockedDoorDeviceIndex = 1

Expand Down Expand Up @@ -255,7 +263,14 @@ _Platforms_sPlatform_arr:
.assert * - :- <= kMaxPlatforms * .sizeof(sPlatform), error
.byte ePlatform::None
_Actors_sActor_arr:
: ;; TODO: add Alex/Gronta NPCs for cutscene
: .assert * - :- = kAlexActorIndex * .sizeof(sActor), error
D_STRUCT sActor
d_byte Type_eActor, eActor::NpcChild
d_word PosX_i16, $02b0
d_word PosY_i16, $0148
d_byte Param_byte, eNpcChild::AlexStanding
D_END
;; TODO: add Gronta NPC for cutscene
D_STRUCT sActor
d_byte Type_eActor, eActor::BadRhino
d_word PosX_i16, $00b0
Expand All @@ -270,7 +285,7 @@ _Actors_sActor_arr:
D_END
D_STRUCT sActor
d_byte Type_eActor, eActor::BadOrc
d_word PosX_i16, $0324
d_word PosX_i16, $034c
d_word PosY_i16, $0158
d_byte Param_byte, bObj::FlipH
D_END
Expand Down Expand Up @@ -362,6 +377,20 @@ _Devices_sDevice_arr:
d_byte BlockCol_u8, 43
d_byte Target_byte, eRoom::CityBuilding5
D_END
.assert * - :- = kAlexDeviceIndexRight * .sizeof(sDevice), error
D_STRUCT sDevice
d_byte Type_eDevice, eDevice::TalkRight
d_byte BlockRow_u8, 20
d_byte BlockCol_u8, 42
d_byte Target_byte, eDialog::CityCenterAlex
D_END
.assert * - :- = kAlexDeviceIndexLeft * .sizeof(sDevice), error
D_STRUCT sDevice
d_byte Type_eDevice, eDevice::TalkLeft
d_byte BlockRow_u8, 20
d_byte BlockCol_u8, 43
d_byte Target_byte, eDialog::CityCenterAlex
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
_Passages_sPassage_arr:
Expand Down Expand Up @@ -486,7 +515,20 @@ _WriteRegLock:

.PROC FuncA_Room_CityCenter_EnterRoom
;; TODO: If cutscene, halt machines and remove baddies.
;; TODO: If not cutscene, remove Alex/Gronta actors.
;; TODO: If not cutscene, remove Gronta actor.
_RemoveAlex:
flag_bit Sram_ProgressFlags_arr, eFlag::BreakerCity
beq @removeAlex
flag_bit Sram_ProgressFlags_arr, eFlag::ShadowTeleportEnteredLab
beq @keepAlex
@removeAlex:
lda #0
.assert eActor::None = 0, error
sta Ram_ActorType_eActor_arr + kAlexActorIndex
.assert eDevice::None = 0, error
sta Ram_DeviceType_eDevice_arr + kAlexDeviceIndexLeft
sta Ram_DeviceType_eDevice_arr + kAlexDeviceIndexRight
@keepAlex:
_UnlockDoor:
;; If the door has already been unlocked, unlock it.
flag_bit Sram_ProgressFlags_arr, eFlag::CityCenterDoorUnlocked
Expand Down Expand Up @@ -562,6 +604,19 @@ _SetFlag:
dlg_Done
.ENDPROC

.EXPORT DataA_Dialog_CityCenterAlex_sDialog
.PROC DataA_Dialog_CityCenterAlex_sDialog
dlg_IfSet CityCenterTalkedToAlex, _MarkedMap_sDialog
dlg_Text ChildAlex, DataA_Text2_CityCenterAlex_Part1_u8_arr
dlg_Text ChildAlex, DataA_Text2_CityCenterAlex_Part2_u8_arr
dlg_Quest CityCenterTalkedToAlex
_MarkedMap_sDialog:
dlg_Text ChildAlex, DataA_Text2_CityCenterAlex_Part3_u8_arr
dlg_Text ChildAlex, DataA_Text2_CityCenterAlex_Part4_u8_arr
dlg_Text ChildAlex, DataA_Text2_CityCenterAlex_Part5_u8_arr
dlg_Done
.ENDPROC

;;;=========================================================================;;;

.SEGMENT "PRGA_Text2"
Expand Down Expand Up @@ -622,4 +677,38 @@ _SetFlag:
.byte "over my dead body!#"
.ENDPROC

.PROC DataA_Text2_CityCenterAlex_Part1_u8_arr
.byte "Anna, you found it!$"
.byte "That's the remote that$"
.byte "the orcs have been$"
.byte "looking for!#"
.ENDPROC

.PROC DataA_Text2_CityCenterAlex_Part2_u8_arr
.byte "We'll need that to$"
.byte "restore the complex.$"
.byte "But first, there's one$"
.byte "more circuit to find.#"
.ENDPROC

.PROC DataA_Text2_CityCenterAlex_Part3_u8_arr
.byte "Down in the lava pits,$"
.byte "there's some kind of$"
.byte "gateway. I'll mark it$"
.byte "on your map.#"
.ENDPROC

.PROC DataA_Text2_CityCenterAlex_Part4_u8_arr
.byte "I don't know how to$"
.byte "use it, but I'm sure$"
.byte "you can figure it out.$"
.byte "We've almost got this!#"
.ENDPROC

.PROC DataA_Text2_CityCenterAlex_Part5_u8_arr
.byte "Very soon, all this$"
.byte "technology will be$"
.byte "back in human hands!#"
.ENDPROC

;;;=========================================================================;;;
2 changes: 1 addition & 1 deletion src/rooms/city_center2.bg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ DLDMDMDMDKDMEAEFECECEEECEFEBDMDKDMDMDMDMEAECEFECECEEEB FJFJ
BCFJ BPBLFJFJFJBB BABP BPBB BP BB FJFJ
AL FJFJFJ FJFJBB BC BB BPBB AL FJFJ
AN FJBP BP BM FJBD AN BAAD BPBB BLAC BB AN
AO FJ BLFJ FJFJ AO BAAF BD AE BB AP
AO FJ BLFJFJ FJFJ AO BAAF BD AE BB AP
FIFGFGFGFHFGFI BL FHFGFGFIFGFGFGFGFHFGFIFGFGFGFHFGFGFGFHFGFG
FJFJFJFJFJFJFJFJ FJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJFJ
28 changes: 27 additions & 1 deletion src/rooms/mermaid_village.asm
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ _LookingForCorra_sDialog:
.PROC DataA_Dialog_MermaidVillageBruno_sDialog
dlg_Func _WhereIsAlexFunc
_WhereIsAlexFunc:
;; If Alex hasn't started waiting in the temple, then report that he's
;; Bruno isn't here until the kids are rescued. Once that happens, if Alex
;; hasn't yet started waiting in the temple, then report that he's still
;; meeting with the mermaid queen.
flag_bit Sram_ProgressFlags_arr, eFlag::TempleNaveAlexWaiting
bne @notWithQueen
Expand Down Expand Up @@ -513,6 +514,21 @@ _WhereIsAlexFunc:
ldya #_AlexAtSpring_sDialog
rts
@notAtSpring:
;; Between when Anna returns from under the mermaid spring and when she
;; talks to Alex in the factory vault, Alex is in the vault. However,
;; during that period, Bruno is in the factory elevator rather than here,
;; so no need to report on that. Once Bruno returns here, Alex is nowhere
;; to be found until the city breaker has been activated, so until then
;; just report that Alex is off exploring somewhere.
flag_bit Sram_ProgressFlags_arr, eFlag::BreakerCity
beq @exploring
;; Otherwise, if Anna hasn't yet entered the Shadow Labs, report that Alex
;; is in the city.
flag_bit Sram_ProgressFlags_arr, eFlag::ShadowTeleportEnteredLab
bne @notInCity
ldya #_AlexInCity_sDialog
rts
@notInCity:
;; TODO: report other places where Alex can be
;; If all else fails, just report that Alex is off exploring somewhere.
@exploring:
Expand All @@ -530,6 +546,9 @@ _AlexNearCity_sDialog:
_AlexAtSpring_sDialog:
dlg_Text ChildBruno, DataA_Text1_MermaidVillageBruno_AlexAtSpring_u8_arr
dlg_Done
_AlexInCity_sDialog:
dlg_Text ChildBruno, DataA_Text1_MermaidVillageBruno_AlexInCity_u8_arr
dlg_Done
_AlexExploring_sDialog:
dlg_Text ChildBruno, DataA_Text1_MermaidVillageBruno_AlexExploring_u8_arr
dlg_Done
Expand Down Expand Up @@ -677,6 +696,13 @@ _AlexExploring_sDialog:
.byte "east of the village.#"
.ENDPROC

.PROC DataA_Text1_MermaidVillageBruno_AlexInCity_u8_arr
.byte "If you're looking for$"
.byte "Alex, I think he went$"
.byte "up to explore that$"
.byte "ancient human city.#"
.ENDPROC

.PROC DataA_Text1_MermaidVillageBruno_AlexExploring_u8_arr
.byte "I think Alex went off$"
.byte "exploring somewhere.$"
Expand Down
6 changes: 3 additions & 3 deletions src/rooms/sewer_pool.asm
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ _ThrowDuckFood:

.EXPORT DataA_Dialog_SewerPoolSign_sDialog
.PROC DataA_Dialog_SewerPoolSign_sDialog
dlg_Text Sign, DataA_Text1_SewerPoolSign_u8_arr
dlg_Text Sign, DataA_Text2_SewerPoolSign_u8_arr
dlg_Done
.ENDPROC

;;;=========================================================================;;;

.SEGMENT "PRGA_Text1"
.SEGMENT "PRGA_Text2"

.PROC DataA_Text1_SewerPoolSign_u8_arr
.PROC DataA_Text2_SewerPoolSign_u8_arr
.byte " - NOTICE -$"
.byte "$"
.byte " Please do ", $9d, $9e, $9f, "$"
Expand Down
13 changes: 11 additions & 2 deletions src/tiles/minicore1.ahi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ahi1 f0 p1 i9 w8 h8
ahi1 f0 p1 i10 w8 h8

0;FF0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0
0008;0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0

00000000
00000000
Expand Down Expand Up @@ -82,3 +82,12 @@ ahi1 f0 p1 i9 w8 h8
33333333
00000000
00000000

33333333
33000033
30300303
30033000
30033000
30300303
33000033
33333333

0 comments on commit 33562a7

Please sign in to comment.