Skip to content

Commit

Permalink
Add more Paper devices/dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Jun 30, 2024
1 parent 142bc9f commit 2c7f3e8
Show file tree
Hide file tree
Showing 19 changed files with 216 additions and 53 deletions.
1 change: 1 addition & 0 deletions src/device.asm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ _Continue:
d_entry table, LeverCeiling, FuncA_Objects_DrawDeviceLeverCeiling
d_entry table, LeverFloor, FuncA_Objects_DrawDeviceLeverFloor
d_entry table, Paper, FuncA_Objects_DrawDevicePaper
d_entry table, PaperBg, Func_Noop
d_entry table, ScreenGreen, FuncA_Objects_DrawDeviceScreenGreen
d_entry table, ScreenRed, FuncA_Objects_DrawDeviceScreenRed
d_entry table, Sign, Func_Noop
Expand Down
1 change: 1 addition & 0 deletions src/device.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ kMaxDevices = 16
LeverCeiling
LeverFloor
Paper ; collects the paper, and initiates dialogue for it
PaperBg ; collects the paper, and initiates dialogue for it
ScreenGreen ; initiates dialogue with the avatar's back to the camera
ScreenRed ; initiates dialogue with the avatar's back to the camera
Sign ; initiates dialogue with the avatar's back to the camera
Expand Down
8 changes: 8 additions & 0 deletions src/dialog.asm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
.IMPORT DataA_Dialog_MermaidVillageFarmer_sDialog
.IMPORT DataA_Dialog_MermaidVillageGuard_sDialog
.IMPORT DataA_Dialog_PaperJerome01_sDialog
.IMPORT DataA_Dialog_PaperJerome02_sDialog
.IMPORT DataA_Dialog_PaperJerome03_sDialog
.IMPORT DataA_Dialog_PaperJerome04_sDialog
.IMPORT DataA_Dialog_PaperJerome07_sDialog
.IMPORT DataA_Dialog_PaperJerome08_sDialog
.IMPORT DataA_Dialog_PaperJerome09_sDialog
Expand All @@ -90,6 +93,7 @@
.IMPORT DataA_Dialog_PaperJerome13_sDialog
.IMPORT DataA_Dialog_PaperJerome14_sDialog
.IMPORT DataA_Dialog_PaperJerome15_sDialog
.IMPORT DataA_Dialog_PaperJerome20_sDialog
.IMPORT DataA_Dialog_PaperJerome21_sDialog
.IMPORT DataA_Dialog_PaperJerome23_sDialog
.IMPORT DataA_Dialog_PaperJerome28_sDialog
Expand Down Expand Up @@ -489,6 +493,9 @@ _Finish:
d_entry t, MermaidVillageFarmer, DataA_Dialog_MermaidVillageFarmer_sDialog
d_entry t, MermaidVillageGuard, DataA_Dialog_MermaidVillageGuard_sDialog
d_entry t, PaperJerome01, DataA_Dialog_PaperJerome01_sDialog
d_entry t, PaperJerome02, DataA_Dialog_PaperJerome02_sDialog
d_entry t, PaperJerome03, DataA_Dialog_PaperJerome03_sDialog
d_entry t, PaperJerome04, DataA_Dialog_PaperJerome04_sDialog
d_entry t, PaperJerome07, DataA_Dialog_PaperJerome07_sDialog
d_entry t, PaperJerome08, DataA_Dialog_PaperJerome08_sDialog
d_entry t, PaperJerome09, DataA_Dialog_PaperJerome09_sDialog
Expand All @@ -498,6 +505,7 @@ _Finish:
d_entry t, PaperJerome13, DataA_Dialog_PaperJerome13_sDialog
d_entry t, PaperJerome14, DataA_Dialog_PaperJerome14_sDialog
d_entry t, PaperJerome15, DataA_Dialog_PaperJerome15_sDialog
d_entry t, PaperJerome20, DataA_Dialog_PaperJerome20_sDialog
d_entry t, PaperJerome21, DataA_Dialog_PaperJerome21_sDialog
d_entry t, PaperJerome23, DataA_Dialog_PaperJerome23_sDialog
d_entry t, PaperJerome28, DataA_Dialog_PaperJerome28_sDialog
Expand Down
4 changes: 4 additions & 0 deletions src/dialog.inc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ kDialogEntryCutscene = $ff ; ends the dialog and starts a new cutscene
MermaidVillageFarmer
MermaidVillageGuard
PaperJerome01
PaperJerome02
PaperJerome03
PaperJerome04
PaperJerome07
PaperJerome08
PaperJerome09
Expand All @@ -149,6 +152,7 @@ kDialogEntryCutscene = $ff ; ends the dialog and starts a new cutscene
PaperJerome13
PaperJerome14
PaperJerome15
PaperJerome20
PaperJerome21
PaperJerome23
PaperJerome28
Expand Down
1 change: 1 addition & 0 deletions src/explore.asm
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ _CheckForActivateDevice:
d_entry table, LeverCeiling, _DeviceLever
d_entry table, LeverFloor, _DeviceLever
d_entry table, Paper, _DevicePaper
d_entry table, PaperBg, _DevicePaper
d_entry table, ScreenGreen, _DeviceDialog
d_entry table, ScreenRed, _DeviceDialog
d_entry table, Sign, _DeviceDialog
Expand Down
4 changes: 4 additions & 0 deletions src/newgame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ _SetFlags:
.byte eFlag::FactoryVaultTalkedToAlex
.byte eFlag::FactoryEastCorraHelped
.byte eFlag::FlowerLava
.byte eFlag::PaperJerome03
.byte eFlag::FlowerSewer
.byte eFlag::CityCenterEnteredCity
.byte eFlag::CityOutskirtsBlastedRocks
Expand All @@ -321,10 +322,13 @@ _SetFlags:
.byte eFlag::PaperJerome01
.byte eFlag::ShadowHallInitialized
.byte eFlag::ShadowHallGlassBroken
.byte eFlag::PaperJerome02
.byte eFlag::ShadowTrapDisarmed
.byte eFlag::PaperJerome04
.byte eFlag::ShadowHeartTaggedGhost
.byte eFlag::ShadowOfficeRemovedWall
.byte eFlag::ShadowOfficeTaggedGhost
.byte eFlag::PaperJerome20
.byte eFlag::BossShadow
.byte eFlag::UpgradeOpMul
.byte eFlag::BreakerShadow
Expand Down
20 changes: 10 additions & 10 deletions src/paper.asm
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
.PROC DataA_Pause_PaperDialogs_eDialog_arr
D_ARRAY kNumPaperFlags, kFirstPaperFlag
d_byte eFlag::PaperJerome01, eDialog::PaperJerome01
d_byte eFlag::PaperJerome02, 0 ; TODO
d_byte eFlag::PaperJerome03, 0 ; TODO
d_byte eFlag::PaperJerome04, 0 ; TODO
d_byte eFlag::PaperJerome02, eDialog::PaperJerome02
d_byte eFlag::PaperJerome03, eDialog::PaperJerome03
d_byte eFlag::PaperJerome04, eDialog::PaperJerome04
d_byte eFlag::PaperJerome05, 0 ; TODO
d_byte eFlag::PaperJerome06, 0 ; TODO
d_byte eFlag::PaperJerome07, eDialog::PaperJerome07
Expand All @@ -206,7 +206,7 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
d_byte eFlag::PaperJerome17, 0 ; TODO
d_byte eFlag::PaperJerome18, 0 ; TODO
d_byte eFlag::PaperJerome19, 0 ; TODO
d_byte eFlag::PaperJerome20, 0 ; TODO
d_byte eFlag::PaperJerome20, eDialog::PaperJerome20
d_byte eFlag::PaperJerome21, eDialog::PaperJerome21
d_byte eFlag::PaperJerome22, 0 ; TODO
d_byte eFlag::PaperJerome23, eDialog::PaperJerome23
Expand Down Expand Up @@ -240,9 +240,9 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
.PROC DataA_Pause_PaperLocation_eArea_arr
D_ARRAY kNumPaperFlags, kFirstPaperFlag
d_byte eFlag::PaperJerome01, eArea::Shadow ; room: ShadowEntry
d_byte eFlag::PaperJerome02, $ff ; TODO
d_byte eFlag::PaperJerome03, $ff ; TODO
d_byte eFlag::PaperJerome04, $ff ; TODO
d_byte eFlag::PaperJerome02, eArea::Shadow ; room: ShadowHall
d_byte eFlag::PaperJerome03, eArea::Sewer ; room: SewerPipe
d_byte eFlag::PaperJerome04, eArea::Shadow ; room: ShadowHeart
d_byte eFlag::PaperJerome05, $ff ; TODO
d_byte eFlag::PaperJerome06, $ff ; TODO
d_byte eFlag::PaperJerome07, eArea::Factory ; room: FactoryBridge
Expand All @@ -258,10 +258,10 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
d_byte eFlag::PaperJerome17, $ff ; TODO
d_byte eFlag::PaperJerome18, $ff ; TODO
d_byte eFlag::PaperJerome19, $ff ; TODO
d_byte eFlag::PaperJerome20, $ff ; TODO
d_byte eFlag::PaperJerome21, eArea::Crypt ; room: CryptEscape
d_byte eFlag::PaperJerome20, eArea::Shadow ; room: ShadowDescent
d_byte eFlag::PaperJerome21, eArea::Crypt ; room: CryptEscape
d_byte eFlag::PaperJerome22, $ff ; TODO
d_byte eFlag::PaperJerome23, eArea::Core ; room: CoreLock
d_byte eFlag::PaperJerome23, eArea::Core ; room: CoreLock
d_byte eFlag::PaperJerome24, $ff ; TODO
d_byte eFlag::PaperJerome25, $ff ; TODO
d_byte eFlag::PaperJerome26, $ff ; TODO
Expand Down
45 changes: 43 additions & 2 deletions src/rooms/sewer_pipe.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
;;;=========================================================================;;;

