Clean up defines lacking spaces
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user