diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/battle.h | 106 | ||||
| -rwxr-xr-x | include/battle_ai_switch_items.h | 6 | ||||
| -rw-r--r-- | include/choose_party.h | 3 | ||||
| -rw-r--r-- | include/constants/battle_constants.h | 73 | ||||
| -rw-r--r-- | include/contest.h | 271 | ||||
| -rw-r--r-- | include/contest_effect.h | 6 | ||||
| -rw-r--r-- | include/contest_painting_effects.h (renamed from include/cute_sketch.h) | 0 | ||||
| -rw-r--r-- | include/debug.h | 3 | ||||
| -rw-r--r-- | include/decoration_inventory.h | 5 | ||||
| -rw-r--r-- | include/ewram.h | 38 | ||||
| -rw-r--r-- | include/field_fadetransition.h | 2 | ||||
| -rw-r--r-- | include/global.h | 5 | ||||
| -rw-r--r-- | include/macros/battle_script.inc | 2 | ||||
| -rw-r--r-- | include/menu.h | 4 | ||||
| -rw-r--r-- | include/menu_helpers.h | 3 | ||||
| -rw-r--r-- | include/overworld.h | 2 | ||||
| -rw-r--r-- | include/pokeblock.h | 2 | ||||
| -rw-r--r-- | include/pokemon.h | 9 | ||||
| -rw-r--r-- | include/roamer.h | 7 | ||||
| -rw-r--r-- | include/rom_8077ABC.h | 26 | ||||
| -rw-r--r-- | include/secret_base.h | 4 | ||||
| -rw-r--r-- | include/strings.h | 2 | ||||
| -rw-r--r-- | include/wild_encounter.h | 5 | 
23 files changed, 421 insertions, 163 deletions
| diff --git a/include/battle.h b/include/battle.h index 11bb9e387..af0b48013 100644 --- a/include/battle.h +++ b/include/battle.h @@ -4,29 +4,43 @@  #include "sprite.h"  #include "constants/battle_constants.h" -/* -    Banks are a name given to what could be called a 'battlerId' or 'monControllerId'. -    Each bank has a value consisting of two bits. -    0x1 bit is responsible for the side, 0 = player's side, 1 = opponent's side. -    0x2 bit is responsible for the id of sent out pokemon. 0 means it's the first sent out pokemon, 1 it's the second one. (Triple battle didn't exist at the time yet.) -*/ - -#define BATTLE_BANKS_COUNT  4 - -#define IDENTITY_PLAYER_MON1        0 -#define IDENTITY_OPPONENT_MON1      1 -#define IDENTITY_PLAYER_MON2        2 -#define IDENTITY_OPPONENT_MON2      3 - -#define SIDE_PLAYER     0x0 -#define SIDE_OPPONENT   0x1 - -#define BIT_SIDE        0x1 -#define BIT_MON         0x2 - -#define GET_BANK_IDENTITY(bank)((gBanksByIdentity[bank])) -#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & BIT_SIDE)) -#define GET_BANK_SIDE2(bank)((GET_BANK_IDENTITY(bank) & BIT_SIDE)) +#define GET_BATTLER_POSITION(bank)((gBattlerPositions[bank])) +#define GET_BATTLER_SIDE(bank)((GetBattlerPosition(bank) & BIT_SIDE)) +#define GET_BATTLER_SIDE2(bank)((GET_BATTLER_POSITION(bank) & BIT_SIDE)) + +// Battle Actions +// These determine what each battler will do in a turn +#define B_ACTION_USE_MOVE               0 +#define B_ACTION_USE_ITEM               1 +#define B_ACTION_SWITCH                 2 +#define B_ACTION_RUN                    3 +#define B_ACTION_SAFARI_WATCH_CAREFULLY 4 +#define B_ACTION_SAFARI_BALL            5 +#define B_ACTION_SAFARI_POKEBLOCK       6 +#define B_ACTION_SAFARI_GO_NEAR         7 +#define B_ACTION_SAFARI_RUN             8 +// The exact purposes of these are unclear +#define B_ACTION_UNKNOWN9               9 +#define B_ACTION_EXEC_SCRIPT            10 // when executing an action +#define B_ACTION_CANCEL_PARTNER         12 // when choosing an action +#define B_ACTION_FINISHED               12 // when executing an action +#define B_ACTION_NOTHING_FAINTED        13 // when choosing an action +#define B_ACTION_NONE                   0xFF + +// 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])) + +// defines for the gTypeEffectiveness multipliers +#define TYPE_MUL_NO_EFFECT          0 +#define TYPE_MUL_NOT_EFFECTIVE      5 +#define TYPE_MUL_NORMAL             10 +#define TYPE_MUL_SUPER_EFFECTIVE    20 + +// special type table Ids +#define TYPE_FORESIGHT  0xFE +#define TYPE_ENDTABLE   0xFF  enum  { @@ -56,13 +70,13 @@ struct Trainer      /*0x24*/ const void *party;  }; -struct UnkBattleStruct1 // AI_Opponent_Info? +struct BattleHistory  { -    /*0x00*/ u16 movesUsed[2][8]; // 0xFFFF means move not used (confuse self hit, etc) -    /*0x20*/ u8 unk20[2]; -    /*0x22*/ u8 unk22[2]; -    /*0x24*/ u16 items[4]; -    /*0x2C*/ u8 numOfItems; +    /*0x00*/ u16 usedMoves[2][8]; // 0xFFFF means move not used (confuse self hit, etc) +    /*0x20*/ u8 abilities[MAX_BATTLERS_COUNT / 2]; +    /*0x22*/ u8 itemEffects[MAX_BATTLERS_COUNT / 2]; +    /*0x24*/ u16 trainerItems[MAX_BATTLERS_COUNT]; +    /*0x2C*/ u8 numItems;  };  struct AI_Stack @@ -179,7 +193,7 @@ struct BattleStruct /* 0x2000000 */      /*0x1605F*/ u8 sentInPokes;      /*0x16060*/ u8 unk16060[4];      /*0x16064*/ u8 unk16064[4]; -    /*0x16068*/ u8 unk16068[4]; +    /*0x16068*/ u8 monToSwitchIntoId[MAX_BATTLERS_COUNT];      /*0x1606C*/ u8 unk1606C[4][3];      /*0x16078*/ u8 unk16078;      /*0x16079*/ u8 caughtNick[11]; @@ -242,8 +256,7 @@ struct BattleStruct /* 0x2000000 */      /*0x160C5*/ u8 unk160C5;      /*0x160C6*/ u8 unk160C6;      /*0x160C7*/ u8 unk160C7; -    /*0x160C8*/ u8 unk160C8; -    /*0x160C9*/ u8 unk160C9; +    /*0x160C8*/ u8 AI_monToSwitchIntoId[2];      /*0x160CA*/ u8 synchroniseEffect;      /*0x160CB*/ u8 linkPlayerIndex;      /*0x160CC*/ u16 usedHeldItems[4]; @@ -323,7 +336,7 @@ struct BattleStruct /* 0x2000000 */      /*0x1611F*/ u8 unk1611F;      //u8 filler2[0x72E]; -    /* 0x16A00 */ struct UnkBattleStruct1 unk_2016A00_2; +    /* 0x16A00 */ struct BattleHistory unk_2016A00_2;  };  struct StatsArray @@ -352,8 +365,8 @@ struct DisableStruct      /*0x0D*/ u8 unkD;      /*0x0E*/ u8 encoreTimer1 : 4;      /*0x0E*/ u8 encoreTimer2 : 4; -    /*0x0F*/ u8 perishSong1 : 4; -    /*0x0F*/ u8 perishSong2 : 4; +    /*0x0F*/ u8 perishSongTimer1 : 4; +    /*0x0F*/ u8 perishSongTimer2 : 4;      /*0x10*/ u8 furyCutterCounter;      /*0x11*/ u8 rolloutTimer1 : 4;      /*0x11*/ u8 rolloutTimer2 : 4; @@ -520,21 +533,21 @@ struct sideTimer  struct WishFutureKnock  { -    u8 futureSightCounter[MAX_BANKS_BATTLE]; -    u8 futureSightAttacker[MAX_BANKS_BATTLE]; -    s32 futureSightDmg[MAX_BANKS_BATTLE]; -    u16 futureSightMove[MAX_BANKS_BATTLE]; -    u8 wishCounter[MAX_BANKS_BATTLE]; -    u8 wishUserID[MAX_BANKS_BATTLE]; +    u8 futureSightCounter[MAX_BATTLERS_COUNT]; +    u8 futureSightAttacker[MAX_BATTLERS_COUNT]; +    s32 futureSightDmg[MAX_BATTLERS_COUNT]; +    u16 futureSightMove[MAX_BATTLERS_COUNT]; +    u8 wishCounter[MAX_BATTLERS_COUNT]; +    u8 wishUserID[MAX_BATTLERS_COUNT];      u8 weatherDuration;      u8 knockedOffPokes[2];  }; -extern struct UnkBattleStruct1 unk_2016A00; -extern struct DisableStruct gDisableStructs[MAX_BANKS_BATTLE]; +extern struct BattleHistory unk_2016A00; +extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];  extern struct BattleResults gBattleResults; -extern struct ProtectStruct gProtectStructs[MAX_BANKS_BATTLE]; -extern struct SpecialStatus gSpecialStatuses[MAX_BANKS_BATTLE]; +extern struct ProtectStruct gProtectStructs[MAX_BATTLERS_COUNT]; +extern struct SpecialStatus gSpecialStatuses[MAX_BATTLERS_COUNT];  extern struct sideTimer gSideTimers[2];  extern struct WishFutureKnock gWishFutureKnock;  extern struct AI_ThinkingStruct gAIThinkingSpace; @@ -708,7 +721,7 @@ void MarkBufferBankForExecution(u8 bank);  extern u8 gBattleTextBuff1[]; -// asm/battle_1.o +// src/battle_bg.o  void sub_800D6D4();  void ApplyPlayerChosenFrameToBattleMenu();  void DrawMainBattleBackground(void); @@ -803,7 +816,6 @@ void sub_8032AA8(u8, u8);  void SetBankFuncToOpponentBufferRunCommand(void);  void BattleStopLowHpSound(void); -// asm/battle_9.o  void SetBankFuncToLinkOpponentBufferRunCommand(void);  #endif // GUARD_BATTLE_H diff --git a/include/battle_ai_switch_items.h b/include/battle_ai_switch_items.h new file mode 100755 index 000000000..648cfad74 --- /dev/null +++ b/include/battle_ai_switch_items.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BATTLE_AI_SWITCH_ITEMS_H +#define GUARD_BATTLE_AI_SWITCH_ITEMS_H + +u8 GetMostSuitableMonToSwitchInto(void); + +#endif diff --git a/include/choose_party.h b/include/choose_party.h index 853202a89..9aacef27d 100644 --- a/include/choose_party.h +++ b/include/choose_party.h @@ -9,5 +9,8 @@ bool8 SetupLinkMultiBattlePartyMenu(void);  void HandleLinkMultiBattlePartyMenu(u8 taskId);  void HandleDaycarePartyMenu(u8 taskId);  void sub_8123138(u8 taskId); +#if DEBUG +void Debug_CopyLastThreePartyMonsToMultiPartnerParty(void); +#endif  #endif // GUARD_CHOOSE_PARTY_H diff --git a/include/constants/battle_constants.h b/include/constants/battle_constants.h index 49768f33e..65f44d8aa 100644 --- a/include/constants/battle_constants.h +++ b/include/constants/battle_constants.h @@ -1,12 +1,47 @@  #ifndef GUARD_CONSTANTS_BATTLE_CONSTANTS_H  #define GUARD_CONSTANTS_BATTLE_CONSTANTS_H -// Bank sides -#define SIDE_PLAYER     0x0 -#define SIDE_OPPONENT   0x1 - -#define BIT_SIDE        0x1 -#define BIT_MON         0x2 +/* + * A battler may be in one of four positions on the field. The first bit determines + * what side the battler is on, either the player's side or the opponent's side. + * The second bit determines what flank the battler is on, either the left or right. + * Note that the opponent's flanks are drawn corresponding to their perspective, so + * their right mon appears on the left, and their left mon appears on the right. + * The battler ID is usually the same as the position, except in the case of link battles. + * + *   + ------------------------- + + *   |           Opponent's side | + *   |            Right    Left  | + *   |              3       1    | + *   |                           | + *   | Player's side             | + *   |  Left   Right             | + *   |   0       2               | + *   ----------------------------+ + *   |                           | + *   |                           | + *   +---------------------------+ + */ + +#define MAX_BATTLERS_COUNT  4 + +#define B_POSITION_PLAYER_LEFT        0 +#define B_POSITION_OPPONENT_LEFT      1 +#define B_POSITION_PLAYER_RIGHT       2 +#define B_POSITION_OPPONENT_RIGHT     3 + +// These macros can be used with either battler ID or positions to get the partner or the opposite mon +#define BATTLE_OPPOSITE(id) ((id) ^ 1) +#define BATTLE_PARTNER(id) ((id) ^ 2) + +#define B_SIDE_PLAYER     0 +#define B_SIDE_OPPONENT   1 + +#define B_FLANK_LEFT 0 +#define B_FLANK_RIGHT 1 + +#define BIT_SIDE        1 +#define BIT_FLANK       2  #define STATUS_SLEEP            0x7  #define STATUS_POISON           0x8 @@ -88,19 +123,16 @@  #define HITMARKER_FAINTED(bank)         ((gBitTable[bank] << 0x1C))  #define HITMARKER_UNK(bank)             ((0x10000000 << bank)) -#define MOVESTATUS_MISSED             (1 << 0) -#define MOVESTATUS_SUPEREFFECTIVE     (1 << 1) -#define MOVESTATUS_NOTVERYEFFECTIVE   (1 << 2) -#define MOVESTATUS_NOTAFFECTED        (1 << 3) -#define MOVESTATUS_ONEHITKO           (1 << 4) -#define MOVESTATUS_FAILED             (1 << 5) -#define MOVESTATUS_ENDURED            (1 << 6) -#define MOVESTATUS_HUNGON             (1 << 7) - -#define IDENTITY_PLAYER_MON1        0 -#define IDENTITY_OPPONENT_MON1      1 -#define IDENTITY_PLAYER_MON2        2 -#define IDENTITY_OPPONENT_MON2      3 +// Flags describing move's result +#define MOVE_RESULT_MISSED             (1 << 0) +#define MOVE_RESULT_SUPER_EFFECTIVE    (1 << 1) +#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2) +#define MOVE_RESULT_DOESNT_AFFECT_FOE  (1 << 3) +#define MOVE_RESULT_ONE_HIT_KO         (1 << 4) +#define MOVE_RESULT_FAILED             (1 << 5) +#define MOVE_RESULT_FOE_ENDURED        (1 << 6) +#define MOVE_RESULT_FOE_HUNG_ON        (1 << 7) +#define MOVE_RESULT_NO_EFFECT          (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED)  #define BATTLE_TYPE_DOUBLE          0x0001  #define BATTLE_TYPE_LINK            0x0002 @@ -206,11 +238,8 @@  #define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) -#define MOVESTATUS_NOEFFECT ((MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED)) -  #define MAX_TRAINER_ITEMS 4  #define MAX_MON_MOVES 4 -#define MAX_BANKS_BATTLE 4  #define WEATHER_RAIN_TEMPORARY      (1 << 0)  #define WEATHER_RAIN_DOWNPOUR       (1 << 1) diff --git a/include/contest.h b/include/contest.h index 557b9e5c4..86a5ea4d7 100644 --- a/include/contest.h +++ b/include/contest.h @@ -13,13 +13,186 @@ enum  enum  {      CONTEST_EFFECT_HIGHLY_APPEALING, -    CONTEST_EFFECT_USER_MORE_STARTLED, -    CONTEST_EFFECT_APPEAL_ONLY_ONCE, -    CONTEST_EFFECT_REPEATABLE, +    CONTEST_EFFECT_USER_MORE_EASILY_STARTLED, +    CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES, +    CONTEST_EFFECT_REPETITION_NOT_BORING,      CONTEST_EFFECT_AVOID_STARTLE_ONCE,      CONTEST_EFFECT_AVOID_STARTLE, -    CONTEST_EFFECT_AVOID_STARTLE_LITTLE, -    //... +    CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY, +    CONTEST_EFFECT_USER_LESS_EASILY_STARTLED, +    CONTEST_EFFECT_STARTLE_FRONT_MON, +    CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS, +    CONTEST_EFFECT_STARTLE_PREV_MON, +    CONTEST_EFFECT_STARTLE_PREV_MONS, +    CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON, +    CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS, +    CONTEST_EFFECT_STARTLE_PREV_MON_2, +    CONTEST_EFFECT_STARTLE_PREV_MONS_2, +    CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION, +    CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION, +    CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, +    CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL, +    CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL, +    CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL, +    CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL, +    CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL, +    CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL, +    CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS, +    CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS, +    CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS, +    CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION, +    CONTEST_EFFECT_BETTER_IF_FIRST, +    CONTEST_EFFECT_BETTER_IF_LAST, +    CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, +    CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE, +    CONTEST_EFFECT_BETTER_WHEN_LATER, +    CONTEST_EFFECT_QUALITY_DEPENDS_ON_TIMING, +    CONTEST_EFFECT_BETTER_IF_SAME_TYPE, +    CONTEST_EFFECT_BETTER_IF_DIFF_TYPE, +    CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL, +    CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, +    CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION, +    CONTEST_EFFECT_NEXT_APPEAL_EARLIER, +    CONTEST_EFFECT_NEXT_APPEAL_LATER, +    CONTEST_EFFECT_MAKE_SCRAMBLING_TURN_ORDER_EASIER, +    CONTEST_EFFECT_SCRAMBLE_NEXT_TURN_ORDER, +    CONTEST_EFFECT_EXCITE_AUDIENCE_IN_ANY_CONTEST, +    CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS, +    CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED, +    CONTEST_EFFECT_DONT_EXCITE_AUDIENCE +}; + +enum +{ +    COMBO_STARTER_RAIN_DANCE = 1, +    COMBO_STARTER_RAGE, +    COMBO_STARTER_FOCUS_ENERGY, +    COMBO_STARTER_HYPNOSIS, +    COMBO_STARTER_ENDURE, +    COMBO_STARTER_HORN_ATTACK, +    COMBO_STARTER_SWORDS_DANCE, +    COMBO_STARTER_STOCKPILE, +    COMBO_STARTER_SUNNY_DAY, +    COMBO_STARTER_REST, +    COMBO_STARTER_VICE_GRIP, +    COMBO_STARTER_DEFENSE_CURL, +    COMBO_STARTER_CHARGE, +    COMBO_STARTER_ROCK_THROW, +    COMBO_STARTER_YAWN, +    COMBO_STARTER_SCARY_FACE, +    COMBO_STARTER_POWDER_SNOW, +    COMBO_STARTER_LOCK_ON, +    COMBO_STARTER_SOFT_BOILED, +    COMBO_STARTER_MEAN_LOOK, +    COMBO_STARTER_SCRATCH, +    COMBO_STARTER_GROWTH, +    COMBO_STARTER_HAIL, +    COMBO_STARTER_SANDSTORM, +    COMBO_STARTER_BELLY_DRUM, +    COMBO_STARTER_MIND_READER, +    COMBO_STARTER_DRAGON_BREATH, +    COMBO_STARTER_DRAGON_RAGE, +    COMBO_STARTER_DRAGON_DANCE, +    COMBO_STARTER_SURF, +    COMBO_STARTER_DIVE, +    COMBO_STARTER_STRING_SHOT, +    COMBO_STARTER_LEER, +    COMBO_STARTER_TAUNT, +    COMBO_STARTER_CHARM, +    COMBO_STARTER_HARDEN, +    COMBO_STARTER_SING, +    COMBO_STARTER_EARTHQUAKE, +    COMBO_STARTER_DOUBLE_TEAM, +    COMBO_STARTER_CURSE, +    COMBO_STARTER_SWEET_SCENT, +    COMBO_STARTER_SLUDGE, +    COMBO_STARTER_SLUDGE_BOMB, +    COMBO_STARTER_THUNDER_PUNCH, +    COMBO_STARTER_FIRE_PUNCH, +    COMBO_STARTER_ICE_PUNCH, +    COMBO_STARTER_PECK, +    COMBO_STARTER_METAL_SOUND, +    COMBO_STARTER_MUD_SPORT, +    COMBO_STARTER_WATER_SPORT, +    COMBO_STARTER_BONE_CLUB, +    COMBO_STARTER_BONEMERANG, +    COMBO_STARTER_BONE_RUSH, +    COMBO_STARTER_SAND_ATTACK, +    COMBO_STARTER_MUD_SLAP, +    COMBO_STARTER_FAKE_OUT, +    COMBO_STARTER_PSYCHIC, +    COMBO_STARTER_KINESIS, +    COMBO_STARTER_CONFUSION, +    COMBO_STARTER_POUND, +    COMBO_STARTER_SMOG, +    COMBO_STARTER_CALM_MIND +}; + +enum +{ +    CONTEST_STRING_MORE_CONSCIOUS, +    CONTEST_STRING_NO_APPEAL, +    CONTEST_STRING_SETTLE_DOWN, +    CONTEST_STRING_OBLIVIOUS_TO_OTHERS, +    CONTEST_STRING_LESS_AWARE, +    CONTEST_STRING_STOPPED_CARING, +    CONTEST_STRING_STARTLE_ATTEMPT, +    CONTEST_STRING_DAZZLE_ATTEMPT, +    CONTEST_STRING_JUDGE_LOOK_AWAY2, +    CONTEST_STRING_UNNERVE_ATTEMPT, +    CONTEST_STRING_NERVOUS, +    CONTEST_STRING_UNNERVE_WAITING, +    CONTEST_STRING_TAUNT_WELL, +    CONTEST_STRING_REGAINED_FORM, +    CONTEST_STRING_JAM_WELL, +    CONTEST_STRING_HUSTLE_STANDOUT, +    CONTEST_STRING_WORK_HARD_UNNOTICED, +    CONTEST_STRING_WORK_BEFORE, +    CONTEST_STRING_APPEAL_NOT_WELL, +    CONTEST_STRING_WORK_PRECEDING, +    CONTEST_STRING_APPEAL_NOT_WELL2, +    CONTEST_STRING_APPEAL_NOT_SHOWN_WELL, +    CONTEST_STRING_APPEAL_SLIGHTLY_WELL, +    CONTEST_STRING_APPEAL_PRETTY_WELL, +    CONTEST_STRING_APPEAL_EXCELLENTLY, +    CONTEST_STRING_APPEAL_DUD, +    CONTEST_STRING_APPEAL_NOT_VERY_WELL, +    CONTEST_STRING_APPEAL_SLIGHTLY_WELL2, +    CONTEST_STRING_APPEAL_PRETTY_WELL2, +    CONTEST_STRING_APPEAL_VERY_WELL, +    CONTEST_STRING_APPEAL_EXCELLENTLY2, +    CONTEST_STRING_SAME_TYPE_GOOD, +    CONTEST_STRING_DIFF_TYPE_GOOD, +    CONTEST_STRING_STOOD_OUT_AS_MUCH, +    CONTEST_STRING_NOT_AS_WELL, +    CONTEST_STRING_CONDITION_ROSE, +    CONTEST_STRING_HOT_STATUS, +    CONTEST_STRING_MOVE_UP_LINE, +    CONTEST_STRING_MOVE_BACK_LINE, +    CONTEST_STRING_SCRAMBLE_ORDER, +    CONTEST_STRING_JUDGE_EXPECTANTLY2, +    CONTEST_STRING_WENT_OVER_WELL, +    CONTEST_STRING_WENT_OVER_VERY_WELL, +    CONTEST_STRING_APPEAL_COMBO_EXCELLENTLY, +    CONTEST_STRING_AVERT_GAZE, +    CONTEST_STRING_AVOID_SEEING, +    CONTEST_STRING_NOT_FAZED, +    CONTEST_STRING_LITTLE_DISTRACTED, +    CONTEST_STRING_ATTEMPT_STARTLE, +    CONTEST_STRING_LOOKED_DOWN, +    CONTEST_STRING_TURNED_BACK, +    CONTEST_STRING_UTTER_CRY, +    CONTEST_STRING_LEAPT_UP, +    CONTEST_STRING_TRIPPED_OVER, +    CONTEST_STRING_MESSED_UP2, +    CONTEST_STRING_FAILED_TARGET_NERVOUS, +    CONTEST_STRING_FAILED_ANYONE_NERVOUS, +    CONTEST_STRING_IGNORED, +    CONTEST_STRING_NO_CONDITION_IMPROVE, +    CONTEST_STRING_BAD_CONDITION_WEAK_APPEAL, +    CONTEST_STRING_UNAFFECTED, +    CONTEST_STRING_ATTRACTED_ATTENTION, +    CONTEST_STRING_NONE = 255  };  struct ContestMove @@ -156,51 +329,44 @@ struct ContestantStatus   /*0x0B*/ u8 unkB_0:2;            u8 unkB_2:2;            u8 moveRepeatCount:3; -          u8 unkB_7:1;  // used a one-time move? - /*0x0C*/ u8 unkC_0:1; -          u8 unkC_1:2; - /*0x0D*/ s8 unkD; - /*0x0E*/ u8 unkE; - /*0x0F*/ u8 unkF; - /*0x10*/ u8 unk10_0:1; -          u8 unk10_1:1; -          u8 unk10_2:1; -          u8 unk10_3:1; -          u8 unk10_4:2; -          u8 unk10_6:2; - /*0x11*/ u8 unk11_0:2; -          u8 unk11_2:1; -          u8 unk11_3:1; -          u8 unk11_4:1; -          u8 unk11_5:1; - /*0x12*/ u8 unk12; - /*0x13*/ u8 unk13;   // status action? - /*0x14*/ u8 unk14; +          u8 noMoreTurns:1;  // used a one-time move? + /*0x0C*/ u8 nervous:1; +          u8 numTurnsSkipped:2; + /*0x0D*/ s8 condition; + /*0x0E*/ u8 jam; + /*0x0F*/ u8 jamReduction; + +          // Flags set by move effect + /*0x10*/ u8 resistant:1; +          u8 immune:1; +          u8 moreEasilyStartled:1; +          u8 usedRepeatableMove:1; +          u8 conditionMod:2; // 1: just raised condition; 2: appeal greatly improved by condition +          u8 turnOrderMod:2; // 1: defined; 2: random + /*0x11*/ u8 turnOrderModAction:2; // 1: made first; 2: made last; 3: made random +          u8 turnSkipped:1; +          u8 exploded:1; +          u8 overrideCategoryExcitementMod:1; +          u8 appealTripleCondition:1; + + /*0x12*/ u8 jamSafetyCount; + /*0x13*/ u8 effectStringId;   // status action? + /*0x14*/ u8 effectStringId2;   /*0x15*/ u8 disappointedRepeat:1;            u8 unk15_1:1;            u8 unk15_2:1;            u8 unk15_3:1; -          u8 unk15_4:1; -          u8 unk15_5:1; +          u8 hasJudgesAttention:1; +          u8 judgesAttentionWasRemoved:1;            u8 unk15_6:1;   /*0x16*/ u8 unk16;   /*0x17*/ u8 unk17;   /*0x18*/ u8 unk18; - /*0x19*/ u8 unk19;  // turn position + /*0x19*/ u8 nextTurnOrder;  // turn position   /*0x1A*/ u8 attentionLevel;  // How much the Pokemon "stood out"   /*0x1B*/ u8 unk1B;  }; -struct UnknownContestStruct3 -{ -    u8 unk0; -    u8 unk1; -    //u8 unk2_0:1; -    //u8 unk2_1:1; -    u8 unk2;  // maybe a bitfield -    u8 filler3; -}; -  // possibly the same as UnknownContestStruct3?  struct UnknownContestStruct4  { @@ -209,28 +375,24 @@ struct UnknownContestStruct4      u8 unk2_0:1;      u8 unk2_1:1;      u8 unk2_2:1; -    u8 filler3;  };  struct UnknownContestStruct5  {      s8 bits_0;  // current move excitement? -    u8 bits_8:1; -    u8 bits_9:3; -    u8 bits_C:4; +    u8 excitementFrozen:1; +    u8 excitementFreezer:3;      s8 unk2; -    u8 filler3;  };  struct UnknownContestStruct7  { -    u8 unk0[4]; -    u16 unk4; -    u16 unk6; -    u8 filler8[0xD-8]; -    u8 unkD[4]; -    u8 unk11; -    u8 filler12[2]; +    u8 turnOrder[4]; +    s16 jam; +    s16 jam2; +    u8 jamQueue[5]; +    u8 unnervedPokes[4]; +    u8 contestant;  };  struct UnknownContestStruct8 @@ -239,7 +401,6 @@ struct UnknownContestStruct8      u16 unk2;      u8 unk4_0:1;      u8 unk5; -    u8 filler6[2];      u32 unk8;      u32 unkC;      u32 unk10; @@ -277,5 +438,13 @@ extern u16 gUnknown_02038688[4];  extern u8 gContestFinalStandings[4];  extern u8 gUnknown_02038696[4];  extern u8 gUnknown_0203869B; +extern u16 gSpecialVar_ContestCategory; + +void SetContestantEffectStringID(u8 a, u8 b); +void SetContestantEffectStringID2(u8 a, u8 b); +void MakeContestantNervous(u8 p); +bool8 Contest_IsMonsTurnDisabled(u8 a); +bool8 sub_80B214C(u8 a); +void SetStartledString(u8 a, u8 b);  #endif // GUARD_CONTEST_H diff --git a/include/contest_effect.h b/include/contest_effect.h new file mode 100644 index 000000000..2840bf106 --- /dev/null +++ b/include/contest_effect.h @@ -0,0 +1,6 @@ +#ifndef POKERUBY_GBA_CONTEST_EFFECT_H +#define POKERUBY_GBA_CONTEST_EFFECT_H + +extern bool8 AreMovesContestCombo(u16, u16); + +#endif //POKERUBY_GBA_CONTEST_EFFECT_H diff --git a/include/cute_sketch.h b/include/contest_painting_effects.h index 1fa3c90fb..1fa3c90fb 100644 --- a/include/cute_sketch.h +++ b/include/contest_painting_effects.h diff --git a/include/debug.h b/include/debug.h index 2136dbfb8..469560b9e 100644 --- a/include/debug.h +++ b/include/debug.h @@ -14,4 +14,7 @@ void debug_nullsub_66(void);  // sound_check_menu  void CB2_StartSoundCheckMenu(void); +// nakamura_debug_menu +void NakaGenderTest(void); +  #endif // GUARD_DEBUG_H diff --git a/include/decoration_inventory.h b/include/decoration_inventory.h index e59a23008..e2e31bee9 100644 --- a/include/decoration_inventory.h +++ b/include/decoration_inventory.h @@ -4,9 +4,12 @@  void ClearDecorationInventories(void);  s8 sub_8133F9C(u8);  u8 sub_8133FE4(u8); -u8 IsThereStorageSpaceForDecoration(u8); +u8 GiveDecoration(u8);  u8 sub_8134074(u8);  s8 sub_81340A8(u8);  u8 sub_8134194(u8); +#if DEBUG +void Debug_GiveAllDecorations(void); +#endif // DEBUG  #endif // GUARD_DECORATION_INVENTORY_H diff --git a/include/ewram.h b/include/ewram.h index f1d9baa78..6b164648b 100644 --- a/include/ewram.h +++ b/include/ewram.h @@ -98,13 +98,13 @@ extern u8 gSharedMem[];  #define ewram16001                      (gSharedMem[0x16001])  #define ewram16002                      (gSharedMem[0x16002])  #define ewram16003                      (gSharedMem[0x16003]) -#define ewram16004arr(i, bank)          (gSharedMem[0x16004 + i + bank * 2]) +#define ewram16004arr(i, battler)       (gSharedMem[0x16004 + i + battler * 2])  #define ewram1600C                      (gSharedMem[0x1600C])  #define ewram1600E                      (gSharedMem[0x1600E]) -#define ewram16010arr(bank)             (gSharedMem[0x16010 + bank]) +#define ewram16010arr(battler)          (gSharedMem[0x16010 + battler])  #define ewram1601B                      (gSharedMem[0x1601B])  #define eDynamicMoveType                (gSharedMem[0x1601C]) -#define eFocusPunchBank                 (gSharedMem[0x1601D]) +#define eFocusPunchBattler              (gSharedMem[0x1601D])  #define eDmgMultiplier                  (gSharedMem[0x1601F])  #define ewram16020                      ((u8 *)(gSharedMem + 0x16020))  #define ewram16020arr(i)                (gSharedMem[0x16020 + i]) @@ -112,10 +112,10 @@ extern u8 gSharedMem[];  #define ewram16056                      (gSharedMem[0x16056])  #define ewram16058                      (gSharedMem[0x16058])  #define ewram16059                      (gSharedMem[0x16059]) -#define ewram16060(bank)                (gSharedMem[0x16060 + bank]) -#define BATTLE_PARTY_ID(bank)           (gSharedMem[0x16064 + bank]) +#define ewram16060(battler)             (gSharedMem[0x16060 + battler]) +#define BATTLE_PARTY_ID(battler)        (gSharedMem[0x16064 + battler])  #define ewram16064                      (&gSharedMem[0x16064]) -#define ewram16064arr(bank)             (gSharedMem[0x16064 + bank]) +#define ewram16064arr(battler)          (gSharedMem[0x16064 + battler])  #define ewram16068arr(i)                (gSharedMem[0x16068 + i])  #define UNK_201606C_ARRAY               (gSharedMem + 0x1606C) // lazy define but whatever.  #define ewram1606Carr(i, a)             (gSharedMem[0x1606C + i + a * 3]) @@ -132,7 +132,7 @@ extern u8 gSharedMem[];  #define ewram1608A                      gSharedMem[0x1608A]  #define ewram1608B                      gSharedMem[0x1608B] -#define ewram1608Carr(bank)             (gSharedMem[0x1608C + bank]) +#define ewram1608Carr(battler)          (gSharedMem[0x1608C + battler])  #define EWRAM_1609D                     (gSharedMem[0x1609D])  #define ewram160A1                      (gSharedMem[0x160A1])  #define ewram160A4                      (gSharedMem[0x160A4]) @@ -144,31 +144,31 @@ extern u8 gSharedMem[];  #define ewram160AB                      (gSharedMem[0x160AB])  #define ewram160AC                      ((u8 *)(gSharedMem + 0x160AC))  #define ewram160ACarr(i)                (gSharedMem[0x160AC + i]) -#define ewram160ACarr2(i, bank)         (gSharedMem[0x160AC + i + bank * 2]) +#define ewram160ACarr2(i, battler)      (gSharedMem[0x160AC + i + battler * 2])  #define ewram160BC                      ((u16 *)(gSharedMem + 0x160BC))  // hp -#define ewram160BCarr(bank)             (gSharedMem[0x160BC + bank * 2]) +#define ewram160BCarr(battler)          (gSharedMem[0x160BC + battler * 2])  #define ewram160C0                      (gSharedMem[0x160C0])  #define ewram160C2_Flags                ((u16 *)(gSharedMem + 0x160C2))  #define ewram160C4_Callback             ((MainCallback *)(gSharedMem + 0x160C4))  #define ewram160C8                      (gSharedMem[0x160C8]) -#define ewram160C8arr(bank)             (gSharedMem[0x160C8 + (bank / 2)]) +#define ewram160C8arr(battler)          (gSharedMem[0x160C8 + (battler / 2)])  #define ewram160C9                      (gSharedMem[0x160C9])  #define ewram160CB                      (gSharedMem[0x160CB])  #define ewram160CC                      ((u8 *)(gSharedMem + 0x160CC))  #define ewram160CCarr(i)                (gSharedMem[0x160CC + i]) -#define USED_HELD_ITEM(bank)            ((((u16*)(&gSharedMem[0x160CC + bank * 2])))) -#define USED_HELD_ITEMS(bank)           (*(u16 *)&gSharedMem[0x160CC + 2 * (bank)]) -#define ewram160D4(bank)                (gSharedMem[0x160D4 + (bank / 2) * 2]) -#define ewram160D8(bank)                (gSharedMem[0x160D8 + (bank / 2)]) -#define ewram160DA(bank)                (gSharedMem[0x160DA + (bank / 2)]) +#define USED_HELD_ITEM(battler)         ((((u16*)(&gSharedMem[0x160CC + battler * 2])))) +#define USED_HELD_ITEMS(battler)        (*(u16 *)&gSharedMem[0x160CC + 2 * (battler)]) +#define ewram160D4(battler)             (gSharedMem[0x160D4 + (battler / 2) * 2]) +#define ewram160D8(battler)             (gSharedMem[0x160D8 + (battler / 2)]) +#define ewram160DA(battler)             (gSharedMem[0x160DA + (battler / 2)])  #define ewram160DD                      (gSharedMem[0x160DD])  #define ewram160E0(i)                   (gSharedMem[0x160E0 + i])  #define ewram160E6                      (gSharedMem[0x160E6])  #define ewram160E7                      (gSharedMem[0x160E7]) -#define CHOICED_MOVE(bank)              (((u16*)(&gSharedMem[0x160E8 + bank * 2]))) +#define CHOICED_MOVE(battler)           (((u16*)(&gSharedMem[0x160E8 + battler * 2])))  #define ewram160E8                      ((u8 *)(gSharedMem + 0x160E8))  #define ewram160E8arr(i)                (gSharedMem[0x160E8 + i]) -#define ewram160E8arr2(i, bank)         (gSharedMem[0x160E8 + i + bank * 2]) +#define ewram160E8arr2(i, battler)      (gSharedMem[0x160E8 + i + battler * 2])  #define ewram160F0                      ((u8 *)(gSharedMem + 0x160F0))  #define ewram160F0arr(i)                (gSharedMem[0x160F0 + i])  #define ewram160F8                      (gSharedMem[0x160F8]) @@ -177,7 +177,7 @@ extern u8 gSharedMem[];  #define ewram160FB                      (gSharedMem[0x160FB])  #define ewram16100                      ((u8 *)(gSharedMem + 0x16100))  #define ewram16100arr(i)                (gSharedMem[0x16100 + i]) -#define ewram16100arr2(i, bank)         (gSharedMem[0x16100 + i + bank * 4]) +#define ewram16100arr2(i, battler)      (gSharedMem[0x16100 + i + battler * 4])  #define ewram16108                      ((u8 *)(gSharedMem + 0x16108))  #define ewram16108arr(i)                (gSharedMem[0x16108 + i])  #define ewram16110                      (gSharedMem[0x16110]) @@ -186,7 +186,7 @@ extern u8 gSharedMem[];  #define ewram16113                      (gSharedMem[0x16113])  #define ewram16400                      (gSharedMem + 0x16400)  #define AI_THINKING_STRUCT              ((struct AI_ThinkingStruct *)(gSharedMem + 0x16800)) -#define UNK_2016A00_STRUCT              ((struct UnkBattleStruct1 *) (gSharedMem + 0x16A00)) +#define AI_BATTLE_HISTORY               ((struct BattleHistory *) (gSharedMem + 0x16A00))  #define AI_STACK                        ((struct AI_Stack *)         (gSharedMem + 0x16C00))  #define AI_ARRAY_160CC(i)               (gSharedMem[0x160CC + i * 2])  #define ewram16800                      (&gSharedMem[0x16800]) diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index cd0cb6eab..64e922651 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -13,7 +13,7 @@ void sub_8080A3C(void);  void sub_8080AC4(void);  void mapldr_default();  void sub_8080B60(void); -void atk17_seteffectsecondary(void); +void sub_8080DEC(void);  void sub_8080E28(void);  void sub_8080E44(void);  bool32 sub_8080E70(void); diff --git a/include/global.h b/include/global.h index faa4ace68..4437b7feb 100644 --- a/include/global.h +++ b/include/global.h @@ -1,6 +1,8 @@  #ifndef GUARD_GLOBAL_H  #define GUARD_GLOBAL_H +#include <string.h> +#include <stdlib.h>  #include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.  #include "gba/gba.h" @@ -14,9 +16,6 @@  #define INCBIN_S8 {0}  #define INCBIN_S16 {0}  #define INCBIN_S32 {0} -void *memcpy (void *, const void *, size_t); -void *memset (void *, int, size_t); -int strcmp (const char *, const char *);  #endif  // Prevent cross-jump optimization. diff --git a/include/macros/battle_script.inc b/include/macros/battle_script.inc index e4fa0c454..d92e28934 100644 --- a/include/macros/battle_script.inc +++ b/include/macros/battle_script.inc @@ -1402,7 +1402,7 @@  	.endm  	.macro jumpifmovehadnoeffect jumpptr -	jumpifbyte COMMON_BITS, gBattleMoveFlags, MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED, \jumpptr +	jumpifbyte COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED, \jumpptr  	.endm  	.macro jumpifbattletype flags, jumpptr diff --git a/include/menu.h b/include/menu.h index 3295cd5c5..523037839 100644 --- a/include/menu.h +++ b/include/menu.h @@ -4,10 +4,12 @@  #include "task.h"  #include "text.h" +typedef bool8 (*MenuFunc)(); +  struct MenuAction  {     const u8 *text; -   u8 (*func)(); +   MenuFunc func;  };  struct MenuAction2 diff --git a/include/menu_helpers.h b/include/menu_helpers.h index a1c872c73..fb50ae724 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -50,5 +50,8 @@ void StartVerticalScrollIndicators(u8);  void sub_80F98DC(u8);  void PauseVerticalScrollIndicator(u8);  void SetVerticalScrollIndicatorPriority(u8, u8); +#if DEBUG +void PrintTriangleCursorWithPalette(u8, u8, u8); +#endif // DEBUG  #endif // GUARD_MENU_HELPERS_H diff --git a/include/overworld.h b/include/overworld.h index dc393cc63..b18027933 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -138,7 +138,7 @@ void c2_exit_to_overworld_2_switch(void);  void c2_exit_to_overworld_2_local(void);  void c2_exit_to_overworld_2_link(void);  // sub_805465C -void sub_805469C(void); +void c2_exit_to_overworld_1_sub_8080DEC(void);  // sub_80546B8  void c2_exit_to_overworld_1_continue_scripts_restart_music(void);  void sub_80546F0(void); diff --git a/include/pokeblock.h b/include/pokeblock.h index a606a32ad..f674666ff 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -42,7 +42,7 @@ s16 PokeblockGetGain(u8, const struct Pokeblock *);  u8 sub_810CB68(u8, u8*);  void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest);  void CB2_PreparePokeblockFeedScene(void); -bool8 sub_810CA34(const struct Pokeblock *); +bool8 GivePokeblock(const struct Pokeblock *);  #include "main.h" diff --git a/include/pokemon.h b/include/pokemon.h index 169045c0c..8864aee8a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -312,6 +312,8 @@ struct UnknownPokemonStruct      /*0x2B*/u8 friendship;  }; +#define BATTLE_STATS_NO 8 +  struct BattlePokemon  {      /*0x00*/ u16 species; @@ -329,7 +331,7 @@ struct BattlePokemon      /*0x17*/ u32 spDefenseIV:5;      /*0x17*/ u32 isEgg:1;      /*0x17*/ u32 altAbility:1; -    /*0x18*/ s8 statStages[8]; +    /*0x18*/ s8 statStages[BATTLE_STATS_NO];      /*0x20*/ u8 ability;      /*0x21*/ u8 type1;      /*0x22*/ u8 type2; @@ -630,5 +632,10 @@ struct Sprite *sub_80F7920(u16, u16, const u16 *);  void BoxMonRestorePP(struct BoxPokemon *);  bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); +u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit); + +#if DEBUG +void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *); +#endif // DEBUG  #endif // GUARD_POKEMON_H diff --git a/include/roamer.h b/include/roamer.h index 86908bd00..6f0813eb8 100644 --- a/include/roamer.h +++ b/include/roamer.h @@ -10,4 +10,9 @@ u8 TryStartRoamerEncounter(void);  void UpdateRoamerHPStatus(struct Pokemon *mon);  void SetRoamerInactive(void); -#endif +#if DEBUG +void Debug_CreateRoamer(void); +void Debug_GetRoamerLocation(u8 *); +#endif // DEBUG + +#endif // GUARD_ROAMER_H diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 1910b7cb2..7215e7fb3 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -10,24 +10,24 @@ struct Struct_sub_8078914 {      u8 field_8;  }; -u8 GetBankPosition(u8, u8); +u8 GetBattlerSpriteCoord(u8, u8);  u8 sub_8077E44(u8 slot, u16 species, u8 a3); -u8 GetAnimBankSpriteId(u8 bank); +u8 GetAnimBattlerSpriteId(u8 bank);  void StoreSpriteCallbackInData(struct Sprite *sprite, void(*callback)(struct Sprite *));  void sub_8078314(struct Sprite *sprite);  void TranslateSpriteOverDuration(struct Sprite *sprite);  void TranslateMonBGUntil(struct Sprite *sprite);  void TranslateMonBGSubPixelUntil(struct Sprite *sprite); -u8 GetBankSide(u8); -u8 GetBankSide(u8); -u8 GetBankSide(u8 side); -u8 GetBankSide(u8 slot); -u8 GetBankSide(u8); -u8 GetBankIdentity(u8); -u8 GetBankIdentity(u8 slot); -u8 GetBankByIdentity(u8); -u8 GetBankByIdentity(u8); -u8 GetBankByIdentity(u8 state); +u8 GetBattlerSide(u8); +u8 GetBattlerSide(u8); +u8 GetBattlerSide(u8 side); +u8 GetBattlerSide(u8 slot); +u8 GetBattlerSide(u8); +u8 GetBattlerPosition(u8); +u8 GetBattlerPosition(u8 slot); +u8 GetBattlerAtPosition(u8); +u8 GetBattlerAtPosition(u8); +u8 GetBattlerAtPosition(u8 state);  bool8 IsBankSpritePresent(u8);  bool8 IsDoubleBattle();  u8 IsDoubleBattle(void); @@ -58,7 +58,7 @@ void sub_8079C08(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a  u8 sub_8079C74(struct Task *task);  void sub_8079E24();  u8 sub_8079E90(u8 slot); -u8 GetBankIdentity_permutated(u8 slot); +u8 GetBattlerPosition_permutated(u8 slot);  void sub_807A784(u8 taskId);  void sub_807A850(struct Task *task, u8 taskId);  void sub_807A8D4(struct Sprite *sprite); diff --git a/include/secret_base.h b/include/secret_base.h index a3fa22c05..450850155 100644 --- a/include/secret_base.h +++ b/include/secret_base.h @@ -20,5 +20,9 @@ u8 sub_80BCCA4(u8 secretBaseIndex);  const u8 *GetSecretBaseTrainerLoseText(void);  void sub_80BCF1C(u8 taskId);  void sub_80BD674(void *playerRecords, u32 size, u8 c); +#if DEBUG +void unref_sub_80BCD7C(u8 secretBaseIndex); +u8 *sub_80BC190(u8 *dest, u8 arg1); +#endif  #endif // GUARD_SECRET_BASE_H diff --git a/include/strings.h b/include/strings.h index 91c5c5344..240e212ac 100644 --- a/include/strings.h +++ b/include/strings.h @@ -165,6 +165,7 @@ extern const u8 gOtherText_None[];  extern const u8 gOtherText_ThreeQuestions2[];  extern const u8 gOtherText_FiveQuestions[]; +extern const u8 gOtherText_Slash[];  extern const u8 gOtherText_OneDash[];  extern const u8 gOtherText_TwoDashes[]; @@ -250,6 +251,7 @@ extern const u8 gContestStatsText_Dry[];  extern const u8 gContestStatsText_Sweet[];  extern const u8 gContestStatsText_Bitter[];  extern const u8 gContestStatsText_Sour[]; +extern const u8 gContestStatsText_Tasty[];  extern const u8 gContestStatsText_StowCase[];  extern const u8 gContestStatsText_ThrowAwayPrompt[]; diff --git a/include/wild_encounter.h b/include/wild_encounter.h index c9d7c3fa1..41ca31835 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -35,5 +35,10 @@ void FishingWildEncounter(u8 rod);  u16 GetLocalWildMon(bool8 *isWaterMon);  u16 GetLocalWaterMon(void);  bool8 UpdateRepelCounter(void); +#if DEBUG +u16 FeebasDebug_GetTrueNumberOfWaterTilesInMapThird(u8 arg0); +void FeebasSeedRng(u16 seed); +u16 FeebasRandom(void); +#endif // DEBUG  #endif // GUARD_WILD_ENCOUNTER_H | 