.INCLUDE "../actor.inc"
.INCLUDE "../charmap.inc"
.INCLUDE "../device.inc"
.INCLUDE "../dialog.inc"
.INCLUDE "../flag.inc"
.INCLUDE "../macros.inc"
.INCLUDE "../oam.inc"
.INCLUDE "../platform.inc"
.INCLUDE "../room.inc"

.IMPORT DataA_Room_Sewer_sTileset
.IMPORT Data_Empty_sDevice_arr
.IMPORT Func_Noop
.IMPORT Ppu_ChrObjSewer

Expand All @@ -51,7 +54,7 @@ _Ext_sRoomExt:
d_addr Terrain_sTileset_ptr, DataA_Room_Sewer_sTileset
d_addr Platforms_sPlatform_arr_ptr, _Platforms_sPlatform_arr
d_addr Actors_sActor_arr_ptr, _Actors_sActor_arr
d_addr Devices_sDevice_arr_ptr, Data_Empty_sDevice_arr
d_addr Devices_sDevice_arr_ptr, _Devices_sDevice_arr
d_addr Passages_sPassage_arr_ptr, _Passages_sPassage_arr
d_addr Enter_func_ptr, Func_Noop
d_addr FadeIn_func_ptr, Func_Noop
Expand Down Expand Up @@ -207,6 +210,15 @@ _Actors_sActor_arr:
D_END
.assert * - :- <= kMaxActors * .sizeof(sActor), error
.byte eActor::None
_Devices_sDevice_arr:
: D_STRUCT sDevice
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 11
d_byte BlockCol_u8, 29
d_byte Target_byte, eFlag::PaperJerome03
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
_Passages_sPassage_arr:
: D_STRUCT sPassage
d_byte Exit_bPassage, ePassage::Western | 0
Expand All @@ -224,3 +236,32 @@ _Passages_sPassage_arr:
.ENDPROC

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

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperJerome03_sDialog
.PROC DataA_Dialog_PaperJerome03_sDialog
dlg_Text Paper, DataA_Text1_PaperJerome03_Page1_u8_arr
dlg_Text Paper, DataA_Text1_PaperJerome03_Page2_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text1"

