diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-03 09:38:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 09:38:52 -0400 |
commit | c85050497c1bd062e9cd40bf5b32fa3beca366cc (patch) | |
tree | 9593ddd3ab820223ab580d5fc0ae133b485b8315 /engine/menu/start_menu.asm | |
parent | 5559d51c863b6fb529ea0494d857950a36fe85b7 (diff) | |
parent | 87ef75c173b5d5f227912860487600b6f53d1d1f (diff) |
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/menu/start_menu.asm')
-rwxr-xr-x | engine/menu/start_menu.asm | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm deleted file mode 100755 index eb4b4f2d..00000000 --- a/engine/menu/start_menu.asm +++ /dev/null @@ -1,85 +0,0 @@ -DisplayStartMenu:: - ld a, BANK(StartMenu_Pokedex) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ld a, [wWalkBikeSurfState] ; walking/biking/surfing - ld [wWalkBikeSurfStateCopy], a - ld a, SFX_START_MENU - call PlaySound - -RedisplayStartMenu:: - callba DrawStartMenu - callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone - call UpdateSprites -.loop - call HandleMenuInput - ld b, a -.checkIfUpPressed - bit 6, a ; was Up pressed? - jr z, .checkIfDownPressed - ld a, [wCurrentMenuItem] ; menu selection - and a - jr nz, .loop - ld a, [wLastMenuItem] - and a - jr nz, .loop -; if the player pressed tried to go past the top item, wrap around to the bottom - CheckEvent EVENT_GOT_POKEDEX - ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6 - jr nz, .wrapMenuItemId - dec a ; there are only 6 menu items without the pokedex -.wrapMenuItemId - ld [wCurrentMenuItem], a - call EraseMenuCursor - jr .loop -.checkIfDownPressed - bit 7, a - jr z, .buttonPressed -; if the player pressed tried to go past the bottom item, wrap around to the top - CheckEvent EVENT_GOT_POKEDEX - ld a, [wCurrentMenuItem] - ld c, 7 ; there are 7 menu items with the pokedex - jr nz, .checkIfPastBottom - dec c ; there are only 6 menu items without the pokedex -.checkIfPastBottom - cp c - jr nz, .loop -; the player went past the bottom, so wrap to the top - xor a - ld [wCurrentMenuItem], a - call EraseMenuCursor - jr .loop -.buttonPressed ; A, B, or Start button pressed - call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] - ld [wBattleAndStartSavedMenuItem], a ; save current menu selection - ld a, b - and %00001010 ; was the Start button or B button pressed? - jp nz, CloseStartMenu - call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 - CheckEvent EVENT_GOT_POKEDEX - ld a, [wCurrentMenuItem] - jr nz, .displayMenuItem - inc a ; adjust position to account for missing pokedex menu item -.displayMenuItem - cp 0 - jp z, StartMenu_Pokedex - cp 1 - jp z, StartMenu_Pokemon - cp 2 - jp z, StartMenu_Item - cp 3 - jp z, StartMenu_TrainerInfo - cp 4 - jp z, StartMenu_SaveReset - cp 5 - jp z, StartMenu_Option - -; EXIT falls through to here -CloseStartMenu:: - call Joypad - ld a, [hJoyPressed] - bit 0, a ; was A button newly pressed? - jr nz, CloseStartMenu - call LoadTextBoxTilePatterns - jp CloseTextDisplay |