From 0266f64f707df80f6cfde040903a629ef30c4c90 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Sun, 7 Jan 2024 15:12:13 +0100 Subject: [PATCH] Consolidate BG Map & OAM attribute flags (#1078) --- constants/hardware_constants.asm | 25 ++-- data/battle_anims/framesets.asm | 186 ++++++++++++++-------------- data/battle_anims/oam.asm | 78 ++++++------ data/sprite_anims/framesets.asm | 64 +++++----- data/sprite_anims/oam.asm | 110 ++++++++-------- engine/battle_anims/core.asm | 6 +- engine/battle_anims/functions.asm | 2 +- engine/events/heal_machine_anim.asm | 28 ++--- engine/games/slot_machine.asm | 4 +- engine/overworld/map_objects.asm | 4 +- engine/overworld/npc_movement.asm | 2 +- engine/sprite_anims/core.asm | 4 +- gfx/tileset_palette_maps.asm | 2 +- macros/scripts/oam_anims.asm | 2 +- 14 files changed, 258 insertions(+), 259 deletions(-) diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index c0b511a02ed..c6e4d1b787c 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -32,20 +32,19 @@ DEF SERIAL EQU 3 DEF JOYPAD EQU 4 DEF IE_DEFAULT EQU (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) -; OAM attribute flags -DEF OAM_TILE_BANK EQU 3 -DEF OAM_OBP_NUM EQU 4 ; non CGB Mode Only -DEF OAM_X_FLIP EQU 5 -DEF OAM_Y_FLIP EQU 6 -DEF OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) +; BG Map & OAM attribute flags +DEF TILE_BANK_F EQU 3 +DEF OBP_NUM_F EQU 4 ; OAM attribute only, non CGB Mode Only +DEF X_FLIP_F EQU 5 +DEF Y_FLIP_F EQU 6 +DEF PRIORITY_F EQU 7 ; BG priority overrides OBJ priority. Otherwise, for OBJ: 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) -; BG Map attribute flags -DEF PALETTE_MASK EQU %111 -DEF VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08 -DEF OBP_NUM EQU 1 << OAM_OBP_NUM ; $10 -DEF X_FLIP EQU 1 << OAM_X_FLIP ; $20 -DEF Y_FLIP EQU 1 << OAM_Y_FLIP ; $40 -DEF PRIORITY EQU 1 << OAM_PRIORITY ; $80 +DEF PALETTE_MASK EQU %111 ; For BG Map: which of BGP0–7 to use. For OAM: which of OBP0–7 to use (CGB mode only). +DEF VRAM_BANK_1 EQU 1 << TILE_BANK_F ; $08 +DEF OBP1 EQU 1 << OBP_NUM_F ; $10 +DEF X_FLIP EQU 1 << X_FLIP_F ; $20 +DEF Y_FLIP EQU 1 << Y_FLIP_F ; $40 +DEF PRIORITY EQU 1 << PRIORITY_F ; $80 ; Hardware registers DEF rJOYP EQU $ff00 ; Joypad (R/W) diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm index e00e510f8a2..915d40870b7 100644 --- a/data/battle_anims/framesets.asm +++ b/data/battle_anims/framesets.asm @@ -241,29 +241,29 @@ BattleAnimFrameData: oamdelete .Frameset_CutDownRight: - oamframe BATTLE_ANIM_OAMSET_4B, 2, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4C, 2, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 4, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_4B, 2, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4C, 2, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 4, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F oamdelete .Frameset_CutUpRight: - oamframe BATTLE_ANIM_OAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 4, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_4B, 2, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4C, 2, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 4, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_4E, 2, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_CutLongDownLeft: @@ -283,19 +283,19 @@ BattleAnimFrameData: oamdelete .Frameset_CutLongDownRight: - oamframe BATTLE_ANIM_OAMSET_4B, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4C, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_4F, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_50, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_51, 1, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_4B, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4C, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4F, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_50, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_51, 1, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F oamdelete .Frameset_BallPoof: @@ -309,7 +309,7 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_0A, 7 oamframe BATTLE_ANIM_OAMSET_0B, 7 oamframe BATTLE_ANIM_OAMSET_0A, 7 - oamframe BATTLE_ANIM_OAMSET_0B, 7, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_0B, 7, X_FLIP_F oamrestart .Frameset_PokeBall2: @@ -328,7 +328,7 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_0A, 7 oamframe BATTLE_ANIM_OAMSET_0B, 7 oamframe BATTLE_ANIM_OAMSET_0A, 7 - oamframe BATTLE_ANIM_OAMSET_0B, 7, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_0B, 7, X_FLIP_F oamframe BATTLE_ANIM_OAMSET_0A, 7 oamend @@ -400,9 +400,9 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_16, 8 oamframe BATTLE_ANIM_OAMSET_17, 4 oamframe BATTLE_ANIM_OAMSET_17, 4 - oamframe BATTLE_ANIM_OAMSET_16, 8, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_15, 8, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_16, 8, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_16, 8, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_15, 8, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_16, 8, X_FLIP_F oamframe BATTLE_ANIM_OAMSET_17, 4 oamrestart @@ -567,10 +567,10 @@ BattleAnimFrameData: oamdelete .Frameset_ThunderRight: - oamframe BATTLE_ANIM_OAMSET_3A, 2, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_3B, 2, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_3C, 2, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_3D, 32, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_3A, 2, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_3B, 2, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_3C, 2, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_3D, 32, X_FLIP_F oamdelete .Frameset_ThunderWaveDisable: @@ -617,7 +617,7 @@ BattleAnimFrameData: oamend .Frameset_ClampFlipped: - oamframe BATTLE_ANIM_OAMSET_48, 8, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_48, 8, X_FLIP_F oamend .Frameset_Bite1: @@ -663,9 +663,9 @@ BattleAnimFrameData: oamwait 0 oamframe BATTLE_ANIM_OAMSET_14, 0 oamframe BATTLE_ANIM_OAMSET_15, 0 - oamframe BATTLE_ANIM_OAMSET_14, 0, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_14, 0, X_FLIP_F oamwait 0 - oamframe BATTLE_ANIM_OAMSET_16, 0, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_16, 0, X_FLIP_F oamframe BATTLE_ANIM_OAMSET_15, 0 oamframe BATTLE_ANIM_OAMSET_16, 0 oamrestart @@ -676,31 +676,31 @@ BattleAnimFrameData: oamdelete .Frameset_VineWhip2: - oamframe BATTLE_ANIM_OAMSET_56, 2, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_57, 4, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_56, 2, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_57, 4, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_RazorWind1: oamframe BATTLE_ANIM_OAMSET_56, 1 oamframe BATTLE_ANIM_OAMSET_57, 1 oamframe BATTLE_ANIM_OAMSET_58, 1 - oamframe BATTLE_ANIM_OAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_57, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_58, 1, X_FLIP_F, Y_FLIP_F oamframe BATTLE_ANIM_OAMSET_57, 2 oamdelete .Frameset_RazorWind2: - oamframe BATTLE_ANIM_OAMSET_56, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_56, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_57, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_58, 1, X_FLIP_F, Y_FLIP_F oamframe BATTLE_ANIM_OAMSET_57, 1 oamframe BATTLE_ANIM_OAMSET_58, 1 - oamframe BATTLE_ANIM_OAMSET_57, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_57, 2, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_SonicboomJP: - oamframe BATTLE_ANIM_OAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_57, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_58, 1, X_FLIP_F, Y_FLIP_F oamframe BATTLE_ANIM_OAMSET_57, 1 oamframe BATTLE_ANIM_OAMSET_58, 1 oamrestart @@ -714,18 +714,18 @@ BattleAnimFrameData: .Frameset_Egg: oamframe BATTLE_ANIM_OAMSET_0A, 10 - oamframe BATTLE_ANIM_OAMSET_0B, 3, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_5D, 3, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_0B, 3, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_0A, 2, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_0B, 1, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_0B, 3, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_5D, 3, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_0B, 3, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_0A, 2, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_0B, 1, Y_FLIP_F oamframe BATTLE_ANIM_OAMSET_5D, 1 oamframe BATTLE_ANIM_OAMSET_0B, 1 oamrestart .Frameset_EggWobble: oamframe BATTLE_ANIM_OAMSET_0A, 3 - oamframe BATTLE_ANIM_OAMSET_0B, 7, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_0B, 7, X_FLIP_F oamframe BATTLE_ANIM_OAMSET_0A, 7 oamframe BATTLE_ANIM_OAMSET_0B, 7 oamframe BATTLE_ANIM_OAMSET_0A, 3 @@ -776,7 +776,7 @@ BattleAnimFrameData: oamend .Frameset_Sound3: - oamframe BATTLE_ANIM_OAMSET_6E, 8, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_6E, 8, Y_FLIP_F oamend .Frameset_Wave: @@ -824,12 +824,12 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_7B, 1 oamframe BATTLE_ANIM_OAMSET_7C, 1 oamframe BATTLE_ANIM_OAMSET_7D, 1 - oamframe BATTLE_ANIM_OAMSET_7C, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_7B, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_7A, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_79, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_78, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_77, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_7C, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_7B, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_7A, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_79, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_78, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_77, 1, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_Chick1: @@ -838,8 +838,8 @@ BattleAnimFrameData: oamrestart .Frameset_Chick2: - oamframe BATTLE_ANIM_OAMSET_1B, 4, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_7E, 4, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_1B, 4, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_7E, 4, X_FLIP_F oamrestart .Frameset_Amnesia1: @@ -908,7 +908,7 @@ BattleAnimFrameData: oamend .Frameset_ParalyzedFlipped: - oamframe BATTLE_ANIM_OAMSET_8E, 8, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_8E, 8, X_FLIP_F oamend .Frameset_Haze: @@ -948,7 +948,7 @@ BattleAnimFrameData: .Frameset_SpinningBone: oamframe BATTLE_ANIM_OAMSET_97, 1 - oamframe BATTLE_ANIM_OAMSET_97, 1, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_97, 1, X_FLIP_F oamrestart .Frameset_Star: @@ -1009,8 +1009,8 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_A5, 4 oamframe BATTLE_ANIM_OAMSET_A6, 4 oamframe BATTLE_ANIM_OAMSET_A7, 4 - oamframe BATTLE_ANIM_OAMSET_A6, 4, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_A5, 4, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_A6, 4, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_A5, 4, X_FLIP_F oamrestart .Frameset_DefenseCurl: @@ -1018,8 +1018,8 @@ BattleAnimFrameData: oamframe BATTLE_ANIM_OAMSET_A9, 4 oamframe BATTLE_ANIM_OAMSET_AA, 4 oamframe BATTLE_ANIM_OAMSET_AB, 4 - oamframe BATTLE_ANIM_OAMSET_AA, 4, OAM_X_FLIP - oamframe BATTLE_ANIM_OAMSET_A9, 4, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_AA, 4, X_FLIP_F + oamframe BATTLE_ANIM_OAMSET_A9, 4, X_FLIP_F oamrestart .Frameset_MetronomeHand: @@ -1048,7 +1048,7 @@ BattleAnimFrameData: .Frameset_HealBell: oamframe BATTLE_ANIM_OAMSET_B1, 7 - oamframe BATTLE_ANIM_OAMSET_B1, 7, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_B1, 7, X_FLIP_F oamrestart .Frameset_BatonPass: @@ -1060,15 +1060,15 @@ BattleAnimFrameData: oamend .Frameset_LockOn2: - oamframe BATTLE_ANIM_OAMSET_B3, 8, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_B3, 8, X_FLIP_F oamend .Frameset_LockOn3: - oamframe BATTLE_ANIM_OAMSET_B3, 8, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_B3, 8, Y_FLIP_F oamend .Frameset_LockOn4: - oamframe BATTLE_ANIM_OAMSET_B3, 8, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_B3, 8, X_FLIP_F, Y_FLIP_F oamend .Frameset_MindReader1: @@ -1076,15 +1076,15 @@ BattleAnimFrameData: oamend .Frameset_MindReader2: - oamframe BATTLE_ANIM_OAMSET_B5, 8, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_B5, 8, X_FLIP_F oamend .Frameset_MindReader3: - oamframe BATTLE_ANIM_OAMSET_B5, 8, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_B5, 8, Y_FLIP_F oamend .Frameset_MindReader4: - oamframe BATTLE_ANIM_OAMSET_B5, 8, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_B5, 8, X_FLIP_F, Y_FLIP_F oamend .Frameset_Safeguard: @@ -1112,7 +1112,7 @@ BattleAnimFrameData: oamend .Frameset_ImpFlipped: - oamframe BATTLE_ANIM_OAMSET_B8, 32, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_B8, 32, X_FLIP_F oamend .Frameset_Cherub: @@ -1124,7 +1124,7 @@ BattleAnimFrameData: oamend .Frameset_EncoreHand: - oamframe BATTLE_ANIM_OAMSET_BB, 32, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_BB, 32, X_FLIP_F oamend .Frameset_EncoreHandFlipped: @@ -1171,26 +1171,26 @@ BattleAnimFrameData: oamdelete .Frameset_CrossChop2: - oamframe BATTLE_ANIM_OAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_4F, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_50, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_51, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_4B, 2, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4C, 2, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 32, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 32, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4D, 32, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_4F, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_50, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_51, 1, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F, Y_FLIP_F oamwait 2 - oamframe BATTLE_ANIM_OAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_52, 2, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_ZapCannon: oamframe BATTLE_ANIM_OAMSET_C3, 1 - oamframe BATTLE_ANIM_OAMSET_C3, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_C3, 1, X_FLIP_F, Y_FLIP_F oamrestart .Frameset_CurseNail: @@ -1205,7 +1205,7 @@ BattleAnimFrameData: .Frameset_RapidSpin: oamframe BATTLE_ANIM_OAMSET_C8, 1 - oamframe BATTLE_ANIM_OAMSET_C8, 1, OAM_X_FLIP + oamframe BATTLE_ANIM_OAMSET_C8, 1, X_FLIP_F oamrestart .Frameset_Swagger: @@ -1221,7 +1221,7 @@ BattleAnimFrameData: oamrestart .Frameset_UpsideDownPunch: - oamframe BATTLE_ANIM_OAMSET_03, 32, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_03, 32, Y_FLIP_F oamend .Frameset_Rain: @@ -1238,8 +1238,8 @@ BattleAnimFrameData: .Frameset_SpiralUnused: oamframe BATTLE_ANIM_OAMSET_CD, 4 oamframe BATTLE_ANIM_OAMSET_CE, 4 - oamframe BATTLE_ANIM_OAMSET_CD, 4, OAM_X_FLIP, OAM_Y_FLIP - oamframe BATTLE_ANIM_OAMSET_CE, 4, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLE_ANIM_OAMSET_CD, 4, X_FLIP_F, Y_FLIP_F + oamframe BATTLE_ANIM_OAMSET_CE, 4, X_FLIP_F, Y_FLIP_F oamrestart .Frameset_Aeroblast: diff --git a/data/battle_anims/oam.asm b/data/battle_anims/oam.asm index e13584d351b..591f371fc62 100644 --- a/data/battle_anims/oam.asm +++ b/data/battle_anims/oam.asm @@ -729,51 +729,51 @@ BattleAnimOAMData: dbsprite 2, -1, 4, 4, $00, X_FLIP .OAMData_d4: - dbsprite -4, 0, 4, 0, $00, OBP_NUM - dbsprite -3, 0, 4, 0, $01, OBP_NUM - dbsprite -2, 0, 4, 0, $02, OBP_NUM - dbsprite -1, 0, 4, 0, $03, OBP_NUM - dbsprite 0, 0, 4, 0, $04, OBP_NUM - dbsprite 1, 0, 4, 0, $05, OBP_NUM - dbsprite 2, 0, 4, 0, $06, OBP_NUM + dbsprite -4, 0, 4, 0, $00, OBP1 + dbsprite -3, 0, 4, 0, $01, OBP1 + dbsprite -2, 0, 4, 0, $02, OBP1 + dbsprite -1, 0, 4, 0, $03, OBP1 + dbsprite 0, 0, 4, 0, $04, OBP1 + dbsprite 1, 0, 4, 0, $05, OBP1 + dbsprite 2, 0, 4, 0, $06, OBP1 .OAMData_d6: - dbsprite -4, -1, 4, 0, $00, OBP_NUM - dbsprite -4, 0, 4, 0, $01, OBP_NUM - dbsprite -3, -1, 4, 0, $02, OBP_NUM - dbsprite -3, 0, 4, 0, $03, OBP_NUM - dbsprite -2, -1, 4, 0, $04, OBP_NUM - dbsprite -2, 0, 4, 0, $05, OBP_NUM - dbsprite -1, -1, 4, 0, $06, OBP_NUM - dbsprite -1, 0, 4, 0, $07, OBP_NUM - dbsprite 0, -1, 4, 0, $08, OBP_NUM - dbsprite 0, 0, 4, 0, $09, OBP_NUM - dbsprite 1, -1, 4, 0, $0a, OBP_NUM - dbsprite 1, 0, 4, 0, $0b, OBP_NUM - dbsprite 2, -1, 4, 0, $0c, OBP_NUM - dbsprite 2, 0, 4, 0, $0d, OBP_NUM + dbsprite -4, -1, 4, 0, $00, OBP1 + dbsprite -4, 0, 4, 0, $01, OBP1 + dbsprite -3, -1, 4, 0, $02, OBP1 + dbsprite -3, 0, 4, 0, $03, OBP1 + dbsprite -2, -1, 4, 0, $04, OBP1 + dbsprite -2, 0, 4, 0, $05, OBP1 + dbsprite -1, -1, 4, 0, $06, OBP1 + dbsprite -1, 0, 4, 0, $07, OBP1 + dbsprite 0, -1, 4, 0, $08, OBP1 + dbsprite 0, 0, 4, 0, $09, OBP1 + dbsprite 1, -1, 4, 0, $0a, OBP1 + dbsprite 1, 0, 4, 0, $0b, OBP1 + dbsprite 2, -1, 4, 0, $0c, OBP1 + dbsprite 2, 0, 4, 0, $0d, OBP1 .OAMData_d5: - dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM - dbsprite -2, 0, 0, 0, $01, $1 | OBP_NUM - dbsprite -1, 0, 0, 0, $02, $1 | OBP_NUM - dbsprite 0, 0, 0, 0, $03, $1 | OBP_NUM - dbsprite 1, 0, 0, 0, $04, $1 | OBP_NUM - dbsprite 2, 0, 0, 0, $05, $1 | OBP_NUM + dbsprite -3, 0, 0, 0, $00, $1 | OBP1 + dbsprite -2, 0, 0, 0, $01, $1 | OBP1 + dbsprite -1, 0, 0, 0, $02, $1 | OBP1 + dbsprite 0, 0, 0, 0, $03, $1 | OBP1 + dbsprite 1, 0, 0, 0, $04, $1 | OBP1 + dbsprite 2, 0, 0, 0, $05, $1 | OBP1 .OAMData_d7: - dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM - dbsprite -3, 1, 0, 0, $01, $1 | OBP_NUM - dbsprite -2, 0, 0, 0, $02, $1 | OBP_NUM - dbsprite -2, 1, 0, 0, $03, $1 | OBP_NUM - dbsprite -1, 0, 0, 0, $04, $1 | OBP_NUM - dbsprite -1, 1, 0, 0, $05, $1 | OBP_NUM - dbsprite 0, 0, 0, 0, $06, $1 | OBP_NUM - dbsprite 0, 1, 0, 0, $07, $1 | OBP_NUM - dbsprite 1, 0, 0, 0, $08, $1 | OBP_NUM - dbsprite 1, 1, 0, 0, $09, $1 | OBP_NUM - dbsprite 2, 0, 0, 0, $0a, $1 | OBP_NUM - dbsprite 2, 1, 0, 0, $0b, $1 | OBP_NUM + dbsprite -3, 0, 0, 0, $00, $1 | OBP1 + dbsprite -3, 1, 0, 0, $01, $1 | OBP1 + dbsprite -2, 0, 0, 0, $02, $1 | OBP1 + dbsprite -2, 1, 0, 0, $03, $1 | OBP1 + dbsprite -1, 0, 0, 0, $04, $1 | OBP1 + dbsprite -1, 1, 0, 0, $05, $1 | OBP1 + dbsprite 0, 0, 0, 0, $06, $1 | OBP1 + dbsprite 0, 1, 0, 0, $07, $1 | OBP1 + dbsprite 1, 0, 0, 0, $08, $1 | OBP1 + dbsprite 1, 1, 0, 0, $09, $1 | OBP1 + dbsprite 2, 0, 0, 0, $0a, $1 | OBP1 + dbsprite 2, 1, 0, 0, $0b, $1 | OBP1 .OAMData_6e: dbsprite 0, -2, 4, 4, $00, $0 diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm index 115d82dca19..f11f21412d6 100644 --- a/data/sprite_anims/framesets.asm +++ b/data/sprite_anims/framesets.asm @@ -107,21 +107,21 @@ SpriteAnimFrameData: oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 8 oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8 oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 8 - oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8, X_FLIP_F oamrestart .Frameset_BlueWalk: oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8 oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 - oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8, X_FLIP_F oamrestart .Frameset_MagnetTrainBlue: oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8 oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 - oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8, X_FLIP_F oamrestart .Frameset_GSTitleTrail: @@ -159,7 +159,7 @@ SpriteAnimFrameData: .Frameset_GSGameFreakLogoStar: oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3 - oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3, Y_FLIP_F oamrestart .Frameset_GSGameFreakLogoSparkle: @@ -172,8 +172,8 @@ SpriteAnimFrameData: .Frameset_SlotsGolem: oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7 oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7 - oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7, X_FLIP_F oamrestart .Frameset_SlotsChansey: @@ -207,7 +207,7 @@ SpriteAnimFrameData: oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamrestart .Frameset_TradePoof: @@ -244,7 +244,7 @@ SpriteAnimFrameData: oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8 oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 - oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, X_FLIP_F oamrestart .Frameset_Unknown1: ; unreferenced @@ -264,9 +264,9 @@ SpriteAnimFrameData: .Frameset_Unknown4: ; unreferenced oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1 - oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP - oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, X_FLIP_F + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, X_FLIP_F, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, Y_FLIP_F oamrestart .Frameset_Unknown5: ; unreferenced @@ -316,15 +316,15 @@ SpriteAnimFrameData: oamend .Frameset_EggHatch2: - oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, X_FLIP_F oamend .Frameset_EggHatch3: - oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, Y_FLIP_F oamend .Frameset_EggHatch4: - oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, X_FLIP_F, Y_FLIP_F oamend .Frameset_GSIntroHoOhLugia: @@ -340,7 +340,7 @@ SpriteAnimFrameData: oamframe SPRITE_ANIM_OAMSET_TREE_1, 2 oamframe SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2 oamframe SPRITE_ANIM_OAMSET_TREE_1, 2 - oamframe SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, X_FLIP_F oamrestart .Frameset_EZChatCursor1: @@ -378,30 +378,30 @@ SpriteAnimFrameData: oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamend .Frameset_MobileTradeOTBall: oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 - oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, X_FLIP_F oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_1, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_2, 3 oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_3, 3 @@ -455,21 +455,21 @@ SpriteAnimFrameData: oamdelete .Frameset_IntroUnown2: - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, X_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, X_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, X_FLIP_F oamdelete .Frameset_IntroUnown3: - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, Y_FLIP_F oamdelete .Frameset_IntroUnown4: - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP, OAM_Y_FLIP - oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, X_FLIP_F, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, X_FLIP_F, Y_FLIP_F + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, X_FLIP_F, Y_FLIP_F oamdelete .Frameset_IntroUnownF2: @@ -494,6 +494,6 @@ SpriteAnimFrameData: oamend .Frameset_CelebiRight: - oamframe SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAM_X_FLIP - oamframe SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_CELEBI_1, 8, X_FLIP_F + oamframe SPRITE_ANIM_OAMSET_CELEBI_2, 8, X_FLIP_F oamend diff --git a/data/sprite_anims/oam.asm b/data/sprite_anims/oam.asm index e7099b0a075..e6ed2a990e7 100644 --- a/data/sprite_anims/oam.asm +++ b/data/sprite_anims/oam.asm @@ -480,81 +480,81 @@ SpriteAnimOAMData: .OAMData_GSGameFreakLogo: db 15 - dbsprite -2, -3, 4, 4, $00, 1 | OBP_NUM - dbsprite -1, -3, 4, 4, $01, 1 | OBP_NUM - dbsprite 0, -3, 4, 4, $02, 1 | OBP_NUM - dbsprite -2, -2, 4, 4, $03, 1 | OBP_NUM - dbsprite -1, -2, 4, 4, $04, 1 | OBP_NUM - dbsprite 0, -2, 4, 4, $05, 1 | OBP_NUM - dbsprite -2, -1, 4, 4, $06, 1 | OBP_NUM - dbsprite -1, -1, 4, 4, $07, 1 | OBP_NUM - dbsprite 0, -1, 4, 4, $08, 1 | OBP_NUM - dbsprite -2, 0, 4, 4, $09, 1 | OBP_NUM - dbsprite -1, 0, 4, 4, $0a, 1 | OBP_NUM - dbsprite 0, 0, 4, 4, $0b, 1 | OBP_NUM - dbsprite -2, 1, 4, 4, $0c, 1 | OBP_NUM - dbsprite -1, 1, 4, 4, $0d, 1 | OBP_NUM - dbsprite 0, 1, 4, 4, $0e, 1 | OBP_NUM + dbsprite -2, -3, 4, 4, $00, 1 | OBP1 + dbsprite -1, -3, 4, 4, $01, 1 | OBP1 + dbsprite 0, -3, 4, 4, $02, 1 | OBP1 + dbsprite -2, -2, 4, 4, $03, 1 | OBP1 + dbsprite -1, -2, 4, 4, $04, 1 | OBP1 + dbsprite 0, -2, 4, 4, $05, 1 | OBP1 + dbsprite -2, -1, 4, 4, $06, 1 | OBP1 + dbsprite -1, -1, 4, 4, $07, 1 | OBP1 + dbsprite 0, -1, 4, 4, $08, 1 | OBP1 + dbsprite -2, 0, 4, 4, $09, 1 | OBP1 + dbsprite -1, 0, 4, 4, $0a, 1 | OBP1 + dbsprite 0, 0, 4, 4, $0b, 1 | OBP1 + dbsprite -2, 1, 4, 4, $0c, 1 | OBP1 + dbsprite -1, 1, 4, 4, $0d, 1 | OBP1 + dbsprite 0, 1, 4, 4, $0e, 1 | OBP1 .OAMData_SlotsGolem: db 6 - dbsprite -2, -2, 4, 4, $00, 5 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 5 | OBP_NUM - dbsprite 0, -2, 4, 4, $00, 5 | OBP_NUM | X_FLIP - dbsprite -2, 0, 4, 4, $04, 5 | OBP_NUM - dbsprite -1, 0, 4, 4, $06, 5 | OBP_NUM - dbsprite 0, 0, 4, 4, $04, 5 | OBP_NUM | X_FLIP + dbsprite -2, -2, 4, 4, $00, 5 | OBP1 + dbsprite -1, -2, 4, 4, $02, 5 | OBP1 + dbsprite 0, -2, 4, 4, $00, 5 | OBP1 | X_FLIP + dbsprite -2, 0, 4, 4, $04, 5 | OBP1 + dbsprite -1, 0, 4, 4, $06, 5 | OBP1 + dbsprite 0, 0, 4, 4, $04, 5 | OBP1 | X_FLIP .OAMData_SlotsChansey1: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $06, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $08, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $0a, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OBP1 + dbsprite -1, -2, 4, 4, $02, 6 | OBP1 + dbsprite 0, -2, 4, 4, $04, 6 | OBP1 + dbsprite -2, 0, 4, 4, $06, 6 | OBP1 + dbsprite -1, 0, 4, 4, $08, 6 | OBP1 + dbsprite 0, 0, 4, 4, $0a, 6 | OBP1 .OAMData_SlotsChansey2: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $0c, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $0e, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $10, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OBP1 + dbsprite -1, -2, 4, 4, $02, 6 | OBP1 + dbsprite 0, -2, 4, 4, $04, 6 | OBP1 + dbsprite -2, 0, 4, 4, $0c, 6 | OBP1 + dbsprite -1, 0, 4, 4, $0e, 6 | OBP1 + dbsprite 0, 0, 4, 4, $10, 6 | OBP1 .OAMData_SlotsChansey3: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $12, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $14, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $16, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OBP1 + dbsprite -1, -2, 4, 4, $02, 6 | OBP1 + dbsprite 0, -2, 4, 4, $04, 6 | OBP1 + dbsprite -2, 0, 4, 4, $12, 6 | OBP1 + dbsprite -1, 0, 4, 4, $14, 6 | OBP1 + dbsprite 0, 0, 4, 4, $16, 6 | OBP1 .OAMData_SlotsChansey4: db 6 - dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $18, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $1a, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $1c, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $00, 6 | OBP1 + dbsprite -1, -2, 4, 4, $02, 6 | OBP1 + dbsprite 0, -2, 4, 4, $04, 6 | OBP1 + dbsprite -2, 0, 4, 4, $18, 6 | OBP1 + dbsprite -1, 0, 4, 4, $1a, 6 | OBP1 + dbsprite 0, 0, 4, 4, $1c, 6 | OBP1 .OAMData_SlotsChansey5: db 6 - dbsprite -2, -2, 4, 4, $1e, 6 | OBP_NUM - dbsprite -1, -2, 4, 4, $20, 6 | OBP_NUM - dbsprite 0, -2, 4, 4, $22, 6 | OBP_NUM - dbsprite -2, 0, 4, 4, $24, 6 | OBP_NUM - dbsprite -1, 0, 4, 4, $26, 6 | OBP_NUM - dbsprite 0, 0, 4, 4, $28, 6 | OBP_NUM + dbsprite -2, -2, 4, 4, $1e, 6 | OBP1 + dbsprite -1, -2, 4, 4, $20, 6 | OBP1 + dbsprite 0, -2, 4, 4, $22, 6 | OBP1 + dbsprite -2, 0, 4, 4, $24, 6 | OBP1 + dbsprite -1, 0, 4, 4, $26, 6 | OBP1 + dbsprite 0, 0, 4, 4, $28, 6 | OBP1 .OAMData_RadioTuningKnob: db 3 - dbsprite -1, -2, 4, 4, $00, 0 | OBP_NUM - dbsprite -1, -1, 4, 4, $00, 0 | OBP_NUM - dbsprite -1, 0, 4, 4, $00, 0 | OBP_NUM + dbsprite -1, -2, 4, 4, $00, 0 | OBP1 + dbsprite -1, -1, 4, 4, $00, 0 | OBP1 + dbsprite -1, 0, 4, 4, $00, 0 | OBP1 .OAMData_Unused4B: db 6 @@ -694,7 +694,7 @@ SpriteAnimOAMData: .OAMData_GSTitleTrail: db 1 - dbsprite -1, -1, 4, 4, $00, 1 | OBP_NUM + dbsprite -1, -1, 4, 4, $00, 1 | OBP1 .OAMData_EZChatCursor1: db 12 diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 2f2232e90f8..1dd5d00b274 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -118,7 +118,7 @@ BattleAnimOAMUpdate: push hl ld a, [hl] ld hl, wBattleAnimTempOAMFlags - bit OAM_Y_FLIP, [hl] + bit Y_FLIP_F, [hl] jr z, .no_yflip add $8 xor $ff @@ -139,7 +139,7 @@ BattleAnimOAMUpdate: push hl ld a, [hl] ld hl, wBattleAnimTempOAMFlags - bit OAM_X_FLIP, [hl] + bit X_FLIP_F, [hl] jr z, .no_xflip add $8 xor $ff @@ -167,7 +167,7 @@ BattleAnimOAMUpdate: and PRIORITY | Y_FLIP | X_FLIP ld b, a ld a, [hl] - and OBP_NUM + and OBP1 or b ld b, a ld a, [wBattleAnimTempPalette] diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm index 3cbca9ae60e..fe7df2cfb95 100644 --- a/engine/battle_anims/functions.asm +++ b/engine/battle_anims/functions.asm @@ -2642,7 +2642,7 @@ BattleAnimFunc_String: ; Obj Param 0 flips when used by enemy ld hl, BATTLEANIMSTRUCT_OAMFLAGS add hl, bc - set OAM_Y_FLIP, [hl] + set Y_FLIP_F, [hl] .not_param_zero add BATTLE_ANIM_FRAMESET_STRING_SHOT_1 ; BATTLE_ANIM_FRAMESET_STRING_SHOT_2 BATTLE_ANIM_FRAMESET_STRING_SHOT_3 call ReinitBattleAnimFrameset diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm index a6f049646d7..8acb7e9fd46 100644 --- a/engine/events/heal_machine_anim.asm +++ b/engine/events/heal_machine_anim.asm @@ -134,25 +134,25 @@ ENDM ret .PC_ElmsLab_OAM: - dbsprite 4, 4, 2, 0, $7c, PAL_OW_TREE | OBP_NUM - dbsprite 4, 4, 6, 0, $7c, PAL_OW_TREE | OBP_NUM - dbsprite 4, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP - dbsprite 4, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP - dbsprite 4, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 5, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dbsprite 4, 4, 2, 0, $7c, PAL_OW_TREE | OBP1 + dbsprite 4, 4, 6, 0, $7c, PAL_OW_TREE | OBP1 + dbsprite 4, 4, 0, 6, $7d, PAL_OW_TREE | OBP1 + dbsprite 5, 4, 0, 6, $7d, PAL_OW_TREE | OBP1 | X_FLIP + dbsprite 4, 5, 0, 3, $7d, PAL_OW_TREE | OBP1 + dbsprite 5, 5, 0, 3, $7d, PAL_OW_TREE | OBP1 | X_FLIP + dbsprite 4, 6, 0, 0, $7d, PAL_OW_TREE | OBP1 + dbsprite 5, 6, 0, 0, $7d, PAL_OW_TREE | OBP1 | X_FLIP .HealMachineGFX: INCBIN "gfx/overworld/heal_machine.2bpp" .HOF_OAM: - dbsprite 10, 7, 1, 4, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 10, 7, 6, 4, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 9, 7, 5, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 11, 7, 2, 3, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 9, 7, 1, 1, $7d, PAL_OW_TREE | OBP_NUM - dbsprite 11, 7, 5, 1, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 10, 7, 1, 4, $7d, PAL_OW_TREE | OBP1 + dbsprite 10, 7, 6, 4, $7d, PAL_OW_TREE | OBP1 + dbsprite 9, 7, 5, 3, $7d, PAL_OW_TREE | OBP1 + dbsprite 11, 7, 2, 3, $7d, PAL_OW_TREE | OBP1 + dbsprite 9, 7, 1, 1, $7d, PAL_OW_TREE | OBP1 + dbsprite 11, 7, 5, 1, $7d, PAL_OW_TREE | OBP1 .LoadPalettes: call IsCGB diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 7ff331bab1f..b868ec2f73d 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -827,7 +827,7 @@ Slots_UpdateReelPositionAndOAM: ld [hli], a ; tile id srl a srl a - set OAM_PRIORITY, a + set PRIORITY_F, a ld [hli], a ; attributes ld a, [wCurReelYCoord] @@ -841,7 +841,7 @@ Slots_UpdateReelPositionAndOAM: ld [hli], a ; tile id srl a srl a - set OAM_PRIORITY, a + set PRIORITY_F, a ld [hli], a ; attributes inc de ld a, [wCurReelYCoord] diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index 1e8c226a54d..48c93a2c4f9 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -2911,7 +2911,7 @@ InitSprites: .not_priority bit USE_OBP1_F, e jr z, .not_obp_num - or OBP_NUM + or OBP1 .not_obp_num ld hl, OBJECT_PALETTE add hl, bc @@ -2999,7 +2999,7 @@ InitSprites: ldh a, [hCurSpriteOAMFlags] or e .nope2 - and OBP_NUM | X_FLIP | Y_FLIP | PRIORITY + and OBP1 | X_FLIP | Y_FLIP | PRIORITY or d ld [bc], a ; attributes inc c diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 1b1f9e173e4..1d48e00241f 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -68,7 +68,7 @@ WillObjectBumpIntoWater: ld e, [hl] ld hl, OBJECT_PALETTE add hl, bc - bit OAM_PRIORITY, [hl] + bit PRIORITY_F, [hl] jp nz, WillObjectRemainOnWater ld hl, OBJECT_TILE_COLLISION add hl, bc diff --git a/engine/sprite_anims/core.asm b/engine/sprite_anims/core.asm index 7aa7123d783..aca509973bc 100644 --- a/engine/sprite_anims/core.asm +++ b/engine/sprite_anims/core.asm @@ -318,7 +318,7 @@ AddOrSubtractY: push hl ld a, [hl] ld hl, wCurSpriteOAMFlags - bit OAM_Y_FLIP, [hl] + bit Y_FLIP_F, [hl] jr z, .ok ; -8 - a add 8 @@ -333,7 +333,7 @@ AddOrSubtractX: push hl ld a, [hl] ld hl, wCurSpriteOAMFlags - bit OAM_X_FLIP, [hl] + bit X_FLIP_F, [hl] jr z, .ok ; -8 - a add 8 diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm index 678eb1837e7..29413810fdf 100644 --- a/gfx/tileset_palette_maps.asm +++ b/gfx/tileset_palette_maps.asm @@ -1,7 +1,7 @@ MACRO tilepal ; used in gfx/tilesets/*_palette_map.asm ; vram bank, pals - DEF x = \1 << OAM_TILE_BANK + DEF x = \1 << TILE_BANK_F rept (_NARG - 1) / 2 dn (x | PAL_BG_\3), (x | PAL_BG_\2) shift 2 diff --git a/macros/scripts/oam_anims.asm b/macros/scripts/oam_anims.asm index 2bd751cfbc4..f98bad1c484 100644 --- a/macros/scripts/oam_anims.asm +++ b/macros/scripts/oam_anims.asm @@ -3,7 +3,7 @@ MACRO oamframe db \1 ; duration DEF x = \2 - assert !(x & (1 << (OAM_X_FLIP + 1) | 1 << (OAM_Y_FLIP + 1))), \ + assert !(x & (1 << (X_FLIP_F + 1) | 1 << (Y_FLIP_F + 1))), \ "oamframe duration overflows into X/Y flip bits" if _NARG > 2 rept _NARG - 2