.PROC DataA_Text1_PaperJerome03_Page1_u8_arr
.byte "Day 3: In 2235 we had$"
.byte "the breakthrough that$"
.byte "made the creation of$"
.byte "the mermaids possible.#"
.ENDPROC

.PROC DataA_Text1_PaperJerome03_Page2_u8_arr
.byte "Dr. Alda envisioned a$"
.byte "newfound freedom for$"
.byte "anyone who wanted a$"
.byte "new life.#"
.ENDPROC

;;;=========================================================================;;;
2 changes: 1 addition & 1 deletion src/rooms/sewer_pipe.bg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ ECECECECECECECEB EAECECECECECEB CC EAEB EAEB EAECEC
ECECEB EAECECECECECEB CC EAEB CC EAECECECECECECECECECECECEC
ECECECDN CCDIEIEJDJCC BFDADB BFEAECEC
ECECEBBOBOBOBOBOBOBOBOBOBOBOBJBOEAEBBOBJBOBOBOBOBOBOBOBOBOBOBOEAECEC
ECECEBBE BDEAEBBE DEDF BDEAECEC
ECECEBBE BDEAEBBE DEDF EOBDEAECEC
ECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECEC
ECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECECEC
34 changes: 32 additions & 2 deletions src/rooms/shadow_descent.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
.INCLUDE "../actor.inc"
.INCLUDE "../actors/orc.inc"
.INCLUDE "../actors/townsfolk.inc"
.INCLUDE "../charmap.inc"
.INCLUDE "../device.inc"
.INCLUDE "../dialog.inc"
.INCLUDE "../flag.inc"
.INCLUDE "../macros.inc"
.INCLUDE "../oam.inc"
Expand All @@ -31,7 +33,6 @@
.INCLUDE "../spawn.inc"

