Skip to content

Commit

Permalink
Insert a new CPU manual page
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Jul 17, 2024
1 parent 02fab43 commit 676d467
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 31 deletions.
2 changes: 2 additions & 0 deletions src/dialog.asm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
.IMPORT DataA_Dialog_PaperManual3_sDialog
.IMPORT DataA_Dialog_PaperManual4_sDialog
.IMPORT DataA_Dialog_PaperManual5_sDialog
.IMPORT DataA_Dialog_PaperManual6_sDialog
.IMPORT DataA_Dialog_PaperManual9_sDialog
.IMPORT DataA_Dialog_PortraitAnimBank_u8_arr
.IMPORT DataA_Dialog_PortraitFirstTileId_u8_arr
Expand Down Expand Up @@ -518,6 +519,7 @@ _Finish:
d_entry t, PaperManual3, DataA_Dialog_PaperManual3_sDialog
d_entry t, PaperManual4, DataA_Dialog_PaperManual4_sDialog
d_entry t, PaperManual5, DataA_Dialog_PaperManual5_sDialog
d_entry t, PaperManual6, DataA_Dialog_PaperManual6_sDialog
d_entry t, PaperManual9, DataA_Dialog_PaperManual9_sDialog
d_entry t, PrisonFlowerSign, DataA_Dialog_PrisonFlowerSign_sDialog
d_entry t, PrisonUpperAlexCell, DataA_Dialog_PrisonUpperAlexCell_sDialog
Expand Down
1 change: 1 addition & 0 deletions src/dialog.inc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ kDialogEntryCutscene = $ff ; ends the dialog and starts a new cutscene
PaperManual3
PaperManual4
PaperManual5
PaperManual6
PaperManual9
PrisonFlowerSign
PrisonUpperAlexCell
Expand Down
2 changes: 2 additions & 0 deletions src/newgame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ _SetFlags:
.byte eFlag::GardenLandingDroppedIn
.byte eFlag::PaperJerome13
.byte eFlag::UpgradeOpIf
.byte eFlag::PaperManual6
.byte eFlag::PaperJerome12
.byte eFlag::GardenEastTalkedToCorra
.byte eFlag::MermaidHut1MetQueen
Expand All @@ -243,6 +244,7 @@ _SetFlags:
.byte eFlag::UpgradeOpTil
.byte eFlag::TempleAltarColumnBroken
.byte eFlag::PaperJerome28
.byte eFlag::PaperManual9
.byte eFlag::BossTemple
.byte eFlag::UpgradeRam2
.byte eFlag::BreakerTemple
Expand Down
10 changes: 5 additions & 5 deletions src/paper.asm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
d_byte eFlag::PaperManual3, eDialog::PaperManual3
d_byte eFlag::PaperManual4, eDialog::PaperManual4
d_byte eFlag::PaperManual5, eDialog::PaperManual5
d_byte eFlag::PaperManual6, 0 ; TODO
d_byte eFlag::PaperManual6, eDialog::PaperManual6
d_byte eFlag::PaperManual7, 0 ; TODO
d_byte eFlag::PaperManual8, 0 ; TODO
d_byte eFlag::PaperManual9, eDialog::PaperManual9
Expand Down Expand Up @@ -277,10 +277,10 @@ Ram_CollectedPapers_u8_arr: .res kPaperGridCols
d_byte eFlag::PaperJerome36, eArea::Prison ; room: PrisonCell
d_byte eFlag::PaperManual1, eArea::Temple ; room: TempleFoyer
d_byte eFlag::PaperManual2, eArea::Prison ; room: PrisonEscape
d_byte eFlag::PaperManual3, eArea::Lava ; room: LavaStation
d_byte eFlag::PaperManual4, eArea::Factory ; room: FactoryUpper
d_byte eFlag::PaperManual5, eArea::Garden ; room: GardenShaft
d_byte eFlag::PaperManual6, $ff ; TODO
d_byte eFlag::PaperManual3, eArea::Garden ; room: GardenCrossroad
d_byte eFlag::PaperManual4, eArea::Lava ; room: LavaStation
d_byte eFlag::PaperManual5, eArea::Factory ; room: FactoryUpper
d_byte eFlag::PaperManual6, eArea::Garden ; room: GardenShaft
d_byte eFlag::PaperManual7, $ff ; TODO
d_byte eFlag::PaperManual8, $ff ; TODO
d_byte eFlag::PaperManual9, eArea::Temple ; room: TempleApse
Expand Down
20 changes: 10 additions & 10 deletions src/rooms/factory_upper.asm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ _Devices_sDevice_arr:
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 21
d_byte BlockCol_u8, 8
d_byte Target_byte, eFlag::PaperManual4
d_byte Target_byte, eFlag::PaperManual5
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
Expand Down Expand Up @@ -288,33 +288,33 @@ _BottomSmallWheel:

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperManual4_sDialog
.PROC DataA_Dialog_PaperManual4_sDialog
dlg_Text Paper, DataA_Text1_PaperManual4_Page1_u8_arr
dlg_Text Paper, DataA_Text1_PaperManual4_Page2_u8_arr
dlg_Text Paper, DataA_Text1_PaperManual4_Page3_u8_arr
.EXPORT DataA_Dialog_PaperManual5_sDialog
.PROC DataA_Dialog_PaperManual5_sDialog
dlg_Text Paper, DataA_Text1_PaperManual5_Page1_u8_arr
dlg_Text Paper, DataA_Text1_PaperManual5_Page2_u8_arr
dlg_Text Paper, DataA_Text1_PaperManual5_Page3_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text1"

