diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 13:23:51 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 13:23:51 -0400 |
| commit | e882708b85e19cf30e05fcf31ccedc5f03367702 (patch) | |
| tree | 05d84be6cc3b04ccabdc4071f601a9761e845775 /engine/events/hidden_objects/bills_house_pc.asm | |
| parent | Reorganize home header (diff) | |
| download | pokeyellow-e882708b85e19cf30e05fcf31ccedc5f03367702.tar.gz pokeyellow-e882708b85e19cf30e05fcf31ccedc5f03367702.tar.xz pokeyellow-e882708b85e19cf30e05fcf31ccedc5f03367702.zip | |
Split up engine/events/hidden_object_functions
Diffstat (limited to 'engine/events/hidden_objects/bills_house_pc.asm')
| -rw-r--r-- | engine/events/hidden_objects/bills_house_pc.asm | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/engine/events/hidden_objects/bills_house_pc.asm b/engine/events/hidden_objects/bills_house_pc.asm new file mode 100644 index 00000000..1ffb6954 --- /dev/null +++ b/engine/events/hidden_objects/bills_house_pc.asm @@ -0,0 +1,134 @@ +BillsHousePC: + call EnableAutoTextBoxDrawing + ld a, [wSpriteStateData1 + 9] + cp SPRITE_FACING_UP + ret nz + CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING + jr nz, .displayBillsHousePokemonList + CheckEventReuseA EVENT_USED_CELL_SEPARATOR_ON_BILL + jr nz, .displayBillsHouseMonitorText + CheckEventReuseA EVENT_BILL_SAID_USE_CELL_SEPARATOR + jr nz, .doCellSeparator +.displayBillsHouseMonitorText + tx_pre_jump BillsHouseMonitorText +.doCellSeparator + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + tx_pre BillsHouseInitiatedText + ld c, 32 + call DelayFrames + ld a, SFX_TINK + call PlaySound + call WaitForSoundToFinish + ld c, 80 + call DelayFrames + ld a, SFX_SHRINK + call PlaySound + call WaitForSoundToFinish + ld c, 48 + call DelayFrames + ld a, SFX_TINK + call PlaySound + call WaitForSoundToFinish + ld c, 32 + call DelayFrames + ld a, SFX_GET_ITEM_1 + call PlaySound + call WaitForSoundToFinish + call PlayDefaultMusic + SetEvent EVENT_USED_CELL_SEPARATOR_ON_BILL + ret +.displayBillsHousePokemonList + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + tx_pre BillsHousePokemonList + ret + +BillsHouseMonitorText:: + TX_FAR _BillsHouseMonitorText + db "@" + +BillsHouseInitiatedText:: + TX_FAR _BillsHouseInitiatedText + TX_BLINK + TX_ASM + ld a, $ff + ld [wNewSoundID], a + call PlaySound + ld c, 16 + call DelayFrames + ld a, SFX_SWITCH + call PlaySound + call WaitForSoundToFinish + ld c, 60 + call DelayFrames + jp TextScriptEnd + +BillsHousePokemonList:: + TX_ASM + call SaveScreenTilesToBuffer1 + ld hl, BillsHousePokemonListText1 + 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, 4 + ld [wMaxMenuItem], a + ld a, 2 + ld [wTopMenuItemY], a + ld a, 1 + ld [wTopMenuItemX], a +.billsPokemonLoop + ld hl, wd730 + set 6, [hl] + coord hl, 0, 0 + ld b, 10 + ld c, 9 + call TextBoxBorder + coord hl, 2, 2 + ld de, BillsMonListText + call PlaceString + ld hl, BillsHousePokemonListText2 + call PrintText + call SaveScreenTilesToBuffer2 + call HandleMenuInput + bit 1, a ; pressed b + jr nz, .cancel + ld a, [wCurrentMenuItem] + add EEVEE + cp EEVEE + jr z, .displayPokedex + cp FLAREON + jr z, .displayPokedex + cp JOLTEON + jr z, .displayPokedex + cp VAPOREON + jr z, .displayPokedex + jr .cancel +.displayPokedex + call DisplayPokedex + call LoadScreenTilesFromBuffer2 + jr .billsPokemonLoop +.cancel + ld hl, wd730 + res 6, [hl] + call LoadScreenTilesFromBuffer2 + jp TextScriptEnd + +BillsHousePokemonListText1: + TX_FAR _BillsHousePokemonListText1 + db "@" + +BillsMonListText: + db "EEVEE" + next "FLAREON" + next "JOLTEON" + next "VAPOREON" + next "CANCEL@" + +BillsHousePokemonListText2: + TX_FAR _BillsHousePokemonListText2 + db "@" |