.IMPORT DataA_Room_Shadow_sTileset
.IMPORT Data_Empty_sDevice_arr
.IMPORT FuncA_Objects_AnimateLavaTerrain
.IMPORT FuncA_Terrain_FadeInTallRoomWithLava
.IMPORT FuncC_Shadow_DrawBarrierPlatform
Expand Down Expand Up @@ -87,7 +88,7 @@ _Ext_sRoomExt:
d_addr Terrain_sTileset_ptr, DataA_Room_Shadow_sTileset
d_addr Platforms_sPlatform_arr_ptr, _Platforms_sPlatform_arr
d_addr Actors_sActor_arr_ptr, _Actors_sActor_arr
d_addr Devices_sDevice_arr_ptr, Data_Empty_sDevice_arr
d_addr Devices_sDevice_arr_ptr, _Devices_sDevice_arr
d_addr Passages_sPassage_arr_ptr, _Passages_sPassage_arr
d_addr Enter_func_ptr, FuncA_Room_ShadowDescent_EnterRoom
d_addr FadeIn_func_ptr, FuncA_Terrain_FadeInTallRoomWithLava
Expand Down Expand Up @@ -133,6 +134,15 @@ _Actors_sActor_arr:
D_END
.assert * - :- <= kMaxActors * .sizeof(sActor), error
.byte eActor::None
_Devices_sDevice_arr:
: D_STRUCT sDevice
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 20
d_byte BlockCol_u8, 15
d_byte Target_byte, eFlag::PaperJerome20
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
_Passages_sPassage_arr:
: D_STRUCT sPassage
d_byte Exit_bPassage, ePassage::Western | 0
Expand Down Expand Up @@ -219,3 +229,23 @@ _RaiseBothBarriers:
.ENDPROC

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

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperJerome20_sDialog
.PROC DataA_Dialog_PaperJerome20_sDialog
dlg_Text Paper, DataA_Text2_PaperJerome20_Page1_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text2"

