From 6b5be9129cabe72b9f775b02db1bf7e7169153da Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 6 Jun 2022 16:25:31 -0500 Subject: RGBDS syntax updates (#358) New MACRO and DEF syntax --- constants/audio_constants.asm | 34 ++--- constants/battle_constants.asm | 50 ++++---- constants/credits_constants.asm | 2 +- constants/event_constants.asm | 2 +- constants/gfx_constants.asm | 40 +++--- constants/hardware_constants.asm | 228 ++++++++++++++++----------------- constants/hide_show_constants.asm | 6 +- constants/icon_constants.asm | 4 +- constants/input_constants.asm | 18 +-- constants/item_constants.asm | 42 +++--- constants/map_constants.asm | 16 +-- constants/map_data_constants.asm | 2 +- constants/map_object_constants.asm | 32 ++--- constants/menu_constants.asm | 16 +-- constants/misc_constants.asm | 10 +- constants/move_animation_constants.asm | 8 +- constants/move_constants.asm | 4 +- constants/move_effect_constants.asm | 2 +- constants/music_constants.asm | 24 ++-- constants/oam_constants.asm | 24 ++-- constants/palette_constants.asm | 12 +- constants/pokedex_constants.asm | 2 +- constants/pokemon_constants.asm | 10 +- constants/pokemon_data_constants.asm | 62 ++++----- constants/script_constants.asm | 30 ++--- constants/serial_constants.asm | 36 +++--- constants/sprite_constants.asm | 4 +- constants/sprite_data_constants.asm | 10 +- constants/text_constants.asm | 14 +- constants/tileset_constants.asm | 2 +- constants/trainer_constants.asm | 8 +- constants/type_constants.asm | 6 +- 32 files changed, 380 insertions(+), 380 deletions(-) (limited to 'constants') diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index 69ec4e74..59900fec 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -13,7 +13,7 @@ const A_ ; 9 const A# ; A const B_ ; B -NUM_NOTES EQU const_value +DEF NUM_NOTES EQU const_value ; channel ; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks, @@ -23,31 +23,31 @@ NUM_NOTES EQU const_value const Ch2 ; 1 const Ch3 ; 2 const Ch4 ; 3 -NUM_MUSIC_CHANS EQU const_value +DEF NUM_MUSIC_CHANS EQU const_value const Ch5 ; 4 const Ch6 ; 5 const Ch7 ; 6 const Ch8 ; 7 -NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS -NUM_CHANNELS EQU const_value +DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS +DEF NUM_CHANNELS EQU const_value ; HW sound channel register base addresses -HW_CH1_BASE EQU LOW(rNR10) -HW_CH2_BASE EQU LOW(rNR21) - 1 -HW_CH3_BASE EQU LOW(rNR30) -HW_CH4_BASE EQU LOW(rNR41) - 1 +DEF HW_CH1_BASE EQU LOW(rNR10) +DEF HW_CH2_BASE EQU LOW(rNR21) - 1 +DEF HW_CH3_BASE EQU LOW(rNR30) +DEF HW_CH4_BASE EQU LOW(rNR41) - 1 ; HW sound channel enable bit masks -HW_CH1_ENABLE_MASK EQU %00010001 -HW_CH2_ENABLE_MASK EQU %00100010 -HW_CH3_ENABLE_MASK EQU %01000100 -HW_CH4_ENABLE_MASK EQU %10001000 +DEF HW_CH1_ENABLE_MASK EQU %00010001 +DEF HW_CH2_ENABLE_MASK EQU %00100010 +DEF HW_CH3_ENABLE_MASK EQU %01000100 +DEF HW_CH4_ENABLE_MASK EQU %10001000 ; HW sound channel disable bit masks -HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff) -HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff) -HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff) -HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) +DEF HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff) +DEF HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff) +DEF HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff) +DEF HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) const_def 1 const REG_DUTY_SOUND_LEN ; 1 @@ -65,4 +65,4 @@ HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) const BIT_ROTATE_DUTY_CYCLE ; 6 ; if rotating duty cycle ; wChannelFlags2 constant (only has one flag) -BIT_EXECUTE_MUSIC EQU 0 ; if in execute music +DEF BIT_EXECUTE_MUSIC EQU 0 ; if in execute music diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index fdbe8775..b394b7a2 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -1,6 +1,6 @@ -MAX_LEVEL EQU 100 +DEF MAX_LEVEL EQU 100 -NUM_MOVES EQU 4 +DEF NUM_MOVES EQU 4 ; VitaminStats indexes (see data/battle/stat_names.asm) const_def @@ -9,7 +9,7 @@ NUM_MOVES EQU 4 const STAT_DEFENSE const STAT_SPEED const STAT_SPECIAL -NUM_STATS EQU const_value +DEF NUM_STATS EQU const_value ; StatModTextStrings indexes (see data/battle/stat_mod_names.asm) const_def @@ -20,20 +20,20 @@ NUM_STATS EQU const_value const MOD_ACCURACY const MOD_EVASION const_skip 2 -NUM_STAT_MODS EQU const_value +DEF NUM_STAT_MODS EQU const_value ; Moves struct fields (see data/moves/moves.asm) rsreset -MOVE_ANIM rb -MOVE_EFFECT rb -MOVE_POWER rb -MOVE_TYPE rb -MOVE_ACC rb -MOVE_PP rb -MOVE_LENGTH EQU _RS +DEF MOVE_ANIM rb +DEF MOVE_EFFECT rb +DEF MOVE_POWER rb +DEF MOVE_TYPE rb +DEF MOVE_ACC rb +DEF MOVE_PP rb +DEF MOVE_LENGTH EQU _RS ; D733 flags -BIT_TEST_BATTLE EQU 0 +DEF BIT_TEST_BATTLE EQU 0 ; battle type constants (wBattleType values) const_def @@ -42,33 +42,33 @@ BIT_TEST_BATTLE EQU 0 const BATTLE_TYPE_SAFARI ; 2 ; damage limits before type effectiveness -MIN_NEUTRAL_DAMAGE EQU 2 -MAX_NEUTRAL_DAMAGE EQU 999 +DEF MIN_NEUTRAL_DAMAGE EQU 2 +DEF MAX_NEUTRAL_DAMAGE EQU 999 ; fixed damage constants -SONICBOOM_DAMAGE EQU 20 -DRAGON_RAGE_DAMAGE EQU 40 +DEF SONICBOOM_DAMAGE EQU 20 +DEF DRAGON_RAGE_DAMAGE EQU 40 ; type effectiveness factors, scaled by 10 -SUPER_EFFECTIVE EQU 20 -MORE_EFFECTIVE EQU 15 -EFFECTIVE EQU 10 -NOT_VERY_EFFECTIVE EQU 05 -NO_EFFECT EQU 00 +DEF SUPER_EFFECTIVE EQU 20 +DEF MORE_EFFECTIVE EQU 15 +DEF EFFECTIVE EQU 10 +DEF NOT_VERY_EFFECTIVE EQU 05 +DEF NO_EFFECT EQU 00 ; non-volatile statuses -SLP EQU %111 ; sleep counter +DEF SLP EQU %111 ; sleep counter const_def 3 const PSN ; 3 const BRN ; 4 const FRZ ; 5 const PAR ; 6 -MAX_STAT_VALUE EQU 999 +DEF MAX_STAT_VALUE EQU 999 ; trainer dvs -ATKDEFDV_TRAINER EQU $98 -SPDSPCDV_TRAINER EQU $88 +DEF ATKDEFDV_TRAINER EQU $98 +DEF SPDSPCDV_TRAINER EQU $88 ; wPlayerBattleStatus1 or wEnemyBattleStatus1 bit flags const_def diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm index 78dc7675..ba62012b 100644 --- a/constants/credits_constants.asm +++ b/constants/credits_constants.asm @@ -64,7 +64,7 @@ const CRED_FUKUI ; $3D const CRED_CLUB ; $3E const CRED_PAAD ; $3F -NUM_CRED_STRINGS EQU const_value +DEF NUM_CRED_STRINGS EQU const_value const_def -1, -1 const CRED_TEXT_FADE_MON ; $FF diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 4f169880..9e2ebcc6 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -772,4 +772,4 @@ ; End of events const_next $A00 -NUM_EVENTS EQU const_value +DEF NUM_EVENTS EQU const_value diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 91463e7c..522b6a67 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -1,33 +1,33 @@ -TILE_WIDTH EQU 8 ; pixels -LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes -LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes +DEF TILE_WIDTH EQU 8 ; pixels +DEF LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes +DEF LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes -SCREEN_WIDTH EQU 20 -SCREEN_HEIGHT EQU 18 -SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels -SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels +DEF SCREEN_WIDTH EQU 20 +DEF SCREEN_HEIGHT EQU 18 +DEF SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels +DEF SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels -BG_MAP_WIDTH EQU 32 ; tiles -BG_MAP_HEIGHT EQU 32 ; tiles +DEF BG_MAP_WIDTH EQU 32 ; tiles +DEF BG_MAP_HEIGHT EQU 32 ; tiles -SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE +DEF SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE ; HP bar -HP_BAR_GREEN EQU 0 -HP_BAR_YELLOW EQU 1 -HP_BAR_RED EQU 2 +DEF HP_BAR_GREEN EQU 0 +DEF HP_BAR_YELLOW EQU 1 +DEF HP_BAR_RED EQU 2 ; wOAMBuffer -NUM_SPRITE_OAM_STRUCTS EQU 40 +DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled -TRANSFERTOP EQU 0 -TRANSFERMIDDLE EQU 1 -TRANSFERBOTTOM EQU 2 +DEF TRANSFERTOP EQU 0 +DEF TRANSFERMIDDLE EQU 1 +DEF TRANSFERBOTTOM EQU 2 ; hRedrawRowOrColumnMode -REDRAW_COL EQU 1 -REDRAW_ROW EQU 2 +DEF REDRAW_COL EQU 1 +DEF REDRAW_ROW EQU 2 ; tile list ids ; TileIDListPointerTable indexes (see data/tilemaps.asm) @@ -40,4 +40,4 @@ REDRAW_ROW EQU 2 const TILEMAP_GENGAR_INTRO_3 const TILEMAP_GAME_BOY const TILEMAP_LINK_CABLE -NUM_TILEMAPS EQU const_value +DEF NUM_TILEMAPS EQU const_value diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 993a02f5..0cc83383 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -1,130 +1,130 @@ ; From http://nocash.emubase.de/pandocs.htm. -GBC EQU $11 +DEF GBC EQU $11 ; memory map -VRAM_Begin EQU $8000 -VRAM_End EQU $a000 -SRAM_Begin EQU $a000 -SRAM_End EQU $c000 -WRAM0_Begin EQU $c000 -WRAM0_End EQU $d000 -WRAM1_Begin EQU $d000 -WRAM1_End EQU $e000 +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) -HRAM_Begin EQU $ff80 -HRAM_End EQU $ffff +DEF HRAM_Begin EQU $ff80 +DEF HRAM_End EQU $ffff ; MBC1 -MBC1SRamEnable EQU $0000 -MBC1RomBank EQU $2000 -MBC1SRamBank EQU $4000 -MBC1SRamBankingMode EQU $6000 +DEF MBC1SRamEnable EQU $0000 +DEF MBC1RomBank EQU $2000 +DEF MBC1SRamBank EQU $4000 +DEF MBC1SRamBankingMode EQU $6000 -SRAM_DISABLE EQU $00 -SRAM_ENABLE EQU $0a +DEF SRAM_DISABLE EQU $00 +DEF SRAM_ENABLE EQU $0a -NUM_SRAM_BANKS EQU 4 +DEF NUM_SRAM_BANKS EQU 4 ; interrupt flags -VBLANK EQU 0 -LCD_STAT EQU 1 -TIMER EQU 2 -SERIAL EQU 3 -JOYPAD EQU 4 +DEF VBLANK EQU 0 +DEF LCD_STAT EQU 1 +DEF TIMER EQU 2 +DEF SERIAL EQU 3 +DEF JOYPAD EQU 4 -LY_VBLANK EQU 145 +DEF LY_VBLANK EQU 145 ; serial -START_TRANSFER_EXTERNAL_CLOCK EQU $80 -START_TRANSFER_INTERNAL_CLOCK EQU $81 +DEF START_TRANSFER_EXTERNAL_CLOCK EQU $80 +DEF START_TRANSFER_INTERNAL_CLOCK EQU $81 ; Hardware registers -rJOYP EQU $ff00 ; Joypad (R/W) -rSB EQU $ff01 ; Serial transfer data (R/W) -rSC EQU $ff02 ; Serial Transfer Control (R/W) -rSC_ON EQU 7 -rSC_CGB EQU 1 -rSC_CLOCK EQU 0 -rDIV EQU $ff04 ; Divider Register (R/W) -rTIMA EQU $ff05 ; Timer counter (R/W) -rTMA EQU $ff06 ; Timer Modulo (R/W) -rTAC EQU $ff07 ; Timer Control (R/W) -rTAC_ON EQU 2 -rTAC_4096_HZ EQU 0 -rTAC_262144_HZ EQU 1 -rTAC_65536_HZ EQU 2 -rTAC_16384_HZ EQU 3 -rIF EQU $ff0f ; Interrupt Flag (R/W) -rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W) -rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W) -rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W) -rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only) -rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W) -rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W) -rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W) -rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W) -rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W) -rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W) -rNR31 EQU $ff1b ; Channel 3 Sound Length -rNR32 EQU $ff1c ; Channel 3 Select output level (R/W) -rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W) -rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) -rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) -rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) -rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) -rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W) -rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) -rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) -rNR52 EQU $ff26 ; Sound on/off -rWave_0 EQU $ff30 -rWave_1 EQU $ff31 -rWave_2 EQU $ff32 -rWave_3 EQU $ff33 -rWave_4 EQU $ff34 -rWave_5 EQU $ff35 -rWave_6 EQU $ff36 -rWave_7 EQU $ff37 -rWave_8 EQU $ff38 -rWave_9 EQU $ff39 -rWave_a EQU $ff3a -rWave_b EQU $ff3b -rWave_c EQU $ff3c -rWave_d EQU $ff3d -rWave_e EQU $ff3e -rWave_f EQU $ff3f -rLCDC EQU $ff40 ; LCD Control (R/W) -rLCDC_ENABLE EQU 7 -rLCDC_ENABLE_MASK EQU 1 << rLCDC_ENABLE -rSTAT EQU $ff41 ; LCDC Status (R/W) -rSCY EQU $ff42 ; Scroll Y (R/W) -rSCX EQU $ff43 ; Scroll X (R/W) -rLY EQU $ff44 ; LCDC Y-Coordinate (R) -rLYC EQU $ff45 ; LY Compare (R/W) -rDMA EQU $ff46 ; DMA Transfer and Start Address (W) -rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only -rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only -rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only -rWY EQU $ff4a ; Window Y Position (R/W) -rWX EQU $ff4b ; Window X Position minus 7 (R/W) -rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch -rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank -rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High -rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low -rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High -rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low -rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start -rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port -rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index -rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data -rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index -rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data -rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only -rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank -rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write) -rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write) -rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only -rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) -rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) -rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) -rIE EQU $ffff ; Interrupt Enable (R/W) +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 0 +DEF rTAC_262144_HZ EQU 1 +DEF rTAC_65536_HZ EQU 2 +DEF rTAC_16384_HZ EQU 3 +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; Initial (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_ENABLE EQU 7 +DEF rLCDC_ENABLE_MASK EQU 1 << rLCDC_ENABLE +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 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 rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch +DEF rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank +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 rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index +DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data +DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index +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 rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) +DEF rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) +DEF rIE EQU $ffff ; Interrupt Enable (R/W) diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 4770a29a..b73271e8 100644 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -1,5 +1,5 @@ -HIDE EQU $11 -SHOW EQU $15 +DEF HIDE EQU $11 +DEF SHOW EQU $15 ; MissableObjects indexes (see data/maps/hide_show_data.asm) ; this is a list of the sprites that can be enabled/disabled during the game @@ -237,4 +237,4 @@ SHOW EQU $15 const HS_SEAFOAM_ISLANDS_B4F_BOULDER_1 ; E1 const HS_SEAFOAM_ISLANDS_B4F_BOULDER_2 ; E2 const HS_ARTICUNO ; E3 X -NUM_HS_OBJECTS EQU const_value +DEF NUM_HS_OBJECTS EQU const_value diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm index 14202da3..767e29c6 100644 --- a/constants/icon_constants.asm +++ b/constants/icon_constants.asm @@ -12,6 +12,6 @@ const ICON_SNAKE ; $8 const ICON_QUADRUPED ; $9 -ICON_TRADEBUBBLE EQU $e +DEF ICON_TRADEBUBBLE EQU $e -ICONOFFSET EQU $40 ; difference between alternating icon frames' tile IDs +DEF ICONOFFSET EQU $40 ; difference between alternating icon frames' tile IDs diff --git a/constants/input_constants.asm b/constants/input_constants.asm index 7984d5a9..f9070cba 100644 --- a/constants/input_constants.asm +++ b/constants/input_constants.asm @@ -9,12 +9,12 @@ const BIT_D_UP const BIT_D_DOWN -NO_INPUT EQU 0 -A_BUTTON EQU 1 << BIT_A_BUTTON -B_BUTTON EQU 1 << BIT_B_BUTTON -SELECT EQU 1 << BIT_SELECT -START EQU 1 << BIT_START -D_RIGHT EQU 1 << BIT_D_RIGHT -D_LEFT EQU 1 << BIT_D_LEFT -D_UP EQU 1 << BIT_D_UP -D_DOWN EQU 1 << BIT_D_DOWN +DEF NO_INPUT EQU 0 +DEF A_BUTTON EQU 1 << BIT_A_BUTTON +DEF B_BUTTON EQU 1 << BIT_B_BUTTON +DEF SELECT EQU 1 << BIT_SELECT +DEF START EQU 1 << BIT_START +DEF D_RIGHT EQU 1 << BIT_D_RIGHT +DEF D_LEFT EQU 1 << BIT_D_LEFT +DEF D_UP EQU 1 << BIT_D_UP +DEF D_DOWN EQU 1 << BIT_D_DOWN diff --git a/constants/item_constants.asm b/constants/item_constants.asm index f3c71985..edd70379 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -29,8 +29,8 @@ const POTION ; $14 const BOULDERBADGE ; $15 const CASCADEBADGE ; $16 -SAFARI_BAIT EQU $15 ; overload -SAFARI_ROCK EQU $16 ; overload +DEF SAFARI_BAIT EQU $15 ; overload +DEF SAFARI_ROCK EQU $16 ; overload const THUNDERBADGE ; $17 const RAINBOWBADGE ; $18 const SOULBADGE ; $19 @@ -92,7 +92,7 @@ SAFARI_ROCK EQU $16 ; overload const MAX_ETHER ; $51 const ELIXER ; $52 const MAX_ELIXER ; $53 -NUM_ITEMS EQU const_value - 1 +DEF NUM_ITEMS EQU const_value - 1 ; elevator floors use item IDs const FLOOR_B2F ; $54 @@ -109,54 +109,54 @@ NUM_ITEMS EQU const_value - 1 const FLOOR_10F ; $5F const FLOOR_11F ; $60 const FLOOR_B4F ; $61 -NUM_FLOORS EQU const_value - 1 - NUM_ITEMS +DEF NUM_FLOORS EQU const_value - 1 - NUM_ITEMS const_next $C4 ; HMs are defined before TMs, so the actual number of TM definitions ; is not yet available. The TM quantity is hard-coded here and must ; match the actual number below. -NUM_TMS EQU 50 +DEF NUM_TMS EQU 50 -__tmhm_value__ = NUM_TMS + 1 +DEF __tmhm_value__ = NUM_TMS + 1 -add_tmnum: MACRO -\1_TMNUM EQU __tmhm_value__ -__tmhm_value__ += 1 +MACRO add_tmnum + DEF \1_TMNUM EQU __tmhm_value__ + DEF __tmhm_value__ += 1 ENDM -add_hm: MACRO +MACRO add_hm ; Defines three constants: ; - HM_\1: the item id, starting at $C4 ; - \1_TMNUM: the learnable TM/HM flag, starting at 51 ; - HM##_MOVE: alias for the move id, equal to the value of \1 const HM_\1 -HM_VALUE = __tmhm_value__ - NUM_TMS -HM{02d:HM_VALUE}_MOVE EQU \1 + DEF HM_VALUE = __tmhm_value__ - NUM_TMS + DEF HM{02d:HM_VALUE}_MOVE EQU \1 add_tmnum \1 ENDM -HM01 EQU const_value +DEF HM01 EQU const_value add_hm CUT ; $C4 add_hm FLY ; $C5 add_hm SURF ; $C6 add_hm STRENGTH ; $C7 add_hm FLASH ; $C8 -NUM_HMS EQU const_value - HM01 +DEF NUM_HMS EQU const_value - HM01 -__tmhm_value__ = 1 +DEF __tmhm_value__ = 1 -add_tm: MACRO +MACRO add_tm ; Defines three constants: ; - TM_\1: the item id, starting at $C9 ; - \1_TMNUM: the learnable TM/HM flag, starting at 1 ; - TM##_MOVE: alias for the move id, equal to the value of \1 const TM_\1 -TM{02d:__tmhm_value__}_MOVE EQU \1 + DEF TM{02d:__tmhm_value__}_MOVE EQU \1 add_tmnum \1 ENDM -TM01 EQU const_value +DEF TM01 EQU const_value add_tm MEGA_PUNCH ; $C9 add_tm RAZOR_WIND ; $CA add_tm SWORDS_DANCE ; $CB @@ -209,9 +209,9 @@ TM01 EQU const_value add_tm SUBSTITUTE ; $FA ASSERT NUM_TMS == const_value - TM01, "NUM_TMS ({d:NUM_TMS}) does not match the number of add_tm definitions" -NUM_TM_HM EQU NUM_TMS + NUM_HMS +DEF NUM_TM_HM EQU NUM_TMS + NUM_HMS ; 50 TMs + 5 HMs = 55 learnable TM/HM flags per Pokémon. ; These fit in 7 bytes, with one unused bit left over. -__tmhm_value__ = NUM_TM_HM + 1 -UNUSED_TMNUM EQU __tmhm_value__ +DEF __tmhm_value__ = NUM_TM_HM + 1 +DEF UNUSED_TMNUM EQU __tmhm_value__ diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 58343342..86e18e62 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,7 +1,7 @@ -mapconst: MACRO +MACRO mapconst const \1 -\1_HEIGHT EQU \2 -\1_WIDTH EQU \3 + DEF \1_HEIGHT EQU \2 + DEF \1_WIDTH EQU \3 ENDM ; map ids @@ -26,9 +26,9 @@ ENDM mapconst CINNABAR_ISLAND, 9, 10 ; $08 mapconst INDIGO_PLATEAU, 9, 10 ; $09 mapconst SAFFRON_CITY, 18, 20 ; $0A -NUM_CITY_MAPS EQU const_value +DEF NUM_CITY_MAPS EQU const_value mapconst UNUSED_MAP_0B, 0, 0 ; $0B -FIRST_ROUTE_MAP EQU const_value +DEF FIRST_ROUTE_MAP EQU const_value mapconst ROUTE_1, 18, 10 ; $0C mapconst ROUTE_2, 36, 10 ; $0D mapconst ROUTE_3, 9, 35 ; $0E @@ -54,7 +54,7 @@ FIRST_ROUTE_MAP EQU const_value mapconst ROUTE_23, 72, 10 ; $22 mapconst ROUTE_24, 18, 10 ; $23 mapconst ROUTE_25, 9, 30 ; $24 -FIRST_INDOOR_MAP EQU const_value +DEF FIRST_INDOOR_MAP EQU const_value mapconst REDS_HOUSE_1F, 4, 4 ; $25 mapconst REDS_HOUSE_2F, 4, 4 ; $26 mapconst BLUES_HOUSE, 4, 4 ; $27 @@ -266,8 +266,8 @@ FIRST_INDOOR_MAP EQU const_value mapconst LORELEIS_ROOM, 6, 5 ; $F5 mapconst BRUNOS_ROOM, 6, 5 ; $F6 mapconst AGATHAS_ROOM, 6, 5 ; $F7 -NUM_MAPS EQU const_value +DEF NUM_MAPS EQU const_value ; Indoor maps, such as houses, use this as the Map ID in their exit warps ; This map ID takes the player back to the last outdoor map they were on, stored in wLastMap -LAST_MAP EQU -1 +DEF LAST_MAP EQU -1 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 605e7013..1877e6a0 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -1,6 +1,6 @@ ; width of east/west connections ; height of north/south connections -MAP_BORDER EQU 3 +DEF MAP_BORDER EQU 3 ; connection directions const_def diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 899e01f0..5c666d83 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -16,7 +16,7 @@ const SPRITESTATEDATA1_0D ; d const SPRITESTATEDATA1_0E ; e const SPRITESTATEDATA1_0F ; f -SPRITESTATEDATA1_LENGTH EQU const_value +DEF SPRITESTATEDATA1_LENGTH EQU const_value ; spritestatedata2 struct members (see macros/wram.asm) const_def @@ -36,24 +36,24 @@ SPRITESTATEDATA1_LENGTH EQU const_value const SPRITESTATEDATA2_PICTUREID ; d const SPRITESTATEDATA2_IMAGEBASEOFFSET ; e const SPRITESTATEDATA2_0F ; f -SPRITESTATEDATA2_LENGTH EQU const_value +DEF SPRITESTATEDATA2_LENGTH EQU const_value -NUM_SPRITESTATEDATA_STRUCTS EQU 16 +DEF NUM_SPRITESTATEDATA_STRUCTS EQU 16 ; different kinds of people events -ITEM EQU $80 -TRAINER EQU $40 +DEF ITEM EQU $80 +DEF TRAINER EQU $40 -WALK EQU $FE -STAY EQU $FF +DEF WALK EQU $FE +DEF STAY EQU $FF -ANY_DIR EQU $00 -UP_DOWN EQU $01 -LEFT_RIGHT EQU $02 -DOWN EQU $D0 -UP EQU $D1 -LEFT EQU $D2 -RIGHT EQU $D3 -NONE EQU $FF +DEF ANY_DIR EQU $00 +DEF UP_DOWN EQU $01 +DEF LEFT_RIGHT EQU $02 +DEF DOWN EQU $D0 +DEF UP EQU $D1 +DEF LEFT EQU $D2 +DEF RIGHT EQU $D3 +DEF NONE EQU $FF -BOULDER_MOVEMENT_BYTE_2 EQU $10 +DEF BOULDER_MOVEMENT_BYTE_2 EQU $10 diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm index eafebe97..f1f0d417 100644 --- a/constants/menu_constants.asm +++ b/constants/menu_constants.asm @@ -1,5 +1,5 @@ -BAG_ITEM_CAPACITY EQU 20 -PC_ITEM_CAPACITY EQU 50 +DEF BAG_ITEM_CAPACITY EQU 20 +DEF PC_ITEM_CAPACITY EQU 50 ; text box IDs const_def 1 @@ -42,15 +42,15 @@ PC_ITEM_CAPACITY EQU 50 const TRADE_CANCEL_MENU ; 5 const HEAL_CANCEL_MENU ; 6 const NO_YES_MENU ; 7 -NUM_TWO_OPTION_MENUS EQU const_value +DEF NUM_TWO_OPTION_MENUS EQU const_value ; menu exit method constants for list menus and the buy/sell/quit menu -CHOSE_MENU_ITEM EQU 1 ; pressed A -CANCELLED_MENU EQU 2 ; pressed B +DEF CHOSE_MENU_ITEM EQU 1 ; pressed A +DEF CANCELLED_MENU EQU 2 ; pressed B ; menu exit method constants for two-option menus -CHOSE_FIRST_ITEM EQU 1 -CHOSE_SECOND_ITEM EQU 2 +DEF CHOSE_FIRST_ITEM EQU 1 +DEF CHOSE_SECOND_ITEM EQU 2 ; move mon constants const_def @@ -71,7 +71,7 @@ CHOSE_SECOND_ITEM EQU 2 ; party menu message IDs ; PartyMenuItemUseMessagePointers indexes (see engine/menus/party_menu.asm) const_next $F0 -FIRST_PARTY_MENU_TEXT_ID EQU const_value +DEF FIRST_PARTY_MENU_TEXT_ID EQU const_value const ANTIDOTE_MSG ; $F0 const BURN_HEAL_MSG ; $F1 const ICE_HEAL_MSG ; $F2 diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 4aff58da..84775608 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -1,6 +1,6 @@ ; Boolean checks -FALSE EQU 0 -TRUE EQU 1 +DEF FALSE EQU 0 +DEF TRUE EQU 1 ; flag operations const_def @@ -9,9 +9,9 @@ TRUE EQU 1 const FLAG_TEST ; 2 ; wOptions -TEXT_DELAY_FAST EQU %001 ; 1 -TEXT_DELAY_MEDIUM EQU %011 ; 3 -TEXT_DELAY_SLOW EQU %101 ; 5 +DEF TEXT_DELAY_FAST EQU %001 ; 1 +DEF TEXT_DELAY_MEDIUM EQU %011 ; 3 +DEF TEXT_DELAY_SLOW EQU %101 ; 5 const_def 6 const BIT_BATTLE_SHIFT ; 6 diff --git a/constants/move_animation_constants.asm b/constants/move_animation_constants.asm index dc8c94fb..3d62cd19 100644 --- a/constants/move_animation_constants.asm +++ b/constants/move_animation_constants.asm @@ -1,7 +1,7 @@ ; special effects that are part of move animations ; SpecialEffectPointers associates them with effect routines (see data/battle_anims/special_effect_pointers.asm) const_def $C0 -FIRST_SE_ID EQU const_value +DEF FIRST_SE_ID EQU const_value const_skip $18 const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc. const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite) @@ -132,7 +132,7 @@ FIRST_SE_ID EQU const_value const SUBANIM_53 const SUBANIM_54 const SUBANIM_55 -NUM_SUBANIMS EQU const_value +DEF NUM_SUBANIMS EQU const_value ; types of subanimations const_def @@ -268,7 +268,7 @@ NUM_SUBANIMS EQU const_value const FRAMEBLOCK_77 const FRAMEBLOCK_78 const FRAMEBLOCK_79 -NUM_FRAMEBLOCKS EQU const_value +DEF NUM_FRAMEBLOCKS EQU const_value ; base coordinates that are part of subanimations ; FrameBlockBaseCoords indexes (see data/battle_anims/base_coords.asm) @@ -450,7 +450,7 @@ NUM_FRAMEBLOCKS EQU const_value const BASECOORD_AE const BASECOORD_AF const BASECOORD_B0 -NUM_BASECOORDS EQU const_value +DEF NUM_BASECOORDS EQU const_value ; frame block modes that are part of subanimations const_def diff --git a/constants/move_constants.asm b/constants/move_constants.asm index 52c44210..570be95e 100644 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -171,7 +171,7 @@ const SLASH ; a3 const SUBSTITUTE ; a4 const STRUGGLE ; a5 -NUM_ATTACKS EQU const_value - 1 +DEF NUM_ATTACKS EQU const_value - 1 ; Moves do double duty as animation identifiers. @@ -213,4 +213,4 @@ NUM_ATTACKS EQU const_value - 1 const ROCK_ANIM ; throw rock const BAIT_ANIM ; throw bait -NUM_ATTACK_ANIMS EQU const_value - 1 +DEF NUM_ATTACK_ANIMS EQU const_value - 1 diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm index bc444647..8f33ece3 100644 --- a/constants/move_effect_constants.asm +++ b/constants/move_effect_constants.asm @@ -91,4 +91,4 @@ const LEECH_SEED_EFFECT ; $54 const SPLASH_EFFECT ; $55 const DISABLE_EFFECT ; $56 -NUM_MOVE_EFFECTS EQU const_value - 1 +DEF NUM_MOVE_EFFECTS EQU const_value - 1 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index fcca9005..e72e88d9 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -1,8 +1,8 @@ ; Song ids are calculated by address to save space. ; SFX_Headers_(1|2|3) indexes (see audio/headers/*.asm) -music_const: MACRO -\1 EQUS "((\2 - SFX_Headers_1) / 3)" +MACRO music_const + DEF \1 EQUS "((\2 - SFX_Headers_1) / 3)" ENDM ; AUDIO_1 @@ -57,7 +57,7 @@ ENDM music_const MUSIC_MEET_MALE_TRAINER, Music_MeetMaleTrainer ; AUDIO_1 AUDIO_2 AUDIO_3 -NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" +DEF NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" music_const SFX_NOISE_INSTRUMENT01, SFX_Noise_Instrument01_1 music_const SFX_NOISE_INSTRUMENT02, SFX_Noise_Instrument02_1 music_const SFX_NOISE_INSTRUMENT03, SFX_Noise_Instrument03_1 @@ -77,9 +77,9 @@ NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" music_const SFX_NOISE_INSTRUMENT17, SFX_Noise_Instrument17_1 music_const SFX_NOISE_INSTRUMENT18, SFX_Noise_Instrument18_1 music_const SFX_NOISE_INSTRUMENT19, SFX_Noise_Instrument19_1 -NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1" +DEF NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1" -CRY_SFX_START EQUS "SFX_CRY_00" +DEF CRY_SFX_START EQUS "SFX_CRY_00" music_const SFX_CRY_00, SFX_Cry00_1 music_const SFX_CRY_01, SFX_Cry01_1 music_const SFX_CRY_02, SFX_Cry02_1 @@ -118,7 +118,7 @@ CRY_SFX_START EQUS "SFX_CRY_00" music_const SFX_CRY_23, SFX_Cry23_1 music_const SFX_CRY_24, SFX_Cry24_1 music_const SFX_CRY_25, SFX_Cry25_1 -CRY_SFX_END EQUS "SFX_CRY_25 + 3" +DEF CRY_SFX_END EQUS "SFX_CRY_25 + 3" music_const SFX_GET_ITEM_2, SFX_Get_Item2_1 music_const SFX_TINK, SFX_Tink_1 @@ -163,7 +163,7 @@ CRY_SFX_END EQUS "SFX_CRY_25 + 3" ; AUDIO_1 music_const SFX_POKEFLUTE, SFX_Pokeflute music_const SFX_SAFARI_ZONE_PA, SFX_Safari_Zone_PA -MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" +DEF MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" ; AUDIO_2 music_const SFX_LEVEL_UP, SFX_Level_Up @@ -175,7 +175,7 @@ MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" music_const SFX_DEX_PAGE_ADDED, SFX_Dex_Page_Added music_const SFX_CAUGHT_MON, SFX_Caught_Mon -BATTLE_SFX_START EQUS "SFX_PECK" +DEF BATTLE_SFX_START EQUS "SFX_PECK" music_const SFX_PECK, SFX_Peck music_const SFX_FAINT_FALL, SFX_Faint_Fall music_const SFX_BATTLE_09, SFX_Battle_09 @@ -225,8 +225,8 @@ BATTLE_SFX_START EQUS "SFX_PECK" music_const SFX_BATTLE_35, SFX_Battle_35 music_const SFX_BATTLE_36, SFX_Battle_36 music_const SFX_SILPH_SCOPE, SFX_Silph_Scope -BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1" -MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" +DEF BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1" +DEF MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" ; AUDIO_3 music_const SFX_INTRO_LUNGE, SFX_Intro_Lunge @@ -239,6 +239,6 @@ MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" music_const SFX_SLOTS_REWARD, SFX_Slots_Reward music_const SFX_SLOTS_NEW_SPIN, SFX_Slots_New_Spin music_const SFX_SHOOTING_STAR, SFX_Shooting_Star -MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR" +DEF MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR" -SFX_STOP_ALL_MUSIC EQU $ff +DEF SFX_STOP_ALL_MUSIC EQU $ff diff --git a/constants/oam_constants.asm b/constants/oam_constants.asm index be63dc24..8c5e6be8 100644 --- a/constants/oam_constants.asm +++ b/constants/oam_constants.asm @@ -1,17 +1,17 @@ ; OAM flags used by this game -OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic -OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic +DEF OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic +DEF OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic ; OAM attribute flags -OAM_PALETTE EQU %111 -OAM_TILE_BANK EQU 3 -OAM_OBP_NUM EQU 4 ; Non CGB Mode Only -OAM_X_FLIP EQU 5 -OAM_Y_FLIP EQU 6 -OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) +DEF OAM_PALETTE EQU %111 +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) ; OAM attribute masks -OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1 -OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip -OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip -OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0) +DEF OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1 +DEF OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip +DEF OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip +DEF OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0) diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm index c26945e8..78d39c95 100644 --- a/constants/palette_constants.asm +++ b/constants/palette_constants.asm @@ -4,10 +4,10 @@ const SHADE_LIGHT ; %01 const SHADE_DARK ; %10 const SHADE_BLACK ; %11 -NUM_PAL_COLORS EQU const_value +DEF NUM_PAL_COLORS EQU const_value -PAL_COLOR_SIZE EQU 2 -PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE +DEF PAL_COLOR_SIZE EQU 2 +DEF PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE ; pal/blk packets ; SetPalFunctions indexes (see engine/gfx/palettes.asm) @@ -27,8 +27,8 @@ PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE const SET_PAL_GAME_FREAK_INTRO ; $0C const SET_PAL_TRAINER_CARD ; $0D -SET_PAL_PARTY_MENU_HP_BARS EQU $fc -SET_PAL_DEFAULT EQU $ff +DEF SET_PAL_PARTY_MENU_HP_BARS EQU $fc +DEF SET_PAL_DEFAULT EQU $ff ; sgb palettes ; SuperPalettes indexes (see data/sgb/sgb_palettes.asm) @@ -70,4 +70,4 @@ SET_PAL_DEFAULT EQU $ff const PAL_BADGE ; $22 const PAL_CAVE ; $23 const PAL_GAMEFREAK ; $24 -NUM_SGB_PALS EQU const_value +DEF NUM_SGB_PALS EQU const_value diff --git a/constants/pokedex_constants.asm b/constants/pokedex_constants.asm index a805b261..a839a03a 100644 --- a/constants/pokedex_constants.asm +++ b/constants/pokedex_constants.asm @@ -156,4 +156,4 @@ const DEX_MEWTWO ; 150 const DEX_MEW ; 151 -NUM_POKEMON EQU const_value - 1 +DEF NUM_POKEMON EQU const_value - 1 diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm index d01398b8..ea206bb8 100644 --- a/constants/pokemon_constants.asm +++ b/constants/pokemon_constants.asm @@ -198,12 +198,12 @@ const WEEPINBELL ; $BD const VICTREEBEL ; $BE -NUM_POKEMON_INDEXES EQU const_value - 1 +DEF NUM_POKEMON_INDEXES EQU const_value - 1 ; starters -STARTER1 EQU CHARMANDER -STARTER2 EQU SQUIRTLE -STARTER3 EQU BULBASAUR +DEF STARTER1 EQU CHARMANDER +DEF STARTER2 EQU SQUIRTLE +DEF STARTER3 EQU BULBASAUR ; ghost Marowak in Pokémon Tower -RESTLESS_SOUL EQU MAROWAK +DEF RESTLESS_SOUL EQU MAROWAK diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 6670f777..430abfe0 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -1,37 +1,37 @@ ; base data struct members (see data/pokemon/base_stats/*.asm) rsreset -BASE_DEX_NO rb -BASE_STATS rb NUM_STATS +DEF BASE_DEX_NO rb +DEF BASE_STATS rb NUM_STATS rsset BASE_STATS -BASE_HP rb -BASE_ATK rb -BASE_DEF rb -BASE_SPD rb -BASE_SPC rb -BASE_TYPES rw +DEF BASE_HP rb +DEF BASE_ATK rb +DEF BASE_DEF rb +DEF BASE_SPD rb +DEF BASE_SPC rb +DEF BASE_TYPES rw rsset BASE_TYPES -BASE_TYPE_1 rb -BASE_TYPE_2 rb -BASE_CATCH_RATE rb -BASE_EXP rb -BASE_PIC_SIZE rb -BASE_FRONTPIC rw -BASE_BACKPIC rw -BASE_MOVES rb NUM_MOVES -BASE_GROWTH_RATE rb -BASE_TMHM rb (NUM_TM_HM + 7) / 8 - rb_skip -BASE_DATA_SIZE EQU _RS +DEF BASE_TYPE_1 rb +DEF BASE_TYPE_2 rb +DEF BASE_CATCH_RATE rb +DEF BASE_EXP rb +DEF BASE_PIC_SIZE rb +DEF BASE_FRONTPIC rw +DEF BASE_BACKPIC rw +DEF BASE_MOVES rb NUM_MOVES +DEF BASE_GROWTH_RATE rb +DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 + rb_skip +DEF BASE_DATA_SIZE EQU _RS -PARTY_LENGTH EQU 6 +DEF PARTY_LENGTH EQU 6 -MONS_PER_BOX EQU 20 -NUM_BOXES EQU 12 +DEF MONS_PER_BOX EQU 20 +DEF NUM_BOXES EQU 12 -HOF_MON EQU $10 -HOF_TEAM EQU PARTY_LENGTH * HOF_MON -HOF_TEAM_CAPACITY EQU 50 +DEF HOF_MON EQU $10 +DEF HOF_TEAM EQU PARTY_LENGTH * HOF_MON +DEF HOF_TEAM_CAPACITY EQU 50 ; mon data locations @@ -52,8 +52,8 @@ HOF_TEAM_CAPACITY EQU 50 const EV_ITEM ; 2 const EV_TRADE ; 3 -MAX_EVOLUTIONS EQU 3 -EVOLUTION_SIZE EQU 4 +DEF MAX_EVOLUTIONS EQU 3 +DEF EVOLUTION_SIZE EQU 4 ; wMonHGrowthRate values @@ -65,8 +65,8 @@ EVOLUTION_SIZE EQU 4 const GROWTH_MEDIUM_SLOW const GROWTH_FAST const GROWTH_SLOW -NUM_GROWTH_RATES EQU const_value +DEF NUM_GROWTH_RATES EQU const_value ; wild data (see data/wild/maps/*.asm) -NUM_WILDMONS EQU 10 -WILDDATA_LENGTH EQU 1 + NUM_WILDMONS * 2 +DEF NUM_WILDMONS EQU 10 +DEF WILDDATA_LENGTH EQU 1 + NUM_WILDMONS * 2 diff --git a/constants/script_constants.asm b/constants/script_constants.asm index fe50e8ae..d4543f05 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -5,17 +5,17 @@ const SMILE_BUBBLE ; 2 ; slot symbols -SLOTS7 EQU $0200 -SLOTSBAR EQU $0604 -SLOTSCHERRY EQU $0A08 -SLOTSFISH EQU $0E0C -SLOTSBIRD EQU $1210 -SLOTSMOUSE EQU $1614 +DEF SLOTS7 EQU $0200 +DEF SLOTSBAR EQU $0604 +DEF SLOTSCHERRY EQU $0A08 +DEF SLOTSFISH EQU $0E0C +DEF SLOTSBIRD EQU $1210 +DEF SLOTSMOUSE EQU $1614 ; StartSlotMachine dialogs -SLOTS_OUTOFORDER EQU $fd -SLOTS_OUTTOLUNCH EQU $fe -SLOTS_SOMEONESKEYS EQU $ff +DEF SLOTS_OUTOFORDER EQU $fd +DEF SLOTS_OUTTOLUNCH EQU $fe +DEF SLOTS_SOMEONESKEYS EQU $ff ; in game trades ; TradeMons indexes (see data/events/trades.asm) @@ -30,7 +30,7 @@ SLOTS_SOMEONESKEYS EQU $ff const TRADE_FOR_DORIS const TRADE_FOR_CRINKLES const TRADE_FOR_SPOT -NUM_NPC_TRADES EQU const_value +DEF NUM_NPC_TRADES EQU const_value ; in game trade dialog sets ; InGameTradeTextPointers indexes (see engine/events/in_game_trades.asm) @@ -50,10 +50,10 @@ NUM_NPC_TRADES EQU const_value const BIT_MARSHBADGE ; 5 const BIT_VOLCANOBADGE ; 6 const BIT_EARTHBADGE ; 7 -NUM_BADGES EQU const_value +DEF NUM_BADGES EQU const_value ; OaksAideScript results -OAKS_AIDE_BAG_FULL EQU $00 -OAKS_AIDE_GOT_ITEM EQU $01 -OAKS_AIDE_NOT_ENOUGH_MONS EQU $80 -OAKS_AIDE_REFUSED EQU $ff +DEF OAKS_AIDE_BAG_FULL EQU $00 +DEF OAKS_AIDE_GOT_ITEM EQU $01 +DEF OAKS_AIDE_NOT_ENOUGH_MONS EQU $80 +DEF OAKS_AIDE_REFUSED EQU $ff diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm index a6aae315..16603980 100644 --- a/constants/serial_constants.asm +++ b/constants/serial_constants.asm @@ -1,27 +1,27 @@ -ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 -ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 +DEF ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 +DEF ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 -USING_EXTERNAL_CLOCK EQU $01 -USING_INTERNAL_CLOCK EQU $02 -CONNECTION_NOT_ESTABLISHED EQU $ff +DEF USING_EXTERNAL_CLOCK EQU $01 +DEF USING_INTERNAL_CLOCK EQU $02 +DEF CONNECTION_NOT_ESTABLISHED EQU $ff ; signals the start of an array of bytes transferred over the link cable -SERIAL_PREAMBLE_BYTE EQU $FD +DEF SERIAL_PREAMBLE_BYTE EQU $FD ; this byte is used when there is no data to send -SERIAL_NO_DATA_BYTE EQU $FE +DEF SERIAL_NO_DATA_BYTE EQU $FE ; signals the end of one part of a patch list (there are two parts) for player/enemy party data -SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF +DEF SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF -LINK_STATE_NONE EQU $00 ; not using link -LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) -LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation -LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation -LINK_STATE_BATTLING EQU $04 ; in a link battle -LINK_STATE_RESET EQU $05 ; reset game (unused) -LINK_STATE_TRADING EQU $32 ; in a link trade +DEF LINK_STATE_NONE EQU $00 ; not using link +DEF LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) +DEF LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation +DEF LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation +DEF LINK_STATE_BATTLING EQU $04 ; in a link battle +DEF LINK_STATE_RESET EQU $05 ; reset game (unused) +DEF LINK_STATE_TRADING EQU $32 ; in a link trade -LINKBATTLE_RUN EQU $F -LINKBATTLE_STRUGGLE EQU $E -LINKBATTLE_NO_ACTION EQU $D +DEF LINKBATTLE_RUN EQU $F +DEF LINKBATTLE_STRUGGLE EQU $E +DEF LINKBATTLE_NO_ACTION EQU $D diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index ee7238d9..700ec47a 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -62,7 +62,7 @@ const SPRITE_BRUNO ; $3a const SPRITE_LORELEI ; $3b const SPRITE_SEEL ; $3c -FIRST_STILL_SPRITE EQU const_value +DEF FIRST_STILL_SPRITE EQU const_value const SPRITE_POKE_BALL ; $3d const SPRITE_FOSSIL ; $3e const SPRITE_BOULDER ; $3f @@ -75,4 +75,4 @@ FIRST_STILL_SPRITE EQU const_value const SPRITE_UNUSED_GAMBLER_ASLEEP_1 ; $46 const SPRITE_UNUSED_GAMBLER_ASLEEP_2 ; $47 const SPRITE_GAMBLER_ASLEEP ; $48 -NUM_SPRITES EQU const_value - 1 +DEF NUM_SPRITES EQU const_value - 1 diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm index e1104262..44dc0fa9 100644 --- a/constants/sprite_data_constants.asm +++ b/constants/sprite_data_constants.asm @@ -11,7 +11,7 @@ const NPC_MOVEMENT_LEFT ; $80 const NPC_MOVEMENT_RIGHT ; $C0 -NPC_CHANGE_FACING EQU $E0 +DEF NPC_CHANGE_FACING EQU $E0 ; player direction constants const_def @@ -20,7 +20,7 @@ NPC_CHANGE_FACING EQU $E0 const PLAYER_DIR_BIT_DOWN ; 2 const PLAYER_DIR_BIT_UP ; 3 -PLAYER_DIR_RIGHT EQU 1 << PLAYER_DIR_BIT_RIGHT -PLAYER_DIR_LEFT EQU 1 << PLAYER_DIR_BIT_LEFT -PLAYER_DIR_DOWN EQU 1 << PLAYER_DIR_BIT_DOWN -PLAYER_DIR_UP EQU 1 << PLAYER_DIR_BIT_UP +DEF PLAYER_DIR_RIGHT EQU 1 << PLAYER_DIR_BIT_RIGHT +DEF PLAYER_DIR_LEFT EQU 1 << PLAYER_DIR_BIT_LEFT +DEF PLAYER_DIR_DOWN EQU 1 << PLAYER_DIR_BIT_DOWN +DEF PLAYER_DIR_UP EQU 1 << PLAYER_DIR_BIT_UP diff --git a/constants/text_constants.asm b/constants/text_constants.asm index e0d36148..5943457b 100644 --- a/constants/text_constants.asm +++ b/constants/text_constants.asm @@ -1,6 +1,6 @@ -NAME_LENGTH EQU 11 -ITEM_NAME_LENGTH EQU 13 -NAME_BUFFER_LENGTH EQU 20 +DEF NAME_LENGTH EQU 11 +DEF ITEM_NAME_LENGTH EQU 13 +DEF NAME_BUFFER_LENGTH EQU 20 ; PrintNumber const_def 5 @@ -8,9 +8,9 @@ NAME_BUFFER_LENGTH EQU 20 const BIT_LEFT_ALIGN ; 6 const BIT_LEADING_ZEROES ; 7 -MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) -LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) -LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) +DEF MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) +DEF LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) +DEF LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) ; special text IDs (see home/text_script.asm) const_def $d0 @@ -19,4 +19,4 @@ LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) const TEXT_REPEL_WORE_OFF ; $d2 const TEXT_SAFARI_GAME_OVER ; $d3 -TEXT_START_MENU EQU $00 +DEF TEXT_START_MENU EQU $00 diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index 446df021..e7fe88f5 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -25,4 +25,4 @@ const CLUB ; 21 const FACILITY ; 22 const PLATEAU ; 23 -NUM_TILESETS EQU const_value +DEF NUM_TILESETS EQU const_value diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 14b662f3..4daf8a96 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -1,8 +1,8 @@ -OPP_ID_OFFSET EQU 200 +DEF OPP_ID_OFFSET EQU 200 -trainer_const: MACRO +MACRO trainer_const const \1 -OPP_\1 EQU OPP_ID_OFFSET + \1 + DEF OPP_\1 EQU OPP_ID_OFFSET + \1 ENDM ; trainer class ids @@ -62,4 +62,4 @@ ENDM trainer_const CHANNELER ; $2D trainer_const AGATHA ; $2E trainer_const LANCE ; $2F -NUM_TRAINERS EQU const_value - 1 +DEF NUM_TRAINERS EQU const_value - 1 diff --git a/constants/type_constants.asm b/constants/type_constants.asm index 24817c20..e9df7faf 100644 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -1,7 +1,7 @@ ; TypeNames indexes (see data/types/names.asm) const_def -PHYSICAL EQU const_value +DEF PHYSICAL EQU const_value const NORMAL ; $00 const FIGHTING ; $01 const FLYING ; $02 @@ -14,7 +14,7 @@ PHYSICAL EQU const_value const_next 20 -SPECIAL EQU const_value +DEF SPECIAL EQU const_value const FIRE ; $14 const WATER ; $15 const GRASS ; $16 @@ -23,4 +23,4 @@ SPECIAL EQU const_value const ICE ; $19 const DRAGON ; $1A -NUM_TYPES EQU const_value +DEF NUM_TYPES EQU const_value -- cgit v1.3.1-sl0p From 6c945a6b6a0d21ba4bf0c2977bb44d2482dffcb8 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 7 Jun 2022 22:27:30 -0400 Subject: Mention WildDataPointers in map_constants.asm --- constants/map_constants.asm | 1 + 1 file changed, 1 insertion(+) (limited to 'constants') diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 86e18e62..48b25461 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -12,6 +12,7 @@ ENDM ; - MapHSPointers (see data/maps/hide_show_data.asm) ; - MapSpriteSets (see data/maps/sprite_sets.asm) ; - ExternalMapEntries (see data/maps/town_map_entries.asm) +; - WildDataPointers (see data/wild/grass_water.asm) ; Each map also has associated data in maps.asm. ; Order: towns/cities, then routes, then indoor/dungeon maps const_def -- cgit v1.3.1-sl0p From edb55e00f84024dd3634a25df8715e8b9cb3454b Mon Sep 17 00:00:00 2001 From: vulcandth Date: Fri, 17 Jun 2022 21:25:52 -0500 Subject: Rename `SLP` to `SLP_MASK` (#361) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/battle_constants.asm | 2 +- engine/battle/core.asm | 14 +++++++------- engine/battle/move_effects/haze.asm | 2 +- engine/items/item_effects.asm | 10 +++++----- engine/pokemon/status_ailments.asm | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'constants') diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index b394b7a2..2ae1cdef 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -57,7 +57,7 @@ DEF NOT_VERY_EFFECTIVE EQU 05 DEF NO_EFFECT EQU 00 ; non-volatile statuses -DEF SLP EQU %111 ; sleep counter +DEF SLP_MASK EQU %111 ; 0-7 turns const_def 3 const PSN ; 3 const BRN ; 4 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 66ca1aa9..1a252c02 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -308,7 +308,7 @@ MainInBattleLoop: and a ret nz ; return if pokedoll was used to escape from battle ld a, [wBattleMonStatus] - and (1 << FRZ) | SLP ; is mon frozen or asleep? + and (1 << FRZ) | SLP_MASK jr nz, .selectEnemyMove ; if so, jump ld a, [wPlayerBattleStatus1] and (1 << STORING_ENERGY) | (1 << USING_TRAPPING_MOVE) ; check player is using Bide or using a multi-turn attack like wrap @@ -2934,7 +2934,7 @@ SelectEnemyMove: and (1 << CHARGING_UP) | (1 << THRASHING_ABOUT) ; using a charging move or thrash/petal dance ret nz ld a, [wEnemyMonStatus] - and SLP | 1 << FRZ ; sleeping or frozen + and (1 << FRZ) | SLP_MASK ret nz ld a, [wEnemyBattleStatus1] and (1 << USING_TRAPPING_MOVE) | (1 << STORING_ENERGY) ; using a trapping move like wrap or bide @@ -3275,7 +3275,7 @@ PrintGhostText: and a jr nz, .Ghost ld a, [wBattleMonStatus] ; player's turn - and SLP | (1 << FRZ) + and (1 << FRZ) | SLP_MASK ret nz ld hl, ScaredText call PrintText @@ -3317,7 +3317,7 @@ IsGhostBattle: CheckPlayerStatusConditions: ld hl, wBattleMonStatus ld a, [hl] - and SLP ; sleep mask + and SLP_MASK jr z, .FrozenCheck ; sleeping dec a @@ -4029,7 +4029,7 @@ CheckForDisobedience: call BattleRandom add a swap a - and SLP ; sleep mask + and SLP_MASK jr z, .monNaps ; keep trying until we get at least 1 turn of sleep ld [wBattleMonStatus], a ld hl, BeganToNapText @@ -5362,7 +5362,7 @@ MoveHitTest: cp DREAM_EATER_EFFECT jr nz, .swiftCheck ld a, [bc] - and SLP ; is the target pokemon sleeping? + and SLP_MASK jp z, .moveMissed .swiftCheck ld a, [de] @@ -5796,7 +5796,7 @@ ExecuteEnemyMoveDone: CheckEnemyStatusConditions: ld hl, wEnemyMonStatus ld a, [hl] - and SLP ; sleep mask + and SLP_MASK jr z, .checkIfFrozen dec a ; decrement number of turns left ld [wEnemyMonStatus], a diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm index c15c848b..76722d0e 100644 --- a/engine/battle/move_effects/haze.asm +++ b/engine/battle/move_effects/haze.asm @@ -24,7 +24,7 @@ HazeEffect_: .cureStatuses ld a, [hl] ld [hl], $0 - and SLP | (1 << FRZ) + and (1 << FRZ) | SLP_MASK jr z, .cureVolatileStatuses ; prevent the Pokemon from executing a move if it was asleep or frozen ld a, $ff diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f58b737e..16b4140a 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -225,7 +225,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skipAilmentValueSubtraction ; no ailments - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld c, 12 jr z, .notFrozenOrAsleep ld c, 25 @@ -380,7 +380,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skip5 - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld b, 5 jr z, .addAilmentValue ld b, 10 @@ -878,7 +878,7 @@ ItemUseMedicine: lb bc, ICE_HEAL_MSG, 1 << FRZ cp ICE_HEAL jr z, .checkMonStatus - lb bc, AWAKENING_MSG, SLP + lb bc, AWAKENING_MSG, SLP_MASK cp AWAKENING jr z, .checkMonStatus lb bc, PARALYZ_HEAL_MSG, 1 << PAR @@ -1700,7 +1700,7 @@ ItemUsePokeflute: .inBattle xor a ld [wWereAnyMonsAsleep], a - ld b, ~SLP & $ff + ld b, ~SLP_MASK ld hl, wPartyMon1Status call WakeUpEntireParty ld a, [wIsInBattle] @@ -1752,7 +1752,7 @@ WakeUpEntireParty: .loop ld a, [hl] push af - and SLP ; is pokemon asleep? + and SLP_MASK jr z, .notAsleep ld a, 1 ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up diff --git a/engine/pokemon/status_ailments.asm b/engine/pokemon/status_ailments.asm index 3da1fc43..05205a34 100644 --- a/engine/pokemon/status_ailments.asm +++ b/engine/pokemon/status_ailments.asm @@ -8,7 +8,7 @@ PrintStatusAilment:: jr nz, .frz bit PAR, a jr nz, .par - and SLP + and SLP_MASK ret z ld a, "S" ld [hli], a -- cgit v1.3.1-sl0p From 70cbb483288cd048f85420a63caadc707e9b75bf Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 4 Jul 2022 00:08:17 -0500 Subject: party_struct constants and ExchangeBytes size (#364) Co-Authored-By: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/pokemon_data_constants.asm | 31 +++++++++++++++++++++++++++++++ constants/serial_constants.asm | 4 ++++ engine/link/cable_club.asm | 6 +++--- 3 files changed, 38 insertions(+), 3 deletions(-) (limited to 'constants') diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 430abfe0..1fd7ce19 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -23,6 +23,37 @@ DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 rb_skip DEF BASE_DATA_SIZE EQU _RS +; party_struct members (see macros/wram.asm) +rsreset +DEF MON_SPECIES rb +DEF MON_HP rw +DEF MON_BOX_LEVEL rb +DEF MON_STATUS rb +DEF MON_TYPE rw +rsset MON_TYPE +DEF MON_TYPE1 rb +DEF MON_TYPE2 rb +DEF MON_CATCH_RATE rb +DEF MON_MOVES rb NUM_MOVES +DEF MON_OTID rw +DEF MON_EXP rb 3 +DEF MON_HP_EXP rw +DEF MON_ATK_EXP rw +DEF MON_DEF_EXP rw +DEF MON_SPD_EXP rw +DEF MON_SPC_EXP rw +DEF MON_DVS rw +DEF MON_PP rb NUM_MOVES +DEF BOXMON_STRUCT_LENGTH EQU _RS +DEF MON_LEVEL rb +DEF MON_STATS rw NUM_STATS +rsset MON_STATS +DEF MON_MAXHP rw +DEF MON_ATK rw +DEF MON_DEF rw +DEF MON_SPD rw +DEF MON_SPC rw +DEF PARTYMON_STRUCT_LENGTH EQU _RS DEF PARTY_LENGTH EQU 6 diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm index 16603980..37747b76 100644 --- a/constants/serial_constants.asm +++ b/constants/serial_constants.asm @@ -14,6 +14,10 @@ DEF SERIAL_NO_DATA_BYTE EQU $FE ; signals the end of one part of a patch list (there are two parts) for player/enemy party data DEF SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF +DEF SERIAL_PREAMBLE_LENGTH EQU 6 +DEF SERIAL_RN_PREAMBLE_LENGTH EQU 7 +DEF SERIAL_RNS_LENGTH EQU 10 + DEF LINK_STATE_NONE EQU $00 ; not using link DEF LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) DEF LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 40e0dfe8..7e856093 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -123,21 +123,21 @@ CableClub_DoBattleOrTradeAgain: ldh [rIE], a ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock - ld bc, $11 + ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH vc_hook Wireless_ExchangeBytes_RNG_state_unknown_Type5 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock - ld bc, $1a8 + ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + 1 + PARTY_LENGTH + 1 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3 vc_hook Wireless_ExchangeBytes_party_structs call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList - ld bc, $c8 + ld bc, 200 vc_hook Wireless_ExchangeBytes_patch_lists call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) -- cgit v1.3.1-sl0p From a24a39793c7672eabd8ddd6666a28f498e994935 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Mon, 4 Jul 2022 02:10:14 -0300 Subject: Identify the rest of the hardware constants (#371) See https://github.com/pret/pokecrystal/pull/972 and https://github.com/pret/pokecrystal/pull/947 for details. --- constants/hardware_constants.asm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'constants') diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 0cc83383..fba15087 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -119,12 +119,8 @@ DEF rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index DEF rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data -DEF rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only +DEF rOPRI EQU $ff6c ; CGB Mode Only - Object Priority Mode 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 rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) -DEF rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) +DEF rPCM12 EQU $ff76 ; Channels 1 & 2 Amplitude (R) +DEF rPCM34 EQU $ff77 ; Channels 3 & 4 Amplitude (R) DEF rIE EQU $ffff ; Interrupt Enable (R/W) -- cgit v1.3.1-sl0p From cc46b0e510e07f2e7a0d14732c02a2f416eac9e1 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sat, 9 Jul 2022 18:18:18 -0300 Subject: wOAMBuffer -> wShadowOAM (#370) --- constants/gfx_constants.asm | 2 +- engine/battle/animations.asm | 32 ++++++++++++++++---------------- engine/battle/battle_transitions.asm | 2 +- engine/battle/core.asm | 4 ++-- engine/battle/draw_hud_pokeball_gfx.asm | 8 ++++---- engine/battle/ghost_marowak_anim.asm | 2 +- engine/events/diploma.asm | 2 +- engine/gfx/mon_icons.asm | 8 ++++---- engine/gfx/oam_dma.asm | 2 +- engine/gfx/sprite_oam.asm | 6 +++--- engine/items/item_effects.asm | 2 +- engine/items/town_map.asm | 20 ++++++++++---------- engine/menus/start_sub_menus.asm | 2 +- engine/movie/intro.asm | 4 ++-- engine/movie/splash.asm | 18 +++++++++--------- engine/movie/title.asm | 4 ++-- engine/movie/title2.asm | 2 +- engine/movie/trade.asm | 6 +++--- engine/overworld/cut.asm | 2 +- engine/overworld/cut2.asm | 22 +++++++++++----------- engine/overworld/dust_smoke.asm | 2 +- engine/overworld/emotion_bubbles.asm | 8 ++++---- engine/overworld/healing_machine.asm | 2 +- engine/overworld/player_animations.asm | 24 ++++++++++++------------ engine/slots/slot_machine.asm | 6 +++--- home/clear_sprites.asm | 6 +++--- home/oam.asm | 2 +- ram/wram.asm | 8 ++++---- scripts/VermilionDock.asm | 2 +- 29 files changed, 105 insertions(+), 105 deletions(-) (limited to 'constants') diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 522b6a67..c6268208 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -17,7 +17,7 @@ DEF HP_BAR_GREEN EQU 0 DEF HP_BAR_YELLOW EQU 1 DEF HP_BAR_RED EQU 2 -; wOAMBuffer +; wShadowOAM DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 7ad1bb3e..789dcb8a 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -147,7 +147,7 @@ DrawFrameBlock: jr z, .resetFrameBlockDestAddr call AnimationCleanOAM .resetFrameBlockDestAddr - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -583,7 +583,7 @@ PlaySubanimation: call GetMoveSound call PlaySound .skipPlayingSound - ld hl, wOAMBuffer ; base address of OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -855,7 +855,7 @@ TradeShakePokeball: ; if it's the end of the animation, make the ball jump up ld de, BallMoveDistances1 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -885,7 +885,7 @@ BallMoveDistances1: TradeJumpPokeball: ld de, BallMoveDistances2 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -925,8 +925,8 @@ BallMoveDistances2: ; this function copies the current musical note graphic ; so that there are two musical notes flying towards the defending pokemon DoGrowlSpecialEffects: - ld hl, wOAMBuffer ; OAM buffer - ld de, wOAMBuffer + $10 + ld hl, wShadowOAM + ld de, wShadowOAMSprite04 ld bc, $10 call CopyData ; copy the musical note graphic ld a, [wSubAnimCounter] @@ -1136,7 +1136,7 @@ AnimationWaterDropletsEverywhere: ret _AnimationWaterDroplets: - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop ld a, [wBaseCoordY] ld [hli], a ; Y @@ -1264,7 +1264,7 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ld [wBaseCoordX], a ld a, $30 ld [wBaseCoordY], a - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 ld c, 7 .loop @@ -1498,7 +1498,7 @@ AnimationSpiralBallsInward: .loop push hl ld c, 3 - ld de, wOAMBuffer + ld de, wShadowOAM .innerLoop ld a, [hl] cp $ff @@ -1637,7 +1637,7 @@ _AnimationShootBallsUpward: call LoadAnimationTileset pop bc ld d, $7a ; ball tile - ld hl, wOAMBuffer + ld hl, wShadowOAM push bc ld a, [wBaseCoordY] ld e, a @@ -1651,7 +1651,7 @@ _AnimationShootBallsUpward: ld [wNumShootingBalls], a .loop push bc - ld hl, wOAMBuffer + ld hl, wShadowOAM .innerLoop ld a, [wBaseCoordY] add 8 @@ -2080,7 +2080,7 @@ InitMultipleObjectsOAM: xor a ld e, a ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop call BattleAnimWriteOAMEntry dec c @@ -2336,7 +2336,7 @@ AnimationFallingObjects: call InitMultipleObjectsOAM call FallingObjects_InitXCoords call FallingObjects_InitMovementData - ld hl, wOAMBuffer + ld hl, wShadowOAM ld [hl], 0 .loop ld hl, wFallingObjectsMovementData @@ -2363,7 +2363,7 @@ AnimationFallingObjects: dec c jr nz, .innerLoop call Delay3 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [hl] ; Y cp 104 ; has the top falling object reached 104 yet? jr nz, .loop ; keep moving the falling objects down until it does @@ -2372,7 +2372,7 @@ AnimationFallingObjects: FallingObjects_UpdateOAMEntry: ; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's ; movement byte. - ld hl, wOAMBuffer + ld hl, wShadowOAM add hl, de ld a, [hl] inc a @@ -2433,7 +2433,7 @@ FallingObjects_UpdateMovementByte: ret FallingObjects_InitXCoords: - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld de, FallingObjects_InitialXCoords ld a, [wNumFallingObjects] ld c, a diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index bc4665e4..a16fd250 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -26,7 +26,7 @@ BattleTransition: jr nz, .loop1 ; Clear OAM except for the blocks used by the player and enemy trainer sprites. - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld c, 9 .loop2 ld a, b diff --git a/engine/battle/core.asm b/engine/battle/core.asm index c746e52b..580a9899 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -105,7 +105,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop SlidePlayerHeadLeft: push bc - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld c, $15 ; number of OAM entries ld de, $4 ; size of OAM entry .loop @@ -6327,7 +6327,7 @@ LoadPlayerBackPic: ASSERT BANK(RedPicBack) == BANK(OldManPicBack) call UncompressSpriteFromDE predef ScaleSpriteByTwo - ld hl, wOAMBuffer + ld hl, wShadowOAM xor a ldh [hOAMTile], a ; initial tile number ld b, $7 ; 7 columns diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm index 097a0fcc..34bff58d 100644 --- a/engine/battle/draw_hud_pokeball_gfx.asm +++ b/engine/battle/draw_hud_pokeball_gfx.asm @@ -27,7 +27,7 @@ SetupOwnPartyPokeballs: ld [hl], a ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM jp WritePokeballOAMData SetupEnemyPartyPokeballs: @@ -41,7 +41,7 @@ SetupEnemyPartyPokeballs: ld [hl], $20 ld a, -8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + PARTY_LENGTH * 4 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData SetupPokeballs: @@ -174,7 +174,7 @@ SetupPlayerAndEnemyPokeballs: ld [hl], $40 ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM call WritePokeballOAMData ld hl, wEnemyMons ld de, wEnemyPartyCount @@ -183,7 +183,7 @@ SetupPlayerAndEnemyPokeballs: ld a, $50 ld [hli], a ld [hl], $68 - ld hl, wOAMBuffer + $18 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData ; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon) diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm index 9c1ad96f..a7f4d025 100644 --- a/engine/battle/ghost_marowak_anim.asm +++ b/engine/battle/ghost_marowak_anim.asm @@ -58,7 +58,7 @@ CopyMonPicFromBGToSpriteVRAM: ld [wBaseCoordY], a ld a, $70 ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, 6, 6 ld d, $8 .oamLoop diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 7c48c086..41e0d7c6 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -42,7 +42,7 @@ DisplayDiploma:: ; Move the player 33 pixels right and set the priority bit so he appears ; behind the background layer. - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord lb bc, $80, $28 .adjustPlayerGfxLoop ld a, [hl] ; X diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 6f6b88c7..73b1632f 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -43,7 +43,7 @@ GetAnimationSpeed: .resetSprites push bc ld hl, wMonPartySpritesSavedOAM - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $60 call CopyData pop bc @@ -51,7 +51,7 @@ GetAnimationSpeed: jr .incTimer .animateSprite push bc - ld hl, wOAMBuffer + $02 ; OAM tile id + ld hl, wShadowOAMSprite00TileID ld bc, $10 ld a, [wCurrentMenuItem] call AddNTimes @@ -236,7 +236,7 @@ WriteMonPartySpriteOAM: ; make a copy at wMonPartySpritesSavedOAM. push af ld c, $10 - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ldh a, [hPartyMonIndex] swap a ld l, a @@ -252,7 +252,7 @@ WriteMonPartySpriteOAM: ; Make a copy of the OAM buffer with the first animation frame written so that ; we can flip back to it from the second frame by copying it back. .makeCopy - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wMonPartySpritesSavedOAM ld bc, $60 jp CopyData diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm index fe93e90d..11e52694 100644 --- a/engine/gfx/oam_dma.asm +++ b/engine/gfx/oam_dma.asm @@ -16,7 +16,7 @@ DMARoutine: LOAD "OAM DMA", HRAM hDMARoutine:: ; initiate DMA - ld a, HIGH(wOAMBuffer) + ld a, HIGH(wShadowOAM) ldh [rDMA], a ; wait for DMA to finish ld a, $28 diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm index b3c07ecd..69956a31 100644 --- a/engine/gfx/sprite_oam.asm +++ b/engine/gfx/sprite_oam.asm @@ -1,6 +1,6 @@ PrepareOAMData:: ; Determine OAM data for currently visible -; sprites and write it to wOAMBuffer. +; sprites and write it to wShadowOAM. ld a, [wUpdateSpritesEnabled] dec a @@ -79,7 +79,7 @@ PrepareOAMData:: ldh a, [hOAMBufferOffset] ld e, a - ld d, HIGH(wOAMBuffer) + ld d, HIGH(wShadowOAM) .tileLoop ldh a, [hSpriteScreenY] ; temp for sprite Y position @@ -147,7 +147,7 @@ PrepareOAMData:: ; Clear unused OAM. ldh a, [hOAMBufferOffset] ld l, a - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ld de, $4 ld b, $a0 ld a, [wd736] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 16b4140a..faba8837 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1175,7 +1175,7 @@ ItemUseMedicine: xor a ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld bc, 2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index 93047216..d278d034 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -16,7 +16,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $10 call CopyData @@ -47,7 +47,7 @@ DisplayTownMap: call TownMapCoordsToOAMCoords ld a, $4 ld [wOAMBaseTile], a - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 call WriteTownMapSpriteOAM ; town map cursor sprite pop hl ld de, wcd6d @@ -60,7 +60,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld de, wTileMapBackup + 16 ld bc, $10 call CopyData @@ -362,7 +362,7 @@ DrawPlayerOrBirdSprite: inc de cp "@" jr nz, .loop - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -370,7 +370,7 @@ DrawPlayerOrBirdSprite: DisplayWildLocations: farcall FindWildLocationsOfMon call ZeroOutDuplicatesInList - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTownMapCoords .loop ld a, [de] @@ -410,7 +410,7 @@ DisplayWildLocations: ld b, $0 call DrawPlayerOrBirdSprite .done - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -439,9 +439,9 @@ TownMapCoordsToOAMCoords: WritePlayerOrBirdSpriteOAM: ld a, [wOAMBaseTile] and a - ld hl, wOAMBuffer + $90 ; for player sprite + ld hl, wShadowOAMSprite36 ; for player sprite jr z, WriteTownMapSpriteOAM - ld hl, wOAMBuffer + $80 ; for bird sprite + ld hl, wShadowOAMSprite32 ; for bird sprite WriteTownMapSpriteOAM: push hl @@ -600,13 +600,13 @@ TownMapSpriteBlinkingAnimation:: jr nz, .done ; show sprites when the counter reaches 50 ld hl, wTileMapBackup - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $90 call CopyData xor a jr .done .hideSprites - ld hl, wOAMBuffer + ld hl, wShadowOAM ld b, $24 ld de, $4 .hideSpritesLoop diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index dbc6ab89..7dfb7dc3 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -677,7 +677,7 @@ SwitchPartyMon_ClearGfx: dec c jr nz, .clearMonBGLoop pop af - ld hl, wOAMBuffer + ld hl, wShadowOAM ld bc, $10 call AddNTimes ld de, $4 diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index bca095a8..f489c60b 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -158,7 +158,7 @@ AnimateIntroNidorino: jr AnimateIntroNidorino UpdateIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [wIntroNidorinoBaseTile] ld d, a .loop @@ -177,7 +177,7 @@ UpdateIntroNidorinoOAM: ret InitIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 .loop push bc diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm index eede8ccb..2373a0f9 100644 --- a/engine/movie/splash.asm +++ b/engine/movie/splash.asm @@ -16,11 +16,11 @@ LoadShootingStarGraphics: lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10 call CopyVideoData ld hl, GameFreakLogoOAMData - ld de, wOAMBuffer + $60 + ld de, wShadowOAMSprite24 ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData call CopyData ld hl, GameFreakShootingStarOAMData - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData jp CopyData @@ -30,7 +30,7 @@ AnimateShootingStar: call PlaySound ; Move the big star down and left across the screen. - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, $a0, $4 .bigStarLoop push hl @@ -60,7 +60,7 @@ AnimateShootingStar: jr nz, .bigStarLoop ; Clear big star OAM. - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, 4 ld de, 4 .clearOAMLoop @@ -83,7 +83,7 @@ AnimateShootingStar: ; Copy 24 instances of the small stars OAM data. ; Note that their coordinates put them off-screen. - ld de, wOAMBuffer + ld de, wShadowOAM ld a, 24 .initSmallStarsOAMLoop push af @@ -106,7 +106,7 @@ AnimateShootingStar: ld d, a push bc push hl - ld hl, wOAMBuffer + $50 + ld hl, wShadowOAMSprite20 ld c, 4 .smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries ld a, [de] @@ -131,8 +131,8 @@ AnimateShootingStar: push af ; shift the existing OAM entries down to make room for the next wave - ld hl, wOAMBuffer + $10 - ld de, wOAMBuffer + ld hl, wShadowOAMSprite04 + ld de, wShadowOAM ld bc, $50 call CopyData @@ -186,7 +186,7 @@ SmallStarsEmptyWave: MoveDownSmallStars: ld b, 8 .loop - ld hl, wOAMBuffer + $5c + ld hl, wShadowOAMSprite23 ld a, [wMoveDownSmallStarsOAMCount] ld de, -4 ld c, a diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 8f97f8fa..1ee0cc25 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -93,7 +93,7 @@ DisplayTitleScreen: call DrawPlayerCharacter ; put a pokeball in the player's hand - ld hl, wOAMBuffer + $28 + ld hl, wShadowOAMSprite10 ld a, $74 ld [hl], a @@ -322,7 +322,7 @@ DrawPlayerCharacter: call ClearSprites xor a ld [wPlayerCharacterOAMTile], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb de, $60, $5a ld b, 7 .loop diff --git a/engine/movie/title2.asm b/engine/movie/title2.asm index 315cf6b5..bc75015f 100644 --- a/engine/movie/title2.asm +++ b/engine/movie/title2.asm @@ -115,6 +115,6 @@ GetTitleBallY: pop de and a ret z - ld [wOAMBuffer + $28], a + ld [wShadowOAMSprite10YCoord], a inc e ret diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index 35423820..def901ba 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -315,7 +315,7 @@ Trade_AnimateBallEnteringLinkCable: xor $1 ld [wLinkCableAnimBulgeToggle], a add $7e - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, 4 ld c, e .cycleLinkCableBulgeTile @@ -599,7 +599,7 @@ Trade_AnimCircledMon: ldh a, [rBGP] xor $3c ; make link cable flash ldh [rBGP], a - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, $4 ld c, $14 .loop @@ -619,7 +619,7 @@ Trade_WriteCircledMonOAM: call Trade_WriteCircleOAM Trade_AddOffsetsToOAMCoords: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, $14 .loop ld a, [wBaseCoordY] diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 6a92ccc0..4a337e8d 100644 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -99,7 +99,7 @@ InitCutAnimOAM: ld hl, vChars1 tile $7f call LoadCutGrassAnimationTilePattern call WriteCutOrBoulderDustAnimationOAMBlock - ld hl, wOAMBuffer + $93 + ld hl, wShadowOAMSprite36Attributes ld de, 4 ld a, $30 ld c, e diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index 3d4a5905..69c8cb13 100644 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -5,12 +5,12 @@ AnimCut: ld c, $8 .cutTreeLoop push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 2 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 2 @@ -33,7 +33,7 @@ AnimCut: ld c, $8 call AnimCutGrass_UpdateOAMEntries call AnimCutGrass_SwapOAMEntries - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36YCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 4 @@ -45,22 +45,22 @@ AnimCut: AnimCutGrass_UpdateOAMEntries: push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $95 + ld hl, wShadowOAMSprite37XCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $9d + ld hl, wShadowOAMSprite39XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 1 @@ -75,15 +75,15 @@ AnimCutGrass_UpdateOAMEntries: ret AnimCutGrass_SwapOAMEntries: - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld de, wBuffer ld bc, $8 call CopyData - ld hl, wOAMBuffer + $98 - ld de, wOAMBuffer + $90 + ld hl, wShadowOAMSprite38 + ld de, wShadowOAMSprite36 ld bc, $8 call CopyData ld hl, wBuffer - ld de, wOAMBuffer + $98 + ld de, wShadowOAMSprite38 ld bc, $8 jp CopyData diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm index c97b3e56..96dd364a 100644 --- a/engine/overworld/dust_smoke.asm +++ b/engine/overworld/dust_smoke.asm @@ -43,7 +43,7 @@ GetMoveBoulderDustFunctionPointer: ld h, [hl] ld l, a push hl - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld d, $0 add hl, de ld e, l diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 5a41c226..84b13f17 100644 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -17,11 +17,11 @@ EmotionBubble: ld [wUpdateSpritesEnabled], a ld a, [wd736] bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod? - ld hl, wOAMBuffer + 4 * 35 + $3 ; $8f - ld de, wOAMBuffer + 4 * 39 + $3 ; $9f + ld hl, wShadowOAMSprite35Attributes + ld de, wShadowOAMSprite39Attributes jr z, .next - ld hl, wOAMBuffer + 4 * 31 + $3 ; $7f - ld de, wOAMBuffer + 4 * 35 + $3 ; $8f + ld hl, wShadowOAMSprite31Attributes + ld de, wShadowOAMSprite35Attributes ; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the ; start of the OAM buffer. diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 63c8f9ea..e297762c 100644 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -12,7 +12,7 @@ AnimateHealingMachine: push af ld a, $e0 ldh [rOBP1], a - ld hl, wOAMBuffer + $84 + ld hl, wShadowOAMSprite33 ld de, PokeCenterOAMData call CopyHealingMachineOAM ld a, 4 diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 6a890cfd..bec59369 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -205,19 +205,19 @@ LeaveMapThroughHoleAnim: ld a, $ff ld [wUpdateSpritesEnabled], a ; disable UpdateSprites ; shift upper half of player's sprite down 8 pixels and hide lower half - ld a, [wOAMBuffer + 0 * 4 + 2] - ld [wOAMBuffer + 2 * 4 + 2], a - ld a, [wOAMBuffer + 1 * 4 + 2] - ld [wOAMBuffer + 3 * 4 + 2], a + ld a, [wShadowOAMSprite00TileID] + ld [wShadowOAMSprite02TileID], a + ld a, [wShadowOAMSprite01TileID] + ld [wShadowOAMSprite03TileID], a ld a, $a0 - ld [wOAMBuffer + 0 * 4], a - ld [wOAMBuffer + 1 * 4], a + ld [wShadowOAMSprite00YCoord], a + ld [wShadowOAMSprite01YCoord], a ld c, 2 call DelayFrames ; hide upper half of player's sprite ld a, $a0 - ld [wOAMBuffer + 2 * 4], a - ld [wOAMBuffer + 3 * 4], a + ld [wShadowOAMSprite02YCoord], a + ld [wShadowOAMSprite03YCoord], a call GBFadeOutToWhite ld a, $1 ld [wUpdateSpritesEnabled], a ; enable UpdateSprites @@ -392,7 +392,7 @@ FishingAnim: ld b, $0 ld hl, FishingRodOAM add hl, bc - ld de, wOAMBuffer + $9c + ld de, wShadowOAMSprite39 ld bc, $4 call CopyData ld c, 100 @@ -412,7 +412,7 @@ FishingAnim: .loop ld hl, wSpritePlayerStateData1YPixels call .ShakePlayerSprite - ld hl, wOAMBuffer + $9c + ld hl, wShadowOAMSprite39 call .ShakePlayerSprite call Delay3 dec b @@ -424,7 +424,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipHidingFishingRod ld a, $a0 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipHidingFishingRod ld hl, wEmotionBubbleSpriteIndex @@ -438,7 +438,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipUnhidingFishingRod ld a, $44 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipUnhidingFishingRod ld hl, ItsABiteText diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index 1c2bb4c9..6dd3b42d 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -757,7 +757,7 @@ SlotMachine_UpdateBallTiles: SlotMachine_AnimWheel1: ld bc, SlotMachineWheel1 ld de, wSlotMachineWheel1Offset - ld hl, wOAMBuffer + ld hl, wShadowOAMSprite00 ld a, $30 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -765,7 +765,7 @@ SlotMachine_AnimWheel1: SlotMachine_AnimWheel2: ld bc, SlotMachineWheel2 ld de, wSlotMachineWheel2Offset - ld hl, wOAMBuffer + $30 + ld hl, wShadowOAMSprite12 ld a, $50 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -773,7 +773,7 @@ SlotMachine_AnimWheel2: SlotMachine_AnimWheel3: ld bc, SlotMachineWheel3 ld de, wSlotMachineWheel3Offset - ld hl, wOAMBuffer + $60 + ld hl, wShadowOAMSprite24 ld a, $70 ld [wBaseCoordX], a diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm index 79cc99d6..6d1066fa 100644 --- a/home/clear_sprites.asm +++ b/home/clear_sprites.asm @@ -1,7 +1,7 @@ ClearSprites:: xor a - ld hl, wOAMBuffer - ld b, wOAMBufferEnd - wOAMBuffer + ld hl, wShadowOAM + ld b, wShadowOAMEnd - wShadowOAM .loop ld [hli], a dec b @@ -10,7 +10,7 @@ ClearSprites:: HideSprites:: ld a, 160 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, 4 ld b, 40 .loop diff --git a/home/oam.asm b/home/oam.asm index 8a940d97..8be59f6e 100644 --- a/home/oam.asm +++ b/home/oam.asm @@ -4,7 +4,7 @@ ; c = X coordinate of upper left corner of sprite ; de = base address of 4 tile number and attribute pairs WriteOAMBlock:: - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) swap a ; multiply by 16 ld l, a call .writeOneEntry ; upper left diff --git a/ram/wram.asm b/ram/wram.asm index 0804e6ee..3becc82a 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -143,12 +143,12 @@ wSpriteDataEnd:: SECTION "OAM Buffer", WRAM0 ; buffer for OAM data. Copied to OAM by DMA -wOAMBuffer:: -; wOAMBufferSprite00 - wOAMBufferSprite39 +wShadowOAM:: +; wShadowOAMSprite00 - wShadowOAMSprite39 FOR n, NUM_SPRITE_OAM_STRUCTS -wOAMBufferSprite{02d:n}:: sprite_oam_struct wOAMBufferSprite{02d:n} +wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n} ENDR -wOAMBufferEnd:: +wShadowOAMEnd:: SECTION "Tilemap", WRAM0 diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index f98e1250..94779798 100644 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -124,7 +124,7 @@ VermilionDock_1db9b: VermilionDock_AnimSmokePuffDriftRight: push bc push de - ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord + ld hl, wShadowOAMSprite04XCoord ld a, [wSSAnneSmokeDriftAmount] swap a ld c, a -- cgit v1.3.1-sl0p From bbb0e7e82deb6741f75a12b48f81076d92f5d9dc Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:23:08 -0400 Subject: Use the same music headers as pokecrystal (#382) --- audio.asm | 6 +- audio/engine_1.asm | 84 ++--- audio/engine_2.asm | 94 +++--- audio/engine_3.asm | 84 ++--- audio/headers/musicheaders1.asm | 109 +++++-- audio/headers/musicheaders2.asm | 35 +- audio/headers/musicheaders3.asm | 96 +++++- audio/headers/sfxheaders1.asm | 375 +++++++++++++++------ audio/headers/sfxheaders2.asm | 471 ++++++++++++++++++++------- audio/headers/sfxheaders3.asm | 400 +++++++++++++++++------ audio/low_health_alarm.asm | 4 +- audio/poke_flute.asm | 2 +- audio/wave_instruments.asm | 33 -- audio/wave_samples.asm | 33 ++ constants/audio_constants.asm | 16 +- engine/battle/core.asm | 6 +- engine/battle/end_of_battle.asm | 2 +- engine/events/hidden_objects/safari_game.asm | 2 +- engine/items/item_effects.asm | 6 +- engine/movie/evolution.asm | 2 +- engine/overworld/elevator.asm | 2 +- home/audio.asm | 8 +- home/delay.asm | 2 +- home/overworld.asm | 4 +- macros/scripts/audio.asm | 55 ++-- scripts/PewterPokecenter.asm | 2 +- 26 files changed, 1346 insertions(+), 587 deletions(-) delete mode 100644 audio/wave_instruments.asm create mode 100644 audio/wave_samples.asm (limited to 'constants') diff --git a/audio.asm b/audio.asm index 35b0d872..e934c440 100644 --- a/audio.asm +++ b/audio.asm @@ -44,7 +44,7 @@ INCLUDE "audio/sfx/noise_instrument18_1.asm" INCLUDE "audio/sfx/noise_instrument19_1.asm" Audio1_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_1.asm" INCLUDE "audio/sfx/pokeflute.asm" @@ -144,7 +144,7 @@ INCLUDE "audio/sfx/noise_instrument18_2.asm" INCLUDE "audio/sfx/noise_instrument19_2.asm" Audio2_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/press_ab_2.asm" INCLUDE "audio/sfx/start_menu_2.asm" @@ -270,7 +270,7 @@ INCLUDE "audio/sfx/noise_instrument18_3.asm" INCLUDE "audio/sfx/noise_instrument19_3.asm" Audio3_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_3.asm" INCLUDE "audio/sfx/cut_3.asm" diff --git a/audio/engine_1.asm b/audio/engine_1.asm index f9b4166a..8b30fb1a 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -1,7 +1,7 @@ ; The first of three duplicated sound engines. Audio1_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio1_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio1_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio1_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio1_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio1_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio1_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio1_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio1_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio1_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio1_tempo: cp tempo_cmd jr nz, Audio1_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio1_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio1_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio1_sound_ret @@ -577,7 +577,7 @@ Audio1_sfx_note: cp sfx_note_cmd jr nz, Audio1_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio1_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio1_sfx_note: call Audio1_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio1_sfx_note: Audio1_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio1_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio1_pitch_sweep: Audio1_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio1_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio1_note_length: ld l, b call Audio1_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio1_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio1_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio1_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio1_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio1_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio1_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio1_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio1_ApplyDutyCycleAndSoundLength: Audio1_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio1_GoBackOneCommandIfCry: Audio1_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio1_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio1_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio1_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio1_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio1_CryRet ld [hl], e inc hl diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 30845fc8..8783c4c6 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -3,7 +3,7 @@ ; and the low health alarm that plays in battle Audio2_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -12,7 +12,7 @@ Audio2_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -32,7 +32,7 @@ Audio2_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -48,9 +48,9 @@ Audio2_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -161,7 +161,7 @@ Audio2_PlayNextNote: res BIT_PITCH_SLIDE_DECREASING, [hl] ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr nz, .beginChecks ld a, [wLowHealthAlarm] ; low health alarm enabled? bit 7, a @@ -182,7 +182,7 @@ Audio2_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -190,7 +190,7 @@ Audio2_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -234,19 +234,19 @@ Audio2_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio2_GoBackOneCommandIfCry ret c @@ -347,14 +347,14 @@ Audio2_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio2_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -488,7 +488,7 @@ Audio2_tempo: cp tempo_cmd jr nz, Audio2_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio2_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -531,10 +531,10 @@ Audio2_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio2_sound_ret @@ -588,7 +588,7 @@ Audio2_sfx_note: cp sfx_note_cmd jr nz, Audio2_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio2_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -618,7 +618,7 @@ Audio2_sfx_note: call Audio2_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -638,7 +638,7 @@ Audio2_sfx_note: Audio2_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio2_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -654,7 +654,7 @@ Audio2_pitch_sweep: Audio2_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio2_note_length ; if not noise channel ld a, d and $f0 @@ -712,7 +712,7 @@ Audio2_note_length: ld l, b call Audio2_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -722,7 +722,7 @@ Audio2_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio2_SetSfxTempo ld a, [wSfxTempo] @@ -762,10 +762,10 @@ Audio2_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -773,9 +773,9 @@ Audio2_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -811,10 +811,10 @@ Audio2_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -859,12 +859,12 @@ Audio2_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -894,9 +894,9 @@ Audio2_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -915,15 +915,15 @@ Audio2_ApplyDutyCycleAndSoundLength: Audio2_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -963,7 +963,7 @@ Audio2_ApplyWavePatternAndFrequency: ld [hl], d ; store frequency high byte ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr c, .musicChannel call Audio2_ApplyFrequencyModifier .musicChannel @@ -974,7 +974,7 @@ Audio2_ApplyWavePatternAndFrequency: ; unused Audio2_ResetCryModifiers: ld a, c - cp Ch5 + cp CHAN5 jr nz, .skip ld a, [wLowHealthAlarm] bit 7, a @@ -1056,7 +1056,7 @@ Audio2_GoBackOneCommandIfCry: Audio2_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1075,9 +1075,9 @@ Audio2_IsCry: ; --- this section is only present in this copy of the sound engine Audio2_IsBattleSFX: ; Returns whether the currently playing audio is a battle sfx in carry. - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld b, a - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] or b cp BATTLE_SFX_START jr nc, .next @@ -1516,7 +1516,7 @@ Audio2_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1615,7 +1615,7 @@ Audio2_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1717,7 +1717,7 @@ Audio2_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1749,12 +1749,12 @@ Audio2_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio2_CryRet ld [hl], e inc hl diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 57618486..404e6e7c 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -1,7 +1,7 @@ ; The third of three duplicated sound engines. Audio3_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio3_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio3_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio3_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio3_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio3_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio3_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio3_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio3_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio3_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio3_tempo: cp tempo_cmd jr nz, Audio3_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio3_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio3_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio3_sound_ret @@ -577,7 +577,7 @@ Audio3_sfx_note: cp sfx_note_cmd jr nz, Audio3_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio3_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio3_sfx_note: call Audio3_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio3_sfx_note: Audio3_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio3_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio3_pitch_sweep: Audio3_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio3_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio3_note_length: ld l, b call Audio3_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio3_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio3_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio3_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio3_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio3_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio3_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio3_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio3_ApplyDutyCycleAndSoundLength: Audio3_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio3_GoBackOneCommandIfCry: Audio3_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio3_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio3_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio3_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio3_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio3_CryRet ld [hl], e inc hl diff --git a/audio/headers/musicheaders1.asm b/audio/headers/musicheaders1.asm index ef85eae6..fb387671 100644 --- a/audio/headers/musicheaders1.asm +++ b/audio/headers/musicheaders1.asm @@ -1,66 +1,135 @@ Music_PalletTown:: - audio_header Music_PalletTown, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PalletTown_Ch1 + channel 2, Music_PalletTown_Ch2 + channel 3, Music_PalletTown_Ch3 Music_Pokecenter:: - audio_header Music_Pokecenter, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Pokecenter_Ch1 + channel 2, Music_Pokecenter_Ch2 + channel 3, Music_Pokecenter_Ch3 Music_Gym:: - audio_header Music_Gym, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Gym_Ch1 + channel 2, Music_Gym_Ch2 + channel 3, Music_Gym_Ch3 ; Viridian City, Pewter City, Saffron City Music_Cities1:: - audio_header Music_Cities1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Cities1_Ch1 + channel 2, Music_Cities1_Ch2 + channel 3, Music_Cities1_Ch3 + channel 4, Music_Cities1_Ch4 ; Cerulean City, Fuchsia City Music_Cities2:: - audio_header Music_Cities2, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cities2_Ch1 + channel 2, Music_Cities2_Ch2 + channel 3, Music_Cities2_Ch3 Music_Celadon:: - audio_header Music_Celadon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Celadon_Ch1 + channel 2, Music_Celadon_Ch2 + channel 3, Music_Celadon_Ch3 Music_Cinnabar:: - audio_header Music_Cinnabar, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cinnabar_Ch1 + channel 2, Music_Cinnabar_Ch2 + channel 3, Music_Cinnabar_Ch3 Music_Vermilion:: - audio_header Music_Vermilion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Vermilion_Ch1 + channel 2, Music_Vermilion_Ch2 + channel 3, Music_Vermilion_Ch3 + channel 4, Music_Vermilion_Ch4 Music_Lavender:: - audio_header Music_Lavender, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Lavender_Ch1 + channel 2, Music_Lavender_Ch2 + channel 3, Music_Lavender_Ch3 + channel 4, Music_Lavender_Ch4 Music_SSAnne:: - audio_header Music_SSAnne, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SSAnne_Ch1 + channel 2, Music_SSAnne_Ch2 + channel 3, Music_SSAnne_Ch3 Music_MeetProfOak:: - audio_header Music_MeetProfOak, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetProfOak_Ch1 + channel 2, Music_MeetProfOak_Ch2 + channel 3, Music_MeetProfOak_Ch3 Music_MeetRival:: - audio_header Music_MeetRival, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetRival_Ch1 + channel 2, Music_MeetRival_Ch2 + channel 3, Music_MeetRival_Ch3 Music_MuseumGuy:: - audio_header Music_MuseumGuy, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_MuseumGuy_Ch1 + channel 2, Music_MuseumGuy_Ch2 + channel 3, Music_MuseumGuy_Ch3 + channel 4, Music_MuseumGuy_Ch4 Music_SafariZone:: - audio_header Music_SafariZone, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SafariZone_Ch1 + channel 2, Music_SafariZone_Ch2 + channel 3, Music_SafariZone_Ch3 Music_PkmnHealed:: - audio_header Music_PkmnHealed, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PkmnHealed_Ch1 + channel 2, Music_PkmnHealed_Ch2 + channel 3, Music_PkmnHealed_Ch3 ; Routes 1 and 2 Music_Routes1:: - audio_header Music_Routes1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes1_Ch1 + channel 2, Music_Routes1_Ch2 + channel 3, Music_Routes1_Ch3 + channel 4, Music_Routes1_Ch4 ; Routes 24 and 25 Music_Routes2:: - audio_header Music_Routes2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes2_Ch1 + channel 2, Music_Routes2_Ch2 + channel 3, Music_Routes2_Ch3 + channel 4, Music_Routes2_Ch4 ; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 Music_Routes3:: - audio_header Music_Routes3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes3_Ch1 + channel 2, Music_Routes3_Ch2 + channel 3, Music_Routes3_Ch3 + channel 4, Music_Routes3_Ch4 ; Routes 11, 12, 13, 14, 15 Music_Routes4:: - audio_header Music_Routes4, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes4_Ch1 + channel 2, Music_Routes4_Ch2 + channel 3, Music_Routes4_Ch3 + channel 4, Music_Routes4_Ch4 ; Route 23, Indigo Plateau Music_IndigoPlateau:: - audio_header Music_IndigoPlateau, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IndigoPlateau_Ch1 + channel 2, Music_IndigoPlateau_Ch2 + channel 3, Music_IndigoPlateau_Ch3 + channel 4, Music_IndigoPlateau_Ch4 diff --git a/audio/headers/musicheaders2.asm b/audio/headers/musicheaders2.asm index d6cca9a9..c24c08d6 100644 --- a/audio/headers/musicheaders2.asm +++ b/audio/headers/musicheaders2.asm @@ -1,20 +1,41 @@ Music_GymLeaderBattle:: - audio_header Music_GymLeaderBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GymLeaderBattle_Ch1 + channel 2, Music_GymLeaderBattle_Ch2 + channel 3, Music_GymLeaderBattle_Ch3 Music_TrainerBattle:: - audio_header Music_TrainerBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_TrainerBattle_Ch1 + channel 2, Music_TrainerBattle_Ch2 + channel 3, Music_TrainerBattle_Ch3 Music_WildBattle:: - audio_header Music_WildBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_WildBattle_Ch1 + channel 2, Music_WildBattle_Ch2 + channel 3, Music_WildBattle_Ch3 Music_FinalBattle:: - audio_header Music_FinalBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_FinalBattle_Ch1 + channel 2, Music_FinalBattle_Ch2 + channel 3, Music_FinalBattle_Ch3 Music_DefeatedTrainer:: - audio_header Music_DefeatedTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedTrainer_Ch1 + channel 2, Music_DefeatedTrainer_Ch2 + channel 3, Music_DefeatedTrainer_Ch3 Music_DefeatedWildMon:: - audio_header Music_DefeatedWildMon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedWildMon_Ch1 + channel 2, Music_DefeatedWildMon_Ch2 + channel 3, Music_DefeatedWildMon_Ch3 Music_DefeatedGymLeader:: - audio_header Music_DefeatedGymLeader, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedGymLeader_Ch1 + channel 2, Music_DefeatedGymLeader_Ch2 + channel 3, Music_DefeatedGymLeader_Ch3 diff --git a/audio/headers/musicheaders3.asm b/audio/headers/musicheaders3.asm index ca21b419..82699f8e 100644 --- a/audio/headers/musicheaders3.asm +++ b/audio/headers/musicheaders3.asm @@ -1,56 +1,116 @@ Music_TitleScreen:: - audio_header Music_TitleScreen, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_TitleScreen_Ch1 + channel 2, Music_TitleScreen_Ch2 + channel 3, Music_TitleScreen_Ch3 + channel 4, Music_TitleScreen_Ch4 Music_Credits:: - audio_header Music_Credits, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Credits_Ch1 + channel 2, Music_Credits_Ch2 + channel 3, Music_Credits_Ch3 Music_HallOfFame:: - audio_header Music_HallOfFame, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_HallOfFame_Ch1 + channel 2, Music_HallOfFame_Ch2 + channel 3, Music_HallOfFame_Ch3 Music_OaksLab:: - audio_header Music_OaksLab, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_OaksLab_Ch1 + channel 2, Music_OaksLab_Ch2 + channel 3, Music_OaksLab_Ch3 Music_JigglypuffSong:: - audio_header Music_JigglypuffSong, Ch1, Ch2 + channel_count 2 + channel 1, Music_JigglypuffSong_Ch1 + channel 2, Music_JigglypuffSong_Ch2 Music_BikeRiding:: - audio_header Music_BikeRiding, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_BikeRiding_Ch1 + channel 2, Music_BikeRiding_Ch2 + channel 3, Music_BikeRiding_Ch3 + channel 4, Music_BikeRiding_Ch4 Music_Surfing:: - audio_header Music_Surfing, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Surfing_Ch1 + channel 2, Music_Surfing_Ch2 + channel 3, Music_Surfing_Ch3 Music_GameCorner:: - audio_header Music_GameCorner, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GameCorner_Ch1 + channel 2, Music_GameCorner_Ch2 + channel 3, Music_GameCorner_Ch3 Music_IntroBattle:: - audio_header Music_IntroBattle, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IntroBattle_Ch1 + channel 2, Music_IntroBattle_Ch2 + channel 3, Music_IntroBattle_Ch3 + channel 4, Music_IntroBattle_Ch4 ; Power Plant, Cerulean Cave, Rocket HQ Music_Dungeon1:: - audio_header Music_Dungeon1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon1_Ch1 + channel 2, Music_Dungeon1_Ch2 + channel 3, Music_Dungeon1_Ch3 + channel 4, Music_Dungeon1_Ch4 ; Viridian Forest, Seafoam Islands Music_Dungeon2:: - audio_header Music_Dungeon2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon2_Ch1 + channel 2, Music_Dungeon2_Ch2 + channel 3, Music_Dungeon2_Ch3 + channel 4, Music_Dungeon2_Ch4 ; Mt. Moon, Rock Tunnel, Victory Road Music_Dungeon3:: - audio_header Music_Dungeon3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon3_Ch1 + channel 2, Music_Dungeon3_Ch2 + channel 3, Music_Dungeon3_Ch3 + channel 4, Music_Dungeon3_Ch4 Music_CinnabarMansion:: - audio_header Music_CinnabarMansion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_CinnabarMansion_Ch1 + channel 2, Music_CinnabarMansion_Ch2 + channel 3, Music_CinnabarMansion_Ch3 + channel 4, Music_CinnabarMansion_Ch4 Music_PokemonTower:: - audio_header Music_PokemonTower, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PokemonTower_Ch1 + channel 2, Music_PokemonTower_Ch2 + channel 3, Music_PokemonTower_Ch3 Music_SilphCo:: - audio_header Music_SilphCo, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SilphCo_Ch1 + channel 2, Music_SilphCo_Ch2 + channel 3, Music_SilphCo_Ch3 Music_MeetEvilTrainer:: - audio_header Music_MeetEvilTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetEvilTrainer_Ch1 + channel 2, Music_MeetEvilTrainer_Ch2 + channel 3, Music_MeetEvilTrainer_Ch3 Music_MeetFemaleTrainer:: - audio_header Music_MeetFemaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetFemaleTrainer_Ch1 + channel 2, Music_MeetFemaleTrainer_Ch2 + channel 3, Music_MeetFemaleTrainer_Ch3 Music_MeetMaleTrainer:: - audio_header Music_MeetMaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetMaleTrainer_Ch1 + channel 2, Music_MeetMaleTrainer_Ch2 + channel 3, Music_MeetMaleTrainer_Ch3 diff --git a/audio/headers/sfxheaders1.asm b/audio/headers/sfxheaders1.asm index 2d5eca4a..297b7582 100644 --- a/audio/headers/sfxheaders1.asm +++ b/audio/headers/sfxheaders1.asm @@ -2,287 +2,472 @@ SFX_Headers_1:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_1:: - audio_header SFX_Noise_Instrument01_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_1_Ch8 SFX_Noise_Instrument02_1:: - audio_header SFX_Noise_Instrument02_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_1_Ch8 SFX_Noise_Instrument03_1:: - audio_header SFX_Noise_Instrument03_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_1_Ch8 SFX_Noise_Instrument04_1:: - audio_header SFX_Noise_Instrument04_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_1_Ch8 SFX_Noise_Instrument05_1:: - audio_header SFX_Noise_Instrument05_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_1_Ch8 SFX_Noise_Instrument06_1:: - audio_header SFX_Noise_Instrument06_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_1_Ch8 SFX_Noise_Instrument07_1:: - audio_header SFX_Noise_Instrument07_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_1_Ch8 SFX_Noise_Instrument08_1:: - audio_header SFX_Noise_Instrument08_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_1_Ch8 SFX_Noise_Instrument09_1:: - audio_header SFX_Noise_Instrument09_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_1_Ch8 SFX_Noise_Instrument10_1:: - audio_header SFX_Noise_Instrument10_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_1_Ch8 SFX_Noise_Instrument11_1:: - audio_header SFX_Noise_Instrument11_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_1_Ch8 SFX_Noise_Instrument12_1:: - audio_header SFX_Noise_Instrument12_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_1_Ch8 SFX_Noise_Instrument13_1:: - audio_header SFX_Noise_Instrument13_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_1_Ch8 SFX_Noise_Instrument14_1:: - audio_header SFX_Noise_Instrument14_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_1_Ch8 SFX_Noise_Instrument15_1:: - audio_header SFX_Noise_Instrument15_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_1_Ch8 SFX_Noise_Instrument16_1:: - audio_header SFX_Noise_Instrument16_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_1_Ch8 SFX_Noise_Instrument17_1:: - audio_header SFX_Noise_Instrument17_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_1_Ch8 SFX_Noise_Instrument18_1:: - audio_header SFX_Noise_Instrument18_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_1_Ch8 SFX_Noise_Instrument19_1:: - audio_header SFX_Noise_Instrument19_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_1_Ch8 SFX_Cry00_1:: - audio_header SFX_Cry00_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_1_Ch5 + channel 6, SFX_Cry00_1_Ch6 + channel 8, SFX_Cry00_1_Ch8 SFX_Cry01_1:: - audio_header SFX_Cry01_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_1_Ch5 + channel 6, SFX_Cry01_1_Ch6 + channel 8, SFX_Cry01_1_Ch8 SFX_Cry02_1:: - audio_header SFX_Cry02_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_1_Ch5 + channel 6, SFX_Cry02_1_Ch6 + channel 8, SFX_Cry02_1_Ch8 SFX_Cry03_1:: - audio_header SFX_Cry03_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_1_Ch5 + channel 6, SFX_Cry03_1_Ch6 + channel 8, SFX_Cry03_1_Ch8 SFX_Cry04_1:: - audio_header SFX_Cry04_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_1_Ch5 + channel 6, SFX_Cry04_1_Ch6 + channel 8, SFX_Cry04_1_Ch8 SFX_Cry05_1:: - audio_header SFX_Cry05_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_1_Ch5 + channel 6, SFX_Cry05_1_Ch6 + channel 8, SFX_Cry05_1_Ch8 SFX_Cry06_1:: - audio_header SFX_Cry06_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_1_Ch5 + channel 6, SFX_Cry06_1_Ch6 + channel 8, SFX_Cry06_1_Ch8 SFX_Cry07_1:: - audio_header SFX_Cry07_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_1_Ch5 + channel 6, SFX_Cry07_1_Ch6 + channel 8, SFX_Cry07_1_Ch8 SFX_Cry08_1:: - audio_header SFX_Cry08_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_1_Ch5 + channel 6, SFX_Cry08_1_Ch6 + channel 8, SFX_Cry08_1_Ch8 SFX_Cry09_1:: - audio_header SFX_Cry09_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_1_Ch5 + channel 6, SFX_Cry09_1_Ch6 + channel 8, SFX_Cry09_1_Ch8 SFX_Cry0A_1:: - audio_header SFX_Cry0A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_1_Ch5 + channel 6, SFX_Cry0A_1_Ch6 + channel 8, SFX_Cry0A_1_Ch8 SFX_Cry0B_1:: - audio_header SFX_Cry0B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_1_Ch5 + channel 6, SFX_Cry0B_1_Ch6 + channel 8, SFX_Cry0B_1_Ch8 SFX_Cry0C_1:: - audio_header SFX_Cry0C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_1_Ch5 + channel 6, SFX_Cry0C_1_Ch6 + channel 8, SFX_Cry0C_1_Ch8 SFX_Cry0D_1:: - audio_header SFX_Cry0D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_1_Ch5 + channel 6, SFX_Cry0D_1_Ch6 + channel 8, SFX_Cry0D_1_Ch8 SFX_Cry0E_1:: - audio_header SFX_Cry0E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_1_Ch5 + channel 6, SFX_Cry0E_1_Ch6 + channel 8, SFX_Cry0E_1_Ch8 SFX_Cry0F_1:: - audio_header SFX_Cry0F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_1_Ch5 + channel 6, SFX_Cry0F_1_Ch6 + channel 8, SFX_Cry0F_1_Ch8 SFX_Cry10_1:: - audio_header SFX_Cry10_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_1_Ch5 + channel 6, SFX_Cry10_1_Ch6 + channel 8, SFX_Cry10_1_Ch8 SFX_Cry11_1:: - audio_header SFX_Cry11_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_1_Ch5 + channel 6, SFX_Cry11_1_Ch6 + channel 8, SFX_Cry11_1_Ch8 SFX_Cry12_1:: - audio_header SFX_Cry12_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_1_Ch5 + channel 6, SFX_Cry12_1_Ch6 + channel 8, SFX_Cry12_1_Ch8 SFX_Cry13_1:: - audio_header SFX_Cry13_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_1_Ch5 + channel 6, SFX_Cry13_1_Ch6 + channel 8, SFX_Cry13_1_Ch8 SFX_Cry14_1:: - audio_header SFX_Cry14_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_1_Ch5 + channel 6, SFX_Cry14_1_Ch6 + channel 8, SFX_Cry14_1_Ch8 SFX_Cry15_1:: - audio_header SFX_Cry15_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_1_Ch5 + channel 6, SFX_Cry15_1_Ch6 + channel 8, SFX_Cry15_1_Ch8 SFX_Cry16_1:: - audio_header SFX_Cry16_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_1_Ch5 + channel 6, SFX_Cry16_1_Ch6 + channel 8, SFX_Cry16_1_Ch8 SFX_Cry17_1:: - audio_header SFX_Cry17_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_1_Ch5 + channel 6, SFX_Cry17_1_Ch6 + channel 8, SFX_Cry17_1_Ch8 SFX_Cry18_1:: - audio_header SFX_Cry18_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_1_Ch5 + channel 6, SFX_Cry18_1_Ch6 + channel 8, SFX_Cry18_1_Ch8 SFX_Cry19_1:: - audio_header SFX_Cry19_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_1_Ch5 + channel 6, SFX_Cry19_1_Ch6 + channel 8, SFX_Cry19_1_Ch8 SFX_Cry1A_1:: - audio_header SFX_Cry1A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_1_Ch5 + channel 6, SFX_Cry1A_1_Ch6 + channel 8, SFX_Cry1A_1_Ch8 SFX_Cry1B_1:: - audio_header SFX_Cry1B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_1_Ch5 + channel 6, SFX_Cry1B_1_Ch6 + channel 8, SFX_Cry1B_1_Ch8 SFX_Cry1C_1:: - audio_header SFX_Cry1C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_1_Ch5 + channel 6, SFX_Cry1C_1_Ch6 + channel 8, SFX_Cry1C_1_Ch8 SFX_Cry1D_1:: - audio_header SFX_Cry1D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_1_Ch5 + channel 6, SFX_Cry1D_1_Ch6 + channel 8, SFX_Cry1D_1_Ch8 SFX_Cry1E_1:: - audio_header SFX_Cry1E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_1_Ch5 + channel 6, SFX_Cry1E_1_Ch6 + channel 8, SFX_Cry1E_1_Ch8 SFX_Cry1F_1:: - audio_header SFX_Cry1F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_1_Ch5 + channel 6, SFX_Cry1F_1_Ch6 + channel 8, SFX_Cry1F_1_Ch8 SFX_Cry20_1:: - audio_header SFX_Cry20_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_1_Ch5 + channel 6, SFX_Cry20_1_Ch6 + channel 8, SFX_Cry20_1_Ch8 SFX_Cry21_1:: - audio_header SFX_Cry21_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_1_Ch5 + channel 6, SFX_Cry21_1_Ch6 + channel 8, SFX_Cry21_1_Ch8 SFX_Cry22_1:: - audio_header SFX_Cry22_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_1_Ch5 + channel 6, SFX_Cry22_1_Ch6 + channel 8, SFX_Cry22_1_Ch8 SFX_Cry23_1:: - audio_header SFX_Cry23_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_1_Ch5 + channel 6, SFX_Cry23_1_Ch6 + channel 8, SFX_Cry23_1_Ch8 SFX_Cry24_1:: - audio_header SFX_Cry24_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_1_Ch5 + channel 6, SFX_Cry24_1_Ch6 + channel 8, SFX_Cry24_1_Ch8 SFX_Cry25_1:: - audio_header SFX_Cry25_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_1_Ch5 + channel 6, SFX_Cry25_1_Ch6 + channel 8, SFX_Cry25_1_Ch8 SFX_Get_Item1_1:: - audio_header SFX_Get_Item1_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_1_Ch5 + channel 6, SFX_Get_Item1_1_Ch6 + channel 7, SFX_Get_Item1_1_Ch7 SFX_Get_Item2_1:: - audio_header SFX_Get_Item2_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_1_Ch5 + channel 6, SFX_Get_Item2_1_Ch6 + channel 7, SFX_Get_Item2_1_Ch7 SFX_Tink_1:: - audio_header SFX_Tink_1, Ch5 + channel_count 1 + channel 5, SFX_Tink_1_Ch5 SFX_Heal_HP_1:: - audio_header SFX_Heal_HP_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_1_Ch5 SFX_Heal_Ailment_1:: - audio_header SFX_Heal_Ailment_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_1_Ch5 SFX_Start_Menu_1:: - audio_header SFX_Start_Menu_1, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_1_Ch8 SFX_Press_AB_1:: - audio_header SFX_Press_AB_1, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_1_Ch5 SFX_Pokedex_Rating_1:: - audio_header SFX_Pokedex_Rating_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_1_Ch5 + channel 6, SFX_Pokedex_Rating_1_Ch6 + channel 7, SFX_Pokedex_Rating_1_Ch7 SFX_Get_Key_Item_1:: - audio_header SFX_Get_Key_Item_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_1_Ch5 + channel 6, SFX_Get_Key_Item_1_Ch6 + channel 7, SFX_Get_Key_Item_1_Ch7 SFX_Poisoned_1:: - audio_header SFX_Poisoned_1, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_1_Ch5 SFX_Trade_Machine_1:: - audio_header SFX_Trade_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_1_Ch5 SFX_Turn_On_PC_1:: - audio_header SFX_Turn_On_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_1_Ch5 SFX_Turn_Off_PC_1:: - audio_header SFX_Turn_Off_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_1_Ch5 SFX_Enter_PC_1:: - audio_header SFX_Enter_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_1_Ch5 SFX_Shrink_1:: - audio_header SFX_Shrink_1, Ch5 + channel_count 1 + channel 5, SFX_Shrink_1_Ch5 SFX_Switch_1:: - audio_header SFX_Switch_1, Ch5 + channel_count 1 + channel 5, SFX_Switch_1_Ch5 SFX_Healing_Machine_1:: - audio_header SFX_Healing_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_1_Ch5 SFX_Teleport_Exit1_1:: - audio_header SFX_Teleport_Exit1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_1_Ch5 SFX_Teleport_Enter1_1:: - audio_header SFX_Teleport_Enter1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_1_Ch5 SFX_Teleport_Exit2_1:: - audio_header SFX_Teleport_Exit2_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_1_Ch5 SFX_Ledge_1:: - audio_header SFX_Ledge_1, Ch5 + channel_count 1 + channel 5, SFX_Ledge_1_Ch5 SFX_Teleport_Enter2_1:: - audio_header SFX_Teleport_Enter2_1, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_1_Ch8 SFX_Fly_1:: - audio_header SFX_Fly_1, Ch8 + channel_count 1 + channel 8, SFX_Fly_1_Ch8 SFX_Denied_1:: - audio_header SFX_Denied_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_1_Ch5 + channel 6, SFX_Denied_1_Ch6 SFX_Arrow_Tiles_1:: - audio_header SFX_Arrow_Tiles_1, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_1_Ch5 SFX_Push_Boulder_1:: - audio_header SFX_Push_Boulder_1, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_1_Ch8 SFX_SS_Anne_Horn_1:: - audio_header SFX_SS_Anne_Horn_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_1_Ch5 + channel 6, SFX_SS_Anne_Horn_1_Ch6 SFX_Withdraw_Deposit_1:: - audio_header SFX_Withdraw_Deposit_1, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_1_Ch5 SFX_Cut_1:: - audio_header SFX_Cut_1, Ch8 + channel_count 1 + channel 8, SFX_Cut_1_Ch8 SFX_Go_Inside_1:: - audio_header SFX_Go_Inside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_1_Ch8 SFX_Swap_1:: - audio_header SFX_Swap_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_1_Ch5 + channel 6, SFX_Swap_1_Ch6 SFX_59_1:: - audio_header SFX_59_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_1_Ch5 + channel 6, SFX_59_1_Ch6 SFX_Purchase_1:: - audio_header SFX_Purchase_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_1_Ch5 + channel 6, SFX_Purchase_1_Ch6 SFX_Collision_1:: - audio_header SFX_Collision_1, Ch5 + channel_count 1 + channel 5, SFX_Collision_1_Ch5 SFX_Go_Outside_1:: - audio_header SFX_Go_Outside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_1_Ch8 SFX_Save_1:: - audio_header SFX_Save_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_1_Ch5 + channel 6, SFX_Save_1_Ch6 ; the Pokeflute sound effect directly hijacks channel 3 SFX_Pokeflute:: - audio_header SFX_Pokeflute, Ch3 + channel_count 1 + channel 3, SFX_Pokeflute_Ch3 SFX_Safari_Zone_PA:: - audio_header SFX_Safari_Zone_PA, Ch5 + channel_count 1 + channel 5, SFX_Safari_Zone_PA_Ch5 diff --git a/audio/headers/sfxheaders2.asm b/audio/headers/sfxheaders2.asm index 912d137e..1ccbf265 100644 --- a/audio/headers/sfxheaders2.asm +++ b/audio/headers/sfxheaders2.asm @@ -2,358 +2,591 @@ SFX_Headers_2:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_2:: - audio_header SFX_Noise_Instrument01_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_2_Ch8 SFX_Noise_Instrument02_2:: - audio_header SFX_Noise_Instrument02_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_2_Ch8 SFX_Noise_Instrument03_2:: - audio_header SFX_Noise_Instrument03_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_2_Ch8 SFX_Noise_Instrument04_2:: - audio_header SFX_Noise_Instrument04_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_2_Ch8 SFX_Noise_Instrument05_2:: - audio_header SFX_Noise_Instrument05_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_2_Ch8 SFX_Noise_Instrument06_2:: - audio_header SFX_Noise_Instrument06_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_2_Ch8 SFX_Noise_Instrument07_2:: - audio_header SFX_Noise_Instrument07_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_2_Ch8 SFX_Noise_Instrument08_2:: - audio_header SFX_Noise_Instrument08_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_2_Ch8 SFX_Noise_Instrument09_2:: - audio_header SFX_Noise_Instrument09_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_2_Ch8 SFX_Noise_Instrument10_2:: - audio_header SFX_Noise_Instrument10_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_2_Ch8 SFX_Noise_Instrument11_2:: - audio_header SFX_Noise_Instrument11_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_2_Ch8 SFX_Noise_Instrument12_2:: - audio_header SFX_Noise_Instrument12_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_2_Ch8 SFX_Noise_Instrument13_2:: - audio_header SFX_Noise_Instrument13_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_2_Ch8 SFX_Noise_Instrument14_2:: - audio_header SFX_Noise_Instrument14_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_2_Ch8 SFX_Noise_Instrument15_2:: - audio_header SFX_Noise_Instrument15_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_2_Ch8 SFX_Noise_Instrument16_2:: - audio_header SFX_Noise_Instrument16_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_2_Ch8 SFX_Noise_Instrument17_2:: - audio_header SFX_Noise_Instrument17_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_2_Ch8 SFX_Noise_Instrument18_2:: - audio_header SFX_Noise_Instrument18_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_2_Ch8 SFX_Noise_Instrument19_2:: - audio_header SFX_Noise_Instrument19_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_2_Ch8 SFX_Cry00_2:: - audio_header SFX_Cry00_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_2_Ch5 + channel 6, SFX_Cry00_2_Ch6 + channel 8, SFX_Cry00_2_Ch8 SFX_Cry01_2:: - audio_header SFX_Cry01_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_2_Ch5 + channel 6, SFX_Cry01_2_Ch6 + channel 8, SFX_Cry01_2_Ch8 SFX_Cry02_2:: - audio_header SFX_Cry02_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_2_Ch5 + channel 6, SFX_Cry02_2_Ch6 + channel 8, SFX_Cry02_2_Ch8 SFX_Cry03_2:: - audio_header SFX_Cry03_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_2_Ch5 + channel 6, SFX_Cry03_2_Ch6 + channel 8, SFX_Cry03_2_Ch8 SFX_Cry04_2:: - audio_header SFX_Cry04_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_2_Ch5 + channel 6, SFX_Cry04_2_Ch6 + channel 8, SFX_Cry04_2_Ch8 SFX_Cry05_2:: - audio_header SFX_Cry05_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_2_Ch5 + channel 6, SFX_Cry05_2_Ch6 + channel 8, SFX_Cry05_2_Ch8 SFX_Cry06_2:: - audio_header SFX_Cry06_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_2_Ch5 + channel 6, SFX_Cry06_2_Ch6 + channel 8, SFX_Cry06_2_Ch8 SFX_Cry07_2:: - audio_header SFX_Cry07_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_2_Ch5 + channel 6, SFX_Cry07_2_Ch6 + channel 8, SFX_Cry07_2_Ch8 SFX_Cry08_2:: - audio_header SFX_Cry08_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_2_Ch5 + channel 6, SFX_Cry08_2_Ch6 + channel 8, SFX_Cry08_2_Ch8 SFX_Cry09_2:: - audio_header SFX_Cry09_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_2_Ch5 + channel 6, SFX_Cry09_2_Ch6 + channel 8, SFX_Cry09_2_Ch8 SFX_Cry0A_2:: - audio_header SFX_Cry0A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_2_Ch5 + channel 6, SFX_Cry0A_2_Ch6 + channel 8, SFX_Cry0A_2_Ch8 SFX_Cry0B_2:: - audio_header SFX_Cry0B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_2_Ch5 + channel 6, SFX_Cry0B_2_Ch6 + channel 8, SFX_Cry0B_2_Ch8 SFX_Cry0C_2:: - audio_header SFX_Cry0C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_2_Ch5 + channel 6, SFX_Cry0C_2_Ch6 + channel 8, SFX_Cry0C_2_Ch8 SFX_Cry0D_2:: - audio_header SFX_Cry0D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_2_Ch5 + channel 6, SFX_Cry0D_2_Ch6 + channel 8, SFX_Cry0D_2_Ch8 SFX_Cry0E_2:: - audio_header SFX_Cry0E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_2_Ch5 + channel 6, SFX_Cry0E_2_Ch6 + channel 8, SFX_Cry0E_2_Ch8 SFX_Cry0F_2:: - audio_header SFX_Cry0F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_2_Ch5 + channel 6, SFX_Cry0F_2_Ch6 + channel 8, SFX_Cry0F_2_Ch8 SFX_Cry10_2:: - audio_header SFX_Cry10_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_2_Ch5 + channel 6, SFX_Cry10_2_Ch6 + channel 8, SFX_Cry10_2_Ch8 SFX_Cry11_2:: - audio_header SFX_Cry11_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_2_Ch5 + channel 6, SFX_Cry11_2_Ch6 + channel 8, SFX_Cry11_2_Ch8 SFX_Cry12_2:: - audio_header SFX_Cry12_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_2_Ch5 + channel 6, SFX_Cry12_2_Ch6 + channel 8, SFX_Cry12_2_Ch8 SFX_Cry13_2:: - audio_header SFX_Cry13_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_2_Ch5 + channel 6, SFX_Cry13_2_Ch6 + channel 8, SFX_Cry13_2_Ch8 SFX_Cry14_2:: - audio_header SFX_Cry14_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_2_Ch5 + channel 6, SFX_Cry14_2_Ch6 + channel 8, SFX_Cry14_2_Ch8 SFX_Cry15_2:: - audio_header SFX_Cry15_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_2_Ch5 + channel 6, SFX_Cry15_2_Ch6 + channel 8, SFX_Cry15_2_Ch8 SFX_Cry16_2:: - audio_header SFX_Cry16_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_2_Ch5 + channel 6, SFX_Cry16_2_Ch6 + channel 8, SFX_Cry16_2_Ch8 SFX_Cry17_2:: - audio_header SFX_Cry17_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_2_Ch5 + channel 6, SFX_Cry17_2_Ch6 + channel 8, SFX_Cry17_2_Ch8 SFX_Cry18_2:: - audio_header SFX_Cry18_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_2_Ch5 + channel 6, SFX_Cry18_2_Ch6 + channel 8, SFX_Cry18_2_Ch8 SFX_Cry19_2:: - audio_header SFX_Cry19_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_2_Ch5 + channel 6, SFX_Cry19_2_Ch6 + channel 8, SFX_Cry19_2_Ch8 SFX_Cry1A_2:: - audio_header SFX_Cry1A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_2_Ch5 + channel 6, SFX_Cry1A_2_Ch6 + channel 8, SFX_Cry1A_2_Ch8 SFX_Cry1B_2:: - audio_header SFX_Cry1B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_2_Ch5 + channel 6, SFX_Cry1B_2_Ch6 + channel 8, SFX_Cry1B_2_Ch8 SFX_Cry1C_2:: - audio_header SFX_Cry1C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_2_Ch5 + channel 6, SFX_Cry1C_2_Ch6 + channel 8, SFX_Cry1C_2_Ch8 SFX_Cry1D_2:: - audio_header SFX_Cry1D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_2_Ch5 + channel 6, SFX_Cry1D_2_Ch6 + channel 8, SFX_Cry1D_2_Ch8 SFX_Cry1E_2:: - audio_header SFX_Cry1E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_2_Ch5 + channel 6, SFX_Cry1E_2_Ch6 + channel 8, SFX_Cry1E_2_Ch8 SFX_Cry1F_2:: - audio_header SFX_Cry1F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_2_Ch5 + channel 6, SFX_Cry1F_2_Ch6 + channel 8, SFX_Cry1F_2_Ch8 SFX_Cry20_2:: - audio_header SFX_Cry20_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_2_Ch5 + channel 6, SFX_Cry20_2_Ch6 + channel 8, SFX_Cry20_2_Ch8 SFX_Cry21_2:: - audio_header SFX_Cry21_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_2_Ch5 + channel 6, SFX_Cry21_2_Ch6 + channel 8, SFX_Cry21_2_Ch8 SFX_Cry22_2:: - audio_header SFX_Cry22_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_2_Ch5 + channel 6, SFX_Cry22_2_Ch6 + channel 8, SFX_Cry22_2_Ch8 SFX_Cry23_2:: - audio_header SFX_Cry23_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_2_Ch5 + channel 6, SFX_Cry23_2_Ch6 + channel 8, SFX_Cry23_2_Ch8 SFX_Cry24_2:: - audio_header SFX_Cry24_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_2_Ch5 + channel 6, SFX_Cry24_2_Ch6 + channel 8, SFX_Cry24_2_Ch8 SFX_Cry25_2:: - audio_header SFX_Cry25_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_2_Ch5 + channel 6, SFX_Cry25_2_Ch6 + channel 8, SFX_Cry25_2_Ch8 SFX_Level_Up:: - audio_header SFX_Level_Up, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Level_Up_Ch5 + channel 6, SFX_Level_Up_Ch6 + channel 7, SFX_Level_Up_Ch7 SFX_Get_Item2_2:: - audio_header SFX_Get_Item2_2, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_2_Ch5 + channel 6, SFX_Get_Item2_2_Ch6 + channel 7, SFX_Get_Item2_2_Ch7 SFX_Tink_2:: - audio_header SFX_Tink_2, Ch5 + channel_count 1 + channel 5, SFX_Tink_2_Ch5 SFX_Heal_HP_2:: - audio_header SFX_Heal_HP_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_2_Ch5 SFX_Heal_Ailment_2:: - audio_header SFX_Heal_Ailment_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_2_Ch5 SFX_Start_Menu_2:: - audio_header SFX_Start_Menu_2, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_2_Ch8 SFX_Press_AB_2:: - audio_header SFX_Press_AB_2, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_2_Ch5 SFX_Ball_Toss:: - audio_header SFX_Ball_Toss, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Ball_Toss_Ch5 + channel 6, SFX_Ball_Toss_Ch6 SFX_Ball_Poof:: - audio_header SFX_Ball_Poof, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Ball_Poof_Ch5 + channel 8, SFX_Ball_Poof_Ch8 SFX_Faint_Thud:: - audio_header SFX_Faint_Thud, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Faint_Thud_Ch5 + channel 8, SFX_Faint_Thud_Ch8 SFX_Run:: - audio_header SFX_Run, Ch8 + channel_count 1 + channel 8, SFX_Run_Ch8 SFX_Dex_Page_Added:: - audio_header SFX_Dex_Page_Added, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Dex_Page_Added_Ch5 + channel 6, SFX_Dex_Page_Added_Ch6 SFX_Caught_Mon:: - audio_header SFX_Caught_Mon, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Caught_Mon_Ch5 + channel 6, SFX_Caught_Mon_Ch6 + channel 7, SFX_Caught_Mon_Ch7 SFX_Peck:: - audio_header SFX_Peck, Ch8 + channel_count 1 + channel 8, SFX_Peck_Ch8 SFX_Faint_Fall:: - audio_header SFX_Faint_Fall, Ch5 + channel_count 1 + channel 5, SFX_Faint_Fall_Ch5 SFX_Battle_09:: - audio_header SFX_Battle_09, Ch5 + channel_count 1 + channel 5, SFX_Battle_09_Ch5 SFX_Pound:: - audio_header SFX_Pound, Ch8 + channel_count 1 + channel 8, SFX_Pound_Ch8 SFX_Battle_0B:: - audio_header SFX_Battle_0B, Ch8 + channel_count 1 + channel 8, SFX_Battle_0B_Ch8 SFX_Battle_0C:: - audio_header SFX_Battle_0C, Ch8 + channel_count 1 + channel 8, SFX_Battle_0C_Ch8 SFX_Battle_0D:: - audio_header SFX_Battle_0D, Ch8 + channel_count 1 + channel 8, SFX_Battle_0D_Ch8 SFX_Battle_0E:: - audio_header SFX_Battle_0E, Ch8 + channel_count 1 + channel 8, SFX_Battle_0E_Ch8 SFX_Battle_0F:: - audio_header SFX_Battle_0F, Ch8 + channel_count 1 + channel 8, SFX_Battle_0F_Ch8 SFX_Damage:: - audio_header SFX_Damage, Ch8 + channel_count 1 + channel 8, SFX_Damage_Ch8 SFX_Not_Very_Effective:: - audio_header SFX_Not_Very_Effective, Ch8 + channel_count 1 + channel 8, SFX_Not_Very_Effective_Ch8 SFX_Battle_12:: - audio_header SFX_Battle_12, Ch8 + channel_count 1 + channel 8, SFX_Battle_12_Ch8 SFX_Battle_13:: - audio_header SFX_Battle_13, Ch8 + channel_count 1 + channel 8, SFX_Battle_13_Ch8 SFX_Battle_14:: - audio_header SFX_Battle_14, Ch8 + channel_count 1 + channel 8, SFX_Battle_14_Ch8 SFX_Vine_Whip:: - audio_header SFX_Vine_Whip, Ch8 + channel_count 1 + channel 8, SFX_Vine_Whip_Ch8 SFX_Battle_16:: - audio_header SFX_Battle_16, Ch8 + channel_count 1 + channel 8, SFX_Battle_16_Ch8 SFX_Battle_17:: - audio_header SFX_Battle_17, Ch8 + channel_count 1 + channel 8, SFX_Battle_17_Ch8 SFX_Battle_18:: - audio_header SFX_Battle_18, Ch8 + channel_count 1 + channel 8, SFX_Battle_18_Ch8 SFX_Battle_19:: - audio_header SFX_Battle_19, Ch8 + channel_count 1 + channel 8, SFX_Battle_19_Ch8 SFX_Super_Effective:: - audio_header SFX_Super_Effective, Ch8 + channel_count 1 + channel 8, SFX_Super_Effective_Ch8 SFX_Battle_1B:: - audio_header SFX_Battle_1B, Ch8 + channel_count 1 + channel 8, SFX_Battle_1B_Ch8 SFX_Battle_1C:: - audio_header SFX_Battle_1C, Ch8 + channel_count 1 + channel 8, SFX_Battle_1C_Ch8 SFX_Doubleslap:: - audio_header SFX_Doubleslap, Ch8 + channel_count 1 + channel 8, SFX_Doubleslap_Ch8 SFX_Battle_1E:: - audio_header SFX_Battle_1E, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_1E_Ch5 + channel 8, SFX_Battle_1E_Ch8 SFX_Horn_Drill:: - audio_header SFX_Horn_Drill, Ch8 + channel_count 1 + channel 8, SFX_Horn_Drill_Ch8 SFX_Battle_20:: - audio_header SFX_Battle_20, Ch8 + channel_count 1 + channel 8, SFX_Battle_20_Ch8 SFX_Battle_21:: - audio_header SFX_Battle_21, Ch8 + channel_count 1 + channel 8, SFX_Battle_21_Ch8 SFX_Battle_22:: - audio_header SFX_Battle_22, Ch8 + channel_count 1 + channel 8, SFX_Battle_22_Ch8 SFX_Battle_23:: - audio_header SFX_Battle_23, Ch8 + channel_count 1 + channel 8, SFX_Battle_23_Ch8 SFX_Battle_24:: - audio_header SFX_Battle_24, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_24_Ch5 + channel 8, SFX_Battle_24_Ch8 SFX_Battle_25:: - audio_header SFX_Battle_25, Ch8 + channel_count 1 + channel 8, SFX_Battle_25_Ch8 SFX_Battle_26:: - audio_header SFX_Battle_26, Ch8 + channel_count 1 + channel 8, SFX_Battle_26_Ch8 SFX_Battle_27:: - audio_header SFX_Battle_27, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_27_Ch5 + channel 6, SFX_Battle_27_Ch6 + channel 8, SFX_Battle_27_Ch8 SFX_Battle_28:: - audio_header SFX_Battle_28, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_28_Ch5 + channel 6, SFX_Battle_28_Ch6 + channel 8, SFX_Battle_28_Ch8 SFX_Battle_29:: - audio_header SFX_Battle_29, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_29_Ch5 + channel 8, SFX_Battle_29_Ch8 SFX_Battle_2A:: - audio_header SFX_Battle_2A, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2A_Ch5 + channel 6, SFX_Battle_2A_Ch6 + channel 8, SFX_Battle_2A_Ch8 SFX_Battle_2B:: - audio_header SFX_Battle_2B, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_2B_Ch5 + channel 8, SFX_Battle_2B_Ch8 SFX_Battle_2C:: - audio_header SFX_Battle_2C, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2C_Ch5 + channel 6, SFX_Battle_2C_Ch6 + channel 8, SFX_Battle_2C_Ch8 SFX_Psybeam:: - audio_header SFX_Psybeam, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psybeam_Ch5 + channel 6, SFX_Psybeam_Ch6 + channel 8, SFX_Psybeam_Ch8 SFX_Battle_2E:: - audio_header SFX_Battle_2E, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2E_Ch5 + channel 6, SFX_Battle_2E_Ch6 + channel 8, SFX_Battle_2E_Ch8 SFX_Battle_2F:: - audio_header SFX_Battle_2F, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2F_Ch5 + channel 6, SFX_Battle_2F_Ch6 + channel 8, SFX_Battle_2F_Ch8 SFX_Psychic_M:: - audio_header SFX_Psychic_M, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psychic_M_Ch5 + channel 6, SFX_Psychic_M_Ch6 + channel 8, SFX_Psychic_M_Ch8 SFX_Battle_31:: - audio_header SFX_Battle_31, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_31_Ch5 + channel 6, SFX_Battle_31_Ch6 SFX_Battle_32:: - audio_header SFX_Battle_32, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_32_Ch5 + channel 6, SFX_Battle_32_Ch6 SFX_Battle_33:: - audio_header SFX_Battle_33, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_33_Ch5 + channel 6, SFX_Battle_33_Ch6 SFX_Battle_34:: - audio_header SFX_Battle_34, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_34_Ch5 + channel 6, SFX_Battle_34_Ch6 + channel 8, SFX_Battle_34_Ch8 SFX_Battle_35:: - audio_header SFX_Battle_35, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_35_Ch5 + channel 6, SFX_Battle_35_Ch6 SFX_Battle_36:: - audio_header SFX_Battle_36, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_36_Ch5 + channel 6, SFX_Battle_36_Ch6 + channel 8, SFX_Battle_36_Ch8 SFX_Silph_Scope:: - audio_header SFX_Silph_Scope, Ch5 + channel_count 1 + channel 5, SFX_Silph_Scope_Ch5 diff --git a/audio/headers/sfxheaders3.asm b/audio/headers/sfxheaders3.asm index 2732767f..bc6451a7 100644 --- a/audio/headers/sfxheaders3.asm +++ b/audio/headers/sfxheaders3.asm @@ -2,310 +2,504 @@ SFX_Headers_3:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_3:: - audio_header SFX_Noise_Instrument01_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_3_Ch8 SFX_Noise_Instrument02_3:: - audio_header SFX_Noise_Instrument02_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_3_Ch8 SFX_Noise_Instrument03_3:: - audio_header SFX_Noise_Instrument03_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_3_Ch8 SFX_Noise_Instrument04_3:: - audio_header SFX_Noise_Instrument04_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_3_Ch8 SFX_Noise_Instrument05_3:: - audio_header SFX_Noise_Instrument05_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_3_Ch8 SFX_Noise_Instrument06_3:: - audio_header SFX_Noise_Instrument06_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_3_Ch8 SFX_Noise_Instrument07_3:: - audio_header SFX_Noise_Instrument07_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_3_Ch8 SFX_Noise_Instrument08_3:: - audio_header SFX_Noise_Instrument08_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_3_Ch8 SFX_Noise_Instrument09_3:: - audio_header SFX_Noise_Instrument09_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_3_Ch8 SFX_Noise_Instrument10_3:: - audio_header SFX_Noise_Instrument10_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_3_Ch8 SFX_Noise_Instrument11_3:: - audio_header SFX_Noise_Instrument11_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_3_Ch8 SFX_Noise_Instrument12_3:: - audio_header SFX_Noise_Instrument12_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_3_Ch8 SFX_Noise_Instrument13_3:: - audio_header SFX_Noise_Instrument13_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_3_Ch8 SFX_Noise_Instrument14_3:: - audio_header SFX_Noise_Instrument14_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_3_Ch8 SFX_Noise_Instrument15_3:: - audio_header SFX_Noise_Instrument15_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_3_Ch8 SFX_Noise_Instrument16_3:: - audio_header SFX_Noise_Instrument16_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_3_Ch8 SFX_Noise_Instrument17_3:: - audio_header SFX_Noise_Instrument17_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_3_Ch8 SFX_Noise_Instrument18_3:: - audio_header SFX_Noise_Instrument18_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_3_Ch8 SFX_Noise_Instrument19_3:: - audio_header SFX_Noise_Instrument19_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_3_Ch8 SFX_Cry00_3:: - audio_header SFX_Cry00_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_3_Ch5 + channel 6, SFX_Cry00_3_Ch6 + channel 8, SFX_Cry00_3_Ch8 SFX_Cry01_3:: - audio_header SFX_Cry01_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_3_Ch5 + channel 6, SFX_Cry01_3_Ch6 + channel 8, SFX_Cry01_3_Ch8 SFX_Cry02_3:: - audio_header SFX_Cry02_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_3_Ch5 + channel 6, SFX_Cry02_3_Ch6 + channel 8, SFX_Cry02_3_Ch8 SFX_Cry03_3:: - audio_header SFX_Cry03_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_3_Ch5 + channel 6, SFX_Cry03_3_Ch6 + channel 8, SFX_Cry03_3_Ch8 SFX_Cry04_3:: - audio_header SFX_Cry04_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_3_Ch5 + channel 6, SFX_Cry04_3_Ch6 + channel 8, SFX_Cry04_3_Ch8 SFX_Cry05_3:: - audio_header SFX_Cry05_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_3_Ch5 + channel 6, SFX_Cry05_3_Ch6 + channel 8, SFX_Cry05_3_Ch8 SFX_Cry06_3:: - audio_header SFX_Cry06_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_3_Ch5 + channel 6, SFX_Cry06_3_Ch6 + channel 8, SFX_Cry06_3_Ch8 SFX_Cry07_3:: - audio_header SFX_Cry07_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_3_Ch5 + channel 6, SFX_Cry07_3_Ch6 + channel 8, SFX_Cry07_3_Ch8 SFX_Cry08_3:: - audio_header SFX_Cry08_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_3_Ch5 + channel 6, SFX_Cry08_3_Ch6 + channel 8, SFX_Cry08_3_Ch8 SFX_Cry09_3:: - audio_header SFX_Cry09_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_3_Ch5 + channel 6, SFX_Cry09_3_Ch6 + channel 8, SFX_Cry09_3_Ch8 SFX_Cry0A_3:: - audio_header SFX_Cry0A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_3_Ch5 + channel 6, SFX_Cry0A_3_Ch6 + channel 8, SFX_Cry0A_3_Ch8 SFX_Cry0B_3:: - audio_header SFX_Cry0B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_3_Ch5 + channel 6, SFX_Cry0B_3_Ch6 + channel 8, SFX_Cry0B_3_Ch8 SFX_Cry0C_3:: - audio_header SFX_Cry0C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_3_Ch5 + channel 6, SFX_Cry0C_3_Ch6 + channel 8, SFX_Cry0C_3_Ch8 SFX_Cry0D_3:: - audio_header SFX_Cry0D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_3_Ch5 + channel 6, SFX_Cry0D_3_Ch6 + channel 8, SFX_Cry0D_3_Ch8 SFX_Cry0E_3:: - audio_header SFX_Cry0E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_3_Ch5 + channel 6, SFX_Cry0E_3_Ch6 + channel 8, SFX_Cry0E_3_Ch8 SFX_Cry0F_3:: - audio_header SFX_Cry0F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_3_Ch5 + channel 6, SFX_Cry0F_3_Ch6 + channel 8, SFX_Cry0F_3_Ch8 SFX_Cry10_3:: - audio_header SFX_Cry10_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_3_Ch5 + channel 6, SFX_Cry10_3_Ch6 + channel 8, SFX_Cry10_3_Ch8 SFX_Cry11_3:: - audio_header SFX_Cry11_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_3_Ch5 + channel 6, SFX_Cry11_3_Ch6 + channel 8, SFX_Cry11_3_Ch8 SFX_Cry12_3:: - audio_header SFX_Cry12_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_3_Ch5 + channel 6, SFX_Cry12_3_Ch6 + channel 8, SFX_Cry12_3_Ch8 SFX_Cry13_3:: - audio_header SFX_Cry13_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_3_Ch5 + channel 6, SFX_Cry13_3_Ch6 + channel 8, SFX_Cry13_3_Ch8 SFX_Cry14_3:: - audio_header SFX_Cry14_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_3_Ch5 + channel 6, SFX_Cry14_3_Ch6 + channel 8, SFX_Cry14_3_Ch8 SFX_Cry15_3:: - audio_header SFX_Cry15_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_3_Ch5 + channel 6, SFX_Cry15_3_Ch6 + channel 8, SFX_Cry15_3_Ch8 SFX_Cry16_3:: - audio_header SFX_Cry16_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_3_Ch5 + channel 6, SFX_Cry16_3_Ch6 + channel 8, SFX_Cry16_3_Ch8 SFX_Cry17_3:: - audio_header SFX_Cry17_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_3_Ch5 + channel 6, SFX_Cry17_3_Ch6 + channel 8, SFX_Cry17_3_Ch8 SFX_Cry18_3:: - audio_header SFX_Cry18_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_3_Ch5 + channel 6, SFX_Cry18_3_Ch6 + channel 8, SFX_Cry18_3_Ch8 SFX_Cry19_3:: - audio_header SFX_Cry19_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_3_Ch5 + channel 6, SFX_Cry19_3_Ch6 + channel 8, SFX_Cry19_3_Ch8 SFX_Cry1A_3:: - audio_header SFX_Cry1A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_3_Ch5 + channel 6, SFX_Cry1A_3_Ch6 + channel 8, SFX_Cry1A_3_Ch8 SFX_Cry1B_3:: - audio_header SFX_Cry1B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_3_Ch5 + channel 6, SFX_Cry1B_3_Ch6 + channel 8, SFX_Cry1B_3_Ch8 SFX_Cry1C_3:: - audio_header SFX_Cry1C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_3_Ch5 + channel 6, SFX_Cry1C_3_Ch6 + channel 8, SFX_Cry1C_3_Ch8 SFX_Cry1D_3:: - audio_header SFX_Cry1D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_3_Ch5 + channel 6, SFX_Cry1D_3_Ch6 + channel 8, SFX_Cry1D_3_Ch8 SFX_Cry1E_3:: - audio_header SFX_Cry1E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_3_Ch5 + channel 6, SFX_Cry1E_3_Ch6 + channel 8, SFX_Cry1E_3_Ch8 SFX_Cry1F_3:: - audio_header SFX_Cry1F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_3_Ch5 + channel 6, SFX_Cry1F_3_Ch6 + channel 8, SFX_Cry1F_3_Ch8 SFX_Cry20_3:: - audio_header SFX_Cry20_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_3_Ch5 + channel 6, SFX_Cry20_3_Ch6 + channel 8, SFX_Cry20_3_Ch8 SFX_Cry21_3:: - audio_header SFX_Cry21_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_3_Ch5 + channel 6, SFX_Cry21_3_Ch6 + channel 8, SFX_Cry21_3_Ch8 SFX_Cry22_3:: - audio_header SFX_Cry22_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_3_Ch5 + channel 6, SFX_Cry22_3_Ch6 + channel 8, SFX_Cry22_3_Ch8 SFX_Cry23_3:: - audio_header SFX_Cry23_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_3_Ch5 + channel 6, SFX_Cry23_3_Ch6 + channel 8, SFX_Cry23_3_Ch8 SFX_Cry24_3:: - audio_header SFX_Cry24_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_3_Ch5 + channel 6, SFX_Cry24_3_Ch6 + channel 8, SFX_Cry24_3_Ch8 SFX_Cry25_3:: - audio_header SFX_Cry25_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_3_Ch5 + channel 6, SFX_Cry25_3_Ch6 + channel 8, SFX_Cry25_3_Ch8 SFX_Get_Item1_3:: - audio_header SFX_Get_Item1_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_3_Ch5 + channel 6, SFX_Get_Item1_3_Ch6 + channel 7, SFX_Get_Item1_3_Ch7 SFX_Get_Item2_3:: - audio_header SFX_Get_Item2_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_3_Ch5 + channel 6, SFX_Get_Item2_3_Ch6 + channel 7, SFX_Get_Item2_3_Ch7 SFX_Tink_3:: - audio_header SFX_Tink_3, Ch5 + channel_count 1 + channel 5, SFX_Tink_3_Ch5 SFX_Heal_HP_3:: - audio_header SFX_Heal_HP_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_3_Ch5 SFX_Heal_Ailment_3:: - audio_header SFX_Heal_Ailment_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_3_Ch5 SFX_Start_Menu_3:: - audio_header SFX_Start_Menu_3, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_3_Ch8 SFX_Press_AB_3:: - audio_header SFX_Press_AB_3, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_3_Ch5 SFX_Pokedex_Rating_3:: - audio_header SFX_Pokedex_Rating_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_3_Ch5 + channel 6, SFX_Pokedex_Rating_3_Ch6 + channel 7, SFX_Pokedex_Rating_3_Ch7 SFX_Get_Key_Item_3:: - audio_header SFX_Get_Key_Item_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_3_Ch5 + channel 6, SFX_Get_Key_Item_3_Ch6 + channel 7, SFX_Get_Key_Item_3_Ch7 SFX_Poisoned_3:: - audio_header SFX_Poisoned_3, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_3_Ch5 SFX_Trade_Machine_3:: - audio_header SFX_Trade_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_3_Ch5 SFX_Turn_On_PC_3:: - audio_header SFX_Turn_On_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_3_Ch5 SFX_Turn_Off_PC_3:: - audio_header SFX_Turn_Off_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_3_Ch5 SFX_Enter_PC_3:: - audio_header SFX_Enter_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_3_Ch5 SFX_Shrink_3:: - audio_header SFX_Shrink_3, Ch5 + channel_count 1 + channel 5, SFX_Shrink_3_Ch5 SFX_Switch_3:: - audio_header SFX_Switch_3, Ch5 + channel_count 1 + channel 5, SFX_Switch_3_Ch5 SFX_Healing_Machine_3:: - audio_header SFX_Healing_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_3_Ch5 SFX_Teleport_Exit1_3:: - audio_header SFX_Teleport_Exit1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_3_Ch5 SFX_Teleport_Enter1_3:: - audio_header SFX_Teleport_Enter1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_3_Ch5 SFX_Teleport_Exit2_3:: - audio_header SFX_Teleport_Exit2_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_3_Ch5 SFX_Ledge_3:: - audio_header SFX_Ledge_3, Ch5 + channel_count 1 + channel 5, SFX_Ledge_3_Ch5 SFX_Teleport_Enter2_3:: - audio_header SFX_Teleport_Enter2_3, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_3_Ch8 SFX_Fly_3:: - audio_header SFX_Fly_3, Ch8 + channel_count 1 + channel 8, SFX_Fly_3_Ch8 SFX_Denied_3:: - audio_header SFX_Denied_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_3_Ch5 + channel 6, SFX_Denied_3_Ch6 SFX_Arrow_Tiles_3:: - audio_header SFX_Arrow_Tiles_3, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_3_Ch5 SFX_Push_Boulder_3:: - audio_header SFX_Push_Boulder_3, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_3_Ch8 SFX_SS_Anne_Horn_3:: - audio_header SFX_SS_Anne_Horn_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_3_Ch5 + channel 6, SFX_SS_Anne_Horn_3_Ch6 SFX_Withdraw_Deposit_3:: - audio_header SFX_Withdraw_Deposit_3, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_3_Ch5 SFX_Cut_3:: - audio_header SFX_Cut_3, Ch8 + channel_count 1 + channel 8, SFX_Cut_3_Ch8 SFX_Go_Inside_3:: - audio_header SFX_Go_Inside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_3_Ch8 SFX_Swap_3:: - audio_header SFX_Swap_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_3_Ch5 + channel 6, SFX_Swap_3_Ch6 SFX_59_3:: - audio_header SFX_59_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_3_Ch5 + channel 6, SFX_59_3_Ch6 SFX_Purchase_3:: - audio_header SFX_Purchase_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_3_Ch5 + channel 6, SFX_Purchase_3_Ch6 SFX_Collision_3:: - audio_header SFX_Collision_3, Ch5 + channel_count 1 + channel 5, SFX_Collision_3_Ch5 SFX_Go_Outside_3:: - audio_header SFX_Go_Outside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_3_Ch8 SFX_Save_3:: - audio_header SFX_Save_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_3_Ch5 + channel 6, SFX_Save_3_Ch6 SFX_Intro_Lunge:: - audio_header SFX_Intro_Lunge, Ch8 + channel_count 1 + channel 8, SFX_Intro_Lunge_Ch8 SFX_Intro_Hip:: - audio_header SFX_Intro_Hip, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hip_Ch5 SFX_Intro_Hop:: - audio_header SFX_Intro_Hop, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hop_Ch5 SFX_Intro_Raise:: - audio_header SFX_Intro_Raise, Ch8 + channel_count 1 + channel 8, SFX_Intro_Raise_Ch8 SFX_Intro_Crash:: - audio_header SFX_Intro_Crash, Ch8 + channel_count 1 + channel 8, SFX_Intro_Crash_Ch8 SFX_Intro_Whoosh:: - audio_header SFX_Intro_Whoosh, Ch8 + channel_count 1 + channel 8, SFX_Intro_Whoosh_Ch8 SFX_Slots_Stop_Wheel:: - audio_header SFX_Slots_Stop_Wheel, Ch5 + channel_count 1 + channel 5, SFX_Slots_Stop_Wheel_Ch5 SFX_Slots_Reward:: - audio_header SFX_Slots_Reward, Ch5 + channel_count 1 + channel 5, SFX_Slots_Reward_Ch5 SFX_Slots_New_Spin:: - audio_header SFX_Slots_New_Spin, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Slots_New_Spin_Ch5 + channel 6, SFX_Slots_New_Spin_Ch6 SFX_Shooting_Star:: - audio_header SFX_Shooting_Star, Ch5 + channel_count 1 + channel 5, SFX_Shooting_Star_Ch5 diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 65e19aa7..35fe1815 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -20,7 +20,7 @@ Music_DoLowHealthAlarm:: .noTone ld a, $86 - ld [wChannelSoundIDs + Ch5], a ;disable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a @@ -34,7 +34,7 @@ Music_DoLowHealthAlarm:: .disableAlarm xor a ld [wLowHealthAlarm], a ;disable alarm - ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;re-enable sound channel? ld de, .toneDataSilence jr .playTone diff --git a/audio/poke_flute.asm b/audio/poke_flute.asm index f55a2a1f..1c0caab1 100644 --- a/audio/poke_flute.asm +++ b/audio/poke_flute.asm @@ -3,7 +3,7 @@ Music_PokeFluteInBattle:: ld a, SFX_CAUGHT_MON call PlaySoundWaitForCurrent ; then immediately overwrite the channel pointers - ld hl, wChannelCommandPointers + Ch5 * 2 + ld hl, wChannelCommandPointers + CHAN5 * 2 ld de, SFX_Pokeflute_Ch5 call Audio2_OverwriteChannelPointer ld de, SFX_Pokeflute_Ch6 diff --git a/audio/wave_instruments.asm b/audio/wave_instruments.asm deleted file mode 100644 index 15376004..00000000 --- a/audio/wave_instruments.asm +++ /dev/null @@ -1,33 +0,0 @@ -; This file is INCLUDEd three times, once for each audio engine. - - dw .wave0 - dw .wave1 - dw .wave2 - dw .wave3 - dw .wave4 - dw .wave5 ; used in the Lavender Town and Pokemon Tower themes - dw .wave5 ; unused - dw .wave5 ; unused - dw .wave5 ; unused - -; these are the definitions for the channel 3 instruments -; each instrument definition is made up of 32 points (nibbles) that form -; the graph of the wave -; the current instrument is copied to rWave_0--rWave_f -.wave0 - dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 - -.wave1 - dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1 - -.wave2 - dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1 - -.wave3 - dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 - -.wave4 - dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0 - -; duty 5 reads from sfx data -.wave5 diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm new file mode 100644 index 00000000..15376004 --- /dev/null +++ b/audio/wave_samples.asm @@ -0,0 +1,33 @@ +; This file is INCLUDEd three times, once for each audio engine. + + dw .wave0 + dw .wave1 + dw .wave2 + dw .wave3 + dw .wave4 + dw .wave5 ; used in the Lavender Town and Pokemon Tower themes + dw .wave5 ; unused + dw .wave5 ; unused + dw .wave5 ; unused + +; these are the definitions for the channel 3 instruments +; each instrument definition is made up of 32 points (nibbles) that form +; the graph of the wave +; the current instrument is copied to rWave_0--rWave_f +.wave0 + dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 + +.wave1 + dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1 + +.wave2 + dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1 + +.wave3 + dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +.wave4 + dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +; duty 5 reads from sfx data +.wave5 diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index 59900fec..a8903052 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -19,15 +19,15 @@ DEF NUM_NOTES EQU const_value ; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks, ; and Audio[1|2|3]_HWChannelEnableMasks indexes (see audio/engine_[1|2|3].asm) const_def - const Ch1 ; 0 - const Ch2 ; 1 - const Ch3 ; 2 - const Ch4 ; 3 + const CHAN1 ; 0 + const CHAN2 ; 1 + const CHAN3 ; 2 + const CHAN4 ; 3 DEF NUM_MUSIC_CHANS EQU const_value - const Ch5 ; 4 - const Ch6 ; 5 - const Ch7 ; 6 - const Ch8 ; 7 + const CHAN5 ; 4 + const CHAN6 ; 5 + const CHAN7 ; 6 + const CHAN8 ; 7 DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS DEF NUM_CHANNELS EQU const_value diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6aa697c9..f84b759c 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -782,7 +782,7 @@ FaintEnemyPokemon: ld a, SFX_FAINT_FALL call PlaySoundWaitForCurrent .sfxwait - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_FAINT_FALL jr z, .sfxwait ld a, SFX_FAINT_THUD @@ -866,7 +866,7 @@ EndLowHealthAlarm: ; the low health alarm and prevents it from reactivating until the next battle. xor a ld [wLowHealthAlarm], a ; turn off low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a inc a ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating ret @@ -1864,7 +1864,7 @@ DrawPlayerHUDAndHPBar: ld [hl], $0 ret z xor a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ret .setLowHealthAlarm ld hl, wLowHealthAlarm diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index bd4a1901..b9f9d537 100644 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -46,7 +46,7 @@ EndOfBattle: .resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ld [wIsInBattle], a ld [wBattleType], a ld [wMoveMissed], a diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm index ac07e2f3..ea00be5a 100644 --- a/engine/events/hidden_objects/safari_game.asm +++ b/engine/events/hidden_objects/safari_game.asm @@ -37,7 +37,7 @@ SafariZoneGameOver: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .waitForMusicToPlay - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr nz, .waitForMusicToPlay ld a, TEXT_SAFARI_GAME_OVER diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 913b8636..a89031b4 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -991,7 +991,7 @@ ItemUseMedicine: .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a push hl push de ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) @@ -1732,7 +1732,7 @@ ItemUsePokeflute: call WaitForSoundToFinish ; wait for sound to end farcall Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch7] + ld a, [wChannelSoundIDs + CHAN7] and a ; music off? jr nz, .musicWaitLoop .skipMusic @@ -1799,7 +1799,7 @@ PlayedFluteHadEffectText: ld c, BANK(SFX_Pokeflute) call PlayMusic .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch3] + ld a, [wChannelSoundIDs + CHAN3] cp SFX_POKEFLUTE jr z, .musicWaitLoop call PlayDefaultMusic ; start playing normal music again diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index 77840556..4464fd87 100644 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -8,7 +8,7 @@ EvolveMon: push af xor a ld [wLowHealthAlarm], a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a dec a ; SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index fa404602..0d19c127 100644 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -33,7 +33,7 @@ ShakeElevator:: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .musicLoop - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr z, .musicLoop call UpdateSprites diff --git a/home/audio.asm b/home/audio.asm index eded85e9..1da6453c 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -146,10 +146,10 @@ PlaySound:: and a jr z, .next xor a - ld [wChannelSoundIDs + Ch5], a - ld [wChannelSoundIDs + Ch6], a - ld [wChannelSoundIDs + Ch7], a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN5], a + ld [wChannelSoundIDs + CHAN6], a + ld [wChannelSoundIDs + CHAN7], a + ld [wChannelSoundIDs + CHAN8], a .next ld a, [wAudioFadeOutControl] and a ; has a fade-out length been specified? diff --git a/home/delay.asm b/home/delay.asm index 850b23e9..3d1ea44d 100644 --- a/home/delay.asm +++ b/home/delay.asm @@ -18,7 +18,7 @@ WaitForSoundToFinish:: ret nz push hl .waitLoop - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 xor a or [hl] inc hl diff --git a/home/overworld.asm b/home/overworld.asm index 74c97cb7..a4e547bf 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1244,7 +1244,7 @@ CollisionCheckOnLand:: call CheckTilePassable jr nc, .noCollision .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION @@ -1925,7 +1925,7 @@ CollisionCheckOnWater:: jr z, .stopSurfing ; stop surfing if the tile is passable jr .loop .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index 114bf576..6b8a650a 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,18 +1,15 @@ -MACRO audio_header - db (_NARG - 2) << 6 | \2 - dw \1_\2 - IF _NARG > 2 - db \3 - dw \1_\3 - ENDC - IF _NARG > 3 - db \4 - dw \1_\4 - ENDC - IF _NARG > 4 - db \5 - dw \1_\5 - ENDC +MACRO channel_count + ASSERT 0 < (\1) && (\1) <= NUM_MUSIC_CHANS, \ + "channel_count must be 1-{d:NUM_MUSIC_CHANS}" + DEF _num_channels = \1 - 1 +ENDM + +MACRO channel + ASSERT 0 < (\1) && (\1) <= NUM_CHANNELS, \ + "channel id must be 1-{d:NUM_CHANNELS}" + dn (_num_channels << 2), \1 - 1 ; channel id + dw \2 ; address + DEF _num_channels = 0 ENDM const_def $10 @@ -27,9 +24,9 @@ ENDM MACRO pitch_sweep db pitch_sweep_cmd IF \2 < 0 - db (\1 << 4) | (%1000 | (\2 * -1)) + dn \1, %1000 | (\2 * -1) ELSE - db (\1 << 4) | \2 + dn \1, \2 ENDC ENDM @@ -45,9 +42,9 @@ DEF square_note_cmd EQU sfx_note_cmd ; $20 MACRO square_note db square_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC dw \4 ENDM @@ -60,16 +57,16 @@ DEF noise_note_cmd EQU sfx_note_cmd ; $20 MACRO noise_note db noise_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC db \4 ENDM ; arguments: pitch, length [1, 16] MACRO note - db (\1 << 4) | (\2 - 1) + dn \1, \2 - 1 ENDM const_next $b0 @@ -86,7 +83,7 @@ ENDM ; can only be used with instruments 1-10, excluding 2 ; unused MACRO drum_note_short - db (\1 << 4) | (\2 - 1) + note \1, \2 ENDM const_next $c0 @@ -107,9 +104,9 @@ ENDM MACRO note_type db note_type_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC ENDM @@ -145,7 +142,7 @@ ENDM MACRO vibrato db vibrato_cmd db \1 - db (\2 << 4) | \3 + dn \2, \3 ENDM ; arguments: length [1, 256], octave [1, 8], pitch @@ -153,7 +150,7 @@ ENDM MACRO pitch_slide db pitch_slide_cmd db \1 - 1 - db ((8 - \2) << 4) | \3 + dn 8 - \2, \3 ENDM ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) @@ -179,7 +176,7 @@ ENDM const stereo_panning_cmd ; $ee MACRO stereo_panning db stereo_panning_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const unknownmusic0xef_cmd ; $ef @@ -192,7 +189,7 @@ ENDM const volume_cmd ; $f0 MACRO volume db volume_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const_next $f8 diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm index 5030244c..3267dcee 100644 --- a/scripts/PewterPokecenter.asm +++ b/scripts/PewterPokecenter.asm @@ -62,7 +62,7 @@ PewterJigglypuffText: call DelayFrames ld a, [wChannelSoundIDs] ld b, a - ld a, [wChannelSoundIDs + Ch2] + ld a, [wChannelSoundIDs + CHAN2] or b jr nz, .spinMovementLoop -- cgit v1.3.1-sl0p From 63a7eb2cf545281cbeaf289b261f9345d9249819 Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sat, 10 Sep 2022 18:44:31 +0100 Subject: Improve NPC trade labels and comments (#384) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/script_constants.asm | 4 ++-- data/events/trades.asm | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'constants') diff --git a/constants/script_constants.asm b/constants/script_constants.asm index d4543f05..afd1258b 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -22,7 +22,7 @@ DEF SLOTS_SOMEONESKEYS EQU $ff const_def const TRADE_FOR_TERRY const TRADE_FOR_MARCEL - const TRADE_FOR_CHIKUCHIKU + const TRADE_FOR_CHIKUCHIKU ; unused const TRADE_FOR_SAILOR const TRADE_FOR_DUX const TRADE_FOR_MARC @@ -36,7 +36,7 @@ DEF NUM_NPC_TRADES EQU const_value ; InGameTradeTextPointers indexes (see engine/events/in_game_trades.asm) const_def const TRADE_DIALOGSET_CASUAL - const TRADE_DIALOGSET_POLITE + const TRADE_DIALOGSET_EVOLUTION const TRADE_DIALOGSET_HAPPY ; badges diff --git a/data/events/trades.asm b/data/events/trades.asm index 560abfa1..b230a918 100644 --- a/data/events/trades.asm +++ b/data/events/trades.asm @@ -2,14 +2,18 @@ TradeMons: ; entries correspond to TRADE_FOR_* constants table_width 3 + NAME_LENGTH, TradeMons ; give mon, get mon, dialog id, nickname - db NIDORINO, NIDORINA, TRADE_DIALOGSET_CASUAL, "TERRY@@@@@@" - db ABRA, MR_MIME, TRADE_DIALOGSET_CASUAL, "MARCEL@@@@@" - db BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "CHIKUCHIKU@" - db PONYTA, SEEL, TRADE_DIALOGSET_CASUAL, "SAILOR@@@@@" - db SPEAROW, FARFETCHD, TRADE_DIALOGSET_HAPPY, "DUX@@@@@@@@" - db SLOWBRO, LICKITUNG, TRADE_DIALOGSET_CASUAL, "MARC@@@@@@@" - db POLIWHIRL, JYNX, TRADE_DIALOGSET_POLITE, "LOLA@@@@@@@" - db RAICHU, ELECTRODE, TRADE_DIALOGSET_POLITE, "DORIS@@@@@@" - db VENONAT, TANGELA, TRADE_DIALOGSET_HAPPY, "CRINKLES@@@" - db NIDORAN_M, NIDORAN_F, TRADE_DIALOGSET_HAPPY, "SPOT@@@@@@@" + ; The two instances of TRADE_DIALOGSET_EVOLUTION are a leftover + ; from the Japanese Blue trades, which used species that evolve. + ; Japanese Red and Green used TRADE_DIALOGSET_CASUAL, and had + ; the same species as English Red and Blue. + db NIDORINO, NIDORINA, TRADE_DIALOGSET_CASUAL, "TERRY@@@@@@" + db ABRA, MR_MIME, TRADE_DIALOGSET_CASUAL, "MARCEL@@@@@" + db BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "CHIKUCHIKU@" ; unused + db PONYTA, SEEL, TRADE_DIALOGSET_CASUAL, "SAILOR@@@@@" + db SPEAROW, FARFETCHD, TRADE_DIALOGSET_HAPPY, "DUX@@@@@@@@" + db SLOWBRO, LICKITUNG, TRADE_DIALOGSET_CASUAL, "MARC@@@@@@@" + db POLIWHIRL, JYNX, TRADE_DIALOGSET_EVOLUTION, "LOLA@@@@@@@" + db RAICHU, ELECTRODE, TRADE_DIALOGSET_EVOLUTION, "DORIS@@@@@@" + db VENONAT, TANGELA, TRADE_DIALOGSET_HAPPY, "CRINKLES@@@" + db NIDORAN_M, NIDORAN_F, TRADE_DIALOGSET_HAPPY, "SPOT@@@@@@@" assert_table_length NUM_NPC_TRADES -- cgit v1.3.1-sl0p From 74cee737f6990fd770838eb8fe4d090028a76bd9 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sun, 11 Sep 2022 00:05:04 -0500 Subject: Rename `macros/wram.asm` to `macros/ram.asm` (#388) --- constants/map_object_constants.asm | 4 +- constants/pokemon_data_constants.asm | 2 +- macros/ram.asm | 115 +++++++++++++++++++++++++++++++++++ macros/wram.asm | 115 ----------------------------------- ram.asm | 2 +- 5 files changed, 119 insertions(+), 119 deletions(-) create mode 100644 macros/ram.asm delete mode 100644 macros/wram.asm (limited to 'constants') diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 5c666d83..377edcea 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -1,4 +1,4 @@ -; spritestatedata1 struct members (see macros/wram.asm) +; spritestatedata1 struct members (see macros/ram.asm) const_def const SPRITESTATEDATA1_PICTUREID ; 0 const SPRITESTATEDATA1_MOVEMENTSTATUS ; 1 @@ -18,7 +18,7 @@ const SPRITESTATEDATA1_0F ; f DEF SPRITESTATEDATA1_LENGTH EQU const_value -; spritestatedata2 struct members (see macros/wram.asm) +; spritestatedata2 struct members (see macros/ram.asm) const_def const SPRITESTATEDATA2_WALKANIMATIONCOUNTER ; 0 const SPRITESTATEDATA2_01 ; 1 diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 1fd7ce19..028d6711 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -23,7 +23,7 @@ DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 rb_skip DEF BASE_DATA_SIZE EQU _RS -; party_struct members (see macros/wram.asm) +; party_struct members (see macros/ram.asm) rsreset DEF MON_SPECIES rb DEF MON_HP rw diff --git a/macros/ram.asm b/macros/ram.asm new file mode 100644 index 00000000..df5dcf90 --- /dev/null +++ b/macros/ram.asm @@ -0,0 +1,115 @@ +; Used in wram.asm + +MACRO flag_array + ds ((\1) + 7) / 8 +ENDM + +DEF BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2 + +MACRO box_struct +\1Species:: db +\1HP:: dw +\1BoxLevel:: db +\1Status:: db +\1Type:: +\1Type1:: db +\1Type2:: db +\1CatchRate:: db +\1Moves:: ds NUM_MOVES +\1OTID:: dw +\1Exp:: ds 3 +\1HPExp:: dw +\1AttackExp:: dw +\1DefenseExp:: dw +\1SpeedExp:: dw +\1SpecialExp:: dw +\1DVs:: ds 2 +\1PP:: ds NUM_MOVES +ENDM + +MACRO party_struct + box_struct \1 +\1Level:: db +\1Stats:: +\1MaxHP:: dw +\1Attack:: dw +\1Defense:: dw +\1Speed:: dw +\1Special:: dw +ENDM + +MACRO battle_struct +\1Species:: db +\1HP:: dw +\1PartyPos:: +\1BoxLevel:: db +\1Status:: db +\1Type:: +\1Type1:: db +\1Type2:: db +\1CatchRate:: db +\1Moves:: ds NUM_MOVES +\1DVs:: ds 2 +\1Level:: db +\1Stats:: +\1MaxHP:: dw +\1Attack:: dw +\1Defense:: dw +\1Speed:: dw +\1Special:: dw +\1PP:: ds NUM_MOVES +ENDM + +MACRO spritestatedata1 +\1PictureID:: db +\1MovementStatus:: db +\1ImageIndex:: db +\1YStepVector:: db +\1YPixels:: db +\1XStepVector:: db +\1XPixels:: db +\1IntraAnimFrameCounter:: db +\1AnimFrameCounter:: db +\1FacingDirection:: db +\1YAdjusted:: db +\1XAdjusted:: db +\1CollisionData:: db + ds 3 +\1End:: +ENDM + +MACRO spritestatedata2 +\1WalkAnimationCounter:: db + ds 1 +\1YDisplacement:: db +\1XDisplacement:: db +\1MapY:: db +\1MapX:: db +\1MovementByte1:: db +\1GrassPriority:: db +\1MovementDelay:: db +\1OrigFacingDirection:: db + ds 3 +\1PictureID:: db +\1ImageBaseOffset:: db + ds 1 +\1End:: +ENDM + +MACRO sprite_oam_struct +\1YCoord:: db +\1XCoord:: db +\1TileID:: db +\1Attributes:: db +ENDM + +MACRO map_connection_struct +\1ConnectedMap:: db +\1ConnectionStripSrc:: dw +\1ConnectionStripDest:: dw +\1ConnectionStripLength:: db +\1ConnectedMapWidth:: db +\1ConnectedMapYAlignment:: db +\1ConnectedMapXAlignment:: db +\1ConnectedMapViewPointer:: dw +ENDM diff --git a/macros/wram.asm b/macros/wram.asm deleted file mode 100644 index df5dcf90..00000000 --- a/macros/wram.asm +++ /dev/null @@ -1,115 +0,0 @@ -; Used in wram.asm - -MACRO flag_array - ds ((\1) + 7) / 8 -ENDM - -DEF BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2 - -MACRO box_struct -\1Species:: db -\1HP:: dw -\1BoxLevel:: db -\1Status:: db -\1Type:: -\1Type1:: db -\1Type2:: db -\1CatchRate:: db -\1Moves:: ds NUM_MOVES -\1OTID:: dw -\1Exp:: ds 3 -\1HPExp:: dw -\1AttackExp:: dw -\1DefenseExp:: dw -\1SpeedExp:: dw -\1SpecialExp:: dw -\1DVs:: ds 2 -\1PP:: ds NUM_MOVES -ENDM - -MACRO party_struct - box_struct \1 -\1Level:: db -\1Stats:: -\1MaxHP:: dw -\1Attack:: dw -\1Defense:: dw -\1Speed:: dw -\1Special:: dw -ENDM - -MACRO battle_struct -\1Species:: db -\1HP:: dw -\1PartyPos:: -\1BoxLevel:: db -\1Status:: db -\1Type:: -\1Type1:: db -\1Type2:: db -\1CatchRate:: db -\1Moves:: ds NUM_MOVES -\1DVs:: ds 2 -\1Level:: db -\1Stats:: -\1MaxHP:: dw -\1Attack:: dw -\1Defense:: dw -\1Speed:: dw -\1Special:: dw -\1PP:: ds NUM_MOVES -ENDM - -MACRO spritestatedata1 -\1PictureID:: db -\1MovementStatus:: db -\1ImageIndex:: db -\1YStepVector:: db -\1YPixels:: db -\1XStepVector:: db -\1XPixels:: db -\1IntraAnimFrameCounter:: db -\1AnimFrameCounter:: db -\1FacingDirection:: db -\1YAdjusted:: db -\1XAdjusted:: db -\1CollisionData:: db - ds 3 -\1End:: -ENDM - -MACRO spritestatedata2 -\1WalkAnimationCounter:: db - ds 1 -\1YDisplacement:: db -\1XDisplacement:: db -\1MapY:: db -\1MapX:: db -\1MovementByte1:: db -\1GrassPriority:: db -\1MovementDelay:: db -\1OrigFacingDirection:: db - ds 3 -\1PictureID:: db -\1ImageBaseOffset:: db - ds 1 -\1End:: -ENDM - -MACRO sprite_oam_struct -\1YCoord:: db -\1XCoord:: db -\1TileID:: db -\1Attributes:: db -ENDM - -MACRO map_connection_struct -\1ConnectedMap:: db -\1ConnectionStripSrc:: dw -\1ConnectionStripDest:: dw -\1ConnectionStripLength:: db -\1ConnectedMapWidth:: db -\1ConnectedMapYAlignment:: db -\1ConnectedMapXAlignment:: db -\1ConnectedMapViewPointer:: dw -ENDM diff --git a/ram.asm b/ram.asm index 24040b14..077ae799 100644 --- a/ram.asm +++ b/ram.asm @@ -1,6 +1,6 @@ INCLUDE "constants.asm" -INCLUDE "macros/wram.asm" +INCLUDE "macros/ram.asm" INCLUDE "ram/vram.asm" -- cgit v1.3.1-sl0p From e9e769fba15c2373d43f37721a45427a9218c154 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:00:06 -0400 Subject: Copy pokecrystal's `map_const` macro Fixes #386 --- constants/map_constants.asm | 502 ++++++++++++++++++++++---------------------- 1 file changed, 251 insertions(+), 251 deletions(-) (limited to 'constants') diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 48b25461..644cfab4 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,7 +1,7 @@ -MACRO mapconst +MACRO map_const const \1 - DEF \1_HEIGHT EQU \2 - DEF \1_WIDTH EQU \3 + DEF \1_WIDTH EQU \2 + DEF \1_HEIGHT EQU \3 ENDM ; map ids @@ -16,257 +16,257 @@ ENDM ; Each map also has associated data in maps.asm. ; Order: towns/cities, then routes, then indoor/dungeon maps const_def - mapconst PALLET_TOWN, 9, 10 ; $00 - mapconst VIRIDIAN_CITY, 18, 20 ; $01 - mapconst PEWTER_CITY, 18, 20 ; $02 - mapconst CERULEAN_CITY, 18, 20 ; $03 - mapconst LAVENDER_TOWN, 9, 10 ; $04 - mapconst VERMILION_CITY, 18, 20 ; $05 - mapconst CELADON_CITY, 18, 25 ; $06 - mapconst FUCHSIA_CITY, 18, 20 ; $07 - mapconst CINNABAR_ISLAND, 9, 10 ; $08 - mapconst INDIGO_PLATEAU, 9, 10 ; $09 - mapconst SAFFRON_CITY, 18, 20 ; $0A + map_const PALLET_TOWN, 10, 9 ; $00 + map_const VIRIDIAN_CITY, 20, 18 ; $01 + map_const PEWTER_CITY, 20, 18 ; $02 + map_const CERULEAN_CITY, 20, 18 ; $03 + map_const LAVENDER_TOWN, 10, 9 ; $04 + map_const VERMILION_CITY, 20, 18 ; $05 + map_const CELADON_CITY, 25, 18 ; $06 + map_const FUCHSIA_CITY, 20, 18 ; $07 + map_const CINNABAR_ISLAND, 10, 9 ; $08 + map_const INDIGO_PLATEAU, 10, 9 ; $09 + map_const SAFFRON_CITY, 20, 18 ; $0A DEF NUM_CITY_MAPS EQU const_value - mapconst UNUSED_MAP_0B, 0, 0 ; $0B + map_const UNUSED_MAP_0B, 0, 0 ; $0B DEF FIRST_ROUTE_MAP EQU const_value - mapconst ROUTE_1, 18, 10 ; $0C - mapconst ROUTE_2, 36, 10 ; $0D - mapconst ROUTE_3, 9, 35 ; $0E - mapconst ROUTE_4, 9, 45 ; $0F - mapconst ROUTE_5, 18, 10 ; $10 - mapconst ROUTE_6, 18, 10 ; $11 - mapconst ROUTE_7, 9, 10 ; $12 - mapconst ROUTE_8, 9, 30 ; $13 - mapconst ROUTE_9, 9, 30 ; $14 - mapconst ROUTE_10, 36, 10 ; $15 - mapconst ROUTE_11, 9, 30 ; $16 - mapconst ROUTE_12, 54, 10 ; $17 - mapconst ROUTE_13, 9, 30 ; $18 - mapconst ROUTE_14, 27, 10 ; $19 - mapconst ROUTE_15, 9, 30 ; $1A - mapconst ROUTE_16, 9, 20 ; $1B - mapconst ROUTE_17, 72, 10 ; $1C - mapconst ROUTE_18, 9, 25 ; $1D - mapconst ROUTE_19, 27, 10 ; $1E - mapconst ROUTE_20, 9, 50 ; $1F - mapconst ROUTE_21, 45, 10 ; $20 - mapconst ROUTE_22, 9, 20 ; $21 - mapconst ROUTE_23, 72, 10 ; $22 - mapconst ROUTE_24, 18, 10 ; $23 - mapconst ROUTE_25, 9, 30 ; $24 + map_const ROUTE_1, 10, 18 ; $0C + map_const ROUTE_2, 10, 36 ; $0D + map_const ROUTE_3, 35, 9 ; $0E + map_const ROUTE_4, 45, 9 ; $0F + map_const ROUTE_5, 10, 18 ; $10 + map_const ROUTE_6, 10, 18 ; $11 + map_const ROUTE_7, 10, 9 ; $12 + map_const ROUTE_8, 30, 9 ; $13 + map_const ROUTE_9, 30, 9 ; $14 + map_const ROUTE_10, 10, 36 ; $15 + map_const ROUTE_11, 30, 9 ; $16 + map_const ROUTE_12, 10, 54 ; $17 + map_const ROUTE_13, 30, 9 ; $18 + map_const ROUTE_14, 10, 27 ; $19 + map_const ROUTE_15, 30, 9 ; $1A + map_const ROUTE_16, 20, 9 ; $1B + map_const ROUTE_17, 10, 72 ; $1C + map_const ROUTE_18, 25, 9 ; $1D + map_const ROUTE_19, 10, 27 ; $1E + map_const ROUTE_20, 50, 9 ; $1F + map_const ROUTE_21, 10, 45 ; $20 + map_const ROUTE_22, 20, 9 ; $21 + map_const ROUTE_23, 10, 72 ; $22 + map_const ROUTE_24, 10, 18 ; $23 + map_const ROUTE_25, 30, 9 ; $24 DEF FIRST_INDOOR_MAP EQU const_value - mapconst REDS_HOUSE_1F, 4, 4 ; $25 - mapconst REDS_HOUSE_2F, 4, 4 ; $26 - mapconst BLUES_HOUSE, 4, 4 ; $27 - mapconst OAKS_LAB, 6, 5 ; $28 - mapconst VIRIDIAN_POKECENTER, 4, 7 ; $29 - mapconst VIRIDIAN_MART, 4, 4 ; $2A - mapconst VIRIDIAN_SCHOOL_HOUSE, 4, 4 ; $2B - mapconst VIRIDIAN_NICKNAME_HOUSE, 4, 4 ; $2C - mapconst VIRIDIAN_GYM, 9, 10 ; $2D - mapconst DIGLETTS_CAVE_ROUTE_2, 4, 4 ; $2E - mapconst VIRIDIAN_FOREST_NORTH_GATE, 4, 5 ; $2F - mapconst ROUTE_2_TRADE_HOUSE, 4, 4 ; $30 - mapconst ROUTE_2_GATE, 4, 5 ; $31 - mapconst VIRIDIAN_FOREST_SOUTH_GATE, 4, 5 ; $32 - mapconst VIRIDIAN_FOREST, 24, 17 ; $33 - mapconst MUSEUM_1F, 4, 10 ; $34 - mapconst MUSEUM_2F, 4, 7 ; $35 - mapconst PEWTER_GYM, 7, 5 ; $36 - mapconst PEWTER_NIDORAN_HOUSE, 4, 4 ; $37 - mapconst PEWTER_MART, 4, 4 ; $38 - mapconst PEWTER_SPEECH_HOUSE, 4, 4 ; $39 - mapconst PEWTER_POKECENTER, 4, 7 ; $3A - mapconst MT_MOON_1F, 18, 20 ; $3B - mapconst MT_MOON_B1F, 14, 14 ; $3C - mapconst MT_MOON_B2F, 18, 20 ; $3D - mapconst CERULEAN_TRASHED_HOUSE, 4, 4 ; $3E - mapconst CERULEAN_TRADE_HOUSE, 4, 4 ; $3F - mapconst CERULEAN_POKECENTER, 4, 7 ; $40 - mapconst CERULEAN_GYM, 7, 5 ; $41 - mapconst BIKE_SHOP, 4, 4 ; $42 - mapconst CERULEAN_MART, 4, 4 ; $43 - mapconst MT_MOON_POKECENTER, 4, 7 ; $44 - mapconst CERULEAN_TRASHED_HOUSE_COPY, 4, 4 ; $45 - mapconst ROUTE_5_GATE, 3, 4 ; $46 - mapconst UNDERGROUND_PATH_ROUTE_5, 4, 4 ; $47 - mapconst DAYCARE, 4, 4 ; $48 - mapconst ROUTE_6_GATE, 3, 4 ; $49 - mapconst UNDERGROUND_PATH_ROUTE_6, 4, 4 ; $4A - mapconst UNDERGROUND_PATH_ROUTE_6_COPY, 4, 4 ; $4B - mapconst ROUTE_7_GATE, 4, 3 ; $4C - mapconst UNDERGROUND_PATH_ROUTE_7, 4, 4 ; $4D - mapconst UNDERGROUND_PATH_ROUTE_7_COPY, 4, 4 ; $4E - mapconst ROUTE_8_GATE, 4, 3 ; $4F - mapconst UNDERGROUND_PATH_ROUTE_8, 4, 4 ; $50 - mapconst ROCK_TUNNEL_POKECENTER, 4, 7 ; $51 - mapconst ROCK_TUNNEL_1F, 18, 20 ; $52 - mapconst POWER_PLANT, 18, 20 ; $53 - mapconst ROUTE_11_GATE_1F, 5, 4 ; $54 - mapconst DIGLETTS_CAVE_ROUTE_11, 4, 4 ; $55 - mapconst ROUTE_11_GATE_2F, 4, 4 ; $56 - mapconst ROUTE_12_GATE_1F, 4, 5 ; $57 - mapconst BILLS_HOUSE, 4, 4 ; $58 - mapconst VERMILION_POKECENTER, 4, 7 ; $59 - mapconst POKEMON_FAN_CLUB, 4, 4 ; $5A - mapconst VERMILION_MART, 4, 4 ; $5B - mapconst VERMILION_GYM, 9, 5 ; $5C - mapconst VERMILION_PIDGEY_HOUSE, 4, 4 ; $5D - mapconst VERMILION_DOCK, 6, 14 ; $5E - mapconst SS_ANNE_1F, 9, 20 ; $5F - mapconst SS_ANNE_2F, 9, 20 ; $60 - mapconst SS_ANNE_3F, 3, 10 ; $61 - mapconst SS_ANNE_B1F, 4, 15 ; $62 - mapconst SS_ANNE_BOW, 7, 10 ; $63 - mapconst SS_ANNE_KITCHEN, 8, 7 ; $64 - mapconst SS_ANNE_CAPTAINS_ROOM, 4, 3 ; $65 - mapconst SS_ANNE_1F_ROOMS, 8, 12 ; $66 - mapconst SS_ANNE_2F_ROOMS, 8, 12 ; $67 - mapconst SS_ANNE_B1F_ROOMS, 8, 12 ; $68 - mapconst UNUSED_MAP_69, 0, 0 ; $69 - mapconst UNUSED_MAP_6A, 0, 0 ; $6A - mapconst UNUSED_MAP_6B, 0, 0 ; $6B - mapconst VICTORY_ROAD_1F, 9, 10 ; $6C - mapconst UNUSED_MAP_6D, 0, 0 ; $6D - mapconst UNUSED_MAP_6E, 0, 0 ; $6E - mapconst UNUSED_MAP_6F, 0, 0 ; $6F - mapconst UNUSED_MAP_70, 0, 0 ; $70 - mapconst LANCES_ROOM, 13, 13 ; $71 - mapconst UNUSED_MAP_72, 0, 0 ; $72 - mapconst UNUSED_MAP_73, 0, 0 ; $73 - mapconst UNUSED_MAP_74, 0, 0 ; $74 - mapconst UNUSED_MAP_75, 0, 0 ; $75 - mapconst HALL_OF_FAME, 4, 5 ; $76 - mapconst UNDERGROUND_PATH_NORTH_SOUTH, 24, 4 ; $77 - mapconst CHAMPIONS_ROOM, 4, 4 ; $78 - mapconst UNDERGROUND_PATH_WEST_EAST, 4, 25 ; $79 - mapconst CELADON_MART_1F, 4, 10 ; $7A - mapconst CELADON_MART_2F, 4, 10 ; $7B - mapconst CELADON_MART_3F, 4, 10 ; $7C - mapconst CELADON_MART_4F, 4, 10 ; $7D - mapconst CELADON_MART_ROOF, 4, 10 ; $7E - mapconst CELADON_MART_ELEVATOR, 2, 2 ; $7F - mapconst CELADON_MANSION_1F, 6, 4 ; $80 - mapconst CELADON_MANSION_2F, 6, 4 ; $81 - mapconst CELADON_MANSION_3F, 6, 4 ; $82 - mapconst CELADON_MANSION_ROOF, 6, 4 ; $83 - mapconst CELADON_MANSION_ROOF_HOUSE, 4, 4 ; $84 - mapconst CELADON_POKECENTER, 4, 7 ; $85 - mapconst CELADON_GYM, 9, 5 ; $86 - mapconst GAME_CORNER, 9, 10 ; $87 - mapconst CELADON_MART_5F, 4, 10 ; $88 - mapconst GAME_CORNER_PRIZE_ROOM, 4, 5 ; $89 - mapconst CELADON_DINER, 4, 5 ; $8A - mapconst CELADON_CHIEF_HOUSE, 4, 4 ; $8B - mapconst CELADON_HOTEL, 4, 7 ; $8C - mapconst LAVENDER_POKECENTER, 4, 7 ; $8D - mapconst POKEMON_TOWER_1F, 9, 10 ; $8E - mapconst POKEMON_TOWER_2F, 9, 10 ; $8F - mapconst POKEMON_TOWER_3F, 9, 10 ; $90 - mapconst POKEMON_TOWER_4F, 9, 10 ; $91 - mapconst POKEMON_TOWER_5F, 9, 10 ; $92 - mapconst POKEMON_TOWER_6F, 9, 10 ; $93 - mapconst POKEMON_TOWER_7F, 9, 10 ; $94 - mapconst MR_FUJIS_HOUSE, 4, 4 ; $95 - mapconst LAVENDER_MART, 4, 4 ; $96 - mapconst LAVENDER_CUBONE_HOUSE, 4, 4 ; $97 - mapconst FUCHSIA_MART, 4, 4 ; $98 - mapconst FUCHSIA_BILLS_GRANDPAS_HOUSE, 4, 4 ; $99 - mapconst FUCHSIA_POKECENTER, 4, 7 ; $9A - mapconst WARDENS_HOUSE, 4, 5 ; $9B - mapconst SAFARI_ZONE_GATE, 3, 4 ; $9C - mapconst FUCHSIA_GYM, 9, 5 ; $9D - mapconst FUCHSIA_MEETING_ROOM, 4, 7 ; $9E - mapconst SEAFOAM_ISLANDS_B1F, 9, 15 ; $9F - mapconst SEAFOAM_ISLANDS_B2F, 9, 15 ; $A0 - mapconst SEAFOAM_ISLANDS_B3F, 9, 15 ; $A1 - mapconst SEAFOAM_ISLANDS_B4F, 9, 15 ; $A2 - mapconst VERMILION_OLD_ROD_HOUSE, 4, 4 ; $A3 - mapconst FUCHSIA_GOOD_ROD_HOUSE, 4, 4 ; $A4 - mapconst POKEMON_MANSION_1F, 14, 15 ; $A5 - mapconst CINNABAR_GYM, 9, 10 ; $A6 - mapconst CINNABAR_LAB, 4, 9 ; $A7 - mapconst CINNABAR_LAB_TRADE_ROOM, 4, 4 ; $A8 - mapconst CINNABAR_LAB_METRONOME_ROOM, 4, 4 ; $A9 - mapconst CINNABAR_LAB_FOSSIL_ROOM, 4, 4 ; $AA - mapconst CINNABAR_POKECENTER, 4, 7 ; $AB - mapconst CINNABAR_MART, 4, 4 ; $AC - mapconst CINNABAR_MART_COPY, 4, 4 ; $AD - mapconst INDIGO_PLATEAU_LOBBY, 6, 8 ; $AE - mapconst COPYCATS_HOUSE_1F, 4, 4 ; $AF - mapconst COPYCATS_HOUSE_2F, 4, 4 ; $B0 - mapconst FIGHTING_DOJO, 6, 5 ; $B1 - mapconst SAFFRON_GYM, 9, 10 ; $B2 - mapconst SAFFRON_PIDGEY_HOUSE, 4, 4 ; $B3 - mapconst SAFFRON_MART, 4, 4 ; $B4 - mapconst SILPH_CO_1F, 9, 15 ; $B5 - mapconst SAFFRON_POKECENTER, 4, 7 ; $B6 - mapconst MR_PSYCHICS_HOUSE, 4, 4 ; $B7 - mapconst ROUTE_15_GATE_1F, 5, 4 ; $B8 - mapconst ROUTE_15_GATE_2F, 4, 4 ; $B9 - mapconst ROUTE_16_GATE_1F, 7, 4 ; $BA - mapconst ROUTE_16_GATE_2F, 4, 4 ; $BB - mapconst ROUTE_16_FLY_HOUSE, 4, 4 ; $BC - mapconst ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; $BD - mapconst ROUTE_18_GATE_1F, 5, 4 ; $BE - mapconst ROUTE_18_GATE_2F, 4, 4 ; $BF - mapconst SEAFOAM_ISLANDS_1F, 9, 15 ; $C0 - mapconst ROUTE_22_GATE, 4, 5 ; $C1 - mapconst VICTORY_ROAD_2F, 9, 15 ; $C2 - mapconst ROUTE_12_GATE_2F, 4, 4 ; $C3 - mapconst VERMILION_TRADE_HOUSE, 4, 4 ; $C4 - mapconst DIGLETTS_CAVE, 18, 20 ; $C5 - mapconst VICTORY_ROAD_3F, 9, 15 ; $C6 - mapconst ROCKET_HIDEOUT_B1F, 14, 15 ; $C7 - mapconst ROCKET_HIDEOUT_B2F, 14, 15 ; $C8 - mapconst ROCKET_HIDEOUT_B3F, 14, 15 ; $C9 - mapconst ROCKET_HIDEOUT_B4F, 12, 15 ; $CA - mapconst ROCKET_HIDEOUT_ELEVATOR, 4, 3 ; $CB - mapconst UNUSED_MAP_CC, 0, 0 ; $CC - mapconst UNUSED_MAP_CD, 0, 0 ; $CD - mapconst UNUSED_MAP_CE, 0, 0 ; $CE - mapconst SILPH_CO_2F, 9, 15 ; $CF - mapconst SILPH_CO_3F, 9, 15 ; $D0 - mapconst SILPH_CO_4F, 9, 15 ; $D1 - mapconst SILPH_CO_5F, 9, 15 ; $D2 - mapconst SILPH_CO_6F, 9, 13 ; $D3 - mapconst SILPH_CO_7F, 9, 13 ; $D4 - mapconst SILPH_CO_8F, 9, 13 ; $D5 - mapconst POKEMON_MANSION_2F, 14, 15 ; $D6 - mapconst POKEMON_MANSION_3F, 9, 15 ; $D7 - mapconst POKEMON_MANSION_B1F, 14, 15 ; $D8 - mapconst SAFARI_ZONE_EAST, 13, 15 ; $D9 - mapconst SAFARI_ZONE_NORTH, 18, 20 ; $DA - mapconst SAFARI_ZONE_WEST, 13, 15 ; $DB - mapconst SAFARI_ZONE_CENTER, 13, 15 ; $DC - mapconst SAFARI_ZONE_CENTER_REST_HOUSE, 4, 4 ; $DD - mapconst SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE - mapconst SAFARI_ZONE_WEST_REST_HOUSE, 4, 4 ; $DF - mapconst SAFARI_ZONE_EAST_REST_HOUSE, 4, 4 ; $E0 - mapconst SAFARI_ZONE_NORTH_REST_HOUSE, 4, 4 ; $E1 - mapconst CERULEAN_CAVE_2F, 9, 15 ; $E2 - mapconst CERULEAN_CAVE_B1F, 9, 15 ; $E3 - mapconst CERULEAN_CAVE_1F, 9, 15 ; $E4 - mapconst NAME_RATERS_HOUSE, 4, 4 ; $E5 - mapconst CERULEAN_BADGE_HOUSE, 4, 4 ; $E6 - mapconst UNUSED_MAP_E7, 0, 0 ; $E7 - mapconst ROCK_TUNNEL_B1F, 18, 20 ; $E8 - mapconst SILPH_CO_9F, 9, 13 ; $E9 - mapconst SILPH_CO_10F, 9, 8 ; $EA - mapconst SILPH_CO_11F, 9, 9 ; $EB - mapconst SILPH_CO_ELEVATOR, 2, 2 ; $EC - mapconst UNUSED_MAP_ED, 0, 0 ; $ED - mapconst UNUSED_MAP_EE, 0, 0 ; $EE - mapconst TRADE_CENTER, 4, 5 ; $EF - mapconst COLOSSEUM, 4, 5 ; $F0 - mapconst UNUSED_MAP_F1, 0, 0 ; $F1 - mapconst UNUSED_MAP_F2, 0, 0 ; $F2 - mapconst UNUSED_MAP_F3, 0, 0 ; $F3 - mapconst UNUSED_MAP_F4, 0, 0 ; $F4 - mapconst LORELEIS_ROOM, 6, 5 ; $F5 - mapconst BRUNOS_ROOM, 6, 5 ; $F6 - mapconst AGATHAS_ROOM, 6, 5 ; $F7 + map_const REDS_HOUSE_1F, 4, 4 ; $25 + map_const REDS_HOUSE_2F, 4, 4 ; $26 + map_const BLUES_HOUSE, 4, 4 ; $27 + map_const OAKS_LAB, 5, 6 ; $28 + map_const VIRIDIAN_POKECENTER, 7, 4 ; $29 + map_const VIRIDIAN_MART, 4, 4 ; $2A + map_const VIRIDIAN_SCHOOL_HOUSE, 4, 4 ; $2B + map_const VIRIDIAN_NICKNAME_HOUSE, 4, 4 ; $2C + map_const VIRIDIAN_GYM, 10, 9 ; $2D + map_const DIGLETTS_CAVE_ROUTE_2, 4, 4 ; $2E + map_const VIRIDIAN_FOREST_NORTH_GATE, 5, 4 ; $2F + map_const ROUTE_2_TRADE_HOUSE, 4, 4 ; $30 + map_const ROUTE_2_GATE, 5, 4 ; $31 + map_const VIRIDIAN_FOREST_SOUTH_GATE, 5, 4 ; $32 + map_const VIRIDIAN_FOREST, 17, 24 ; $33 + map_const MUSEUM_1F, 10, 4 ; $34 + map_const MUSEUM_2F, 7, 4 ; $35 + map_const PEWTER_GYM, 5, 7 ; $36 + map_const PEWTER_NIDORAN_HOUSE, 4, 4 ; $37 + map_const PEWTER_MART, 4, 4 ; $38 + map_const PEWTER_SPEECH_HOUSE, 4, 4 ; $39 + map_const PEWTER_POKECENTER, 7, 4 ; $3A + map_const MT_MOON_1F, 20, 18 ; $3B + map_const MT_MOON_B1F, 14, 14 ; $3C + map_const MT_MOON_B2F, 20, 18 ; $3D + map_const CERULEAN_TRASHED_HOUSE, 4, 4 ; $3E + map_const CERULEAN_TRADE_HOUSE, 4, 4 ; $3F + map_const CERULEAN_POKECENTER, 7, 4 ; $40 + map_const CERULEAN_GYM, 5, 7 ; $41 + map_const BIKE_SHOP, 4, 4 ; $42 + map_const CERULEAN_MART, 4, 4 ; $43 + map_const MT_MOON_POKECENTER, 7, 4 ; $44 + map_const CERULEAN_TRASHED_HOUSE_COPY, 4, 4 ; $45 + map_const ROUTE_5_GATE, 4, 3 ; $46 + map_const UNDERGROUND_PATH_ROUTE_5, 4, 4 ; $47 + map_const DAYCARE, 4, 4 ; $48 + map_const ROUTE_6_GATE, 4, 3 ; $49 + map_const UNDERGROUND_PATH_ROUTE_6, 4, 4 ; $4A + map_const UNDERGROUND_PATH_ROUTE_6_COPY, 4, 4 ; $4B + map_const ROUTE_7_GATE, 3, 4 ; $4C + map_const UNDERGROUND_PATH_ROUTE_7, 4, 4 ; $4D + map_const UNDERGROUND_PATH_ROUTE_7_COPY, 4, 4 ; $4E + map_const ROUTE_8_GATE, 3, 4 ; $4F + map_const UNDERGROUND_PATH_ROUTE_8, 4, 4 ; $50 + map_const ROCK_TUNNEL_POKECENTER, 7, 4 ; $51 + map_const ROCK_TUNNEL_1F, 20, 18 ; $52 + map_const POWER_PLANT, 20, 18 ; $53 + map_const ROUTE_11_GATE_1F, 4, 5 ; $54 + map_const DIGLETTS_CAVE_ROUTE_11, 4, 4 ; $55 + map_const ROUTE_11_GATE_2F, 4, 4 ; $56 + map_const ROUTE_12_GATE_1F, 5, 4 ; $57 + map_const BILLS_HOUSE, 4, 4 ; $58 + map_const VERMILION_POKECENTER, 7, 4 ; $59 + map_const POKEMON_FAN_CLUB, 4, 4 ; $5A + map_const VERMILION_MART, 4, 4 ; $5B + map_const VERMILION_GYM, 5, 9 ; $5C + map_const VERMILION_PIDGEY_HOUSE, 4, 4 ; $5D + map_const VERMILION_DOCK, 14, 6 ; $5E + map_const SS_ANNE_1F, 20, 9 ; $5F + map_const SS_ANNE_2F, 20, 9 ; $60 + map_const SS_ANNE_3F, 10, 3 ; $61 + map_const SS_ANNE_B1F, 15, 4 ; $62 + map_const SS_ANNE_BOW, 10, 7 ; $63 + map_const SS_ANNE_KITCHEN, 7, 8 ; $64 + map_const SS_ANNE_CAPTAINS_ROOM, 3, 4 ; $65 + map_const SS_ANNE_1F_ROOMS, 12, 8 ; $66 + map_const SS_ANNE_2F_ROOMS, 12, 8 ; $67 + map_const SS_ANNE_B1F_ROOMS, 12, 8 ; $68 + map_const UNUSED_MAP_69, 0, 0 ; $69 + map_const UNUSED_MAP_6A, 0, 0 ; $6A + map_const UNUSED_MAP_6B, 0, 0 ; $6B + map_const VICTORY_ROAD_1F, 10, 9 ; $6C + map_const UNUSED_MAP_6D, 0, 0 ; $6D + map_const UNUSED_MAP_6E, 0, 0 ; $6E + map_const UNUSED_MAP_6F, 0, 0 ; $6F + map_const UNUSED_MAP_70, 0, 0 ; $70 + map_const LANCES_ROOM, 13, 13 ; $71 + map_const UNUSED_MAP_72, 0, 0 ; $72 + map_const UNUSED_MAP_73, 0, 0 ; $73 + map_const UNUSED_MAP_74, 0, 0 ; $74 + map_const UNUSED_MAP_75, 0, 0 ; $75 + map_const HALL_OF_FAME, 5, 4 ; $76 + map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 + map_const CHAMPIONS_ROOM, 4, 4 ; $78 + map_const UNDERGROUND_PATH_WEST_EAST, 25, 4 ; $79 + map_const CELADON_MART_1F, 10, 4 ; $7A + map_const CELADON_MART_2F, 10, 4 ; $7B + map_const CELADON_MART_3F, 10, 4 ; $7C + map_const CELADON_MART_4F, 10, 4 ; $7D + map_const CELADON_MART_ROOF, 10, 4 ; $7E + map_const CELADON_MART_ELEVATOR, 2, 2 ; $7F + map_const CELADON_MANSION_1F, 4, 6 ; $80 + map_const CELADON_MANSION_2F, 4, 6 ; $81 + map_const CELADON_MANSION_3F, 4, 6 ; $82 + map_const CELADON_MANSION_ROOF, 4, 6 ; $83 + map_const CELADON_MANSION_ROOF_HOUSE, 4, 4 ; $84 + map_const CELADON_POKECENTER, 7, 4 ; $85 + map_const CELADON_GYM, 5, 9 ; $86 + map_const GAME_CORNER, 10, 9 ; $87 + map_const CELADON_MART_5F, 10, 4 ; $88 + map_const GAME_CORNER_PRIZE_ROOM, 5, 4 ; $89 + map_const CELADON_DINER, 5, 4 ; $8A + map_const CELADON_CHIEF_HOUSE, 4, 4 ; $8B + map_const CELADON_HOTEL, 7, 4 ; $8C + map_const LAVENDER_POKECENTER, 7, 4 ; $8D + map_const POKEMON_TOWER_1F, 10, 9 ; $8E + map_const POKEMON_TOWER_2F, 10, 9 ; $8F + map_const POKEMON_TOWER_3F, 10, 9 ; $90 + map_const POKEMON_TOWER_4F, 10, 9 ; $91 + map_const POKEMON_TOWER_5F, 10, 9 ; $92 + map_const POKEMON_TOWER_6F, 10, 9 ; $93 + map_const POKEMON_TOWER_7F, 10, 9 ; $94 + map_const MR_FUJIS_HOUSE, 4, 4 ; $95 + map_const LAVENDER_MART, 4, 4 ; $96 + map_const LAVENDER_CUBONE_HOUSE, 4, 4 ; $97 + map_const FUCHSIA_MART, 4, 4 ; $98 + map_const FUCHSIA_BILLS_GRANDPAS_HOUSE, 4, 4 ; $99 + map_const FUCHSIA_POKECENTER, 7, 4 ; $9A + map_const WARDENS_HOUSE, 5, 4 ; $9B + map_const SAFARI_ZONE_GATE, 4, 3 ; $9C + map_const FUCHSIA_GYM, 5, 9 ; $9D + map_const FUCHSIA_MEETING_ROOM, 7, 4 ; $9E + map_const SEAFOAM_ISLANDS_B1F, 15, 9 ; $9F + map_const SEAFOAM_ISLANDS_B2F, 15, 9 ; $A0 + map_const SEAFOAM_ISLANDS_B3F, 15, 9 ; $A1 + map_const SEAFOAM_ISLANDS_B4F, 15, 9 ; $A2 + map_const VERMILION_OLD_ROD_HOUSE, 4, 4 ; $A3 + map_const FUCHSIA_GOOD_ROD_HOUSE, 4, 4 ; $A4 + map_const POKEMON_MANSION_1F, 15, 14 ; $A5 + map_const CINNABAR_GYM, 10, 9 ; $A6 + map_const CINNABAR_LAB, 9, 4 ; $A7 + map_const CINNABAR_LAB_TRADE_ROOM, 4, 4 ; $A8 + map_const CINNABAR_LAB_METRONOME_ROOM, 4, 4 ; $A9 + map_const CINNABAR_LAB_FOSSIL_ROOM, 4, 4 ; $AA + map_const CINNABAR_POKECENTER, 7, 4 ; $AB + map_const CINNABAR_MART, 4, 4 ; $AC + map_const CINNABAR_MART_COPY, 4, 4 ; $AD + map_const INDIGO_PLATEAU_LOBBY, 8, 6 ; $AE + map_const COPYCATS_HOUSE_1F, 4, 4 ; $AF + map_const COPYCATS_HOUSE_2F, 4, 4 ; $B0 + map_const FIGHTING_DOJO, 5, 6 ; $B1 + map_const SAFFRON_GYM, 10, 9 ; $B2 + map_const SAFFRON_PIDGEY_HOUSE, 4, 4 ; $B3 + map_const SAFFRON_MART, 4, 4 ; $B4 + map_const SILPH_CO_1F, 15, 9 ; $B5 + map_const SAFFRON_POKECENTER, 7, 4 ; $B6 + map_const MR_PSYCHICS_HOUSE, 4, 4 ; $B7 + map_const ROUTE_15_GATE_1F, 4, 5 ; $B8 + map_const ROUTE_15_GATE_2F, 4, 4 ; $B9 + map_const ROUTE_16_GATE_1F, 4, 7 ; $BA + map_const ROUTE_16_GATE_2F, 4, 4 ; $BB + map_const ROUTE_16_FLY_HOUSE, 4, 4 ; $BC + map_const ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; $BD + map_const ROUTE_18_GATE_1F, 4, 5 ; $BE + map_const ROUTE_18_GATE_2F, 4, 4 ; $BF + map_const SEAFOAM_ISLANDS_1F, 15, 9 ; $C0 + map_const ROUTE_22_GATE, 5, 4 ; $C1 + map_const VICTORY_ROAD_2F, 15, 9 ; $C2 + map_const ROUTE_12_GATE_2F, 4, 4 ; $C3 + map_const VERMILION_TRADE_HOUSE, 4, 4 ; $C4 + map_const DIGLETTS_CAVE, 20, 18 ; $C5 + map_const VICTORY_ROAD_3F, 15, 9 ; $C6 + map_const ROCKET_HIDEOUT_B1F, 15, 14 ; $C7 + map_const ROCKET_HIDEOUT_B2F, 15, 14 ; $C8 + map_const ROCKET_HIDEOUT_B3F, 15, 14 ; $C9 + map_const ROCKET_HIDEOUT_B4F, 15, 12 ; $CA + map_const ROCKET_HIDEOUT_ELEVATOR, 3, 4 ; $CB + map_const UNUSED_MAP_CC, 0, 0 ; $CC + map_const UNUSED_MAP_CD, 0, 0 ; $CD + map_const UNUSED_MAP_CE, 0, 0 ; $CE + map_const SILPH_CO_2F, 15, 9 ; $CF + map_const SILPH_CO_3F, 15, 9 ; $D0 + map_const SILPH_CO_4F, 15, 9 ; $D1 + map_const SILPH_CO_5F, 15, 9 ; $D2 + map_const SILPH_CO_6F, 13, 9 ; $D3 + map_const SILPH_CO_7F, 13, 9 ; $D4 + map_const SILPH_CO_8F, 13, 9 ; $D5 + map_const POKEMON_MANSION_2F, 15, 14 ; $D6 + map_const POKEMON_MANSION_3F, 15, 9 ; $D7 + map_const POKEMON_MANSION_B1F, 15, 14 ; $D8 + map_const SAFARI_ZONE_EAST, 15, 13 ; $D9 + map_const SAFARI_ZONE_NORTH, 20, 18 ; $DA + map_const SAFARI_ZONE_WEST, 15, 13 ; $DB + map_const SAFARI_ZONE_CENTER, 15, 13 ; $DC + map_const SAFARI_ZONE_CENTER_REST_HOUSE, 4, 4 ; $DD + map_const SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE + map_const SAFARI_ZONE_WEST_REST_HOUSE, 4, 4 ; $DF + map_const SAFARI_ZONE_EAST_REST_HOUSE, 4, 4 ; $E0 + map_const SAFARI_ZONE_NORTH_REST_HOUSE, 4, 4 ; $E1 + map_const CERULEAN_CAVE_2F, 15, 9 ; $E2 + map_const CERULEAN_CAVE_B1F, 15, 9 ; $E3 + map_const CERULEAN_CAVE_1F, 15, 9 ; $E4 + map_const NAME_RATERS_HOUSE, 4, 4 ; $E5 + map_const CERULEAN_BADGE_HOUSE, 4, 4 ; $E6 + map_const UNUSED_MAP_E7, 0, 0 ; $E7 + map_const ROCK_TUNNEL_B1F, 20, 18 ; $E8 + map_const SILPH_CO_9F, 13, 9 ; $E9 + map_const SILPH_CO_10F, 8, 9 ; $EA + map_const SILPH_CO_11F, 9, 9 ; $EB + map_const SILPH_CO_ELEVATOR, 2, 2 ; $EC + map_const UNUSED_MAP_ED, 0, 0 ; $ED + map_const UNUSED_MAP_EE, 0, 0 ; $EE + map_const TRADE_CENTER, 5, 4 ; $EF + map_const COLOSSEUM, 5, 4 ; $F0 + map_const UNUSED_MAP_F1, 0, 0 ; $F1 + map_const UNUSED_MAP_F2, 0, 0 ; $F2 + map_const UNUSED_MAP_F3, 0, 0 ; $F3 + map_const UNUSED_MAP_F4, 0, 0 ; $F4 + map_const LORELEIS_ROOM, 5, 6 ; $F5 + map_const BRUNOS_ROOM, 5, 6 ; $F6 + map_const AGATHAS_ROOM, 5, 6 ; $F7 DEF NUM_MAPS EQU const_value ; Indoor maps, such as houses, use this as the Map ID in their exit warps -- cgit v1.3.1-sl0p From cab3ccdbbd661aa75b9861aeaaa11fd0446c8113 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:00:31 -0400 Subject: Comment about UndergroundPathNorthSouth.blk size Fixes #387 --- constants/map_constants.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'constants') diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 644cfab4..dad63579 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -138,7 +138,7 @@ DEF FIRST_INDOOR_MAP EQU const_value map_const UNUSED_MAP_74, 0, 0 ; $74 map_const UNUSED_MAP_75, 0, 0 ; $75 map_const HALL_OF_FAME, 5, 4 ; $76 - map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 + map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 ; UndergroundPathNorthSouth.blk is actually 4x23 map_const CHAMPIONS_ROOM, 4, 4 ; $78 map_const UNDERGROUND_PATH_WEST_EAST, 25, 4 ; $79 map_const CELADON_MART_1F, 10, 4 ; $7A -- cgit v1.3.1-sl0p From d809d3d59c0c1016b89332be7f6f3003efa7a9f9 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:02:51 -0400 Subject: Add `UNUSED_TYPE`/`UNUSED_TYPE_END` constants Fixes #385 --- constants/type_constants.asm | 2 ++ data/types/names.asm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'constants') diff --git a/constants/type_constants.asm b/constants/type_constants.asm index e9df7faf..8226af1a 100644 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -12,7 +12,9 @@ DEF PHYSICAL EQU const_value const BUG ; $07 const GHOST ; $08 +DEF UNUSED_TYPES EQU const_value const_next 20 +DEF UNUSED_TYPES_END EQU const_value DEF SPECIAL EQU const_value const FIRE ; $14 diff --git a/data/types/names.asm b/data/types/names.asm index b63c072e..87da5c5f 100644 --- a/data/types/names.asm +++ b/data/types/names.asm @@ -11,7 +11,7 @@ TypeNames: dw .Bug dw .Ghost -REPT FIRE - GHOST - 1 +REPT UNUSED_TYPES_END - UNUSED_TYPES dw .Normal ENDR -- cgit v1.3.1-sl0p