.PROC DataA_Text1_PaperManual4_Page1_u8_arr
.byte "CPU FIELD MANUAL p.4:$"
.PROC DataA_Text1_PaperManual5_Page1_u8_arr
.byte "CPU FIELD MANUAL p.5:$"
.byte "Common register names:$"
.byte " F:flag D:distance$"
.byte " J:index K:key/lock#"
.ENDPROC

.PROC DataA_Text1_PaperManual4_Page2_u8_arr
.PROC DataA_Text1_PaperManual5_Page2_u8_arr
.byte "L/R:lever M:mirror$"
.byte " P:power S:sensor$"
.byte " T:turn U:upper$"
.byte " V:valve W:weight#"
.ENDPROC

.PROC DataA_Text1_PaperManual4_Page3_u8_arr
.PROC DataA_Text1_PaperManual5_Page3_u8_arr
.byte " X:horzizontal offset$"
.byte " Y:vertical ascent$"
.byte " Z:vertical descent#"
Expand Down
35 changes: 35 additions & 0 deletions src/rooms/garden_crossroad.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
.INCLUDE "../actors/grub.inc"
.INCLUDE "../charmap.inc"
.INCLUDE "../device.inc"
.INCLUDE "../dialog.inc"
.INCLUDE "../flag.inc"
.INCLUDE "../machine.inc"
.INCLUDE "../machines/lift.inc"
Expand Down Expand Up @@ -181,6 +182,12 @@ _Devices_sDevice_arr:
d_byte BlockCol_u8, 4
d_byte Target_byte, sState::Lever_u8
D_END
D_STRUCT sDevice
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 13
d_byte BlockCol_u8, 7
d_byte Target_byte, eFlag::PaperManual3
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
_Passages_sPassage_arr:
Expand Down Expand Up @@ -282,3 +289,31 @@ _ReadL:
.ENDPROC

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

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperManual3_sDialog
.PROC DataA_Dialog_PaperManual3_sDialog
dlg_Text Paper, DataA_Text2_PaperManual3_Page1_u8_arr
dlg_Text Paper, DataA_Text2_PaperManual3_Page2_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text2"

.PROC DataA_Text2_PaperManual3_Page1_u8_arr
.byte "CPU FIELD MANUAL p.3:$"
.byte "A program loops until$"
.byte "an END is reached or$"
.byte "an error occurs.#"
.ENDPROC