.PROC DataA_Text2_PaperJerome20_Page1_u8_arr
.byte "Day 20: In the end,$"
.byte "the problem wasn't our$"
.byte "technology. It was us.#"
.ENDPROC

;;;=========================================================================;;;
34 changes: 17 additions & 17 deletions src/rooms/shadow_descent.bg
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
EMEEENENENEHEMEMEAEHEMEMEAENELENEFEG
EDEDEAENEFEAEJEGEFEEEHEIEBEEENEFEMEC
ENENEF ED ED EDED ED ED EMEDEM
ENEBED EGEBEG


EEENEB EAENEN
EMEC EAEN
EMED EOEOEOEOEOEOEOEOEAEFEEENEN
EGEB EMEDEAEF
ENENEF EGENEBEM
EAEBEM EEEH
ENENEHEEENEBEOEOEOEOEOEO EDEE
ENEBEAEJ ECEM
EEENEBED ECEAEHEG
EMEC EGENENEN
EMED EOEOEOEO EEENENEN
EGEF EMECEAEN
ENELENEB EDEGENEN

ENEBED BDBC EGEBEG
BDBC
BDBC
EEENEB BDBC DABBEAENEN
EMECBACN BDBC DBBACBEAEN
EMED BKBIEOEOEOEOEOEOEOEOEAEFEEENEN
EGEB BC BDBC EMEDEAEF
ENENEFCCDA BDBC CMBAEGENEBEM
EAEBEMBADB BDBC BD EEEH
ENENEHEEENEBEOEOEOEOEOEOBL DA EDEE
ENEBEAEJ BDBC CGBADBBAECEM
EEENEBEDBACN BDBC ECEAEHEG
EMEC BC BDBC CMBAEGENENEN
EMED DA BKBIEOEOEOEOBIBL EEENENEN
EGEFBADBBACH BDBC BD EMECEAEN
ENELENEB BDBC CGBAEDEGENEN
BDBC
ECEC
ENENEKEB EMEM EAEKENEN
ALALALALALALALALALALALALALALALALALAL
Expand Down
5 changes: 3 additions & 2 deletions src/rooms/shadow_entry.asm
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,9 @@ _Passages_sPassage_arr:
.ENDPROC

.PROC DataA_Text0_PaperJerome01_Page2_u8_arr
.byte "And now, I feel that I$"
.byte "must speak out.#"
.byte "In these pages, I feel$"
.byte "compelled to make my$"
.byte "confession.#"
.ENDPROC

;;;=========================================================================;;;
35 changes: 35 additions & 0 deletions src/rooms/shadow_hall.asm
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ _Devices_sDevice_arr:
d_byte BlockCol_u8, 20
d_byte Target_byte, kMinigunMachineIndex
D_END
D_STRUCT sDevice
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 5
d_byte BlockCol_u8, 14
d_byte Target_byte, eFlag::PaperJerome02
D_END
;; Placeholder devices for blocking minigun machine from passing pipes:
D_STRUCT sDevice
d_byte Type_eDevice, eDevice::Placeholder
Expand Down Expand Up @@ -562,3 +568,32 @@ _Broken:
.ENDPROC

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

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperJerome02_sDialog
.PROC DataA_Dialog_PaperJerome02_sDialog
dlg_Text Paper, DataA_Text0_PaperJerome02_Page1_u8_arr
dlg_Text Paper, DataA_Text0_PaperJerome02_Page2_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text0"

.PROC DataA_Text0_PaperJerome02_Page1_u8_arr
.byte "Day 2: I had joined$"
.byte "the research effort as$"
.byte "a junior bioengineer$"
.byte "in early 2230.#"
.ENDPROC

.PROC DataA_Text0_PaperJerome02_Page2_u8_arr
.byte "It was a great honor$"
.byte "for me to be working$"
.byte "alongside the famed$"
.byte "Dr. Zoe Alda.#"
.ENDPROC

;;;=========================================================================;;;
Loading

0 comments on commit 2c7f3e8

Please sign in to comment.