diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2025-06-30 12:47:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-30 12:47:22 -0400 |
| commit | 56c405de09ce267c4cfbc68a15c37b2ff51c635a (patch) | |
| tree | 47d25c237e9af824f7a57295a2d2e298b194a8e6 /engine/menus/main_menu.asm | |
| parent | Distinguish single trainer pics section from Pokemon pics (diff) | |
| download | pokeyellow-56c405de09ce267c4cfbc68a15c37b2ff51c635a.tar.gz pokeyellow-56c405de09ce267c4cfbc68a15c37b2ff51c635a.tar.xz pokeyellow-56c405de09ce267c4cfbc68a15c37b2ff51c635a.zip | |
Replace hardware_constants.asm with hardware.inc (#511)
Diffstat (limited to 'engine/menus/main_menu.asm')
| -rw-r--r-- | engine/menus/main_menu.asm | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 4b430f6a..44219b14 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -61,12 +61,12 @@ MainMenu: ld [wTopMenuItemX], a inc a ld [wTopMenuItemY], a - ld a, A_BUTTON | B_BUTTON | START + ld a, PAD_A | PAD_B | PAD_START ld [wMenuWatchedKeys], a ld a, [wSaveFileStatus] ld [wMaxMenuItem], a call HandleMenuInput - bit BIT_B_BUTTON, a + bit B_PAD_B, a jp nz, DisplayTitleScreen ; if so, go back to the title screen ld c, 20 call DelayFrames @@ -99,9 +99,9 @@ MainMenu: ldh [hJoyHeld], a call Joypad ldh a, [hJoyHeld] - bit BIT_A_BUTTON, a + bit B_PAD_A, a jr nz, .pressedA - bit BIT_B_BUTTON, a + bit B_PAD_B, a jp nz, .mainMenuLoop jr .inputLoop .pressedA @@ -166,7 +166,7 @@ LinkMenu: ld a, 2 ld [hli], a ASSERT wMaxMenuItem + 1 == wMenuWatchedKeys - ASSERT 2 + 1 == A_BUTTON | B_BUTTON + ASSERT 2 + 1 == PAD_A | PAD_B inc a ld [hli], a ASSERT wMenuWatchedKeys + 1 == wLastMenuItem @@ -174,7 +174,7 @@ LinkMenu: ld [hl], a .waitForInputLoop call HandleMenuInput - and A_BUTTON | B_BUTTON + and PAD_A | PAD_B add a add a ld b, a @@ -224,14 +224,14 @@ LinkMenu: jr nz, .skipStartingTransfer call DelayFrame call DelayFrame - ld a, START_TRANSFER_INTERNAL_CLOCK + ld a, SC_START | SC_INTERNAL ldh [rSC], a .skipStartingTransfer ld b, " " ld c, " " ld d, "▷" ld a, [wLinkMenuSelectionSendBuffer] - and B_BUTTON << 2 ; was B button pressed? + and PAD_B << 2 ; was B button pressed? jr nz, .updateCursorPosition ; A button was pressed ld a, [wCurrentMenuItem] @@ -254,7 +254,7 @@ LinkMenu: call DelayFrames call LoadScreenTilesFromBuffer1 ld a, [wLinkMenuSelectionSendBuffer] - and B_BUTTON << 2 ; was B button pressed? + and PAD_B << 2 ; was B button pressed? jr nz, .choseCancel ; cancel if B pressed ld a, [wCurrentMenuItem] cp $2 @@ -487,13 +487,13 @@ DisplayOptionMenu: call JoypadLowSensitivity ldh a, [hJoy5] ld b, a - and A_BUTTON | B_BUTTON | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ; any key besides select pressed? + and PAD_A | PAD_B | PAD_START | PAD_RIGHT | PAD_LEFT | PAD_UP | PAD_DOWN ; any key besides select pressed? jr z, .getJoypadStateLoop - bit BIT_B_BUTTON, b + bit B_PAD_B, b jr nz, .exitMenu - bit BIT_START, b + bit B_PAD_START, b jr nz, .exitMenu - bit BIT_A_BUTTON, b + bit B_PAD_A, b jr z, .checkDirectionKeys ld a, [wTopMenuItemY] cp 16 ; is the cursor on Cancel? @@ -508,9 +508,9 @@ DisplayOptionMenu: jp .loop .checkDirectionKeys ld a, [wTopMenuItemY] - bit BIT_D_DOWN, b + bit B_PAD_DOWN, b jr nz, .downPressed - bit BIT_D_UP, b + bit B_PAD_UP, b jr nz, .upPressed cp 8 ; cursor in Battle Animation section? jr z, .cursorInBattleAnimation @@ -519,7 +519,7 @@ DisplayOptionMenu: cp 16 ; cursor on Cancel? jr z, .loop .cursorInTextSpeed - bit BIT_D_LEFT, b + bit B_PAD_LEFT, b jp nz, .pressedLeftInTextSpeed jp .pressedRightInTextSpeed .downPressed @@ -699,11 +699,11 @@ CheckForPlayerNameInSRAM: ; Check if the player name data in SRAM has a string terminator character ; (indicating that a name may have been saved there) and return whether it does ; in carry. - ld a, SRAM_ENABLE - ld [MBC1SRamEnable], a + ld a, RAMG_SRAM_ENABLE + ld [rRAMG], a ld a, $1 - ld [MBC1SRamBankingMode], a - ld [MBC1SRamBank], a + ld [rBMODE], a + ld [rRAMB], a ld b, NAME_LENGTH ld hl, sPlayerName .loop @@ -714,13 +714,13 @@ CheckForPlayerNameInSRAM: jr nz, .loop ; not found xor a - ld [MBC1SRamEnable], a - ld [MBC1SRamBankingMode], a + ld [rRAMG], a + ld [rBMODE], a and a ret .found xor a - ld [MBC1SRamEnable], a - ld [MBC1SRamBankingMode], a + ld [rRAMG], a + ld [rBMODE], a scf ret |
