From 5b8d0f1c33278194d46625b2ea409ceaab04c4b0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 10 Aug 2019 12:09:06 -0400 Subject: [PATCH] Remove MNUM from oam flip constant names --- include/gba/types.h | 4 ++-- src/battle_anim_effects_1.c | 14 +++++++------- src/battle_anim_effects_2.c | 4 ++-- src/battle_anim_effects_3.c | 8 ++++---- src/battle_interface.c | 2 +- src/electric.c | 4 ++-- src/fight.c | 4 ++-- src/flying.c | 2 +- src/ghost.c | 2 +- src/rock.c | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/gba/types.h b/include/gba/types.h index 07e5d4c26..7163f925f 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -68,8 +68,8 @@ struct OamData /*0x06*/ u16 affineParam; }; -#define ST_OAM_MNUM_HFLIP 0x08 -#define ST_OAM_MNUM_VFLIP 0x10 +#define ST_OAM_HFLIP 0x08 +#define ST_OAM_VFLIP 0x10 #define ST_OAM_MNUM_FLIP_MASK 0x18 #define ST_OAM_OBJ_NORMAL 0 diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 242b7977c..dfe5f0f3d 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -2547,7 +2547,7 @@ static void AnimPetalDanceSmallFlowerStep(struct Sprite* sprite) { sprite->pos2.x += Sin(sprite->data[5], 8); if ((u16)(sprite->data[5] - 59) < 5 || (u16)(sprite->data[5] - 187) < 5) - sprite->oam.matrixNum ^= ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum ^= ST_OAM_HFLIP; sprite->data[5] += 5; sprite->data[5] &= 0xFF; @@ -4380,19 +4380,19 @@ void sub_8101898(struct Sprite* sprite) { sprite->pos1.x -= 0x18; sprite->pos1.y += 0x18; - sprite->oam.matrixNum = ST_OAM_MNUM_VFLIP; + sprite->oam.matrixNum = ST_OAM_VFLIP; } else if ((s16)sprite->oam.affineParam == 3) { sprite->pos1.x += 0x18; sprite->pos1.y -= 0x18; - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; } else { sprite->pos1.x += 0x18; sprite->pos1.y += 0x18; - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP | ST_OAM_VFLIP; } sprite->oam.tileNum = (sprite->oam.tileNum + 16); @@ -5105,7 +5105,7 @@ void sub_8102844(struct Sprite* sprite) sprite->data[7] = sprite->pos1.y; if (IsContest()) { - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; sprite->pos1.x += 40; sprite->pos1.y += 20; sprite->data[2] = sprite->pos1.x << 7; @@ -5130,7 +5130,7 @@ void sub_8102844(struct Sprite* sprite) sprite->data[3] = -0x1400 / sprite->data[1]; sprite->data[4] = sprite->pos1.y << 7; sprite->data[5] = 0xA00 / sprite->data[1]; - sprite->oam.matrixNum = (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP); + sprite->oam.matrixNum = (ST_OAM_HFLIP | ST_OAM_VFLIP); } sprite->callback = sub_810296C; @@ -5387,7 +5387,7 @@ void sub_8102FB8(struct Sprite* sprite) s16 a; if (gBattleAnimArgs[0] == 1) { - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; a = 16; } else diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 124b98381..3b7d26aab 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -1609,10 +1609,10 @@ static void sub_8103C0C(u8 taskId) switch (gTasks[taskId].data[4]) { case 1: - sprite->oam.matrixNum |= (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP); + sprite->oam.matrixNum |= (ST_OAM_HFLIP | ST_OAM_VFLIP); break; case 2: - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; break; } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 8c4ee34a9..79b728e61 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1618,7 +1618,7 @@ void sub_815AAA4(struct Sprite *sprite) if (gBattleAnimArgs[2] == 0) { - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; sprite->pos2.x = -12; sprite->data[1] = 2; } @@ -4167,7 +4167,7 @@ void AnimSmellingSaltsHand(struct Sprite *sprite) sprite->pos1.y = GetBattlerSpriteCoord(battler, 3); if (gBattleAnimArgs[1] == 0) { - sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum |= ST_OAM_HFLIP; sprite->pos1.x = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_LEFT) - 8; } else @@ -4317,7 +4317,7 @@ void AnimHelpingHandClap(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { - sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum |= ST_OAM_HFLIP; sprite->pos1.x = 100; sprite->data[7] = 1; } @@ -4545,7 +4545,7 @@ void AnimForesightMagnifyingGlass(struct Sprite *sprite) } if (GetBattlerSide(sprite->data[7]) == B_SIDE_OPPONENT) - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; sprite->oam.priority = GetBattlerSpriteBGPriority(sprite->data[7]); sprite->oam.objMode = ST_OAM_OBJ_BLEND; diff --git a/src/battle_interface.c b/src/battle_interface.c index 39fa0c277..8fabfed68 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1536,7 +1536,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, if (isOpponent) { gSprites[summaryBarSpriteId].pos1.x -= 96; - gSprites[summaryBarSpriteId].oam.matrixNum = ST_OAM_MNUM_HFLIP; + gSprites[summaryBarSpriteId].oam.matrixNum = ST_OAM_HFLIP; } else { diff --git a/src/electric.c b/src/electric.c index 920c83f24..4b93119dc 100644 --- a/src/electric.c +++ b/src/electric.c @@ -667,9 +667,9 @@ static void sub_810A75C(struct Sprite *sprite) sprite->oam.tileNum += gBattleAnimArgs[3] * 4; if (gBattleAnimArgs[3] == 1) - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; else if (gBattleAnimArgs[3] == 2) - sprite->oam.matrixNum = ST_OAM_MNUM_VFLIP; + sprite->oam.matrixNum = ST_OAM_VFLIP; sprite->data[0] = gBattleAnimArgs[2]; sprite->callback = WaitAnimForDuration; diff --git a/src/fight.c b/src/fight.c index 99346651d..5230c2f39 100644 --- a/src/fight.c +++ b/src/fight.c @@ -912,9 +912,9 @@ void sub_810D874(struct Sprite *sprite) } if (IsContest()) - sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum |= ST_OAM_HFLIP; else if (GetBattlerSide(battler) == B_SIDE_PLAYER) - sprite->oam.matrixNum |= (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP); + sprite->oam.matrixNum |= (ST_OAM_HFLIP | ST_OAM_VFLIP); sprite->data[0] = 16; sprite->data[1] = sprite->pos1.x; diff --git a/src/flying.c b/src/flying.c index 45661c7fa..3d04a543c 100644 --- a/src/flying.c +++ b/src/flying.c @@ -1800,7 +1800,7 @@ void sub_810EEF8(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[0]; if (sprite->data[2]) - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; if (gBattleAnimArgs[1] == 0) { diff --git a/src/ghost.c b/src/ghost.c index f1fb9166d..41621ff54 100644 --- a/src/ghost.c +++ b/src/ghost.c @@ -1039,7 +1039,7 @@ static void sub_81129F0(struct Sprite *sprite) { xDelta = 24; xDelta2 = -2; - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; } else { diff --git a/src/rock.c b/src/rock.c index a4b4269fb..6f6e20955 100644 --- a/src/rock.c +++ b/src/rock.c @@ -508,7 +508,7 @@ void AnimDirtParticleAcrossScreen(struct Sprite *sprite) sprite->pos1.x = 304; gBattleAnimArgs[1] = -gBattleAnimArgs[1]; sprite->data[5] = 1; - sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP; + sprite->oam.matrixNum = ST_OAM_HFLIP; } else {