mirror of
https://github.com/pret/pokecrystal.git
synced 2026-04-25 15:41:56 -05:00
Update hardware.inc to 5.1.0
This commit is contained in:
parent
8f5a8c5b5b
commit
5abf8d01fb
|
|
@ -630,7 +630,7 @@ FadeMusic:
|
|||
ld [wMusicFadeCount], a
|
||||
; get SO1 volume
|
||||
ld a, [wVolume]
|
||||
and VOLUME_SO1_LEVEL
|
||||
and AUDVOL_RIGHT
|
||||
; which way are we fading?
|
||||
bit MUSIC_FADE_IN_F, d
|
||||
jr nz, .fadein
|
||||
|
|
|
|||
|
|
@ -113,11 +113,7 @@ DEF NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7
|
|||
const NOTE_VIBRATO_OVERRIDE ; 6
|
||||
|
||||
; wVolume
|
||||
DEF VOLUME_SO1_F EQU 3
|
||||
DEF VOLUME_SO2_F EQU 7
|
||||
DEF VOLUME_SO1_LEVEL EQU %00000111
|
||||
DEF VOLUME_SO2_LEVEL EQU %01110000
|
||||
DEF MAX_VOLUME EQU $77
|
||||
DEF MAX_VOLUME EQU AUDVOL_LEFT | AUDVOL_RIGHT
|
||||
|
||||
; wSoundInput
|
||||
DEF SOUND_INPUT_CH1_F EQU 0
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ DEF TILE_1BPP_SIZE EQU TILE_SIZE / 2 ; bytes
|
|||
DEF PALRGB_WHITE EQU palred 31 + palgreen 31 + palblue 31 ; $7fff
|
||||
|
||||
DEF METATILE_WIDTH EQU 4 ; tiles
|
||||
DEF SCREEN_META_WIDTH EQU 6 ; metatiles
|
||||
DEF SCREEN_META_WIDTH EQU 6 ; metatiles
|
||||
DEF SCREEN_META_HEIGHT EQU 5 ; metatiles
|
||||
DEF SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
|
||||
DEF SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ endc
|
|||
; Define the include guard and the current hardware.inc version
|
||||
; (do this after the RGBDS version check since the `def` syntax depends on it)
|
||||
def HARDWARE_INC equ 1
|
||||
def HARDWARE_INC_VERSION equs "5.0.0"
|
||||
def HARDWARE_INC_VERSION equs "5.1.0"
|
||||
|
||||
; Usage: rev_Check_hardware_inc <min_ver>
|
||||
; Examples:
|
||||
|
|
@ -85,14 +85,17 @@ def B_PAD_START equ 3
|
|||
def B_PAD_SELECT equ 2
|
||||
def B_PAD_B equ 1
|
||||
def B_PAD_A equ 0
|
||||
def PAD_DOWN equ 1 << B_PAD_DOWN
|
||||
def PAD_UP equ 1 << B_PAD_UP
|
||||
def PAD_LEFT equ 1 << B_PAD_LEFT
|
||||
def PAD_RIGHT equ 1 << B_PAD_RIGHT
|
||||
def PAD_START equ 1 << B_PAD_START
|
||||
def PAD_SELECT equ 1 << B_PAD_SELECT
|
||||
def PAD_B equ 1 << B_PAD_B
|
||||
def PAD_A equ 1 << B_PAD_A
|
||||
def PAD_CTRL_PAD equ %1111_0000
|
||||
def PAD_BUTTONS equ %0000_1111
|
||||
def PAD_DOWN equ 1 << B_PAD_DOWN
|
||||
def PAD_UP equ 1 << B_PAD_UP
|
||||
def PAD_LEFT equ 1 << B_PAD_LEFT
|
||||
def PAD_RIGHT equ 1 << B_PAD_RIGHT
|
||||
def PAD_START equ 1 << B_PAD_START
|
||||
def PAD_SELECT equ 1 << B_PAD_SELECT
|
||||
def PAD_B equ 1 << B_PAD_B
|
||||
def PAD_A equ 1 << B_PAD_A
|
||||
|
||||
|
||||
; Combined input byte, with Control Pad in low nybble (swapped order)
|
||||
def B_PAD_SWAP_START equ 7
|
||||
|
|
@ -103,14 +106,16 @@ def B_PAD_SWAP_DOWN equ 3
|
|||
def B_PAD_SWAP_UP equ 2
|
||||
def B_PAD_SWAP_LEFT equ 1
|
||||
def B_PAD_SWAP_RIGHT equ 0
|
||||
def PAD_SWAP_START equ 1 << B_PAD_SWAP_START
|
||||
def PAD_SWAP_SELECT equ 1 << B_PAD_SWAP_SELECT
|
||||
def PAD_SWAP_B equ 1 << B_PAD_SWAP_B
|
||||
def PAD_SWAP_A equ 1 << B_PAD_SWAP_A
|
||||
def PAD_SWAP_DOWN equ 1 << B_PAD_SWAP_DOWN
|
||||
def PAD_SWAP_UP equ 1 << B_PAD_SWAP_UP
|
||||
def PAD_SWAP_LEFT equ 1 << B_PAD_SWAP_LEFT
|
||||
def PAD_SWAP_RIGHT equ 1 << B_PAD_SWAP_RIGHT
|
||||
def PAD_SWAP_CTRL_PAD equ %0000_1111
|
||||
def PAD_SWAP_BUTTONS equ %1111_0000
|
||||
def PAD_SWAP_START equ 1 << B_PAD_SWAP_START
|
||||
def PAD_SWAP_SELECT equ 1 << B_PAD_SWAP_SELECT
|
||||
def PAD_SWAP_B equ 1 << B_PAD_SWAP_B
|
||||
def PAD_SWAP_A equ 1 << B_PAD_SWAP_A
|
||||
def PAD_SWAP_DOWN equ 1 << B_PAD_SWAP_DOWN
|
||||
def PAD_SWAP_UP equ 1 << B_PAD_SWAP_UP
|
||||
def PAD_SWAP_LEFT equ 1 << B_PAD_SWAP_LEFT
|
||||
def PAD_SWAP_RIGHT equ 1 << B_PAD_SWAP_RIGHT
|
||||
|
||||
; -- SB ($FF01) ---------------------------------------------------------------
|
||||
; Serial transfer data [r/w]
|
||||
|
|
@ -723,27 +728,38 @@ def B_IE_VBLANK equ 0 ; 1 = VBlank interrupt is enabled [r/w]
|
|||
; however, one address for each of these ranges is considered the "canonical" one, and
|
||||
; these addresses are what's provided here.
|
||||
|
||||
|
||||
; ** Common to most MBCs ******************************************************
|
||||
|
||||
; -- RAMG ($0000-$1FFF) -------------------------------------------------------
|
||||
; Whether SRAM can be accessed [wo]
|
||||
def rRAMG equ $0000
|
||||
|
||||
; Common values
|
||||
; Common values (not for HuC1 or HuC-3)
|
||||
def RAMG_SRAM_DISABLE equ $00
|
||||
def RAMG_SRAM_ENABLE equ $0A ; some MBCs accept any value whose low nybble is $A
|
||||
|
||||
; -- ROMB0 ($2000-$3FFF) ------------------------------------------------------
|
||||
; ROM bank number (low 8 bits when applicable) [wo]
|
||||
def rROMB0 equ $2000
|
||||
; (HuC-3 only) switch SRAM to map cartridge RAM, RTC, or IR
|
||||
def RAMG_CART_RAM_RO equ $00 ; select cartridge RAM [ro]
|
||||
def RAMG_CART_RAM equ $0A ; select cartridge RAM [r/w]
|
||||
def RAMG_RTC_IN equ $0B ; select RTC command/argument [wo]
|
||||
def RAMG_RTC_IN_CMD equ %0_111_0000 ; command
|
||||
def RAMG_RTC_IN_ARG equ %0_000_1111 ; argument
|
||||
def RAMG_RTC_OUT equ $0C ; select RTC command/response [ro]
|
||||
def RAMG_RTC_OUT_CMD equ %0_111_0000 ; command
|
||||
def RAMG_RTC_OUT_RESULT equ %0_000_1111 ; result
|
||||
def RAMG_RTC_SEMAPHORE equ $0D ; select RTC semaphore [r/w]
|
||||
def RAMG_IR equ $0E ; (HuC1 and HuC-3 only) select IR [r/w]
|
||||
|
||||
; -- ROMB1 ($3000-$3FFF) ------------------------------------------------------
|
||||
; (MBC5 only) ROM bank number high bit (bit 8) [wo]
|
||||
def rROMB1 equ $3000
|
||||
; -- ROMB ($2000-$3FFF) -------------------------------------------------------
|
||||
; ROM bank number (not for MBC5 or MBC6) [wo]
|
||||
def rROMB equ $2000
|
||||
|
||||
; -- RAMB ($4000-$5FFF) -------------------------------------------------------
|
||||
; SRAM bank number [wo]
|
||||
; SRAM bank number (not for MBC2, MBC6, or MBC7) [wo]
|
||||
def rRAMB equ $4000
|
||||
|
||||
; (MBC3-only) Special RAM bank numbers that actually map values into RTCREG
|
||||
; (MBC3 only) Special RAM bank numbers that actually map values into RTCREG
|
||||
def RAMB_RTC_S equ $08 ; seconds counter (0-59)
|
||||
def RAMB_RTC_M equ $09 ; minutes counter (0-59)
|
||||
def RAMB_RTC_H equ $0A ; hours counter (0-23)
|
||||
|
|
@ -761,8 +777,28 @@ def B_RAMB_RUMBLE equ 3 ; (MBC5 and MBC7 only) enable the rumble motor (if any)
|
|||
def RAMB_RUMBLE_OFF equ 0 << B_RAMB_RUMBLE
|
||||
def RAMB_RUMBLE_ON equ 1 << B_RAMB_RUMBLE
|
||||
|
||||
|
||||
; ** MBC1 and MMM01 only ******************************************************
|
||||
|
||||
; -- BMODE ($6000-$7FFF) ------------------------------------------------------
|
||||
; Banking mode select [wo]
|
||||
def rBMODE equ $6000
|
||||
|
||||
def BMODE_SIMPLE equ $00 ; locks ROMB and RAMB to bank 0
|
||||
def BMODE_ADVANCED equ $01 ; allows bank-switching with RAMB
|
||||
|
||||
|
||||
; ** MBC2 only ****************************************************************
|
||||
|
||||
; -- ROM2B ($0000-$3FFF with bit 8 set) ---------------------------------------
|
||||
; ROM bank number [wo]
|
||||
def rROM2B equ $2100
|
||||
|
||||
|
||||
; ** MBC3 only ****************************************************************
|
||||
|
||||
; -- RTCLATCH ($6000-$7FFF) ---------------------------------------------------
|
||||
; (MBC3 only) RTC latch clock data [wo]
|
||||
; RTC latch clock data [wo]
|
||||
def rRTCLATCH equ $6000
|
||||
|
||||
; Write $00 then $01 to latch the current time into RTCREG
|
||||
|
|
@ -770,10 +806,107 @@ def RTCLATCH_START equ $00
|
|||
def RTCLATCH_FINISH equ $01
|
||||
|
||||
; -- RTCREG ($A000-$BFFF) -----------------------------------------------------
|
||||
; (MBC3 only) RTC register [r/w]
|
||||
; RTC register [r/w]
|
||||
def rRTCREG equ $A000
|
||||
|
||||
|
||||
; ** MBC5 only ****************************************************************
|
||||
|
||||
; -- ROMB0 ($2000-$3FFF) ------------------------------------------------------
|
||||
; ROM bank number low byte (bits 0-7) [wo]
|
||||
def rROMB0 equ $2000
|
||||
|
||||
; -- ROMB1 ($3000-$3FFF) ------------------------------------------------------
|
||||
; ROM bank number high bit (bit 8) [wo]
|
||||
def rROMB1 equ $3000
|
||||
|
||||
|
||||
; ** MBC6 only ****************************************************************
|
||||
|
||||
; -- RAMBA ($0400-$07FF) ------------------------------------------------------
|
||||
; RAM bank A number [wo]
|
||||
def rRAMBA equ $0400
|
||||
|
||||
; -- RAMBB ($0800-$0BFF) ------------------------------------------------------
|
||||
; RAM bank B number [wo]
|
||||
def rRAMBB equ $0800
|
||||
|
||||
; -- FLASH ($0C00-$0FFF) ------------------------------------------------------
|
||||
; Whether the flash chip can be accessed [wo]
|
||||
def rFLASH equ $0C00
|
||||
|
||||
; -- FMODE ($1000) ------------------------------------------------------------
|
||||
; Write mode select for the flash chip
|
||||
def rFMODE equ $1000
|
||||
|
||||
; -- ROMBA ($2000-$27FF) ------------------------------------------------------
|
||||
; ROM/Flash bank A number [wo]
|
||||
def rROMBA equ $2000
|
||||
|
||||
; -- FLASHA ($2800-$2FFF) -----------------------------------------------------
|
||||
; ROM/Flash bank A select [wo]
|
||||
def rFLASHA equ $2800
|
||||
|
||||
; -- ROMBB ($3000-$37FF) ------------------------------------------------------
|
||||
; ROM/Flash bank B number [wo]
|
||||
def rROMBB equ $3000
|
||||
|
||||
; -- FLASHB ($3800-$3FFF) -----------------------------------------------------
|
||||
; ROM/Flash bank B select [wo]
|
||||
def rFLASHB equ $3800
|
||||
|
||||
|
||||
; ** MBC7 only ****************************************************************
|
||||
|
||||
; -- RAMREG ($4000-$5FFF) -----------------------------------------------------
|
||||
; Enable RAM register access [wo]
|
||||
def rRAMREG equ $4000
|
||||
|
||||
def RAMREG_ENABLE equ $40
|
||||
|
||||
; -- ACCLATCH0 ($Ax0x) --------------------------------------------------------
|
||||
; Latch accelerometer start [wo]
|
||||
def rACCLATCH0 equ $A000
|
||||
|
||||
def ACCLATCH0_START equ $55
|
||||
|
||||
; -- ACCLATCH1 ($Ax1x) --------------------------------------------------------
|
||||
; Latch accelerometer finish [wo]
|
||||
def rACCLATCH1 equ $A010
|
||||
|
||||
def ACCLATCH1_FINISH equ $AA
|
||||
|
||||
; -- ACCELX0 ($Ax2x) ----------------------------------------------------------
|
||||
; Accelerometer X value low byte [ro]
|
||||
def rACCELX0 equ $A020
|
||||
|
||||
; -- ACCELX1 ($Ax3x) ----------------------------------------------------------
|
||||
; Accelerometer X value high byte [ro]
|
||||
def rACCELX1 equ $A030
|
||||
|
||||
; -- ACCELY0 ($Ax4x) ----------------------------------------------------------
|
||||
; Accelerometer Y value low byte [ro]
|
||||
def rACCELY0 equ $A040
|
||||
|
||||
; -- ACCELY1 ($Ax5x) ----------------------------------------------------------
|
||||
; Accelerometer Y value high byte [ro]
|
||||
def rACCELY1 equ $A050
|
||||
|
||||
; -- EEPROM ($Ax8x) -----------------------------------------------------------
|
||||
; EEPROM access [r/w]
|
||||
def rEEPROM equ $A080
|
||||
|
||||
|
||||
; ** HuC1 only ****************************************************************
|
||||
|
||||
; -- IRREG ($A000-$BFFF) ------------------------------------------------------
|
||||
; IR register [r/w]
|
||||
def rIRREG equ $A000
|
||||
|
||||
def IR_LED_OFF equ $C0
|
||||
def IR_LED_ON equ $C1
|
||||
|
||||
|
||||
;******************************************************************************
|
||||
; Screen-related constants
|
||||
;******************************************************************************
|
||||
|
|
@ -795,10 +928,13 @@ def TILE_HEIGHT equ 8 ; height of tile in pixels
|
|||
def TILE_SIZE equ 16 ; size of tile in bytes (2 bits/pixel)
|
||||
|
||||
def COLOR_SIZE equ 2 ; size of color in bytes (little-endian BGR555)
|
||||
def COLOR_GREEN_LOW equ %111_00000 ; for the low byte
|
||||
def COLOR_RED equ %000_11111 ; for the low byte
|
||||
def COLOR_BLUE equ %0_11111_00 ; for the high byte
|
||||
def COLOR_GREEN_HIGH equ %000000_11 ; for the high byte
|
||||
def B_COLOR_RED equ 0 ; bits 4-0
|
||||
def B_COLOR_GREEN equ 5 ; bits 9-5
|
||||
def B_COLOR_BLUE equ 10 ; bits 14-10
|
||||
def COLOR_RED equ %000_11111 ; for the low byte
|
||||
def COLOR_GREEN_LOW equ %111_00000 ; for the low byte
|
||||
def COLOR_GREEN_HIGH equ %0_00000_11 ; for the high byte
|
||||
def COLOR_BLUE equ %0_11111_00 ; for the high byte
|
||||
def PAL_COLORS equ 4 ; colors per palette
|
||||
def PAL_SIZE equ COLOR_SIZE * PAL_COLORS ; size of palette in bytes
|
||||
|
||||
|
|
@ -807,7 +943,7 @@ def TILEMAP0 equ $9800 ; $9800-$9BFF
|
|||
def TILEMAP1 equ $9C00 ; $9C00-$9FFF
|
||||
|
||||
; (CGB only) BG tile attribute fields
|
||||
def B_BG_PRIO equ 7 ; whether the BG tile colors 1-3 are drawn below OBJs
|
||||
def B_BG_PRIO equ 7 ; whether the BG tile colors 1-3 are drawn above OBJs
|
||||
def B_BG_YFLIP equ 6 ; whether the whole BG tile is flipped vertically
|
||||
def B_BG_XFLIP equ 5 ; whether the whole BG tile is flipped horizontally
|
||||
def B_BG_BANK1 equ 3 ; which VRAM bank the BG tile is taken from
|
||||
|
|
@ -831,7 +967,7 @@ def OAMA_X rb ; 1
|
|||
def OAM_X_OFS equ 8 ; subtract 8 from what's written to OAM to get the real X position
|
||||
def OAMA_TILEID rb ; 2
|
||||
def OAMA_FLAGS rb ; 3
|
||||
def B_OAM_PRIO equ 7 ; whether the OBJ is drawn above BG colors 1-3
|
||||
def B_OAM_PRIO equ 7 ; whether the OBJ is drawn below BG colors 1-3
|
||||
def B_OAM_YFLIP equ 6 ; whether the whole OBJ is flipped vertically
|
||||
def B_OAM_XFLIP equ 5 ; whether the whole OBJ is flipped horizontally
|
||||
def B_OAM_PAL1 equ 4 ; (DMG only) which of the two palettes the OBJ uses
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
; joypad buttons
|
||||
const_def
|
||||
shift_const A_BUTTON ; 0
|
||||
shift_const B_BUTTON ; 1
|
||||
shift_const SELECT ; 2
|
||||
shift_const START ; 3
|
||||
shift_const D_RIGHT ; 4
|
||||
shift_const D_LEFT ; 5
|
||||
shift_const D_UP ; 6
|
||||
shift_const D_DOWN ; 7
|
||||
|
||||
DEF NO_INPUT EQU %00000000
|
||||
|
||||
DEF BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START
|
||||
DEF D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
|
||||
|
|
@ -6,6 +6,9 @@ DEF TRUE EQU 1
|
|||
DEF MALE EQU 0
|
||||
DEF FEMALE EQU 1
|
||||
|
||||
; input
|
||||
DEF NO_INPUT EQU %00000000
|
||||
|
||||
; FlagAction arguments (see home/flag.asm)
|
||||
const_def
|
||||
const RESET_FLAG
|
||||
|
|
|
|||
|
|
@ -1648,10 +1648,10 @@ Then edit `SurfStartStep` in [engine/overworld/player_object.asm](https://github
|
|||
- slow_step UP
|
||||
- slow_step LEFT
|
||||
- slow_step RIGHT
|
||||
+ db D_DOWN, 0, -1
|
||||
+ db D_UP, 0, -1
|
||||
+ db D_LEFT, 0, -1
|
||||
+ db D_RIGHT, 0, -1
|
||||
+ db PAD_DOWN, 0, -1
|
||||
+ db PAD_UP, 0, -1
|
||||
+ db PAD_LEFT, 0, -1
|
||||
+ db PAD_RIGHT, 0, -1
|
||||
```
|
||||
|
||||
This fix will make the player enter the water at a normal walking speed, not with a slow step.
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ tools/make_patch pokecrystal11_vc.sym pokecrystal11_vc.gbc pokecrystal11.gbc vc/
|
|||
|
||||
Hooks are defined with the `vc_hook` macro, which defines a label starting with "`.VC_`" for the patch template file to use.
|
||||
|
||||
**Patches** directly modify the contents of the ROM. This is done before emulation begins. For example, the `print_forbid_1` patch modifies an "`and A_BUTTON`" instruction to "`and 0`", so pressing A will not print Unown on the Game Boy Printer.
|
||||
**Patches** directly modify the contents of the ROM. This is done before emulation begins. For example, the `print_forbid_1` patch modifies an "`and PAD_A`" instruction to "`and 0`", so pressing A will not print Unown on the Game Boy Printer.
|
||||
|
||||
Patches are defined with the `vc_patch` and `vc_patch_end` macros; `vc_patch` defines a label starting with "`.VC_`", `vc_patch_end` defines a corresponding label with "`_End`" appended. Between these two macros, the code or data is conditionally different depending on whether or not a patch file is being built.
|
||||
|
||||
|
|
|
|||
|
|
@ -5404,15 +5404,15 @@ MoveSelectionScreen:
|
|||
ld c, STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP
|
||||
ld a, [wMoveSelectionMenuType]
|
||||
dec a
|
||||
ld b, D_DOWN | D_UP | A_BUTTON
|
||||
ld b, PAD_DOWN | PAD_UP | PAD_A
|
||||
jr z, .okay
|
||||
dec a
|
||||
ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON
|
||||
ld b, PAD_DOWN | PAD_UP | PAD_A | PAD_B
|
||||
jr z, .okay
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
jr nz, .okay
|
||||
ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON | SELECT
|
||||
ld b, PAD_DOWN | PAD_UP | PAD_A | PAD_B | PAD_SELECT
|
||||
|
||||
.okay
|
||||
ld a, b
|
||||
|
|
@ -5449,13 +5449,13 @@ MoveSelectionScreen:
|
|||
ld a, $1
|
||||
ldh [hBGMapMode], a
|
||||
call ScrollingMenuJoypad
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jp nz, .pressed_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jp nz, .pressed_down
|
||||
bit SELECT_F, a
|
||||
bit B_PAD_SELECT, a
|
||||
jp nz, .pressed_select
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
; A button
|
||||
push af
|
||||
|
||||
|
|
|
|||
|
|
@ -240,10 +240,10 @@ DebugColorMain:
|
|||
jr nc, .no_start_select
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .NextMon
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .PreviousMon
|
||||
|
||||
.no_start_select
|
||||
|
|
@ -546,10 +546,10 @@ DebugColor_PrintHexColor:
|
|||
|
||||
DebugColor_Joypad:
|
||||
ldh a, [hJoyLast]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .tmhm
|
||||
ldh a, [hJoyLast]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .toggle_shiny
|
||||
|
||||
ld a, [wDebugColorRGBJumptableIndex]
|
||||
|
|
@ -598,13 +598,13 @@ DebugColor_Joypad:
|
|||
DebugColor_SelectColorBox:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugColor_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .light
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .dark
|
||||
ret
|
||||
|
||||
|
|
@ -625,10 +625,10 @@ DebugColor_SelectColorBox:
|
|||
DebugColor_ChangeRedValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugColor_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugColor_PreviousRGBColor
|
||||
ld hl, wDebugRedChannel
|
||||
jr DebugColor_UpdateRGBColor
|
||||
|
|
@ -636,10 +636,10 @@ DebugColor_ChangeRedValue:
|
|||
DebugColor_ChangeGreenValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugColor_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugColor_PreviousRGBColor
|
||||
ld hl, wDebugGreenChannel
|
||||
jr DebugColor_UpdateRGBColor
|
||||
|
|
@ -647,17 +647,17 @@ DebugColor_ChangeGreenValue:
|
|||
DebugColor_ChangeBlueValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugColor_PreviousRGBColor
|
||||
ld hl, wDebugBlueChannel
|
||||
; fallthrough
|
||||
|
||||
DebugColor_UpdateRGBColor:
|
||||
ldh a, [hJoyLast]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .increment
|
||||
ldh a, [hJoyLast]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .decrement
|
||||
ret
|
||||
|
||||
|
|
@ -708,7 +708,7 @@ DebugColor_InitTMHM:
|
|||
DebugColor_TMHMJoypad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .cancel
|
||||
call .scroll
|
||||
ret
|
||||
|
|
@ -726,10 +726,10 @@ DebugColor_TMHMJoypad:
|
|||
.scroll:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ret
|
||||
|
||||
|
|
@ -1188,10 +1188,10 @@ DebugTileset_LoadPalettes:
|
|||
DebugColorMain2: ; unreferenced
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .next_palette
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .cancel
|
||||
call DebugTileset_Joypad
|
||||
ret
|
||||
|
|
@ -1306,13 +1306,13 @@ DebugTileset_Joypad:
|
|||
DebugTileset_SelectColorBox:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugTileset_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ret
|
||||
|
||||
|
|
@ -1341,10 +1341,10 @@ DebugTileset_SelectColorBox:
|
|||
DebugTileset_ChangeRedValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugTileset_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugTileset_PreviousRGBColor
|
||||
ld hl, wDebugRedChannel
|
||||
jr DebugTileset_UpdateRGBColor
|
||||
|
|
@ -1352,10 +1352,10 @@ DebugTileset_ChangeRedValue:
|
|||
DebugTileset_ChangeGreenValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, DebugTileset_NextRGBColor
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugTileset_PreviousRGBColor
|
||||
ld hl, wDebugGreenChannel
|
||||
jr DebugTileset_UpdateRGBColor
|
||||
|
|
@ -1363,17 +1363,17 @@ DebugTileset_ChangeGreenValue:
|
|||
DebugTileset_ChangeBlueValue:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, DebugTileset_PreviousRGBColor
|
||||
ld hl, wDebugBlueChannel
|
||||
; fallthrough
|
||||
|
||||
DebugTileset_UpdateRGBColor:
|
||||
ldh a, [hJoyLast]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .increment
|
||||
ldh a, [hJoyLast]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .decrement
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ DEF DEBUGROOMMENU_NUM_PAGES EQU const_value
|
|||
|
||||
_DebugRoom:
|
||||
ldh a, [hJoyDown]
|
||||
and SELECT | START
|
||||
cp SELECT | START
|
||||
and PAD_SELECT | PAD_START
|
||||
cp PAD_SELECT | PAD_START
|
||||
ret nz
|
||||
ldh a, [hDebugRoomMenuPage]
|
||||
push af
|
||||
|
|
@ -58,10 +58,10 @@ _DebugRoom:
|
|||
.wait
|
||||
call GetScrollingMenuJoypad
|
||||
ld a, [wMenuJoypad]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr z, .wait
|
||||
call CloseWindow
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .done
|
||||
ld a, [wMenuSelection]
|
||||
ld hl, .Jumptable
|
||||
|
|
@ -607,24 +607,24 @@ DebugRoom_EditPagedValues:
|
|||
call DelayFrame
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .done
|
||||
ld hl, .continue
|
||||
push hl
|
||||
rra ; A_BUTTON_F?
|
||||
rra ; B_PAD_A?
|
||||
jr c, DebugRoom_PagedValuePressedA
|
||||
rra ; skip B_BUTTON_F
|
||||
rra ; SELECT_F?
|
||||
rra ; skip B_PAD_B
|
||||
rra ; B_PAD_SELECT?
|
||||
jr c, DebugRoom_PagedValuePressedSelect
|
||||
rra ; START_F?
|
||||
rra ; B_PAD_START?
|
||||
jr c, DebugRoom_PagedValuePressedStart
|
||||
rra ; D_RIGHT_F?
|
||||
rra ; B_PAD_RIGHT?
|
||||
jp c, DebugRoom_IncrementPagedValue
|
||||
rra ; D_LEFT_F?
|
||||
rra ; B_PAD_LEFT?
|
||||
jp c, DebugRoom_DecrementPagedValue
|
||||
rra ; D_UP_F?
|
||||
rra ; B_PAD_UP?
|
||||
jp c, DebugRoom_PrevPagedValue
|
||||
rra ; D_DOWN_F?
|
||||
rra ; B_PAD_DOWN?
|
||||
jp c, DebugRoom_NextPagedValue
|
||||
pop hl
|
||||
.continue
|
||||
|
|
@ -999,7 +999,7 @@ DebugRoom_JoyWaitABSelect:
|
|||
.loop
|
||||
call GetJoypad
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON | SELECT
|
||||
and PAD_A | PAD_B | PAD_SELECT
|
||||
jr z, .loop
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -660,16 +660,16 @@ Function1704e1:
|
|||
.Jumptable_2:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .pressed_a_or_b
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressed_a_or_b
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .pressed_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .pressed_down
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ Buena_PrizeMenu:
|
|||
ld a, [wMenuCursorY]
|
||||
ld [wMenuSelection], a
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .cancel
|
||||
ld a, c
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ DudeAutoInputs: ; used only for BANK(DudeAutoInputs)
|
|||
|
||||
DudeAutoInput_A:
|
||||
db NO_INPUT, $50
|
||||
db A_BUTTON, $00
|
||||
db PAD_A, $00
|
||||
db NO_INPUT, $ff ; end
|
||||
|
||||
DudeAutoInput_RightA:
|
||||
db NO_INPUT, $08
|
||||
db D_RIGHT, $00
|
||||
db PAD_RIGHT, $00
|
||||
db NO_INPUT, $08
|
||||
db A_BUTTON, $00
|
||||
db PAD_A, $00
|
||||
db NO_INPUT, $ff ; end
|
||||
|
||||
DudeAutoInput_DownA:
|
||||
|
|
@ -34,10 +34,10 @@ DudeAutoInput_DownA:
|
|||
db NO_INPUT, $fe
|
||||
db NO_INPUT, $fe
|
||||
db NO_INPUT, $fe
|
||||
db D_DOWN, $00
|
||||
db PAD_DOWN, $00
|
||||
db NO_INPUT, $fe
|
||||
db NO_INPUT, $fe
|
||||
db NO_INPUT, $fe
|
||||
db NO_INPUT, $fe
|
||||
db A_BUTTON, $00
|
||||
db PAD_A, $00
|
||||
db NO_INPUT, $ff ; end
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ Elevator_AskWhichFloor:
|
|||
call ScrollingMenu
|
||||
call CloseWindow
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .cancel
|
||||
xor a
|
||||
ld a, [wScrollingMenuCursorPosition]
|
||||
|
|
|
|||
|
|
@ -317,13 +317,13 @@ _HallOfFamePC:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start_button
|
||||
call DelayFrame
|
||||
jr .loop
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ Kurt_SelectApricorn:
|
|||
call UpdateSprites
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .nope
|
||||
ld a, [wMenuSelection]
|
||||
cp -1
|
||||
|
|
|
|||
|
|
@ -451,10 +451,10 @@ Mom_WithdrawDepositMenuJoypad:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressedB
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .pressedA
|
||||
call .dpadaction
|
||||
xor a
|
||||
|
|
@ -492,16 +492,16 @@ Mom_WithdrawDepositMenuJoypad:
|
|||
.dpadaction
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .incrementdigit
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .decrementdigit
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .movecursorleft
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .movecursorright
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -594,21 +594,21 @@ PCItemsJoypad:
|
|||
and a
|
||||
jr nz, .moving_stuff_around
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b_1
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a_1
|
||||
cp SELECT
|
||||
cp PAD_SELECT
|
||||
jr z, .select_1
|
||||
jr .next
|
||||
|
||||
.moving_stuff_around
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b_2
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a_select_2
|
||||
cp SELECT
|
||||
cp PAD_SELECT
|
||||
jr z, .a_select_2
|
||||
jr .next
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ _UnownPrinter:
|
|||
call JoyTextDelay
|
||||
|
||||
ldh a, [hJoyPressed]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressed_b
|
||||
|
||||
ldh a, [hJoyPressed]
|
||||
|
|
@ -78,7 +78,7 @@ _UnownPrinter:
|
|||
if DEF(_CRYSTAL11_VC)
|
||||
and NO_INPUT
|
||||
else
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
endc
|
||||
vc_patch_end
|
||||
jr nz, .pressed_a
|
||||
|
|
@ -106,10 +106,10 @@ endc
|
|||
|
||||
.LeftRight:
|
||||
ldh a, [hJoyLast]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .press_right
|
||||
ldh a, [hJoyLast]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .press_left
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ _CardFlip:
|
|||
.loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .next
|
||||
ld de, SFX_KINESIS
|
||||
call PlaySFX
|
||||
|
|
@ -229,7 +229,7 @@ _CardFlip:
|
|||
.betloop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .betdone
|
||||
call ChooseCard_HandleJoypad
|
||||
call CardFlip_UpdateCursorOAM
|
||||
|
|
@ -1174,16 +1174,16 @@ PlaceOAMCardBorder:
|
|||
ChooseCard_HandleJoypad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jp nz, .d_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jp nz, .d_right
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jp nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jp nz, .d_down
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ endr
|
|||
|
||||
.RevealAll:
|
||||
ldh a, [hJoypadPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
xor a
|
||||
ld [wMemoryGameCounter], a
|
||||
|
|
@ -500,19 +500,19 @@ MemoryGame_InterpretJoypad_AnimateCursor:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoypadPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .pressed_a
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .pressed_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .pressed_right
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .pressed_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .pressed_down
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ SlotsAction_WaitStart:
|
|||
SlotsAction_WaitReel1:
|
||||
ld hl, hJoypadSum
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
call SlotsAction_Next
|
||||
call Slots_StopReel1
|
||||
|
|
@ -374,7 +374,7 @@ SlotsAction_WaitStopReel1:
|
|||
SlotsAction_WaitReel2:
|
||||
ld hl, hJoypadSum
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
call SlotsAction_Next
|
||||
call Slots_StopReel2
|
||||
|
|
@ -394,7 +394,7 @@ SlotsAction_WaitStopReel2:
|
|||
SlotsAction_WaitReel3:
|
||||
ld hl, hJoypadSum
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
call SlotsAction_Next
|
||||
call Slots_StopReel3
|
||||
|
|
|
|||
|
|
@ -176,23 +176,23 @@ UnownPuzzleJumptable:
|
|||
|
||||
.Function:
|
||||
ldh a, [hJoyPressed]
|
||||
and START
|
||||
and PAD_START
|
||||
jp nz, UnownPuzzle_Quit
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, UnownPuzzle_A
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .d_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .d_right
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -45,17 +45,17 @@ Toss_Sell_Loop:
|
|||
|
||||
BuySellToss_InterpretJoypad:
|
||||
call JoyTextDelay_ForcehJoyDown ; get joypad
|
||||
bit B_BUTTON_F, c
|
||||
bit B_PAD_B, c
|
||||
jr nz, .b
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr nz, .a
|
||||
bit D_DOWN_F, c
|
||||
bit B_PAD_DOWN, c
|
||||
jr nz, .down
|
||||
bit D_UP_F, c
|
||||
bit B_PAD_UP, c
|
||||
jr nz, .up
|
||||
bit D_LEFT_F, c
|
||||
bit B_PAD_LEFT, c
|
||||
jr nz, .left
|
||||
bit D_RIGHT_F, c
|
||||
bit B_PAD_RIGHT, c
|
||||
jr nz, .right
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -446,9 +446,9 @@ BuyMenuLoop:
|
|||
ld [wMenuCursorPositionBackup], a
|
||||
call SpeechTextbox
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .set_carry
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .useless_pointer
|
||||
|
||||
.useless_pointer
|
||||
|
|
|
|||
|
|
@ -1015,16 +1015,16 @@ InitPocket:
|
|||
DepositSellTutorial_InterpretJoypad:
|
||||
ld hl, wMenuJoypad
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .d_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .d_right
|
||||
scf
|
||||
ret
|
||||
|
|
@ -1249,19 +1249,19 @@ Pack_InterpretJoypad:
|
|||
and a
|
||||
jr nz, .switching_item
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .d_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .d_right
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
scf
|
||||
ret
|
||||
|
|
@ -1307,10 +1307,10 @@ Pack_InterpretJoypad:
|
|||
|
||||
.switching_item
|
||||
ld a, [hl]
|
||||
and A_BUTTON | SELECT
|
||||
and PAD_A | PAD_SELECT
|
||||
jr nz, .place_insert
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .end_switch
|
||||
scf
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ TMHM_PocketLoop:
|
|||
ld [w2DMenuFlags2], a
|
||||
ld a, $20
|
||||
ld [w2DMenuCursorOffsets], a
|
||||
ld a, A_BUTTON | B_BUTTON | D_UP | D_DOWN | D_LEFT | D_RIGHT
|
||||
ld a, PAD_A | PAD_B | PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, [wTMHMPocketCursor]
|
||||
inc a
|
||||
|
|
@ -229,13 +229,13 @@ TMHM_JoypadLoop:
|
|||
jp nz, TMHM_ScrollPocket
|
||||
ld a, b
|
||||
ld [wMenuJoypad], a
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, TMHM_ChooseTMorHM
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, TMHM_ExitPack
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jp nz, TMHM_ExitPocket
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jp nz, TMHM_ExitPocket
|
||||
TMHM_ShowTMMoveDescription:
|
||||
call TMHM_CheckHoveringOverCancel
|
||||
|
|
@ -290,7 +290,7 @@ TMHM_CheckHoveringOverCancel:
|
|||
TMHM_ExitPack:
|
||||
call TMHM_PlaySFX_ReadText2
|
||||
_TMHM_ExitPack:
|
||||
ld a, B_BUTTON
|
||||
ld a, PAD_B
|
||||
ld [wMenuJoypad], a
|
||||
and a
|
||||
ret
|
||||
|
|
@ -301,7 +301,7 @@ TMHM_ExitPocket:
|
|||
|
||||
TMHM_ScrollPocket:
|
||||
ld a, b
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .down
|
||||
ld hl, wTMHMPocketScrollPosition
|
||||
ld a, [hl]
|
||||
|
|
|
|||
|
|
@ -1267,7 +1267,7 @@ InitTradeMenuDisplay:
|
|||
LinkTrade_OTPartyMenu:
|
||||
ld a, OTPARTYMON
|
||||
ld [wMonType], a
|
||||
ld a, A_BUTTON | D_UP | D_DOWN
|
||||
ld a, PAD_A | PAD_UP | PAD_DOWN
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, [wOTPartyCount]
|
||||
ld [w2DMenuNumRows], a
|
||||
|
|
@ -1291,7 +1291,7 @@ LinkTradeOTPartymonMenuLoop:
|
|||
ld a, d
|
||||
and a
|
||||
jp z, LinkTradePartiesMenuMasterLoop
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr z, .not_a_button
|
||||
ld a, INIT_ENEMYOT_LIST
|
||||
ld [wInitListType], a
|
||||
|
|
@ -1301,7 +1301,7 @@ LinkTradeOTPartymonMenuLoop:
|
|||
jp LinkTradePartiesMenuMasterLoop
|
||||
|
||||
.not_a_button
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr z, .not_d_up
|
||||
ld a, [wMenuCursorY]
|
||||
ld b, a
|
||||
|
|
@ -1323,7 +1323,7 @@ LinkTradeOTPartymonMenuLoop:
|
|||
jr LinkTrade_PlayerPartyMenu
|
||||
|
||||
.not_d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jp z, LinkTradePartiesMenuMasterLoop
|
||||
jp LinkTradeOTPartymonMenuCheckCancel
|
||||
|
||||
|
|
@ -1331,7 +1331,7 @@ LinkTrade_PlayerPartyMenu:
|
|||
farcall InitMG_Mobile_LinkTradePalMap
|
||||
xor a
|
||||
ld [wMonType], a
|
||||
ld a, A_BUTTON | D_UP | D_DOWN
|
||||
ld a, PAD_A | PAD_UP | PAD_DOWN
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, [wPartyCount]
|
||||
ld [w2DMenuNumRows], a
|
||||
|
|
@ -1359,12 +1359,12 @@ LinkTradePartymonMenuLoop:
|
|||
jp LinkTradePartiesMenuMasterLoop
|
||||
|
||||
.check_joypad
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr z, .not_a_button
|
||||
jp LinkTrade_TradeStatsMenu
|
||||
|
||||
.not_a_button
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr z, .not_d_down
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
|
|
@ -1384,7 +1384,7 @@ LinkTradePartymonMenuLoop:
|
|||
jp LinkTrade_OTPartyMenu
|
||||
|
||||
.not_d_down
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr z, LinkTradePartiesMenuMasterLoop
|
||||
ld a, [wMenuCursorY]
|
||||
ld b, a
|
||||
|
|
@ -1423,7 +1423,7 @@ LinkTrade_TradeStatsMenu:
|
|||
.joy_loop
|
||||
ld a, " "
|
||||
ldcoord_a 11, 16
|
||||
ld a, A_BUTTON | B_BUTTON | D_RIGHT
|
||||
ld a, PAD_A | PAD_B | PAD_RIGHT
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, 1
|
||||
ld [w2DMenuNumRows], a
|
||||
|
|
@ -1442,9 +1442,9 @@ LinkTrade_TradeStatsMenu:
|
|||
ld [w2DMenuFlags1], a
|
||||
ld [w2DMenuFlags2], a
|
||||
call ScrollingMenuJoypad
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .d_right
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .show_stats
|
||||
.b_button
|
||||
pop af
|
||||
|
|
@ -1455,7 +1455,7 @@ LinkTrade_TradeStatsMenu:
|
|||
.d_right
|
||||
ld a, " "
|
||||
ldcoord_a 1, 16
|
||||
ld a, A_BUTTON | B_BUTTON | D_LEFT
|
||||
ld a, PAD_A | PAD_B | PAD_LEFT
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, 1
|
||||
ld [w2DMenuNumRows], a
|
||||
|
|
@ -1474,9 +1474,9 @@ LinkTrade_TradeStatsMenu:
|
|||
ld [w2DMenuFlags1], a
|
||||
ld [w2DMenuFlags2], a
|
||||
call ScrollingMenuJoypad
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jp nz, .joy_loop
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b_button
|
||||
jr .try_trade
|
||||
|
||||
|
|
@ -1601,13 +1601,13 @@ LinkTradePartymonMenuCheckCancel:
|
|||
ldh a, [hJoyLast]
|
||||
and a
|
||||
jr z, .loop2
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
push af
|
||||
ld a, " "
|
||||
ldcoord_a 9, 17
|
||||
pop af
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr z, .d_up
|
||||
ld a, [wOTPartyCount]
|
||||
ld [wMenuCursorY], a
|
||||
|
|
@ -1744,7 +1744,7 @@ LinkTrade:
|
|||
ld [w2DMenuFlags2], a
|
||||
ld a, $20
|
||||
ld [w2DMenuCursorOffsets], a
|
||||
ld a, A_BUTTON | B_BUTTON
|
||||
ld a, PAD_A | PAD_B
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, 1
|
||||
ld [wMenuCursorY], a
|
||||
|
|
@ -1755,7 +1755,7 @@ LinkTrade:
|
|||
call Call_ExitMenu
|
||||
call WaitBGMap2
|
||||
pop af
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .canceled
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
|
|
|
|||
|
|
@ -189,10 +189,10 @@ LinkTradeMenu:
|
|||
push bc
|
||||
push af
|
||||
ldh a, [hJoyLast]
|
||||
and D_PAD
|
||||
and PAD_CTRL_PAD
|
||||
ld b, a
|
||||
ldh a, [hJoyPressed]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
or b
|
||||
ld b, a
|
||||
pop af
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ endc
|
|||
jr nz, .restart
|
||||
; Check if we've pressed the B button to cancel
|
||||
ldh a, [hMGJoypadReleased]
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .continue
|
||||
ld a, MG_CANCELED
|
||||
ldh [hMGStatusFlags], a
|
||||
|
|
@ -859,7 +859,7 @@ InitializeIRCommunicationRoles:
|
|||
ld c, LOW(rRP)
|
||||
; Check if we've pressed the B button to cancel
|
||||
ldh a, [hMGJoypadReleased]
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .not_canceled
|
||||
ld a, MG_CANCELED
|
||||
ldh [hMGStatusFlags], a
|
||||
|
|
@ -867,7 +867,7 @@ InitializeIRCommunicationRoles:
|
|||
|
||||
.not_canceled
|
||||
; Check if we've pressed the A button to start sending
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, SendIRHelloMessageAfterDelay
|
||||
; If rRP is not receiving data, keep checking for input
|
||||
ldh a, [c]
|
||||
|
|
|
|||
|
|
@ -431,9 +431,9 @@ ConfirmContinue:
|
|||
call DelayFrame
|
||||
call GetJoypad
|
||||
ld hl, hJoyPressed
|
||||
bit A_BUTTON_F, [hl]
|
||||
bit B_PAD_A, [hl]
|
||||
jr nz, .PressA
|
||||
bit B_BUTTON_F, [hl]
|
||||
bit B_PAD_B, [hl]
|
||||
jr z, .loop
|
||||
scf
|
||||
ret
|
||||
|
|
@ -1158,8 +1158,8 @@ TitleScreenMain:
|
|||
call GetJoypad
|
||||
ld hl, hJoyDown
|
||||
ld a, [hl]
|
||||
and D_UP + B_BUTTON + SELECT
|
||||
cp D_UP + B_BUTTON + SELECT
|
||||
and PAD_UP + PAD_B + PAD_SELECT
|
||||
cp PAD_UP + PAD_B + PAD_SELECT
|
||||
jr z, .delete_save_data
|
||||
|
||||
; To bring up the clock reset dialog:
|
||||
|
|
@ -1170,8 +1170,8 @@ TitleScreenMain:
|
|||
jr z, .check_clock_reset
|
||||
|
||||
ld a, [hl]
|
||||
and D_DOWN + B_BUTTON + SELECT
|
||||
cp D_DOWN + B_BUTTON + SELECT
|
||||
and PAD_DOWN + PAD_B + PAD_SELECT
|
||||
cp PAD_DOWN + PAD_B + PAD_SELECT
|
||||
jr nz, .check_start
|
||||
|
||||
ld a, $34
|
||||
|
|
@ -1181,21 +1181,21 @@ TitleScreenMain:
|
|||
; Keep Select pressed, and hold Left + Up.
|
||||
; Then let go of Select.
|
||||
.check_clock_reset
|
||||
bit SELECT_F, [hl]
|
||||
bit B_PAD_SELECT, [hl]
|
||||
jr nz, .check_start
|
||||
|
||||
xor a
|
||||
ldh [hClockResetTrigger], a
|
||||
|
||||
ld a, [hl]
|
||||
and D_LEFT + D_UP
|
||||
cp D_LEFT + D_UP
|
||||
and PAD_LEFT + PAD_UP
|
||||
cp PAD_LEFT + PAD_UP
|
||||
jr z, .reset_clock
|
||||
|
||||
; Press Start or A to start the game.
|
||||
.check_start
|
||||
ld a, [hl]
|
||||
and START | A_BUTTON
|
||||
and PAD_START | PAD_A
|
||||
jr nz, .incave
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -246,9 +246,9 @@ MainMenuJoypadLoop:
|
|||
ld [w2DMenuFlags1], a
|
||||
call GetScrollingMenuJoypad
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b_button
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a_button
|
||||
jr .loop
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Mobile_GetMenuSelection:
|
|||
bit STATICMENU_ENABLE_SELECT_F, a
|
||||
jr z, .skip
|
||||
call GetMenuJoypad
|
||||
bit SELECT_F, a
|
||||
bit B_PAD_SELECT, a
|
||||
jr nz, .quit1
|
||||
|
||||
.skip
|
||||
|
|
@ -79,7 +79,7 @@ Mobile_GetMenuSelection:
|
|||
bit STATICMENU_DISABLE_B_F, a
|
||||
jr nz, .skip2
|
||||
call GetMenuJoypad
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .quit2
|
||||
|
||||
.skip2
|
||||
|
|
@ -232,14 +232,14 @@ Init2DMenuCursorPosition:
|
|||
|
||||
.InitFlags_c:
|
||||
ld hl, wMenuDataFlags
|
||||
ld a, A_BUTTON
|
||||
ld a, PAD_A
|
||||
bit STATICMENU_DISABLE_B_F, [hl]
|
||||
jr nz, .skip
|
||||
or B_BUTTON
|
||||
or PAD_B
|
||||
.skip
|
||||
bit STATICMENU_ENABLE_SELECT_F, [hl]
|
||||
jr z, .skip2
|
||||
or SELECT
|
||||
or PAD_SELECT
|
||||
.skip2
|
||||
ld [wMenuJoypadFilter], a
|
||||
ret
|
||||
|
|
@ -369,21 +369,21 @@ Menu_WasButtonPressed:
|
|||
|
||||
_2DMenuInterpretJoypad:
|
||||
call GetMenuJoypad
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, .a_b_start_select
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, .a_b_start_select
|
||||
bit SELECT_F, a
|
||||
bit B_PAD_SELECT, a
|
||||
jp nz, .a_b_start_select
|
||||
bit START_F, a
|
||||
bit B_PAD_START, a
|
||||
jp nz, .a_b_start_select
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .d_right
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .d_left
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .d_down
|
||||
and a
|
||||
ret
|
||||
|
|
@ -776,10 +776,10 @@ _InitVerticalMenuCursor::
|
|||
ln a, 2, 0
|
||||
ld [hli], a
|
||||
; wMenuJoypadFilter
|
||||
ld a, A_BUTTON
|
||||
ld a, PAD_A
|
||||
bit STATICMENU_DISABLE_B_F, b
|
||||
jr nz, .skip_bit_1
|
||||
add B_BUTTON
|
||||
add PAD_B
|
||||
.skip_bit_1
|
||||
ld [hli], a
|
||||
; wMenuCursorY
|
||||
|
|
|
|||
|
|
@ -398,16 +398,16 @@ NamingScreenJoypadLoop:
|
|||
.ReadButtons:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
ret
|
||||
|
||||
|
|
@ -553,16 +553,16 @@ NamingScreen_AnimateCursor:
|
|||
.GetDPad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ret
|
||||
|
||||
|
|
@ -1072,16 +1072,16 @@ INCBIN "gfx/naming_screen/mail.2bpp"
|
|||
.process_joypad
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
ret
|
||||
|
||||
|
|
@ -1199,16 +1199,16 @@ ComposeMail_AnimateCursor:
|
|||
.GetDPad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ _Option:
|
|||
.joypad_loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyPressed]
|
||||
and START | B_BUTTON
|
||||
and PAD_START | PAD_B
|
||||
jr nz, .ExitOptions
|
||||
call OptionsControl
|
||||
jr c, .dpad
|
||||
|
|
@ -113,9 +113,9 @@ GetOptionPointer:
|
|||
Options_TextSpeed:
|
||||
call GetTextSpeed
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
ld a, c ; right pressed
|
||||
cp OPT_TEXT_SPEED_SLOW
|
||||
|
|
@ -194,9 +194,9 @@ GetTextSpeed:
|
|||
Options_BattleScene:
|
||||
ld hl, wOptions
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
bit BATTLE_SCENE, [hl]
|
||||
jr nz, .ToggleOn
|
||||
|
|
@ -233,9 +233,9 @@ Options_BattleScene:
|
|||
Options_BattleStyle:
|
||||
ld hl, wOptions
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
bit BATTLE_SHIFT, [hl]
|
||||
jr nz, .ToggleShift
|
||||
|
|
@ -271,9 +271,9 @@ Options_BattleStyle:
|
|||
Options_Sound:
|
||||
ld hl, wOptions
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
bit STEREO, [hl]
|
||||
jr nz, .SetMono
|
||||
|
|
@ -323,9 +323,9 @@ Options_Sound:
|
|||
Options_Print:
|
||||
call GetPrinterSetting
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
ld a, c
|
||||
cp OPT_PRINT_DARKEST
|
||||
|
|
@ -418,9 +418,9 @@ GetPrinterSetting:
|
|||
Options_MenuAccount:
|
||||
ld hl, wOptions2
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr z, .NonePressed
|
||||
bit MENU_ACCOUNT, [hl]
|
||||
jr nz, .ToggleOff
|
||||
|
|
@ -456,9 +456,9 @@ Options_MenuAccount:
|
|||
Options_Frame:
|
||||
ld hl, wTextboxFrame
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .LeftPressed
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .RightPressed
|
||||
and a
|
||||
ret
|
||||
|
|
@ -486,7 +486,7 @@ UpdateFrame:
|
|||
|
||||
Options_Cancel:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .Exit
|
||||
and a
|
||||
ret
|
||||
|
|
@ -498,9 +498,9 @@ Options_Cancel:
|
|||
OptionsControl:
|
||||
ld hl, wJumptableIndex
|
||||
ldh a, [hJoyLast]
|
||||
cp D_DOWN
|
||||
cp PAD_DOWN
|
||||
jr z, .DownPressed
|
||||
cp D_UP
|
||||
cp PAD_UP
|
||||
jr z, .UpPressed
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -55,26 +55,26 @@ ScrollingMenuJoyAction:
|
|||
.loop
|
||||
call ScrollingMenuJoypad
|
||||
ldh a, [hJoyLast]
|
||||
and D_PAD
|
||||
and PAD_CTRL_PAD
|
||||
ld b, a
|
||||
ldh a, [hJoyPressed]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
or b
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, .a_button
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, .b_button
|
||||
bit SELECT_F, a
|
||||
bit B_PAD_SELECT, a
|
||||
jp nz, .select
|
||||
bit START_F, a
|
||||
bit B_PAD_START, a
|
||||
jp nz, .start
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jp nz, .d_right
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jp nz, .d_left
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jp nz, .d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jp nz, .d_down
|
||||
jr .loop
|
||||
|
||||
|
|
@ -99,12 +99,12 @@ ScrollingMenuJoyAction:
|
|||
ld a, [wMenuSelection]
|
||||
cp -1
|
||||
jr z, .b_button
|
||||
ld a, A_BUTTON
|
||||
ld a, PAD_A
|
||||
scf
|
||||
ret
|
||||
|
||||
.b_button
|
||||
ld a, B_BUTTON
|
||||
ld a, PAD_B
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ ScrollingMenuJoyAction:
|
|||
call ScrollingMenu_GetCursorPosition
|
||||
dec a
|
||||
ld [wScrollingMenuCursorPosition], a
|
||||
ld a, SELECT
|
||||
ld a, PAD_SELECT
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ ScrollingMenuJoyAction:
|
|||
ld a, [wMenuDataFlags]
|
||||
bit SCROLLINGMENU_ENABLE_START_F, a
|
||||
jp z, xor_a_dec_a
|
||||
ld a, START
|
||||
ld a, PAD_START
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ ScrollingMenuJoyAction:
|
|||
ld a, [wMenuDataFlags]
|
||||
bit SCROLLINGMENU_ENABLE_LEFT_F, a
|
||||
jp z, xor_a_dec_a
|
||||
ld a, D_LEFT
|
||||
ld a, PAD_LEFT
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ ScrollingMenuJoyAction:
|
|||
ld a, [wMenuDataFlags]
|
||||
bit SCROLLINGMENU_ENABLE_RIGHT_F, a
|
||||
jp z, xor_a_dec_a
|
||||
ld a, D_RIGHT
|
||||
ld a, PAD_RIGHT
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
@ -293,15 +293,15 @@ ScrollingMenu_InitFlags:
|
|||
ld [w2DMenuFlags2], a
|
||||
ld a, $20
|
||||
ld [w2DMenuCursorOffsets], a
|
||||
ld a, A_BUTTON | B_BUTTON | D_UP | D_DOWN
|
||||
ld a, PAD_A | PAD_B | PAD_UP | PAD_DOWN
|
||||
bit SCROLLINGMENU_ENABLE_SELECT_F, c
|
||||
jr z, .disallow_select
|
||||
add SELECT
|
||||
add PAD_SELECT
|
||||
|
||||
.disallow_select
|
||||
bit SCROLLINGMENU_ENABLE_START_F, c
|
||||
jr z, .disallow_start
|
||||
add START
|
||||
add PAD_START
|
||||
|
||||
.disallow_start
|
||||
ld [wMenuJoypadFilter], a
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@ StartMenu::
|
|||
call .PrintMenuAccount
|
||||
call GetScrollingMenuJoypad
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a
|
||||
jr .loop
|
||||
.a
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ TrainerCard:
|
|||
bit JUMPTABLE_EXIT_F, a
|
||||
jr nz, .quit
|
||||
ldh a, [hJoyLast]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .quit
|
||||
call .RunJumptable
|
||||
call DelayFrame
|
||||
|
|
@ -119,7 +119,7 @@ TrainerCard_Page1_Joypad:
|
|||
call TrainerCard_Page1_PrintGameTime
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_RIGHT | A_BUTTON
|
||||
and PAD_RIGHT | PAD_A
|
||||
jr nz, .pressed_right_a
|
||||
ret
|
||||
|
||||
|
|
@ -159,10 +159,10 @@ TrainerCard_Page2_Joypad:
|
|||
call TrainerCard_Page2_3_AnimateBadges
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .Quit
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .d_left
|
||||
ret
|
||||
|
||||
|
|
@ -207,10 +207,10 @@ TrainerCard_Page3_Joypad:
|
|||
call TrainerCard_Page2_3_AnimateBadges
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ Credits::
|
|||
|
||||
Credits_HandleAButton:
|
||||
ldh a, [hJoypadDown]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
ld a, [wJumptableIndex]
|
||||
bit JUMPTABLE_EXIT_F, a
|
||||
|
|
@ -120,7 +120,7 @@ Credits_HandleAButton:
|
|||
|
||||
Credits_HandleBButton:
|
||||
ldh a, [hJoypadDown]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
ret z
|
||||
ld a, [wJumptableIndex]
|
||||
bit ALLOW_SKIPPING_CREDITS_F, a
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ EvolutionAnimation:
|
|||
call JoyTextDelay
|
||||
ldh a, [hJoyDown]
|
||||
pop bc
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressed_b
|
||||
.loop3
|
||||
dec c
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ CrystalIntro:
|
|||
.loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
jr nz, .ShutOffMusic
|
||||
ld a, [wJumptableIndex]
|
||||
bit JUMPTABLE_EXIT_F, a
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ SplashScreen:
|
|||
.joy_loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
jr nz, .pressed_button
|
||||
ld a, [wJumptableIndex]
|
||||
bit JUMPTABLE_EXIT_F, a
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ TestCrystalTitleScreen: ; unreferenced
|
|||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
ld b, a
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .done
|
||||
call SuicuneFrameIterator
|
||||
call DelayFrame
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ PopulateDecoCategoryMenu:
|
|||
ld [wMenuScrollPosition], a
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .no_action_2
|
||||
call DoDecorationAction2
|
||||
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ OWPlayerInput:
|
|||
|
||||
CheckAPressOW:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
ret z
|
||||
call TryObjectEvent
|
||||
ret c
|
||||
|
|
@ -817,10 +817,10 @@ CheckMenuOW:
|
|||
ldh [hUnusedByte], a
|
||||
ldh a, [hJoyPressed]
|
||||
|
||||
bit SELECT_F, a
|
||||
bit B_PAD_SELECT, a
|
||||
jr nz, .Select
|
||||
|
||||
bit START_F, a
|
||||
bit B_PAD_START, a
|
||||
jr z, .NoMenu
|
||||
|
||||
ld a, BANK(StartMenuScript)
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ DoPlayerMovement::
|
|||
ret z
|
||||
|
||||
ld c, a
|
||||
and D_PAD
|
||||
and PAD_CTRL_PAD
|
||||
ret nz
|
||||
|
||||
ld a, c
|
||||
or D_DOWN
|
||||
or PAD_DOWN
|
||||
ld [wCurInput], a
|
||||
ret
|
||||
|
||||
|
|
@ -546,13 +546,13 @@ DoPlayerMovement::
|
|||
ld hl, .forced_dpad
|
||||
add hl, de
|
||||
ld a, [wCurInput]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
or [hl]
|
||||
ld [wCurInput], a
|
||||
ret
|
||||
|
||||
.forced_dpad
|
||||
db D_DOWN, D_UP, D_LEFT, D_RIGHT
|
||||
db PAD_DOWN, PAD_UP, PAD_LEFT, PAD_RIGHT
|
||||
|
||||
.GetAction:
|
||||
; Poll player input and update movement info.
|
||||
|
|
@ -560,13 +560,13 @@ DoPlayerMovement::
|
|||
ld hl, .action_table
|
||||
ld de, .action_table_1_end - .action_table_1
|
||||
ld a, [wCurInput]
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .d_down
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .d_up
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .d_left
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .d_right
|
||||
; Standing
|
||||
jr .update
|
||||
|
|
|
|||
|
|
@ -264,16 +264,16 @@ Pokedex_InitMainScreen:
|
|||
Pokedex_UpdateMainScreen:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
call Pokedex_ListingHandleDPadInput
|
||||
ret nc
|
||||
|
|
@ -353,11 +353,11 @@ Pokedex_UpdateDexEntryScreen:
|
|||
call Pokedex_MoveArrowCursor
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .return_to_prev_screen
|
||||
vc_hook Forbid_printing_Pokedex
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .do_menu_action
|
||||
call Pokedex_NextOrPreviousDexEntry
|
||||
ret nc
|
||||
|
|
@ -420,7 +420,7 @@ Pokedex_ReinitDexEntryScreen:
|
|||
ret
|
||||
|
||||
DexEntryScreen_ArrowCursorData:
|
||||
db D_RIGHT | D_LEFT, 4
|
||||
db PAD_RIGHT | PAD_LEFT, 4
|
||||
dwcoord 1, 17 ; PAGE
|
||||
dwcoord 6, 17 ; AREA
|
||||
dwcoord 11, 17 ; CRY
|
||||
|
|
@ -537,10 +537,10 @@ Pokedex_UpdateOptionScreen:
|
|||
call c, Pokedex_DisplayModeDescription
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and SELECT | B_BUTTON
|
||||
and PAD_SELECT | PAD_B
|
||||
jr nz, .return_to_main_screen
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .do_menu_action
|
||||
ret
|
||||
|
||||
|
|
@ -557,13 +557,13 @@ Pokedex_UpdateOptionScreen:
|
|||
ret
|
||||
|
||||
.NoUnownModeArrowCursorData:
|
||||
db D_UP | D_DOWN, 3
|
||||
db PAD_UP | PAD_DOWN, 3
|
||||
dwcoord 2, 4 ; NEW
|
||||
dwcoord 2, 6 ; OLD
|
||||
dwcoord 2, 8 ; ABC
|
||||
|
||||
.ArrowCursorData:
|
||||
db D_UP | D_DOWN, 4
|
||||
db PAD_UP | PAD_DOWN, 4
|
||||
dwcoord 2, 4 ; NEW
|
||||
dwcoord 2, 6 ; OLD
|
||||
dwcoord 2, 8 ; ABC
|
||||
|
|
@ -639,10 +639,10 @@ Pokedex_UpdateSearchScreen:
|
|||
call c, Pokedex_PlaceSearchScreenTypeStrings
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and START | B_BUTTON
|
||||
and PAD_START | PAD_B
|
||||
jr nz, .cancel
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .do_menu_action
|
||||
ret
|
||||
|
||||
|
|
@ -659,7 +659,7 @@ Pokedex_UpdateSearchScreen:
|
|||
ret
|
||||
|
||||
.ArrowCursorData:
|
||||
db D_UP | D_DOWN, 4
|
||||
db PAD_UP | PAD_DOWN, 4
|
||||
dwcoord 2, 4 ; TYPE 1
|
||||
dwcoord 2, 6 ; TYPE 2
|
||||
dwcoord 2, 13 ; BEGIN SEARCH
|
||||
|
|
@ -754,10 +754,10 @@ Pokedex_InitSearchResultsScreen:
|
|||
Pokedex_UpdateSearchResultsScreen:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .return_to_search_screen
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .go_to_dex_entry
|
||||
call Pokedex_ListingHandleDPadInput
|
||||
ret nc
|
||||
|
|
@ -814,7 +814,7 @@ Pokedex_InitUnownMode:
|
|||
Pokedex_UpdateUnownMode:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .a_b
|
||||
call Pokedex_UnownModeHandleDPadInput
|
||||
ret
|
||||
|
|
@ -841,10 +841,10 @@ Pokedex_UpdateUnownMode:
|
|||
Pokedex_UnownModeHandleDPadInput:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ret
|
||||
|
||||
|
|
@ -911,10 +911,10 @@ Pokedex_NextOrPreviousDexEntry:
|
|||
ld [wBackupDexListingPage], a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
and a
|
||||
ret
|
||||
|
|
@ -963,19 +963,19 @@ Pokedex_ListingHandleDPadInput:
|
|||
ld e, a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, Pokedex_ListingMoveCursorUp
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, Pokedex_ListingMoveCursorDown
|
||||
ld a, d
|
||||
cp e
|
||||
jr nc, Pokedex_ListingPosStayedSame
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, Pokedex_ListingMoveUpOnePage
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, Pokedex_ListingMoveDownOnePage
|
||||
jr Pokedex_ListingPosStayedSame
|
||||
|
||||
|
|
@ -1776,10 +1776,10 @@ Pokedex_UpdateSearchMonType:
|
|||
jr nc, .no_change
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, Pokedex_PrevSearchMonType
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, Pokedex_NextSearchMonType
|
||||
.no_change
|
||||
and a
|
||||
|
|
@ -2197,26 +2197,26 @@ Pokedex_MoveArrowCursor:
|
|||
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and D_LEFT | D_UP
|
||||
and PAD_LEFT | PAD_UP
|
||||
and b
|
||||
jr nz, .move_left_or_up
|
||||
ld a, [hl]
|
||||
and D_RIGHT | D_DOWN
|
||||
and PAD_RIGHT | PAD_DOWN
|
||||
and b
|
||||
jr nz, .move_right_or_down
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
and b
|
||||
jr nz, .select
|
||||
call Pokedex_ArrowCursorDelay
|
||||
jr c, .no_action
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_LEFT | D_UP
|
||||
and PAD_LEFT | PAD_UP
|
||||
and b
|
||||
jr nz, .move_left_or_up
|
||||
ld a, [hl]
|
||||
and D_RIGHT | D_DOWN
|
||||
and PAD_RIGHT | PAD_DOWN
|
||||
and b
|
||||
jr nz, .move_right_or_down
|
||||
jr .no_action
|
||||
|
|
|
|||
|
|
@ -463,10 +463,10 @@ PokegearClock_Joypad:
|
|||
call .UpdateClock
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON | START | SELECT
|
||||
and PAD_A | PAD_B | PAD_START | PAD_SELECT
|
||||
jr nz, .quit
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
ret z
|
||||
ld a, [wPokegearFlags]
|
||||
bit POKEGEAR_MAP_CARD_F, a
|
||||
|
|
@ -570,13 +570,13 @@ PokegearMap_JohtoMap:
|
|||
PokegearMap_ContinueMap:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .cancel
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
call .DPad
|
||||
ret
|
||||
|
|
@ -612,10 +612,10 @@ PokegearMap_ContinueMap:
|
|||
.DPad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ret
|
||||
|
||||
|
|
@ -753,10 +753,10 @@ PokegearRadio_Init:
|
|||
PokegearRadio_Joypad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .cancel
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [wPokegearRadioChannelAddr]
|
||||
ld l, a
|
||||
|
|
@ -812,17 +812,17 @@ PokegearPhone_Init:
|
|||
PokegearPhone_Joypad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
call PokegearPhone_GetDPad
|
||||
ret
|
||||
|
|
@ -937,7 +937,7 @@ PokegearPhone_MakePhoneCall:
|
|||
|
||||
PokegearPhone_FinishPhoneCall:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
ret z
|
||||
farcall HangUp
|
||||
ld a, POKEGEARSTATE_PHONEJOYPAD
|
||||
|
|
@ -949,10 +949,10 @@ PokegearPhone_FinishPhoneCall:
|
|||
PokegearPhone_GetDPad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ret
|
||||
|
||||
|
|
@ -1141,13 +1141,13 @@ PokegearPhoneContactSubmenu:
|
|||
pop de
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .a_b
|
||||
call DelayFrame
|
||||
jr .loop
|
||||
|
|
@ -1180,7 +1180,7 @@ PokegearPhoneContactSubmenu:
|
|||
ldh [hBGMapMode], a
|
||||
pop hl
|
||||
ldh a, [hJoyPressed]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .Cancel
|
||||
ld a, [wPokegearPhoneSubmenuCursor]
|
||||
ld e, a
|
||||
|
|
@ -1378,10 +1378,10 @@ AnimateTuningKnob:
|
|||
.TuningKnob:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ret
|
||||
|
||||
|
|
@ -1831,16 +1831,16 @@ _TownMap:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
ret nz
|
||||
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .pressed_up
|
||||
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .pressed_down
|
||||
.loop2
|
||||
push de
|
||||
|
|
@ -1932,7 +1932,7 @@ PlayRadio:
|
|||
.loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .stop
|
||||
ld a, [wPokegearRadioChannelAddr]
|
||||
ld l, a
|
||||
|
|
@ -2047,10 +2047,10 @@ _FlyMap:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressedB
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .pressedA
|
||||
call .HandleDPad
|
||||
call GetMapCursorCoordinates
|
||||
|
|
@ -2092,10 +2092,10 @@ _FlyMap:
|
|||
ld d, a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .ScrollNext
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .ScrollPrev
|
||||
ret
|
||||
|
||||
|
|
@ -2372,10 +2372,10 @@ Pokedex_GetArea:
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .a_b
|
||||
ldh a, [hJoypadDown]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
call .LeftRightInput
|
||||
call .BlinkNestIcons
|
||||
|
|
@ -2397,10 +2397,10 @@ Pokedex_GetArea:
|
|||
|
||||
.LeftRightInput:
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ret
|
||||
|
||||
|
|
@ -2833,10 +2833,10 @@ EntireFlyMap: ; unreferenced
|
|||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressedB
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .pressedA
|
||||
call .HandleDPad
|
||||
call GetMapCursorCoordinates
|
||||
|
|
@ -2874,10 +2874,10 @@ EntireFlyMap: ; unreferenced
|
|||
.HandleDPad:
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN | D_RIGHT
|
||||
and PAD_DOWN | PAD_RIGHT
|
||||
jr nz, .ScrollNext
|
||||
ld a, [hl]
|
||||
and D_UP | D_LEFT
|
||||
and PAD_UP | PAD_LEFT
|
||||
jr nz, .ScrollPrev
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ _DepositPKMN:
|
|||
.HandleJoypad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
call Withdraw_UpDown
|
||||
and a
|
||||
|
|
@ -330,10 +330,10 @@ _WithdrawPKMN:
|
|||
.Joypad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
call Withdraw_UpDown
|
||||
and a
|
||||
|
|
@ -571,10 +571,10 @@ _MovePKMNWithoutMail:
|
|||
.Joypad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
call MoveMonWithoutMail_DPad
|
||||
jr c, .d_pad
|
||||
|
|
@ -720,10 +720,10 @@ _MovePKMNWithoutMail:
|
|||
.Joypad2:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button_2
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button_2
|
||||
call MoveMonWithoutMail_DPad_2
|
||||
jr c, .dpad_2
|
||||
|
|
@ -810,10 +810,10 @@ _StatsScreenDPad:
|
|||
jr z, .empty
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, BillsPC_PressUp
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, BillsPC_PressDown
|
||||
.empty
|
||||
jp BillsPC_JoypadDidNothing
|
||||
|
|
@ -827,10 +827,10 @@ Withdraw_UpDown:
|
|||
and a
|
||||
jr z, .empty
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, BillsPC_PressUp
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, BillsPC_PressDown
|
||||
.empty
|
||||
jp BillsPC_JoypadDidNothing
|
||||
|
|
@ -844,18 +844,18 @@ MoveMonWithoutMail_DPad:
|
|||
and a
|
||||
jr z, .check_left_right
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, BillsPC_PressUp
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, BillsPC_PressDown
|
||||
|
||||
.check_left_right
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, BillsPC_PressLeft
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, BillsPC_PressRight
|
||||
jr BillsPC_JoypadDidNothing
|
||||
|
||||
|
|
@ -869,18 +869,18 @@ MoveMonWithoutMail_DPad_2:
|
|||
jr z, .check_left_right
|
||||
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, BillsPC_PressUp
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, BillsPC_PressDown
|
||||
|
||||
.check_left_right
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, BillsPC_PressLeft
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, BillsPC_PressRight
|
||||
jr BillsPC_JoypadDidNothing
|
||||
|
||||
|
|
@ -1662,11 +1662,11 @@ BillsPC_StatsScreen:
|
|||
StatsScreenDPad:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON | D_RIGHT | D_LEFT
|
||||
and PAD_A | PAD_B | PAD_RIGHT | PAD_LEFT
|
||||
ld [wMenuJoypad], a
|
||||
jr nz, .pressed_a_b_right_left
|
||||
ld a, [hl]
|
||||
and D_DOWN | D_UP
|
||||
and PAD_DOWN | PAD_UP
|
||||
ld [wMenuJoypad], a
|
||||
jr nz, .pressed_down_up
|
||||
jr .pressed_a_b_right_left
|
||||
|
|
@ -2238,7 +2238,7 @@ _ChangeBox:
|
|||
call Textbox
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .done
|
||||
call BillsPC_PlaceWhatsUpString
|
||||
call BillsPC_ChangeBoxSubmenu
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ ForgetMove:
|
|||
call SafeLoadTempTilemapToTilemap
|
||||
pop af
|
||||
pop hl
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .cancel
|
||||
push hl
|
||||
ld a, [wMenuCursorY]
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ MailboxPC:
|
|||
ld [wCurMessageIndex], a
|
||||
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .exit
|
||||
call .Submenu
|
||||
jr .loop
|
||||
|
|
|
|||
|
|
@ -65,13 +65,13 @@ ReadAnyMail:
|
|||
.loop
|
||||
call GetJoypad
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON | START
|
||||
and PAD_A | PAD_B | PAD_START
|
||||
jr z, .loop
|
||||
vc_patch Forbid_printing_mail
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
and NO_INPUT
|
||||
else
|
||||
and START
|
||||
and PAD_START
|
||||
endc
|
||||
vc_patch_end
|
||||
jr nz, .pressed_start
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ SwitchPartyMons:
|
|||
call DelayFrame
|
||||
|
||||
farcall PartyMenuSelect
|
||||
bit B_BUTTON_F, b
|
||||
bit B_PAD_B, b
|
||||
jr c, .DontSwitch
|
||||
|
||||
farcall _SwitchPartyMons
|
||||
|
|
@ -820,9 +820,9 @@ ChooseMoveToDelete:
|
|||
|
||||
.loop
|
||||
call ScrollingMenuJoypad
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, .b_button
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, .a_button
|
||||
|
||||
.enter_loop
|
||||
|
|
@ -854,7 +854,7 @@ DeleteMoveScreen2DMenuData:
|
|||
db _2DMENU_ENABLE_SPRITE_ANIMS ; flags 1
|
||||
db 0 ; flags 2
|
||||
dn 2, 0 ; cursor offset
|
||||
db D_UP | D_DOWN | A_BUTTON | B_BUTTON ; accepted buttons
|
||||
db PAD_UP | PAD_DOWN | PAD_A | PAD_B ; accepted buttons
|
||||
|
||||
ManagePokemonMoves:
|
||||
ld a, [wCurPartySpecies]
|
||||
|
|
@ -889,13 +889,13 @@ MoveScreenLoop:
|
|||
|
||||
.joy_loop
|
||||
call ScrollingMenuJoypad
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, .b_button
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, .a_button
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jp nz, .d_right
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jp nz, .d_left
|
||||
|
||||
.skip_joy
|
||||
|
|
@ -1084,7 +1084,7 @@ MoveScreen2DMenuData:
|
|||
db _2DMENU_ENABLE_SPRITE_ANIMS ; flags 1
|
||||
db 0 ; flags 2
|
||||
dn 2, 0 ; cursor offsets
|
||||
db D_UP | D_DOWN | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON ; accepted buttons
|
||||
db PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B ; accepted buttons
|
||||
|
||||
String_MoveWhere:
|
||||
db "Where?@"
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ MonMenuLoop:
|
|||
ld de, SFX_READ_TEXT_2
|
||||
call PlaySFX
|
||||
ldh a, [hJoyPressed]
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .select
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .cancel
|
||||
jr .loop
|
||||
|
||||
|
|
@ -264,7 +264,7 @@ BattleMonMenu:
|
|||
ld de, SFX_READ_TEXT_2
|
||||
call PlaySFX
|
||||
ldh a, [hJoyPressed]
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .clear_carry
|
||||
ret z
|
||||
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ InitPartyMenuWithCancel:
|
|||
|
||||
.done
|
||||
ld [wMenuCursorY], a
|
||||
ld a, A_BUTTON | B_BUTTON
|
||||
ld a, PAD_A | PAD_B
|
||||
ld [wMenuJoypadFilter], a
|
||||
ret
|
||||
|
||||
|
|
@ -654,7 +654,7 @@ InitPartyMenuNoCancel:
|
|||
ld a, 1
|
||||
.done
|
||||
ld [wMenuCursorY], a
|
||||
ld a, A_BUTTON | B_BUTTON
|
||||
ld a, PAD_A | PAD_B
|
||||
ld [wMenuJoypadFilter], a
|
||||
ret
|
||||
|
||||
|
|
@ -679,7 +679,7 @@ PartyMenuSelect:
|
|||
ld [wPartyMenuCursor], a
|
||||
ldh a, [hJoyLast]
|
||||
ld b, a
|
||||
bit B_BUTTON_F, b
|
||||
bit B_PAD_B, b
|
||||
jr nz, .exitmenu ; B button
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
|
|
|
|||
|
|
@ -189,13 +189,13 @@ EggStatsJoypad:
|
|||
ret
|
||||
|
||||
.check
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .quit
|
||||
if DEF(_DEBUG)
|
||||
cp START
|
||||
cp PAD_START
|
||||
jr z, .hatch
|
||||
endc
|
||||
and D_DOWN | D_UP | A_BUTTON | B_BUTTON
|
||||
and PAD_DOWN | PAD_UP | PAD_A | PAD_B
|
||||
jp StatsScreen_JoypadAction
|
||||
|
||||
.quit
|
||||
|
|
@ -253,7 +253,7 @@ MonStatsJoypad:
|
|||
ret
|
||||
|
||||
.next
|
||||
and D_DOWN | D_UP | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
|
||||
and PAD_DOWN | PAD_UP | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B
|
||||
jp StatsScreen_JoypadAction
|
||||
|
||||
StatsScreenWaitCry:
|
||||
|
|
@ -303,7 +303,7 @@ StatsScreen_GetJoypad:
|
|||
pop de
|
||||
pop hl
|
||||
ld a, [wMenuJoypad]
|
||||
and D_DOWN | D_UP
|
||||
and PAD_DOWN | PAD_UP
|
||||
jr nz, .set_carry
|
||||
ld a, [wMenuJoypad]
|
||||
jr .clear_carry
|
||||
|
|
@ -324,17 +324,17 @@ StatsScreen_JoypadAction:
|
|||
maskbits NUM_STAT_PAGES
|
||||
ld c, a
|
||||
pop af
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jp nz, .b_button
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .d_left
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .d_right
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .d_down
|
||||
jr .done
|
||||
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ _PrintDiploma:
|
|||
|
||||
CheckCancelPrint:
|
||||
ldh a, [hJoyDown]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .pressed_b
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ ClockResetPassword:
|
|||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
ld b, a
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .confirm
|
||||
ld a, b
|
||||
and D_PAD
|
||||
and PAD_CTRL_PAD
|
||||
jr z, .loop2
|
||||
call .dpadinput
|
||||
ld c, 3
|
||||
|
|
@ -127,16 +127,16 @@ ClockResetPassword:
|
|||
|
||||
.dpadinput
|
||||
ld a, b
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, b
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
ld a, b
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, b
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -121,17 +121,17 @@ RestartClock:
|
|||
push af
|
||||
call .PrintTime
|
||||
pop af
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .press_A
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .press_B
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .pressed_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .pressed_down
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .pressed_left
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .pressed_right
|
||||
jr .joy_loop
|
||||
|
||||
|
|
|
|||
|
|
@ -133,15 +133,15 @@ InitClock:
|
|||
|
||||
SetHour:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .Confirm
|
||||
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
call DelayFrame
|
||||
and a
|
||||
|
|
@ -224,14 +224,14 @@ DisplayHoursMinutesWithMinString: ; unreferenced
|
|||
|
||||
SetMinutes:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
call DelayFrame
|
||||
and a
|
||||
|
|
@ -437,7 +437,7 @@ SetDayOfWeek:
|
|||
|
||||
.GetJoypadAction:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr z, .not_A
|
||||
scf
|
||||
ret
|
||||
|
|
@ -445,10 +445,10 @@ SetDayOfWeek:
|
|||
.not_A
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
call DelayFrame
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ InitSound::
|
|||
push af
|
||||
ld a, BANK(_InitSound)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
call _InitSound
|
||||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
|
|
@ -34,13 +34,13 @@ UpdateSound::
|
|||
push af
|
||||
ld a, BANK(_UpdateSound)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
call _UpdateSound
|
||||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
|
|
@ -51,14 +51,14 @@ UpdateSound::
|
|||
_LoadMusicByte::
|
||||
; [wCurMusicByte] = [a:de]
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
ld a, [de]
|
||||
ld [wCurMusicByte], a
|
||||
ld a, BANK(LoadMusicByte)
|
||||
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
ret
|
||||
|
||||
PlayMusic::
|
||||
|
|
@ -73,7 +73,7 @@ PlayMusic::
|
|||
push af
|
||||
ld a, BANK(_PlayMusic) ; aka BANK(_InitSound)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
ld a, e
|
||||
and a
|
||||
|
|
@ -88,7 +88,7 @@ PlayMusic::
|
|||
.end
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
|
|
@ -107,7 +107,7 @@ PlayMusic2::
|
|||
push af
|
||||
ld a, BANK(_PlayMusic)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
push de
|
||||
ld de, MUSIC_NONE
|
||||
|
|
@ -118,7 +118,7 @@ PlayMusic2::
|
|||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
|
|
@ -140,7 +140,7 @@ PlayCry::
|
|||
; Cries are stuck in one bank.
|
||||
ld a, BANK(PokemonCries)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
ld hl, PokemonCries
|
||||
rept MON_CRY_LENGTH
|
||||
|
|
@ -163,13 +163,13 @@ endr
|
|||
|
||||
ld a, BANK(_PlayCry)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
call _PlayCry
|
||||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
|
|
@ -200,7 +200,7 @@ PlaySFX::
|
|||
push af
|
||||
ld a, BANK(_PlaySFX)
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
ld a, e
|
||||
ld [wCurSFX], a
|
||||
|
|
@ -208,7 +208,7 @@ PlaySFX::
|
|||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
.done
|
||||
pop af
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ FarCopyRadioText::
|
|||
ld d, a
|
||||
ld a, [hli]
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
ld a, e
|
||||
ld l, a
|
||||
ld a, d
|
||||
|
|
@ -173,7 +173,7 @@ FarCopyRadioText::
|
|||
call CopyBytes
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
ret
|
||||
|
||||
MobileTextBorder::
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ CheckBPressedDebug:: ; unreferenced
|
|||
ret z
|
||||
|
||||
ldh a, [hJoyDown]
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
ret
|
||||
|
||||
xor_a::
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ FarCall::
|
|||
SECTION "rst10", ROM0[$0010]
|
||||
Bankswitch::
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
ret
|
||||
|
||||
SECTION "rst18", ROM0[$0018]
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ endr
|
|||
; Now that we have the input, we can do stuff with it.
|
||||
|
||||
; For example, soft reset:
|
||||
and A_BUTTON | B_BUTTON | SELECT | START
|
||||
cp A_BUTTON | B_BUTTON | SELECT | START
|
||||
and PAD_A | PAD_B | PAD_SELECT | PAD_START
|
||||
cp PAD_A | PAD_B | PAD_SELECT | PAD_START
|
||||
jp z, Reset
|
||||
|
||||
ret
|
||||
|
|
@ -271,12 +271,12 @@ JoyTitleScreenInput:: ; unreferenced
|
|||
|
||||
; Save data can be deleted by pressing Up + B + Select.
|
||||
ldh a, [hJoyDown]
|
||||
cp D_UP | SELECT | B_BUTTON
|
||||
cp PAD_UP | PAD_SELECT | PAD_B
|
||||
jr z, .keycombo
|
||||
|
||||
; Press Start or A to start the game.
|
||||
ldh a, [hJoyLast]
|
||||
and START | A_BUTTON
|
||||
and PAD_START | PAD_A
|
||||
jr nz, .keycombo
|
||||
|
||||
dec c
|
||||
|
|
@ -294,7 +294,7 @@ JoyWaitAorB::
|
|||
call DelayFrame
|
||||
call GetJoypad
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
ret nz
|
||||
call UpdateTimeAndPals
|
||||
jr .loop
|
||||
|
|
@ -363,7 +363,7 @@ WaitPressAorB_BlinkCursor::
|
|||
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr z, .loop
|
||||
|
||||
pop af
|
||||
|
|
@ -376,7 +376,7 @@ SimpleWaitPressAorB::
|
|||
.loop
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyLast]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr z, .loop
|
||||
ret
|
||||
|
||||
|
|
@ -412,7 +412,7 @@ PromptButton::
|
|||
call .blink_cursor
|
||||
call JoyTextDelay
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .received_input
|
||||
call UpdateTimeAndPals
|
||||
ld a, $1
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ GetMenuJoypad::
|
|||
push bc
|
||||
push af
|
||||
ldh a, [hJoyLast]
|
||||
and D_PAD
|
||||
and PAD_CTRL_PAD
|
||||
ld b, a
|
||||
ldh a, [hJoyPressed]
|
||||
and BUTTONS
|
||||
and PAD_BUTTONS
|
||||
or b
|
||||
ld b, a
|
||||
pop af
|
||||
|
|
@ -379,7 +379,7 @@ VerticalMenu::
|
|||
call InitVerticalMenuCursor
|
||||
call StaticMenuJoypad
|
||||
call MenuClickSound
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .okay
|
||||
.cancel
|
||||
scf
|
||||
|
|
@ -623,14 +623,14 @@ InitMenuCursorAndButtonPermissions::
|
|||
ld a, [wMenuDataFlags]
|
||||
bit STATICMENU_ENABLE_START_F, a
|
||||
jr z, .disallow_start
|
||||
set START_F, [hl]
|
||||
set B_PAD_START, [hl]
|
||||
|
||||
.disallow_start
|
||||
ld a, [wMenuDataFlags]
|
||||
bit STATICMENU_ENABLE_LEFT_RIGHT_F, a
|
||||
jr z, .disallow_left_right
|
||||
set D_LEFT_F, [hl]
|
||||
set D_RIGHT_F, [hl]
|
||||
set B_PAD_LEFT, [hl]
|
||||
set B_PAD_RIGHT, [hl]
|
||||
|
||||
.disallow_left_right
|
||||
ret
|
||||
|
|
@ -647,32 +647,32 @@ GetStaticMenuJoypad::
|
|||
call StaticMenuJoypad
|
||||
|
||||
ContinueGettingMenuJoypad:
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b_start
|
||||
bit START_F, a
|
||||
bit B_PAD_START, a
|
||||
jr nz, .b_start
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .d_right
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .d_left
|
||||
xor a
|
||||
ld [wMenuJoypad], a
|
||||
jr .done
|
||||
|
||||
.d_right
|
||||
ld a, D_RIGHT
|
||||
ld a, PAD_RIGHT
|
||||
ld [wMenuJoypad], a
|
||||
jr .done
|
||||
|
||||
.d_left
|
||||
ld a, D_LEFT
|
||||
ld a, PAD_LEFT
|
||||
ld [wMenuJoypad], a
|
||||
jr .done
|
||||
|
||||
.a_button
|
||||
ld a, A_BUTTON
|
||||
ld a, PAD_A
|
||||
ld [wMenuJoypad], a
|
||||
|
||||
.done
|
||||
|
|
@ -689,7 +689,7 @@ ContinueGettingMenuJoypad:
|
|||
ret
|
||||
|
||||
.b_start
|
||||
ld a, B_BUTTON
|
||||
ld a, PAD_B
|
||||
ld [wMenuJoypad], a
|
||||
ld a, -1
|
||||
ld [wMenuSelection], a
|
||||
|
|
@ -792,7 +792,7 @@ ClearWindowData::
|
|||
|
||||
MenuClickSound::
|
||||
push af
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr z, .nosound
|
||||
ld hl, wMenuFlags
|
||||
bit MENU_NO_CLICK_SFX_F, [hl]
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ PrintLetterDelay::
|
|||
|
||||
; Wait one frame if holding A or B.
|
||||
ldh a, [hJoyDown]
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr z, .checkb
|
||||
jr .delay
|
||||
.checkb
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr z, .wait
|
||||
|
||||
.delay
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ JoyTextDelay_ForcehJoyDown::
|
|||
ldh [hInMenu], a
|
||||
|
||||
ldh a, [hJoyLast]
|
||||
and D_RIGHT + D_LEFT + D_UP + D_DOWN
|
||||
and PAD_RIGHT + PAD_LEFT + PAD_UP + PAD_DOWN
|
||||
ld c, a
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON + B_BUTTON + SELECT + START
|
||||
and PAD_A + PAD_B + PAD_SELECT + PAD_START
|
||||
or c
|
||||
ld c, a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ TextCommand_FAR::
|
|||
ld a, [hli]
|
||||
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
|
||||
push hl
|
||||
ld h, d
|
||||
|
|
@ -770,7 +770,7 @@ TextCommand_FAR::
|
|||
|
||||
pop af
|
||||
ldh [hROMBank], a
|
||||
ld [rROMB0], a
|
||||
ld [rROMB], a
|
||||
ret
|
||||
|
||||
TextCommand_BCD::
|
||||
|
|
@ -891,7 +891,7 @@ TextCommand_PAUSE::
|
|||
push bc
|
||||
call GetJoypad
|
||||
ldh a, [hJoyDown]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .done
|
||||
ld c, 30
|
||||
call DelayFrames
|
||||
|
|
@ -968,7 +968,7 @@ TextCommand_DOTS::
|
|||
ld [hli], a
|
||||
call GetJoypad
|
||||
ldh a, [hJoyDown]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .next
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ INCLUDE "constants/hardware.inc"
|
|||
INCLUDE "constants/deco_constants.asm"
|
||||
INCLUDE "constants/ram_constants.asm"
|
||||
INCLUDE "constants/misc_constants.asm"
|
||||
INCLUDE "constants/input_constants.asm"
|
||||
INCLUDE "constants/gfx_constants.asm"
|
||||
INCLUDE "constants/text_constants.asm"
|
||||
INCLUDE "constants/audio_constants.asm"
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ MACRO RGB
|
|||
endr
|
||||
ENDM
|
||||
|
||||
DEF palred EQUS "(1 << 0) *"
|
||||
DEF palgreen EQUS "(1 << 5) *"
|
||||
DEF palblue EQUS "(1 << 10) *"
|
||||
DEF palred EQUS "(1 << B_COLOR_RED) *"
|
||||
DEF palgreen EQUS "(1 << B_COLOR_GREEN) *"
|
||||
DEF palblue EQUS "(1 << B_COLOR_BLUE) *"
|
||||
|
||||
DEF palettes EQUS "* PAL_SIZE"
|
||||
DEF palette EQUS "+ PAL_SIZE *"
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ DEF PAL_OW_SILVER EQUS "PAL_OW_EMOTE"
|
|||
; constants/hardware.inc (formerly constants/hardware_constants.asm)
|
||||
|
||||
DEF MBC3SRamEnable EQU rRAMG
|
||||
DEF MBC3RomBank EQU rROMB0
|
||||
DEF MBC3RomBank EQU rROMB
|
||||
DEF MBC3SRamBank EQU rRAMB
|
||||
DEF MBC3LatchClock EQU rRTCLATCH
|
||||
DEF MBC3RTC EQU rRTCREG
|
||||
|
|
@ -516,6 +516,29 @@ DEF rBGPI_AUTO_INCREMENT EQU B_BGPI_AUTOINC
|
|||
|
||||
DEF rOBPI_AUTO_INCREMENT EQU B_OBPI_AUTOINC
|
||||
|
||||
; constants/input_constants.asm
|
||||
|
||||
DEF A_BUTTON_F EQU B_PAD_A
|
||||
DEF B_BUTTON_F EQU B_PAD_B
|
||||
DEF SELECT_F EQU B_PAD_SELECT
|
||||
DEF START_F EQU B_PAD_START
|
||||
DEF D_RIGHT_F EQU B_PAD_RIGHT
|
||||
DEF D_LEFT_F EQU B_PAD_LEFT
|
||||
DEF D_UP_F EQU B_PAD_UP
|
||||
DEF D_DOWN_F EQU B_PAD_DOWN
|
||||
|
||||
DEF A_BUTTON EQU PAD_A
|
||||
DEF B_BUTTON EQU PAD_B
|
||||
DEF SELECT EQU PAD_SELECT
|
||||
DEF START EQU PAD_START
|
||||
DEF D_RIGHT EQU PAD_RIGHT
|
||||
DEF D_LEFT EQU PAD_LEFT
|
||||
DEF D_UP EQU PAD_UP
|
||||
DEF D_DOWN EQU PAD_DOWN
|
||||
|
||||
DEF BUTTONS EQU PAD_BUTTONS
|
||||
DEF D_PAD EQU PAD_CTRL_PAD
|
||||
|
||||
; constants/gfx_constants.asm
|
||||
|
||||
DEF LEN_1BPP_TILE EQU TILE_1BPP_SIZE
|
||||
|
|
@ -534,3 +557,10 @@ DEF SPRITEOAMSTRUCT_TILE_ID EQU OAMA_TILEID
|
|||
DEF SPRITEOAMSTRUCT_ATTRIBUTES EQU OAMA_FLAGS
|
||||
DEF SPRITEOAMSTRUCT_LENGTH EQU OBJ_SIZE
|
||||
DEF NUM_SPRITE_OAM_STRUCTS EQU OAM_COUNT
|
||||
|
||||
; constants/audio_constants.asm
|
||||
|
||||
DEF VOLUME_SO1_F EQU B_AUDVOL_VIN_RIGHT
|
||||
DEF VOLUME_SO2_F EQU B_AUDVOL_VIN_LEFT
|
||||
DEF VOLUME_SO1_LEVEL EQU AUDVOL_RIGHT
|
||||
DEF VOLUME_SO2_LEVEL EQU AUDVOL_LEFT
|
||||
|
|
|
|||
|
|
@ -729,37 +729,37 @@ Function11c53d:
|
|||
ld de, hJoypadPressed
|
||||
|
||||
ld a, [de]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
|
||||
ld a, [de]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
|
||||
ld a, [de]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
|
||||
ld a, [de]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
|
||||
ld de, hJoyLast
|
||||
|
||||
ld a, [de]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
|
||||
ld a, [de]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
|
||||
ld a, [de]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
|
||||
ld a, [de]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
|
||||
ret
|
||||
|
|
@ -937,16 +937,16 @@ Function11c675:
|
|||
ld hl, wMobileCommsJumptableIndex
|
||||
ld de, hJoypadPressed
|
||||
ld a, [de]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld a, [de]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
ld a, [de]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
ld a, [de]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr z, .select
|
||||
|
||||
ld a, [wcd26]
|
||||
|
|
@ -989,16 +989,16 @@ Function11c675:
|
|||
.select
|
||||
ld de, hJoyLast
|
||||
ld a, [de]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11c708
|
||||
ld a, [de]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11c731
|
||||
ld a, [de]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .asm_11c746
|
||||
ld a, [de]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .asm_11c755
|
||||
ret
|
||||
|
||||
|
|
@ -1936,16 +1936,16 @@ Function11cd54:
|
|||
ld hl, wcd2c
|
||||
ld de, hJoypadPressed
|
||||
ld a, [de]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11cd6f
|
||||
ld a, [de]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .asm_11cd73
|
||||
ld a, [de]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11cd8b
|
||||
ld a, [de]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11cd94
|
||||
ret
|
||||
|
||||
|
|
@ -2041,30 +2041,30 @@ Function11ce2b:
|
|||
|
||||
ld de, hJoypadPressed
|
||||
ld a, [de]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, .start
|
||||
ld a, [de]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, .select
|
||||
ld a, [de]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a
|
||||
ld a, [de]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b
|
||||
|
||||
ld de, hJoyLast
|
||||
ld a, [de]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .up
|
||||
ld a, [de]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .down
|
||||
ld a, [de]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .left
|
||||
ld a, [de]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .right
|
||||
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ Function48157:
|
|||
ld b, [hl]
|
||||
push bc
|
||||
asm_4815f:
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jp nz, Function4820d
|
||||
ld b, a
|
||||
ld a, [wd002]
|
||||
|
|
@ -135,7 +135,7 @@ asm_4815f:
|
|||
ld hl, wCrystalFlags
|
||||
bit 1, [hl]
|
||||
jr z, .dont_check_b_button
|
||||
bit B_BUTTON_F, b
|
||||
bit B_PAD_B, b
|
||||
jr nz, .b_button
|
||||
.dont_check_b_button
|
||||
jp Function48272
|
||||
|
|
@ -721,15 +721,15 @@ Function486bf:
|
|||
ld [hli], a ; flags 2
|
||||
ld a, $20
|
||||
ld [hli], a ; cursor offsets
|
||||
ld a, A_BUTTON
|
||||
add D_UP
|
||||
add D_DOWN
|
||||
ld a, PAD_A
|
||||
add PAD_UP
|
||||
add PAD_DOWN
|
||||
push af
|
||||
ld a, [wd002]
|
||||
bit 6, a
|
||||
jr z, .got_joypad_mask
|
||||
pop af
|
||||
add B_BUTTON
|
||||
add PAD_B
|
||||
push af
|
||||
.got_joypad_mask
|
||||
pop af
|
||||
|
|
@ -787,8 +787,8 @@ Function4873c:
|
|||
ld [hli], a ; flags 2
|
||||
ln a, 2, 0
|
||||
ld [hli], a ; cursor offsets
|
||||
ld a, A_BUTTON
|
||||
add B_BUTTON
|
||||
ld a, PAD_A
|
||||
add PAD_B
|
||||
ld [hli], a ; joypad filter
|
||||
; ld a, [wPlayerGender]
|
||||
; xor 1 << PLAYERGENDER_FEMALE_F
|
||||
|
|
@ -898,23 +898,23 @@ String_4880d:
|
|||
|
||||
Function4880e:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, Function488b9
|
||||
ldh a, [hJoyPressed]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jp nz, Function488b4
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_48843
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_48838
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .asm_4884f
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .asm_4885f
|
||||
call DelayFrame
|
||||
and a
|
||||
|
|
@ -1265,10 +1265,10 @@ String_48aa1:
|
|||
|
||||
Function48ab5:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, Function48c0f
|
||||
ldh a, [hJoyPressed]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jp nz, Function48c0d
|
||||
ld a, d
|
||||
and a
|
||||
|
|
@ -1338,16 +1338,16 @@ Function48ab5:
|
|||
.asm_48b2c
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_48b8d
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_48b55
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jp nz, Function48bd7
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .asm_48b9d
|
||||
hlcoord 11, 10
|
||||
call Function489ea
|
||||
|
|
|
|||
|
|
@ -1561,15 +1561,15 @@ String_89a53:
|
|||
|
||||
Function89a57:
|
||||
call JoyTextDelay_ForcehJoyDown ; joypad
|
||||
bit D_UP_F, c
|
||||
bit B_PAD_UP, c
|
||||
jr nz, .d_up
|
||||
bit D_DOWN_F, c
|
||||
bit B_PAD_DOWN, c
|
||||
jr nz, .d_down
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr nz, .a_b_button
|
||||
bit B_BUTTON_F, c
|
||||
bit B_PAD_B, c
|
||||
jr nz, .a_b_button
|
||||
bit START_F, c
|
||||
bit B_PAD_START, c
|
||||
jr nz, .start_button
|
||||
scf
|
||||
ret
|
||||
|
|
@ -1926,33 +1926,33 @@ Function89c67:
|
|||
; menu scrolling?
|
||||
call JoyTextDelay_ForcehJoyDown ; joypad
|
||||
ld b, $0
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr z, .not_a_button
|
||||
ld b, $1
|
||||
and a
|
||||
ret
|
||||
|
||||
.not_a_button
|
||||
bit B_BUTTON_F, c
|
||||
bit B_PAD_B, c
|
||||
jr z, .not_b_button
|
||||
scf
|
||||
ret
|
||||
|
||||
.not_b_button
|
||||
xor a
|
||||
bit D_UP_F, c
|
||||
bit B_PAD_UP, c
|
||||
jr z, .not_d_up
|
||||
ld a, $1
|
||||
.not_d_up
|
||||
bit D_DOWN_F, c
|
||||
bit B_PAD_DOWN, c
|
||||
jr z, .not_d_down
|
||||
ld a, $2
|
||||
.not_d_down
|
||||
bit D_LEFT_F, c
|
||||
bit B_PAD_LEFT, c
|
||||
jr z, .not_d_left
|
||||
ld a, $3
|
||||
.not_d_left
|
||||
bit D_RIGHT_F, c
|
||||
bit B_PAD_RIGHT, c
|
||||
jr z, .not_d_right
|
||||
ld a, $4
|
||||
.not_d_right
|
||||
|
|
@ -2136,9 +2136,9 @@ Function89dab:
|
|||
ld hl, wMenuJoypadFilter
|
||||
and [hl]
|
||||
ret z
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .asm_89dc7
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .asm_89dd9
|
||||
xor a
|
||||
ret
|
||||
|
|
@ -2943,9 +2943,9 @@ Function8a383:
|
|||
ld hl, wMenuJoypadFilter
|
||||
and [hl]
|
||||
ret z
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .asm_8a399
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .asm_8a39e
|
||||
xor a
|
||||
ret
|
||||
|
|
@ -3664,7 +3664,7 @@ Function8a930:
|
|||
.asm_8a943
|
||||
call Function8b7bd
|
||||
ld a, [wMenuJoypad]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_8a953
|
||||
ld a, c
|
||||
and a
|
||||
|
|
@ -3945,11 +3945,11 @@ Function8ab3b:
|
|||
|
||||
.JoypadLoop:
|
||||
call JoyTextDelay_ForcehJoyDown
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr nz, .a_b_button
|
||||
bit B_BUTTON_F, c
|
||||
bit B_PAD_B, c
|
||||
jr nz, .a_b_button
|
||||
bit START_F, c
|
||||
bit B_PAD_START, c
|
||||
jr z, .JoypadLoop
|
||||
call PlayClickSFX
|
||||
call Function89d0d
|
||||
|
|
|
|||
|
|
@ -156,13 +156,13 @@ Function8b3dd:
|
|||
ld a, c
|
||||
pop bc
|
||||
pop de
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b_button
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .d_down
|
||||
and a
|
||||
ret
|
||||
|
|
@ -800,15 +800,15 @@ Function8b7bd:
|
|||
call ScrollingMenu
|
||||
call Mobile_DisableSpriteUpdates
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .asm_8b823
|
||||
cp D_LEFT
|
||||
cp PAD_LEFT
|
||||
jr nz, .asm_8b813
|
||||
call Function8b832
|
||||
jr .asm_8b7ea
|
||||
|
||||
.asm_8b813
|
||||
cp D_RIGHT
|
||||
cp PAD_RIGHT
|
||||
jr nz, .asm_8b81c
|
||||
call Function8b83e
|
||||
jr .asm_8b7ea
|
||||
|
|
|
|||
|
|
@ -1514,8 +1514,8 @@ Function1009d2:
|
|||
|
||||
Function1009f3:
|
||||
ldh a, [hJoyDown]
|
||||
and SELECT + A_BUTTON
|
||||
cp SELECT + A_BUTTON
|
||||
and PAD_SELECT + PAD_A
|
||||
cp PAD_SELECT + PAD_A
|
||||
jr nz, .select_a
|
||||
ld hl, wcd2a
|
||||
set 4, [hl]
|
||||
|
|
@ -1795,13 +1795,13 @@ Mobile_MoveSelectionScreen:
|
|||
jr c, .b_button
|
||||
ld a, [wMenuJoypadFilter]
|
||||
and c
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jp nz, .d_up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jp nz, .d_down
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b_button
|
||||
jr .loop
|
||||
|
||||
|
|
@ -1907,7 +1907,7 @@ Function100c98:
|
|||
db -1, 1 ; rows, columns
|
||||
db $a0, $00 ; flags
|
||||
dn 2, 0 ; cursor offsets
|
||||
db D_UP | D_DOWN | A_BUTTON | B_BUTTON ; accepted buttons
|
||||
db PAD_UP | PAD_DOWN | PAD_A | PAD_B ; accepted buttons
|
||||
|
||||
Mobile_PartyMenuSelect:
|
||||
call Function100dd8
|
||||
|
|
@ -3015,8 +3015,8 @@ asm_101416:
|
|||
Function101418:
|
||||
call GetJoypad
|
||||
ldh a, [hJoyDown]
|
||||
and SELECT + A_BUTTON
|
||||
cp SELECT + A_BUTTON
|
||||
and PAD_SELECT + PAD_A
|
||||
cp PAD_SELECT + PAD_A
|
||||
jr z, .asm_101425
|
||||
xor a
|
||||
ret
|
||||
|
|
@ -3110,7 +3110,7 @@ Function1014a6:
|
|||
Function1014b7:
|
||||
call GetJoypad
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
jr nz, .asm_1014c5
|
||||
ld hl, wcd42
|
||||
dec [hl]
|
||||
|
|
@ -5260,7 +5260,7 @@ Function1024de:
|
|||
dec [hl]
|
||||
jr z, .asm_1024e9
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON
|
||||
and PAD_A | PAD_B
|
||||
ret z
|
||||
|
||||
.asm_1024e9
|
||||
|
|
@ -5420,11 +5420,11 @@ Function1025ff:
|
|||
ld a, [wMenuJoypadFilter]
|
||||
and c
|
||||
ret z
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr nz, .a_button
|
||||
bit D_UP_F, c
|
||||
bit B_PAD_UP, c
|
||||
jr nz, .d_up
|
||||
bit D_DOWN_F, c
|
||||
bit B_PAD_DOWN, c
|
||||
jr nz, .d_down
|
||||
ret
|
||||
|
||||
|
|
@ -5480,11 +5480,11 @@ Function10266b:
|
|||
ld a, [wMenuJoypadFilter]
|
||||
and c
|
||||
ret z
|
||||
bit A_BUTTON_F, c
|
||||
bit B_PAD_A, c
|
||||
jr nz, .a_button
|
||||
bit D_DOWN_F, c
|
||||
bit B_PAD_DOWN, c
|
||||
jr nz, .d_down
|
||||
bit D_UP_F, c
|
||||
bit B_PAD_UP, c
|
||||
jr nz, .d_up
|
||||
ret
|
||||
|
||||
|
|
@ -5549,11 +5549,11 @@ Function1026de:
|
|||
|
||||
Function1026f3:
|
||||
ldh a, [hJoyPressed]
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .asm_102723
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .asm_102712
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .asm_102702
|
||||
ret
|
||||
|
||||
|
|
@ -5633,11 +5633,11 @@ Function102775:
|
|||
|
||||
Function10278c:
|
||||
ldh a, [hJoyPressed]
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, asm_1027c6
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, asm_1027e2
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .asm_10279b
|
||||
ret
|
||||
|
||||
|
|
@ -5658,11 +5658,11 @@ Function1027a0:
|
|||
|
||||
Function1027b7:
|
||||
ldh a, [hJoyPressed]
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, asm_1027d1
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, asm_1027e2
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, Function102770
|
||||
ret
|
||||
|
||||
|
|
@ -6012,7 +6012,7 @@ MenuData3_102a33:
|
|||
db 2, 1 ; rows, columns
|
||||
db $80, $00 ; flags
|
||||
dn 2, 0 ; cursor offset
|
||||
db A_BUTTON ; accepted buttons
|
||||
db PAD_A ; accepted buttons
|
||||
|
||||
Function102a3b:
|
||||
ld a, [wcd30]
|
||||
|
|
@ -6162,7 +6162,7 @@ MenuData_102b73:
|
|||
db -1, 1 ; rows, columns
|
||||
db $a0, $00 ; flags
|
||||
dn 1, 0 ; cursor offset
|
||||
db D_UP | D_DOWN | A_BUTTON ; accepted buttons
|
||||
db PAD_UP | PAD_DOWN | PAD_A ; accepted buttons
|
||||
|
||||
Function102b7b:
|
||||
xor a
|
||||
|
|
@ -6182,7 +6182,7 @@ MenuData_102b94:
|
|||
db 255, 1 ; rows, columns
|
||||
db $a0, $00 ; flags
|
||||
dn 1, 0 ; cursor offset
|
||||
db D_UP | D_DOWN | A_BUTTON ; accepted buttons
|
||||
db PAD_UP | PAD_DOWN | PAD_A ; accepted buttons
|
||||
|
||||
Function102b9c:
|
||||
ld a, [wcd4d]
|
||||
|
|
@ -7017,17 +7017,17 @@ Function10339a:
|
|||
Function1033af:
|
||||
call GetJoypad
|
||||
ldh a, [hJoyPressed]
|
||||
bit D_LEFT_F, a
|
||||
bit B_PAD_LEFT, a
|
||||
jr nz, .left
|
||||
bit D_RIGHT_F, a
|
||||
bit B_PAD_RIGHT, a
|
||||
jr nz, .right
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a
|
||||
bit D_UP_F, a
|
||||
bit B_PAD_UP, a
|
||||
jr nz, .up
|
||||
bit D_DOWN_F, a
|
||||
bit B_PAD_DOWN, a
|
||||
jr nz, .down
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -126,29 +126,29 @@ Function117764:
|
|||
ld [wcd24], a
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and SELECT
|
||||
and PAD_SELECT
|
||||
jr nz, Function117764_select
|
||||
ld a, [hl]
|
||||
and START
|
||||
and PAD_START
|
||||
jr nz, Function117764_start
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, Function117764_a_button
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, Function117764_b_button
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, Function117764_d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, Function117764_d_down
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jp nz, Function117764_d_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jp nz, Function117764_d_right
|
||||
ret
|
||||
|
||||
|
|
@ -341,13 +341,13 @@ Function1178aa:
|
|||
|
||||
Function1178e8:
|
||||
ldh a, [hJoyPressed]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b_button
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a_button
|
||||
cp D_DOWN
|
||||
cp PAD_DOWN
|
||||
jr z, .d_down
|
||||
cp D_UP
|
||||
cp PAD_UP
|
||||
ret nz
|
||||
ld a, [wcd4e]
|
||||
and a
|
||||
|
|
@ -591,13 +591,13 @@ Function117b31:
|
|||
|
||||
Function117b4f:
|
||||
ldh a, [hJoyPressed]
|
||||
cp B_BUTTON
|
||||
cp PAD_B
|
||||
jr z, .b_button
|
||||
cp A_BUTTON
|
||||
cp PAD_A
|
||||
jr z, .a_button
|
||||
cp D_DOWN
|
||||
cp PAD_DOWN
|
||||
jr z, .d_down
|
||||
cp D_UP
|
||||
cp PAD_UP
|
||||
ret nz
|
||||
ld a, [wcf64]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -1223,16 +1223,16 @@ BattleTowerRoomMenu_UpdatePickLevelMenu:
|
|||
call PlaceString
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
.asm_1189e5
|
||||
ret
|
||||
|
|
@ -4535,16 +4535,16 @@ BattleTowerRoomMenu2_PlaceYesNoMenu:
|
|||
BattleTowerRoomMenu2_UpdateYesNoMenu:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .a_button
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .b_button
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .d_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .d_down
|
||||
.asm_11a24c
|
||||
call Function11a9f0
|
||||
|
|
@ -4928,16 +4928,16 @@ Function11a4fe:
|
|||
Function11a536:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11a5a7
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .asm_11a5a2
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11a564
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11a583
|
||||
.asm_11a54d
|
||||
ld a, [wBattleTowerRoomMenu2JumptableIndex]
|
||||
|
|
@ -5705,16 +5705,16 @@ Function11adc4:
|
|||
and a
|
||||
ret z
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11ade6
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11aded
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11ae06
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
ret z
|
||||
call PlayClickSFX
|
||||
xor a
|
||||
|
|
@ -5818,16 +5818,16 @@ Function11ae98:
|
|||
and a
|
||||
ret z
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11aec1
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11aec8
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11aee1
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
ret z
|
||||
call PlayClickSFX
|
||||
.asm_11aeb4
|
||||
|
|
@ -5908,16 +5908,16 @@ Function11af4e:
|
|||
and a
|
||||
ret z
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11af77
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11af7e
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11af97
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
ret z
|
||||
call PlayClickSFX
|
||||
.asm_11af6a
|
||||
|
|
@ -6192,10 +6192,10 @@ Function11b099:
|
|||
Function11b0ff:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jr nz, .asm_11b141
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jr nz, .asm_11b131
|
||||
call Function11b175
|
||||
jr nc, .asm_11b125
|
||||
|
|
@ -6274,19 +6274,19 @@ Function11b175:
|
|||
ld e, a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, .asm_11b19a
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, .asm_11b1ae
|
||||
ld a, d
|
||||
cp e
|
||||
jr nc, .asm_11b1ed
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
and PAD_LEFT
|
||||
jr nz, .asm_11b1c6
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
and PAD_RIGHT
|
||||
jr nz, .asm_11b1d8
|
||||
jr .asm_11b1ed
|
||||
|
||||
|
|
|
|||
|
|
@ -515,16 +515,16 @@ Function171b4b:
|
|||
Function171b85:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jp nz, Function171b9f
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, Function171bbd
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
and PAD_UP
|
||||
jr nz, asm_171ba5
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
and PAD_DOWN
|
||||
jr nz, asm_171baf
|
||||
ret
|
||||
|
||||
|
|
@ -562,10 +562,10 @@ Function171bbd:
|
|||
Function171bcc:
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
and PAD_B
|
||||
jp nz, Function171bdc
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
and PAD_A
|
||||
jp nz, Function171beb
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ Function49f16:
|
|||
push bc
|
||||
|
||||
.check_buttons
|
||||
bit A_BUTTON_F, a
|
||||
bit B_PAD_A, a
|
||||
jr nz, .a_button
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .b_button
|
||||
jr .next
|
||||
|
||||
|
|
@ -142,11 +142,11 @@ MobileMenu_InitMenuBuffers:
|
|||
ld [hli], a
|
||||
ld a, $20 ; w2DMenuCursorOffsets
|
||||
ld [hli], a
|
||||
; could have done "ld a, A_BUTTON | D_UP | D_DOWN | B_BUTTON" instead
|
||||
ld a, A_BUTTON
|
||||
add D_UP
|
||||
add D_DOWN
|
||||
add B_BUTTON
|
||||
; could have done "ld a, PAD_A | PAD_UP | PAD_DOWN | PAD_B" instead
|
||||
ld a, PAD_A
|
||||
add PAD_UP
|
||||
add PAD_DOWN
|
||||
add PAD_B
|
||||
ld [hli], a ; wMenuJoypadFilter
|
||||
ld a, 1
|
||||
ld [hli], a ; wMenuCursorY, wMenuCursorX
|
||||
|
|
@ -392,7 +392,7 @@ Function4a28a:
|
|||
push af
|
||||
call PlayClickSFX
|
||||
pop af
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .quit
|
||||
ld a, [wMenuCursorY]
|
||||
cp $2
|
||||
|
|
@ -419,7 +419,7 @@ Function4a28a:
|
|||
ld hl, DeletePassword_YesNo_MenuHeader
|
||||
call LoadMenuHeader
|
||||
call VerticalMenu
|
||||
bit B_BUTTON_F, a
|
||||
bit B_PAD_B, a
|
||||
jr nz, .dont_delete_password
|
||||
ld a, [wMenuCursorY]
|
||||
cp $2
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
EXPORT SCREEN_HEIGHT_PX
|
||||
|
||||
; [print forbid 2]
|
||||
EXPORT A_BUTTON
|
||||
EXPORT PAD_A
|
||||
; [print forbid 3]
|
||||
EXPORT MAPGROUP_CIANWOOD
|
||||
EXPORT MAP_CIANWOOD_PHOTO_STUDIO
|
||||
; [print forbid 5]
|
||||
EXPORT NO_INPUT
|
||||
EXPORT B_BUTTON
|
||||
EXPORT D_UP
|
||||
EXPORT D_DOWN
|
||||
EXPORT PAD_B
|
||||
EXPORT PAD_UP
|
||||
EXPORT PAD_DOWN
|
||||
|
||||
; [FPA 001 Begin]
|
||||
EXPORT FISSURE
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ Fixcode={db NO_INPUT}
|
|||
ConditionType = 0
|
||||
ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wMenuSelection wMenuCursorY hJoyPressed hJoyPressed hJoyPressed hJoyPressed}
|
||||
ConditionValueB = {dws_ == == == >= <= == != != != != }
|
||||
ConditionValueC = {dws_ 0xdd 0xd3 A_BUTTON 0x00 0x0f 0x03 D_DOWN D_UP B_BUTTON NO_INPUT }
|
||||
ConditionValueC = {dws_ 0xdd 0xd3 PAD_A 0x00 0x0f 0x03 PAD_DOWN PAD_UP PAD_B NO_INPUT }
|
||||
|
||||
; -----ddddfffffff99999ccccc77777----0xd9c7 no ..............Mem Write: pc32 = 0x230b addr = 0xd9c7 value = 0x8
|
||||
; 0xd9c7 is the room number.
|
||||
|
|
@ -283,7 +283,7 @@ Fixcode={db NO_INPUT}
|
|||
ConditionType = 0
|
||||
ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wMenuCursorY wMapGroup wMapNumber wYCoord wXCoord hJoyPressed hJoyPressed hJoyPressed hJoyPressed}
|
||||
ConditionValueB = {dws_ == == == == == == == == == != != != != }
|
||||
ConditionValueC = {dws_ 0xaf 0xdf NO_INPUT 0x00 0x01 MAPGROUP_CIANWOOD MAP_CIANWOOD_PHOTO_STUDIO 0x04 0x02 D_DOWN D_UP B_BUTTON NO_INPUT }
|
||||
ConditionValueC = {dws_ 0xaf 0xdf NO_INPUT 0x00 0x01 MAPGROUP_CIANWOOD MAP_CIANWOOD_PHOTO_STUDIO 0x04 0x02 PAD_DOWN PAD_UP PAD_B NO_INPUT }
|
||||
|
||||
|
||||
;ROM:BB29C call unk_934
|
||||
|
|
@ -326,7 +326,7 @@ Fixcode={db NO_INPUT}
|
|||
ConditionType = 0
|
||||
ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wDexArrowCursorPosIndex hJoyPressed hJoyPressed hJoyPressed hJoyPressed}
|
||||
ConditionValueB = {dws_ == == == == == != != != != }
|
||||
ConditionValueC = {dws_ 0xa1 0xdb A_BUTTON 0x00 0x03 D_DOWN D_UP B_BUTTON NO_INPUT }
|
||||
ConditionValueC = {dws_ 0xa1 0xdb PAD_A 0x00 0x03 PAD_DOWN PAD_UP PAD_B NO_INPUT }
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user