diff --git a/audio/engine.asm b/audio/engine.asm index 616675776c3..fed864a1d81 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -434,37 +434,37 @@ endr add hl, de ; load wavepattern into rWave_0-rWave_f ld a, [hli] - ldh [rWave_0], a + ldh [_AUD3WAVERAM], a ld a, [hli] - ldh [rWave_1], a + ldh [_AUD3WAVERAM + 1], a ld a, [hli] - ldh [rWave_2], a + ldh [_AUD3WAVERAM + 2], a ld a, [hli] - ldh [rWave_3], a + ldh [_AUD3WAVERAM + 3], a ld a, [hli] - ldh [rWave_4], a + ldh [_AUD3WAVERAM + 4], a ld a, [hli] - ldh [rWave_5], a + ldh [_AUD3WAVERAM + 5], a ld a, [hli] - ldh [rWave_6], a + ldh [_AUD3WAVERAM + 6], a ld a, [hli] - ldh [rWave_7], a + ldh [_AUD3WAVERAM + 7], a ld a, [hli] - ldh [rWave_8], a + ldh [_AUD3WAVERAM + 8], a ld a, [hli] - ldh [rWave_9], a + ldh [_AUD3WAVERAM + 9], a ld a, [hli] - ldh [rWave_a], a + ldh [_AUD3WAVERAM + 10], a ld a, [hli] - ldh [rWave_b], a + ldh [_AUD3WAVERAM + 11], a ld a, [hli] - ldh [rWave_c], a + ldh [_AUD3WAVERAM + 12], a ld a, [hli] - ldh [rWave_d], a + ldh [_AUD3WAVERAM + 13], a ld a, [hli] - ldh [rWave_e], a + ldh [_AUD3WAVERAM + 14], a ld a, [hli] - ldh [rWave_f], a + ldh [_AUD3WAVERAM + 15], a pop hl ld a, [wCurTrackVolumeEnvelope] and $f0 diff --git a/constants.asm b/constants.asm index 32c8d814c43..3f37cae0a62 100644 --- a/constants.asm +++ b/constants.asm @@ -2,7 +2,7 @@ INCLUDE "charmap.asm" INCLUDE "macros.asm" -INCLUDE "constants/hardware_constants.asm" +INCLUDE "constants/hardware.inc" INCLUDE "constants/deco_constants.asm" INCLUDE "constants/wram_constants.asm" INCLUDE "constants/misc_constants.asm" diff --git a/constants/hardware.inc b/constants/hardware.inc new file mode 100644 index 00000000000..ce2c717fa40 --- /dev/null +++ b/constants/hardware.inc @@ -0,0 +1,1046 @@ +;* +;* Gameboy Hardware definitions +;* +;* Based on Jones' hardware.inc +;* And based on Carsten Sorensen's ideas. +;* +;* Rev 1.1 - 15-Jul-97 : Added define check +;* Rev 1.2 - 18-Jul-97 : Added revision check macro +;* Rev 1.3 - 19-Jul-97 : Modified for RGBASM V1.05 +;* Rev 1.4 - 27-Jul-97 : Modified for new subroutine prefixes +;* Rev 1.5 - 15-Aug-97 : Added _HRAM, PAD, CART defines +;* : and Nintendo Logo +;* Rev 1.6 - 30-Nov-97 : Added rDIV, rTIMA, rTMA, & rTAC +;* Rev 1.7 - 31-Jan-98 : Added _SCRN0, _SCRN1 +;* Rev 1.8 - 15-Feb-98 : Added rSB, rSC +;* Rev 1.9 - 16-Feb-98 : Converted I/O registers to $FFXX format +;* Rev 2.0 - : Added GBC registers +;* Rev 2.1 - : Added MBC5 & cart RAM enable/disable defines +;* Rev 2.2 - : Fixed NR42,NR43, & NR44 equates +;* Rev 2.3 - : Fixed incorrect _HRAM equate +;* Rev 2.4 - 27-Apr-13 : Added some cart defines (AntonioND) +;* Rev 2.5 - 03-May-15 : Fixed format (AntonioND) +;* Rev 2.6 - 09-Apr-16 : Added GBC OAM and cart defines (AntonioND) +;* Rev 2.7 - 19-Jan-19 : Added rPCMXX (ISSOtm) +;* Rev 2.8 - 03-Feb-19 : Added audio registers flags (Álvaro Cuesta) +;* Rev 2.9 - 28-Feb-20 : Added utility rP1 constants +;* Rev 3.0 - 27-Aug-20 : Register ordering, byte-based sizes, OAM additions, general cleanup (Blitter Object) +;* Rev 4.0 - 03-May-21 : Updated to use RGBDS 0.5.0 syntax, changed IEF_LCDC to IEF_STAT (Eievui) +;* Rev 4.1 - 16-Aug-21 : Added more flags, bit number defines, and offset constants for OAM and window positions (rondnelson99) +;* Rev 4.2 - 04-Sep-21 : Added CH3- and CH4-specific audio registers flags (ISSOtm) +;* Rev 4.3 - 07-Nov-21 : Deprecate VRAM address constants (Eievui) +;* Rev 4.4 - 11-Jan-22 : Deprecate VRAM CART_SRAM_2KB constant (avivace) +;* Rev 4.5 - 03-Mar-22 : Added bit number definitions for OCPS, BCPS and LCDC (sukus) +;* Rev 4.6 - 15-Jun-22 : Added MBC3 registers and special values + +IF __RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 5 + FAIL "This version of 'hardware.inc' requires RGBDS version 0.5.0 or later." +ENDC + +; If all of these are already defined, don't do it again. + + IF !DEF(HARDWARE_INC) +DEF HARDWARE_INC EQU 1 + +MACRO rev_Check_hardware_inc +;NOTE: REVISION NUMBER CHANGES MUST BE ADDED +;TO SECOND PARAMETER IN FOLLOWING LINE. + IF \1 > 4.6 ;PUT REVISION NUMBER HERE + WARN "Version \1 or later of 'hardware.inc' is required." + ENDC +ENDM + + +;*************************************************************************** +;* +;* General memory region constants +;* +;*************************************************************************** + +DEF _VRAM EQU $8000 ; $8000->$9FFF +DEF _SCRN0 EQU $9800 ; $9800->$9BFF +DEF _SCRN1 EQU $9C00 ; $9C00->$9FFF +DEF _SRAM EQU $A000 ; $A000->$BFFF +DEF _RAM EQU $C000 ; $C000->$CFFF / $C000->$DFFF +DEF _RAMBANK EQU $D000 ; $D000->$DFFF +DEF _OAMRAM EQU $FE00 ; $FE00->$FE9F +DEF _IO EQU $FF00 ; $FF00->$FF7F,$FFFF +DEF _AUD3WAVERAM EQU $FF30 ; $FF30->$FF3F +DEF _HRAM EQU $FF80 ; $FF80->$FFFE + + +;*************************************************************************** +;* +;* MBC registers +;* +;*************************************************************************** + +; *** Common *** + +; -- +; -- RAMG ($0000-$1FFF) +; -- Controls whether access to SRAM (and the MBC3 RTC registers) is allowed (W) +; -- +DEF rRAMG EQU $0000 + +DEF CART_SRAM_ENABLE EQU $0A +DEF CART_SRAM_DISABLE EQU $00 + + +; -- +; -- ROMB0 ($2000-$3FFF) +; -- Selects which ROM bank is mapped to the ROMX space ($4000-$7FFF) (W) +; -- +; -- The range of accepted values, as well as the behavior of writing $00, +; -- varies depending on the MBC. +; -- +DEF rROMB0 EQU $2000 + +; -- +; -- RAMB ($4000-$5FFF) +; -- Selects which SRAM bank is mapped to the SRAM space ($A000-$BFFF) (W) +; -- +; -- The range of accepted values varies depending on the cartridge configuration. +; -- +DEF rRAMB EQU $4000 + + +; *** MBC3-specific registers *** + +; Write one of these to rRAMG to map the corresponding RTC register to all SRAM space +DEF RTC_S EQU $08 ; Seconds (0-59) +DEF RTC_M EQU $09 ; Minutes (0-59) +DEF RTC_H EQU $0A ; Hours (0-23) +DEF RTC_DL EQU $0B ; Lower 8 bits of Day Counter ($00-$FF) +DEF RTC_DH EQU $0C ; Bit 7 - Day Counter Carry Bit (1=Counter Overflow) + ; Bit 6 - Halt (0=Active, 1=Stop Timer) + ; Bit 0 - Most significant bit of Day Counter (Bit 8) + + +; -- +; -- RTCLATCH ($6000-$7FFF) +; -- Write $00 then $01 to latch the current time into the RTC registers (W) +; -- +DEF rRTCLATCH EQU $6000 + + +; *** MBC5-specific register *** + +; -- +; -- ROMB1 ($3000-$3FFF) +; -- A 9th bit that "extends" ROMB0 if more than 256 banks are present (W) +; -- +; -- Also note that rROMB0 thus only spans $2000-$2FFF. +; -- +DEF rROMB1 EQU $3000 + + +; Bit 3 of RAMB enables the rumble motor (if any) +DEF CART_RUMBLE_ON EQU 1 << 3 + + +;*************************************************************************** +;* +;* Memory-mapped registers +;* +;*************************************************************************** + +; -- +; -- P1 ($FF00) +; -- Register for reading joy pad info. (R/W) +; -- +DEF rP1 EQU $FF00 + +DEF P1F_5 EQU %00100000 ; P15 out port, set to 0 to get buttons +DEF P1F_4 EQU %00010000 ; P14 out port, set to 0 to get dpad +DEF P1F_3 EQU %00001000 ; P13 in port +DEF P1F_2 EQU %00000100 ; P12 in port +DEF P1F_1 EQU %00000010 ; P11 in port +DEF P1F_0 EQU %00000001 ; P10 in port + +DEF P1F_GET_DPAD EQU P1F_5 +DEF P1F_GET_BTN EQU P1F_4 +DEF P1F_GET_NONE EQU P1F_4 | P1F_5 + + +; -- +; -- SB ($FF01) +; -- Serial Transfer Data (R/W) +; -- +DEF rSB EQU $FF01 + + +; -- +; -- SC ($FF02) +; -- Serial I/O Control (R/W) +; -- +DEF rSC EQU $FF02 + +DEF SCF_START EQU %10000000 ; Transfer Start Flag (1=Transfer in progress, or requested) +DEF SCF_SPEED EQU %00000010 ; Clock Speed (0=Normal, 1=Fast) ** CGB Mode Only ** +DEF SCF_SOURCE EQU %00000001 ; Shift Clock (0=External Clock, 1=Internal Clock) + +DEF SCB_START EQU 7 +DEF SCB_SPEED EQU 1 +DEF SCB_SOURCE EQU 0 + +; -- +; -- DIV ($FF04) +; -- Divider register (R/W) +; -- +DEF rDIV EQU $FF04 + + +; -- +; -- TIMA ($FF05) +; -- Timer counter (R/W) +; -- +DEF rTIMA EQU $FF05 + + +; -- +; -- TMA ($FF06) +; -- Timer modulo (R/W) +; -- +DEF rTMA EQU $FF06 + + +; -- +; -- TAC ($FF07) +; -- Timer control (R/W) +; -- +DEF rTAC EQU $FF07 + +DEF TACF_START EQU %00000100 +DEF TACF_STOP EQU %00000000 +DEF TACF_4KHZ EQU %00000000 +DEF TACF_16KHZ EQU %00000011 +DEF TACF_65KHZ EQU %00000010 +DEF TACF_262KHZ EQU %00000001 + +DEF TACB_START EQU 2 + + +; -- +; -- IF ($FF0F) +; -- Interrupt Flag (R/W) +; -- +DEF rIF EQU $FF0F + + +; -- +; -- AUD1SWEEP/NR10 ($FF10) +; -- Sweep register (R/W) +; -- +; -- Bit 6-4 - Sweep Time +; -- Bit 3 - Sweep Increase/Decrease +; -- 0: Addition (frequency increases???) +; -- 1: Subtraction (frequency increases???) +; -- Bit 2-0 - Number of sweep shift (# 0-7) +; -- Sweep Time: (n*7.8ms) +; -- +DEF rNR10 EQU $FF10 +DEF rAUD1SWEEP EQU rNR10 + +DEF AUD1SWEEP_UP EQU %00000000 +DEF AUD1SWEEP_DOWN EQU %00001000 + + +; -- +; -- AUD1LEN/NR11 ($FF11) +; -- Sound length/Wave pattern duty (R/W) +; -- +; -- Bit 7-6 - Wave Pattern Duty (00:12.5% 01:25% 10:50% 11:75%) +; -- Bit 5-0 - Sound length data (# 0-63) +; -- +DEF rNR11 EQU $FF11 +DEF rAUD1LEN EQU rNR11 + + +; -- +; -- AUD1ENV/NR12 ($FF12) +; -- Envelope (R/W) +; -- +; -- Bit 7-4 - Initial value of envelope +; -- Bit 3 - Envelope UP/DOWN +; -- 0: Decrease +; -- 1: Range of increase +; -- Bit 2-0 - Number of envelope sweep (# 0-7) +; -- +DEF rNR12 EQU $FF12 +DEF rAUD1ENV EQU rNR12 + + +; -- +; -- AUD1LOW/NR13 ($FF13) +; -- Frequency low byte (W) +; -- +DEF rNR13 EQU $FF13 +DEF rAUD1LOW EQU rNR13 + + +; -- +; -- AUD1HIGH/NR14 ($FF14) +; -- Frequency high byte (W) +; -- +; -- Bit 7 - Initial (when set, sound restarts) +; -- Bit 6 - Counter/consecutive selection +; -- Bit 2-0 - Frequency's higher 3 bits +; -- +DEF rNR14 EQU $FF14 +DEF rAUD1HIGH EQU rNR14 + + +; -- +; -- AUD2LEN/NR21 ($FF16) +; -- Sound Length; Wave Pattern Duty (R/W) +; -- +; -- see AUD1LEN for info +; -- +DEF rNR21 EQU $FF16 +DEF rAUD2LEN EQU rNR21 + + +; -- +; -- AUD2ENV/NR22 ($FF17) +; -- Envelope (R/W) +; -- +; -- see AUD1ENV for info +; -- +DEF rNR22 EQU $FF17 +DEF rAUD2ENV EQU rNR22 + + +; -- +; -- AUD2LOW/NR23 ($FF18) +; -- Frequency low byte (W) +; -- +DEF rNR23 EQU $FF18 +DEF rAUD2LOW EQU rNR23 + + +; -- +; -- AUD2HIGH/NR24 ($FF19) +; -- Frequency high byte (W) +; -- +; -- see AUD1HIGH for info +; -- +DEF rNR24 EQU $FF19 +DEF rAUD2HIGH EQU rNR24 + + +; -- +; -- AUD3ENA/NR30 ($FF1A) +; -- Sound on/off (R/W) +; -- +; -- Bit 7 - Sound ON/OFF (1=ON,0=OFF) +; -- +DEF rNR30 EQU $FF1A +DEF rAUD3ENA EQU rNR30 + +DEF AUD3ENA_OFF EQU %00000000 +DEF AUD3ENA_ON EQU %10000000 + + +; -- +; -- AUD3LEN/NR31 ($FF1B) +; -- Sound length (R/W) +; -- +; -- Bit 7-0 - Sound length +; -- +DEF rNR31 EQU $FF1B +DEF rAUD3LEN EQU rNR31 + + +; -- +; -- AUD3LEVEL/NR32 ($FF1C) +; -- Select output level +; -- +; -- Bit 6-5 - Select output level +; -- 00: 0/1 (mute) +; -- 01: 1/1 +; -- 10: 1/2 +; -- 11: 1/4 +; -- +DEF rNR32 EQU $FF1C +DEF rAUD3LEVEL EQU rNR32 + +DEF AUD3LEVEL_MUTE EQU %00000000 +DEF AUD3LEVEL_100 EQU %00100000 +DEF AUD3LEVEL_50 EQU %01000000 +DEF AUD3LEVEL_25 EQU %01100000 + + +; -- +; -- AUD3LOW/NR33 ($FF1D) +; -- Frequency low byte (W) +; -- +; -- see AUD1LOW for info +; -- +DEF rNR33 EQU $FF1D +DEF rAUD3LOW EQU rNR33 + + +; -- +; -- AUD3HIGH/NR34 ($FF1E) +; -- Frequency high byte (W) +; -- +; -- see AUD1HIGH for info +; -- +DEF rNR34 EQU $FF1E +DEF rAUD3HIGH EQU rNR34 + + +; -- +; -- AUD4LEN/NR41 ($FF20) +; -- Sound length (R/W) +; -- +; -- Bit 5-0 - Sound length data (# 0-63) +; -- +DEF rNR41 EQU $FF20 +DEF rAUD4LEN EQU rNR41 + + +; -- +; -- AUD4ENV/NR42 ($FF21) +; -- Envelope (R/W) +; -- +; -- see AUD1ENV for info +; -- +DEF rNR42 EQU $FF21 +DEF rAUD4ENV EQU rNR42 + + +; -- +; -- AUD4POLY/NR43 ($FF22) +; -- Polynomial counter (R/W) +; -- +; -- Bit 7-4 - Selection of the shift clock frequency of the (scf) +; -- polynomial counter (0000-1101) +; -- freq=drf*1/2^scf (not sure) +; -- Bit 3 - Selection of the polynomial counter's step +; -- 0: 15 steps +; -- 1: 7 steps +; -- Bit 2-0 - Selection of the dividing ratio of frequencies (drf) +; -- 000: f/4 001: f/8 010: f/16 011: f/24 +; -- 100: f/32 101: f/40 110: f/48 111: f/56 (f=4.194304 Mhz) +; -- +DEF rNR43 EQU $FF22 +DEF rAUD4POLY EQU rNR43 + +DEF AUD4POLY_15STEP EQU %00000000 +DEF AUD4POLY_7STEP EQU %00001000 + + +; -- +; -- AUD4GO/NR44 ($FF23) +; -- +; -- Bit 7 - Initial (when set, sound restarts) +; -- Bit 6 - Counter/consecutive selection +; -- +DEF rNR44 EQU $FF23 +DEF rAUD4GO EQU rNR44 + + +; -- +; -- AUDVOL/NR50 ($FF24) +; -- Channel control / ON-OFF / Volume (R/W) +; -- +; -- Bit 7 - Vin->SO2 ON/OFF (left) +; -- Bit 6-4 - SO2 output level (left speaker) (# 0-7) +; -- Bit 3 - Vin->SO1 ON/OFF (right) +; -- Bit 2-0 - SO1 output level (right speaker) (# 0-7) +; -- +DEF rNR50 EQU $FF24 +DEF rAUDVOL EQU rNR50 + +DEF AUDVOL_VIN_LEFT EQU %10000000 ; SO2 +DEF AUDVOL_VIN_RIGHT EQU %00001000 ; SO1 + + +; -- +; -- AUDTERM/NR51 ($FF25) +; -- Selection of Sound output terminal (R/W) +; -- +; -- Bit 7 - Output channel 4 to SO2 terminal (left) +; -- Bit 6 - Output channel 3 to SO2 terminal (left) +; -- Bit 5 - Output channel 2 to SO2 terminal (left) +; -- Bit 4 - Output channel 1 to SO2 terminal (left) +; -- Bit 3 - Output channel 4 to SO1 terminal (right) +; -- Bit 2 - Output channel 3 to SO1 terminal (right) +; -- Bit 1 - Output channel 2 to SO1 terminal (right) +; -- Bit 0 - Output channel 1 to SO1 terminal (right) +; -- +DEF rNR51 EQU $FF25 +DEF rAUDTERM EQU rNR51 + +; SO2 +DEF AUDTERM_4_LEFT EQU %10000000 +DEF AUDTERM_3_LEFT EQU %01000000 +DEF AUDTERM_2_LEFT EQU %00100000 +DEF AUDTERM_1_LEFT EQU %00010000 +; SO1 +DEF AUDTERM_4_RIGHT EQU %00001000 +DEF AUDTERM_3_RIGHT EQU %00000100 +DEF AUDTERM_2_RIGHT EQU %00000010 +DEF AUDTERM_1_RIGHT EQU %00000001 + + +; -- +; -- AUDENA/NR52 ($FF26) +; -- Sound on/off (R/W) +; -- +; -- Bit 7 - All sound on/off (sets all audio regs to 0!) +; -- Bit 3 - Sound 4 ON flag (read only) +; -- Bit 2 - Sound 3 ON flag (read only) +; -- Bit 1 - Sound 2 ON flag (read only) +; -- Bit 0 - Sound 1 ON flag (read only) +; -- +DEF rNR52 EQU $FF26 +DEF rAUDENA EQU rNR52 + +DEF AUDENA_ON EQU %10000000 +DEF AUDENA_OFF EQU %00000000 ; sets all audio regs to 0! + + +; -- +; -- LCDC ($FF40) +; -- LCD Control (R/W) +; -- +DEF rLCDC EQU $FF40 + +DEF LCDCF_OFF EQU %00000000 ; LCD Control Operation +DEF LCDCF_ON EQU %10000000 ; LCD Control Operation +DEF LCDCF_WIN9800 EQU %00000000 ; Window Tile Map Display Select +DEF LCDCF_WIN9C00 EQU %01000000 ; Window Tile Map Display Select +DEF LCDCF_WINOFF EQU %00000000 ; Window Display +DEF LCDCF_WINON EQU %00100000 ; Window Display +DEF LCDCF_BG8800 EQU %00000000 ; BG & Window Tile Data Select +DEF LCDCF_BG8000 EQU %00010000 ; BG & Window Tile Data Select +DEF LCDCF_BG9800 EQU %00000000 ; BG Tile Map Display Select +DEF LCDCF_BG9C00 EQU %00001000 ; BG Tile Map Display Select +DEF LCDCF_OBJ8 EQU %00000000 ; OBJ Construction +DEF LCDCF_OBJ16 EQU %00000100 ; OBJ Construction +DEF LCDCF_OBJOFF EQU %00000000 ; OBJ Display +DEF LCDCF_OBJON EQU %00000010 ; OBJ Display +DEF LCDCF_BGOFF EQU %00000000 ; BG Display +DEF LCDCF_BGON EQU %00000001 ; BG Display + +DEF LCDCB_ON EQU 7 ; LCD Control Operation +DEF LCDCB_WIN9C00 EQU 6 ; Window Tile Map Display Select +DEF LCDCB_WINON EQU 5 ; Window Display +DEF LCDCB_BG8000 EQU 4 ; BG & Window Tile Data Select +DEF LCDCB_BG9C00 EQU 3 ; BG Tile Map Display Select +DEF LCDCB_OBJ16 EQU 2 ; OBJ Construction +DEF LCDCB_OBJON EQU 1 ; OBJ Display +DEF LCDCB_BGON EQU 0 ; BG Display +; "Window Character Data Select" follows BG + + +; -- +; -- STAT ($FF41) +; -- LCDC Status (R/W) +; -- +DEF rSTAT EQU $FF41 + +DEF STATF_LYC EQU %01000000 ; LYC=LY Coincidence (Selectable) +DEF STATF_MODE10 EQU %00100000 ; Mode 10 +DEF STATF_MODE01 EQU %00010000 ; Mode 01 (V-Blank) +DEF STATF_MODE00 EQU %00001000 ; Mode 00 (H-Blank) +DEF STATF_LYCF EQU %00000100 ; Coincidence Flag +DEF STATF_HBL EQU %00000000 ; H-Blank +DEF STATF_VBL EQU %00000001 ; V-Blank +DEF STATF_OAM EQU %00000010 ; OAM-RAM is used by system +DEF STATF_LCD EQU %00000011 ; Both OAM and VRAM used by system +DEF STATF_BUSY EQU %00000010 ; When set, VRAM access is unsafe + +DEF STATB_LYC EQU 6 +DEF STATB_MODE10 EQU 5 +DEF STATB_MODE01 EQU 4 +DEF STATB_MODE00 EQU 3 +DEF STATB_LYCF EQU 2 +DEF STATB_BUSY EQU 1 + +; -- +; -- SCY ($FF42) +; -- Scroll Y (R/W) +; -- +DEF rSCY EQU $FF42 + + +; -- +; -- SCX ($FF43) +; -- Scroll X (R/W) +; -- +DEF rSCX EQU $FF43 + + +; -- +; -- LY ($FF44) +; -- LCDC Y-Coordinate (R) +; -- +; -- Values range from 0->153. 144->153 is the VBlank period. +; -- +DEF rLY EQU $FF44 + + +; -- +; -- LYC ($FF45) +; -- LY Compare (R/W) +; -- +; -- When LY==LYC, STATF_LYCF will be set in STAT +; -- +DEF rLYC EQU $FF45 + + +; -- +; -- DMA ($FF46) +; -- DMA Transfer and Start Address (W) +; -- +DEF rDMA EQU $FF46 + + +; -- +; -- BGP ($FF47) +; -- BG Palette Data (W) +; -- +; -- Bit 7-6 - Intensity for %11 +; -- Bit 5-4 - Intensity for %10 +; -- Bit 3-2 - Intensity for %01 +; -- Bit 1-0 - Intensity for %00 +; -- +DEF rBGP EQU $FF47 + + +; -- +; -- OBP0 ($FF48) +; -- Object Palette 0 Data (W) +; -- +; -- See BGP for info +; -- +DEF rOBP0 EQU $FF48 + + +; -- +; -- OBP1 ($FF49) +; -- Object Palette 1 Data (W) +; -- +; -- See BGP for info +; -- +DEF rOBP1 EQU $FF49 + + +; -- +; -- WY ($FF4A) +; -- Window Y Position (R/W) +; -- +; -- 0 <= WY <= 143 +; -- When WY = 0, the window is displayed from the top edge of the LCD screen. +; -- +DEF rWY EQU $FF4A + + +; -- +; -- WX ($FF4B) +; -- Window X Position (R/W) +; -- +; -- 7 <= WX <= 166 +; -- When WX = 7, the window is displayed from the left edge of the LCD screen. +; -- Values of 0-6 and 166 are unreliable due to hardware bugs. +; -- +DEF rWX EQU $FF4B + +DEF WX_OFS EQU 7 ; add this to a screen position to get a WX position + + +; -- +; -- SPEED ($FF4D) +; -- Select CPU Speed (R/W) +; -- +DEF rKEY1 EQU $FF4D +DEF rSPD EQU rKEY1 + +DEF KEY1F_DBLSPEED EQU %10000000 ; 0=Normal Speed, 1=Double Speed (R) +DEF KEY1F_PREPARE EQU %00000001 ; 0=No, 1=Prepare (R/W) + + +; -- +; -- VBK ($FF4F) +; -- Select Video RAM Bank (R/W) +; -- +; -- Bit 0 - Bank Specification (0: Specify Bank 0; 1: Specify Bank 1) +; -- +DEF rVBK EQU $FF4F + + +; -- +; -- HDMA1 ($FF51) +; -- High byte for Horizontal Blanking/General Purpose DMA source address (W) +; -- CGB Mode Only +; -- +DEF rHDMA1 EQU $FF51 + + +; -- +; -- HDMA2 ($FF52) +; -- Low byte for Horizontal Blanking/General Purpose DMA source address (W) +; -- CGB Mode Only +; -- +DEF rHDMA2 EQU $FF52 + + +; -- +; -- HDMA3 ($FF53) +; -- High byte for Horizontal Blanking/General Purpose DMA destination address (W) +; -- CGB Mode Only +; -- +DEF rHDMA3 EQU $FF53 + + +; -- +; -- HDMA4 ($FF54) +; -- Low byte for Horizontal Blanking/General Purpose DMA destination address (W) +; -- CGB Mode Only +; -- +DEF rHDMA4 EQU $FF54 + + +; -- +; -- HDMA5 ($FF55) +; -- Transfer length (in tiles minus 1)/mode/start for Horizontal Blanking, General Purpose DMA (R/W) +; -- CGB Mode Only +; -- +DEF rHDMA5 EQU $FF55 + +DEF HDMA5F_MODE_GP EQU %00000000 ; General Purpose DMA (W) +DEF HDMA5F_MODE_HBL EQU %10000000 ; HBlank DMA (W) +DEF HDMA5B_MODE EQU 7 ; DMA mode select (W) + +; -- Once DMA has started, use HDMA5F_BUSY to check when the transfer is complete +DEF HDMA5F_BUSY EQU %10000000 ; 0=Busy (DMA still in progress), 1=Transfer complete (R) + + +; -- +; -- RP ($FF56) +; -- Infrared Communications Port (R/W) +; -- CGB Mode Only +; -- +DEF rRP EQU $FF56 + +DEF RPF_ENREAD EQU %11000000 +DEF RPF_DATAIN EQU %00000010 ; 0=Receiving IR Signal, 1=Normal +DEF RPF_WRITE_HI EQU %00000001 +DEF RPF_WRITE_LO EQU %00000000 + +DEF RPB_DATAIN EQU 1 + +; -- +; -- BCPS ($FF68) +; -- Background Color Palette Specification (R/W) +; -- +DEF rBCPS EQU $FF68 + +DEF BCPSF_AUTOINC EQU %10000000 ; Auto Increment (0=Disabled, 1=Increment after Writing) +DEF BCPSB_AUTOINC EQU 7 + + +; -- +; -- BCPD ($FF69) +; -- Background Color Palette Data (R/W) +; -- +DEF rBCPD EQU $FF69 + + +; -- +; -- OCPS ($FF6A) +; -- Object Color Palette Specification (R/W) +; -- +DEF rOCPS EQU $FF6A + +DEF OCPSF_AUTOINC EQU %10000000 ; Auto Increment (0=Disabled, 1=Increment after Writing) +DEF OCPSB_AUTOINC EQU 7 + + +; -- +; -- OCPD ($FF6B) +; -- Object Color Palette Data (R/W) +; -- +DEF rOCPD EQU $FF6B + + +; -- +; -- SMBK/SVBK ($FF70) +; -- Select Main RAM Bank (R/W) +; -- +; -- Bit 2-0 - Bank Specification (0,1: Specify Bank 1; 2-7: Specify Banks 2-7) +; -- +DEF rSVBK EQU $FF70 +DEF rSMBK EQU rSVBK + + +; -- +; -- PCM12 ($FF76) +; -- Sound channel 1&2 PCM amplitude (R) +; -- +; -- Bit 7-4 - Copy of sound channel 2's PCM amplitude +; -- Bit 3-0 - Copy of sound channel 1's PCM amplitude +; -- +DEF rPCM12 EQU $FF76 + + +; -- +; -- PCM34 ($FF77) +; -- Sound channel 3&4 PCM amplitude (R) +; -- +; -- Bit 7-4 - Copy of sound channel 4's PCM amplitude +; -- Bit 3-0 - Copy of sound channel 3's PCM amplitude +; -- +DEF rPCM34 EQU $FF77 + + +; -- +; -- IE ($FFFF) +; -- Interrupt Enable (R/W) +; -- +DEF rIE EQU $FFFF + +DEF IEF_HILO EQU %00010000 ; Transition from High to Low of Pin number P10-P13 +DEF IEF_SERIAL EQU %00001000 ; Serial I/O transfer end +DEF IEF_TIMER EQU %00000100 ; Timer Overflow +DEF IEF_STAT EQU %00000010 ; STAT +DEF IEF_VBLANK EQU %00000001 ; V-Blank + +DEF IEB_HILO EQU 4 +DEF IEB_SERIAL EQU 3 +DEF IEB_TIMER EQU 2 +DEF IEB_STAT EQU 1 +DEF IEB_VBLANK EQU 0 + + +;*************************************************************************** +;* +;* Flags common to multiple sound channels +;* +;*************************************************************************** + +; -- +; -- Square wave duty cycle +; -- +; -- Can be used with AUD1LEN and AUD2LEN +; -- See AUD1LEN for more info +; -- +DEF AUDLEN_DUTY_12_5 EQU %00000000 ; 12.5% +DEF AUDLEN_DUTY_25 EQU %01000000 ; 25% +DEF AUDLEN_DUTY_50 EQU %10000000 ; 50% +DEF AUDLEN_DUTY_75 EQU %11000000 ; 75% + + +; -- +; -- Audio envelope flags +; -- +; -- Can be used with AUD1ENV, AUD2ENV, AUD4ENV +; -- See AUD1ENV for more info +; -- +DEF AUDENV_UP EQU %00001000 +DEF AUDENV_DOWN EQU %00000000 + + +; -- +; -- Audio trigger flags +; -- +; -- Can be used with AUD1HIGH, AUD2HIGH, AUD3HIGH +; -- See AUD1HIGH for more info +; -- + +DEF AUDHIGH_RESTART EQU %10000000 +DEF AUDHIGH_LENGTH_ON EQU %01000000 +DEF AUDHIGH_LENGTH_OFF EQU %00000000 + + +;*************************************************************************** +;* +;* CPU values on bootup (a=type, b=qualifier) +;* +;*************************************************************************** + +DEF BOOTUP_A_DMG EQU $01 ; Dot Matrix Game +DEF BOOTUP_A_CGB EQU $11 ; Color GameBoy +DEF BOOTUP_A_MGB EQU $FF ; Mini GameBoy (Pocket GameBoy) + +; if a=BOOTUP_A_CGB, bit 0 in b can be checked to determine if real CGB or +; other system running in GBC mode +DEF BOOTUP_B_CGB EQU %00000000 +DEF BOOTUP_B_AGB EQU %00000001 ; GBA, GBA SP, Game Boy Player, or New GBA SP + + +;*************************************************************************** +;* +;* Header +;* +;*************************************************************************** + +;* +;* Nintendo scrolling logo +;* (Code won't work on a real GameBoy) +;* (if next lines are altered.) +MACRO NINTENDO_LOGO + DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D + DB $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 + DB $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E +ENDM + +; $0143 Color GameBoy compatibility code +DEF CART_COMPATIBLE_DMG EQU $00 +DEF CART_COMPATIBLE_DMG_GBC EQU $80 +DEF CART_COMPATIBLE_GBC EQU $C0 + +; $0146 GameBoy/Super GameBoy indicator +DEF CART_INDICATOR_GB EQU $00 +DEF CART_INDICATOR_SGB EQU $03 + +; $0147 Cartridge type +DEF CART_ROM EQU $00 +DEF CART_ROM_MBC1 EQU $01 +DEF CART_ROM_MBC1_RAM EQU $02 +DEF CART_ROM_MBC1_RAM_BAT EQU $03 +DEF CART_ROM_MBC2 EQU $05 +DEF CART_ROM_MBC2_BAT EQU $06 +DEF CART_ROM_RAM EQU $08 +DEF CART_ROM_RAM_BAT EQU $09 +DEF CART_ROM_MMM01 EQU $0B +DEF CART_ROM_MMM01_RAM EQU $0C +DEF CART_ROM_MMM01_RAM_BAT EQU $0D +DEF CART_ROM_MBC3_BAT_RTC EQU $0F +DEF CART_ROM_MBC3_RAM_BAT_RTC EQU $10 +DEF CART_ROM_MBC3 EQU $11 +DEF CART_ROM_MBC3_RAM EQU $12 +DEF CART_ROM_MBC3_RAM_BAT EQU $13 +DEF CART_ROM_MBC5 EQU $19 +DEF CART_ROM_MBC5_BAT EQU $1A +DEF CART_ROM_MBC5_RAM_BAT EQU $1B +DEF CART_ROM_MBC5_RUMBLE EQU $1C +DEF CART_ROM_MBC5_RAM_RUMBLE EQU $1D +DEF CART_ROM_MBC5_RAM_BAT_RUMBLE EQU $1E +DEF CART_ROM_MBC7_RAM_BAT_GYRO EQU $22 +DEF CART_ROM_POCKET_CAMERA EQU $FC +DEF CART_ROM_BANDAI_TAMA5 EQU $FD +DEF CART_ROM_HUDSON_HUC3 EQU $FE +DEF CART_ROM_HUDSON_HUC1 EQU $FF + +; $0148 ROM size +; these are kilobytes +DEF CART_ROM_32KB EQU $00 ; 2 banks +DEF CART_ROM_64KB EQU $01 ; 4 banks +DEF CART_ROM_128KB EQU $02 ; 8 banks +DEF CART_ROM_256KB EQU $03 ; 16 banks +DEF CART_ROM_512KB EQU $04 ; 32 banks +DEF CART_ROM_1024KB EQU $05 ; 64 banks +DEF CART_ROM_2048KB EQU $06 ; 128 banks +DEF CART_ROM_4096KB EQU $07 ; 256 banks +DEF CART_ROM_8192KB EQU $08 ; 512 banks +DEF CART_ROM_1152KB EQU $52 ; 72 banks +DEF CART_ROM_1280KB EQU $53 ; 80 banks +DEF CART_ROM_1536KB EQU $54 ; 96 banks + +; $0149 SRAM size +; these are kilobytes +DEF CART_SRAM_NONE EQU 0 +DEF CART_SRAM_8KB EQU 2 ; 1 bank +DEF CART_SRAM_32KB EQU 3 ; 4 banks +DEF CART_SRAM_128KB EQU 4 ; 16 banks + +; $014A Destination code +DEF CART_DEST_JAPANESE EQU $00 +DEF CART_DEST_NON_JAPANESE EQU $01 + + +;*************************************************************************** +;* +;* Keypad related +;* +;*************************************************************************** + +DEF PADF_DOWN EQU $80 +DEF PADF_UP EQU $40 +DEF PADF_LEFT EQU $20 +DEF PADF_RIGHT EQU $10 +DEF PADF_START EQU $08 +DEF PADF_SELECT EQU $04 +DEF PADF_B EQU $02 +DEF PADF_A EQU $01 + +DEF PADB_DOWN EQU $7 +DEF PADB_UP EQU $6 +DEF PADB_LEFT EQU $5 +DEF PADB_RIGHT EQU $4 +DEF PADB_START EQU $3 +DEF PADB_SELECT EQU $2 +DEF PADB_B EQU $1 +DEF PADB_A EQU $0 + + +;*************************************************************************** +;* +;* Screen related +;* +;*************************************************************************** + +DEF SCRN_X EQU 160 ; Width of screen in pixels +DEF SCRN_Y EQU 144 ; Height of screen in pixels +DEF SCRN_X_B EQU 20 ; Width of screen in bytes +DEF SCRN_Y_B EQU 18 ; Height of screen in bytes + +DEF SCRN_VX EQU 256 ; Virtual width of screen in pixels +DEF SCRN_VY EQU 256 ; Virtual height of screen in pixels +DEF SCRN_VX_B EQU 32 ; Virtual width of screen in bytes +DEF SCRN_VY_B EQU 32 ; Virtual height of screen in bytes + + +;*************************************************************************** +;* +;* OAM related +;* +;*************************************************************************** + +; OAM attributes +; each entry in OAM RAM is 4 bytes (sizeof_OAM_ATTRS) +RSRESET +DEF OAMA_Y RB 1 ; y pos plus 16 +DEF OAMA_X RB 1 ; x pos plus 8 +DEF OAMA_TILEID RB 1 ; tile id +DEF OAMA_FLAGS RB 1 ; flags (see below) +DEF sizeof_OAM_ATTRS RB 0 + +DEF OAM_Y_OFS EQU 16 ; add this to a screen-relative Y position to get an OAM Y position +DEF OAM_X_OFS EQU 8 ; add this to a screen-relative X position to get an OAM X position + +DEF OAM_COUNT EQU 40 ; number of OAM entries in OAM RAM + +; flags +DEF OAMF_PRI EQU %10000000 ; Priority +DEF OAMF_YFLIP EQU %01000000 ; Y flip +DEF OAMF_XFLIP EQU %00100000 ; X flip +DEF OAMF_PAL0 EQU %00000000 ; Palette number; 0,1 (DMG) +DEF OAMF_PAL1 EQU %00010000 ; Palette number; 0,1 (DMG) +DEF OAMF_BANK0 EQU %00000000 ; Bank number; 0,1 (GBC) +DEF OAMF_BANK1 EQU %00001000 ; Bank number; 0,1 (GBC) + +DEF OAMF_PALMASK EQU %00000111 ; Palette (GBC) + +DEF OAMB_PRI EQU 7 ; Priority +DEF OAMB_YFLIP EQU 6 ; Y flip +DEF OAMB_XFLIP EQU 5 ; X flip +DEF OAMB_PAL1 EQU 4 ; Palette number; 0,1 (DMG) +DEF OAMB_BANK1 EQU 3 ; Bank number; 0,1 (GBC) + + +; Deprecated constants. Please avoid using. + +DEF IEF_LCDC EQU %00000010 ; LCDC (see STAT) +DEF _VRAM8000 EQU _VRAM +DEF _VRAM8800 EQU _VRAM+$800 +DEF _VRAM9000 EQU _VRAM+$1000 +DEF CART_SRAM_2KB EQU 1 ; 1 incomplete bank + + + ENDC ;HARDWARE_INC diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm deleted file mode 100644 index 769676b2dc6..00000000000 --- a/constants/hardware_constants.asm +++ /dev/null @@ -1,166 +0,0 @@ -; Graciously derived from: -; https://gbdev.io/pandocs/ -; https://github.com/gbdev/hardware.inc -; http://gameboy.mongenel.com/dmg/asmmemmap.html - -; memory map -DEF VRAM_Begin EQU $8000 -DEF VRAM_End EQU $a000 -DEF SRAM_Begin EQU $a000 -DEF SRAM_End EQU $c000 -DEF WRAM0_Begin EQU $c000 -DEF WRAM0_End EQU $d000 -DEF WRAM1_Begin EQU $d000 -DEF WRAM1_End EQU $e000 -; hardware registers $ff00-$ff80 (see below) -DEF HRAM_Begin EQU $ff80 -DEF HRAM_End EQU $ffff - -; MBC3 -DEF MBC3SRamEnable EQU $0000 -DEF MBC3RomBank EQU $2000 -DEF MBC3SRamBank EQU $4000 -DEF MBC3LatchClock EQU $6000 -DEF MBC3RTC EQU $a000 - -DEF SRAM_DISABLE EQU $00 -DEF SRAM_ENABLE EQU $0a - -DEF NUM_SRAM_BANKS EQU 4 - -DEF RTC_S EQU $08 ; Seconds 0-59 (0-3Bh) -DEF RTC_M EQU $09 ; Minutes 0-59 (0-3Bh) -DEF RTC_H EQU $0a ; Hours 0-23 (0-17h) -DEF RTC_DL EQU $0b ; Lower 8 bits of Day Counter (0-FFh) -DEF RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag - ; Bit 0 Most significant bit of Day Counter (Bit 8) - ; Bit 6 Halt (0=Active, 1=Stop Timer) - ; Bit 7 Day Counter Carry Bit (1=Counter Overflow) - -; interrupt flags -DEF VBLANK EQU 0 -DEF LCD_STAT EQU 1 -DEF TIMER EQU 2 -DEF SERIAL EQU 3 -DEF JOYPAD EQU 4 -DEF IE_DEFAULT EQU (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) - -; OAM attribute flags -DEF OAM_TILE_BANK EQU 3 -DEF OAM_OBP_NUM EQU 4 ; non CGB Mode Only -DEF OAM_X_FLIP EQU 5 -DEF OAM_Y_FLIP EQU 6 -DEF OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) - -; BG Map attribute flags -DEF PALETTE_MASK EQU %111 -DEF VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08 -DEF OBP_NUM EQU 1 << OAM_OBP_NUM ; $10 -DEF X_FLIP EQU 1 << OAM_X_FLIP ; $20 -DEF Y_FLIP EQU 1 << OAM_Y_FLIP ; $40 -DEF PRIORITY EQU 1 << OAM_PRIORITY ; $80 - -; Hardware registers -DEF rJOYP EQU $ff00 ; Joypad (R/W) -DEF rSB EQU $ff01 ; Serial transfer data (R/W) -DEF rSC EQU $ff02 ; Serial Transfer Control (R/W) -DEF rSC_ON EQU 7 -DEF rSC_CGB EQU 1 -DEF rSC_CLOCK EQU 0 -DEF rDIV EQU $ff04 ; Divider Register (R/W) -DEF rTIMA EQU $ff05 ; Timer counter (R/W) -DEF rTMA EQU $ff06 ; Timer Modulo (R/W) -DEF rTAC EQU $ff07 ; Timer Control (R/W) -DEF rTAC_ON EQU 2 -DEF rTAC_4096_HZ EQU %00 -DEF rTAC_262144_HZ EQU %01 -DEF rTAC_65536_HZ EQU %10 -DEF rTAC_16384_HZ EQU %11 -DEF rIF EQU $ff0f ; Interrupt Flag (R/W) -DEF rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W) -DEF rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W) -DEF rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W) -DEF rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only) -DEF rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W) -DEF rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W) -DEF rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W) -DEF rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W) -DEF rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W) -DEF rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W) -DEF rNR31 EQU $ff1b ; Channel 3 Sound Length -DEF rNR32 EQU $ff1c ; Channel 3 Select output level (R/W) -DEF rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W) -DEF rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) -DEF rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) -DEF rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) -DEF rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) -DEF rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W) -DEF rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) -DEF rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) -DEF rNR52 EQU $ff26 ; Sound on/off -DEF rWave_0 EQU $ff30 -DEF rWave_1 EQU $ff31 -DEF rWave_2 EQU $ff32 -DEF rWave_3 EQU $ff33 -DEF rWave_4 EQU $ff34 -DEF rWave_5 EQU $ff35 -DEF rWave_6 EQU $ff36 -DEF rWave_7 EQU $ff37 -DEF rWave_8 EQU $ff38 -DEF rWave_9 EQU $ff39 -DEF rWave_a EQU $ff3a -DEF rWave_b EQU $ff3b -DEF rWave_c EQU $ff3c -DEF rWave_d EQU $ff3d -DEF rWave_e EQU $ff3e -DEF rWave_f EQU $ff3f -DEF rLCDC EQU $ff40 ; LCD Control (R/W) -DEF rLCDC_BG_PRIORITY EQU 0 ; 0=Off, 1=On -DEF rLCDC_SPRITES_ENABLE EQU 1 ; 0=Off, 1=On -DEF rLCDC_SPRITE_SIZE EQU 2 ; 0=8x8, 1=8x16 -DEF rLCDC_BG_TILEMAP EQU 3 ; 0=9800-9BFF, 1=9C00-9FFF -DEF rLCDC_TILE_DATA EQU 4 ; 0=8800-97FF, 1=8000-8FFF -DEF rLCDC_WINDOW_ENABLE EQU 5 ; 0=Off, 1=On -DEF rLCDC_WINDOW_TILEMAP EQU 6 ; 0=9800-9BFF, 1=9C00-9FFF -DEF rLCDC_ENABLE EQU 7 ; 0=Off, 1=On -DEF LCDC_DEFAULT EQU (1 << rLCDC_ENABLE) | (1 << rLCDC_WINDOW_TILEMAP) | (1 << rLCDC_WINDOW_ENABLE) | (1 << rLCDC_SPRITES_ENABLE) | (1 << rLCDC_BG_PRIORITY) -DEF rSTAT EQU $ff41 ; LCDC Status (R/W) -DEF rSCY EQU $ff42 ; Scroll Y (R/W) -DEF rSCX EQU $ff43 ; Scroll X (R/W) -DEF rLY EQU $ff44 ; LCDC Y-Coordinate (R) -DEF LY_VBLANK EQU 144 -DEF rLYC EQU $ff45 ; LY Compare (R/W) -DEF rDMA EQU $ff46 ; DMA Transfer and Start Address (W) -DEF rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only -DEF rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only -DEF rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only -DEF rWY EQU $ff4a ; Window Y Position (R/W) -DEF rWX EQU $ff4b ; Window X Position minus 7 (R/W) -DEF rLCDMODE EQU $ff4c -DEF rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch -DEF rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank -DEF rBLCK EQU $ff50 -DEF rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High -DEF rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low -DEF rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High -DEF rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low -DEF rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start -DEF rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port -DEF rRP_LED_ON EQU 0 -DEF rRP_RECEIVING EQU 1 -DEF rRP_ENABLE_READ_MASK EQU %11000000 -DEF rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index -DEF rBGPI_AUTO_INCREMENT EQU 7 ; increment rBGPI after write to rBGPD -DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data -DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index -DEF rOBPI_AUTO_INCREMENT EQU 7 ; increment rOBPI after write to rOBPD -DEF rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data -DEF rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only -DEF rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank -DEF rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write) -DEF rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write) -DEF rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only -DEF rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) -DEF rPCM12 EQU $ff76 ; Channel 1 & 2 Amplitude (R) -DEF rPCM34 EQU $ff77 ; Channel 3 & 4 Amplitude (R) -DEF rIE EQU $ffff ; Interrupt Enable (R/W) diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm index 555ec30f165..5402bba70b5 100644 --- a/data/battle_anims/framesets.asm +++ b/data/battle_anims/framesets.asm @@ -241,29 +241,29 @@ BattleAnimFrameData: delanim .Frameset_3f: - frame BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP - frame BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP - frame BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_4B, 2, OAMB_XFLIP + frame BATTLEANIMOAMSET_4C, 2, OAMB_XFLIP + frame BATTLEANIMOAMSET_4D, 4, OAMB_XFLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP delanim .Frameset_40: - frame BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_4B, 2, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4C, 2, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4D, 4, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_4E, 2, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_41: @@ -283,19 +283,19 @@ BattleAnimFrameData: delanim .Frameset_42: - frame BATTLEANIMOAMSET_4B, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_4C, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_4D, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_4F, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_50, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_51, 1, OAM_X_FLIP - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_4B, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_4C, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_4D, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_4F, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_50, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_51, 1, OAMB_XFLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP delanim .Frameset_08: @@ -309,7 +309,7 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_0A, 7 frame BATTLEANIMOAMSET_0B, 7 frame BATTLEANIMOAMSET_0A, 7 - frame BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + frame BATTLEANIMOAMSET_0B, 7, OAMB_XFLIP dorestart .Frameset_0a: @@ -328,7 +328,7 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_0A, 7 frame BATTLEANIMOAMSET_0B, 7 frame BATTLEANIMOAMSET_0A, 7 - frame BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + frame BATTLEANIMOAMSET_0B, 7, OAMB_XFLIP frame BATTLEANIMOAMSET_0A, 7 endanim @@ -400,9 +400,9 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_16, 8 frame BATTLEANIMOAMSET_17, 4 frame BATTLEANIMOAMSET_17, 4 - frame BATTLEANIMOAMSET_16, 8, OAM_X_FLIP - frame BATTLEANIMOAMSET_15, 8, OAM_X_FLIP - frame BATTLEANIMOAMSET_16, 8, OAM_X_FLIP + frame BATTLEANIMOAMSET_16, 8, OAMB_XFLIP + frame BATTLEANIMOAMSET_15, 8, OAMB_XFLIP + frame BATTLEANIMOAMSET_16, 8, OAMB_XFLIP frame BATTLEANIMOAMSET_17, 4 dorestart @@ -567,10 +567,10 @@ BattleAnimFrameData: delanim .Frameset_33: - frame BATTLEANIMOAMSET_3A, 2, OAM_X_FLIP - frame BATTLEANIMOAMSET_3B, 2, OAM_X_FLIP - frame BATTLEANIMOAMSET_3C, 2, OAM_X_FLIP - frame BATTLEANIMOAMSET_3D, 32, OAM_X_FLIP + frame BATTLEANIMOAMSET_3A, 2, OAMB_XFLIP + frame BATTLEANIMOAMSET_3B, 2, OAMB_XFLIP + frame BATTLEANIMOAMSET_3C, 2, OAMB_XFLIP + frame BATTLEANIMOAMSET_3D, 32, OAMB_XFLIP delanim .Frameset_34: @@ -617,7 +617,7 @@ BattleAnimFrameData: endanim .Frameset_3b: - frame BATTLEANIMOAMSET_48, 8, OAM_X_FLIP + frame BATTLEANIMOAMSET_48, 8, OAMB_XFLIP endanim .Frameset_3c: @@ -663,9 +663,9 @@ BattleAnimFrameData: dowait 0 frame BATTLEANIMOAMSET_14, 0 frame BATTLEANIMOAMSET_15, 0 - frame BATTLEANIMOAMSET_14, 0, OAM_X_FLIP + frame BATTLEANIMOAMSET_14, 0, OAMB_XFLIP dowait 0 - frame BATTLEANIMOAMSET_16, 0, OAM_X_FLIP + frame BATTLEANIMOAMSET_16, 0, OAMB_XFLIP frame BATTLEANIMOAMSET_15, 0 frame BATTLEANIMOAMSET_16, 0 dorestart @@ -676,31 +676,31 @@ BattleAnimFrameData: delanim .Frameset_47: - frame BATTLEANIMOAMSET_56, 2, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_57, 4, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_56, 2, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_57, 4, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_48: frame BATTLEANIMOAMSET_56, 1 frame BATTLEANIMOAMSET_57, 1 frame BATTLEANIMOAMSET_58, 1 - frame BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_57, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_58, 1, OAMB_XFLIP, OAMB_YFLIP frame BATTLEANIMOAMSET_57, 2 delanim .Frameset_49: - frame BATTLEANIMOAMSET_56, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_56, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_57, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_58, 1, OAMB_XFLIP, OAMB_YFLIP frame BATTLEANIMOAMSET_57, 1 frame BATTLEANIMOAMSET_58, 1 - frame BATTLEANIMOAMSET_57, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_57, 2, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_4a: - frame BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_57, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_58, 1, OAMB_XFLIP, OAMB_YFLIP frame BATTLEANIMOAMSET_57, 1 frame BATTLEANIMOAMSET_58, 1 dorestart @@ -714,18 +714,18 @@ BattleAnimFrameData: .Frameset_4d: frame BATTLEANIMOAMSET_0A, 10 - frame BATTLEANIMOAMSET_0B, 3, OAM_X_FLIP - frame BATTLEANIMOAMSET_5D, 3, OAM_X_FLIP - frame BATTLEANIMOAMSET_0B, 3, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_0A, 2, OAM_Y_FLIP - frame BATTLEANIMOAMSET_0B, 1, OAM_Y_FLIP + frame BATTLEANIMOAMSET_0B, 3, OAMB_XFLIP + frame BATTLEANIMOAMSET_5D, 3, OAMB_XFLIP + frame BATTLEANIMOAMSET_0B, 3, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_0A, 2, OAMB_YFLIP + frame BATTLEANIMOAMSET_0B, 1, OAMB_YFLIP frame BATTLEANIMOAMSET_5D, 1 frame BATTLEANIMOAMSET_0B, 1 dorestart .Frameset_4e: frame BATTLEANIMOAMSET_0A, 3 - frame BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + frame BATTLEANIMOAMSET_0B, 7, OAMB_XFLIP frame BATTLEANIMOAMSET_0A, 7 frame BATTLEANIMOAMSET_0B, 7 frame BATTLEANIMOAMSET_0A, 3 @@ -776,7 +776,7 @@ BattleAnimFrameData: endanim .Frameset_5b: - frame BATTLEANIMOAMSET_6E, 8, OAM_Y_FLIP + frame BATTLEANIMOAMSET_6E, 8, OAMB_YFLIP endanim .Frameset_5c: @@ -824,12 +824,12 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_7B, 1 frame BATTLEANIMOAMSET_7C, 1 frame BATTLEANIMOAMSET_7D, 1 - frame BATTLEANIMOAMSET_7C, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_7B, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_7A, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_79, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_78, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_77, 1, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_7C, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_7B, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_7A, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_79, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_78, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_77, 1, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_61: @@ -838,8 +838,8 @@ BattleAnimFrameData: dorestart .Frameset_62: - frame BATTLEANIMOAMSET_1B, 4, OAM_X_FLIP - frame BATTLEANIMOAMSET_7E, 4, OAM_X_FLIP + frame BATTLEANIMOAMSET_1B, 4, OAMB_XFLIP + frame BATTLEANIMOAMSET_7E, 4, OAMB_XFLIP dorestart .Frameset_63: @@ -908,7 +908,7 @@ BattleAnimFrameData: endanim .Frameset_6e: - frame BATTLEANIMOAMSET_8E, 8, OAM_X_FLIP + frame BATTLEANIMOAMSET_8E, 8, OAMB_XFLIP endanim .Frameset_6f: @@ -948,7 +948,7 @@ BattleAnimFrameData: .Frameset_77: frame BATTLEANIMOAMSET_97, 1 - frame BATTLEANIMOAMSET_97, 1, OAM_X_FLIP + frame BATTLEANIMOAMSET_97, 1, OAMB_XFLIP dorestart .Frameset_78: @@ -1009,8 +1009,8 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_A5, 4 frame BATTLEANIMOAMSET_A6, 4 frame BATTLEANIMOAMSET_A7, 4 - frame BATTLEANIMOAMSET_A6, 4, OAM_X_FLIP - frame BATTLEANIMOAMSET_A5, 4, OAM_X_FLIP + frame BATTLEANIMOAMSET_A6, 4, OAMB_XFLIP + frame BATTLEANIMOAMSET_A5, 4, OAMB_XFLIP dorestart .Frameset_86: @@ -1018,8 +1018,8 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_A9, 4 frame BATTLEANIMOAMSET_AA, 4 frame BATTLEANIMOAMSET_AB, 4 - frame BATTLEANIMOAMSET_AA, 4, OAM_X_FLIP - frame BATTLEANIMOAMSET_A9, 4, OAM_X_FLIP + frame BATTLEANIMOAMSET_AA, 4, OAMB_XFLIP + frame BATTLEANIMOAMSET_A9, 4, OAMB_XFLIP dorestart .Frameset_87: @@ -1048,7 +1048,7 @@ BattleAnimFrameData: .Frameset_8d: frame BATTLEANIMOAMSET_B1, 7 - frame BATTLEANIMOAMSET_B1, 7, OAM_X_FLIP + frame BATTLEANIMOAMSET_B1, 7, OAMB_XFLIP dorestart .Frameset_8e: @@ -1060,15 +1060,15 @@ BattleAnimFrameData: endanim .Frameset_90: - frame BATTLEANIMOAMSET_B3, 8, OAM_X_FLIP + frame BATTLEANIMOAMSET_B3, 8, OAMB_XFLIP endanim .Frameset_91: - frame BATTLEANIMOAMSET_B3, 8, OAM_Y_FLIP + frame BATTLEANIMOAMSET_B3, 8, OAMB_YFLIP endanim .Frameset_92: - frame BATTLEANIMOAMSET_B3, 8, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_B3, 8, OAMB_XFLIP, OAMB_YFLIP endanim .Frameset_93: @@ -1076,15 +1076,15 @@ BattleAnimFrameData: endanim .Frameset_94: - frame BATTLEANIMOAMSET_B5, 8, OAM_X_FLIP + frame BATTLEANIMOAMSET_B5, 8, OAMB_XFLIP endanim .Frameset_95: - frame BATTLEANIMOAMSET_B5, 8, OAM_Y_FLIP + frame BATTLEANIMOAMSET_B5, 8, OAMB_YFLIP endanim .Frameset_96: - frame BATTLEANIMOAMSET_B5, 8, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_B5, 8, OAMB_XFLIP, OAMB_YFLIP endanim .Frameset_97: @@ -1112,7 +1112,7 @@ BattleAnimFrameData: endanim .Frameset_9d: - frame BATTLEANIMOAMSET_B8, 32, OAM_X_FLIP + frame BATTLEANIMOAMSET_B8, 32, OAMB_XFLIP endanim .Frameset_9e: @@ -1124,7 +1124,7 @@ BattleAnimFrameData: endanim .Frameset_a0: - frame BATTLEANIMOAMSET_BB, 32, OAM_X_FLIP + frame BATTLEANIMOAMSET_BB, 32, OAMB_XFLIP endanim .Frameset_a1: @@ -1171,26 +1171,26 @@ BattleAnimFrameData: delanim .Frameset_a7: - frame BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_4F, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_50, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_51, 1, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_4B, 2, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4C, 2, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4D, 32, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4D, 32, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4D, 32, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_4F, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_50, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_51, 1, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP, OAMB_YFLIP dowait 2 - frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_52, 2, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_a8: frame BATTLEANIMOAMSET_C3, 1 - frame BATTLEANIMOAMSET_C3, 1, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_C3, 1, OAMB_XFLIP, OAMB_YFLIP dorestart .Frameset_a9: @@ -1205,7 +1205,7 @@ BattleAnimFrameData: .Frameset_ab: frame BATTLEANIMOAMSET_C8, 1 - frame BATTLEANIMOAMSET_C8, 1, OAM_X_FLIP + frame BATTLEANIMOAMSET_C8, 1, OAMB_XFLIP dorestart .Frameset_ac: @@ -1221,7 +1221,7 @@ BattleAnimFrameData: dorestart .Frameset_ae: - frame BATTLEANIMOAMSET_03, 32, OAM_Y_FLIP + frame BATTLEANIMOAMSET_03, 32, OAMB_YFLIP endanim .Frameset_b0: @@ -1238,8 +1238,8 @@ BattleAnimFrameData: .Frameset_b2: frame BATTLEANIMOAMSET_CD, 4 frame BATTLEANIMOAMSET_CE, 4 - frame BATTLEANIMOAMSET_CD, 4, OAM_X_FLIP, OAM_Y_FLIP - frame BATTLEANIMOAMSET_CE, 4, OAM_X_FLIP, OAM_Y_FLIP + frame BATTLEANIMOAMSET_CD, 4, OAMB_XFLIP, OAMB_YFLIP + frame BATTLEANIMOAMSET_CE, 4, OAMB_XFLIP, OAMB_YFLIP dorestart .Frameset_b3: diff --git a/data/battle_anims/oam.asm b/data/battle_anims/oam.asm index da80a966e77..db94e4ce319 100644 --- a/data/battle_anims/oam.asm +++ b/data/battle_anims/oam.asm @@ -241,9 +241,9 @@ BattleAnimOAMData: .OAMData_02: dbsprite -1, -1, 0, 0, $00, $0 - dbsprite 0, -1, 0, 0, $00, X_FLIP - dbsprite -1, 0, 0, 0, $00, Y_FLIP - dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $00, OAMF_XFLIP + dbsprite -1, 0, 0, 0, $00, OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_c3: dbsprite -2, -2, 4, 4, $00, $0 @@ -259,13 +259,13 @@ BattleAnimOAMData: .OAMData_01: dbsprite -2, -2, 4, 4, $00, $0 dbsprite -1, -2, 4, 4, $01, $0 - dbsprite 0, -2, 4, 4, $00, X_FLIP + dbsprite 0, -2, 4, 4, $00, OAMF_XFLIP dbsprite -2, -1, 4, 4, $02, $0 dbsprite -1, -1, 4, 4, $03, $0 - dbsprite 0, -1, 4, 4, $02, X_FLIP | Y_FLIP - dbsprite -2, 0, 4, 4, $00, Y_FLIP - dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP - dbsprite 0, 0, 4, 4, $00, X_FLIP | Y_FLIP + dbsprite 0, -1, 4, 4, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite -2, 0, 4, 4, $00, OAMF_YFLIP + dbsprite -1, 0, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 0, 4, 4, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_cf: dbsprite -2, -2, 4, 0, $00, $0 @@ -274,12 +274,12 @@ BattleAnimOAMData: dbsprite -2, -1, 4, 0, $03, $0 dbsprite -1, -1, 4, 0, $04, $0 dbsprite 0, -1, 4, 0, $05, $0 - dbsprite -2, 0, 4, 0, $05, X_FLIP | Y_FLIP - dbsprite -1, 0, 4, 0, $04, X_FLIP | Y_FLIP - dbsprite 0, 0, 4, 0, $03, X_FLIP | Y_FLIP - dbsprite -2, 1, 4, 0, $02, X_FLIP | Y_FLIP - dbsprite -1, 1, 4, 0, $01, X_FLIP | Y_FLIP - dbsprite 0, 1, 4, 0, $00, X_FLIP | Y_FLIP + dbsprite -2, 0, 4, 0, $05, OAMF_XFLIP | OAMF_YFLIP + dbsprite -1, 0, 4, 0, $04, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 0, 4, 0, $03, OAMF_XFLIP | OAMF_YFLIP + dbsprite -2, 1, 4, 0, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite -1, 1, 4, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 4, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_1c: dbsprite -2, -2, 0, 0, $00, $0 @@ -304,56 +304,56 @@ BattleAnimOAMData: dbsprite -1, -2, 0, 0, $01, $0 dbsprite -2, -1, 0, 0, $02, $0 dbsprite -1, -1, 0, 0, $03, $0 - dbsprite 0, -2, 0, 0, $01, X_FLIP - dbsprite 1, -2, 0, 0, $00, X_FLIP - dbsprite 0, -1, 0, 0, $03, X_FLIP - dbsprite 1, -1, 0, 0, $02, X_FLIP - dbsprite -2, 0, 0, 0, $02, Y_FLIP - dbsprite -1, 0, 0, 0, $03, Y_FLIP - dbsprite -2, 1, 0, 0, $00, Y_FLIP - dbsprite -1, 1, 0, 0, $01, Y_FLIP - dbsprite 0, 0, 0, 0, $03, X_FLIP | Y_FLIP - dbsprite 1, 0, 0, 0, $02, X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $01, X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 0, -2, 0, 0, $01, OAMF_XFLIP + dbsprite 1, -2, 0, 0, $00, OAMF_XFLIP + dbsprite 0, -1, 0, 0, $03, OAMF_XFLIP + dbsprite 1, -1, 0, 0, $02, OAMF_XFLIP + dbsprite -2, 0, 0, 0, $02, OAMF_YFLIP + dbsprite -1, 0, 0, 0, $03, OAMF_YFLIP + dbsprite -2, 1, 0, 0, $00, OAMF_YFLIP + dbsprite -1, 1, 0, 0, $01, OAMF_YFLIP + dbsprite 0, 0, 0, 0, $03, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_09: dbsprite -3, -3, 4, 4, $00, $0 dbsprite -2, -3, 4, 4, $01, $0 dbsprite -3, -2, 4, 4, $02, $0 dbsprite -2, -2, 4, 4, $03, $0 - dbsprite 0, -3, 4, 4, $01, X_FLIP - dbsprite 1, -3, 4, 4, $00, X_FLIP - dbsprite 0, -2, 4, 4, $03, X_FLIP - dbsprite 1, -2, 4, 4, $02, X_FLIP - dbsprite -3, 0, 4, 4, $02, Y_FLIP - dbsprite -2, 0, 4, 4, $03, Y_FLIP - dbsprite -3, 1, 4, 4, $00, Y_FLIP - dbsprite -2, 1, 4, 4, $01, Y_FLIP - dbsprite 0, 0, 4, 4, $03, X_FLIP | Y_FLIP - dbsprite 1, 0, 4, 4, $02, X_FLIP | Y_FLIP - dbsprite 0, 1, 4, 4, $01, X_FLIP | Y_FLIP - dbsprite 1, 1, 4, 4, $00, X_FLIP | Y_FLIP + dbsprite 0, -3, 4, 4, $01, OAMF_XFLIP + dbsprite 1, -3, 4, 4, $00, OAMF_XFLIP + dbsprite 0, -2, 4, 4, $03, OAMF_XFLIP + dbsprite 1, -2, 4, 4, $02, OAMF_XFLIP + dbsprite -3, 0, 4, 4, $02, OAMF_YFLIP + dbsprite -2, 0, 4, 4, $03, OAMF_YFLIP + dbsprite -3, 1, 4, 4, $00, OAMF_YFLIP + dbsprite -2, 1, 4, 4, $01, OAMF_YFLIP + dbsprite 0, 0, 4, 4, $03, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 4, 4, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 4, 4, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_0c: dbsprite -1, -1, 0, 4, $00, $0 - dbsprite 0, -1, 0, 4, $00, X_FLIP + dbsprite 0, -1, 0, 4, $00, OAMF_XFLIP .OAMData_6a: dbsprite -1, 0, 0, 0, $00, $0 - dbsprite 0, 0, 0, 0, $00, X_FLIP + dbsprite 0, 0, 0, 0, $00, OAMF_XFLIP .OAMData_04: dbsprite -1, -1, 0, 0, $00, $0 - dbsprite 0, -1, 0, 0, $00, X_FLIP + dbsprite 0, -1, 0, 0, $00, OAMF_XFLIP dbsprite -1, 0, 0, 0, $01, $0 - dbsprite 0, 0, 0, 0, $01, X_FLIP + dbsprite 0, 0, 0, 0, $01, OAMF_XFLIP .OAMData_5d: dbsprite -1, -1, 0, 0, $00, $0 dbsprite 0, -1, 0, 0, $01, $0 - dbsprite -1, 0, 0, 0, $00, Y_FLIP - dbsprite 0, 0, 0, 0, $01, Y_FLIP + dbsprite -1, 0, 0, 0, $00, OAMF_YFLIP + dbsprite 0, 0, 0, 0, $01, OAMF_YFLIP .OAMData_13: dbsprite -1, -1, 0, 2, $02, $0 @@ -387,33 +387,33 @@ BattleAnimOAMData: .OAMData_2a: dbsprite -1, -3, 0, 4, $00, $0 - dbsprite 0, -3, 0, 4, $00, X_FLIP + dbsprite 0, -3, 0, 4, $00, OAMF_XFLIP dbsprite -1, -2, 0, 4, $01, $0 - dbsprite 0, -2, 0, 4, $01, X_FLIP + dbsprite 0, -2, 0, 4, $01, OAMF_XFLIP dbsprite -1, -1, 4, 4, $02, $0 .OAMData_2b: dbsprite -1, -4, 0, 4, $00, $0 - dbsprite 0, -4, 0, 4, $00, X_FLIP + dbsprite 0, -4, 0, 4, $00, OAMF_XFLIP dbsprite -1, -3, 0, 4, $01, $0 - dbsprite 0, -3, 0, 4, $01, X_FLIP + dbsprite 0, -3, 0, 4, $01, OAMF_XFLIP dbsprite -1, -2, 4, 4, $02, $0 dbsprite -1, -1, 4, 4, $02, $0 .OAMData_2c: dbsprite -1, -5, 0, 4, $00, $0 - dbsprite 0, -5, 0, 4, $00, X_FLIP + dbsprite 0, -5, 0, 4, $00, OAMF_XFLIP dbsprite -1, -4, 0, 4, $01, $0 - dbsprite 0, -4, 0, 4, $01, X_FLIP + dbsprite 0, -4, 0, 4, $01, OAMF_XFLIP dbsprite -1, -3, 4, 4, $02, $0 dbsprite -1, -2, 4, 4, $02, $0 dbsprite -1, -1, 4, 4, $02, $0 .OAMData_2d: dbsprite -1, -6, 0, 4, $00, $0 - dbsprite 0, -6, 0, 4, $00, X_FLIP + dbsprite 0, -6, 0, 4, $00, OAMF_XFLIP dbsprite -1, -5, 0, 4, $01, $0 - dbsprite 0, -5, 0, 4, $01, X_FLIP + dbsprite 0, -5, 0, 4, $01, OAMF_XFLIP dbsprite -1, -4, 4, 4, $02, $0 dbsprite -1, -3, 4, 4, $02, $0 dbsprite -1, -2, 4, 4, $02, $0 @@ -421,9 +421,9 @@ BattleAnimOAMData: .OAMData_2e: dbsprite -1, -7, 0, 4, $00, $0 - dbsprite 0, -7, 0, 4, $00, X_FLIP + dbsprite 0, -7, 0, 4, $00, OAMF_XFLIP dbsprite -1, -6, 0, 4, $01, $0 - dbsprite 0, -6, 0, 4, $01, X_FLIP + dbsprite 0, -6, 0, 4, $01, OAMF_XFLIP dbsprite -1, -5, 4, 4, $02, $0 dbsprite -1, -4, 4, 4, $02, $0 dbsprite -1, -3, 4, 4, $02, $0 @@ -432,15 +432,15 @@ BattleAnimOAMData: .OAMData_2f: dbsprite -1, -1, 0, 0, $00, $0 - dbsprite 0, -1, 0, 0, $00, X_FLIP + dbsprite 0, -1, 0, 0, $00, OAMF_XFLIP dbsprite -1, 0, 0, 0, $01, $0 - dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 0, 0, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_30: dbsprite -1, -1, 0, 0, $00, $0 dbsprite 0, -1, 0, 0, $01, $0 - dbsprite -1, 0, 0, 0, $01, X_FLIP | Y_FLIP - dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_31: dbsprite -1, -2, 0, 4, $00, $0 @@ -526,28 +526,28 @@ BattleAnimOAMData: dbsprite 1, -1, 0, 4, $0b, $0 .OAMData_3e: - dbsprite -2, 1, 0, 4, $00, Y_FLIP - dbsprite -1, 1, 0, 4, $02, Y_FLIP - dbsprite 0, 1, 0, 4, $02, X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 4, $00, X_FLIP | Y_FLIP - dbsprite -3, -1, 0, 4, $09, X_FLIP - dbsprite -2, -1, 0, 4, $08, X_FLIP + dbsprite -2, 1, 0, 4, $00, OAMF_YFLIP + dbsprite -1, 1, 0, 4, $02, OAMF_YFLIP + dbsprite 0, 1, 0, 4, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 4, $00, OAMF_XFLIP | OAMF_YFLIP + dbsprite -3, -1, 0, 4, $09, OAMF_XFLIP + dbsprite -2, -1, 0, 4, $08, OAMF_XFLIP dbsprite -1, -1, 0, 4, $06, $0 dbsprite 0, -1, 0, 4, $07, $0 dbsprite 1, -1, 0, 4, $08, $0 dbsprite 2, -1, 0, 4, $09, $0 - dbsprite -3, 0, 0, 4, $01, X_FLIP - dbsprite -2, 0, 0, 4, $00, X_FLIP + dbsprite -3, 0, 0, 4, $01, OAMF_XFLIP + dbsprite -2, 0, 0, 4, $00, OAMF_XFLIP dbsprite -1, 0, 0, 4, $0c, $0 dbsprite 0, 0, 0, 4, $0d, $0 dbsprite 1, 0, 0, 4, $00, $0 dbsprite 2, 0, 0, 4, $01, $0 dbsprite -2, -3, 0, 4, $00, $0 dbsprite -1, -3, 0, 4, $02, $0 - dbsprite 0, -3, 0, 4, $02, X_FLIP - dbsprite 1, -3, 0, 4, $00, X_FLIP - dbsprite -3, -2, 0, 4, $03, X_FLIP - dbsprite -2, -2, 0, 4, $02, X_FLIP + dbsprite 0, -3, 0, 4, $02, OAMF_XFLIP + dbsprite 1, -3, 0, 4, $00, OAMF_XFLIP + dbsprite -3, -2, 0, 4, $03, OAMF_XFLIP + dbsprite -2, -2, 0, 4, $02, OAMF_XFLIP dbsprite -1, -2, 0, 4, $04, $0 dbsprite 0, -2, 0, 4, $05, $0 dbsprite 1, -2, 0, 4, $02, $0 @@ -556,62 +556,62 @@ BattleAnimOAMData: .OAMData_41: dbsprite -2, -3, 0, 4, $00, $0 dbsprite -1, -3, 0, 4, $02, $0 - dbsprite 0, -3, 0, 4, $02, X_FLIP - dbsprite 1, -3, 0, 4, $00, X_FLIP + dbsprite 0, -3, 0, 4, $02, OAMF_XFLIP + dbsprite 1, -3, 0, 4, $00, OAMF_XFLIP dbsprite -3, -2, 4, 4, $00, $0 dbsprite -2, -2, 4, 4, $01, $0 - dbsprite -1, -2, 0, 4, $05, X_FLIP - dbsprite 0, -2, 0, 4, $04, X_FLIP - dbsprite 0, -2, 4, 4, $01, X_FLIP - dbsprite 1, -2, 4, 4, $00, X_FLIP + dbsprite -1, -2, 0, 4, $05, OAMF_XFLIP + dbsprite 0, -2, 0, 4, $04, OAMF_XFLIP + dbsprite 0, -2, 4, 4, $01, OAMF_XFLIP + dbsprite 1, -2, 4, 4, $00, OAMF_XFLIP dbsprite -3, -1, 4, 4, $02, $0 dbsprite -2, -1, 4, 4, $03, $0 - dbsprite -1, -1, 0, 4, $07, X_FLIP - dbsprite 0, -1, 0, 4, $06, X_FLIP - dbsprite 0, -1, 4, 4, $03, X_FLIP - dbsprite 1, -1, 4, 4, $02, X_FLIP + dbsprite -1, -1, 0, 4, $07, OAMF_XFLIP + dbsprite 0, -1, 0, 4, $06, OAMF_XFLIP + dbsprite 0, -1, 4, 4, $03, OAMF_XFLIP + dbsprite 1, -1, 4, 4, $02, OAMF_XFLIP dbsprite -3, 0, 4, 4, $04, $0 dbsprite -2, 0, 4, 4, $05, $0 - dbsprite -1, 0, 0, 4, $0d, X_FLIP - dbsprite 0, 0, 0, 4, $0c, X_FLIP - dbsprite 0, 0, 4, 4, $05, X_FLIP - dbsprite 1, 0, 4, 4, $04, X_FLIP - dbsprite -2, 1, 0, 4, $00, Y_FLIP - dbsprite -1, 1, 0, 4, $02, Y_FLIP - dbsprite 0, 1, 0, 4, $02, X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 4, $00, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 4, $0d, OAMF_XFLIP + dbsprite 0, 0, 0, 4, $0c, OAMF_XFLIP + dbsprite 0, 0, 4, 4, $05, OAMF_XFLIP + dbsprite 1, 0, 4, 4, $04, OAMF_XFLIP + dbsprite -2, 1, 0, 4, $00, OAMF_YFLIP + dbsprite -1, 1, 0, 4, $02, OAMF_YFLIP + dbsprite 0, 1, 0, 4, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 4, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_42: dbsprite -1, -3, 4, 0, $02, $0 - dbsprite -1, 2, 4, 0, $02, X_FLIP | Y_FLIP + dbsprite -1, 2, 4, 0, $02, OAMF_XFLIP | OAMF_YFLIP dbsprite -3, -1, 0, 4, $01, $0 - dbsprite 2, -1, 0, 4, $01, X_FLIP | Y_FLIP + dbsprite 2, -1, 0, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, -4, 4, 0, $02, $0 - dbsprite -1, 3, 4, 0, $02, X_FLIP | Y_FLIP + dbsprite -1, 3, 4, 0, $02, OAMF_XFLIP | OAMF_YFLIP dbsprite -4, -1, 0, 4, $01, $0 - dbsprite 3, -1, 0, 4, $01, X_FLIP | Y_FLIP + dbsprite 3, -1, 0, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_44: - dbsprite -3, -3, 5, 5, $00, X_FLIP + dbsprite -3, -3, 5, 5, $00, OAMF_XFLIP dbsprite 1, -3, 3, 5, $00, $0 - dbsprite -3, 1, 5, 3, $00, X_FLIP | Y_FLIP - dbsprite 1, 1, 3, 3, $00, Y_FLIP - dbsprite -4, -4, 5, 5, $00, X_FLIP + dbsprite -3, 1, 5, 3, $00, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 3, 3, $00, OAMF_YFLIP + dbsprite -4, -4, 5, 5, $00, OAMF_XFLIP dbsprite 2, -4, 3, 5, $00, $0 - dbsprite -4, 2, 5, 3, $00, X_FLIP | Y_FLIP - dbsprite 2, 2, 3, 3, $00, Y_FLIP + dbsprite -4, 2, 5, 3, $00, OAMF_XFLIP | OAMF_YFLIP + dbsprite 2, 2, 3, 3, $00, OAMF_YFLIP .OAMData_46: dbsprite -1, -3, 4, 4, $02, $0 - dbsprite -1, 1, 4, 4, $02, X_FLIP | Y_FLIP + dbsprite -1, 1, 4, 4, $02, OAMF_XFLIP | OAMF_YFLIP dbsprite -3, -1, 4, 4, $01, $0 - dbsprite 1, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_47: - dbsprite -2, -2, 0, 0, $00, X_FLIP + dbsprite -2, -2, 0, 0, $00, OAMF_XFLIP dbsprite 1, -2, 0, 0, $00, $0 - dbsprite -2, 1, 0, 0, $00, X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $00, Y_FLIP + dbsprite -2, 1, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $00, OAMF_YFLIP .OAMData_48: dbsprite -1, -3, 4, 0, $00, $0 @@ -622,38 +622,38 @@ BattleAnimOAMData: dbsprite -1, 2, 4, 0, $00, $0 .OAMData_49: - dbsprite -2, -1, 0, 4, $00, X_FLIP - dbsprite -1, -1, 0, 2, $00, X_FLIP + dbsprite -2, -1, 0, 4, $00, OAMF_XFLIP + dbsprite -1, -1, 0, 2, $00, OAMF_XFLIP dbsprite 0, -1, 0, 2, $00, $0 dbsprite 1, -1, 0, 4, $00, $0 .OAMData_4a: - dbsprite -1, -1, 0, 4, $00, X_FLIP | Y_FLIP - dbsprite 0, -1, 0, 4, $00, Y_FLIP + dbsprite -1, -1, 0, 4, $00, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, -1, 0, 4, $00, OAMF_YFLIP .OAMData_0f: dbsprite -1, -1, 4, 4, $00, $0 dbsprite -2, -1, 4, 4, $01, $0 - dbsprite -1, -1, 4, 4, $01, X_FLIP - dbsprite -2, 0, 4, 4, $01, Y_FLIP - dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -1, 4, 4, $01, OAMF_XFLIP + dbsprite -2, 0, 4, 4, $01, OAMF_YFLIP + dbsprite -1, 0, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_4c: dbsprite -1, -1, 4, 4, $00, $0 dbsprite -2, 0, 6, 2, $00, $0 dbsprite -3, 0, 6, 2, $01, $0 - dbsprite -2, 0, 6, 2, $01, X_FLIP - dbsprite -3, 1, 6, 2, $01, Y_FLIP - dbsprite -2, 1, 6, 2, $01, X_FLIP | Y_FLIP + dbsprite -2, 0, 6, 2, $01, OAMF_XFLIP + dbsprite -3, 1, 6, 2, $01, OAMF_YFLIP + dbsprite -2, 1, 6, 2, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_4d: dbsprite -1, -1, 4, 4, $00, $0 dbsprite -2, 0, 6, 2, $00, $0 dbsprite -2, 1, 0, 0, $00, $0 dbsprite -3, 1, 0, 0, $01, $0 - dbsprite -2, 1, 0, 0, $01, X_FLIP - dbsprite -3, 2, 0, 0, $01, Y_FLIP - dbsprite -2, 2, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite -2, 1, 0, 0, $01, OAMF_XFLIP + dbsprite -3, 2, 0, 0, $01, OAMF_YFLIP + dbsprite -2, 2, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_4f: dbsprite -1, -1, 4, 4, $00, $0 @@ -661,9 +661,9 @@ BattleAnimOAMData: dbsprite -2, 1, 0, 0, $00, $0 dbsprite -3, 1, 2, 6, $00, $0 dbsprite -4, 1, 2, 6, $01, $0 - dbsprite -3, 1, 2, 6, $01, X_FLIP - dbsprite -4, 2, 2, 6, $01, Y_FLIP - dbsprite -3, 2, 2, 6, $01, X_FLIP | Y_FLIP + dbsprite -3, 1, 2, 6, $01, OAMF_XFLIP + dbsprite -4, 2, 2, 6, $01, OAMF_YFLIP + dbsprite -3, 2, 2, 6, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_50: dbsprite -1, -1, 4, 4, $00, $0 @@ -672,9 +672,9 @@ BattleAnimOAMData: dbsprite -3, 1, 2, 6, $00, $0 dbsprite -4, 2, 4, 4, $00, $0 dbsprite -5, 2, 4, 4, $01, $0 - dbsprite -4, 2, 4, 4, $01, X_FLIP - dbsprite -5, 3, 4, 4, $01, Y_FLIP - dbsprite -4, 3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -4, 2, 4, 4, $01, OAMF_XFLIP + dbsprite -5, 3, 4, 4, $01, OAMF_YFLIP + dbsprite -4, 3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_51: dbsprite -1, -1, 4, 4, $00, $0 @@ -684,21 +684,21 @@ BattleAnimOAMData: dbsprite -4, 2, 4, 4, $00, $0 dbsprite -5, 3, 6, 2, $00, $0 dbsprite -6, 3, 6, 2, $01, $0 - dbsprite -5, 3, 6, 2, $01, X_FLIP - dbsprite -6, 4, 6, 2, $01, Y_FLIP - dbsprite -5, 4, 6, 2, $01, X_FLIP | Y_FLIP + dbsprite -5, 3, 6, 2, $01, OAMF_XFLIP + dbsprite -6, 4, 6, 2, $01, OAMF_YFLIP + dbsprite -5, 4, 6, 2, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_59: dbsprite -2, -1, 0, 4, $00, $0 dbsprite -1, -1, 0, 4, $01, $0 - dbsprite 0, -1, 0, 4, $01, X_FLIP - dbsprite 1, -1, 0, 4, $00, X_FLIP + dbsprite 0, -1, 0, 4, $01, OAMF_XFLIP + dbsprite 1, -1, 0, 4, $00, OAMF_XFLIP .OAMData_5a: dbsprite -2, -1, 0, 4, $02, $0 dbsprite -1, -1, 0, 4, $01, $0 - dbsprite 0, -1, 0, 4, $01, X_FLIP - dbsprite 1, -1, 0, 4, $02, X_FLIP + dbsprite 0, -1, 0, 4, $01, OAMF_XFLIP + dbsprite 1, -1, 0, 4, $02, OAMF_XFLIP .OAMData_60: dbsprite -1, -1, 4, 0, $00, $0 @@ -718,62 +718,62 @@ BattleAnimOAMData: dbsprite 2, -2, 4, 4, $08, $0 .OAMData_65: - dbsprite -4, -2, 4, 4, $08, X_FLIP - dbsprite -3, -2, 4, 4, $07, X_FLIP - dbsprite -4, -1, 4, 4, $06, X_FLIP - dbsprite -3, -1, 4, 4, $05, X_FLIP - dbsprite -2, -1, 4, 4, $04, X_FLIP - dbsprite -1, -1, 4, 4, $03, X_FLIP - dbsprite 0, -1, 4, 4, $02, X_FLIP - dbsprite 1, -1, 4, 4, $01, X_FLIP - dbsprite 2, -1, 4, 4, $00, X_FLIP + dbsprite -4, -2, 4, 4, $08, OAMF_XFLIP + dbsprite -3, -2, 4, 4, $07, OAMF_XFLIP + dbsprite -4, -1, 4, 4, $06, OAMF_XFLIP + dbsprite -3, -1, 4, 4, $05, OAMF_XFLIP + dbsprite -2, -1, 4, 4, $04, OAMF_XFLIP + dbsprite -1, -1, 4, 4, $03, OAMF_XFLIP + dbsprite 0, -1, 4, 4, $02, OAMF_XFLIP + dbsprite 1, -1, 4, 4, $01, OAMF_XFLIP + dbsprite 2, -1, 4, 4, $00, OAMF_XFLIP .OAMData_d4: - dbsprite -4, 0, 4, 0, $00, OBP_NUM - dbsprite -3, 0, 4, 0, $01, OBP_NUM - dbsprite -2, 0, 4, 0, $02, OBP_NUM - dbsprite -1, 0, 4, 0, $03, OBP_NUM - dbsprite 0, 0, 4, 0, $04, OBP_NUM - dbsprite 1, 0, 4, 0, $05, OBP_NUM - dbsprite 2, 0, 4, 0, $06, OBP_NUM + dbsprite -4, 0, 4, 0, $00, OAMF_PAL1 + dbsprite -3, 0, 4, 0, $01, OAMF_PAL1 + dbsprite -2, 0, 4, 0, $02, OAMF_PAL1 + dbsprite -1, 0, 4, 0, $03, OAMF_PAL1 + dbsprite 0, 0, 4, 0, $04, OAMF_PAL1 + dbsprite 1, 0, 4, 0, $05, OAMF_PAL1 + dbsprite 2, 0, 4, 0, $06, OAMF_PAL1 .OAMData_d6: - dbsprite -4, -1, 4, 0, $00, OBP_NUM - dbsprite -4, 0, 4, 0, $01, OBP_NUM - dbsprite -3, -1, 4, 0, $02, OBP_NUM - dbsprite -3, 0, 4, 0, $03, OBP_NUM - dbsprite -2, -1, 4, 0, $04, OBP_NUM - dbsprite -2, 0, 4, 0, $05, OBP_NUM - dbsprite -1, -1, 4, 0, $06, OBP_NUM - dbsprite -1, 0, 4, 0, $07, OBP_NUM - dbsprite 0, -1, 4, 0, $08, OBP_NUM - dbsprite 0, 0, 4, 0, $09, OBP_NUM - dbsprite 1, -1, 4, 0, $0a, OBP_NUM - dbsprite 1, 0, 4, 0, $0b, OBP_NUM - dbsprite 2, -1, 4, 0, $0c, OBP_NUM - dbsprite 2, 0, 4, 0, $0d, OBP_NUM + dbsprite -4, -1, 4, 0, $00, OAMF_PAL1 + dbsprite -4, 0, 4, 0, $01, OAMF_PAL1 + dbsprite -3, -1, 4, 0, $02, OAMF_PAL1 + dbsprite -3, 0, 4, 0, $03, OAMF_PAL1 + dbsprite -2, -1, 4, 0, $04, OAMF_PAL1 + dbsprite -2, 0, 4, 0, $05, OAMF_PAL1 + dbsprite -1, -1, 4, 0, $06, OAMF_PAL1 + dbsprite -1, 0, 4, 0, $07, OAMF_PAL1 + dbsprite 0, -1, 4, 0, $08, OAMF_PAL1 + dbsprite 0, 0, 4, 0, $09, OAMF_PAL1 + dbsprite 1, -1, 4, 0, $0a, OAMF_PAL1 + dbsprite 1, 0, 4, 0, $0b, OAMF_PAL1 + dbsprite 2, -1, 4, 0, $0c, OAMF_PAL1 + dbsprite 2, 0, 4, 0, $0d, OAMF_PAL1 .OAMData_d5: - dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM - dbsprite -2, 0, 0, 0, $01, $1 | OBP_NUM - dbsprite -1, 0, 0, 0, $02, $1 | OBP_NUM - dbsprite 0, 0, 0, 0, $03, $1 | OBP_NUM - dbsprite 1, 0, 0, 0, $04, $1 | OBP_NUM - dbsprite 2, 0, 0, 0, $05, $1 | OBP_NUM + dbsprite -3, 0, 0, 0, $00, $1 | OAMF_PAL1 + dbsprite -2, 0, 0, 0, $01, $1 | OAMF_PAL1 + dbsprite -1, 0, 0, 0, $02, $1 | OAMF_PAL1 + dbsprite 0, 0, 0, 0, $03, $1 | OAMF_PAL1 + dbsprite 1, 0, 0, 0, $04, $1 | OAMF_PAL1 + dbsprite 2, 0, 0, 0, $05, $1 | OAMF_PAL1 .OAMData_d7: - dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM - dbsprite -3, 1, 0, 0, $01, $1 | OBP_NUM - dbsprite -2, 0, 0, 0, $02, $1 | OBP_NUM - dbsprite -2, 1, 0, 0, $03, $1 | OBP_NUM - dbsprite -1, 0, 0, 0, $04, $1 | OBP_NUM - dbsprite -1, 1, 0, 0, $05, $1 | OBP_NUM - dbsprite 0, 0, 0, 0, $06, $1 | OBP_NUM - dbsprite 0, 1, 0, 0, $07, $1 | OBP_NUM - dbsprite 1, 0, 0, 0, $08, $1 | OBP_NUM - dbsprite 1, 1, 0, 0, $09, $1 | OBP_NUM - dbsprite 2, 0, 0, 0, $0a, $1 | OBP_NUM - dbsprite 2, 1, 0, 0, $0b, $1 | OBP_NUM + dbsprite -3, 0, 0, 0, $00, $1 | OAMF_PAL1 + dbsprite -3, 1, 0, 0, $01, $1 | OAMF_PAL1 + dbsprite -2, 0, 0, 0, $02, $1 | OAMF_PAL1 + dbsprite -2, 1, 0, 0, $03, $1 | OAMF_PAL1 + dbsprite -1, 0, 0, 0, $04, $1 | OAMF_PAL1 + dbsprite -1, 1, 0, 0, $05, $1 | OAMF_PAL1 + dbsprite 0, 0, 0, 0, $06, $1 | OAMF_PAL1 + dbsprite 0, 1, 0, 0, $07, $1 | OAMF_PAL1 + dbsprite 1, 0, 0, 0, $08, $1 | OAMF_PAL1 + dbsprite 1, 1, 0, 0, $09, $1 | OAMF_PAL1 + dbsprite 2, 0, 0, 0, $0a, $1 | OAMF_PAL1 + dbsprite 2, 1, 0, 0, $0b, $1 | OAMF_PAL1 .OAMData_6e: dbsprite 0, -2, 4, 4, $00, $0 @@ -788,94 +788,94 @@ BattleAnimOAMData: dbsprite 0, -1, 4, 4, $02, $0 .OAMData_77: - dbsprite 1, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -4, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_78: dbsprite 1, -4, 4, 4, $00, $0 - dbsprite 0, -4, 4, 4, $01, X_FLIP | Y_FLIP - dbsprite 1, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -4, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, -3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_79: dbsprite 1, -4, 4, 4, $01, $0 dbsprite 0, -4, 4, 4, $00, $0 - dbsprite -1, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -4, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 1, -3, 4, 4, $00, $0 - dbsprite 0, -3, 4, 4, $01, X_FLIP | Y_FLIP - dbsprite 1, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, -2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_7a: - dbsprite -2, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -4, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, -4, 4, 4, $00, $0 dbsprite 0, -4, 4, 4, $01, $0 - dbsprite -1, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 0, -3, 4, 4, $00, $0 dbsprite 1, -3, 4, 4, $01, $0 - dbsprite 0, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 1, -2, 4, 4, $00, $0 - dbsprite 1, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_7b: - dbsprite -3, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -3, -4, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -2, -4, 4, 4, $00, $0 dbsprite -1, -4, 4, 4, $01, $0 - dbsprite -2, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, -3, 4, 4, $00, $0 dbsprite 0, -3, 4, 4, $01, $0 - dbsprite -1, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 0, -2, 4, 4, $00, $0 dbsprite 1, -2, 4, 4, $01, $0 - dbsprite 0, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 1, -1, 4, 4, $00, $0 - dbsprite 1, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 0, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_7c: dbsprite -3, -4, 4, 4, $00, $0 dbsprite -2, -4, 4, 4, $01, $0 - dbsprite -3, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -3, -3, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -2, -3, 4, 4, $00, $0 dbsprite -1, -3, 4, 4, $01, $0 - dbsprite -2, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, -2, 4, 4, $00, $0 dbsprite 0, -2, 4, 4, $01, $0 - dbsprite -1, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 0, -1, 4, 4, $00, $0 dbsprite 1, -1, 4, 4, $01, $0 - dbsprite 0, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, 0, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 1, 0, 4, 4, $00, $0 - dbsprite 1, 1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_7d: dbsprite -3, -4, 4, 4, $01, $0 dbsprite -3, -3, 4, 4, $00, $0 dbsprite -2, -3, 4, 4, $01, $0 - dbsprite -3, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -3, -2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -2, -2, 4, 4, $00, $0 dbsprite -1, -2, 4, 4, $01, $0 - dbsprite -2, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, -1, 4, 4, $00, $0 dbsprite 0, -1, 4, 4, $01, $0 - dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, 0, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 0, 0, 4, 4, $00, $0 dbsprite 1, 0, 4, 4, $01, $0 - dbsprite 0, 1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, 1, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite 1, 1, 4, 4, $00, $0 - dbsprite 1, 2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 2, 4, 4, $01, OAMF_XFLIP | OAMF_YFLIP .OAMData_70: dbsprite -1, -2, 0, 0, $00, $0 dbsprite -1, -1, 0, 0, $01, $0 - dbsprite 0, -2, 0, 0, $00, X_FLIP - dbsprite 0, -1, 0, 0, $01, X_FLIP - dbsprite -1, 0, 0, 0, $01, Y_FLIP - dbsprite -1, 1, 0, 0, $00, Y_FLIP - dbsprite 0, 0, 0, 0, $01, X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 0, -2, 0, 0, $00, OAMF_XFLIP + dbsprite 0, -1, 0, 0, $01, OAMF_XFLIP + dbsprite -1, 0, 0, 0, $01, OAMF_YFLIP + dbsprite -1, 1, 0, 0, $00, OAMF_YFLIP + dbsprite 0, 0, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_81: dbsprite -1, -1, 0, 0, $00, $0 dbsprite 0, -1, 0, 0, $01, $0 - dbsprite -1, 0, 0, 0, $01, X_FLIP | Y_FLIP - dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_87: dbsprite -1, -2, 0, 4, $00, $0 @@ -923,8 +923,8 @@ BattleAnimOAMData: dbsprite -1, -3, 4, 4, $00, $0 dbsprite -1, -2, 4, 4, $01, $0 dbsprite -1, -1, 4, 4, $02, $0 - dbsprite -1, 0, 4, 4, $01, Y_FLIP - dbsprite -1, 1, 4, 4, $00, Y_FLIP + dbsprite -1, 0, 4, 4, $01, OAMF_YFLIP + dbsprite -1, 1, 4, 4, $00, OAMF_YFLIP .OAMData_8f: dbsprite -2, -1, 0, 4, $00, $0 @@ -988,9 +988,9 @@ BattleAnimOAMData: dbsprite -1, 0, 0, 4, $02, $0 dbsprite 0, 0, 0, 4, $03, $0 dbsprite -1, -1, 0, 4, $01, $0 - dbsprite 0, -1, 0, 4, $01, X_FLIP + dbsprite 0, -1, 0, 4, $01, OAMF_XFLIP dbsprite -1, -2, 0, 4, $00, $0 - dbsprite 0, -2, 0, 4, $00, X_FLIP + dbsprite 0, -2, 0, 4, $00, OAMF_XFLIP .OAMData_9f: dbsprite -2, -1, 0, 0, $00, $0 @@ -1018,49 +1018,49 @@ BattleAnimOAMData: dbsprite -2, -1, 4, 4, $03, $0 dbsprite -1, -1, 4, 4, $04, $0 dbsprite 0, -1, 4, 4, $05, $0 - dbsprite -2, 0, 4, 4, $00, Y_FLIP - dbsprite -1, 0, 4, 4, $01, Y_FLIP - dbsprite 0, 0, 4, 4, $02, Y_FLIP + dbsprite -2, 0, 4, 4, $00, OAMF_YFLIP + dbsprite -1, 0, 4, 4, $01, OAMF_YFLIP + dbsprite 0, 0, 4, 4, $02, OAMF_YFLIP .OAMData_ac: dbsprite -2, -1, 0, 4, $00, $0 dbsprite -1, -1, 0, 4, $01, $0 - dbsprite 0, -1, 0, 4, $01, X_FLIP - dbsprite 1, -1, 0, 4, $00, X_FLIP + dbsprite 0, -1, 0, 4, $01, OAMF_XFLIP + dbsprite 1, -1, 0, 4, $00, OAMF_XFLIP .OAMData_bc: dbsprite -3, -1, 0, 4, $00, $0 dbsprite -2, -1, 0, 4, $01, $0 dbsprite -1, -1, 0, 4, $02, $0 - dbsprite 0, -1, 0, 4, $02, X_FLIP - dbsprite 1, -1, 0, 4, $01, X_FLIP - dbsprite 2, -1, 0, 4, $00, X_FLIP + dbsprite 0, -1, 0, 4, $02, OAMF_XFLIP + dbsprite 1, -1, 0, 4, $01, OAMF_XFLIP + dbsprite 2, -1, 0, 4, $00, OAMF_XFLIP .OAMData_c1: dbsprite -2, -2, 0, 0, $00, $0 dbsprite -1, -2, 0, 0, $01, $0 dbsprite 0, -2, 0, 0, $02, $0 - dbsprite 1, -2, 0, 0, $00, X_FLIP + dbsprite 1, -2, 0, 0, $00, OAMF_XFLIP dbsprite -2, -1, 0, 0, $03, $0 dbsprite -1, -1, 0, 0, $04, $0 - dbsprite 0, -1, 0, 0, $04, X_FLIP + dbsprite 0, -1, 0, 0, $04, OAMF_XFLIP dbsprite 1, -1, 0, 0, $05, $0 - dbsprite -2, 0, 0, 0, $05, X_FLIP | Y_FLIP - dbsprite -1, 0, 0, 0, $04, Y_FLIP - dbsprite 0, 0, 0, 0, $04, X_FLIP | Y_FLIP - dbsprite 1, 0, 0, 0, $03, X_FLIP | Y_FLIP - dbsprite -2, 1, 0, 0, $00, Y_FLIP - dbsprite -1, 1, 0, 0, $02, X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $01, X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite -2, 0, 0, 0, $05, OAMF_XFLIP | OAMF_YFLIP + dbsprite -1, 0, 0, 0, $04, OAMF_YFLIP + dbsprite 0, 0, 0, 0, $04, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $03, OAMF_XFLIP | OAMF_YFLIP + dbsprite -2, 1, 0, 0, $00, OAMF_YFLIP + dbsprite -1, 1, 0, 0, $02, OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_c2: dbsprite -2, -1, 0, 0, $00, $0 dbsprite -1, -1, 0, 0, $01, $0 - dbsprite 0, -1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, 0, 0, 0, $00, $0 dbsprite 0, 0, 0, 0, $01, $0 - dbsprite 1, 0, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $00, OAMF_XFLIP | OAMF_YFLIP .OAMData_c8: dbsprite 1, -1, 4, 0, $00, $0 @@ -1072,9 +1072,9 @@ BattleAnimOAMData: .OAMData_ca: dbsprite -1, -1, 0, 0, $00, $0 - dbsprite 0, -1, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $01, OAMF_XFLIP | OAMF_YFLIP dbsprite -1, 0, 0, 0, $01, $0 - dbsprite 0, 0, 0, 0, $01, X_FLIP + dbsprite 0, 0, 0, 0, $01, OAMF_XFLIP .OAMData_cc: dbsprite -13, -2, 4, 0, $00, $0 diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm index 84ea6384173..198730d58d7 100644 --- a/data/battle_anims/objects.asm +++ b/data/battle_anims/objects.asm @@ -60,7 +60,7 @@ BattleAnimObjects: ; ANIM_OBJ_ICE_BEAM battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE ; ANIM_OBJ_RAZOR_LEAF - battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT + battleanimobj RELATIVE_X | OAMF_XFLIP, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT ; ANIM_OBJ_POKE_BALL battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_POKEBALL, PAL_BATTLE_OB_RED, ANIM_GFX_POKE_BALL ; ANIM_OBJ_POKE_BALL_BLOCKED @@ -92,15 +92,15 @@ BattleAnimObjects: ; ANIM_OBJ_SING battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_SING, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE ; ANIM_OBJ_WATER_GUN - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_WATER_GUN, PAL_BATTLE_OB_BLUE, ANIM_GFX_WATER + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_WATER_GUN, PAL_BATTLE_OB_BLUE, ANIM_GFX_WATER ; ANIM_OBJ_HYDRO_PUMP battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_WATER ; ANIM_OBJ_POWDER battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_POWDER, PAL_BATTLE_OB_GREEN, ANIM_GFX_POWDER ; ANIM_OBJ_BEAM - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM ; ANIM_OBJ_BEAM_TIP - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM ; ANIM_OBJ_ICE_BUILDUP battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE ; ANIM_OBJ_FROZEN @@ -110,81 +110,81 @@ BattleAnimObjects: ; ANIM_OBJ_RECOVER battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_RECOVER, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BUBBLE ; ANIM_OBJ_THUNDER1 - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_THUNDER2 - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_THUNDER3 - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_THUNDER_WAVE - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_THUNDER_WAVE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_THUNDER_WAVE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_SPARKS_CIRCLE_BIG - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_THUNDERBOLT_BALL - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION ; ANIM_OBJ_SPARKS_CIRCLE - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_THUNDERSHOCK_BALL - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION ; ANIM_OBJ_CLAMP - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_BITE battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_BITE, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CUT_DOWN_LEFT - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CUT_DOWN_RIGHT - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CUT_UP_RIGHT - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CUT_LONG_DOWN_LEFT - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_41, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_41, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CUT_LONG_DOWN_RIGHT - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_42, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_42, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_SOLAR_BEAM_CHARGE battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_SOLAR_BEAM, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE ; ANIM_OBJ_ABSORB_CENTER battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_44, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE ; ANIM_OBJ_GUST - battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_45, BATTLEANIMFUNC_GUST, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND + battleanimobj RELATIVE_X | OAMF_XFLIP, $b8, BATTLEANIMFRAMESET_45, BATTLEANIMFUNC_GUST, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND ; ANIM_OBJ_VINE_WHIP1 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_46, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_46, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_VINE_WHIP2 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_RAZOR_WIND1 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_RAZOR_WIND2 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_SONICBOOM_JP - battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_WARP - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_ABSORB battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_ABSORB, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE ; ANIM_OBJ_EGG - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_EGG, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_EGG, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG ; ANIM_OBJ_FOCUS battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_51, BATTLEANIMFUNC_MOVE_UP, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_BIND1 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE ; ANIM_OBJ_BIND2 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE ; ANIM_OBJ_LEECH_SEED - battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT + battleanimobj RELATIVE_X | OAMF_XFLIP, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT ; ANIM_OBJ_SOUND - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_SOUND, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_SOUND, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE ; ANIM_OBJ_WAVE - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_PSYCHIC + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_PSYCHIC ; ANIM_OBJ_CONFUSE_RAY battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_CONFUSE_RAY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_LEER - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM ; ANIM_OBJ_LEER_TIP - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM ; ANIM_OBJ_SCREEN - battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_REFLECT + battleanimobj RELATIVE_X | OAMF_XFLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_REFLECT ; ANIM_OBJ_HARDEN - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT ; ANIM_OBJ_CHICK - battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS + battleanimobj RELATIVE_X | OAMF_XFLIP, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS ; ANIM_OBJ_AMNESIA battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_AMNESIA, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS ; ANIM_OBJ_ASLEEP @@ -192,27 +192,27 @@ BattleAnimObjects: ; ANIM_OBJ_SKULL battleanimobj RELATIVE_X, $50, BATTLEANIMFRAMESET_1C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_POISON ; ANIM_OBJ_DIG_SAND - battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_DIG, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND + battleanimobj RELATIVE_X | OAMF_XFLIP, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_DIG, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND ; ANIM_OBJ_DIG_PILE - battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND + battleanimobj RELATIVE_X | OAMF_XFLIP, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND ; ANIM_OBJ_SAND - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_SAND + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_SAND ; ANIM_OBJ_PARALYZED - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_PARALYZED, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_PARALYZED, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS ; ANIM_OBJ_STRING_SHOT - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_STRING, PAL_BATTLE_OB_GRAY, ANIM_GFX_WEB + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_STRING, PAL_BATTLE_OB_GRAY, ANIM_GFX_WEB ; ANIM_OBJ_HAZE battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE ; ANIM_OBJ_MIST - battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE + battleanimobj RELATIVE_X | OAMF_XFLIP, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE ; ANIM_OBJ_SMOG - battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE + battleanimobj RELATIVE_X | OAMF_XFLIP, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE ; ANIM_OBJ_POISON_GAS - battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE + battleanimobj RELATIVE_X | OAMF_XFLIP, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE ; ANIM_OBJ_HORN - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN ; ANIM_OBJ_NEEDLE - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_NEEDLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_NEEDLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN ; ANIM_OBJ_PETAL_DANCE battleanimobj RELATIVE_X, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_PETAL_DANCE, PAL_BATTLE_OB_RED, ANIM_GFX_FLOWER ; ANIM_OBJ_SLUDGE_BOMB @@ -220,7 +220,7 @@ BattleAnimObjects: ; ANIM_OBJ_PAY_DAY battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_THIEF_PAYDAY, PAL_BATTLE_OB_BROWN, ANIM_GFX_STATUS ; ANIM_OBJ_SONICBOOM_JP_UNUSED - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_MIMIC battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_SPEED ; ANIM_OBJ_ATTRACT @@ -234,17 +234,17 @@ BattleAnimObjects: ; ANIM_OBJ_SWIFT battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS ; ANIM_OBJ_KINESIS - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_FLASH battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_SHINY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_SHINY battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_SHINY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_SKY_ATTACK - battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_SKY_ATTACK, PAL_BATTLE_OB_GRAY, ANIM_GFX_SKY_ATTACK + battleanimobj RELATIVE_X | OAMF_XFLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_SKY_ATTACK, PAL_BATTLE_OB_GRAY, ANIM_GFX_SKY_ATTACK ; ANIM_OBJ_LICK - battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER + battleanimobj RELATIVE_X | OAMF_XFLIP, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER ; ANIM_OBJ_WITHDRAW - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT ; ANIM_OBJ_DRAIN battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_BLUE, ANIM_GFX_BUBBLE ; ANIM_OBJ_GROWTH @@ -252,11 +252,11 @@ BattleAnimObjects: ; ANIM_OBJ_CONVERSION2 battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION ; ANIM_OBJ_SMOKE - battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SMOKE_FLAME_WHEEL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE + battleanimobj RELATIVE_X | OAMF_XFLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SMOKE_FLAME_WHEEL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE ; ANIM_OBJ_SMOKESCREEN - battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG + battleanimobj RELATIVE_X | OAMF_XFLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG ; ANIM_OBJ_SWORDS_DANCE - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_GROWTH_SWORDS_DANCE, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_GROWTH_SWORDS_DANCE, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP ; ANIM_OBJ_SPEED_LINE battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_SPEED_LINE, PAL_BATTLE_OB_GRAY, ANIM_GFX_SPEED ; ANIM_OBJ_SHARPEN @@ -268,9 +268,9 @@ BattleAnimObjects: ; ANIM_OBJ_METRONOME_SPARKLE battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_DISABLE - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_AGILITY - battleanimobj RELATIVE_X | X_FLIP | PRIORITY, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_AGILITY, PAL_BATTLE_OB_BLUE, ANIM_GFX_WIND + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_PRI, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_AGILITY, PAL_BATTLE_OB_BLUE, ANIM_GFX_WIND ; ANIM_OBJ_HEART battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS ; ANIM_OBJ_FLAME_WHEEL @@ -278,33 +278,33 @@ BattleAnimObjects: ; ANIM_OBJ_SACRED_FIRE battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_SACRED_FIRE, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE ; ANIM_OBJ_COTTON_SPORE - battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_MILK_DRINK - battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_ANGER - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_HEAL_BELL - battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_MISC ; ANIM_OBJ_HEAL_BELL_NOTE battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_HEAL_BELL_NOTES, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE ; ANIM_OBJ_BATON_PASS - battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_BATON_PASS, PAL_BATTLE_OB_RED, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_BATON_PASS, PAL_BATTLE_OB_RED, ANIM_GFX_MISC ; ANIM_OBJ_LOCK_ON - battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_MIND_READER - battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_SAFEGUARD - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_PROTECT - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS ; ANIM_OBJ_THIEF battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_THIEF_PAYDAY, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS ; ANIM_OBJ_OCTAZOOKA - battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG + battleanimobj RELATIVE_X | OAMF_XFLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG ; ANIM_OBJ_PRESENT - battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_STATUS + battleanimobj RELATIVE_X | OAMF_XFLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_STATUS ; ANIM_OBJ_SPIKES - battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_SPIKES, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC + battleanimobj RELATIVE_X | OAMF_XFLIP, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_SPIKES, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC ; ANIM_OBJ_POWDER_SNOW battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_GRAY, ANIM_GFX_ICE ; ANIM_OBJ_DRAGONBREATH @@ -314,25 +314,25 @@ BattleAnimObjects: ; ANIM_OBJ_SPIDER_WEB battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WEB ; ANIM_OBJ_CAKE_UNUSED - battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS ; ANIM_OBJ_NIGHTMARE - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS ; ANIM_OBJ_IN_NIGHTMARE - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS ; ANIM_OBJ_LOVELY_KISS - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS ; ANIM_OBJ_SWEET_KISS - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ANGELS ; ANIM_OBJ_SKETCH - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH, PAL_BATTLE_OB_GREEN, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH, PAL_BATTLE_OB_GREEN, ANIM_GFX_OBJECTS ; ANIM_OBJ_ENCORE_HAND - battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS ; ANIM_OBJ_ENCORE_STAR - battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_ENCORE_BELLY_DRUM, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_ENCORE_BELLY_DRUM, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS ; ANIM_OBJ_DESTINY_BOND - battleanimobj RELATIVE_X | X_FLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS ; ANIM_OBJ_MORNING_SUN - battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SHINE + battleanimobj RELATIVE_X | OAMF_XFLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SHINE ; ANIM_OBJ_GLIMMER battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHINE ; ANIM_OBJ_MOONLIGHT @@ -340,25 +340,25 @@ BattleAnimObjects: ; ANIM_OBJ_HIDDEN_POWER battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_HIDDEN_POWER, PAL_BATTLE_OB_RED, ANIM_GFX_CHARGE ; ANIM_OBJ_CROSS_CHOP1 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_CROSS_CHOP2 - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT ; ANIM_OBJ_SANDSTORM - battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_BROWN, ANIM_GFX_POWDER + battleanimobj RELATIVE_X | OAMF_XFLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_BROWN, ANIM_GFX_POWDER ; ANIM_OBJ_ZAP_CANNON - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING ; ANIM_OBJ_SPITE - battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_POWDER, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS + battleanimobj RELATIVE_X | OAMF_XFLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_POWDER, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS ; ANIM_OBJ_CURSE - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_CURSE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_CURSE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS ; ANIM_OBJ_PERISH_SONG battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_PERISH_SONG, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE ; ANIM_OBJ_FORESIGHT battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHINE ; ANIM_OBJ_RAPID_SPIN - battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_RAPID_SPIN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND + battleanimobj RELATIVE_X | OAMF_XFLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_RAPID_SPIN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND ; ANIM_OBJ_SWAGGER - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND ; ANIM_OBJ_BELLY_DRUM_HAND battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT ; ANIM_OBJ_BELLY_DRUM_NOTE @@ -368,9 +368,9 @@ BattleAnimObjects: ; ANIM_OBJ_BETA_PURSUIT battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_AE, BATTLEANIMFUNC_BETA_PURSUIT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT ; ANIM_OBJ_SHOOTING_SPARKLE - battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED + battleanimobj RELATIVE_X | OAMF_XFLIP, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED ; ANIM_OBJ_RAIN - battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER + battleanimobj RELATIVE_X | OAMF_XFLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER ; ANIM_OBJ_B0 battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_ANIM_OBJ_B0, PAL_BATTLE_OB_RED, ANIM_GFX_HAZE ; ANIM_OBJ_PSYCH_UP @@ -378,11 +378,11 @@ BattleAnimObjects: ; ANIM_OBJ_ANCIENTPOWER battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_ANCIENT_POWER, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS ; ANIM_OBJ_AEROBLAST - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_AEROBLAST + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_AEROBLAST ; ANIM_OBJ_SHADOW_BALL - battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_WAVE_TO_TARGET, PAL_BATTLE_OB_BLUE, ANIM_GFX_EGG + battleanimobj RELATIVE_X | OAMF_XFLIP | OAMF_YFLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_WAVE_TO_TARGET, PAL_BATTLE_OB_BLUE, ANIM_GFX_EGG ; ANIM_OBJ_ROCK_SMASH - battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_ROCK_SMASH, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS + battleanimobj RELATIVE_X | OAMF_XFLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_ROCK_SMASH, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS ; ANIM_OBJ_FLOWER battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_RED, ANIM_GFX_FLOWER ; ANIM_OBJ_COTTON diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm index b7ebc335210..548a0a8ca96 100644 --- a/data/sprite_anims/framesets.asm +++ b/data/sprite_anims/framesets.asm @@ -107,21 +107,21 @@ SpriteAnimFrameData: frame SPRITE_ANIM_OAMSET_RED_WALK_1, 8 frame SPRITE_ANIM_OAMSET_RED_WALK_2, 8 frame SPRITE_ANIM_OAMSET_RED_WALK_1, 8 - frame SPRITE_ANIM_OAMSET_RED_WALK_2, 8, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_RED_WALK_2, 8, OAMB_XFLIP dorestart .Frameset_BlueWalk: frame SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 frame SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8 frame SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 - frame SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8, OAMB_XFLIP dorestart .Frameset_MagnetTrainBlue: frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8 frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 - frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8, OAMB_XFLIP dorestart .Frameset_GSTitleTrail: @@ -159,7 +159,7 @@ SpriteAnimFrameData: .Frameset_GSGameFreakLogoStar: frame SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3 - frame SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3, OAMB_YFLIP dorestart .Frameset_GSGameFreakLogoSparkle: @@ -172,8 +172,8 @@ SpriteAnimFrameData: .Frameset_SlotsGolem: frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7 frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7 - frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7, OAMB_XFLIP dorestart .Frameset_SlotsChansey: @@ -207,7 +207,7 @@ SpriteAnimFrameData: frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP dorestart .Frameset_TradePoof: @@ -244,7 +244,7 @@ SpriteAnimFrameData: frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8 frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 - frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAMB_XFLIP dorestart .Frameset_Unknown1: ; unreferenced @@ -264,9 +264,9 @@ SpriteAnimFrameData: .Frameset_Unknown4: ; unreferenced frame SPRITE_ANIM_OAMSET_UNUSED_49, 1 - frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP - frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAMB_XFLIP + frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAMB_XFLIP, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAMB_YFLIP dorestart .Frameset_Unknown5: ; unreferenced @@ -316,15 +316,15 @@ SpriteAnimFrameData: endanim .Frameset_EggHatch2: - frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAMB_XFLIP endanim .Frameset_EggHatch3: - frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAMB_YFLIP endanim .Frameset_EggHatch4: - frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAMB_XFLIP, OAMB_YFLIP endanim .Frameset_GSIntroHoOhLugia: @@ -340,7 +340,7 @@ SpriteAnimFrameData: frame SPRITE_ANIM_OAMSET_TREE_1, 2 frame SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2 frame SPRITE_ANIM_OAMSET_TREE_1, 2 - frame SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, OAMB_XFLIP dorestart .Frameset_EZChatCursor1: @@ -378,30 +378,30 @@ SpriteAnimFrameData: frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP endanim .Frameset_MobileTradeOTBall: frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAMB_XFLIP frame SPRITE_ANIM_OAMSET_TRADE_POOF_1, 3 frame SPRITE_ANIM_OAMSET_TRADE_POOF_2, 3 frame SPRITE_ANIM_OAMSET_TRADE_POOF_3, 3 @@ -455,21 +455,21 @@ SpriteAnimFrameData: delanim .Frameset_IntroUnown2: - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAMB_XFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAMB_XFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAMB_XFLIP delanim .Frameset_IntroUnown3: - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAMB_YFLIP delanim .Frameset_IntroUnown4: - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP, OAM_Y_FLIP - frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP, OAM_Y_FLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAMB_XFLIP, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAMB_XFLIP, OAMB_YFLIP + frame SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAMB_XFLIP, OAMB_YFLIP delanim .Frameset_IntroUnownF2: @@ -494,6 +494,6 @@ SpriteAnimFrameData: endanim .Frameset_CelebiRight: - frame SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAM_X_FLIP - frame SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAM_X_FLIP + frame SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAMB_XFLIP + frame SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAMB_XFLIP endanim diff --git a/data/sprite_anims/oam.asm b/data/sprite_anims/oam.asm index 6207c60a5cc..c9d67e63730 100644 --- a/data/sprite_anims/oam.asm +++ b/data/sprite_anims/oam.asm @@ -158,37 +158,37 @@ SpriteAnimOAMData: .OAMData_GSGameFreakLogoStar: db 4 dbsprite -1, -1, 0, 0, $00, 0 - dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP + dbsprite 0, -1, 0, 0, $00, 0 | OAMF_XFLIP dbsprite -1, 0, 0, 0, $01, 0 - dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP + dbsprite 0, 0, 0, 0, $01, 0 | OAMF_XFLIP .OAMData_TradePokeBall1: db 4 - dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY - dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY - dbsprite -1, 0, 0, 0, $01, 0 | PRIORITY - dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP | PRIORITY + dbsprite -1, -1, 0, 0, $00, 0 | OAMF_PRI + dbsprite 0, -1, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 0, 0, 0, $01, 0 | OAMF_PRI + dbsprite 0, 0, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_PRI .OAMData_IntroUnownF2_1: db 4 dbsprite -1, -1, 0, 0, $00, 0 - dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP - dbsprite -1, 0, 0, 0, $00, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite -1, 0, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_TradeTubeBulge: db 4 dbsprite -1, -1, 0, 0, $00, 7 - dbsprite 0, -1, 0, 0, $00, 7 | X_FLIP - dbsprite -1, 0, 0, 0, $00, 7 | Y_FLIP - dbsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $00, 7 | OAMF_XFLIP + dbsprite -1, 0, 0, 0, $00, 7 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, 7 | OAMF_XFLIP | OAMF_YFLIP .OAMData_Unknown1: ; unreferenced db 4 - dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY - dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY - dbsprite -1, 0, 0, 0, $00, 0 | Y_FLIP | PRIORITY - dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY + dbsprite -1, -1, 0, 0, $00, 0 | OAMF_PRI + dbsprite 0, -1, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 0, 0, 0, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP | OAMF_PRI .OAMData_TradePoofBubble: db 16 @@ -196,18 +196,18 @@ SpriteAnimOAMData: dbsprite -1, -2, 0, 0, $01, 0 dbsprite -2, -1, 0, 0, $02, 0 dbsprite -1, -1, 0, 0, $03, 0 - dbsprite 0, -2, 0, 0, $01, 0 | X_FLIP - dbsprite 1, -2, 0, 0, $00, 0 | X_FLIP - dbsprite 0, -1, 0, 0, $03, 0 | X_FLIP - dbsprite 1, -1, 0, 0, $02, 0 | X_FLIP - dbsprite -2, 0, 0, 0, $02, 0 | Y_FLIP - dbsprite -1, 0, 0, 0, $03, 0 | Y_FLIP - dbsprite -2, 1, 0, 0, $00, 0 | Y_FLIP - dbsprite -1, 1, 0, 0, $01, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $03, 0 | X_FLIP | Y_FLIP - dbsprite 1, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $01, 0 | X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -2, 0, 0, $01, 0 | OAMF_XFLIP + dbsprite 1, -2, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite 0, -1, 0, 0, $03, 0 | OAMF_XFLIP + dbsprite 1, -1, 0, 0, $02, 0 | OAMF_XFLIP + dbsprite -2, 0, 0, 0, $02, 0 | OAMF_YFLIP + dbsprite -1, 0, 0, 0, $03, 0 | OAMF_YFLIP + dbsprite -2, 1, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite -1, 1, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $03, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $02, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_GSIntroBigFireball: db 36 @@ -220,33 +220,33 @@ SpriteAnimOAMData: dbsprite -3, -1, 0, 0, $06, 0 dbsprite -2, -1, 0, 0, $05, 0 dbsprite -1, -1, 0, 0, $05, 0 - dbsprite 0, -3, 0, 0, $02, 0 | X_FLIP - dbsprite 1, -3, 0, 0, $01, 0 | X_FLIP - dbsprite 2, -3, 0, 0, $00, 0 | X_FLIP - dbsprite 0, -2, 0, 0, $05, 0 | X_FLIP - dbsprite 1, -2, 0, 0, $04, 0 | X_FLIP - dbsprite 2, -2, 0, 0, $03, 0 | X_FLIP - dbsprite 0, -1, 0, 0, $05, 0 | X_FLIP - dbsprite 1, -1, 0, 0, $05, 0 | X_FLIP - dbsprite 2, -1, 0, 0, $06, 0 | X_FLIP - dbsprite -3, 0, 0, 0, $06, 0 | Y_FLIP - dbsprite -2, 0, 0, 0, $05, 0 | Y_FLIP - dbsprite -1, 0, 0, 0, $05, 0 | Y_FLIP - dbsprite -3, 1, 0, 0, $03, 0 | Y_FLIP - dbsprite -2, 1, 0, 0, $04, 0 | Y_FLIP - dbsprite -1, 1, 0, 0, $05, 0 | Y_FLIP - dbsprite -3, 2, 0, 0, $00, 0 | Y_FLIP - dbsprite -2, 2, 0, 0, $01, 0 | Y_FLIP - dbsprite -1, 2, 0, 0, $02, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP - dbsprite 1, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP - dbsprite 2, 0, 0, 0, $06, 0 | X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $05, 0 | X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $04, 0 | X_FLIP | Y_FLIP - dbsprite 2, 1, 0, 0, $03, 0 | X_FLIP | Y_FLIP - dbsprite 0, 2, 0, 0, $02, 0 | X_FLIP | Y_FLIP - dbsprite 1, 2, 0, 0, $01, 0 | X_FLIP | Y_FLIP - dbsprite 2, 2, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -3, 0, 0, $02, 0 | OAMF_XFLIP + dbsprite 1, -3, 0, 0, $01, 0 | OAMF_XFLIP + dbsprite 2, -3, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite 0, -2, 0, 0, $05, 0 | OAMF_XFLIP + dbsprite 1, -2, 0, 0, $04, 0 | OAMF_XFLIP + dbsprite 2, -2, 0, 0, $03, 0 | OAMF_XFLIP + dbsprite 0, -1, 0, 0, $05, 0 | OAMF_XFLIP + dbsprite 1, -1, 0, 0, $05, 0 | OAMF_XFLIP + dbsprite 2, -1, 0, 0, $06, 0 | OAMF_XFLIP + dbsprite -3, 0, 0, 0, $06, 0 | OAMF_YFLIP + dbsprite -2, 0, 0, 0, $05, 0 | OAMF_YFLIP + dbsprite -1, 0, 0, 0, $05, 0 | OAMF_YFLIP + dbsprite -3, 1, 0, 0, $03, 0 | OAMF_YFLIP + dbsprite -2, 1, 0, 0, $04, 0 | OAMF_YFLIP + dbsprite -1, 1, 0, 0, $05, 0 | OAMF_YFLIP + dbsprite -3, 2, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite -2, 2, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite -1, 2, 0, 0, $02, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $05, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $05, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 2, 0, 0, 0, $06, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $05, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $04, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 2, 1, 0, 0, $03, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 2, 0, 0, $02, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 2, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 2, 2, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_Unused43_4A: db 9 @@ -355,10 +355,10 @@ SpriteAnimOAMData: .OAMData_MagnetTrainRed: db 4 - dbsprite -1, -1, 0, 0, $00, PAL_OW_RED | PRIORITY - dbsprite 0, -1, 0, 0, $01, PAL_OW_RED | PRIORITY - dbsprite -1, 0, 0, 0, $02, PAL_OW_RED | PRIORITY - dbsprite 0, 0, 0, 0, $03, PAL_OW_RED | PRIORITY + dbsprite -1, -1, 0, 0, $00, PAL_OW_RED | OAMF_PRI + dbsprite 0, -1, 0, 0, $01, PAL_OW_RED | OAMF_PRI + dbsprite -1, 0, 0, 0, $02, PAL_OW_RED | OAMF_PRI + dbsprite 0, 0, 0, 0, $03, PAL_OW_RED | OAMF_PRI .OAMData_PartyMonWithMail1: db 4 @@ -412,22 +412,22 @@ SpriteAnimOAMData: dbsprite -1, -1, 0, 0, $22, 0 dbsprite 0, -1, 0, 0, $23, 0 dbsprite 1, -1, 0, 0, $24, 0 - dbsprite -3, 0, 0, 0, $30, 0 | PRIORITY - dbsprite -2, 0, 0, 0, $31, 0 | PRIORITY - dbsprite -1, 0, 0, 0, $32, 0 | PRIORITY - dbsprite 0, 0, 0, 0, $33, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $34, 0 | PRIORITY - dbsprite -3, 1, 0, 0, $40, 0 | PRIORITY - dbsprite -2, 1, 0, 0, $41, 0 | PRIORITY - dbsprite -1, 1, 0, 0, $42, 0 | PRIORITY - dbsprite 0, 1, 0, 0, $43, 0 | PRIORITY - dbsprite 1, 1, 0, 0, $44, 0 | PRIORITY - dbsprite 2, 1, 0, 0, $45, 0 | PRIORITY - dbsprite -2, 2, 0, 0, $51, 0 | PRIORITY - dbsprite -1, 2, 0, 0, $52, 0 | PRIORITY - dbsprite 0, 2, 0, 0, $53, 0 | PRIORITY - dbsprite 1, 2, 0, 0, $54, 0 | PRIORITY - dbsprite 2, 2, 0, 0, $55, 0 | PRIORITY + dbsprite -3, 0, 0, 0, $30, 0 | OAMF_PRI + dbsprite -2, 0, 0, 0, $31, 0 | OAMF_PRI + dbsprite -1, 0, 0, 0, $32, 0 | OAMF_PRI + dbsprite 0, 0, 0, 0, $33, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $34, 0 | OAMF_PRI + dbsprite -3, 1, 0, 0, $40, 0 | OAMF_PRI + dbsprite -2, 1, 0, 0, $41, 0 | OAMF_PRI + dbsprite -1, 1, 0, 0, $42, 0 | OAMF_PRI + dbsprite 0, 1, 0, 0, $43, 0 | OAMF_PRI + dbsprite 1, 1, 0, 0, $44, 0 | OAMF_PRI + dbsprite 2, 1, 0, 0, $45, 0 | OAMF_PRI + dbsprite -2, 2, 0, 0, $51, 0 | OAMF_PRI + dbsprite -1, 2, 0, 0, $52, 0 | OAMF_PRI + dbsprite 0, 2, 0, 0, $53, 0 | OAMF_PRI + dbsprite 1, 2, 0, 0, $54, 0 | OAMF_PRI + dbsprite 2, 2, 0, 0, $55, 0 | OAMF_PRI .OAMData_GSIntroNote: db 2 @@ -456,9 +456,9 @@ SpriteAnimOAMData: .OAMData_TextEntryCursor: db 4 dbsprite -1, -1, 7, 7, $00, 0 - dbsprite 0, -1, 0, 7, $00, 0 | X_FLIP - dbsprite -1, 0, 7, 0, $00, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 7, $00, 0 | OAMF_XFLIP + dbsprite -1, 0, 7, 0, $00, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_TextEntryCursorBig: db 10 @@ -466,90 +466,90 @@ SpriteAnimOAMData: dbsprite 1, -1, 0, 7, $01, 0 dbsprite 2, -1, 0, 7, $01, 0 dbsprite 3, -1, 0, 7, $01, 0 - dbsprite 4, -1, 0, 7, $00, 0 | X_FLIP - dbsprite 0, 0, 0, 0, $00, 0 | Y_FLIP - dbsprite 1, 0, 0, 0, $01, 0 | Y_FLIP - dbsprite 2, 0, 0, 0, $01, 0 | Y_FLIP - dbsprite 3, 0, 0, 0, $01, 0 | Y_FLIP - dbsprite 4, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 4, -1, 0, 7, $00, 0 | OAMF_XFLIP + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite 2, 0, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite 3, 0, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite 4, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_GSGameFreakLogo: db 15 - dbsprite -2, -3, 4, 4, $00, 1 | OBP_NUM - dbsprite -1, -3, 4, 4, $01, 1 | OBP_NUM - dbsprite 0, -3, 4, 4, $02, 1 | OBP_NUM - dbsprite -2, -2, 4, 4, $03, 1 | OBP_NUM - dbsprite -1, -2, 4, 4, $04, 1 | OBP_NUM - dbsprite 0, -2, 4, 4, $05, 1 | OBP_NUM - dbsprite -2, -1, 4, 4, $06, 1 | OBP_NUM - dbsprite -1, -1, 4, 4, $07, 1 | OBP_NUM - dbsprite 0, -1, 4, 4, $08, 1 | OBP_NUM - dbsprite -2, 0, 4, 4, $09, 1 | OBP_NUM - dbsprite -1, 0, 4, 4, $0a, 1 | OBP_NUM - dbsprite 0, 0, 4, 4, $0b, 1 | OBP_NUM - dbsprite -2, 1, 4, 4, $0c, 1 | OBP_NUM - dbsprite -1, 1, 4, 4, $0d, 1 | OBP_NUM - dbsprite 0, 1, 4, 4, $0e, 1 | OBP_NUM + dbsprite -2, -3, 4, 4, $00, 1 | OAMF_PAL1 + dbsprite -1, -3, 4, 4, $01, 1 | OAMF_PAL1 + dbsprite 0, -3, 4, 4, $02, 1 | OAMF_PAL1 + dbsprite -2, -2, 4, 4, $03, 1 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $04, 1 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $05, 1 | OAMF_PAL1 + dbsprite -2, -1, 4, 4, $06, 1 | OAMF_PAL1 + dbsprite -1, -1, 4, 4, $07, 1 | OAMF_PAL1 + dbsprite 0, -1, 4, 4, $08, 1 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $09, 1 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $0a, 1 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $0b, 1 | OAMF_PAL1 + dbsprite -2, 1, 4, 4, $0c, 1 | OAMF_PAL1 + dbsprite -1, 1, 4, 4, $0d, 1 | OAMF_PAL1 + dbsprite 0, 1, 4, 4, $0e, 1 | OAMF_PAL1 .OAMData_SlotsGolem: db 6 - dbsprite -2, -2, 4, 4, $00, 5 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 5 | OBP_NUM - dbsprite 0, -2, 4, 4, $00, 5 | OBP_NUM | X_FLIP - dbsprite -2, 0, 4, 4, $04, 5 | OBP_NUM - dbsprite -1, 0, 4, 4, $06, 5 | OBP_NUM - dbsprite 0, 0, 4, 4, $04, 5 | OBP_NUM | X_FLIP + dbsprite -2, -2, 4, 4, $00, 5 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $02, 5 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $00, 5 | OAMF_PAL1 | OAMF_XFLIP + dbsprite -2, 0, 4, 4, $04, 5 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $06, 5 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $04, 5 | OAMF_PAL1 | OAMF_XFLIP .OAMData_SlotsChansey1: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $06, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $08, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $0a, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $02, 6 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $04, 6 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $06, 6 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $08, 6 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $0a, 6 | OAMF_PAL1 .OAMData_SlotsChansey2: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $0c, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $0e, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $10, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $02, 6 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $04, 6 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $0c, 6 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $0e, 6 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $10, 6 | OAMF_PAL1 .OAMData_SlotsChansey3: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $12, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $14, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $16, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $02, 6 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $04, 6 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $12, 6 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $14, 6 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $16, 6 | OAMF_PAL1 .OAMData_SlotsChansey4: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $18, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $1a, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $1c, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $02, 6 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $04, 6 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $18, 6 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $1a, 6 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $1c, 6 | OAMF_PAL1 .OAMData_SlotsChansey5: db 6 - dbsprite -2, -2, 4, 4, $1e, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $20, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $22, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $24, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $26, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $28, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $1e, 6 | OAMF_PAL1 + dbsprite -1, -2, 4, 4, $20, 6 | OAMF_PAL1 + dbsprite 0, -2, 4, 4, $22, 6 | OAMF_PAL1 + dbsprite -2, 0, 4, 4, $24, 6 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $26, 6 | OAMF_PAL1 + dbsprite 0, 0, 4, 4, $28, 6 | OAMF_PAL1 .OAMData_RadioTuningKnob: db 3 - dbsprite -1, -2, 4, 4, $00, 0 | OBP_NUM - dbsprite -1, -1, 4, 4, $00, 0 | OBP_NUM - dbsprite -1, 0, 4, 4, $00, 0 | OBP_NUM + dbsprite -1, -2, 4, 4, $00, 0 | OAMF_PAL1 + dbsprite -1, -1, 4, 4, $00, 0 | OAMF_PAL1 + dbsprite -1, 0, 4, 4, $00, 0 | OAMF_PAL1 .OAMData_Unused4B: db 6 @@ -689,7 +689,7 @@ SpriteAnimOAMData: .OAMData_GSTitleTrail: db 1 - dbsprite -1, -1, 4, 4, $00, 1 | OBP_NUM + dbsprite -1, -1, 4, 4, $00, 1 | OAMF_PAL1 .OAMData_EZChatCursor1: db 12 @@ -751,10 +751,10 @@ SpriteAnimOAMData: .OAMData_MagnetTrainBlue: db 4 - dbsprite -1, -1, 0, 0, $00, PAL_OW_BLUE | PRIORITY - dbsprite 0, -1, 0, 0, $01, PAL_OW_BLUE | PRIORITY - dbsprite -1, 0, 0, 0, $02, PAL_OW_BLUE | PRIORITY - dbsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | PRIORITY + dbsprite -1, -1, 0, 0, $00, PAL_OW_BLUE | OAMF_PRI + dbsprite 0, -1, 0, 0, $01, PAL_OW_BLUE | OAMF_PRI + dbsprite -1, 0, 0, 0, $02, PAL_OW_BLUE | OAMF_PRI + dbsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | OAMF_PRI .OAMData_MobileTradeCableBulge: db 1 @@ -769,43 +769,43 @@ SpriteAnimOAMData: .OAMData_MobileTradeOTPulse: db 4 - dbsprite -1, -2, 4, 0, $03, 4 | Y_FLIP - dbsprite -1, -1, 4, 0, $02, 4 | Y_FLIP - dbsprite -1, 0, 4, 0, $01, 4 | Y_FLIP - dbsprite -1, 1, 4, 0, $00, 4 | Y_FLIP + dbsprite -1, -2, 4, 0, $03, 4 | OAMF_YFLIP + dbsprite -1, -1, 4, 0, $02, 4 | OAMF_YFLIP + dbsprite -1, 0, 4, 0, $01, 4 | OAMF_YFLIP + dbsprite -1, 1, 4, 0, $00, 4 | OAMF_YFLIP .OAMData_MobileTradePing1: db 4 dbsprite -1, -1, 0, 0, $00, 1 - dbsprite 0, -1, 0, 0, $00, 1 | X_FLIP - dbsprite -1, 0, 0, 0, $00, 1 | Y_FLIP - dbsprite 0, 0, 0, 0, $00, 1 | X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $00, 1 | OAMF_XFLIP + dbsprite -1, 0, 0, 0, $00, 1 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $00, 1 | OAMF_XFLIP | OAMF_YFLIP .OAMData_MobileTradePing2: db 8 dbsprite -2, -2, 4, 4, $00, 1 dbsprite -1, -2, 4, 4, $01, 1 - dbsprite 0, -2, 4, 4, $00, 1 | X_FLIP + dbsprite 0, -2, 4, 4, $00, 1 | OAMF_XFLIP dbsprite -2, -1, 4, 4, $02, 1 - dbsprite 0, -1, 4, 4, $02, 1 | X_FLIP - dbsprite -2, 0, 4, 4, $00, 1 | Y_FLIP - dbsprite -1, 0, 4, 4, $01, 1 | Y_FLIP - dbsprite 0, 0, 4, 4, $00, 1 | X_FLIP | Y_FLIP + dbsprite 0, -1, 4, 4, $02, 1 | OAMF_XFLIP + dbsprite -2, 0, 4, 4, $00, 1 | OAMF_YFLIP + dbsprite -1, 0, 4, 4, $01, 1 | OAMF_YFLIP + dbsprite 0, 0, 4, 4, $00, 1 | OAMF_XFLIP | OAMF_YFLIP .OAMData_MobileTradePing3: db 12 dbsprite -2, -2, 0, 0, $00, 1 dbsprite -1, -2, 0, 0, $01, 1 dbsprite -2, -1, 0, 0, $02, 1 - dbsprite 0, -2, 0, 0, $01, 1 | X_FLIP - dbsprite 1, -2, 0, 0, $00, 1 | X_FLIP - dbsprite 1, -1, 0, 0, $02, 1 | X_FLIP - dbsprite -2, 0, 0, 0, $02, 1 | Y_FLIP - dbsprite -2, 1, 0, 0, $00, 1 | Y_FLIP - dbsprite -1, 1, 0, 0, $01, 1 | Y_FLIP - dbsprite 1, 0, 0, 0, $02, 1 | X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $01, 1 | X_FLIP | Y_FLIP - dbsprite 1, 1, 0, 0, $00, 1 | X_FLIP | Y_FLIP + dbsprite 0, -2, 0, 0, $01, 1 | OAMF_XFLIP + dbsprite 1, -2, 0, 0, $00, 1 | OAMF_XFLIP + dbsprite 1, -1, 0, 0, $02, 1 | OAMF_XFLIP + dbsprite -2, 0, 0, 0, $02, 1 | OAMF_YFLIP + dbsprite -2, 1, 0, 0, $00, 1 | OAMF_YFLIP + dbsprite -1, 1, 0, 0, $01, 1 | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $02, 1 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $01, 1 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 1, 0, 0, $00, 1 | OAMF_XFLIP | OAMF_YFLIP .OAMData_IntroSuicune1: db 36 @@ -946,50 +946,50 @@ SpriteAnimOAMData: .OAMData_IntroPichu: db 25 - dbsprite -3, -3, 4, 4, $00, 1 | VRAM_BANK_1 - dbsprite -2, -3, 4, 4, $01, 1 | VRAM_BANK_1 - dbsprite -1, -3, 4, 4, $02, 1 | VRAM_BANK_1 - dbsprite 0, -3, 4, 4, $03, 1 | VRAM_BANK_1 - dbsprite 1, -3, 4, 4, $04, 1 | VRAM_BANK_1 - dbsprite -3, -2, 4, 4, $10, 1 | VRAM_BANK_1 - dbsprite -2, -2, 4, 4, $11, 1 | VRAM_BANK_1 - dbsprite -1, -2, 4, 4, $12, 1 | VRAM_BANK_1 - dbsprite 0, -2, 4, 4, $13, 1 | VRAM_BANK_1 - dbsprite 1, -2, 4, 4, $14, 1 | VRAM_BANK_1 - dbsprite -3, -1, 4, 4, $20, 1 | VRAM_BANK_1 - dbsprite -2, -1, 4, 4, $21, 1 | VRAM_BANK_1 - dbsprite -1, -1, 4, 4, $22, 1 | VRAM_BANK_1 - dbsprite 0, -1, 4, 4, $23, 1 | VRAM_BANK_1 - dbsprite 1, -1, 4, 4, $24, 1 | VRAM_BANK_1 - dbsprite -3, 0, 4, 4, $30, 1 | VRAM_BANK_1 - dbsprite -2, 0, 4, 4, $31, 1 | VRAM_BANK_1 - dbsprite -1, 0, 4, 4, $32, 1 | VRAM_BANK_1 - dbsprite 0, 0, 4, 4, $33, 1 | VRAM_BANK_1 - dbsprite 1, 0, 4, 4, $34, 1 | VRAM_BANK_1 - dbsprite -3, 1, 4, 4, $40, 1 | VRAM_BANK_1 - dbsprite -2, 1, 4, 4, $41, 1 | VRAM_BANK_1 - dbsprite -1, 1, 4, 4, $42, 1 | VRAM_BANK_1 - dbsprite 0, 1, 4, 4, $43, 1 | VRAM_BANK_1 - dbsprite 1, 1, 4, 4, $44, 1 | VRAM_BANK_1 + dbsprite -3, -3, 4, 4, $00, 1 | OAMF_BANK1 + dbsprite -2, -3, 4, 4, $01, 1 | OAMF_BANK1 + dbsprite -1, -3, 4, 4, $02, 1 | OAMF_BANK1 + dbsprite 0, -3, 4, 4, $03, 1 | OAMF_BANK1 + dbsprite 1, -3, 4, 4, $04, 1 | OAMF_BANK1 + dbsprite -3, -2, 4, 4, $10, 1 | OAMF_BANK1 + dbsprite -2, -2, 4, 4, $11, 1 | OAMF_BANK1 + dbsprite -1, -2, 4, 4, $12, 1 | OAMF_BANK1 + dbsprite 0, -2, 4, 4, $13, 1 | OAMF_BANK1 + dbsprite 1, -2, 4, 4, $14, 1 | OAMF_BANK1 + dbsprite -3, -1, 4, 4, $20, 1 | OAMF_BANK1 + dbsprite -2, -1, 4, 4, $21, 1 | OAMF_BANK1 + dbsprite -1, -1, 4, 4, $22, 1 | OAMF_BANK1 + dbsprite 0, -1, 4, 4, $23, 1 | OAMF_BANK1 + dbsprite 1, -1, 4, 4, $24, 1 | OAMF_BANK1 + dbsprite -3, 0, 4, 4, $30, 1 | OAMF_BANK1 + dbsprite -2, 0, 4, 4, $31, 1 | OAMF_BANK1 + dbsprite -1, 0, 4, 4, $32, 1 | OAMF_BANK1 + dbsprite 0, 0, 4, 4, $33, 1 | OAMF_BANK1 + dbsprite 1, 0, 4, 4, $34, 1 | OAMF_BANK1 + dbsprite -3, 1, 4, 4, $40, 1 | OAMF_BANK1 + dbsprite -2, 1, 4, 4, $41, 1 | OAMF_BANK1 + dbsprite -1, 1, 4, 4, $42, 1 | OAMF_BANK1 + dbsprite 0, 1, 4, 4, $43, 1 | OAMF_BANK1 + dbsprite 1, 1, 4, 4, $44, 1 | OAMF_BANK1 .OAMData_IntroWooper: db 16 - dbsprite -3, -2, 4, 0, $00, 2 | VRAM_BANK_1 - dbsprite -2, -2, 4, 0, $01, 2 | VRAM_BANK_1 - dbsprite -1, -2, 4, 0, $02, 2 | VRAM_BANK_1 - dbsprite 0, -2, 4, 0, $03, 2 | VRAM_BANK_1 - dbsprite -3, -1, 4, 0, $04, 2 | VRAM_BANK_1 - dbsprite -2, -1, 4, 0, $05, 2 | VRAM_BANK_1 - dbsprite -1, -1, 4, 0, $06, 2 | VRAM_BANK_1 - dbsprite 0, -1, 4, 0, $07, 2 | VRAM_BANK_1 - dbsprite -3, 0, 4, 0, $08, 2 | VRAM_BANK_1 - dbsprite -2, 0, 4, 0, $09, 2 | VRAM_BANK_1 - dbsprite -1, 0, 4, 0, $0a, 2 | VRAM_BANK_1 - dbsprite 0, 0, 4, 0, $0b, 2 | VRAM_BANK_1 - dbsprite -3, 1, 4, 0, $0c, 2 | VRAM_BANK_1 - dbsprite -2, 1, 4, 0, $0d, 2 | VRAM_BANK_1 - dbsprite -1, 1, 4, 0, $0e, 2 | VRAM_BANK_1 - dbsprite 0, 1, 4, 0, $0f, 2 | VRAM_BANK_1 + dbsprite -3, -2, 4, 0, $00, 2 | OAMF_BANK1 + dbsprite -2, -2, 4, 0, $01, 2 | OAMF_BANK1 + dbsprite -1, -2, 4, 0, $02, 2 | OAMF_BANK1 + dbsprite 0, -2, 4, 0, $03, 2 | OAMF_BANK1 + dbsprite -3, -1, 4, 0, $04, 2 | OAMF_BANK1 + dbsprite -2, -1, 4, 0, $05, 2 | OAMF_BANK1 + dbsprite -1, -1, 4, 0, $06, 2 | OAMF_BANK1 + dbsprite 0, -1, 4, 0, $07, 2 | OAMF_BANK1 + dbsprite -3, 0, 4, 0, $08, 2 | OAMF_BANK1 + dbsprite -2, 0, 4, 0, $09, 2 | OAMF_BANK1 + dbsprite -1, 0, 4, 0, $0a, 2 | OAMF_BANK1 + dbsprite 0, 0, 4, 0, $0b, 2 | OAMF_BANK1 + dbsprite -3, 1, 4, 0, $0c, 2 | OAMF_BANK1 + dbsprite -2, 1, 4, 0, $0d, 2 | OAMF_BANK1 + dbsprite -1, 1, 4, 0, $0e, 2 | OAMF_BANK1 + dbsprite 0, 1, 4, 0, $0f, 2 | OAMF_BANK1 .OAMData_IntroUnown1: db 1 @@ -1015,27 +1015,27 @@ SpriteAnimOAMData: db 8 dbsprite -2, -1, 0, 0, $00, 0 dbsprite -1, -1, 0, 0, $01, 0 - dbsprite 0, -1, 0, 0, $01, 0 | X_FLIP - dbsprite 1, -1, 0, 0, $00, 0 | X_FLIP - dbsprite -2, 0, 0, 0, $00, 0 | Y_FLIP - dbsprite -1, 0, 0, 0, $01, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP - dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 0, $01, 0 | OAMF_XFLIP + dbsprite 1, -1, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite -2, 0, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite -1, 0, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 1, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_IntroUnownF2_3: db 12 dbsprite -1, -3, 0, 0, $00, 0 dbsprite -1, -2, 0, 0, $01, 0 dbsprite -1, -1, 0, 0, $02, 0 - dbsprite 0, -3, 0, 0, $00, 0 | X_FLIP - dbsprite 0, -2, 0, 0, $01, 0 | X_FLIP - dbsprite 0, -1, 0, 0, $02, 0 | X_FLIP - dbsprite -1, 0, 0, 0, $02, 0 | Y_FLIP - dbsprite -1, 1, 0, 0, $01, 0 | Y_FLIP - dbsprite -1, 2, 0, 0, $00, 0 | Y_FLIP - dbsprite 0, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP - dbsprite 0, 1, 0, 0, $01, 0 | X_FLIP | Y_FLIP - dbsprite 0, 2, 0, 0, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, -3, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite 0, -2, 0, 0, $01, 0 | OAMF_XFLIP + dbsprite 0, -1, 0, 0, $02, 0 | OAMF_XFLIP + dbsprite -1, 0, 0, 0, $02, 0 | OAMF_YFLIP + dbsprite -1, 1, 0, 0, $01, 0 | OAMF_YFLIP + dbsprite -1, 2, 0, 0, $00, 0 | OAMF_YFLIP + dbsprite 0, 0, 0, 0, $02, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 1, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 0, 2, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP .OAMData_IntroUnownF2_4_5: db 20 @@ -1062,26 +1062,26 @@ SpriteAnimOAMData: .OAMData_IntroSuicuneAway: db 20 - dbsprite 1, 0, 0, 0, $00, 1 | PRIORITY - dbsprite 2, 1, 0, 0, $00, 1 | PRIORITY - dbsprite 3, 2, 0, 0, $00, 1 | PRIORITY - dbsprite 4, 3, 0, 0, $00, 1 | PRIORITY - dbsprite 5, 4, 0, 0, $00, 1 | PRIORITY - dbsprite 6, 3, 0, 0, $00, 1 | PRIORITY - dbsprite 7, 2, 0, 0, $00, 1 | PRIORITY - dbsprite 8, 1, 0, 0, $00, 1 | PRIORITY - dbsprite 9, 0, 0, 0, $00, 1 | PRIORITY - dbsprite 10, 1, 0, 0, $00, 1 | PRIORITY - dbsprite 11, 2, 0, 0, $00, 1 | PRIORITY - dbsprite 12, 3, 0, 0, $00, 1 | PRIORITY - dbsprite 13, 4, 0, 0, $00, 1 | PRIORITY - dbsprite 14, 3, 0, 0, $00, 1 | PRIORITY - dbsprite 15, 2, 0, 0, $00, 1 | PRIORITY - dbsprite 16, 1, 0, 0, $00, 1 | PRIORITY - dbsprite -15, 0, 0, 0, $00, 1 | PRIORITY - dbsprite -14, 1, 0, 0, $00, 1 | PRIORITY - dbsprite -13, 2, 0, 0, $00, 1 | PRIORITY - dbsprite -12, 3, 0, 0, $00, 1 | PRIORITY + dbsprite 1, 0, 0, 0, $00, 1 | OAMF_PRI + dbsprite 2, 1, 0, 0, $00, 1 | OAMF_PRI + dbsprite 3, 2, 0, 0, $00, 1 | OAMF_PRI + dbsprite 4, 3, 0, 0, $00, 1 | OAMF_PRI + dbsprite 5, 4, 0, 0, $00, 1 | OAMF_PRI + dbsprite 6, 3, 0, 0, $00, 1 | OAMF_PRI + dbsprite 7, 2, 0, 0, $00, 1 | OAMF_PRI + dbsprite 8, 1, 0, 0, $00, 1 | OAMF_PRI + dbsprite 9, 0, 0, 0, $00, 1 | OAMF_PRI + dbsprite 10, 1, 0, 0, $00, 1 | OAMF_PRI + dbsprite 11, 2, 0, 0, $00, 1 | OAMF_PRI + dbsprite 12, 3, 0, 0, $00, 1 | OAMF_PRI + dbsprite 13, 4, 0, 0, $00, 1 | OAMF_PRI + dbsprite 14, 3, 0, 0, $00, 1 | OAMF_PRI + dbsprite 15, 2, 0, 0, $00, 1 | OAMF_PRI + dbsprite 16, 1, 0, 0, $00, 1 | OAMF_PRI + dbsprite -15, 0, 0, 0, $00, 1 | OAMF_PRI + dbsprite -14, 1, 0, 0, $00, 1 | OAMF_PRI + dbsprite -13, 2, 0, 0, $00, 1 | OAMF_PRI + dbsprite -12, 3, 0, 0, $00, 1 | OAMF_PRI .OAMData_Celebi: db 4 diff --git a/data/sprites/facings.asm b/data/sprites/facings.asm index b1bc7abf515..0b1f227b23a 100644 --- a/data/sprites/facings.asm +++ b/data/sprites/facings.asm @@ -60,10 +60,10 @@ FacingStepDown1: ; walking down 1 FacingStepDown3: ; walking down 2 db 4 ; # - db 0, 8, X_FLIP, $80 - db 0, 0, X_FLIP, $81 - db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $82 - db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $83 + db 0, 8, OAMF_XFLIP, $80 + db 0, 0, OAMF_XFLIP, $81 + db 8, 8, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $82 + db 8, 0, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $83 FacingStepUp0: FacingStepUp2: ; standing up @@ -82,10 +82,10 @@ FacingStepUp1: ; walking up 1 FacingStepUp3: ; walking up 2 db 4 ; # - db 0, 8, X_FLIP, $84 - db 0, 0, X_FLIP, $85 - db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $86 - db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $87 + db 0, 8, OAMF_XFLIP, $84 + db 0, 0, OAMF_XFLIP, $85 + db 8, 8, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $86 + db 8, 0, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $87 FacingStepLeft0: FacingStepLeft2: ; standing left @@ -98,10 +98,10 @@ FacingStepLeft2: ; standing left FacingStepRight0: FacingStepRight2: ; standing right db 4 ; # - db 0, 8, X_FLIP, $08 - db 0, 0, X_FLIP, $09 - db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a - db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b + db 0, 8, OAMF_XFLIP, $08 + db 0, 0, OAMF_XFLIP, $09 + db 8, 8, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $0a + db 8, 0, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $0b FacingStepLeft1: FacingStepLeft3: ; walking left @@ -114,10 +114,10 @@ FacingStepLeft3: ; walking left FacingStepRight1: FacingStepRight3: ; walking right db 4 ; # - db 0, 8, X_FLIP, $88 - db 0, 0, X_FLIP, $89 - db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $8a - db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $8b + db 0, 8, OAMF_XFLIP, $88 + db 0, 0, OAMF_XFLIP, $89 + db 8, 8, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $8a + db 8, 0, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $8b FacingFishDown: ; fishing down db 5 ; # @@ -141,14 +141,14 @@ FacingFishLeft: ; fishing left db 0, 8, 0, $09 db 8, 0, RELATIVE_ATTRIBUTES, $0a db 8, 8, RELATIVE_ATTRIBUTES, $0b - db 5, -8, ABSOLUTE_TILE_ID | X_FLIP, $fd + db 5, -8, ABSOLUTE_TILE_ID | OAMF_XFLIP, $fd FacingFishRight: ; fishing right db 5 ; # - db 0, 8, X_FLIP, $08 - db 0, 0, X_FLIP, $09 - db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a - db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b + db 0, 8, OAMF_XFLIP, $08 + db 0, 0, OAMF_XFLIP, $09 + db 8, 8, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $0a + db 8, 0, RELATIVE_ATTRIBUTES | OAMF_XFLIP, $0b db 5, 16, ABSOLUTE_TILE_ID, $fd FacingEmote: ; emote @@ -161,7 +161,7 @@ FacingEmote: ; emote FacingShadow: ; shadow db 2 ; # db 0, 0, ABSOLUTE_TILE_ID, $fc - db 0, 8, ABSOLUTE_TILE_ID | X_FLIP, $fc + db 0, 8, ABSOLUTE_TILE_ID | OAMF_XFLIP, $fc FacingBigDollSymmetric: ; big snorlax or lapras doll db 16 ; # @@ -173,14 +173,14 @@ FacingBigDollSymmetric: ; big snorlax or lapras doll db 16, 8, 0, $05 db 24, 0, 0, $06 db 24, 8, 0, $07 - db 0, 24, X_FLIP, $00 - db 0, 16, X_FLIP, $01 - db 8, 24, X_FLIP, $02 - db 8, 16, X_FLIP, $03 - db 16, 24, X_FLIP, $04 - db 16, 16, X_FLIP, $05 - db 24, 24, X_FLIP, $06 - db 24, 16, X_FLIP, $07 + db 0, 24, OAMF_XFLIP, $00 + db 0, 16, OAMF_XFLIP, $01 + db 8, 24, OAMF_XFLIP, $02 + db 8, 16, OAMF_XFLIP, $03 + db 16, 24, OAMF_XFLIP, $04 + db 16, 16, OAMF_XFLIP, $05 + db 24, 24, OAMF_XFLIP, $06 + db 24, 16, OAMF_XFLIP, $07 FacingWeirdTree1: db 4 ; # @@ -191,10 +191,10 @@ FacingWeirdTree1: FacingWeirdTree3: db 4 ; # - db 0, 8, X_FLIP, $04 - db 0, 0, X_FLIP, $05 - db 8, 8, X_FLIP, $06 - db 8, 0, X_FLIP, $07 + db 0, 8, OAMF_XFLIP, $04 + db 0, 0, OAMF_XFLIP, $05 + db 8, 8, OAMF_XFLIP, $06 + db 8, 0, OAMF_XFLIP, $07 FacingBigDollAsymmetric: ; big doll other than snorlax or lapras db 14 ; # @@ -206,11 +206,11 @@ FacingBigDollAsymmetric: ; big doll other than snorlax or lapras db 24, 8, 0, $0a db 0, 24, 0, $03 db 0, 16, 0, $02 - db 8, 24, X_FLIP, $02 + db 8, 24, OAMF_XFLIP, $02 db 8, 16, 0, $06 db 16, 24, 0, $09 db 16, 16, 0, $08 - db 24, 24, X_FLIP, $04 + db 24, 24, OAMF_XFLIP, $04 db 24, 16, 0, $0b FacingBoulderDust1: ; boulder dust 1 @@ -230,9 +230,9 @@ FacingBoulderDust2: ; boulder dust 2 FacingGrass1: db 2 ; # db 8, 0, ABSOLUTE_TILE_ID, $fe - db 8, 8, ABSOLUTE_TILE_ID | X_FLIP, $fe + db 8, 8, ABSOLUTE_TILE_ID | OAMF_XFLIP, $fe FacingGrass2: db 2 ; # db 9, -1, ABSOLUTE_TILE_ID, $fe - db 9, 9, ABSOLUTE_TILE_ID | X_FLIP, $fe + db 9, 9, ABSOLUTE_TILE_ID | OAMF_XFLIP, $fe diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 5d66d1793b7..2a1ad7120dd 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -8060,11 +8060,11 @@ BattleIntro: ld b, SCGB_BATTLE_GRAYSCALE call GetSGBLayout ld hl, rLCDC - res rLCDC_WINDOW_TILEMAP, [hl] ; select vBGMap0/vBGMap2 + res LCDCB_WIN9C00, [hl] ; select vBGMap0/vBGMap2 call InitBattleDisplay call BattleStartMessage ld hl, rLCDC - set rLCDC_WINDOW_TILEMAP, [hl] ; select vBGMap1/vBGMap3 + set LCDCB_WIN9C00, [hl] ; select vBGMap1/vBGMap3 xor a ldh [hBGMapMode], a call EmptyBattleTextbox diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 2575b96152e..29859b8ab83 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -249,7 +249,7 @@ BattleAnim_ClearOAM: ld c, NUM_SPRITE_OAM_STRUCTS .loop ld a, [hl] - and ~(PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits + and ~(OAMF_PALMASK | OAMF_BANK1) ; zero out the palette bits assert PAL_BATTLE_OB_ENEMY == 0 ld [hli], a rept SPRITEOAMSTRUCT_LENGTH - 1 diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 64be8839d6b..5919379fb57 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -89,7 +89,7 @@ BattleAnimOAMUpdate: ld hl, wBattleAnimTempOAMFlags ld a, [wBattleAnimTempFrameOAMFlags] xor [hl] - and PRIORITY | Y_FLIP | X_FLIP + and OAMF_PRI | OAMF_YFLIP | OAMF_XFLIP ld [hl], a pop af @@ -118,7 +118,7 @@ BattleAnimOAMUpdate: push hl ld a, [hl] ld hl, wBattleAnimTempOAMFlags - bit OAM_Y_FLIP, [hl] + bit OAMB_YFLIP, [hl] jr z, .no_yflip add $8 xor $ff @@ -139,7 +139,7 @@ BattleAnimOAMUpdate: push hl ld a, [hl] ld hl, wBattleAnimTempOAMFlags - bit OAM_X_FLIP, [hl] + bit OAMB_XFLIP, [hl] jr z, .no_xflip add $8 xor $ff @@ -164,14 +164,14 @@ BattleAnimOAMUpdate: ld b, a ld a, [hl] xor b - and PRIORITY | Y_FLIP | X_FLIP + and OAMF_PRI | OAMF_YFLIP | OAMF_XFLIP ld b, a ld a, [hl] - and OBP_NUM + and OAMF_PAL1 ; This bit is ignored on CGB or b ld b, a ld a, [wBattleAnimTempPalette] - and PALETTE_MASK | VRAM_BANK_1 + and OAMF_PALMASK | OAMF_BANK1 or b ld [de], a @@ -203,7 +203,7 @@ InitBattleAnimBuffer: add hl, bc ld a, [hl] - and PRIORITY + and OAMF_PRI ld [wBattleAnimTempOAMFlags], a xor a ld [wBattleAnimTempFrameOAMFlags], a diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm index 349226bf64f..241510b6286 100644 --- a/engine/battle_anims/functions.asm +++ b/engine/battle_anims/functions.asm @@ -2640,7 +2640,7 @@ BattleAnimFunction_String: ; Obj Param 0 flips when used by enemy ld hl, BATTLEANIMSTRUCT_OAMFLAGS add hl, bc - set OAM_Y_FLIP, [hl] + set OAMB_YFLIP, [hl] .not_param_zero add BATTLEANIMFRAMESET_6A ; BATTLEANIMFRAMESET_6B BATTLEANIMFRAMESET_6C call ReinitBattleAnimFrameset diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm index 6685ab73337..5faa858a109 100644 --- a/engine/battle_anims/helpers.asm +++ b/engine/battle_anims/helpers.asm @@ -37,14 +37,14 @@ GetBattleAnimFrame: push af ld a, [hl] push hl - and ~(Y_FLIP << 1 | X_FLIP << 1) + and ~(OAMF_YFLIP << 1 | OAMF_XFLIP << 1) ld hl, BATTLEANIMSTRUCT_DURATION add hl, bc ld [hl], a pop hl .okay ld a, [hl] - and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "frame" macro + and OAMF_YFLIP << 1 | OAMF_XFLIP << 1 ; The << 1 is compensated in the "frame" macro srl a ld [wBattleAnimTempFrameOAMFlags], a pop af diff --git a/engine/debug/color_picker.asm b/engine/debug/color_picker.asm index 6afe827f864..7efcea938f2 100644 --- a/engine/debug/color_picker.asm +++ b/engine/debug/color_picker.asm @@ -129,15 +129,15 @@ endr DebugColor_InitVRAM: ld a, $1 ldh [rVBK], a - ld hl, VRAM_Begin - ld bc, VRAM_End - VRAM_Begin + ld hl, _VRAM + ld bc, _SRAM - _VRAM xor a call ByteFill ld a, $0 ldh [rVBK], a - ld hl, VRAM_Begin - ld bc, VRAM_End - VRAM_Begin + ld hl, _VRAM + ld bc, _SRAM - _VRAM xor a call ByteFill @@ -194,23 +194,23 @@ DebugColor_InitPalettes: ld bc, 16 palettes call CopyBytes - ld a, 1 << rBGPI_AUTO_INCREMENT - ldh [rBGPI], a + ld a, BCPSF_AUTOINC + ldh [rBCPS], a ld hl, Palette_DebugBG ld c, 8 palettes xor a .bg_loop - ldh [rBGPD], a + ldh [rBCPD], a dec c jr nz, .bg_loop - ld a, 1 << rOBPI_AUTO_INCREMENT - ldh [rOBPI], a + ld a, OCPSF_AUTOINC + ldh [rOCPS], a ld hl, Palette_DebugOB ld c, 8 palettes .ob_loop ld a, [hli] - ldh [rOBPD], a + ldh [rOCPD], a dec c jr nz, .ob_loop @@ -946,9 +946,9 @@ _DebugColor_PushSGBPals: .loop push bc xor a - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a ld b, $10 .loop2 ld e, $8 @@ -960,18 +960,18 @@ _DebugColor_PushSGBPals: jr nz, .okay ld a, $20 .okay - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a rr d dec e jr nz, .loop3 dec b jr nz, .loop2 ld a, $20 - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a ld de, 7000 .wait nop @@ -1200,7 +1200,7 @@ DebugColorMain2: ; unreferenced ld hl, wDebugTilesetCurPalette ld a, [hl] inc a - and PALETTE_MASK + and OAMF_PALMASK cp PAL_BG_TEXT jr nz, .palette_ok xor a ; PAL_BG_GRAY diff --git a/engine/debug/debug_room.asm b/engine/debug/debug_room.asm index f464d7ada32..8d5170cd94a 100644 --- a/engine/debug/debug_room.asm +++ b/engine/debug/debug_room.asm @@ -1430,18 +1430,18 @@ DebugRoom_DayHTimeString: db "DAY HTIME@" DebugRoom_GetClock: - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a xor a - ld [MBC3LatchClock], a + ld [rRTCLATCH], a inc a - ld [MBC3LatchClock], a + ld [rRTCLATCH], a ld b, RTC_DH - RTC_S + 1 ld c, RTC_S .loop ld a, c - ld [MBC3SRamBank], a - ld a, [MBC3RTC] + ld [rRAMB], a + ld a, [_SRAM] ; Read the RTC register ld [hli], a inc c dec b @@ -1450,15 +1450,15 @@ DebugRoom_GetClock: ret DebugRoom_SetClock: - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ld b, RTC_DH - RTC_S + 1 ld c, RTC_S .loop ld a, c - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] - ld [MBC3RTC], a + ld [_SRAM], a ; Read the RTC register inc c dec b jr nz, .loop diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm index 0e60b00a2ff..9d15de54d4d 100644 --- a/engine/events/heal_machine_anim.asm +++ b/engine/events/heal_machine_anim.asm @@ -134,25 +134,25 @@ ENDM ret .PC_ElmsLab_OAM: - dbsprite 4, 4, 2, 0, $7c, PAL_OW_TREE | OBP_NUM - dbsprite 4, 4, 6, 0, $7c, PAL_OW_TREE | OBP_NUM - dbsprite 4, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP - dbsprite 4, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP - dbsprite 4, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dbsprite 4, 4, 2, 0, $7c, PAL_OW_TREE | OAMF_PAL1 + dbsprite 4, 4, 6, 0, $7c, PAL_OW_TREE | OAMF_PAL1 + dbsprite 4, 4, 0, 6, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 5, 4, 0, 6, $7d, PAL_OW_TREE | OAMF_PAL1 | OAMF_XFLIP + dbsprite 4, 5, 0, 3, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 5, 5, 0, 3, $7d, PAL_OW_TREE | OAMF_PAL1 | OAMF_XFLIP + dbsprite 4, 6, 0, 0, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 5, 6, 0, 0, $7d, PAL_OW_TREE | OAMF_PAL1 | OAMF_XFLIP .HealMachineGFX: INCBIN "gfx/overworld/heal_machine.2bpp" .HOF_OAM: - dbsprite 10, 7, 1, 4, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 10, 7, 6, 4, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 9, 7, 5, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 11, 7, 2, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 9, 7, 1, 1, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 11, 7, 5, 1, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 10, 7, 1, 4, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 10, 7, 6, 4, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 9, 7, 5, 3, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 11, 7, 2, 3, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 9, 7, 1, 1, $7d, PAL_OW_TREE | OAMF_PAL1 + dbsprite 11, 7, 5, 1, $7d, PAL_OW_TREE | OAMF_PAL1 .LoadPalettes: call IsCGB diff --git a/engine/events/map_name_sign.asm b/engine/events/map_name_sign.asm index 3bf9e3863e2..fe08bf53cab 100644 --- a/engine/events/map_name_sign.asm +++ b/engine/events/map_name_sign.asm @@ -178,7 +178,7 @@ InitMapSignAttrmap: inc b inc c inc c - ld a, PAL_BG_TEXT | PRIORITY + ld a, PAL_BG_TEXT | OAMF_PRI .loop push bc push hl diff --git a/engine/events/unown_walls.asm b/engine/events/unown_walls.asm index 3934943f4db..4c705b7c433 100644 --- a/engine/events/unown_walls.asm +++ b/engine/events/unown_walls.asm @@ -155,7 +155,7 @@ _DisplayUnownWords_FillAttr: cp $ff ret z cp $60 - ld a, VRAM_BANK_1 | PAL_BG_BROWN + ld a, OAMF_BANK1 | PAL_BG_BROWN jr c, .got_pal ld a, PAL_BG_BROWN diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index d9e07279e05..c8443a6300a 100644 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -1154,25 +1154,25 @@ PlaceOAMCardBorder: dbsprite 1, 0, 0, 0, $06, 0 dbsprite 2, 0, 0, 0, $06, 0 dbsprite 3, 0, 0, 0, $06, 0 - dbsprite 4, 0, 0, 0, $04, 0 | X_FLIP + dbsprite 4, 0, 0, 0, $04, 0 | OAMF_XFLIP dbsprite 0, 1, 0, 0, $05, 0 - dbsprite 4, 1, 0, 0, $05, 0 | X_FLIP + dbsprite 4, 1, 0, 0, $05, 0 | OAMF_XFLIP dbsprite 0, 2, 0, 0, $05, 0 - dbsprite 4, 2, 0, 0, $05, 0 | X_FLIP + dbsprite 4, 2, 0, 0, $05, 0 | OAMF_XFLIP dbsprite 0, 3, 0, 0, $05, 0 - dbsprite 4, 3, 0, 0, $05, 0 | X_FLIP + dbsprite 4, 3, 0, 0, $05, 0 | OAMF_XFLIP dbsprite 0, 4, 0, 0, $05, $00 - dbsprite 4, 4, 0, 0, $05, 0 | X_FLIP + dbsprite 4, 4, 0, 0, $05, 0 | OAMF_XFLIP - dbsprite 0, 5, 0, 0, $04, 0 | Y_FLIP - dbsprite 1, 5, 0, 0, $06, 0 | Y_FLIP - dbsprite 2, 5, 0, 0, $06, 0 | Y_FLIP - dbsprite 3, 5, 0, 0, $06, 0 | Y_FLIP - dbsprite 4, 5, 0, 0, $04, 0 | X_FLIP | Y_FLIP + dbsprite 0, 5, 0, 0, $04, 0 | OAMF_YFLIP + dbsprite 1, 5, 0, 0, $06, 0 | OAMF_YFLIP + dbsprite 2, 5, 0, 0, $06, 0 | OAMF_YFLIP + dbsprite 3, 5, 0, 0, $06, 0 | OAMF_YFLIP + dbsprite 4, 5, 0, 0, $04, 0 | OAMF_XFLIP | OAMF_YFLIP ChooseCard_HandleJoypad: ld hl, hJoyLast @@ -1405,145 +1405,145 @@ ENDM .SingleTile: db 6 - dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY - dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 0, 7, 5, $00, 0 | Y_FLIP | PRIORITY - dbsprite 0, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 1, 0, 0, 5, $03, 0 | PRIORITY + dbsprite -1, 0, 7, 0, $00, 0 | OAMF_PRI + dbsprite 0, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 0, 7, 5, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 0, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 0, 0, 5, $03, 0 | OAMF_PRI .PokeGroup: db 26 - dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY - dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY - dbsprite -1, 1, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 1, 0, 0, $01, 0 | X_FLIP | PRIORITY - dbsprite -1, 2, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 2, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 3, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 3, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 4, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 4, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 5, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 5, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 6, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 6, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 7, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 7, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 8, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 8, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 9, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 9, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 10, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 10, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 10, 7, 1, $00, 0 | Y_FLIP | PRIORITY - dbsprite 0, 10, 0, 1, $02, 0 | Y_FLIP | PRIORITY - dbsprite 1, 10, 0, 1, $03, 0 | PRIORITY + dbsprite -1, 0, 7, 0, $00, 0 | OAMF_PRI + dbsprite 0, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 1, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 1, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 2, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 2, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 3, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 3, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 4, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 4, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 5, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 5, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 6, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 6, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 7, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 7, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 8, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 8, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 9, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 9, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 10, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 10, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 10, 7, 1, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 0, 10, 0, 1, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 10, 0, 1, $03, 0 | OAMF_PRI .NumGroup: db 20 - dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY - dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 2, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 4, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 5, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 6, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 7, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 8, 0, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 0, 7, 5, $00, 0 | Y_FLIP | PRIORITY - dbsprite 0, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 1, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 2, 0, 0, 5, $03, 0 | PRIORITY - dbsprite 3, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 4, 0, 0, 5, $03, 0 | PRIORITY - dbsprite 5, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 6, 0, 0, 5, $03, 0 | PRIORITY - dbsprite 7, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY - dbsprite 8, 0, 0, 5, $03, 0 | PRIORITY + dbsprite -1, 0, 7, 0, $00, 0 | OAMF_PRI + dbsprite 0, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 2, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 4, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 5, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 6, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 7, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 8, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 0, 7, 5, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 0, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 2, 0, 0, 5, $03, 0 | OAMF_PRI + dbsprite 3, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 4, 0, 0, 5, $03, 0 | OAMF_PRI + dbsprite 5, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 6, 0, 0, 5, $03, 0 | OAMF_PRI + dbsprite 7, 0, 0, 5, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 8, 0, 0, 5, $03, 0 | OAMF_PRI .NumGroupPair: db 30 - dbsprite 0, 0, 0, 0, $00, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 2, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 3, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 4, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 5, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 6, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 7, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 8, 0, 0, 0, $02, 0 | PRIORITY - dbsprite 9, 0, 0, 0, $03, 0 | PRIORITY - dbsprite 0, 1, 0, 0, $01, 0 | PRIORITY - dbsprite 3, 1, 0, 0, $03, 0 | PRIORITY - dbsprite 5, 1, 0, 0, $03, 0 | PRIORITY - dbsprite 7, 1, 0, 0, $03, 0 | PRIORITY - dbsprite 9, 1, 0, 0, $03, 0 | PRIORITY - dbsprite 0, 2, 0, 0, $01, 0 | PRIORITY - dbsprite 3, 2, 0, 0, $03, 0 | PRIORITY - dbsprite 5, 2, 0, 0, $03, 0 | PRIORITY - dbsprite 7, 2, 0, 0, $03, 0 | PRIORITY - dbsprite 9, 2, 0, 0, $03, 0 | PRIORITY - dbsprite 0, 2, 0, 1, $00, 0 | Y_FLIP | PRIORITY - dbsprite 1, 2, 0, 1, $02, 0 | Y_FLIP | PRIORITY - dbsprite 2, 2, 0, 1, $02, 0 | Y_FLIP | PRIORITY - dbsprite 3, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 4, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 5, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 6, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 7, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 8, 2, 0, 1, $03, 0 | PRIORITY - dbsprite 9, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 2, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 3, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 4, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 5, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 6, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 7, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 8, 0, 0, 0, $02, 0 | OAMF_PRI + dbsprite 9, 0, 0, 0, $03, 0 | OAMF_PRI + dbsprite 0, 1, 0, 0, $01, 0 | OAMF_PRI + dbsprite 3, 1, 0, 0, $03, 0 | OAMF_PRI + dbsprite 5, 1, 0, 0, $03, 0 | OAMF_PRI + dbsprite 7, 1, 0, 0, $03, 0 | OAMF_PRI + dbsprite 9, 1, 0, 0, $03, 0 | OAMF_PRI + dbsprite 0, 2, 0, 0, $01, 0 | OAMF_PRI + dbsprite 3, 2, 0, 0, $03, 0 | OAMF_PRI + dbsprite 5, 2, 0, 0, $03, 0 | OAMF_PRI + dbsprite 7, 2, 0, 0, $03, 0 | OAMF_PRI + dbsprite 9, 2, 0, 0, $03, 0 | OAMF_PRI + dbsprite 0, 2, 0, 1, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 2, 0, 1, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 2, 2, 0, 1, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 3, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 4, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 5, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 6, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 7, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 8, 2, 0, 1, $03, 0 | OAMF_PRI + dbsprite 9, 2, 0, 1, $03, 0 | OAMF_PRI .PokeGroupPair: db 38 - dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY - dbsprite 3, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY - dbsprite -1, 1, 7, 0, $01, 0 | PRIORITY - dbsprite 3, 1, 0, 0, $01, 0 | X_FLIP | PRIORITY - dbsprite -1, 2, 7, 0, $01, 0 | PRIORITY - dbsprite 3, 2, 0, 0, $01, 0 | X_FLIP | PRIORITY - dbsprite -1, 3, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 3, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 3, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 4, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 4, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 4, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 5, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 5, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 5, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 6, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 6, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 6, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 7, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 7, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 7, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 8, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 8, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 8, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 9, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 9, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 9, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 10, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 10, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 10, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 11, 7, 0, $01, 0 | PRIORITY - dbsprite 1, 11, 0, 0, $03, 0 | PRIORITY - dbsprite 3, 11, 0, 0, $03, 0 | PRIORITY - dbsprite -1, 11, 7, 1, $00, 0 | Y_FLIP | PRIORITY - dbsprite 0, 11, 0, 1, $02, 0 | Y_FLIP | PRIORITY - dbsprite 1, 11, 0, 1, $03, 0 | Y_FLIP | PRIORITY - dbsprite 2, 11, 0, 1, $02, 0 | Y_FLIP | PRIORITY - dbsprite 3, 11, 0, 1, $03, 0 | X_FLIP | Y_FLIP | PRIORITY + dbsprite -1, 0, 7, 0, $00, 0 | OAMF_PRI + dbsprite 3, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 1, 7, 0, $01, 0 | OAMF_PRI + dbsprite 3, 1, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 2, 7, 0, $01, 0 | OAMF_PRI + dbsprite 3, 2, 0, 0, $01, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite -1, 3, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 3, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 3, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 4, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 4, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 4, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 5, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 5, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 5, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 6, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 6, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 6, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 7, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 7, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 7, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 8, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 8, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 8, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 9, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 9, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 9, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 10, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 10, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 10, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 11, 7, 0, $01, 0 | OAMF_PRI + dbsprite 1, 11, 0, 0, $03, 0 | OAMF_PRI + dbsprite 3, 11, 0, 0, $03, 0 | OAMF_PRI + dbsprite -1, 11, 7, 1, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 0, 11, 0, 1, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 11, 0, 1, $03, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 2, 11, 0, 1, $02, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 3, 11, 0, 1, $03, 0 | OAMF_XFLIP | OAMF_YFLIP | OAMF_PRI .Impossible: db 4 - dbsprite 0, 0, 0, 0, $00, 0 | PRIORITY - dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY - dbsprite 0, 1, 0, 0, $00, 0 | Y_FLIP | PRIORITY - dbsprite 1, 1, 0, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY + dbsprite 0, 0, 0, 0, $00, 0 | OAMF_PRI + dbsprite 1, 0, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_PRI + dbsprite 0, 1, 0, 0, $00, 0 | OAMF_YFLIP | OAMF_PRI + dbsprite 1, 1, 0, 0, $00, 0 | OAMF_XFLIP | OAMF_YFLIP | OAMF_PRI CardFlip_InitAttrPals: ldh a, [hCGB] diff --git a/engine/games/memory_game.asm b/engine/games/memory_game.asm index 8be4e51c484..9b87a993f93 100644 --- a/engine/games/memory_game.asm +++ b/engine/games/memory_game.asm @@ -34,7 +34,7 @@ _MemoryGame: ld [wJumptableIndex], a ld a, $1 ldh [hBGMapMode], a - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ld a, $e4 call DmgToCgbBGPals diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 5e9cfa3f18f..77e6c4e157c 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -95,7 +95,7 @@ _SlotMachine: ld hl, wOptions res NO_TEXT_SCROLL, [hl] ld hl, rLCDC - res rLCDC_SPRITE_SIZE, [hl] ; 8x8 + res LCDCB_OBJ16, [hl] ; 8x8 ret .InitGFX: @@ -140,7 +140,7 @@ _SlotMachine: call CopyBytes ld hl, rLCDC - set rLCDC_SPRITE_SIZE, [hl] ; 8x16 + set LCDCB_OBJ16, [hl] ; 8x16 call EnableLCD ld hl, wSlots ld bc, wSlotsEnd - wSlots @@ -824,7 +824,7 @@ Slots_UpdateReelPositionAndOAM: ld [hli], a ; tile id srl a srl a - set OAM_PRIORITY, a + set OAMB_PRI, a ld [hli], a ; attributes ld a, [wCurReelYCoord] @@ -838,7 +838,7 @@ Slots_UpdateReelPositionAndOAM: ld [hli], a ; tile id srl a srl a - set OAM_PRIORITY, a + set OAMB_PRI, a ld [hli], a ; attributes inc de ld a, [wCurReelYCoord] diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm index 8e5a4d8208c..9c84839eff9 100644 --- a/engine/games/unown_puzzle.asm +++ b/engine/games/unown_puzzle.asm @@ -85,7 +85,7 @@ _UnownPuzzle: call ClearBGPalettes call ClearTilemap call ClearSprites - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ret @@ -557,13 +557,13 @@ RedrawUnownPuzzlePieces: .OAM_NotHoldingPiece: dbsprite -1, -1, -4, -4, $00, 0 dbsprite 0, -1, -4, -4, $01, 0 - dbsprite 0, -1, 4, -4, $00, 0 | X_FLIP + dbsprite 0, -1, 4, -4, $00, 0 | OAMF_XFLIP dbsprite -1, 0, -4, -4, $02, 0 dbsprite 0, 0, -4, -4, $03, 0 - dbsprite 0, 0, 4, -4, $02, 0 | X_FLIP - dbsprite -1, 0, -4, 4, $00, 0 | Y_FLIP - dbsprite 0, 0, -4, 4, $01, 0 | Y_FLIP - dbsprite 0, 0, 4, 4, $00, 0 | X_FLIP | Y_FLIP + dbsprite 0, 0, 4, -4, $02, 0 | OAMF_XFLIP + dbsprite -1, 0, -4, 4, $00, 0 | OAMF_YFLIP + dbsprite 0, 0, -4, 4, $01, 0 | OAMF_YFLIP + dbsprite 0, 0, 4, 4, $00, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 UnownPuzzleCoordData: diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index cf442dfcb1f..1771c4f463a 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -585,7 +585,7 @@ ApplyPals: ApplyAttrmap: ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jr z, .UpdateVBank1 ldh a, [hBGMapMode] push af @@ -720,12 +720,12 @@ CGBCopyBattleObjectPals: ; unreferenced call CheckCGB ret z ld hl, BattleObjectPals - ld a, (1 << rOBPI_AUTO_INCREMENT) | $10 - ldh [rOBPI], a + ld a, OCPSF_AUTOINC | $10 + ldh [rOCPS], a ld c, 6 palettes .loop ld a, [hli] - ldh [rOBPD], a + ldh [rOCPD], a dec c jr nz, .loop ld hl, BattleObjectPals @@ -741,8 +741,8 @@ INCLUDE "gfx/battle_anims/battle_anims.pal" CGBCopyTwoPredefObjectPals: ; unreferenced call CheckCGB ret z - ld a, (1 << rOBPI_AUTO_INCREMENT) | $10 - ldh [rOBPI], a + ld a, OCPSF_AUTOINC | $10 + ldh [rOCPS], a ld a, PREDEFPAL_TRADE_TUBE call GetPredefPal call .PushPalette @@ -755,7 +755,7 @@ CGBCopyTwoPredefObjectPals: ; unreferenced ld c, 1 palettes .loop ld a, [hli] - ldh [rOBPD], a + ldh [rOCPD], a dec c jr nz, .loop ret @@ -801,9 +801,9 @@ _PushSGBPals: .loop push bc xor a - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a ld b, $10 .loop2 ld e, $8 @@ -815,18 +815,18 @@ _PushSGBPals: jr nz, .okay ld a, $20 .okay - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a rr d dec e jr nz, .loop3 dec b jr nz, .loop2 ld a, $20 - ldh [rJOYP], a + ldh [rP1], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a call SGBDelayCycles pop bc dec b @@ -845,7 +845,7 @@ InitSGBBorder: ld [wJoypadDisable], a xor a - ldh [rJOYP], a + ldh [rP1], a ldh [hSGB], a call PushSGBBorderPalsAndWait jr nc, .skip @@ -880,24 +880,24 @@ InitCGBPals:: call ByteFill ld a, BANK(vTiles0) ldh [rVBK], a - ld a, 1 << rBGPI_AUTO_INCREMENT - ldh [rBGPI], a + ld a, BCPSF_AUTOINC + ldh [rBCPS], a ld c, 4 * 8 .bgpals_loop ld a, LOW(PALRGB_WHITE) - ldh [rBGPD], a + ldh [rBCPD], a ld a, HIGH(PALRGB_WHITE) - ldh [rBGPD], a + ldh [rBCPD], a dec c jr nz, .bgpals_loop - ld a, 1 << rOBPI_AUTO_INCREMENT - ldh [rOBPI], a + ld a, OCPSF_AUTOINC + ldh [rOCPS], a ld c, 4 * 8 .obpals_loop ld a, LOW(PALRGB_WHITE) - ldh [rOBPD], a + ldh [rOCPD], a ld a, HIGH(PALRGB_WHITE) - ldh [rOBPD], a + ldh [rOCPD], a dec c jr nz, .obpals_loop ldh a, [rSVBK] @@ -954,7 +954,7 @@ _InitSGBBorderPals: UpdateSGBBorder: ; unreferenced di xor a - ldh [rJOYP], a + ldh [rP1], a ld hl, MaskEnFreezePacket call _PushSGBPals call PushSGBBorder @@ -979,8 +979,8 @@ PushSGBBorder: ret SGB_ClearVRAM: - ld hl, VRAM_Begin - ld bc, VRAM_End - VRAM_Begin + ld hl, _VRAM + ld bc, _SRAM - _VRAM xor a call ByteFill ret @@ -989,35 +989,35 @@ PushSGBBorderPalsAndWait: ld hl, MltReq2Packet call _PushSGBPals call SGBDelayCycles - ldh a, [rJOYP] + ldh a, [rP1] and $3 cp $3 jr nz, .carry ld a, $20 - ldh [rJOYP], a - ldh a, [rJOYP] - ldh a, [rJOYP] + ldh [rP1], a + ldh a, [rP1] + ldh a, [rP1] call SGBDelayCycles call SGBDelayCycles ld a, $30 - ldh [rJOYP], a + ldh [rP1], a call SGBDelayCycles call SGBDelayCycles ld a, $10 - ldh [rJOYP], a + ldh [rP1], a rept 6 - ldh a, [rJOYP] + ldh a, [rP1] endr call SGBDelayCycles call SGBDelayCycles ld a, $30 - ldh [rJOYP], a - ldh a, [rJOYP] - ldh a, [rJOYP] - ldh a, [rJOYP] + ldh [rP1], a + ldh a, [rP1] + ldh a, [rP1] + ldh a, [rP1] call SGBDelayCycles call SGBDelayCycles - ldh a, [rJOYP] + ldh a, [rP1] and $3 cp $3 jr nz, .carry @@ -1045,7 +1045,7 @@ SGBBorder_PushBGPals: ld bc, $100 tiles call CopyData call DrawDefaultTiles - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ld hl, PalTrnPacket call _PushSGBPals @@ -1079,7 +1079,7 @@ SGBBorder_MorePalPushing: ld bc, 16 palettes call CopyData call DrawDefaultTiles - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ld hl, PctTrnPacket call _PushSGBPals @@ -1103,7 +1103,7 @@ SGBBorder_YetMorePalPushing: dec b jr nz, .loop call DrawDefaultTiles - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ld hl, ChrTrnPacket call _PushSGBPals diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm index 2849659100e..f57b055e3e0 100644 --- a/engine/gfx/load_font.asm +++ b/engine/gfx/load_font.asm @@ -20,7 +20,7 @@ _LoadStandardFont:: ld hl, vTiles1 lb bc, BANK(Font), 128 ; "A" to "9" ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jp z, Copy1bpp ld de, Font diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index b3c78162558..0802a4408bd 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -317,7 +317,7 @@ AddOrSubtractY: push hl ld a, [hl] ld hl, wCurSpriteOAMFlags - bit OAM_Y_FLIP, [hl] + bit OAMB_YFLIP, [hl] jr z, .ok ; -8 - a add 8 @@ -332,7 +332,7 @@ AddOrSubtractX: push hl ld a, [hl] ld hl, wCurSpriteOAMFlags - bit OAM_X_FLIP, [hl] + bit OAMB_XFLIP, [hl] jr z, .ok ; -8 - a add 8 @@ -348,10 +348,10 @@ GetSpriteOAMAttr: ld b, a ld a, [hl] xor b - and PRIORITY | Y_FLIP | X_FLIP + and OAMF_PRI | OAMF_YFLIP | OAMF_XFLIP ld b, a ld a, [hl] - and ~(PRIORITY | Y_FLIP | X_FLIP) + and ~(OAMF_PRI | OAMF_YFLIP | OAMF_XFLIP) or b ret @@ -436,7 +436,7 @@ GetSpriteAnimFrame: push af ld a, [hl] push hl - and ~(Y_FLIP << 1 | X_FLIP << 1) + and ~(OAMF_YFLIP << 1 | OAMF_XFLIP << 1) ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET add hl, bc add [hl] @@ -446,7 +446,7 @@ GetSpriteAnimFrame: pop hl .okay ld a, [hl] - and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "frame" macro + and OAMF_YFLIP << 1 | OAMF_XFLIP << 1 ; The << 1 is compensated in the "frame" macro srl a ld [wCurSpriteOAMFlags], a pop af diff --git a/engine/link/link.asm b/engine/link/link.asm index 9998fb63ff1..7217a6a60fe 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -51,17 +51,17 @@ Gen2ToGen1LinkComms: call DelayFrames xor a ldh [hSerialSend], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, 0 | SCF_SOURCE ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a call DelayFrame xor a ldh [hSerialSend], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, 0 | SCF_SOURCE ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a .player_1 @@ -77,7 +77,7 @@ endc call DelayFrames xor a ldh [rIF], a - ld a, 1 << SERIAL + ld a, IEF_SERIAL ldh [rIE], a ld hl, wLinkBattleRNPreamble @@ -104,7 +104,7 @@ endc xor a ldh [rIF], a - ld a, (1 << JOYPAD) | (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) + ld a, IEF_HILO | IEF_SERIAL | IEF_TIMER | IEF_VBLANK ldh [rIE], a call Link_CopyRandomNumbers @@ -217,17 +217,17 @@ Gen2ToGen2LinkComms: call DelayFrames xor a ldh [hSerialSend], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a call DelayFrame xor a ldh [hSerialSend], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a .player_1 @@ -243,7 +243,7 @@ endc call DelayFrames xor a ldh [rIF], a - ld a, 1 << SERIAL + ld a, IEF_SERIAL ldh [rIE], a ld hl, wLinkBattleRNPreamble @@ -280,7 +280,7 @@ endc .not_trading xor a ldh [rIF], a - ld a, (1 << JOYPAD) | (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) + ld a, IEF_HILO | IEF_SERIAL | IEF_TIMER | IEF_VBLANK ldh [rIE], a ld de, MUSIC_NONE call PlayMusic @@ -492,7 +492,7 @@ endc xor a ldh [rIF], a ldh a, [rIE] - set LCD_STAT, a + set IEB_STAT, a ldh [rIE], a pop af ldh [rIF], a @@ -1623,9 +1623,9 @@ ExitLinkCommunications: xor a ldh [rSB], a ldh [hSerialSend], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a vc_hook ExitLinkCommunications_ret ret @@ -2208,18 +2208,18 @@ WaitForOtherPlayerToExit: xor a ldh [rSB], a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a ld c, 3 call DelayFrames xor a ldh [rSB], a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a ld c, 3 call DelayFrames @@ -2235,7 +2235,7 @@ WaitForOtherPlayerToExit: push af xor a ldh [rIF], a - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a pop af ldh [rIF], a @@ -2265,9 +2265,9 @@ SetBitsForTimeCapsuleRequest: ldh [rSB], a xor a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a xor a ; LINK_TIMECAPSULE - 1 ld [wPlayerLinkAction], a @@ -2282,9 +2282,9 @@ WaitForLinkedFriend: ldh [rSB], a xor a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a call DelayFrame call DelayFrame @@ -2307,9 +2307,9 @@ WaitForLinkedFriend: ldh [rSB], a xor a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ; This vc_hook causes the Virtual Console to set [hSerialConnectionStatus] to ; USING_INTERNAL_CLOCK, which allows the player to proceed past the link ; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at @@ -2332,9 +2332,9 @@ WaitForLinkedFriend: .not_done ld a, USING_EXTERNAL_CLOCK ldh [rSB], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a call DelayFrame jr .loop diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 0b7b72d9c1c..5e1319e27eb 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -157,7 +157,7 @@ endc .PrintTextAndExit: call PrintText - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ret @@ -320,32 +320,32 @@ endc ; Delay frame .wait_frame ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y jr c, .wait_frame ld c, LOW(rRP) - ld a, rRP_ENABLE_READ_MASK + ld a, RPF_ENREAD ldh [c], a ld b, 60 * 4 ; 4 seconds .continue push bc call MysteryGift_UpdateJoypad - ld b, 1 << rRP_RECEIVING + ld b, 1 << RPF_WRITE_HI ld c, LOW(rRP) .in_vblank ldh a, [c] and b ld b, a ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y jr nc, .in_vblank .wait_vblank ldh a, [c] and b ld b, a ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y jr c, .wait_vblank ld a, b pop bc @@ -539,7 +539,7 @@ EndOrContinueMysteryGiftIRCommunication: xor a ldh [rIF], a ldh a, [rIE] - or 1 << VBLANK + or IEF_VBLANK ldh [rIE], a ei call DelayFrame @@ -696,7 +696,7 @@ EndNameCardIRCommunication: xor a ldh [rIF], a ldh a, [rIE] - or 1 << VBLANK + or IEF_VBLANK ldh [rIE], a ei call DelayFrame @@ -737,7 +737,7 @@ TryReceivingIRDataBlock: InitializeIRCommunicationInterrupts: call StartFastIRTimer - ld a, 1 << TIMER + ld a, IEF_TIMER ldh [rIE], a xor a ldh [rIF], a @@ -759,9 +759,9 @@ StartFastIRTimer: ld a, -2 ldh [rTMA], a ldh [rTIMA], a - ld a, rTAC_65536_HZ + ld a, TACF_65KHZ ldh [rTAC], a - or 1 << rTAC_ON + or TACF_START ldh [rTAC], a ret @@ -771,14 +771,14 @@ StartSlowIRTimer: ldh [rTAC], a ldh [rTMA], a ldh [rTIMA], a - ld a, rTAC_65536_HZ + ld a, TACF_65KHZ ldh [rTAC], a - or 1 << rTAC_ON + or TACF_START ldh [rTAC], a ret BeginIRCommunication: - ld a, rRP_ENABLE_READ_MASK + ld a, RPF_ENREAD call ToggleIRCommunication ld a, IR_RECEIVER ldh [hMGRole], a @@ -787,7 +787,7 @@ BeginIRCommunication: EndIRCommunication: xor a call ToggleIRCommunication - ld a, rTAC_65536_HZ + ld a, TACF_65KHZ ldh [rTAC], a ret @@ -800,7 +800,7 @@ ReceiveInfraredLEDOn: ldh [rIF], a halt ldh a, [c] - bit rRP_RECEIVING, a + bit RPF_WRITE_HI, a jr z, .recv_loop or a ret @@ -814,14 +814,14 @@ ReceiveInfraredLEDOff: ldh [rIF], a halt ldh a, [c] - bit rRP_RECEIVING, a + bit RPF_WRITE_HI, a jr nz, .no_recv_loop or a ret SendInfraredLEDOn: ; Holds the IR LED on for d-1 interrupts. - ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON) + ld a, RPF_ENREAD | RPF_WRITE_HI ldh [c], a .wait dec d @@ -833,7 +833,7 @@ SendInfraredLEDOn: SendInfraredLEDOff: ; Holds the IR LED off for d-1 interrupts. - ld a, rRP_ENABLE_READ_MASK + ld a, RPF_ENREAD | RPF_WRITE_LO ldh [c], a .wait dec d @@ -851,7 +851,7 @@ InitializeIRCommunicationRoles: ldh [hMGRole], a .loop call MysteryGift_UpdateJoypad - ld b, 1 << rRP_RECEIVING + ld b, RPF_DATAIN ld c, LOW(rRP) ; Check if we've pressed the B button to cancel ldh a, [hMGJoypadReleased] @@ -1037,7 +1037,7 @@ SendIRDataMessage: xor a ldh [rIF], a halt - ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON) + ld a, RPF_ENREAD | RPF_WRITE_HI ldh [rRP], a ; Turn the LED off for longer if the bit is 1 ld d, 1 @@ -1050,7 +1050,7 @@ SendIRDataMessage: ldh a, [rTIMA] cp -8 jr c, .wait - ld a, rRP_ENABLE_READ_MASK + ld a, RPF_ENREAD ldh [rRP], a dec d jr z, .no_halt @@ -1186,7 +1186,7 @@ ReceiveIRDataMessage: inc d jr z, .recv_done ldh a, [c] - bit rRP_RECEIVING, a + bit RPB_DATAIN, a jr z, .recv_loop ld d, 0 .recv_done @@ -1194,7 +1194,7 @@ ReceiveIRDataMessage: inc d jr z, .send_done ldh a, [c] - bit rRP_RECEIVING, a + bit RPB_DATAIN, a jr nz, .send_loop .send_done ldh a, [hMGPrevTIMA] @@ -1253,10 +1253,10 @@ MysteryGift_UpdateJoypad: ; We can only get four inputs at a time. ; We take d-pad first for no particular reason. ld a, R_DPAD - ldh [rJOYP], a + ldh [rP1], a ; Read twice to give the request time to take. - ldh a, [rJOYP] - ldh a, [rJOYP] + ldh a, [rP1] + ldh a, [rP1] ; The Joypad register output is in the lo nybble (inversed). ; We make the hi nybble of our new container d-pad input. @@ -1270,10 +1270,10 @@ MysteryGift_UpdateJoypad: ; Buttons make 8 total inputs (A, B, Select, Start). ; We can fit this into one byte. ld a, R_BUTTONS - ldh [rJOYP], a + ldh [rP1], a ; Wait for input to stabilize. rept 6 - ldh a, [rJOYP] + ldh a, [rP1] endr ; Buttons take the lo nybble. cpl @@ -1291,7 +1291,7 @@ endr ldh [hMGJoypadPressed], a ld a, $30 ; Reset the joypad register since we're done with it. - ldh [rJOYP], a + ldh [rP1], a ret CheckAndSetMysteryGiftDecorationAlreadyReceived: @@ -1681,7 +1681,7 @@ endr .PrintTextAndExit: call PrintText - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a ret diff --git a/engine/menus/empty_sram.asm b/engine/menus/empty_sram.asm index 264f08136c9..44995d89d77 100644 --- a/engine/menus/empty_sram.asm +++ b/engine/menus/empty_sram.asm @@ -11,8 +11,8 @@ EmptyAllSRAMBanks: .EmptyBank: call OpenSRAM - ld hl, SRAM_Begin - ld bc, SRAM_End - SRAM_Begin + ld hl, _SRAM + ld bc, _RAM - _SRAM xor a call ByteFill call CloseSRAM diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index ac924c33b7b..0c88d979bfc 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -106,8 +106,8 @@ _ResetWRAM: xor a call ByteFill - ld hl, WRAM1_Begin - ld bc, wGameData - WRAM1_Begin + ld hl, _RAMBANK + ld bc, wGameData - _RAMBANK xor a call ByteFill @@ -995,7 +995,7 @@ StartTitleScreen: ldh [rSVBK], a ld hl, rLCDC - res rLCDC_SPRITE_SIZE, [hl] ; 8x8 + res LCDCB_OBJ16, [hl] ; 8x8 call ClearScreen call WaitBGMap2 xor a diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index ffdcbcf9fb9..c615d77c5d3 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -50,7 +50,7 @@ NamingScreen: call DisableLCD call LoadNamingScreenGFX call NamingScreen_InitText - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a call .GetNamingScreenSetup call WaitBGMap @@ -939,7 +939,7 @@ _ComposeMailMessage: add hl, bc ld [hl], $0 call .InitCharset - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a call .initwNamingScreenMaxNameLength ld b, SCGB_DIPLOMA diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 12f123cddff..dd299f8790b 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -553,10 +553,10 @@ TrainerCard_Page2_3_OAMUpdate: db -1 .facing2 - dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP - dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP - dbsprite 0, 1, 0, 0, $03, 0 | X_FLIP - dbsprite 1, 1, 0, 0, $02, 0 | X_FLIP + dbsprite 0, 0, 0, 0, $01, 0 | OAMF_XFLIP + dbsprite 1, 0, 0, 0, $00, 0 | OAMF_XFLIP + dbsprite 0, 1, 0, 0, $03, 0 | OAMF_XFLIP + dbsprite 1, 1, 0, 0, $02, 0 | OAMF_XFLIP db -1 TrainerCard_JohtoBadgesOAM: diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 91ac1f8c29e..64cbbdd0e61 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -81,7 +81,7 @@ _TitleScreen: ; Suicune gfx hlbgcoord 0, 12 ld bc, 6 * BG_MAP_WIDTH ; the rest of the screen - ld a, 0 | VRAM_BANK_1 + ld a, 0 | OAMF_BANK1 call ByteFill ; Back to VRAM bank 0 @@ -186,7 +186,7 @@ _TitleScreen: ; Set sprite size to 8x16 ldh a, [rLCDC] - set rLCDC_SPRITE_SIZE, a + set LCDCB_OBJ16, a ldh [rLCDC], a ld a, +112 @@ -331,7 +331,7 @@ InitializeBackground: ld [hli], a ; tile id inc e inc e - ld a, 0 | PRIORITY + ld a, 0 | OAMF_PRI ld [hli], a ; attributes dec c jr nz, .loop2 diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm index 5f92954424b..2e748cbd4a6 100644 --- a/engine/movie/trade_animation.asm +++ b/engine/movie/trade_animation.asm @@ -168,7 +168,7 @@ RunTradeAnimScript: ld a, $1 ldh [rVBK], a ld hl, vTiles0 - ld bc, VRAM_End - VRAM_Begin + ld bc, _SRAM - _VRAM xor a call ByteFill ld a, $0 @@ -176,7 +176,7 @@ RunTradeAnimScript: .NotCGB: hlbgcoord 0, 0 - ld bc, VRAM_End - vBGMap0 + ld bc, _SRAM - vBGMap0 ld a, " " call ByteFill ld hl, TradeGameBoyLZ @@ -470,7 +470,7 @@ TradeAnim_TubeToPlayer8: call DisableLCD callfar ClearSpriteAnims hlbgcoord 0, 0 - ld bc, VRAM_End - vBGMap0 + ld bc, _SRAM - vBGMap0 ld a, " " call ByteFill xor a diff --git a/engine/movie/unused_title.asm b/engine/movie/unused_title.asm index 5f9d6bdab55..c5f15a73320 100644 --- a/engine/movie/unused_title.asm +++ b/engine/movie/unused_title.asm @@ -54,8 +54,8 @@ UnusedTitleScreen: ; unreferenced call EnableLCD ldh a, [rLCDC] - set rLCDC_SPRITES_ENABLE, a - set rLCDC_SPRITE_SIZE, a + set LCDCB_OBJON, a + set LCDCB_OBJ16, a ldh [rLCDC], a call DelayFrame diff --git a/engine/overworld/init_map.asm b/engine/overworld/init_map.asm index 68cb3b2659a..c1352082f7f 100644 --- a/engine/overworld/init_map.asm +++ b/engine/overworld/init_map.asm @@ -91,9 +91,9 @@ HDMATransfer_FillBGMap0WithBlack: ldh [rHDMA1], a ld a, LOW(wDecompressScratch) ldh [rHDMA2], a - ld a, HIGH(vBGMap0 - VRAM_Begin) + ld a, HIGH(vBGMap0 - _VRAM) ldh [rHDMA3], a - ld a, LOW(vBGMap0 - VRAM_Begin) + ld a, LOW(vBGMap0 - _VRAM) ldh [rHDMA4], a ld a, $3f ldh [hDMATransfer], a diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index deec4b3d1e2..7a207b11486 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -2524,13 +2524,13 @@ _SetPlayerPalette: ld [hl], a ld a, d swap a - and PALETTE_MASK + and OAMF_PALMASK ld d, a ld bc, wPlayerStruct ld hl, OBJECT_PALETTE add hl, bc ld a, [hl] - and ~PALETTE_MASK + and ~OAMF_PALMASK or d ld [hl], a ret @@ -2900,30 +2900,30 @@ InitSprites: xor a bit 7, [hl] jr nz, .not_vram1 - or VRAM_BANK_1 + or OAMF_BANK1 .not_vram1 ld hl, OBJECT_FLAGS2 add hl, bc ld e, [hl] bit OBJ_FLAGS2_7, e jr z, .not_priority - or PRIORITY + or OAMF_PRI .not_priority bit USE_OBP1_F, e jr z, .not_obp_num - or OBP_NUM + or OAMF_PAL1 .not_obp_num ld hl, OBJECT_PALETTE add hl, bc ld d, a ld a, [hl] - and PALETTE_MASK + and OAMF_PALMASK or d ld d, a xor a bit OVERHEAD_F, e jr z, .not_overhead - or PRIORITY + or OAMF_PRI .not_overhead ldh [hCurSpriteOAMFlags], a ld hl, OBJECT_SPRITE_X @@ -2999,7 +2999,7 @@ InitSprites: ldh a, [hCurSpriteOAMFlags] or e .nope2 - and OBP_NUM | X_FLIP | Y_FLIP | PRIORITY + and OAMF_PAL1 | OAMF_XFLIP | OAMF_YFLIP | OAMF_PRI or d ld [bc], a ; attributes inc c diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 2c374ff8737..6b14b7dc8f7 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -68,7 +68,7 @@ WillObjectBumpIntoWater: ld e, [hl] ld hl, OBJECT_PALETTE add hl, bc - bit OAM_PRIORITY, [hl] + bit OAMB_PRI, [hl] jp nz, WillObjectRemainOnWater ld hl, OBJECT_NEXT_TILE add hl, bc diff --git a/engine/overworld/player_object.asm b/engine/overworld/player_object.asm index 5e701eabcaa..21e90427a11 100644 --- a/engine/overworld/player_object.asm +++ b/engine/overworld/player_object.asm @@ -194,7 +194,7 @@ CopyMapObjectToObjectStruct: and $f0 jr z, .skip_color_override swap a - and PALETTE_MASK + and OAMF_PALMASK ld [wTempObjectCopyPalette], a .skip_color_override diff --git a/engine/phone/phonering_copytilemapatonce.asm b/engine/phone/phonering_copytilemapatonce.asm index 029c2958cf4..33731033ffb 100644 --- a/engine/phone/phonering_copytilemapatonce.asm +++ b/engine/phone/phonering_copytilemapatonce.asm @@ -7,7 +7,7 @@ PhoneRing_CopyTilemapAtOnce: jp z, WaitBGMap ; The following is a modified version of _CopyTilemapAtOnce -; that waits for [rLY] to be LY_VBLANK - 1 instead of $80 - 1. +; that waits for [rLY] to be SCRN_Y - 1 (143) instead of $80 - 1. ldh a, [hBGMapMode] push af xor a @@ -20,7 +20,7 @@ PhoneRing_CopyTilemapAtOnce: .wait ldh a, [rLY] - cp LY_VBLANK - 1 + cp SCRN_Y - 1 ; 143 jr c, .wait di @@ -35,7 +35,7 @@ PhoneRing_CopyTilemapAtOnce: .wait2 ldh a, [rLY] - cp LY_VBLANK - 1 + cp SCRN_Y - 1 ; 143 jr c, .wait2 ei diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 580de100c93..41c757d5ecb 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -1995,24 +1995,24 @@ Pokedex_PutOldModeCursorOAM: dbsprite 11, 2, -1, 0, $32, 7 dbsprite 12, 2, -1, 0, $32, 7 dbsprite 13, 2, -1, 0, $33, 7 - dbsprite 16, 2, -2, 0, $33, 7 | X_FLIP - dbsprite 17, 2, -2, 0, $32, 7 | X_FLIP - dbsprite 18, 2, -2, 0, $32, 7 | X_FLIP - dbsprite 19, 2, -2, 0, $32, 7 | X_FLIP - dbsprite 20, 2, -2, 0, $31, 7 | X_FLIP - dbsprite 20, 3, -2, 0, $30, 7 | X_FLIP - dbsprite 9, 4, -1, 0, $30, 7 | Y_FLIP - dbsprite 9, 5, -1, 0, $31, 7 | Y_FLIP - dbsprite 10, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 11, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 12, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 13, 5, -1, 0, $33, 7 | Y_FLIP - dbsprite 16, 5, -2, 0, $33, 7 | X_FLIP | Y_FLIP - dbsprite 17, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 18, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 19, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 20, 5, -2, 0, $31, 7 | X_FLIP | Y_FLIP - dbsprite 20, 4, -2, 0, $30, 7 | X_FLIP | Y_FLIP + dbsprite 16, 2, -2, 0, $33, 7 | OAMF_XFLIP + dbsprite 17, 2, -2, 0, $32, 7 | OAMF_XFLIP + dbsprite 18, 2, -2, 0, $32, 7 | OAMF_XFLIP + dbsprite 19, 2, -2, 0, $32, 7 | OAMF_XFLIP + dbsprite 20, 2, -2, 0, $31, 7 | OAMF_XFLIP + dbsprite 20, 3, -2, 0, $30, 7 | OAMF_XFLIP + dbsprite 9, 4, -1, 0, $30, 7 | OAMF_YFLIP + dbsprite 9, 5, -1, 0, $31, 7 | OAMF_YFLIP + dbsprite 10, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 11, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 12, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 13, 5, -1, 0, $33, 7 | OAMF_YFLIP + dbsprite 16, 5, -2, 0, $33, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 17, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 18, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 19, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 5, -2, 0, $31, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 4, -2, 0, $30, 7 | OAMF_XFLIP | OAMF_YFLIP db -1 .CursorAtTopOAM: @@ -2024,24 +2024,24 @@ Pokedex_PutOldModeCursorOAM: dbsprite 11, 2, -1, 0, $35, 7 dbsprite 12, 2, -1, 0, $35, 7 dbsprite 13, 2, -1, 0, $36, 7 - dbsprite 16, 2, -2, 0, $36, 7 | X_FLIP - dbsprite 17, 2, -2, 0, $35, 7 | X_FLIP - dbsprite 18, 2, -2, 0, $35, 7 | X_FLIP - dbsprite 19, 2, -2, 0, $35, 7 | X_FLIP - dbsprite 20, 2, -2, 0, $34, 7 | X_FLIP - dbsprite 20, 3, -2, 0, $30, 7 | X_FLIP - dbsprite 9, 4, -1, 0, $30, 7 | Y_FLIP - dbsprite 9, 5, -1, 0, $31, 7 | Y_FLIP - dbsprite 10, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 11, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 12, 5, -1, 0, $32, 7 | Y_FLIP - dbsprite 13, 5, -1, 0, $33, 7 | Y_FLIP - dbsprite 16, 5, -2, 0, $33, 7 | X_FLIP | Y_FLIP - dbsprite 17, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 18, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 19, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP - dbsprite 20, 5, -2, 0, $31, 7 | X_FLIP | Y_FLIP - dbsprite 20, 4, -2, 0, $30, 7 | X_FLIP | Y_FLIP + dbsprite 16, 2, -2, 0, $36, 7 | OAMF_XFLIP + dbsprite 17, 2, -2, 0, $35, 7 | OAMF_XFLIP + dbsprite 18, 2, -2, 0, $35, 7 | OAMF_XFLIP + dbsprite 19, 2, -2, 0, $35, 7 | OAMF_XFLIP + dbsprite 20, 2, -2, 0, $34, 7 | OAMF_XFLIP + dbsprite 20, 3, -2, 0, $30, 7 | OAMF_XFLIP + dbsprite 9, 4, -1, 0, $30, 7 | OAMF_YFLIP + dbsprite 9, 5, -1, 0, $31, 7 | OAMF_YFLIP + dbsprite 10, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 11, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 12, 5, -1, 0, $32, 7 | OAMF_YFLIP + dbsprite 13, 5, -1, 0, $33, 7 | OAMF_YFLIP + dbsprite 16, 5, -2, 0, $33, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 17, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 18, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 19, 5, -2, 0, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 5, -2, 0, $31, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 4, -2, 0, $30, 7 | OAMF_XFLIP | OAMF_YFLIP db -1 Pokedex_PutNewModeABCModeCursorOAM: @@ -2055,21 +2055,21 @@ Pokedex_PutNewModeABCModeCursorOAM: dbsprite 10, 2, -1, 3, $32, 7 dbsprite 11, 2, -1, 3, $32, 7 dbsprite 12, 2, -1, 3, $33, 7 - dbsprite 16, 2, 0, 3, $33, 7 | X_FLIP - dbsprite 17, 2, 0, 3, $32, 7 | X_FLIP - dbsprite 18, 2, 0, 3, $32, 7 | X_FLIP - dbsprite 19, 2, 0, 3, $31, 7 | X_FLIP - dbsprite 19, 3, 0, 3, $30, 7 | X_FLIP - dbsprite 9, 4, -1, 3, $30, 7 | Y_FLIP - dbsprite 9, 5, -1, 3, $31, 7 | Y_FLIP - dbsprite 10, 5, -1, 3, $32, 7 | Y_FLIP - dbsprite 11, 5, -1, 3, $32, 7 | Y_FLIP - dbsprite 12, 5, -1, 3, $33, 7 | Y_FLIP - dbsprite 16, 5, 0, 3, $33, 7 | X_FLIP | Y_FLIP - dbsprite 17, 5, 0, 3, $32, 7 | X_FLIP | Y_FLIP - dbsprite 18, 5, 0, 3, $32, 7 | X_FLIP | Y_FLIP - dbsprite 19, 5, 0, 3, $31, 7 | X_FLIP | Y_FLIP - dbsprite 19, 4, 0, 3, $30, 7 | X_FLIP | Y_FLIP + dbsprite 16, 2, 0, 3, $33, 7 | OAMF_XFLIP + dbsprite 17, 2, 0, 3, $32, 7 | OAMF_XFLIP + dbsprite 18, 2, 0, 3, $32, 7 | OAMF_XFLIP + dbsprite 19, 2, 0, 3, $31, 7 | OAMF_XFLIP + dbsprite 19, 3, 0, 3, $30, 7 | OAMF_XFLIP + dbsprite 9, 4, -1, 3, $30, 7 | OAMF_YFLIP + dbsprite 9, 5, -1, 3, $31, 7 | OAMF_YFLIP + dbsprite 10, 5, -1, 3, $32, 7 | OAMF_YFLIP + dbsprite 11, 5, -1, 3, $32, 7 | OAMF_YFLIP + dbsprite 12, 5, -1, 3, $33, 7 | OAMF_YFLIP + dbsprite 16, 5, 0, 3, $33, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 17, 5, 0, 3, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 18, 5, 0, 3, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 19, 5, 0, 3, $31, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 19, 4, 0, 3, $30, 7 | OAMF_XFLIP | OAMF_YFLIP db -1 Pokedex_UpdateSearchResultsCursorOAM: @@ -2087,24 +2087,24 @@ Pokedex_UpdateSearchResultsCursorOAM: dbsprite 11, 2, -1, 3, $32, 7 dbsprite 12, 2, -1, 3, $32, 7 dbsprite 13, 2, -1, 3, $33, 7 - dbsprite 16, 2, -2, 3, $33, 7 | X_FLIP - dbsprite 17, 2, -2, 3, $32, 7 | X_FLIP - dbsprite 18, 2, -2, 3, $32, 7 | X_FLIP - dbsprite 19, 2, -2, 3, $32, 7 | X_FLIP - dbsprite 20, 2, -2, 3, $31, 7 | X_FLIP - dbsprite 20, 3, -2, 3, $30, 7 | X_FLIP - dbsprite 9, 4, -1, 3, $30, 7 | Y_FLIP - dbsprite 9, 5, -1, 3, $31, 7 | Y_FLIP - dbsprite 10, 5, -1, 3, $32, 7 | Y_FLIP - dbsprite 11, 5, -1, 3, $32, 7 | Y_FLIP - dbsprite 12, 5, -1, 3, $32, 7 | Y_FLIP - dbsprite 13, 5, -1, 3, $33, 7 | Y_FLIP - dbsprite 16, 5, -2, 3, $33, 7 | X_FLIP | Y_FLIP - dbsprite 17, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP - dbsprite 18, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP - dbsprite 19, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP - dbsprite 20, 5, -2, 3, $31, 7 | X_FLIP | Y_FLIP - dbsprite 20, 4, -2, 3, $30, 7 | X_FLIP | Y_FLIP + dbsprite 16, 2, -2, 3, $33, 7 | OAMF_XFLIP + dbsprite 17, 2, -2, 3, $32, 7 | OAMF_XFLIP + dbsprite 18, 2, -2, 3, $32, 7 | OAMF_XFLIP + dbsprite 19, 2, -2, 3, $32, 7 | OAMF_XFLIP + dbsprite 20, 2, -2, 3, $31, 7 | OAMF_XFLIP + dbsprite 20, 3, -2, 3, $30, 7 | OAMF_XFLIP + dbsprite 9, 4, -1, 3, $30, 7 | OAMF_YFLIP + dbsprite 9, 5, -1, 3, $31, 7 | OAMF_YFLIP + dbsprite 10, 5, -1, 3, $32, 7 | OAMF_YFLIP + dbsprite 11, 5, -1, 3, $32, 7 | OAMF_YFLIP + dbsprite 12, 5, -1, 3, $32, 7 | OAMF_YFLIP + dbsprite 13, 5, -1, 3, $33, 7 | OAMF_YFLIP + dbsprite 16, 5, -2, 3, $33, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 17, 5, -2, 3, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 18, 5, -2, 3, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 19, 5, -2, 3, $32, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 5, -2, 3, $31, 7 | OAMF_XFLIP | OAMF_YFLIP + dbsprite 20, 4, -2, 3, $30, 7 | OAMF_XFLIP | OAMF_YFLIP db -1 Pokedex_LoadCursorOAM: diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index c1c02753e25..7e803ac040b 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -85,7 +85,7 @@ PokeGear: call InitPokegearModeIndicatorArrow ld a, 8 call SkipMusic - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a call TownMap_InitCursorAndPlayerIconPositions xor a @@ -1777,7 +1777,7 @@ _TownMap: farcall ClearSpriteAnims ld a, 8 call SkipMusic - ld a, LCDC_DEFAULT + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ldh [rLCDC], a call TownMap_GetCurrentLandmark ld [wTownMapPlayerIconLandmark], a @@ -2673,7 +2673,7 @@ TownMapPals: adc 0 ld h, a ld a, [hl] - and PALETTE_MASK + and OAMF_PALMASK jr .update .odd @@ -2685,7 +2685,7 @@ TownMapPals: ld h, a ld a, [hl] swap a - and PALETTE_MASK + and OAMF_PALMASK jr .update .pal0 diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index cf7b9a17c5c..e24eb0fb460 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -1490,20 +1490,20 @@ endr dbsprite 17, 4, 0, 6, $00, 0 dbsprite 18, 4, 0, 6, $00, 0 dbsprite 18, 4, 7, 6, $00, 0 - dbsprite 10, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 11, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 12, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 13, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 14, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 15, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 16, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 17, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 18, 7, 0, 1, $00, 0 | Y_FLIP - dbsprite 18, 7, 7, 1, $00, 0 | Y_FLIP + dbsprite 10, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 11, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 12, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 13, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 14, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 15, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 16, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 17, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 18, 7, 0, 1, $00, 0 | OAMF_YFLIP + dbsprite 18, 7, 7, 1, $00, 0 | OAMF_YFLIP dbsprite 9, 5, 6, 6, $01, 0 - dbsprite 9, 6, 6, 1, $01, 0 | Y_FLIP - dbsprite 19, 5, 1, 6, $01, 0 | X_FLIP - dbsprite 19, 6, 1, 1, $01, 0 | X_FLIP | Y_FLIP + dbsprite 9, 6, 6, 1, $01, 0 | OAMF_YFLIP + dbsprite 19, 5, 1, 6, $01, 0 | OAMF_XFLIP + dbsprite 19, 6, 1, 1, $01, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 BillsPC_UpdateInsertCursor: @@ -1529,14 +1529,14 @@ endr .OAM: dbsprite 10, 4, 0, 7, $06, 0 - dbsprite 11, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 12, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 13, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 14, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 15, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 16, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 17, 5, 0, 3, $00, 0 | Y_FLIP - dbsprite 18, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 11, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 12, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 13, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 14, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 15, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 16, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 17, 5, 0, 3, $00, 0 | OAMF_YFLIP + dbsprite 18, 5, 0, 3, $00, 0 | OAMF_YFLIP dbsprite 19, 4, 0, 7, $07, 0 db -1 diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index 8ccdce86630..3c56c17761b 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -56,7 +56,7 @@ PrintDexEntry: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a call Printer_StartTransmission @@ -140,7 +140,7 @@ PrintPCBox: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a ld hl, hVBlank @@ -221,7 +221,7 @@ PrintUnownStamp: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a ld hl, hVBlank @@ -291,7 +291,7 @@ PrintMail: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a xor a @@ -333,7 +333,7 @@ PrintPartymon: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a xor a @@ -397,7 +397,7 @@ _PrintDiploma: push af xor a ldh [rIF], a - ld a, (1 << SERIAL) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_VBLANK ldh [rIE], a ld hl, hVBlank @@ -467,9 +467,9 @@ CheckCancelPrint: ld [wPrinterOpcode], a ld a, $88 ldh [rSB], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a .loop2 ld a, [wPrinterOpcode] diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm index f3c0709b935..323c8349eb6 100644 --- a/engine/printer/printer_serial.asm +++ b/engine/printer/printer_serial.asm @@ -270,9 +270,9 @@ Printer_WaitHandshake: ld [wPrinterOpcode], a ld a, $88 ldh [rSB], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a ret @@ -613,9 +613,9 @@ Printer_Send0x08: Printer_SerialSend: ldh [rSB], a - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a ret diff --git a/engine/rtc/rtc.asm b/engine/rtc/rtc.asm index d4d7a1ef34f..2092f59761c 100644 --- a/engine/rtc/rtc.asm +++ b/engine/rtc/rtc.asm @@ -1,24 +1,24 @@ StopRTC: ; unreferenced - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a call LatchClock ld a, RTC_DH - ld [MBC3SRamBank], a - ld a, [MBC3RTC] + ld [rRAMB], a + ld a, [_SRAM] ; read the RTC register set 6, a ; halt - ld [MBC3RTC], a + ld [_SRAM], a ; write a to the RTC register call CloseSRAM ret StartRTC: - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ; MBC3SRamEnable call LatchClock ld a, RTC_DH - ld [MBC3SRamBank], a - ld a, [MBC3RTC] + ld [rRAMB], a + ld a, [_SRAM] ; read the RTC register res 6, a ; halt - ld [MBC3RTC], a + ld [_SRAM], a ; write a to the RTC register call CloseSRAM ret @@ -74,15 +74,15 @@ StageRTCTimeForSave: ret SaveRTC: - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a call LatchClock - ld hl, MBC3RTC + ld hl, _SRAM ; read the RTC register ld a, RTC_DH - ld [MBC3SRamBank], a + ld [rRAMB], a res 7, [hl] ld a, BANK(sRTCStatusFlags) - ld [MBC3SRamBank], a + ld [rRAMB], a xor a ld [sRTCStatusFlags], a call CloseSRAM diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm index ca2a86a7583..cea68a76060 100644 --- a/engine/tilesets/tileset_anims.asm +++ b/engine/tilesets/tileset_anims.asm @@ -922,8 +922,8 @@ AnimateWaterPalette: ret nz ; Ready for BGPD input - ld a, (1 << rBGPI_AUTO_INCREMENT) palette PAL_BG_WATER color 0 - ldh [rBGPI], a + ld a, BCPSF_AUTOINC palette PAL_BG_WATER color 0 + ldh [rBCPS], a ldh a, [rSVBK] push af @@ -937,30 +937,30 @@ AnimateWaterPalette: cp %100 jr z, .color2 -; Copy one color from hl to rBGPI via rBGPD +; Copy one color from hl to rBCPS via rBCPD ; color1 ld hl, wBGPals1 palette PAL_BG_WATER color 1 ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a jr .end .color0 ld hl, wBGPals1 palette PAL_BG_WATER color 0 ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a jr .end .color2 ld hl, wBGPals1 palette PAL_BG_WATER color 2 ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a .end pop af @@ -989,15 +989,15 @@ FlickeringCaveEntrancePalette: ldh [rSVBK], a ; Ready for BGPD input - ld a, (1 << rBGPI_AUTO_INCREMENT) palette PAL_BG_YELLOW color 0 - ldh [rBGPI], a + ld a, BCPSF_AUTOINC palette PAL_BG_YELLOW color 0 + ldh [rBCPS], a ; A cycle of 2 colors (0 2), updating every other vblank ldh a, [hVBlankCounter] and %10 jr nz, .color1 -; Copy one color from hl to rBGPI via rBGPD +; Copy one color from hl to rBCPS via rBCPD ; color0 ld hl, wBGPals1 palette PAL_BG_YELLOW color 0 @@ -1008,9 +1008,9 @@ FlickeringCaveEntrancePalette: .okay ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a ld a, [hli] - ldh [rBGPD], a + ldh [rBCPD], a pop af ldh [rSVBK], a diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm index 678eb1837e7..12f1f906fdc 100644 --- a/gfx/tileset_palette_maps.asm +++ b/gfx/tileset_palette_maps.asm @@ -1,7 +1,7 @@ MACRO tilepal ; used in gfx/tilesets/*_palette_map.asm ; vram bank, pals - DEF x = \1 << OAM_TILE_BANK + DEF x = \1 << OAMB_BANK1 rept (_NARG - 1) / 2 dn (x | PAL_BG_\3), (x | PAL_BG_\2) shift 2 diff --git a/home/audio.asm b/home/audio.asm index f55d395a599..710818dc27d 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -10,13 +10,13 @@ InitSound:: push af ld a, BANK(_InitSound) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a call _InitSound pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a pop af pop bc @@ -34,13 +34,13 @@ UpdateSound:: push af ld a, BANK(_UpdateSound) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a call _UpdateSound pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a pop af pop bc @@ -51,14 +51,14 @@ UpdateSound:: _LoadMusicByte:: ; [wCurMusicByte] = [a:de] ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ld a, [de] ld [wCurMusicByte], a ld a, BANK(LoadMusicByte) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ret PlayMusic:: @@ -73,7 +73,7 @@ PlayMusic:: push af ld a, BANK(_PlayMusic) ; aka BANK(_InitSound) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ld a, e and a @@ -88,7 +88,7 @@ PlayMusic:: .end pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a pop af pop bc pop de @@ -107,7 +107,7 @@ PlayMusic2:: push af ld a, BANK(_PlayMusic) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a push de ld de, MUSIC_NONE @@ -118,7 +118,7 @@ PlayMusic2:: pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a pop af pop bc @@ -140,7 +140,7 @@ PlayCry:: ; Cries are stuck in one bank. ld a, BANK(PokemonCries) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ld hl, PokemonCries rept MON_CRY_LENGTH @@ -163,13 +163,13 @@ endr ld a, BANK(_PlayCry) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a call _PlayCry pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a pop af pop bc @@ -200,7 +200,7 @@ PlaySFX:: push af ld a, BANK(_PlaySFX) ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ld a, e ld [wCurSFX], a @@ -208,7 +208,7 @@ PlaySFX:: pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a .done pop af diff --git a/home/battle.asm b/home/battle.asm index 21998983cbe..3c0193a7760 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -163,7 +163,7 @@ FarCopyRadioText:: ld d, a ld a, [hli] ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ld a, e ld l, a ld a, d @@ -173,7 +173,7 @@ FarCopyRadioText:: call CopyBytes pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ret MobileTextBorder:: diff --git a/home/double_speed.asm b/home/double_speed.asm index b3839e320b6..854ba3b5bb7 100644 --- a/home/double_speed.asm +++ b/home/double_speed.asm @@ -22,6 +22,6 @@ SwitchSpeed:: ldh [rIF], a ldh [rIE], a ld a, $30 - ldh [rJOYP], a + ldh [rP1], a stop ; rgbasm adds a nop after this instruction by default ret diff --git a/home/gfx.asm b/home/gfx.asm index 339f5c3d7bf..41dcaed7347 100644 --- a/home/gfx.asm +++ b/home/gfx.asm @@ -3,7 +3,7 @@ DEF MOBILE_TILES_PER_CYCLE EQU 6 Get2bppViaHDMA:: ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jp z, Copy2bpp homecall HDMATransfer2bpp @@ -12,7 +12,7 @@ Get2bppViaHDMA:: Get1bppViaHDMA:: ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jp z, Copy1bpp homecall HDMATransfer1bpp @@ -336,7 +336,7 @@ Request1bpp:: Get2bpp:: ; copy c 2bpp tiles from b:de to hl ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jp nz, Request2bpp ; fallthrough @@ -365,7 +365,7 @@ Copy2bpp: Get1bpp:: ; copy c 1bpp tiles from b:de to hl ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a jp nz, Request1bpp ; fallthrough diff --git a/home/header.asm b/home/header.asm index a450c072d95..6a81ab944c6 100644 --- a/home/header.asm +++ b/home/header.asm @@ -11,7 +11,7 @@ FarCall:: SECTION "rst10", ROM0[$0010] Bankswitch:: ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ret SECTION "rst18", ROM0[$0018] diff --git a/home/init.asm b/home/init.asm index 683f7f10e95..d0d0ceb7ecf 100644 --- a/home/init.asm +++ b/home/init.asm @@ -6,7 +6,7 @@ Reset:: call ClearPalettes xor a ldh [rIF], a - ld a, 1 << VBLANK + ld a, IEF_VBLANK ldh [rIE], a ei @@ -57,15 +57,15 @@ Init:: .wait ldh a, [rLY] - cp LY_VBLANK + 1 + cp SCRN_Y + 1 jr nz, .wait xor a ldh [rLCDC], a ; Clear WRAM bank 0 - ld hl, WRAM0_Begin - ld bc, WRAM0_End - WRAM0_Begin + ld hl, _RAM + ld bc, _RAMBANK - _RAM .ByteFill: ld [hl], 0 inc hl @@ -82,8 +82,8 @@ Init:: ldh a, [hSystemBooted] push af xor a - ld hl, HRAM_Begin - ld bc, HRAM_End - HRAM_Begin + ld hl, _HRAM + ld bc, rIE - _HRAM call ByteFill pop af ldh [hSystemBooted], a @@ -106,7 +106,7 @@ Init:: ldh [hMapAnims], a ldh [hSCX], a ldh [hSCY], a - ldh [rJOYP], a + ldh [rP1], a ld a, $8 ; HBlank int enable ldh [rSTAT], a @@ -119,7 +119,7 @@ Init:: ldh [hWX], a ldh [rWX], a - ld a, LCDC_DEFAULT ; %11100011 + ld a, LCDCF_ON | LCDCF_WIN9C00 | LCDCF_WINON | LCDCF_OBJON | LCDCF_BGON ; LCD on ; Win tilemap 1 ; Win on @@ -142,9 +142,9 @@ Init:: farcall StartClock - xor a ; SRAM_DISABLE - ld [MBC3LatchClock], a - ld [MBC3SRamEnable], a + xor a ; CART_SRAM_DISABLE + ld [rRTCLATCH], a + ld [rRAMG], a ldh a, [hCGB] and a @@ -154,7 +154,7 @@ Init:: xor a ldh [rIF], a - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a ei @@ -177,8 +177,8 @@ ClearVRAM:: xor a ; 0 ldh [rVBK], a .clear - ld hl, VRAM_Begin - ld bc, VRAM_End - VRAM_Begin + ld hl, _VRAM + ld bc, _SRAM - _VRAM xor a call ByteFill ret @@ -192,8 +192,8 @@ ClearWRAM:: push af ldh [rSVBK], a xor a - ld hl, WRAM1_Begin - ld bc, WRAM1_End - WRAM1_Begin + ld hl, _RAMBANK + ld bc, $1000 call ByteFill pop af inc a diff --git a/home/joypad.asm b/home/joypad.asm index 9612427ebd5..71347a02ad6 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -39,10 +39,10 @@ UpdateJoypad:: ; We can only get four inputs at a time. ; We take d-pad first for no particular reason. ld a, R_DPAD - ldh [rJOYP], a + ldh [rP1], a ; Read twice to give the request time to take. - ldh a, [rJOYP] - ldh a, [rJOYP] + ldh a, [rP1] + ldh a, [rP1] ; The Joypad register output is in the lo nybble (inversed). ; We make the hi nybble of our new container d-pad input. @@ -56,10 +56,10 @@ UpdateJoypad:: ; Buttons make 8 total inputs (A, B, Select, Start). ; We can fit this into one byte. ld a, R_BUTTONS - ldh [rJOYP], a + ldh [rP1], a ; Wait for input to stabilize. rept 6 - ldh a, [rJOYP] + ldh a, [rP1] endr ; Buttons take the lo nybble. cpl @@ -69,7 +69,7 @@ endr ; Reset the joypad register since we're done with it. ld a, $30 - ldh [rJOYP], a + ldh [rP1], a ; To get the delta we xor the last frame's input with the new one. ldh a, [hJoypadDown] ; last frame diff --git a/home/lcd.asm b/home/lcd.asm index 432635d518d..6a7bbdfe966 100644 --- a/home/lcd.asm +++ b/home/lcd.asm @@ -37,7 +37,7 @@ DisableLCD:: ; Don't need to do anything if the LCD is already off ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a ret z xor a @@ -46,17 +46,17 @@ DisableLCD:: ld b, a ; Disable VBlank - res VBLANK, a + res IEB_VBLANK, a ldh [rIE], a .wait ; Wait until VBlank would normally happen ldh a, [rLY] - cp LY_VBLANK + 1 + cp SCRN_Y + 1 jr nz, .wait ldh a, [rLCDC] - and ~(1 << rLCDC_ENABLE) + and ~LCDCF_ON ldh [rLCDC], a xor a @@ -67,6 +67,6 @@ DisableLCD:: EnableLCD:: ldh a, [rLCDC] - set rLCDC_ENABLE, a + set LCDCB_ON, a ldh [rLCDC], a ret diff --git a/home/mobile.asm b/home/mobile.asm index b4d2998cd16..a93d7d694b9 100644 --- a/home/mobile.asm +++ b/home/mobile.asm @@ -80,7 +80,7 @@ MobileTimer:: ; Turn off timer interrupt ldh a, [rIF] - and 1 << VBLANK | 1 << LCD_STAT | 1 << SERIAL | 1 << JOYPAD + and IEF_VBLANK | IEF_STAT | IEF_SERIAL | IEF_HILO ldh [rIF], a ld a, [wc86a] @@ -92,7 +92,7 @@ MobileTimer:: jr nz, .skip_timer ldh a, [rSC] - and 1 << rSC_ON + and SCF_START jr nz, .skip_timer ldh a, [hROMBank] @@ -112,7 +112,7 @@ MobileTimer:: ldh a, [rTMA] ldh [rTIMA], a - ld a, 1 << rTAC_ON | rTAC_65536_HZ + ld a, TACF_START | TACF_65KHZ ldh [rTAC], a .pop_ret diff --git a/home/palettes.asm b/home/palettes.asm index de742b73285..40b8fb89712 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -27,9 +27,9 @@ ForceUpdateCGBPals:: ld hl, wBGPals2 ; copy 8 pals to bgpd - ld a, 1 << rBGPI_AUTO_INCREMENT - ldh [rBGPI], a - ld c, LOW(rBGPD) + ld a, BCPSF_AUTOINC + ldh [rBCPS], a + ld c, LOW(rBCPD) ld b, 8 / 2 .bgp rept (1 palettes) * 2 @@ -43,9 +43,9 @@ endr ; hl is now wOBPals2 ; copy 8 pals to obpd - ld a, 1 << rOBPI_AUTO_INCREMENT - ldh [rOBPI], a - ld c, LOW(rOBPD) + ld a, OCPSF_AUTOINC + ldh [rOCPS], a + ld c, LOW(rOCPD) ld b, 8 / 2 .obp rept (1 palettes) * 2 @@ -293,8 +293,8 @@ ClearVBank1:: ld a, 1 ldh [rVBK], a - ld hl, VRAM_Begin - ld bc, VRAM_End - VRAM_Begin + ld hl, _VRAM + ld bc, _SRAM - _VRAM xor a call ByteFill diff --git a/home/printer.asm b/home/printer.asm index 745399a5d26..fc324b97126 100644 --- a/home/printer.asm +++ b/home/printer.asm @@ -31,11 +31,11 @@ AskSerial:: ldh [rSB], a ; switch to internal clock - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, 0 | SCF_SOURCE ldh [rSC], a ; start transfer - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a ret diff --git a/home/serial.asm b/home/serial.asm index 0f63491b1ab..202b7c3800c 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -28,9 +28,9 @@ Serial:: cp USING_INTERNAL_CLOCK jr z, .player2 - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a jr .player2 @@ -65,9 +65,9 @@ Serial:: bit 7, a jr nz, .delay_loop - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a jr .player2 @@ -134,9 +134,9 @@ Serial_ExchangeByte:: ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK jr nz, .not_player_2 - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a .not_player_2 .loop @@ -164,8 +164,8 @@ Serial_ExchangeByte:: .not_player_1_or_timed_out ldh a, [rIE] - and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) - cp 1 << SERIAL + and IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK + cp IEF_SERIAL jr nz, .loop ld a, [wLinkByteTimeout] dec a @@ -188,8 +188,8 @@ Serial_ExchangeByte:: xor a ldh [hSerialReceivedNewData], a ldh a, [rIE] - and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) - sub 1 << SERIAL + and IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK + sub IEF_SERIAL jr nz, .non_serial_interrupts_enabled ; a == 0 @@ -220,8 +220,8 @@ Serial_ExchangeByte:: .timed_out ldh a, [rIE] - and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) - cp 1 << SERIAL + and IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK + cp IEF_SERIAL ld a, SERIAL_NO_DATA_BYTE ret z ld a, [hl] @@ -370,9 +370,9 @@ LinkTransfer:: ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK jr nz, .player_1 - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a .player_1 @@ -400,9 +400,9 @@ LinkDataReceived:: ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret nz - ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SOURCE ldh [rSC], a ret @@ -415,8 +415,8 @@ SetBitsForTimeCapsuleRequestIfNotLinked:: ; unreferenced ldh [rSB], a xor a ldh [hSerialReceive], a - ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ld a, 0 ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ld a, SCF_START ldh [rSC], a ret diff --git a/home/sram.asm b/home/sram.asm index 6999f7ed8f4..9b33ab86fce 100644 --- a/home/sram.asm +++ b/home/sram.asm @@ -1,6 +1,6 @@ OpenSRAM:: ; if invalid bank, sram is disabled - cp NUM_SRAM_BANKS + cp 4 ; NUM_SRAM_BANKS jr c, .valid if DEF(_DEBUG) push af @@ -25,21 +25,21 @@ endc push af ; latch clock data ld a, 1 - ld [MBC3LatchClock], a + ld [rRTCLATCH], a ; enable sram/clock write - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ; select sram bank pop af - ld [MBC3SRamBank], a + ld [rRAMB], a ret CloseSRAM:: push af - ld a, SRAM_DISABLE + ld a, CART_SRAM_DISABLE ; reset clock latch for next time - ld [MBC3LatchClock], a + ld [rRTCLATCH], a ; disable sram/clock write - ld [MBC3SRamEnable], a + ld [rRAMG], a pop af ret diff --git a/home/text.asm b/home/text.asm index 6da8ee0d933..fbef0d21fc9 100644 --- a/home/text.asm +++ b/home/text.asm @@ -29,7 +29,7 @@ ClearTilemap:: ; Update the BG Map. ldh a, [rLCDC] - bit rLCDC_ENABLE, a + bit LCDCB_ON, a ret z jp WaitBGMap @@ -760,7 +760,7 @@ TextCommand_FAR:: ld a, [hli] ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a push hl ld h, d @@ -770,7 +770,7 @@ TextCommand_FAR:: pop af ldh [hROMBank], a - ld [MBC3RomBank], a + ld [rROMB0], a ret TextCommand_BCD:: diff --git a/home/time.asm b/home/time.asm index 0b51dea79a9..8dea720a6b1 100644 --- a/home/time.asm +++ b/home/time.asm @@ -14,9 +14,9 @@ Timer:: ; unreferenced LatchClock:: ; latch clock counter data ld a, 0 - ld [MBC3LatchClock], a + ld [rRTCLATCH], a ld a, 1 - ld [MBC3LatchClock], a + ld [rRTCLATCH], a ret UpdateTime:: @@ -30,14 +30,14 @@ GetClock:: ; store clock data in hRTCDayHi-hRTCSeconds ; enable clock r/w - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ; clock data is 'backwards' in hram call LatchClock - ld hl, MBC3SRamBank - ld de, MBC3RTC + ld hl, rRAMB + ld de, _SRAM ; read the RTC register ld [hl], RTC_S ld a, [de] @@ -213,15 +213,15 @@ SetClock:: ; set clock data from hram ; enable clock r/w - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ; set clock data ; stored 'backwards' in hram call LatchClock - ld hl, MBC3SRamBank - ld de, MBC3RTC + ld hl, rRAMB ; MBC3SRamBank + ld de, _SRAM ; read the RTC register ; seems to be a halt check that got partially commented out ; this block is totally pointless diff --git a/home/vblank.asm b/home/vblank.asm index 3de9faea1ea..fe59148be70 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -196,13 +196,13 @@ VBlank1:: xor a ldh [rIF], a ; enable lcd stat - ld a, 1 << LCD_STAT + ld a, IEF_STAT ldh [rIE], a ; rerequest serial int if applicable (still disabled) ; request lcd stat ld a, b - and 1 << SERIAL - or 1 << LCD_STAT + and IEF_SERIAL + or IEF_STAT ldh [rIF], a ei @@ -220,7 +220,7 @@ VBlank1:: xor a ldh [rIF], a ; enable ints besides joypad - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a ; rerequest ints ld a, b @@ -279,7 +279,7 @@ VBlank3:: push af xor a ldh [rIF], a - ld a, 1 << LCD_STAT + ld a, IEF_STAT ldh [rIE], a ldh [rIF], a @@ -302,7 +302,7 @@ VBlank3:: xor a ldh [rIF], a ; enable ints besides joypad - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a ; request ints ld a, b @@ -368,7 +368,7 @@ VBlank5:: xor a ldh [rIF], a - ld a, 1 << LCD_STAT + ld a, IEF_STAT ldh [rIE], a ; request lcd stat ldh [rIF], a @@ -384,7 +384,7 @@ VBlank5:: xor a ldh [rIF], a ; enable ints besides joypad - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a ret diff --git a/home/video.asm b/home/video.asm index 8cda11d71c1..1ad395e018a 100644 --- a/home/video.asm +++ b/home/video.asm @@ -273,9 +273,9 @@ Serve1bppRequest:: ; Back out if we're too far into VBlank ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y ret c - cp LY_VBLANK + 2 + cp SCRN_Y + 2 ; 146 ret nc ; Copy [wRequested1bppSize] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest] @@ -351,9 +351,9 @@ Serve2bppRequest:: ; Back out if we're too far into VBlank ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y ret c - cp LY_VBLANK + 2 + cp SCRN_Y + 2 ; 146 ret nc jr _Serve2bppRequest @@ -428,9 +428,9 @@ AnimateTileset:: ; Back out if we're too far into VBlank ldh a, [rLY] - cp LY_VBLANK + cp SCRN_Y ret c - cp LY_VBLANK + 7 + cp SCRN_Y + 7 ; 151 ret nc ldh a, [hROMBank] diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index 5d40eab1a89..906e6de8d4c 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -1,7 +1,7 @@ ; A library included as part of the Mobile Adapter GB SDK. INCLUDE "macros/const.asm" -INCLUDE "constants/hardware_constants.asm" +INCLUDE "constants/hardware.inc" INCLUDE "constants/mobile_constants.asm" ; Mobile Adapter protocol commands @@ -232,9 +232,9 @@ MobileAPI_SetTimer: ld [wc820], a ld [wc815], a ld c, LOW(rTAC) - ld a, rTAC_65536_HZ + ld a, TACF_65KHZ ldh [c], a - ld a, 1 << rTAC_ON | rTAC_65536_HZ + ld a, TACF_START | TACF_65KHZ ldh [c], a ret @@ -623,7 +623,7 @@ Function11032c: Function110393: ld c, LOW(rIE) ldh a, [c] - or (1 << SERIAL) | (1 << TIMER) + or IEF_SERIAL | IEF_TIMER ldh [c], a ret @@ -4120,9 +4120,9 @@ Function111b21: Function111b2e: ld hl, wc822 set 1, [hl] - ld a, (0 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK) + ld a, SCF_SPEED | SCF_SOURCE ; Stop any transfer in progress ldh [rSC], a - ld a, (1 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK) + ld a, SCF_START | SCF_SPEED | SCF_SOURCE ldh [rSC], a Function111b3b: @@ -4725,7 +4725,7 @@ PacketSendBytes: ret .asm_111f17 ldh a, [rSC] - and 1 << rSC_ON + and SCF_START jr nz, .asm_111f17 di ld a, [wMobileSDK_SendCommandID] diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 930220ac993..7261e553a44 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -1854,30 +1854,30 @@ Unknown_89bd8: Unknown_89be0: db $01, $12, $4e, $01, 0 - db $01, $19, $4e, $01, 0 | Y_FLIP - db $01, $12, $72, $01, 0 | X_FLIP - db $01, $19, $72, $01, 0 | X_FLIP | Y_FLIP + db $01, $19, $4e, $01, 0 | OAMF_YFLIP + db $01, $12, $72, $01, 0 | OAMF_XFLIP + db $01, $19, $72, $01, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 ; end Unknown_89bf5: db $01, $60, $16, $01, 0 - db $01, $62, $16, $01, 0 | Y_FLIP - db $01, $60, $92, $01, 0 | X_FLIP - db $01, $62, $92, $01, 0 | X_FLIP | Y_FLIP + db $01, $62, $16, $01, 0 | OAMF_YFLIP + db $01, $60, $92, $01, 0 | OAMF_XFLIP + db $01, $62, $92, $01, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 ; end Unknown_89c0a: db $01, $78, $66, $01, 0 - db $01, $78, $66, $01, 0 | Y_FLIP - db $01, $78, $92, $01, 0 | X_FLIP - db $01, $78, $92, $01, 0 | X_FLIP | Y_FLIP + db $01, $78, $66, $01, 0 | OAMF_YFLIP + db $01, $78, $92, $01, 0 | OAMF_XFLIP + db $01, $78, $92, $01, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 ; end Unknown_89c1f: db $01, $80, $66, $01, 0 - db $01, $80, $66, $01, 0 | Y_FLIP - db $01, $80, $92, $01, 0 | X_FLIP - db $01, $80, $92, $01, 0 | X_FLIP | Y_FLIP + db $01, $80, $66, $01, 0 | OAMF_YFLIP + db $01, $80, $92, $01, 0 | OAMF_XFLIP + db $01, $80, $92, $01, 0 | OAMF_XFLIP | OAMF_YFLIP db -1 ; end Function89c34: diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 93b7e1b4f9e..de4b0711935 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -77,7 +77,7 @@ EnableMobile: call DoubleSpeed xor a ldh [rIF], a - ld a, IE_DEFAULT + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a xor a ldh [hMapAnims], a @@ -160,7 +160,7 @@ Function1000fa: xor a ldh [rIF], a ldh a, [rIE] - and $1f ^ (1 << SERIAL | 1 << TIMER) + and $1f ^ (IEF_SERIAL | IEF_TIMER) ldh [rIE], a xor a ldh [hMobileReceive], a @@ -2400,7 +2400,7 @@ MACRO macro_100fc0 ; Bit 7 set: Not SRAM ; Lower 7 bits: Bank if SRAM ; address, size[, OT address] - db ($80 * (\1 >= SRAM_End)) | (BANK(\1) * (\1 < SRAM_End)) + db ($80 * (\1 >= _RAM)) | (BANK(\1) * (\1 < _RAM)) dw \1, \2 if _NARG == 3 dw \3 diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index 2694a50b208..b32560ca423 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -125,8 +125,8 @@ String_114232: db "=?ISO-2022-JP?B?", 0 Function114243:: - ld a, SRAM_ENABLE - ld [MBC3SRamEnable], a + ld a, CART_SRAM_ENABLE + ld [rRAMG], a ldh a, [hSRAMBank] push af ; if [$dc02] == 0, this is popped to pc. push de @@ -147,7 +147,7 @@ Function11425c: pop af ldh [hSRAMBank], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ret Stubbed_Function114268: @@ -162,7 +162,7 @@ Function114269: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -359,7 +359,7 @@ Function11433c: ld a, [$dc03] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a call Function114c0b ld hl, String_114004 .asm_114394 @@ -417,7 +417,7 @@ Function1143b7: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld h, [hl] ld l, a @@ -472,7 +472,7 @@ Function1143f3: ld a, c ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, Unknown_11417f ld a, b add a @@ -659,7 +659,7 @@ Function1144d1: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -676,7 +676,7 @@ Function1144d1: ld a, [hl] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, $dc09 ld e, [hl] inc hl @@ -734,7 +734,7 @@ Function114576: ld a, h ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a push hl push de push bc @@ -752,7 +752,7 @@ Function114576: ld a, h ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, String_114218 call Function114acf @@ -924,7 +924,7 @@ Function11463c: pop af ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a xor a ld [wDecoCarpet], a ld a, $1 @@ -945,7 +945,7 @@ Function1146a4: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -959,7 +959,7 @@ Function1146a4: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1002,7 +1002,7 @@ Function1146fa: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1016,7 +1016,7 @@ Function1146fa: ld [$dc0e], a ld a, [$dc00] ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, $1 ld [wDecoRightOrnament], a call Function1147cd @@ -1043,7 +1043,7 @@ Function1146fa: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1097,7 +1097,7 @@ Function1146fa: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a call Function114a7a and a jr z, .asm_1147cb @@ -1207,7 +1207,7 @@ Function114843: push af push de ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a call Function114a18 and a jr nz, .asm_11485f @@ -1230,7 +1230,7 @@ Function114867: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1295,7 +1295,7 @@ Function1148c2: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1393,7 +1393,7 @@ Function11494d: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1483,7 +1483,7 @@ Function1149cc: ld a, [hl] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a push de ld hl, $dc09 ld e, [hl] @@ -1830,7 +1830,7 @@ endr ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -1868,7 +1868,7 @@ Function114bbc: ld a, h ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a call Function114c0b ld hl, $dc24 call Function114c5e @@ -1879,7 +1879,7 @@ Function114bbc: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld d, [hl] @@ -2085,7 +2085,7 @@ Function114cd9: ld a, h ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, $dc24 call Function114d39 ld hl, $dc24 @@ -2104,7 +2104,7 @@ endr ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -2402,7 +2402,7 @@ Function114ea0: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -2602,7 +2602,7 @@ Function114f59: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -2680,7 +2680,7 @@ Function115020: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -2737,7 +2737,7 @@ Function115062: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -2888,7 +2888,7 @@ Function115136: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -2941,7 +2941,7 @@ Function115179: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -3059,7 +3059,7 @@ Function115217: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -3152,7 +3152,7 @@ Function11528f: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, [hli] ld e, a ld a, [hli] @@ -3401,7 +3401,7 @@ Function1153d2: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -3535,7 +3535,7 @@ Function1153d2: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -3768,7 +3768,7 @@ Function11560a: ld a, [$dc17] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, $dc1a ld c, [hl] inc hl @@ -3841,7 +3841,7 @@ Function11560a: pop bc ld a, [wCurMapBGEventCount] ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld hl, wCurMapSceneScriptCount ld e, [hl] inc hl @@ -4147,7 +4147,7 @@ Function11581e: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -4201,7 +4201,7 @@ Function11581e: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -4668,7 +4668,7 @@ Function115b00: ld a, [hli] ld [$dc00], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -4756,7 +4756,7 @@ Function115b00: ld a, [hli] ld [wCurMapBGEventCount], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld e, [hl] inc hl ld d, [hl] @@ -5149,7 +5149,7 @@ Function115d80: inc a ld [bc], a ldh [hSRAMBank], a - ld [MBC3SRamBank], a + ld [rRAMB], a ld a, e ld d, $a0 ld e, $0 diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index 0d04e129c96..8e3ac81d1d4 100644 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -382,7 +382,7 @@ Function1161d5: .wait_for_vblank ; Wait until a vblank would occur had interrupts not just been disabled. ldh a, [rLY] - cp LY_VBLANK + 1 + cp SCRN_Y + 1 ; 145 jr nz, .wait_for_vblank ld a, $d0 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index f549caa89b8..5179d7bbc07 100644 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -467,7 +467,7 @@ BattleTowerRoomMenu_InitRAM: ld a, [hl] ld [wcd7f], a set 1, [hl] - ld a, (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + ld a, IEF_SERIAL | IEF_TIMER | IEF_STAT | IEF_VBLANK ldh [rIE], a ld a, $1 ldh [hMobileReceive], a