.PROC DataA_Text2_PaperManual3_Page2_u8_arr
.byte "An error occurs if a$"
.byte "machine tries to MOVE$"
.byte "or ACT but cannot.#"
.ENDPROC

;;;=========================================================================;;;
16 changes: 8 additions & 8 deletions src/rooms/garden_shaft.asm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ _Devices_sDevice_arr:
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 11
d_byte BlockCol_u8, 1
d_byte Target_byte, eFlag::PaperManual5
d_byte Target_byte, eFlag::PaperManual6
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
Expand Down Expand Up @@ -299,25 +299,25 @@ _Passages_sPassage_arr:

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperManual5_sDialog
.PROC DataA_Dialog_PaperManual5_sDialog
dlg_Text Paper, DataA_Text0_PaperManual5_Page1_u8_arr
dlg_Text Paper, DataA_Text0_PaperManual5_Page2_u8_arr
.EXPORT DataA_Dialog_PaperManual6_sDialog
.PROC DataA_Dialog_PaperManual6_sDialog
dlg_Text Paper, DataA_Text0_PaperManual6_Page1_u8_arr
dlg_Text Paper, DataA_Text0_PaperManual6_Page2_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text0"

.PROC DataA_Text0_PaperManual5_Page1_u8_arr
.byte "CPU FIELD MANUAL p.5:$"
.PROC DataA_Text0_PaperManual6_Page1_u8_arr
.byte "CPU FIELD MANUAL p.6:$"
.byte "It can be useful to$"
.byte "compare one register$"
.byte "directly to another.#"
.ENDPROC

.PROC DataA_Text0_PaperManual5_Page2_u8_arr
.PROC DataA_Text0_PaperManual6_Page2_u8_arr
.byte "For example$"
.byte " :IF Y>L$"
.byte " :MOVE ", kTileIdBgArrowDown, "$"
Expand Down
16 changes: 8 additions & 8 deletions src/rooms/lava_station.asm
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ _Devices_sDevice_arr:
d_byte Type_eDevice, eDevice::Paper
d_byte BlockRow_u8, 4
d_byte BlockCol_u8, 27
d_byte Target_byte, eFlag::PaperManual3
d_byte Target_byte, eFlag::PaperManual4
D_END
.assert * - :- <= kMaxDevices * .sizeof(sDevice), error
.byte eDevice::None
Expand Down Expand Up @@ -243,25 +243,25 @@ _ValvePipePlatformIndex_u8_arr4:

.SEGMENT "PRGA_Dialog"

.EXPORT DataA_Dialog_PaperManual3_sDialog
.PROC DataA_Dialog_PaperManual3_sDialog
dlg_Text Paper, DataA_Text0_PaperManual3_Page1_u8_arr
dlg_Text Paper, DataA_Text0_PaperManual3_Page2_u8_arr
.EXPORT DataA_Dialog_PaperManual4_sDialog
.PROC DataA_Dialog_PaperManual4_sDialog
dlg_Text Paper, DataA_Text0_PaperManual4_Page1_u8_arr
dlg_Text Paper, DataA_Text0_PaperManual4_Page2_u8_arr
dlg_Done
.ENDPROC

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

.SEGMENT "PRGA_Text0"

.PROC DataA_Text0_PaperManual3_Page1_u8_arr
.byte "CPU FIELD MANUAL p.3:$"
.PROC DataA_Text0_PaperManual4_Page1_u8_arr
.byte "CPU FIELD MANUAL p.4:$"
.byte "Every machine has an$"
.byte "`A' register that you$"
.byte "can COPY values into.#"
.ENDPROC

.PROC DataA_Text0_PaperManual3_Page2_u8_arr
.PROC DataA_Text0_PaperManual4_Page2_u8_arr
.byte "Unlike other registers$"
.byte "it does nothing on its$"
.byte "own, but it can store$"
Expand Down

0 comments on commit 676d467

Please sign in to comment.