diff --git a/include/battle.h b/include/battle.h index eb25b96550..1edd784030 100644 --- a/include/battle.h +++ b/include/battle.h @@ -460,26 +460,26 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER typeArg = gBattleMoves[move].type; \ } -#define IS_TYPE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY) -#define IS_TYPE_SPECIAL(moveType)(moveType > TYPE_MYSTERY) +#define IS_TYPE_PHYSICAL(moveType) (moveType < TYPE_MYSTERY) +#define IS_TYPE_SPECIAL(moveType) (moveType > TYPE_MYSTERY) #define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0)) -#define IS_BATTLER_OF_TYPE(battlerId, type)((gBattleMons[battlerId].types[0] == type || gBattleMons[battlerId].types[1] == type)) +#define IS_BATTLER_OF_TYPE(battlerId, type) ((gBattleMons[battlerId].types[0] == type || gBattleMons[battlerId].types[1] == type)) #define SET_BATTLER_TYPE(battlerId, type) \ { \ gBattleMons[battlerId].types[0] = type; \ gBattleMons[battlerId].types[1] = type; \ } -#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 -#define GET_STAT_BUFF_VALUE2(n)((n & 0xF0)) -#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40 +#define GET_STAT_BUFF_ID(n) ((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 +#define GET_STAT_BUFF_VALUE2(n) ((n & 0xF0)) +#define GET_STAT_BUFF_VALUE(n) (((n >> 4) & 7)) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit -#define SET_STAT_BUFF_VALUE(n)((((n) << 4) & 0xF0)) +#define SET_STAT_BUFF_VALUE(n) ((((n) << 4) & 0xF0)) -#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7)) +#define SET_STATCHANGER(statId, stage, goesDown) (gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7)) // NOTE: The members of this struct have hard-coded offsets // in include/constants/battle_script_commands.h diff --git a/include/battle_main.h b/include/battle_main.h index e3e0cb7ea4..ae970286ca 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -23,9 +23,9 @@ struct MultiPartnerMenuPokemon }; // defines for the u8 array gTypeEffectiveness -#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0])) -#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1])) -#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2])) +#define TYPE_EFFECT_ATK_TYPE(i) ((gTypeEffectiveness[i + 0])) +#define TYPE_EFFECT_DEF_TYPE(i) ((gTypeEffectiveness[i + 1])) +#define TYPE_EFFECT_MULTIPLIER(i) ((gTypeEffectiveness[i + 2])) // defines for the gTypeEffectiveness multipliers #define TYPE_MUL_NO_EFFECT 0 diff --git a/include/battle_util.h b/include/battle_util.h index c7de9aae86..870990e9f5 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -33,9 +33,9 @@ #define ABILITYEFFECT_WATER_SPORT 254 #define ABILITYEFFECT_SWITCH_IN_WEATHER 255 -#define ABILITY_ON_OPPOSING_FIELD(battlerId, abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, battlerId, abilityId, 0, 0)) -#define ABILITY_ON_FIELD(abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, abilityId, 0, 0)) -#define ABILITY_ON_FIELD2(abilityId)(AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, abilityId, 0, 0)) +#define ABILITY_ON_OPPOSING_FIELD(battlerId, abilityId) (AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, battlerId, abilityId, 0, 0)) +#define ABILITY_ON_FIELD(abilityId) (AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, abilityId, 0, 0)) +#define ABILITY_ON_FIELD2(abilityId) (AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, abilityId, 0, 0)) // For the first argument of ItemBattleEffects, to deteremine which block of item effects to try #define ITEMEFFECT_ON_SWITCH_IN 0 diff --git a/include/constants/items.h b/include/constants/items.h index ed9bfb5ec8..9e6fecf014 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -441,8 +441,8 @@ #define NUM_ROUTE_114_MAN_BERRIES (LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1) #define NUM_ROUTE_114_MAN_BERRIES_SKIPPED (FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX) -#define ITEM_TO_BERRY(itemId)(((itemId) - FIRST_BERRY_INDEX) + 1) -#define ITEM_TO_MAIL(itemId)((itemId) - FIRST_MAIL_INDEX) +#define ITEM_TO_BERRY(itemId) (((itemId) - FIRST_BERRY_INDEX) + 1) +#define ITEM_TO_MAIL(itemId) ((itemId) - FIRST_MAIL_INDEX) #define MAIL_NONE 0xFF #define NUM_TECHNICAL_MACHINES 50 diff --git a/include/data.h b/include/data.h index 41b34d73e2..558b1dfff3 100644 --- a/include/data.h +++ b/include/data.h @@ -28,9 +28,9 @@ struct MonCoords u8 y_offset; }; -#define MON_COORDS_SIZE(width, height)(DIV_ROUND_UP(width, 8) << 4 | DIV_ROUND_UP(height, 8)) -#define GET_MON_COORDS_WIDTH(size)((size >> 4) * 8) -#define GET_MON_COORDS_HEIGHT(size)((size & 0xF) * 8) +#define MON_COORDS_SIZE(width, height) (DIV_ROUND_UP(width, 8) << 4 | DIV_ROUND_UP(height, 8)) +#define GET_MON_COORDS_WIDTH(size) ((size >> 4) * 8) +#define GET_MON_COORDS_HEIGHT(size) ((size & 0xF) * 8) struct TrainerMonNoItemDefaultMoves { @@ -91,7 +91,7 @@ struct Trainer /*0x24*/ union TrainerMonPtr party; }; -#define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) +#define TRAINER_ENCOUNTER_MUSIC(trainer) ((gTrainers[trainer].encounterMusic_gender & 0x7F)) extern const u16 gMinigameDigits_Pal[]; extern const u32 gMinigameDigits_Gfx[]; diff --git a/include/gba/defines.h b/include/gba/defines.h index fa3a30fd6e..febe6882cf 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -75,7 +75,7 @@ #define DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / TILE_HEIGHT) // Size of different tile formats in bytes -#define TILE_SIZE(bpp)((bpp) * TILE_WIDTH * TILE_HEIGHT / 8) +#define TILE_SIZE(bpp) ((bpp) * TILE_WIDTH * TILE_HEIGHT / 8) #define TILE_SIZE_1BPP TILE_SIZE(1) // 8 #define TILE_SIZE_4BPP TILE_SIZE(4) // 32 #define TILE_SIZE_8BPP TILE_SIZE(8) // 64 diff --git a/include/global.h b/include/global.h index 658af43da7..00d608e672 100644 --- a/include/global.h +++ b/include/global.h @@ -89,7 +89,7 @@ // There are cases where GF does a&(n-1) where we would really like to have a%n, because // if n is changed to a value that isn't a power of 2 then a&(n-1) is unlikely to work as // intended, and a%n for powers of 2 isn't always optimized to use &. -#define MOD(a, n)(((n) & ((n)-1)) ? ((a) % (n)) : ((a) & ((n)-1))) +#define MOD(a, n) (((n) & ((n)-1)) ? ((a) % (n)) : ((a) & ((n)-1))) // Extracts the upper 16 bits of a 32-bit number #define HIHALF(n) (((n) & 0xFFFF0000) >> 16) @@ -130,7 +130,7 @@ f; \ }) -#define DIV_ROUND_UP(val, roundBy)(((val) / (roundBy)) + (((val) % (roundBy)) ? 1 : 0)) +#define DIV_ROUND_UP(val, roundBy) (((val) / (roundBy)) + (((val) % (roundBy)) ? 1 : 0)) #define ROUND_BITS_TO_BYTES(numBits) DIV_ROUND_UP(numBits, 8) diff --git a/include/mail.h b/include/mail.h index f4590a70ec..403078f097 100644 --- a/include/mail.h +++ b/include/mail.h @@ -1,7 +1,7 @@ #ifndef GUARD_MAIL_H #define GUARD_MAIL_H -#define IS_ITEM_MAIL(itemId)((itemId == ITEM_ORANGE_MAIL \ +#define IS_ITEM_MAIL(itemId) ((itemId == ITEM_ORANGE_MAIL \ || itemId == ITEM_HARBOR_MAIL \ || itemId == ITEM_GLITTER_MAIL \ || itemId == ITEM_MECH_MAIL \ diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 06a188b8a0..152afb59ac 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -44,7 +44,7 @@ enum { // The number of extra sparkles shown on a Pokémon's condition screen. // All Pokémon start with 1, so the max here is MAX_CONDITION_SPARKLES - 1 -#define GET_NUM_CONDITION_SPARKLES(sheen)((sheen) != MAX_SHEEN) ? (sheen) / ((u32)MAX_SHEEN / (MAX_CONDITION_SPARKLES - 1) + 1) : MAX_CONDITION_SPARKLES - 1; +#define GET_NUM_CONDITION_SPARKLES(sheen) ((sheen) != MAX_SHEEN) ? (sheen) / ((u32)MAX_SHEEN / (MAX_CONDITION_SPARKLES - 1) + 1) : MAX_CONDITION_SPARKLES - 1; #define CONDITION_GRAPH_TOP_Y 56 #define CONDITION_GRAPH_BOTTOM_Y 121 diff --git a/include/random.h b/include/random.h index 6bf61de6c6..ba7aeccc1a 100644 --- a/include/random.h +++ b/include/random.h @@ -13,8 +13,8 @@ u16 Random2(void); // The number 1103515245 comes from the example implementation of rand and srand // in the ISO C standard. -#define ISO_RANDOMIZE1(val)(1103515245 * (val) + 24691) -#define ISO_RANDOMIZE2(val)(1103515245 * (val) + 12345) +#define ISO_RANDOMIZE1(val) (1103515245 * (val) + 24691) +#define ISO_RANDOMIZE2(val) (1103515245 * (val) + 12345) //Sets the initial seed value of the pseudorandom number generator void SeedRng(u16 seed); diff --git a/src/battle_setup.c b/src/battle_setup.c index e87ce6dd27..be5b09e5e5 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -859,7 +859,7 @@ static u8 GetTrainerBattleTransition(void) return sBattleTransitionTable_Trainer[transitionType][1]; } -#define RANDOM_TRANSITION(table)(table[Random() % ARRAY_COUNT(table)]) +#define RANDOM_TRANSITION(table) (table[Random() % ARRAY_COUNT(table)]) u8 GetSpecialBattleTransition(s32 id) { u16 var; diff --git a/src/data/decoration/tilemaps.h b/src/data/decoration/tilemaps.h index eebb3acb25..d6c351ae85 100644 --- a/src/data/decoration/tilemaps.h +++ b/src/data/decoration/tilemaps.h @@ -171,7 +171,7 @@ static const u8 sDecorTilemap_3x2_X[] = { 0x06, 0x07, 0x06, 0x07, 0x06, 0x07 }; -#define DECORSIZE(width, height)((width) * (height) * 4) +#define DECORSIZE(width, height) ((width) * (height) * 4) static const struct { const u8 *tiles; diff --git a/src/data/pokemon/experience_tables.h b/src/data/pokemon/experience_tables.h index 8f50e10918..848d5c5016 100644 --- a/src/data/pokemon/experience_tables.h +++ b/src/data/pokemon/experience_tables.h @@ -1,10 +1,10 @@ -#define SQUARE(n)((n) * (n)) -#define CUBE(n)((n) * (n) * (n)) +#define SQUARE(n) ((n) * (n)) +#define CUBE(n) ((n) * (n) * (n)) -#define EXP_SLOW(n)((5 * CUBE(n)) / 4) // (5 * (n)^3) / 4 -#define EXP_FAST(n)((4 * CUBE(n)) / 5) // (4 * (n)^3) / 5 -#define EXP_MEDIUM_FAST(n)(CUBE(n)) // (n)^3 -#define EXP_MEDIUM_SLOW(n)((6 * CUBE(n)) / 5 - (15 * SQUARE(n)) + (100 * n) - 140) // (6 * (n)^3) / 5 - (15 * (n)^2) + (100 * n) - 140 +#define EXP_SLOW(n) ((5 * CUBE(n)) / 4) // (5 * (n)^3) / 4 +#define EXP_FAST(n) ((4 * CUBE(n)) / 5) // (4 * (n)^3) / 5 +#define EXP_MEDIUM_FAST(n) (CUBE(n)) // (n)^3 +#define EXP_MEDIUM_SLOW(n) ((6 * CUBE(n)) / 5 - (15 * SQUARE(n)) + (100 * n) - 140) // (6 * (n)^3) / 5 - (15 * (n)^2) + (100 * n) - 140 #define EXP_ERRATIC(n) \ (n <= 50) ? ((100 - n) * CUBE(n) / 50) \ :(n <= 68) ? ((150 - n) * CUBE(n) / 100) \ diff --git a/src/data/union_room.h b/src/data/union_room.h index 129c629941..c4bd984736 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -633,10 +633,10 @@ static const struct WindowTemplate sWindowTemplate_BButtonCancel = { // Minimum and maximum number of players for a link group // A minimum of 0 means the min and max are equal -#define LINK_GROUP_CAPACITY(min, max)(((min) << 12) | ((max) << 8)) -#define GROUP_MAX(capacity)(capacity & 0x0F) -#define GROUP_MIN(capacity)(capacity >> 4) -#define GROUP_MIN2(capacity)(capacity & 0xF0) // Unnecessary to have both, but needed to match +#define LINK_GROUP_CAPACITY(min, max) (((min) << 12) | ((max) << 8)) +#define GROUP_MAX(capacity) (capacity & 0x0F) +#define GROUP_MIN(capacity) (capacity >> 4) +#define GROUP_MIN2(capacity) (capacity & 0xF0) // Unnecessary to have both, but needed to match static const u32 sLinkGroupToActivityAndCapacity[NUM_LINK_GROUP_TYPES] = { [LINK_GROUP_SINGLE_BATTLE] = ACTIVITY_BATTLE_SINGLE | LINK_GROUP_CAPACITY(0, 2), diff --git a/src/field_specials.c b/src/field_specials.c index 7d20d3571d..d8fc96c49d 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3957,14 +3957,14 @@ bool8 InPokemonCenter(void) #define FANCLUB_BITFIELD (gSaveBlock1Ptr->vars[VAR_FANCLUB_FAN_COUNTER - VARS_START]) #define FANCLUB_COUNTER 0x007F -#define GET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD >> (flag) & 1) -#define SET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD |= 1 << (flag)) -#define FLIP_TRAINER_FAN_CLUB_FLAG(flag)(FANCLUB_BITFIELD ^= 1 << (flag)) +#define GET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD >> (flag) & 1) +#define SET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD |= 1 << (flag)) +#define FLIP_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD ^= 1 << (flag)) -#define GET_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD & FANCLUB_COUNTER) -#define SET_TRAINER_FAN_CLUB_COUNTER(count) (FANCLUB_BITFIELD = (FANCLUB_BITFIELD & ~FANCLUB_COUNTER) | (count)) -#define INCR_TRAINER_FAN_CLUB_COUNTER(count)(FANCLUB_BITFIELD += (count)) -#define CLEAR_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD &= ~FANCLUB_COUNTER) +#define GET_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD & FANCLUB_COUNTER) +#define SET_TRAINER_FAN_CLUB_COUNTER(count) (FANCLUB_BITFIELD = (FANCLUB_BITFIELD & ~FANCLUB_COUNTER) | (count)) +#define INCR_TRAINER_FAN_CLUB_COUNTER(count) (FANCLUB_BITFIELD += (count)) +#define CLEAR_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD &= ~FANCLUB_COUNTER) void ResetFanClub(void) { diff --git a/src/fieldmap.c b/src/fieldmap.c index 5fdc4cbfb7..e4dc0026a3 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -48,7 +48,7 @@ static const struct MapConnection *GetIncomingConnection(u8 direction, int x, in static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection); static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset); -#define GetBorderBlockAt(x, y)({ \ +#define GetBorderBlockAt(x, y) ({ \ u16 block; \ int i; \ const u16 *border = gMapHeader.mapLayout->border; /* Unused, they read it again below */ \ diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 07e06ad3b9..a351d81ce9 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -1241,7 +1241,7 @@ static void ShowHideZoomingArea(bool8 show, bool8 zoomedIn) static void UpdateAreaHighlight(u8 cursorArea, u8 previousCursorArea) { - #define NON_HIGHLIGHT_AREA(area)((area) == CURSOR_AREA_NOTHING || (area) > CURSOR_AREA_CANCEL) + #define NON_HIGHLIGHT_AREA(area) ((area) == CURSOR_AREA_NOTHING || (area) > CURSOR_AREA_CANCEL) // If moving off highlightable area, unhighlight it switch (previousCursorArea) diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 9979097a49..b34c7184cf 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -138,7 +138,7 @@ static const u8 sAvailSlots[] = { [4] = AVAIL_SLOT4 }; -#define BLOCK_MASK(bitNum)((1 << (bitNum)) - 1) +#define BLOCK_MASK(bitNum) ((1 << (bitNum)) - 1) static const u32 sAllBlocksReceived[] = { BLOCK_MASK(0), BLOCK_MASK(1), diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 20ddce1f44..1272277aa5 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -317,7 +317,7 @@ void MailboxMenu_Free(void) // filled with the graph color. //--------------------------------------- -#define SHIFT_RIGHT_ADJUSTED(n, s)(((n) >> (s)) + (((n) >> ((s) - 1)) & 1)) +#define SHIFT_RIGHT_ADJUSTED(n, s) (((n) >> (s)) + (((n) >> ((s) - 1)) & 1)) void ConditionGraph_Init(struct ConditionGraph *graph) { diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index d744ff6650..a1c401c6df 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -108,7 +108,7 @@ enum { // the lower 8 bits are a timer to the next state. // When the timer is incremented above 255, it increments // the vine state and the timer is reset. -#define VINE_STATE_TIMER(vineState)(((vineState) << 8) | 0xFF) +#define VINE_STATE_TIMER(vineState) (((vineState) << 8) | 0xFF) enum { MONSTATE_NORMAL, // Pokémon is either on the ground or in the middle of a jump diff --git a/src/pokenav_ribbons_summary.c b/src/pokenav_ribbons_summary.c index e77f839a80..c799daf57b 100644 --- a/src/pokenav_ribbons_summary.c +++ b/src/pokenav_ribbons_summary.c @@ -1080,7 +1080,7 @@ enum { RIBBONGFX_GIFT_3, }; -#define TO_PAL_OFFSET(palNum)((palNum) - PALTAG_RIBBON_ICONS_1) +#define TO_PAL_OFFSET(palNum) ((palNum) - PALTAG_RIBBON_ICONS_1) struct { diff --git a/src/region_map.c b/src/region_map.c index 21c6314d30..8fa53a0e7b 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -189,7 +189,7 @@ static const u16 sTerraOrMarineCaveMapSecIds[ABNORMAL_WEATHER_LOCATIONS] = [ABNORMAL_WEATHER_ROUTE_129_EAST - 1] = MAPSEC_ROUTE_129 }; -#define MARINE_CAVE_COORD(location)(ABNORMAL_WEATHER_##location - MARINE_CAVE_LOCATIONS_START) +#define MARINE_CAVE_COORD(location) (ABNORMAL_WEATHER_##location - MARINE_CAVE_LOCATIONS_START) static const struct UCoords16 sMarineCaveLocationCoords[MARINE_CAVE_LOCATIONS] = { diff --git a/src/roulette.c b/src/roulette.c index ec4c8cfcfe..f4e6012a8d 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -70,13 +70,13 @@ // Get the id of the col/row from the selection ID // e.g. GET_ROW(SQU_PURPLE_SKITTY) is ROW_PURPLE -#define GET_COL(selectionId)((selectionId) % (NUM_BOARD_POKES + 1)) -#define GET_ROW(selectionId)((selectionId) / (NUM_BOARD_POKES + 1) * (NUM_BOARD_POKES + 1)) +#define GET_COL(selectionId) ((selectionId) % (NUM_BOARD_POKES + 1)) +#define GET_ROW(selectionId) ((selectionId) / (NUM_BOARD_POKES + 1) * (NUM_BOARD_POKES + 1)) // Get the col/row index from the selection ID // e.g. GET_ROW_IDX(SQU_PURPLE_SKITTY) is 2 (purple being the 3rd row) -#define GET_COL_IDX(selectionId)(selectionId - 1) -#define GET_ROW_IDX(selectionId)(selectionId / 5 - 1) +#define GET_COL_IDX(selectionId) (selectionId - 1) +#define GET_ROW_IDX(selectionId) (selectionId / 5 - 1) // Flags for the above selections, used to set which spaces have been hit or bet on #define F_WYNAUT_COL (1 << COL_WYNAUT) @@ -149,7 +149,7 @@ // 2 different Roulette tables with 2 different rates (normal vs service day special) // & 1 gets which table, >> 7 gets if ROULETTE_SPECIAL_RATE is set -#define GET_MIN_BET_ID(var)(((var) & 1) + (((var) >> 7) * 2)) +#define GET_MIN_BET_ID(var) (((var) & 1) + (((var) >> 7) * 2)) // Having Shroomish or Taillow in the party can make rolls more consistent in length // It also increases the likelihood that, if they appear to unstick a ball, they'll move it to a slot the player bet on diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index a7d5045b38..1bb7968359 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -14,7 +14,7 @@ // Each parent player can lead a group of up to MAX_RFU_PLAYERS (including themselves). // Multiply the leader's id by MAX_RFU_PLAYERS and add the member's id (0 if the leader) to // get the sprite index of that player. -#define UR_PLAYER_SPRITE_ID(leaderId, memberId)(MAX_RFU_PLAYERS * leaderId + memberId) +#define UR_PLAYER_SPRITE_ID(leaderId, memberId) (MAX_RFU_PLAYERS * leaderId + memberId) static EWRAM_DATA struct UnionRoomObject * sUnionObjWork = NULL; static EWRAM_DATA u32 sUnionObjRefreshTimer = 0;