diff options
Diffstat (limited to 'engine/menus')
| -rw-r--r-- | engine/menus/draw_start_menu.asm | 2 | ||||
| -rw-r--r-- | engine/menus/league_pc.asm | 2 | ||||
| -rw-r--r-- | engine/menus/link_menu.asm | 10 | ||||
| -rw-r--r-- | engine/menus/main_menu.asm | 28 | ||||
| -rw-r--r-- | engine/menus/naming_screen.asm | 4 | ||||
| -rw-r--r-- | engine/menus/options.asm | 26 | ||||
| -rw-r--r-- | engine/menus/pc.asm | 2 | ||||
| -rw-r--r-- | engine/menus/players_pc.asm | 4 | ||||
| -rw-r--r-- | engine/menus/pokedex.asm | 24 | ||||
| -rw-r--r-- | engine/menus/save.asm | 52 | ||||
| -rw-r--r-- | engine/menus/start_sub_menus.asm | 8 | ||||
| -rw-r--r-- | engine/menus/text_box.asm | 10 | ||||
| -rw-r--r-- | engine/menus/unused_input.asm | 6 |
13 files changed, 89 insertions, 89 deletions
diff --git a/engine/menus/draw_start_menu.asm b/engine/menus/draw_start_menu.asm index cb2e5988..a72236c3 100644 --- a/engine/menus/draw_start_menu.asm +++ b/engine/menus/draw_start_menu.asm @@ -10,7 +10,7 @@ DrawStartMenu:: lb bc, 12, 8 .drawTextBoxBorder call TextBoxBorder - ld a, D_DOWN | D_UP | START | B_BUTTON | A_BUTTON + ld a, PAD_DOWN | PAD_UP | PAD_START | PAD_B | PAD_A ld [wMenuWatchedKeys], a ld a, $02 ld [wTopMenuItemY], a ; Y position of first menu choice diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm index b9151084..ba6ca318 100644 --- a/engine/menus/league_pc.asm +++ b/engine/menus/league_pc.asm @@ -57,7 +57,7 @@ LeaguePCShowTeam: call LeaguePCShowMon call WaitForTextScrollButtonPress ldh a, [hJoyHeld] - bit BIT_B_BUTTON, a + bit B_PAD_B, a jr nz, .exit ld hl, wHallOfFame + HOF_MON ld de, wHallOfFame diff --git a/engine/menus/link_menu.asm b/engine/menus/link_menu.asm index 9b151388..94384cb3 100644 --- a/engine/menus/link_menu.asm +++ b/engine/menus/link_menu.asm @@ -667,14 +667,14 @@ LinkMenu: ld a, 3 ld [hli], a ASSERT wMaxMenuItem + 1 == wMenuWatchedKeys - ASSERT 2 == B_BUTTON + ASSERT 2 == PAD_B ld [hli], a ASSERT wMenuWatchedKeys + 1 == wLastMenuItem xor a ld [hl], a .waitForInputLoop call HandleMenuInput - and A_BUTTON | B_BUTTON + and PAD_A | PAD_B add a add a ld b, a @@ -733,7 +733,7 @@ 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, " " @@ -741,7 +741,7 @@ LinkMenu: ld d, " " ld e, "▷" 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] @@ -762,7 +762,7 @@ LinkMenu: call Func_f59ec 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 diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index a8e37ff2..d739e560 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -59,12 +59,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 @@ -97,9 +97,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 @@ -274,12 +274,12 @@ DisplayOptionMenu: ret CheckForPlayerNameInSRAM: - ld a, SRAM_ENABLE - ld [MBC1SRamEnable], a - ld a, SRAM_BANKING_MODE - ld [MBC1SRamBankingMode], a - ASSERT SRAM_BANKING_MODE == BANK("Save Data") - ld [MBC1SRamBank], a + ld a, RAMG_SRAM_ENABLE + ld [rRAMG], a + ld a, BMODE_ADVANCED + ld [rBMODE], a + ASSERT BMODE_ADVANCED == BANK("Save Data") + ld [rRAMB], a ld b, NAME_LENGTH ld hl, sPlayerName .loop @@ -289,13 +289,13 @@ CheckForPlayerNameInSRAM: dec b jr nz, .loop 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 diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index 9d477b34..815fa54f 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -215,11 +215,11 @@ DisplayNamingScreen: .didNotPressED ld a, [wCurrentMenuItem] cp $6 ; case switch row - jr nz, .didNotPressCaseSwtich + jr nz, .didNotPressCaseSwitch ld a, [wTopMenuItemX] cp $1 ; case switch column jr z, .pressedA_changedCase -.didNotPressCaseSwtich +.didNotPressCaseSwitch ld hl, wMenuCursorLocation ld a, [hli] ld h, [hl] diff --git a/engine/menus/options.asm b/engine/menus/options.asm index a2a96dd6..c7e16d55 100644 --- a/engine/menus/options.asm +++ b/engine/menus/options.asm @@ -3,7 +3,7 @@ DisplayOptionMenu_: .optionMenuLoop call JoypadLowSensitivity ldh a, [hJoy5] - and START | B_BUTTON + and PAD_START | PAD_B jr nz, .exitOptionMenu call OptionsControl jr c, .dpadDelay @@ -43,9 +43,9 @@ OptionMenuJumpTable: OptionsMenu_TextSpeed: call GetTextSpeed ldh a, [hJoy5] - bit BIT_D_RIGHT, a + bit B_PAD_RIGHT, a jr nz, .pressedRight - bit BIT_D_LEFT, a + bit B_PAD_LEFT, a jr nz, .pressedLeft jr .nonePressed .pressedRight @@ -118,7 +118,7 @@ GetTextSpeed: OptionsMenu_BattleAnimations: ldh a, [hJoy5] - and D_RIGHT | D_LEFT + and PAD_LEFT | PAD_RIGHT jr nz, .asm_41d33 ld a, [wOptions] and $80 ; mask other bits @@ -153,7 +153,7 @@ AnimationOffText: OptionsMenu_BattleStyle: ldh a, [hJoy5] - and D_LEFT | D_RIGHT + and PAD_LEFT | PAD_RIGHT jr nz, .asm_41d6b ld a, [wOptions] and $40 ; mask other bits @@ -193,9 +193,9 @@ OptionsMenu_SpeakerSettings: swap a ld c, a ldh a, [hJoy5] - bit BIT_D_RIGHT, a + bit B_PAD_RIGHT, a jr nz, .pressedRight - bit BIT_D_LEFT, a + bit B_PAD_LEFT, a jr nz, .pressedLeft jr .asm_41dca .pressedRight @@ -212,7 +212,7 @@ OptionsMenu_SpeakerSettings: swap a ld b, a xor a - ldh [rNR51], a + ldh [rAUDTERM], a ld a, [wOptions] and $cf or b @@ -248,9 +248,9 @@ Earphone3SoundText: OptionsMenu_GBPrinterBrightness: call Func_41e7b ldh a, [hJoy5] - bit BIT_D_RIGHT, a + bit B_PAD_RIGHT, a jr nz, .pressedRight - bit BIT_D_LEFT, a + bit B_PAD_LEFT, a jr nz, .pressedLeft jr .asm_41e32 .pressedRight @@ -340,7 +340,7 @@ OptionsMenu_Dummy: OptionsMenu_Cancel: ldh a, [hJoy5] - and A_BUTTON + and PAD_A jr nz, .pressedCancel and a ret @@ -351,9 +351,9 @@ OptionsMenu_Cancel: OptionsControl: ld hl, wOptionsCursorLocation ldh a, [hJoy5] - cp D_DOWN + cp PAD_DOWN jr z, .pressedDown - cp D_UP + cp PAD_UP jr z, .pressedUp and a ret diff --git a/engine/menus/pc.asm b/engine/menus/pc.asm index 33dd3c2c..b4571ac3 100644 --- a/engine/menus/pc.asm +++ b/engine/menus/pc.asm @@ -14,7 +14,7 @@ PCMainMenu: ld hl, wMiscFlags set BIT_NO_MENU_BUTTON_SOUND, [hl] call HandleMenuInput - bit BIT_B_BUTTON, a + bit B_PAD_B, a jp nz, LogOff ld a, [wMaxMenuItem] cp 2 diff --git a/engine/menus/players_pc.asm b/engine/menus/players_pc.asm index 630b8f87..01d13afa 100644 --- a/engine/menus/players_pc.asm +++ b/engine/menus/players_pc.asm @@ -38,7 +38,7 @@ PlayerPCMenu: inc hl ld a, 3 ld [hli], a ; wMaxMenuItem - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [hli], a ; wMenuWatchedKeys xor a ld [hl], a @@ -49,7 +49,7 @@ PlayerPCMenu: ld hl, WhatDoYouWantText call PrintText call HandleMenuInput - bit BIT_B_BUTTON, a + bit B_PAD_B, a jp nz, ExitPlayerPC call PlaceUnfilledArrowMenuCursor ld a, [wCurrentMenuItem] diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm index 88a057df..07b24392 100644 --- a/engine/menus/pokedex.asm +++ b/engine/menus/pokedex.asm @@ -28,7 +28,7 @@ ShowPokedexMenu: inc hl ld a, 6 ld [hli], a ; max menu item ID - ld [hl], D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON + ld [hl], PAD_LEFT | PAD_RIGHT | PAD_B | PAD_A call HandlePokedexListMenu jr c, .goToSideMenu ; if the player chose a pokemon from the list .exitPokedex @@ -92,7 +92,7 @@ HandlePokedexSideMenu: inc hl ld a, 4 ld [hli], a ; max menu item ID - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [hli], a ; menu watched keys (A button and B button) xor a ld [hli], a ; old menu item ID @@ -100,7 +100,7 @@ HandlePokedexSideMenu: ldh [hJoy7], a .handleMenuInput call HandleMenuInput - bit BIT_B_BUTTON, a + bit B_PAD_B, a ld b, 2 jr nz, .buttonBPressed ld a, [wCurrentMenuItem] @@ -191,12 +191,12 @@ HandlePokedexListMenu: call Pokedex_PlacePokemonList call GBPalNormal call HandleMenuInput - bit BIT_B_BUTTON, a ; was the B button pressed? + bit B_PAD_B, a ; was the B button pressed? jp nz, .buttonBPressed - bit BIT_A_BUTTON, a ; was the A button pressed? + bit B_PAD_A, a ; was the A button pressed? jp nz, .buttonAPressed .checkIfUpPressed - bit BIT_D_UP, a ; was Up pressed? + bit B_PAD_UP, a ; was Up pressed? jr z, .checkIfDownPressed .upPressed ; scroll up one row ld a, [wListScrollOffset] @@ -207,7 +207,7 @@ HandlePokedexListMenu: jp .loop .checkIfDownPressed - bit BIT_D_DOWN, a ; was Down pressed? + bit B_PAD_DOWN, a ; was Down pressed? jr z, .checkIfRightPressed .downPressed ; scroll down one row ld a, [wDexMaxSeenMon] @@ -223,7 +223,7 @@ HandlePokedexListMenu: jp .loop .checkIfRightPressed - bit BIT_D_RIGHT, a ; was Right pressed? + bit B_PAD_RIGHT, a ; was Right pressed? jr z, .checkIfLeftPressed .rightPressed ; scroll down 7 rows ld a, [wDexMaxSeenMon] @@ -242,7 +242,7 @@ HandlePokedexListMenu: jp .loop .checkIfLeftPressed ; scroll up 7 rows - bit BIT_D_LEFT, a ; was Left pressed? + bit B_PAD_LEFT, a ; was Left pressed? jr z, .buttonAPressed .leftPressed ld a, [wListScrollOffset] @@ -447,7 +447,7 @@ ShowPokedexDataInternal: ld hl, wStatusFlags2 set BIT_NO_AUDIO_FADE_OUT, [hl] ld a, $33 ; 3/7 volume - ldh [rNR50], a + ldh [rAUDVOL], a ldh a, [hTileAnimations] push af xor a @@ -465,7 +465,7 @@ ShowPokedexDataInternal: .waitForButtonPress call JoypadLowSensitivity ldh a, [hJoy5] - and A_BUTTON | B_BUTTON + and PAD_A | PAD_B jr z, .waitForButtonPress pop af ldh [hTileAnimations], a @@ -477,7 +477,7 @@ ShowPokedexDataInternal: ld hl, wStatusFlags2 res BIT_NO_AUDIO_FADE_OUT, [hl] ld a, $77 ; max volume - ldh [rNR50], a + ldh [rAUDVOL], a ret HeightWeightText: diff --git a/engine/menus/save.asm b/engine/menus/save.asm index a2760d0a..e660020b 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -33,7 +33,7 @@ FileDataDestroyedText: LoadSAV0: call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ; This vc_hook does not have to be in any particular location. ; It is defined here because it refers to the same labels as the two lines below. vc_hook Unknown_save_limit @@ -81,7 +81,7 @@ LoadSAV0: LoadSAV1: call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, sGameData ld bc, sGameDataEnd - sGameData call SAVCheckSum @@ -99,7 +99,7 @@ LoadSAV1: LoadSAV2: call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, sGameData ld bc, sGameDataEnd - sGameData call SAVCheckSum @@ -196,7 +196,7 @@ OlderFileWillBeErasedText: SaveSAVtoSRAM0: call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, wPlayerName ld de, sPlayerName ld bc, NAME_LENGTH @@ -226,7 +226,7 @@ SaveSAVtoSRAM1: ; stored pokémon call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, wBoxDataStart ld de, sCurBoxData ld bc, wBoxDataEnd - wBoxDataStart @@ -241,7 +241,7 @@ SaveSAVtoSRAM1: SaveSAVtoSRAM2: call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, wPartyDataStart ld de, sPartyData ld bc, wPartyDataEnd - wPartyDataStart @@ -349,7 +349,7 @@ ChangeBox:: call HandleMenuInput ld hl, hUILayoutFlags res BIT_DOUBLE_SPACED_MENU, [hl] - bit BIT_B_BUTTON, a + bit B_PAD_B, a ret nz ld a, $b6 call PlaySoundWaitForCurrent @@ -387,7 +387,7 @@ CopyBoxToOrFromSRAM: push hl call EnableSRAM ld a, b - ld [MBC1SRamBank], a + ld [rRAMB], a ld bc, wBoxDataEnd - wBoxDataStart call CopyData pop hl @@ -409,7 +409,7 @@ CopyBoxToOrFromSRAM: DisplayChangeBoxMenu: xor a ldh [hAutoBGTransferEnabled], a - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [wMenuWatchedKeys], a ld a, 11 ld [wMaxMenuItem], a @@ -501,10 +501,10 @@ EmptyAllSRAMBoxes: ; player changes the box) call EnableSRAM ld a, BANK("Saved Boxes 1") - ld [MBC1SRamBank], a + ld [rRAMB], a call EmptySRAMBoxesInBank ld a, BANK("Saved Boxes 2") - ld [MBC1SRamBank], a + ld [rRAMB], a call EmptySRAMBoxesInBank call DisableSRAM ret @@ -542,10 +542,10 @@ GetMonCountsForAllBoxes: push hl call EnableSRAM ld a, BANK("Saved Boxes 1") - ld [MBC1SRamBank], a + ld [rRAMB], a call GetMonCountsForBoxesInBank ld a, BANK("Saved Boxes 2") - ld [MBC1SRamBank], a + ld [rRAMB], a call GetMonCountsForBoxesInBank call DisableSRAM pop hl @@ -582,7 +582,7 @@ SAVCheckRandomID: ; (which are stored at wPlayerID)s call EnableSRAM ld a, BANK("Save Data") - ld [MBC1SRamBank], a + ld [rRAMB], a ld a, [sPlayerName] and a jr z, .next @@ -603,9 +603,9 @@ SAVCheckRandomID: ld a, [wPlayerID + 1] cp h .next - ld a, SRAM_DISABLE - ld [MBC1SRamBankingMode], a - ld [MBC1SRamEnable], a + ld a, $00 + ld [rBMODE], a + ld [rRAMG], a ret SaveHallOfFameTeams: @@ -646,7 +646,7 @@ LoadHallOfFameTeams: HallOfFame_Copy: call EnableSRAM xor a - ld [MBC1SRamBank], a + ld [rRAMB], a call CopyData call DisableSRAM ret @@ -664,21 +664,21 @@ ClearSAV: ret PadSRAM_FF: - ld [MBC1SRamBank], a + ld [rRAMB], a ld hl, STARTOF(SRAM) ld bc, SIZEOF(SRAM) ld a, $ff jp FillMemory EnableSRAM: - ld a, SRAM_BANKING_MODE - ld [MBC1SRamBankingMode], a - ld a, SRAM_ENABLE - ld [MBC1SRamEnable], a + ld a, BMODE_ADVANCED + ld [rBMODE], a + ld a, RAMG_SRAM_ENABLE + ld [rRAMG], a ret DisableSRAM: - ld a, SRAM_DISABLE - ld [MBC1SRamBankingMode], a - ld [MBC1SRamEnable], a + ld a, 0 + ld [rBMODE], a + ld [rRAMG], a ret diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index 96a7da16..9e8a181b 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -57,7 +57,7 @@ StartMenu_Pokemon:: inc hl ld a, b ld [hli], a ; max menu item ID - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [hli], a ; menu watched keys xor a ld [hl], a @@ -65,7 +65,7 @@ StartMenu_Pokemon:: push af call LoadScreenTilesFromBuffer1 ; restore saved screen pop af - bit BIT_B_BUTTON, a + bit B_PAD_B, a jp nz, .loop ; if the B button wasn't pressed ld a, [wMaxMenuItem] @@ -371,13 +371,13 @@ StartMenu_Item:: inc hl inc a ; a = 1 ld [hli], a ; max menu item ID - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [hli], a ; menu watched keys xor a ld [hl], a ; old menu item id call HandleMenuInput call PlaceUnfilledArrowMenuCursor - bit BIT_B_BUTTON, a + bit B_PAD_B, a jr z, .useOrTossItem jp ItemMenuLoop .useOrTossItem ; if the player made the choice to use or toss the item diff --git a/engine/menus/text_box.asm b/engine/menus/text_box.asm index fe792274..d73df6ff 100644 --- a/engine/menus/text_box.asm +++ b/engine/menus/text_box.asm @@ -156,7 +156,7 @@ DoBuySellQuitMenu: ld a, BUY_SELL_QUIT_MENU_TEMPLATE ld [wTextBoxID], a call DisplayTextBoxID - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [wMenuWatchedKeys], a ld a, $2 ld [wMaxMenuItem], a @@ -173,9 +173,9 @@ DoBuySellQuitMenu: ld [wStatusFlags5], a call HandleMenuInput call PlaceUnfilledArrowMenuCursor - bit BIT_A_BUTTON, a + bit B_PAD_A, a jr nz, .pressedA - bit BIT_B_BUTTON, a ; always true since only A/B are watched + bit B_PAD_B, a ; always true since only A/B are watched jr z, .pressedA ld a, CANCELLED_MENU ld [wMenuExitMethod], a @@ -213,7 +213,7 @@ DisplayTwoOptionMenu: ld [wChosenMenuItem], a ld [wMenuExitMethod], a - ld a, A_BUTTON | B_BUTTON + ld a, PAD_A | PAD_B ld [wMenuWatchedKeys], a ld a, $1 ld [wMaxMenuItem], a @@ -282,7 +282,7 @@ DisplayTwoOptionMenu: res BIT_NO_TEXT_DELAY, [hl] call HandleMenuInput pop hl - bit BIT_B_BUTTON, a + bit B_PAD_B, a jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed .pressedAButton ld a, [wCurrentMenuItem] diff --git a/engine/menus/unused_input.asm b/engine/menus/unused_input.asm index 15a0af34..9c868b3f 100644 --- a/engine/menus/unused_input.asm +++ b/engine/menus/unused_input.asm @@ -31,7 +31,7 @@ HandleMenuInputPokemonSelectionDuplicate: ; unreferenced ld [wCheckFor180DegreeTurn], a ldh a, [hJoy5] ld b, a - bit BIT_D_UP, a + bit B_PAD_UP, a jr z, .checkIfDownPressed .upPressed ld a, [wCurrentMenuItem] ; selected menu item @@ -42,7 +42,7 @@ HandleMenuInputPokemonSelectionDuplicate: ; unreferenced ld [wCurrentMenuItem], a ; move selected menu item up one space jr .checkOtherKeys .checkIfDownPressed - bit BIT_D_DOWN, a + bit B_PAD_DOWN, a jr z, .checkOtherKeys .downPressed ld a, [wCurrentMenuItem] @@ -59,7 +59,7 @@ HandleMenuInputPokemonSelectionDuplicate: ; unreferenced jp z, .loop1 .checkIfAButtonOrBButtonPressed ldh a, [hJoy5] - and A_BUTTON | B_BUTTON + and PAD_A | PAD_B jr z, .skipPlayingSound .AButtonOrBButtonPressed ld a, SFX_PRESS_AB |
