summaryrefslogtreecommitdiff
path: root/engine/events/hidden_objects/school_notebooks.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 13:23:51 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 13:23:51 -0400
commite882708b85e19cf30e05fcf31ccedc5f03367702 (patch)
tree05d84be6cc3b04ccabdc4071f601a9761e845775 /engine/events/hidden_objects/school_notebooks.asm
parent6bd86e10c32cd7b464425adfc01621f3ff6726aa (diff)
Split up engine/events/hidden_object_functions
Diffstat (limited to 'engine/events/hidden_objects/school_notebooks.asm')
-rw-r--r--engine/events/hidden_objects/school_notebooks.asm65
1 files changed, 65 insertions, 0 deletions
diff --git a/engine/events/hidden_objects/school_notebooks.asm b/engine/events/hidden_objects/school_notebooks.asm
new file mode 100644
index 00000000..f5cc1341
--- /dev/null
+++ b/engine/events/hidden_objects/school_notebooks.asm
@@ -0,0 +1,65 @@
+PrintNotebookText:
+ call EnableAutoTextBoxDrawing
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld a, [wHiddenObjectFunctionArgument]
+ jp PrintPredefTextID
+
+TMNotebook::
+ TX_FAR TMNotebookText
+ TX_WAIT
+ db "@"
+
+ViridianSchoolNotebook::
+ TX_ASM
+ ld hl, ViridianSchoolNotebookText1
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText2
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText3
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText4
+ call PrintText
+ ld hl, ViridianSchoolNotebookText5
+ call PrintText
+.doneReading
+ jp TextScriptEnd
+
+TurnPageSchoolNotebook:
+ ld hl, TurnPageText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ ret
+
+TurnPageText:
+ TX_FAR _TurnPageText
+ db "@"
+
+ViridianSchoolNotebookText5:
+ TX_FAR _ViridianSchoolNotebookText5
+ TX_WAIT
+ db "@"
+
+ViridianSchoolNotebookText1:
+ TX_FAR _ViridianSchoolNotebookText1
+ db "@"
+
+ViridianSchoolNotebookText2:
+ TX_FAR _ViridianSchoolNotebookText2
+ db "@"
+
+ViridianSchoolNotebookText3:
+ TX_FAR _ViridianSchoolNotebookText3
+ db "@"
+
+ViridianSchoolNotebookText4:
+ TX_FAR _ViridianSchoolNotebookText4
+ db "@"