ref: e4e0af4d6713161d46cc0a1d580645ca40d6fa81
dir: /engine/events/hidden_objects/school_blackboard.asm/
PrintBlackboardLinkCableText: call EnableAutoTextBoxDrawing ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, [wHiddenObjectFunctionArgument] call PrintPredefTextID ret LinkCableHelp:: TX_ASM call SaveScreenTilesToBuffer1 ld hl, LinkCableHelpText1 call PrintText xor a ld [wMenuItemOffset], a ; not used ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a ld a, 3 ld [wMaxMenuItem], a ld a, 2 ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a .linkHelpLoop ld hl, wd730 set 6, [hl] coord hl, 0, 0 ld b, 8 ld c, 13 call TextBoxBorder coord hl, 2, 2 ld de, HowToLinkText call PlaceString ld hl, LinkCableHelpText2 call PrintText call HandleMenuInput bit 1, a ; pressed b jr nz, .exit ld a, [wCurrentMenuItem] cp 3 ; pressed a on "STOP READING" jr z, .exit ld hl, wd730 res 6, [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, wd730 res 6, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd LinkCableHelpText1: TX_FAR _LinkCableHelpText1 db "@" LinkCableHelpText2: TX_FAR _LinkCableHelpText2 db "@" HowToLinkText: db "HOW TO LINK" next "COLOSSEUM" next "TRADE CENTER" next "STOP READING@" LinkCableInfoTexts: dw LinkCableInfoText1 dw LinkCableInfoText2 dw LinkCableInfoText3 LinkCableInfoText1: TX_FAR _LinkCableInfoText1 db "@" LinkCableInfoText2: TX_FAR _LinkCableInfoText2 db "@" LinkCableInfoText3: TX_FAR _LinkCableInfoText3 db "@" ViridianSchoolBlackboard:: TX_ASM call SaveScreenTilesToBuffer1 ld hl, ViridianSchoolBlackboardText1 call PrintText xor a ld [wMenuItemOffset], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a ld a, 2 ld [wMaxMenuItem], a ld a, 2 ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a .blackboardLoop ld hl, wd730 set 6, [hl] coord hl, 0, 0 lb bc, 6, 10 call TextBoxBorder coord hl, 1, 2 ld de, StatusAilmentText1 call PlaceString coord hl, 6, 2 ld de, StatusAilmentText2 call PlaceString ld hl, ViridianSchoolBlackboardText2 call PrintText call HandleMenuInput ; pressing up and down is handled in here bit 1, a ; pressed b jr nz, .exitBlackboard bit 4, a ; pressed right 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 5, a ; pressed left 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, wd730 res 6, [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, wd730 res 6, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd ViridianSchoolBlackboardText1: TX_FAR _ViridianSchoolBlackboardText1 db "@" ViridianSchoolBlackboardText2: TX_FAR _ViridianSchoolBlackboardText2 db "@" StatusAilmentText1: db " SLP" next " PSN" next " PAR@" StatusAilmentText2: db " BRN" next " FRZ" next " QUIT@@" ViridianBlackboardStatusPointers: dw ViridianBlackboardSleepText dw ViridianBlackboardPoisonText dw ViridianBlackboardPrlzText dw ViridianBlackboardBurnText dw ViridianBlackboardFrozenText ViridianBlackboardSleepText: TX_FAR _ViridianBlackboardSleepText db "@" ViridianBlackboardPoisonText: TX_FAR _ViridianBlackboardPoisonText db "@" ViridianBlackboardPrlzText: TX_FAR _ViridianBlackboardPrlzText db "@" ViridianBlackboardBurnText: TX_FAR _ViridianBlackboardBurnText db "@" ViridianBlackboardFrozenText: TX_FAR _ViridianBlackboardFrozenText db "@"