aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/hidden_objects/school_blackboard.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2026-01-07 22:05:37 -0500
committerGitHub <noreply@github.com>2026-01-07 22:05:37 -0500
commit0e49aef88ef94b9d3e80d89e4eb718e9425045df (patch)
treec63433287b9e2aceda14ff977cc06875cd0735d3 /engine/events/hidden_objects/school_blackboard.asm
parentUse macros to enforce "missable/hide/show object" constraints, and rename the... (diff)
downloadpokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.tar.gz
pokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.tar.xz
pokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.zip
Use macros to enforce "hidden object" constraints, and rename them to "hidden events" (#559)
Diffstat (limited to 'engine/events/hidden_objects/school_blackboard.asm')
-rw-r--r--engine/events/hidden_objects/school_blackboard.asm224
1 files changed, 0 insertions, 224 deletions
diff --git a/engine/events/hidden_objects/school_blackboard.asm b/engine/events/hidden_objects/school_blackboard.asm
deleted file mode 100644
index 4ac83953..00000000
--- a/engine/events/hidden_objects/school_blackboard.asm
+++ /dev/null
@@ -1,224 +0,0 @@
-PrintBlackboardLinkCableText:
- call EnableAutoTextBoxDrawing
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wHiddenObjectFunctionArgument]
- call PrintPredefTextID
- ret
-
-LinkCableHelp::
- text_asm
- call SaveScreenTilesToBuffer1
- ld hl, LinkCableHelpText1
- call PrintText
- xor a
- ld [wMenuItemOffset], a ; not used
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, PAD_A | PAD_B
- ld [wMenuWatchedKeys], a
- ld a, 3
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.linkHelpLoop
- ld hl, wStatusFlags5
- set BIT_NO_TEXT_DELAY, [hl]
- hlcoord 0, 0
- ld b, 8
- ld c, 13
- call TextBoxBorder
- hlcoord 2, 2
- ld de, HowToLinkText
- call PlaceString
- ld hl, LinkCableHelpText2
- call PrintText
- call HandleMenuInput
- bit B_PAD_B, a
- jr nz, .exit
- ld a, [wCurrentMenuItem]
- cp 3 ; pressed a on "STOP READING"
- jr z, .exit
- ld hl, wStatusFlags5
- res BIT_NO_TEXT_DELAY, [hl]
- ld hl, LinkCableInfoTexts
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
- jp .linkHelpLoop
-.exit
- ld hl, wStatusFlags5
- res BIT_NO_TEXT_DELAY, [hl]
- call LoadScreenTilesFromBuffer1
- jp TextScriptEnd
-
-LinkCableHelpText1:
- text_far _LinkCableHelpText1
- text_end
-
-LinkCableHelpText2:
- text_far _LinkCableHelpText2
- text_end
-
-HowToLinkText:
- db "HOW TO LINK"
- next "COLOSSEUM"
- next "TRADE CENTER"
- next "STOP READING@"
-
-LinkCableInfoTexts:
- dw LinkCableInfoText1
- dw LinkCableInfoText2
- dw LinkCableInfoText3
-
-LinkCableInfoText1:
- text_far _LinkCableInfoText1
- text_end
-
-LinkCableInfoText2:
- text_far _LinkCableInfoText2
- text_end
-
-LinkCableInfoText3:
- text_far _LinkCableInfoText3
- text_end
-
-ViridianSchoolBlackboard::
- text_asm
- call SaveScreenTilesToBuffer1
- ld hl, ViridianSchoolBlackboardText1
- call PrintText
- xor a
- ld [wMenuItemOffset], a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B
- ld [wMenuWatchedKeys], a
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.blackboardLoop
- ld hl, wStatusFlags5
- set BIT_NO_TEXT_DELAY, [hl]
- hlcoord 0, 0
- lb bc, 6, 10
- call TextBoxBorder
- hlcoord 1, 2
- ld de, StatusAilmentText1
- call PlaceString
- hlcoord 6, 2
- ld de, StatusAilmentText2
- call PlaceString
- ld hl, ViridianSchoolBlackboardText2
- call PrintText
- call HandleMenuInput ; pressing up and down is handled in here
- bit B_PAD_B, a ; pressed b
- jr nz, .exitBlackboard
- bit B_PAD_RIGHT, a
- jr z, .didNotPressRight
- ; move cursor to right column
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 6
- ld [wTopMenuItemX], a
- ld a, 3 ; in the the right column, use an offset to prevent overlap
- ld [wMenuItemOffset], a
- jr .blackboardLoop
-.didNotPressRight
- bit B_PAD_LEFT, a
- jr z, .didNotPressLeftOrRight
- ; move cursor to left column
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- xor a
- ld [wMenuItemOffset], a
- jr .blackboardLoop
-.didNotPressLeftOrRight
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wMenuItemOffset]
- add b
- cp 5 ; cursor is pointing to "QUIT"
- jr z, .exitBlackboard
- ; we must have pressed a on a status condition
- ; so print the text
- ld hl, wStatusFlags5
- res BIT_NO_TEXT_DELAY, [hl]
- ld hl, ViridianBlackboardStatusPointers
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
- jp .blackboardLoop
-.exitBlackboard
- ld hl, wStatusFlags5
- res BIT_NO_TEXT_DELAY, [hl]
- call LoadScreenTilesFromBuffer1
- jp TextScriptEnd
-
-ViridianSchoolBlackboardText1:
- text_far _ViridianSchoolBlackboardText1
- text_end
-
-ViridianSchoolBlackboardText2:
- text_far _ViridianSchoolBlackboardText2
- text_end
-
-StatusAilmentText1:
- db " SLP"
- next " PSN"
- next " PAR@"
-
-StatusAilmentText2:
- db " BRN"
- next " FRZ"
- next " QUIT@"
-
- db "@" ; unused
-
-ViridianBlackboardStatusPointers:
- dw ViridianBlackboardSleepText
- dw ViridianBlackboardPoisonText
- dw ViridianBlackboardPrlzText
- dw ViridianBlackboardBurnText
- dw ViridianBlackboardFrozenText
-
-ViridianBlackboardSleepText:
- text_far _ViridianBlackboardSleepText
- text_end
-
-ViridianBlackboardPoisonText:
- text_far _ViridianBlackboardPoisonText
- text_end
-
-ViridianBlackboardPrlzText:
- text_far _ViridianBlackboardPrlzText
- text_end
-
-ViridianBlackboardBurnText:
- text_far _ViridianBlackboardBurnText
- text_end
-
-ViridianBlackboardFrozenText:
- text_far _ViridianBlackboardFrozenText
- text_end