Merge branch 'master' of https://github.com/pret/pokefirered
This commit is contained in:
+223
-243
@@ -2,15 +2,14 @@
|
||||
#define GUARD_BATTLE_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
// should they be included here or included individually by every file?
|
||||
#include "constants/battle.h"
|
||||
#include "battle_util.h"
|
||||
#include "battle_script_commands.h"
|
||||
#include "battle_2.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_ai_switch_items.h"
|
||||
#include "battle_gfx_sfx_util.h"
|
||||
#include "battle_util2.h"
|
||||
#include "battle_bg.h"
|
||||
|
||||
/*
|
||||
Banks are a name given to what could be called a 'battlerId' or 'monControllerId'.
|
||||
@@ -19,8 +18,6 @@
|
||||
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
|
||||
@@ -29,9 +26,9 @@
|
||||
#define SIDE_PLAYER 0x0
|
||||
#define SIDE_OPPONENT 0x1
|
||||
|
||||
#define GET_BANK_IDENTITY(bank)((gBanksByIdentity[bank]))
|
||||
#define GET_BANK_SIDE(bank)((GetBattlerPosition(bank) & BIT_SIDE))
|
||||
#define GET_BANK_SIDE2(bank)((GET_BANK_IDENTITY(bank) & BIT_SIDE))
|
||||
#define GET_BATTLER_POSITION(battler)((gBattlerPositions[battler]))
|
||||
#define GET_BATTLER_SIDE(battler)((GetBattlerPosition(battler) & BIT_SIDE))
|
||||
#define GET_BATTLER_SIDE2(battler)((GET_BATTLER_POSITION(battler) & BIT_SIDE))
|
||||
|
||||
#define TRAINER_OPPONENT_3FE 0x3FE
|
||||
#define TRAINER_OPPONENT_C00 0xC00
|
||||
@@ -73,21 +70,22 @@
|
||||
#define SIDE_STATUS_MIST (1 << 8)
|
||||
#define SIDE_STATUS_SPIKES_DAMAGED (1 << 9)
|
||||
|
||||
#define ACTION_USE_MOVE 0
|
||||
#define ACTION_USE_ITEM 1
|
||||
#define ACTION_SWITCH 2
|
||||
#define ACTION_RUN 3
|
||||
#define ACTION_WATCHES_CAREFULLY 4
|
||||
#define ACTION_SAFARI_ZONE_BALL 5
|
||||
#define ACTION_POKEBLOCK_CASE 6
|
||||
#define ACTION_GO_NEAR 7
|
||||
#define ACTION_SAFARI_ZONE_RUN 8
|
||||
#define ACTION_9 9
|
||||
#define ACTION_RUN_BATTLESCRIPT 10 // when executing an action
|
||||
#define ACTION_CANCEL_PARTNER 12 // when choosing an action
|
||||
#define ACTION_FINISHED 12 // when executing an action
|
||||
#define ACTION_NOTHING_FAINTED 13 // when choosing an action
|
||||
#define ACTION_INIT_VALUE 0xFF
|
||||
#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
|
||||
#define B_ACTION_9 9
|
||||
#define B_ACTION_EXEC_SCRIPT 10
|
||||
#define B_ACTION_TRY_FINISH 11
|
||||
#define B_ACTION_FINISHED 12
|
||||
#define B_ACTION_CANCEL_PARTNER 12 // when choosing an action
|
||||
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
||||
#define B_ACTION_NONE 0xFF
|
||||
|
||||
#define MOVESTATUS_MISSED (1 << 0)
|
||||
#define MOVESTATUS_SUPEREFFECTIVE (1 << 1)
|
||||
@@ -150,19 +148,6 @@
|
||||
#define TYPE_FORESIGHT 0xFE
|
||||
#define TYPE_ENDTABLE 0xFF
|
||||
|
||||
#define BS_GET_TARGET 0
|
||||
#define BS_GET_ATTACKER 1
|
||||
#define BS_GET_EFFECT_BANK 2
|
||||
#define BS_GET_gBank1 3
|
||||
#define BS_GET_BANK_0 7
|
||||
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update
|
||||
#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability
|
||||
#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
|
||||
#define BS_GET_SCRIPTING_BANK 10
|
||||
#define BS_GET_OPPONENT1 12
|
||||
#define BS_GET_PLAYER2 13
|
||||
#define BS_GET_OPPONENT2 14
|
||||
|
||||
// for battle script commands
|
||||
#define CMP_EQUAL 0x0
|
||||
#define CMP_NOT_EQUAL 0x1
|
||||
@@ -178,9 +163,6 @@ struct TrainerMonNoItemDefaultMoves
|
||||
u16 species;
|
||||
};
|
||||
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
|
||||
u8 GetBattlerSide(u8 bank);
|
||||
|
||||
struct TrainerMonItemDefaultMoves
|
||||
{
|
||||
u16 iv;
|
||||
@@ -208,10 +190,10 @@ struct TrainerMonItemCustomMoves
|
||||
|
||||
union TrainerMonPtr
|
||||
{
|
||||
struct TrainerMonNoItemDefaultMoves* NoItemDefaultMoves;
|
||||
struct TrainerMonNoItemCustomMoves* NoItemCustomMoves;
|
||||
struct TrainerMonItemDefaultMoves* ItemDefaultMoves;
|
||||
struct TrainerMonItemCustomMoves* ItemCustomMoves;
|
||||
struct TrainerMonNoItemDefaultMoves *NoItemDefaultMoves;
|
||||
struct TrainerMonNoItemCustomMoves *NoItemCustomMoves;
|
||||
struct TrainerMonItemDefaultMoves *ItemDefaultMoves;
|
||||
struct TrainerMonItemCustomMoves *ItemCustomMoves;
|
||||
};
|
||||
|
||||
struct Trainer
|
||||
@@ -235,12 +217,12 @@ extern const struct Trainer gTrainers[];
|
||||
|
||||
#define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F))
|
||||
|
||||
struct UnknownFlags
|
||||
struct ResourceFlags
|
||||
{
|
||||
u32 flags[4];
|
||||
};
|
||||
|
||||
#define UNKNOWN_FLAG_FLASH_FIRE 1
|
||||
#define RESOURCE_FLAG_FLASH_FIRE 1
|
||||
|
||||
struct DisableStruct
|
||||
{
|
||||
@@ -250,41 +232,41 @@ struct DisableStruct
|
||||
/*0x08*/ u8 protectUses;
|
||||
/*0x09*/ u8 stockpileCounter;
|
||||
/*0x0A*/ u8 substituteHP;
|
||||
/*0x0B*/ u8 disableTimer1 : 4;
|
||||
/*0x0B*/ u8 disableTimer2 : 4;
|
||||
/*0x0B*/ u8 disableTimer : 4;
|
||||
/*0x0B*/ u8 disableTimerStartValue : 4;
|
||||
/*0x0C*/ u8 encoredMovePos;
|
||||
/*0x0D*/ u8 unkD;
|
||||
/*0x0E*/ u8 encoreTimer1 : 4;
|
||||
/*0x0E*/ u8 encoreTimer2 : 4;
|
||||
/*0x0F*/ u8 perishSongTimer1 : 4;
|
||||
/*0x0F*/ u8 perishSongTimer2 : 4;
|
||||
/*0x0E*/ u8 encoreTimer : 4;
|
||||
/*0x0E*/ u8 encoreTimerStartValue : 4;
|
||||
/*0x0F*/ u8 perishSongTimer : 4;
|
||||
/*0x0F*/ u8 perishSongTimerStartValue : 4;
|
||||
/*0x10*/ u8 furyCutterCounter;
|
||||
/*0x11*/ u8 rolloutCounter1 : 4;
|
||||
/*0x11*/ u8 rolloutCounter2 : 4;
|
||||
/*0x12*/ u8 chargeTimer1 : 4;
|
||||
/*0x12*/ u8 chargeTimer2 : 4;
|
||||
/*0x13*/ u8 tauntTimer1:4;
|
||||
/*0x11*/ u8 rolloutTimer : 4;
|
||||
/*0x11*/ u8 rolloutTimerStartValue : 4;
|
||||
/*0x12*/ u8 chargeTimer : 4;
|
||||
/*0x12*/ u8 chargeTimerStartValue : 4;
|
||||
/*0x13*/ u8 tauntTimer:4;
|
||||
/*0x13*/ u8 tauntTimer2:4;
|
||||
/*0x14*/ u8 bankPreventingEscape;
|
||||
/*0x15*/ u8 bankWithSureHit;
|
||||
/*0x14*/ u8 battlerPreventingEscape;
|
||||
/*0x15*/ u8 battlerWithSureHit;
|
||||
/*0x16*/ u8 isFirstTurn;
|
||||
/*0x17*/ u8 unk17;
|
||||
/*0x18*/ u8 truantCounter : 1;
|
||||
/*0x18*/ u8 truantUnknownBit : 1;
|
||||
/*0x18*/ u8 truantSwitchInHack : 1; // unused?
|
||||
/*0x18*/ u8 unk18_a_2 : 2;
|
||||
/*0x18*/ u8 unk18_b : 4;
|
||||
/*0x19*/ u8 rechargeCounter;
|
||||
/*0x18*/ u8 mimickedMoves : 4;
|
||||
/*0x19*/ u8 rechargeTimer;
|
||||
/*0x1A*/ u8 unk1A[2];
|
||||
};
|
||||
|
||||
extern struct DisableStruct gDisableStructs[BATTLE_BANKS_COUNT];
|
||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||
|
||||
struct ProtectStruct
|
||||
{
|
||||
/* field_0 */
|
||||
u32 protected:1;
|
||||
u32 endured:1;
|
||||
u32 onlyStruggle:1;
|
||||
u32 noValidMoves:1;
|
||||
u32 helpingHand:1;
|
||||
u32 bounceMove:1;
|
||||
u32 stealMove:1;
|
||||
@@ -295,7 +277,7 @@ struct ProtectStruct
|
||||
u32 targetNotAffected:1;
|
||||
u32 chargingTurn:1;
|
||||
u32 fleeFlag:2; // for RunAway and Smoke Ball
|
||||
u32 usedImprisionedMove:1;
|
||||
u32 usedImprisonedMove:1;
|
||||
u32 loveImmobility:1;
|
||||
u32 usedDisabledMove:1;
|
||||
/* field_2 */
|
||||
@@ -312,45 +294,45 @@ struct ProtectStruct
|
||||
|
||||
/* field_4 */ u32 physicalDmg;
|
||||
/* field_8 */ u32 specialDmg;
|
||||
/* field_C */ u8 physicalBank;
|
||||
/* field_D */ u8 specialBank;
|
||||
/* field_C */ u8 physicalBattlerId;
|
||||
/* field_D */ u8 specialBattlerId;
|
||||
/* field_E */ u16 fieldE;
|
||||
};
|
||||
|
||||
extern struct ProtectStruct gProtectStructs[BATTLE_BANKS_COUNT];
|
||||
extern struct ProtectStruct gProtectStructs[MAX_BATTLERS_COUNT];
|
||||
|
||||
struct SpecialStatus
|
||||
{
|
||||
u8 statLowered : 1; // 0x1
|
||||
u8 lightningRodRedirected : 1; // 0x2
|
||||
u8 restoredBankSprite: 1; // 0x4
|
||||
u8 intimidatedPoke : 1; // 0x8
|
||||
u8 restoredBattlerSprite: 1; // 0x4
|
||||
u8 intimidatedMon : 1; // 0x8
|
||||
u8 traced : 1; // 0x10
|
||||
u8 flag20 : 1;
|
||||
u8 ppNotAffectedByPressure : 1;
|
||||
u8 flag40 : 1;
|
||||
u8 focusBanded : 1;
|
||||
u8 field1[3];
|
||||
s32 moveturnLostHP;
|
||||
s32 moveturnLostHP_physical;
|
||||
s32 moveturnLostHP_special;
|
||||
u8 moveturnPhysicalBank;
|
||||
u8 moveturnSpecialBank;
|
||||
s32 dmg;
|
||||
s32 physicalDmg;
|
||||
s32 specialDmg;
|
||||
u8 physicalBattlerId;
|
||||
u8 specialBattlerId;
|
||||
u8 field12;
|
||||
u8 field13;
|
||||
};
|
||||
|
||||
extern struct SpecialStatus gSpecialStatuses[BATTLE_BANKS_COUNT];
|
||||
extern struct SpecialStatus gSpecialStatuses[MAX_BATTLERS_COUNT];
|
||||
|
||||
struct SideTimer
|
||||
{
|
||||
/*0x00*/ u8 reflectTimer;
|
||||
/*0x01*/ u8 reflectBank;
|
||||
/*0x01*/ u8 reflectBattlerId;
|
||||
/*0x02*/ u8 lightscreenTimer;
|
||||
/*0x03*/ u8 lightscreenBank;
|
||||
/*0x03*/ u8 lightscreenBattlerId;
|
||||
/*0x04*/ u8 mistTimer;
|
||||
/*0x05*/ u8 mistBank;
|
||||
/*0x05*/ u8 mistBattlerId;
|
||||
/*0x06*/ u8 safeguardTimer;
|
||||
/*0x07*/ u8 safeguardBank;
|
||||
/*0x07*/ u8 safeguardBattlerId;
|
||||
/*0x08*/ u8 followmeTimer;
|
||||
/*0x09*/ u8 followmeTarget;
|
||||
/*0x0A*/ u8 spikesAmount;
|
||||
@@ -361,14 +343,14 @@ extern struct SideTimer gSideTimers[];
|
||||
|
||||
struct WishFutureKnock
|
||||
{
|
||||
u8 futureSightCounter[BATTLE_BANKS_COUNT];
|
||||
u8 futureSightAttacker[BATTLE_BANKS_COUNT];
|
||||
s32 futureSightDmg[BATTLE_BANKS_COUNT];
|
||||
u16 futureSightMove[BATTLE_BANKS_COUNT];
|
||||
u8 wishCounter[BATTLE_BANKS_COUNT];
|
||||
u8 wishUserID[BATTLE_BANKS_COUNT];
|
||||
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 wishMonId[MAX_BATTLERS_COUNT];
|
||||
u8 weatherDuration;
|
||||
u8 knockedOffPokes[2];
|
||||
u8 knockedOffMons[2];
|
||||
};
|
||||
|
||||
extern struct WishFutureKnock gWishFutureKnock;
|
||||
@@ -391,10 +373,6 @@ extern u8 gActiveBattler;
|
||||
extern u8 gBattlerTarget;
|
||||
extern u8 gAbsentBattlerFlags;
|
||||
|
||||
// TODO: move these to constants/battle.h
|
||||
#define MAX_BATTLERS_COUNT 4
|
||||
#define BIT_FLANK 2
|
||||
|
||||
// script's table id to bit
|
||||
#define AI_SCRIPT_CHECK_BAD_MOVE (1 << 0)
|
||||
#define AI_SCRIPT_TRY_TO_FAINT (1 << 1)
|
||||
@@ -413,6 +391,12 @@ extern u8 gAbsentBattlerFlags;
|
||||
|
||||
extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT];
|
||||
|
||||
struct UsedMoves
|
||||
{
|
||||
u16 moves[MAX_BATTLERS_COUNT];
|
||||
u16 unknown[MAX_BATTLERS_COUNT];
|
||||
};
|
||||
|
||||
struct BattleHistory
|
||||
{
|
||||
/*0x00*/ u16 usedMoves[2][8]; // 0xFFFF means move not used (confuse self hit, etc)
|
||||
@@ -436,27 +420,22 @@ struct BattleCallbacksStack
|
||||
|
||||
struct StatsArray
|
||||
{
|
||||
u16 hp;
|
||||
u16 atk;
|
||||
u16 def;
|
||||
u16 spd;
|
||||
u16 spAtk;
|
||||
u16 spDef;
|
||||
u16 stats[NUM_STATS];
|
||||
};
|
||||
|
||||
struct BattleResources
|
||||
{
|
||||
struct SecretBaseRecord* secretBase;
|
||||
struct UnknownFlags *flags;
|
||||
struct BattleScriptsStack* battleScriptsStack;
|
||||
struct BattleCallbacksStack* battleCallbackStack;
|
||||
struct StatsArray* statsBeforeLvlUp;
|
||||
struct SecretBaseRecord *secretBase;
|
||||
struct ResourceFlags *flags;
|
||||
struct BattleScriptsStack *battleScriptsStack;
|
||||
struct BattleCallbacksStack *battleCallbackStack;
|
||||
struct StatsArray *beforeLvlUp;
|
||||
struct AI_ThinkingStruct *ai;
|
||||
struct BattleHistory *battleHistory;
|
||||
struct BattleScriptsStack *AI_ScriptsStack;
|
||||
};
|
||||
|
||||
extern struct BattleResources* gBattleResources;
|
||||
extern struct BattleResources *gBattleResources;
|
||||
|
||||
#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack)
|
||||
#define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack)
|
||||
@@ -467,18 +446,18 @@ struct BattleResults
|
||||
u8 playerFaintCounter; // 0x0
|
||||
u8 opponentFaintCounter; // 0x1
|
||||
u8 playerSwitchesCounter; // 0x2
|
||||
u8 unk3; // 0x3
|
||||
u8 unk4; // 0x4
|
||||
u8 unk5_0:1; // 0x5
|
||||
u8 numHealingItemsUsed; // 0x3
|
||||
u8 numRevivesUsed; // 0x4
|
||||
u8 playerMonWasDamaged:1; // 0x5
|
||||
u8 usedMasterBall:1; // 0x5
|
||||
u8 caughtMonBall:4; // 0x5
|
||||
u8 unk5_6:1; // 0x5
|
||||
u8 shinyWildMon:1; // 0x5
|
||||
u8 unk5_7:1; // 0x5
|
||||
u16 playerMon1Species; // 0x6
|
||||
u8 playerMon1Name[11]; // 0x8
|
||||
u8 battleTurnCounter; // 0x13
|
||||
u8 playerMon2Name[11]; // 0x14
|
||||
u8 field_1F; // 0x1F
|
||||
u8 pokeblockThrows; // 0x1F
|
||||
u16 lastOpponentSpecies; // 0x20
|
||||
u16 lastUsedMovePlayer; // 0x22
|
||||
u16 lastUsedMoveOpponent; // 0x24
|
||||
@@ -494,39 +473,31 @@ extern struct BattleResults gBattleResults;
|
||||
struct BattleStruct
|
||||
{
|
||||
u8 turnEffectsTracker;
|
||||
u8 turnEffectsBank;
|
||||
u8 turnEffectsBattlerId;
|
||||
u8 filler2;
|
||||
u8 turncountersTracker;
|
||||
u8 wrappedMove[8]; // ask gamefreak why they declared it that way
|
||||
u8 moveTarget[4];
|
||||
u8 expGetterId;
|
||||
u8 turnCountersTracker;
|
||||
u8 wrappedMove[MAX_BATTLERS_COUNT * 2]; // Leftover from Ruby's ewram access.
|
||||
u8 moveTarget[MAX_BATTLERS_COUNT];
|
||||
u8 expGetterMonId;
|
||||
u8 field_11;
|
||||
u8 wildVictorySong;
|
||||
u8 dynamicMoveType;
|
||||
u8 wrappedBy[4];
|
||||
u16 assistPossibleMoves[5 * 4]; // 5 mons, each of them knowing 4 moves
|
||||
u8 field_40;
|
||||
u8 field_41;
|
||||
u8 field_42;
|
||||
u8 field_43;
|
||||
u8 field_44;
|
||||
u8 field_45;
|
||||
u8 field_46;
|
||||
u8 field_47;
|
||||
u8 focusPunchBank;
|
||||
u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // 6 mons, each of them knowing 4 moves
|
||||
u8 focusPunchBattlerId;
|
||||
u8 battlerPreventingSwitchout;
|
||||
u8 moneyMultiplier;
|
||||
u8 savedTurnActionNumber;
|
||||
u8 switchInAbilitiesCounter;
|
||||
u8 faintedActionsState;
|
||||
u8 faintedActionsBank;
|
||||
u8 faintedActionsBattlerId;
|
||||
u8 field_4F;
|
||||
u16 expValue;
|
||||
u8 field_52;
|
||||
u8 sentInPokes;
|
||||
bool8 selectionScriptFinished[BATTLE_BANKS_COUNT];
|
||||
bool8 selectionScriptFinished[MAX_BATTLERS_COUNT];
|
||||
u8 field_58[4];
|
||||
u8 monToSwitchIntoId[BATTLE_BANKS_COUNT];
|
||||
u8 monToSwitchIntoId[MAX_BATTLERS_COUNT];
|
||||
u8 field_60[4][3];
|
||||
u8 runTries;
|
||||
u8 caughtMonNick[11];
|
||||
@@ -535,11 +506,11 @@ struct BattleStruct
|
||||
u8 safariPkblThrowCounter;
|
||||
u8 safariEscapeFactor;
|
||||
u8 safariCatchFactor;
|
||||
u8 field_7D;
|
||||
u8 field_7E;
|
||||
u8 linkBattleVsSpriteId_V;
|
||||
u8 linkBattleVsSpriteId_S;
|
||||
u8 formToChangeInto;
|
||||
u8 chosenMovePositions[BATTLE_BANKS_COUNT];
|
||||
u8 stateIdAfterSelScript[BATTLE_BANKS_COUNT];
|
||||
u8 chosenMovePositions[MAX_BATTLERS_COUNT];
|
||||
u8 stateIdAfterSelScript[MAX_BATTLERS_COUNT];
|
||||
u8 field_88;
|
||||
u8 field_89;
|
||||
u8 field_8A;
|
||||
@@ -547,69 +518,48 @@ struct BattleStruct
|
||||
u8 field_8C;
|
||||
u8 field_8D;
|
||||
u8 stringMoveType;
|
||||
u8 expGetterBank;
|
||||
u8 expGetterBattlerId;
|
||||
u8 field_90;
|
||||
u8 field_91;
|
||||
u8 field_92;
|
||||
u8 field_93;
|
||||
u8 wallyBattleState;
|
||||
u8 wallyMovesState;
|
||||
u8 wallyWaitFrames;
|
||||
u8 wallyMoveFrames;
|
||||
u8 mirrorMoves[8]; // ask gamefreak why they declared it that way
|
||||
u8 field_A0;
|
||||
u8 field_A1;
|
||||
u8 field_A2;
|
||||
u8 field_A3;
|
||||
u8 field_A4;
|
||||
u8 field_A5;
|
||||
u8 field_A6;
|
||||
u8 field_A7;
|
||||
u8 AI_monToSwitchIntoId[MAX_BATTLERS_COUNT];
|
||||
u8 field_96;
|
||||
u8 field_97;
|
||||
u8 lastTakenMove[MAX_BATTLERS_COUNT * 2 * 2]; // ask gamefreak why they declared it that way
|
||||
u16 hpOnSwitchout[2];
|
||||
u32 savedBattleTypeFlags;
|
||||
u8 abilityPreventingSwitchout;
|
||||
u8 hpScale;
|
||||
u8 synchronizeMoveEffect;
|
||||
u8 field_AE;
|
||||
u8 field_AF;
|
||||
u8 field_B0;
|
||||
u8 field_B1;
|
||||
u8 field_B2;
|
||||
u8 field_B3;
|
||||
u8 field_B4;
|
||||
u8 synchronizeMoveEffect;
|
||||
u8 field_B5;
|
||||
u8 field_B6;
|
||||
u8 field_B7;
|
||||
// void (*savedCallback)(void);
|
||||
u16 usedHeldItems[BATTLE_BANKS_COUNT];
|
||||
u8 atkCancellerTracker;
|
||||
u16 usedHeldItems[MAX_BATTLERS_COUNT];
|
||||
u8 chosenItem[4]; // why is this an u8?
|
||||
u8 AI_itemType[2];
|
||||
u8 AI_itemFlags[2];
|
||||
u16 choicedMove[BATTLE_BANKS_COUNT];
|
||||
u16 changedItems[BATTLE_BANKS_COUNT];
|
||||
u8 intimidateBank;
|
||||
u16 choicedMove[MAX_BATTLERS_COUNT];
|
||||
u16 changedItems[MAX_BATTLERS_COUNT];
|
||||
u8 intimidateBattler;
|
||||
u8 switchInItemsCounter;
|
||||
u8 field_DA;
|
||||
u8 arenaTurnCounter; // not used in FR?
|
||||
u8 turnSideTracker;
|
||||
u8 fillerDC[0xDF-0xDC];
|
||||
u8 field_DF;
|
||||
u8 mirrorMoveArrays[32];
|
||||
u16 castformPalette[BATTLE_BANKS_COUNT][16];
|
||||
u8 field_180;
|
||||
u8 field_181;
|
||||
u8 givenExpMons;
|
||||
u8 lastTakenMoveFrom[MAX_BATTLERS_COUNT * MAX_BATTLERS_COUNT * 2];
|
||||
u16 castformPalette[MAX_BATTLERS_COUNT][16];
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBattlerId;
|
||||
u8 field_182;
|
||||
u8 field_183;
|
||||
struct BattleEnigmaBerry battleEnigmaBerry;
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBank;
|
||||
bool8 overworldWeatherDone;
|
||||
u8 atkCancellerTracker;
|
||||
u8 field_1A4[96];
|
||||
u8 field_204[104];
|
||||
u8 field_26C[40];
|
||||
u8 AI_monToSwitchIntoId[BATTLE_BANKS_COUNT];
|
||||
u8 field_298[8];
|
||||
u8 field_2A0;
|
||||
u8 field_2A1;
|
||||
u8 field_2A2;
|
||||
};
|
||||
u8 field_184[124]; // currently unknown
|
||||
}; // size == 0x200 bytes
|
||||
|
||||
extern struct BattleStruct* gBattleStruct;
|
||||
extern struct BattleStruct *gBattleStruct;
|
||||
|
||||
#define GET_MOVE_TYPE(move, typeArg) \
|
||||
{ \
|
||||
@@ -621,6 +571,13 @@ extern struct BattleStruct* gBattleStruct;
|
||||
|
||||
#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].type1 == type || gBattleMons[battlerId].type2 == type))
|
||||
#define SET_BATTLER_TYPE(battlerId, type) \
|
||||
{ \
|
||||
gBattleMons[battlerId].type1 = type; \
|
||||
gBattleMons[battlerId].type2 = type; \
|
||||
}
|
||||
|
||||
#define MOVE_EFFECT_SLEEP 0x1
|
||||
#define MOVE_EFFECT_POISON 0x2
|
||||
@@ -688,53 +645,8 @@ extern struct BattleStruct* gBattleStruct;
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x40
|
||||
#define MOVE_EFFECT_CERTAIN 0x80
|
||||
|
||||
// table ids for general animations
|
||||
#define B_ANIM_CASTFORM_CHANGE 0x0
|
||||
#define B_ANIM_STATS_CHANGE 0x1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 0x2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
|
||||
#define B_ANIM_x4 0x4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 0x5
|
||||
#define B_ANIM_TURN_TRAP 0x6
|
||||
#define B_ANIM_ITEM_EFFECT 0x7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 0x8
|
||||
#define B_ANIM_HANGED_ON 0x9
|
||||
#define B_ANIM_RAIN_CONTINUES 0xA
|
||||
#define B_ANIM_SUN_CONTINUES 0xB
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 0xC
|
||||
#define B_ANIM_HAIL_CONTINUES 0xD
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 0xE
|
||||
#define B_ANIM_MON_HIT 0xF
|
||||
#define B_ANIM_ITEM_STEAL 0x10
|
||||
#define B_ANIM_SNATCH_MOVE 0x11
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 0x13
|
||||
#define B_ANIM_x14 0x14
|
||||
#define B_ANIM_INGRAIN_HEAL 0x15
|
||||
#define B_ANIM_WISH_HEAL 0x16
|
||||
|
||||
// special animations table
|
||||
#define B_ANIM_LVL_UP 0x0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
|
||||
#define B_ANIM_BALL_THROW 0x3
|
||||
#define B_ANIM_SAFARI_BALL_THROW 0x4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 0x5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 0x6
|
||||
|
||||
// status animation table
|
||||
#define B_ANIM_STATUS_PSN 0x0
|
||||
#define B_ANIM_STATUS_CONFUSION 0x1
|
||||
#define B_ANIM_STATUS_BRN 0x2
|
||||
#define B_ANIM_STATUS_INFATUATION 0x3
|
||||
#define B_ANIM_STATUS_SLP 0x4
|
||||
#define B_ANIM_STATUS_PRZ 0x5
|
||||
#define B_ANIM_STATUS_FRZ 0x6
|
||||
#define B_ANIM_STATUS_CURSED 0x7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 0x8
|
||||
#define B_ANIM_STATUS_WRAPPED 0x9
|
||||
|
||||
#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
|
||||
|
||||
@@ -779,13 +691,13 @@ struct BattleScripting
|
||||
u8 animArg2;
|
||||
u16 tripleKickPower;
|
||||
u8 atk49_state;
|
||||
u8 bankWithAbility;
|
||||
u8 battlerWithAbility;
|
||||
u8 multihitMoveEffect;
|
||||
u8 bank;
|
||||
u8 battler;
|
||||
u8 animTurn;
|
||||
u8 animTargetsHit;
|
||||
u8 statChanger;
|
||||
u8 field_1B;
|
||||
bool8 statAnimPlayed;
|
||||
u8 atk23_state;
|
||||
u8 battleStyle;
|
||||
u8 atk6C_state;
|
||||
@@ -794,12 +706,8 @@ struct BattleScripting
|
||||
u8 reshowMainState;
|
||||
u8 reshowHelperState;
|
||||
u8 field_23;
|
||||
u8 field_24;
|
||||
u8 multiplayerId;
|
||||
};
|
||||
|
||||
extern struct BattleScripting gBattleScripting;
|
||||
|
||||
// functions
|
||||
|
||||
// battle_1
|
||||
@@ -809,6 +717,7 @@ void ApplyPlayerChosenFrameToBattleMenu(void);
|
||||
bool8 LoadChosenBattleElement(u8 caseId);
|
||||
void DrawMainBattleBackground(void);
|
||||
void task00_0800F6FC(u8 taskId);
|
||||
void sub_800F324(void);
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -863,24 +772,23 @@ struct BattleAnimationInfo
|
||||
|
||||
struct BattleHealthboxInfo
|
||||
{
|
||||
u8 flag_x1 : 1;
|
||||
u8 flag_x2 : 1;
|
||||
u8 flag_x4 : 1;
|
||||
u8 partyStatusSummaryShown : 1;
|
||||
u8 healthboxIsBouncing : 1;
|
||||
u8 battlerIsBouncing : 1;
|
||||
u8 ballAnimActive : 1; // 0x8
|
||||
u8 statusAnimActive : 1; // x10
|
||||
u8 animFromTableActive : 1; // x20
|
||||
u8 specialAnimActive : 1; //x40
|
||||
u8 flag_x80 : 1;
|
||||
u8 field_1_x1 : 1;
|
||||
u8 field_1_x1E : 4;
|
||||
u8 field_1_x20 : 1;
|
||||
u8 field_1_x1E : 5;
|
||||
u8 field_1_x40 : 1;
|
||||
u8 field_1_x80 : 1;
|
||||
u8 field_2;
|
||||
u8 field_3;
|
||||
u8 healthboxBounceSpriteId;
|
||||
u8 battlerBounceSpriteId;
|
||||
u8 animationState;
|
||||
u8 field_5;
|
||||
u8 field_6;
|
||||
u8 matrixNum;
|
||||
u8 shadowSpriteId;
|
||||
u8 field_8;
|
||||
u8 field_9;
|
||||
@@ -892,14 +800,14 @@ struct BattleBarInfo
|
||||
{
|
||||
u8 healthboxSpriteId;
|
||||
s32 maxValue;
|
||||
s32 currentValue;
|
||||
s32 oldValue;
|
||||
s32 receivedValue;
|
||||
s32 field_10;
|
||||
s32 currValue;
|
||||
};
|
||||
|
||||
struct BattleSpriteData
|
||||
{
|
||||
struct BattleSpriteInfo *bankData;
|
||||
struct BattleSpriteInfo *battlerData;
|
||||
struct BattleHealthboxInfo *healthBoxesData;
|
||||
struct BattleAnimationInfo *animationData;
|
||||
struct BattleBarInfo *battleBars;
|
||||
@@ -931,16 +839,30 @@ struct MonSpritesGfx
|
||||
void *field_17C;
|
||||
};
|
||||
|
||||
extern struct BattleSpritesGfx* gMonSpritesGfx;
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
extern u16 gBattle_WIN0H;
|
||||
extern u16 gBattle_WIN0V;
|
||||
extern u16 gBattle_WIN1H;
|
||||
extern u16 gBattle_WIN1V;
|
||||
extern struct BattleSpritesGfx *gMonSpritesGfx;
|
||||
extern u8 gBattleOutcome;
|
||||
extern u16 gLastUsedItem;
|
||||
extern u32 gBattleTypeFlags;
|
||||
extern struct MonSpritesGfx* gMonSpritesGfxPtr;
|
||||
extern struct MonSpritesGfx *gMonSpritesGfxPtr;
|
||||
extern u16 gTrainerBattleOpponent_A;
|
||||
extern u16 gMoveToLearn;
|
||||
extern u16 gBattleMovePower;
|
||||
extern struct BattleEnigmaBerry gEnigmaBerries[MAX_BATTLERS_COUNT];
|
||||
extern u16 gCurrentMove;
|
||||
extern u16 gChosenMove;
|
||||
extern u16 gCalledMove;
|
||||
extern u8 gCritMultiplier;
|
||||
extern u16 gBattleWeather;
|
||||
extern u8 gLastUsedAbility;
|
||||
@@ -949,8 +871,66 @@ extern u8 gPotentialItemEffectBattler;
|
||||
extern u8 gBattlersCount;
|
||||
extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT];
|
||||
extern s32 gBattleMoveDamage;
|
||||
|
||||
extern u16 gIntroSlideFlags;
|
||||
extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattlerPositions[MAX_BATTLERS_COUNT];
|
||||
extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattleOutcome;
|
||||
extern u8 gBattleMonForms[MAX_BATTLERS_COUNT];
|
||||
extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void);
|
||||
extern u32 gBattleControllerExecFlags;
|
||||
extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200];
|
||||
extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200];
|
||||
extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT];
|
||||
extern void (*gPreBattleCallback1)(void);
|
||||
extern bool8 gDoingBattleAnim;
|
||||
extern void *gUnknown_3005EE0[];
|
||||
extern u8 *gUnknown_2022BB8;
|
||||
extern u8 *gUnknown_2022BBC;
|
||||
extern void (*gBattleMainFunc)(void);
|
||||
extern u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT];
|
||||
extern u32 gUnknown_2022B54;
|
||||
extern u8 gUnknown_2023DDC;
|
||||
extern u8 gBattlerAttacker;
|
||||
extern u8 gEffectBattler;
|
||||
extern u8 gMultiHitCounter;
|
||||
extern struct BattleScripting gBattleScripting;
|
||||
extern u8 gBattlerFainted;
|
||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
||||
extern u8 gSentPokesToOpponent[2];
|
||||
extern const u8 *gBattlescriptCurrInstr;
|
||||
extern const u8 *gSelectionBattleScripts[MAX_BATTLERS_COUNT];
|
||||
extern u16 gLastMoves[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattlerByTurnOrder[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattleCommunication[BATTLE_COMMUNICATION_ENTRIES_COUNT];
|
||||
extern u16 gSideStatuses[2];
|
||||
extern u32 gHitMarker;
|
||||
extern u16 gChosenMoveByBattler[MAX_BATTLERS_COUNT];
|
||||
extern u8 gMoveResultFlags;
|
||||
extern s32 gTakenDmg[MAX_BATTLERS_COUNT];
|
||||
extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
|
||||
extern u8 gCurrentActionFuncId;
|
||||
extern u8 gCurrMovePos;
|
||||
extern u8 gChosenMovePos;
|
||||
extern u8 gUnknown_3004FFC[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattlerStatusSummaryTaskId[MAX_BATTLERS_COUNT];
|
||||
extern u16 gDynamicBasePower;
|
||||
extern u16 gLastLandedMoves[MAX_BATTLERS_COUNT];
|
||||
extern u8 gLastHitBy[MAX_BATTLERS_COUNT];
|
||||
extern u8 gMultiUsePlayerCursor;
|
||||
extern u8 gNumberOfMovesToChoose;
|
||||
extern u16 gLastHitByType[MAX_BATTLERS_COUNT];
|
||||
extern s32 gHpDealt;
|
||||
extern u16 gPauseCounterBattle;
|
||||
extern u16 gPaydayMoney;
|
||||
extern u16 gLockedMoves[MAX_BATTLERS_COUNT];
|
||||
extern u8 gCurrentTurnActionNumber;
|
||||
extern u16 gExpShareExp;
|
||||
extern u8 gLeveledUpInBattle;
|
||||
extern u16 gLastResultingMoves[MAX_BATTLERS_COUNT];
|
||||
extern u16 gLastPrintedMoves[MAX_BATTLERS_COUNT];
|
||||
extern u8 gActionsByTurnOrder[MAX_BATTLERS_COUNT];
|
||||
extern u8 gChosenActionByBattler[MAX_BATTLERS_COUNT];
|
||||
extern u8 gBattleTerrain;
|
||||
|
||||
#endif // GUARD_BATTLE_H
|
||||
|
||||
@@ -3,15 +3,19 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
extern u8 sBattler_AI;
|
||||
// return values for BattleAI_ChooseMoveOrAction
|
||||
// 0 - 3 are move idx
|
||||
#define AI_CHOICE_FLEE 4
|
||||
#define AI_CHOICE_WATCH 5
|
||||
|
||||
void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves);
|
||||
void BattleAI_SetupAIData(u8 defaultScoreMoves);
|
||||
void BattleAI_HandleItemUseBeforeAISetup(void);
|
||||
void BattleAI_SetupAIData(void);
|
||||
u8 BattleAI_ChooseMoveOrAction(void);
|
||||
void ClearBankMoveHistory(u8 bank);
|
||||
void RecordAbilityBattle(u8 bank, u8 abilityId);
|
||||
void ClearBankAbilityHistory(u8 bank);
|
||||
void RecordItemEffectBattle(u8 bank, u8 itemEffect);
|
||||
void ClearBankItemEffectHistory(u8 bank);
|
||||
u8 BattleAI_ChooseMoveOrAction(void);
|
||||
|
||||
#endif // GUARD_BATTLE_AI_SCRIPT_COMMANDS_H
|
||||
|
||||
+79
-32
@@ -19,28 +19,28 @@ enum
|
||||
{
|
||||
BG_ANIM_SCREEN_SIZE,
|
||||
BG_ANIM_AREA_OVERFLOW_MODE,
|
||||
BG_ANIM2,
|
||||
BG_ANIM3,
|
||||
BG_ANIM_MOSAIC,
|
||||
BG_ANIM_CHAR_BASE_BLOCK,
|
||||
BG_ANIM_PRIORITY,
|
||||
BG_ANIM_5,
|
||||
BG_ANIM_6
|
||||
BG_ANIM_PALETTES_MODE,
|
||||
BG_ANIM_SCREEN_BASE_BLOCK
|
||||
};
|
||||
|
||||
struct UnknownAnimStruct2
|
||||
struct BattleAnimBgData
|
||||
{
|
||||
void *unk0;
|
||||
u16 *unk4;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
u16 unkA;
|
||||
u16 unkC;
|
||||
u8 *bgTiles;
|
||||
u16 *bgTilemap;
|
||||
u8 paletteId;
|
||||
u8 bgId;
|
||||
u16 tilesOffset;
|
||||
u16 unused;
|
||||
};
|
||||
|
||||
struct BattleAnimBackground
|
||||
{
|
||||
void *image;
|
||||
void *palette;
|
||||
void *tilemap;
|
||||
const u32 *image;
|
||||
const u32 *palette;
|
||||
const u32 *tilemap;
|
||||
};
|
||||
|
||||
#define ANIM_ARGS_COUNT 8
|
||||
@@ -53,7 +53,6 @@ extern bool8 gAnimScriptActive;
|
||||
extern u8 gAnimVisualTaskCount;
|
||||
extern u8 gAnimSoundTaskCount;
|
||||
extern struct DisableStruct *gAnimDisableStructPtr;
|
||||
extern u32 gAnimMoveDmg;
|
||||
extern u16 gAnimMovePower;
|
||||
extern u8 gAnimFriendship;
|
||||
extern u16 gWeatherMoveAnim;
|
||||
@@ -64,8 +63,8 @@ extern u8 gBattleAnimTarget;
|
||||
extern u16 gAnimSpeciesByBanks[BATTLE_BANKS_COUNT];
|
||||
extern u8 gUnknown_02038440;
|
||||
extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT];
|
||||
extern u16 gUnknown_2037EEC;
|
||||
extern s32 gUnknown_2037EE8;
|
||||
extern u16 gAnimMovePower;
|
||||
extern s32 gAnimMoveDmg;
|
||||
|
||||
void ClearBattleAnimationVars(void);
|
||||
void DoMoveAnim(u16 move);
|
||||
@@ -80,7 +79,7 @@ s8 BattleAnimAdjustPanning(s8 pan);
|
||||
s8 BattleAnimAdjustPanning2(s8 pan);
|
||||
s16 sub_80A52EC(s16 a);
|
||||
s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan);
|
||||
bool8 sub_8072DF0(u8 battlerId);
|
||||
bool8 IsBattlerSpriteVisible(u8 battlerId);
|
||||
|
||||
// battle_anim_80FE840.s
|
||||
void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value);
|
||||
@@ -92,18 +91,35 @@ void sub_80A6EEC(struct Sprite *sprite);
|
||||
void sub_80A68D4(struct Sprite *sprite);
|
||||
void sub_80A6F3C(struct Sprite *sprite);
|
||||
void sub_80A8278(void);
|
||||
void sub_80A6B30(struct UnknownAnimStruct2*);
|
||||
void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1);
|
||||
void sub_80A6B30(struct BattleAnimBgData *);
|
||||
void sub_80A6B90(struct BattleAnimBgData *, u32 arg1);
|
||||
u8 sub_80A82E4(u8 bank);
|
||||
bool8 AnimateBallThrow(struct Sprite *sprite);
|
||||
|
||||
// battle_anim_special
|
||||
void sub_80F1720(u8 battler, struct Pokemon *mon);
|
||||
|
||||
enum
|
||||
{
|
||||
BANK_X_POS,
|
||||
BANK_Y_POS,
|
||||
BATTLER_COORD_X,
|
||||
BATTLER_COORD_Y,
|
||||
BATTLER_COORD_X_2,
|
||||
BATTLER_COORD_Y_PIC_OFFSET,
|
||||
BATTLER_COORD_Y_PIC_OFFSET_DEFAULT,
|
||||
};
|
||||
|
||||
u8 GetBankPosition(u8 bank, u8 attributeId);
|
||||
enum
|
||||
{
|
||||
BATTLER_COORD_ATTR_HEIGHT,
|
||||
BATTLER_COORD_ATTR_WIDTH,
|
||||
BATTLER_COORD_ATTR_TOP,
|
||||
BATTLER_COORD_ATTR_BOTTOM,
|
||||
BATTLER_COORD_ATTR_LEFT,
|
||||
BATTLER_COORD_ATTR_RIGHT,
|
||||
BATTLER_COORD_ATTR_RAW_BOTTOM,
|
||||
};
|
||||
|
||||
u8 GetBattlerSpriteCoord(u8 bank, u8 attributeId);
|
||||
|
||||
bool8 IsBankSpritePresent(u8 bank);
|
||||
void sub_80A6C68(u8 arg0);
|
||||
@@ -112,12 +128,23 @@ bool8 IsDoubleBattle(void);
|
||||
u8 sub_80A6D94(void);
|
||||
u8 sub_80A8364(u8);
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
||||
void oamt_add_pos2_onto_pos1(struct Sprite *sprite);
|
||||
u8 GetBankSpriteDefault_Y(u8 bank);
|
||||
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
||||
u8 GetBattlerSpriteDefault_Y(u8 bank);
|
||||
u8 sub_80A82E4(u8 bank);
|
||||
u8 GetSubstituteSpriteDefault_Y(u8 bank);
|
||||
u8 GetGhostSpriteDefault_Y(u8 battlerId);
|
||||
void sub_8072E48(u8 battlerId, u8);
|
||||
void sub_8073128(u8);
|
||||
|
||||
// battle_anim_80A9C70.s
|
||||
#define STAT_ANIM_PLUS1 15
|
||||
#define STAT_ANIM_PLUS2 39
|
||||
#define STAT_ANIM_MINUS1 22
|
||||
#define STAT_ANIM_MINUS2 46
|
||||
#define STAT_ANIM_MULTIPLE_PLUS1 55
|
||||
#define STAT_ANIM_MULTIPLE_PLUS2 56
|
||||
#define STAT_ANIM_MULTIPLE_MINUS1 57
|
||||
#define STAT_ANIM_MULTIPLE_MINUS2 58
|
||||
void LaunchStatusAnimation(u8 bank, u8 statusAnimId);
|
||||
|
||||
// battle_anim_8170478.s
|
||||
@@ -126,13 +153,33 @@ u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId);
|
||||
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 bank, u32 arg2, u8 ballId);
|
||||
|
||||
// battle_anim_mons.s
|
||||
void sub_8074DC4(struct Sprite * sprite);
|
||||
void sub_8074E14(struct Sprite * sprite);
|
||||
void sub_80754B8(struct Sprite * sprite);
|
||||
void sub_80758E0(u8 spriteId, u8 b);
|
||||
void sub_8075980(u8 spriteId);
|
||||
void obj_id_set_rotscale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
|
||||
bool8 sub_8073788(void);
|
||||
void TranslateMonSpriteLinear(struct Sprite * sprite);
|
||||
void TranslateMonSpriteLinearFixedPoint(struct Sprite * sprite);
|
||||
void InitSpriteDataForLinearTranslation(struct Sprite * sprite);
|
||||
void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 b);
|
||||
void ResetSpriteRotScale(u8 spriteId);
|
||||
void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
|
||||
bool8 IsContest(void);
|
||||
void sub_80759DC(u8 spriteId);
|
||||
bool8 IsBattlerSpritePresent(u8 battlerId);
|
||||
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
||||
void StartAnimLinearTranslation(struct Sprite *sprite);
|
||||
void sub_80755B8(struct Sprite *sprite);
|
||||
u8 sub_80768B0(u8 battlerId);
|
||||
|
||||
// battle_anim_mon_movement.c
|
||||
void AnimTask_ShakeMon(u8 taskId);
|
||||
void AnimTask_ShakeMon2(u8 taskId);
|
||||
void AnimTask_ShakeMonInPlace(u8 taskId);
|
||||
void AnimTask_ShakeAndSinkMon(u8 taskId);
|
||||
void AnimTask_TranslateMonElliptical(u8 taskId);
|
||||
void AnimTask_TranslateMonEllipticalRespectSide(u8 taskId);
|
||||
void AnimTask_WindUpLunge(u8 taskId);
|
||||
void sub_80995FC(u8 taskId);
|
||||
void AnimTask_SwayMon(u8 taskId);
|
||||
void AnimTask_ScaleMonAndRestore(u8 taskId);
|
||||
void sub_8099980(u8 taskId);
|
||||
void sub_8099A78(u8 taskId);
|
||||
void sub_8099BD4(u8 taskId);
|
||||
|
||||
#endif // GUARD_BATTLE_ANIM_H
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_BATTLE_BG_H
|
||||
#define GUARD_BATTLE_BG_H
|
||||
|
||||
void sub_800F34C(void);
|
||||
|
||||
#endif // GUARD_BATTLE_BG_H
|
||||
@@ -77,10 +77,14 @@ enum
|
||||
#define BALL_3_SHAKES_FAIL 3
|
||||
#define BALL_3_SHAKES_SUCCESS 4
|
||||
#define BALL_TRAINER_BLOCK 5
|
||||
#define BALL_GHOST_DODGE 6
|
||||
|
||||
#define RET_VALUE_LEVELLED_UP 11
|
||||
|
||||
#define INSTANT_HP_BAR_DROP 32767
|
||||
#define INSTANT_HP_BAR_DROP 0x7FFF
|
||||
|
||||
// Special return values in gBattleBufferB from Battle Controller functions.
|
||||
#define RET_VALUE_LEVELED_UP 11
|
||||
|
||||
struct UnusedControllerStruct
|
||||
{
|
||||
@@ -162,8 +166,8 @@ enum
|
||||
CONTROLLER_INTROSLIDE,
|
||||
CONTROLLER_INTROTRAINERBALLTHROW,
|
||||
CONTROLLER_DRAWPARTYSTATUSSUMMARY,
|
||||
CONTROLLER_49,
|
||||
CONTROLLER_50,
|
||||
CONTROLLER_HIDEPARTYSTATUSSUMMARY,
|
||||
CONTROLLER_ENDBOUNCE,
|
||||
CONTROLLER_SPRITEINVISIBILITY,
|
||||
CONTROLLER_BATTLEANIMATION,
|
||||
CONTROLLER_LINKSTANDBYMSG,
|
||||
@@ -174,90 +178,80 @@ enum
|
||||
CONTROLLER_CMDS_COUNT
|
||||
};
|
||||
|
||||
extern struct UnusedControllerStruct gUnknown_2022870;
|
||||
|
||||
// general functions
|
||||
void HandleLinkBattleSetup(void);
|
||||
void SetUpBattleVarsAndBirchZigzagoon(void);
|
||||
void sub_8032768(void);
|
||||
void sub_8033648(void);
|
||||
void SetUpBattleVars(void);
|
||||
void sub_800D30C(void);
|
||||
void sub_800DD28(void);
|
||||
void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *data);
|
||||
|
||||
// emitters
|
||||
void BtlController_EmitGetMonData(u8 bufferId, u8 requestId, u8 monToCheck);
|
||||
void EmitGetRawMonData(u8 bufferId, u8 monId, u8 bytes); // unused
|
||||
void EmitSetMonData(u8 bufferId, u8 requestId, u8 monToCheck, u8 bytes, void *data);
|
||||
void EmitSetRawMonData(u8 bufferId, u8 monId, u8 bytes, void *data); // unused
|
||||
void EmitLoadMonSprite(u8 bufferId);
|
||||
void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit);
|
||||
void EmitReturnMonToBall(u8 bufferId, u8 arg1);
|
||||
void EmitDrawTrainerPic(u8 bufferId);
|
||||
void EmitTrainerSlide(u8 bufferId);
|
||||
void EmitTrainerSlideBack(u8 bufferId);
|
||||
void EmitFaintAnimation(u8 bufferId);
|
||||
void EmitPaletteFade(u8 bufferId); // unused
|
||||
void EmitSuccessBallThrowAnim(u8 bufferId); // unused
|
||||
void EmitBallThrowAnim(u8 bufferId, u8 caseId);
|
||||
void EmitPause(u8 bufferId, u8 toWait, void *data); // unused
|
||||
void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr, u8 multihit);
|
||||
void EmitPrintString(u8 bufferId, u16 stringId);
|
||||
void EmitPrintSelectionString(u8 bufferId, u16 stringId);
|
||||
void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2);
|
||||
void EmitUnknownYesNoBox(u8 bufferId);
|
||||
void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
||||
void EmitChooseItem(u8 bufferId, u8* arg1);
|
||||
void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4);
|
||||
void EmitCmd23(u8 bufferId); // unused
|
||||
void EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
|
||||
void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints);
|
||||
void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2);
|
||||
void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status);
|
||||
void EmitStatusXor(u8 bufferId, u8 b); // unused
|
||||
void EmitDataTransfer(u8 bufferId, u16 size, void *data);
|
||||
void EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data); // unused
|
||||
void EmitPlayBGM(u8 bufferId, u16 songId, void *unusedDumbDataParameter); // unused
|
||||
void EmitCmd32(u8 bufferId, u16 size, void *c); // unused
|
||||
void EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2);
|
||||
void EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c);
|
||||
void EmitOneReturnValue(u8 bufferId, u16 arg1);
|
||||
void EmitOneReturnValue_Duplicate(u8 bufferId, u16 b);
|
||||
void EmitCmd37(u8 bufferId); // unused
|
||||
void EmitCmd38(u8 bufferId, u8 b); // unused
|
||||
void EmitCmd39(u8 bufferId); // unused
|
||||
void EmitCmd40(u8 bufferId); // unused
|
||||
void EmitHitAnimation(u8 bufferId);
|
||||
void EmitCmd42(u8 bufferId);
|
||||
void EmitPlaySE(u8 bufferId, u16 songId);
|
||||
void EmitPlayFanfareOrBGM(u8 bufferId, u16 songId, bool8 playBGM);
|
||||
void EmitFaintingCry(u8 bufferId);
|
||||
void EmitIntroSlide(u8 bufferId, u8 terrainId);
|
||||
void EmitIntroTrainerBallThrow(u8 bufferId);
|
||||
void EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2);
|
||||
void EmitCmd49(u8 bufferId);
|
||||
void EmitCmd50(u8 bufferId);
|
||||
void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
|
||||
void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument);
|
||||
void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 arg2);
|
||||
void EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
|
||||
void EmitCmd55(u8 bufferId, u8 arg1);
|
||||
void BtlController_EmitSetMonData(u8 bufferId, u8 requestId, u8 monToCheck, u8 bytes, void *data);
|
||||
void BtlController_EmitLoadMonSprite(u8 bufferId);
|
||||
void BtlController_EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit);
|
||||
void BtlController_EmitReturnMonToBall(u8 bufferId, u8 arg1);
|
||||
void BtlController_EmitDrawTrainerPic(u8 bufferId);
|
||||
void BtlController_EmitTrainerSlide(u8 bufferId);
|
||||
void BtlController_EmitTrainerSlideBack(u8 bufferId);
|
||||
void BtlController_EmitFaintAnimation(u8 bufferId);
|
||||
void BtlController_EmitBallThrowAnim(u8 bufferId, u8 caseId);
|
||||
void BtlController_EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr);
|
||||
void BtlController_EmitPrintString(u8 bufferId, u16 stringId);
|
||||
void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId);
|
||||
void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2);
|
||||
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
||||
void BtlController_EmitChooseItem(u8 bufferId, u8* arg1);
|
||||
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4);
|
||||
void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
|
||||
void BtlController_EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints);
|
||||
void BtlController_EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2);
|
||||
void BtlController_EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status);
|
||||
void BtlController_EmitDataTransfer(u8 bufferId, u16 size, void *data);
|
||||
void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2);
|
||||
void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c);
|
||||
void BtlController_EmitOneReturnValue(u8 bufferId, u16 arg1);
|
||||
void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 b);
|
||||
void BtlController_EmitHitAnimation(u8 bufferId);
|
||||
void BtlController_EmitCmd42(u8 bufferId);
|
||||
void BtlController_EmitPlaySE(u8 bufferId, u16 songId);
|
||||
void BtlController_EmitPlayFanfare(u8 bufferId, u16 songId);
|
||||
void BtlController_EmitFaintingCry(u8 bufferId);
|
||||
void BtlController_EmitIntroSlide(u8 bufferId, u8 terrainId);
|
||||
void BtlController_EmitIntroTrainerBallThrow(u8 bufferId);
|
||||
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2);
|
||||
void BtlController_EmitHidePartyStatusSummary(u8 bufferId);
|
||||
void BtlController_EmitEndBounceEffect(u8 bufferId);
|
||||
void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
|
||||
void BtlController_EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument);
|
||||
void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 arg1);
|
||||
void BtlController_EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
|
||||
void BtlController_EmitCmd55(u8 bufferId, u8 arg1);
|
||||
|
||||
// player controller
|
||||
void nullsub_13(void);
|
||||
void SetControllerToPlayer(void);
|
||||
void nullsub_21(void);
|
||||
void PlayerHandleGetRawMonData(void);
|
||||
void sub_80587B0(void);
|
||||
void sub_805CC00(struct Sprite *sprite);
|
||||
void sub_80335F8(struct Sprite *sprite);
|
||||
void SetCB2ToReshowScreenAfterMenu(void);
|
||||
void SetCB2ToReshowScreenAfterMenu2(void);
|
||||
void c3_0802FDF4(u8 taskId);
|
||||
void ActionSelectionCreateCursorAt(u8 cursorPos, u8 unused);
|
||||
void ActionSelectionDestroyCursorAt(u8 cursorPos);
|
||||
void InitMoveSelectionsVarsAndStrings(void);
|
||||
void sub_802F6A8(void);
|
||||
void MoveSelectionCreateCursorAt(u8 cursorPos, u8 arg1);
|
||||
void MoveSelectionDestroyCursorAt(u8 cursorPos);
|
||||
void HandleInputChooseMove(void);
|
||||
|
||||
// recorded player controller
|
||||
void SetControllerToRecordedPlayer(void);
|
||||
|
||||
// opponent controller
|
||||
void SetControllerToOpponent(void);
|
||||
void OpponentBufferExecCompleted(void);
|
||||
|
||||
// player partner controller
|
||||
void SetControllerToPlayerPartner(void);
|
||||
@@ -265,11 +259,17 @@ void SetControllerToPlayerPartner(void);
|
||||
// safari controller
|
||||
void SetControllerToSafari(void);
|
||||
|
||||
// wally controller
|
||||
void SetControllerToWally(void);
|
||||
// pokedude controller
|
||||
void SetControllerToPokedude(void);
|
||||
|
||||
// recorded opponent controller
|
||||
void SetControllerToRecordedOpponent(void);
|
||||
// oak controller
|
||||
void SetControllerToOakOrOldman(void);
|
||||
bool8 sub_80EB2E0(u8);
|
||||
void sub_80EB2F4(u8);
|
||||
void sub_80E8570(void);
|
||||
void sub_80E85C0(void);
|
||||
void sub_80E8598(void);
|
||||
void sub_80E7988(void);
|
||||
|
||||
// link opponent
|
||||
void SetControllerToLinkOpponent(void);
|
||||
|
||||
@@ -1,50 +1,45 @@
|
||||
#ifndef GUARD_BATTLE_GFX_SFX_UTIL
|
||||
#define GUARD_BATTLE_GFX_SFX_UTIL
|
||||
#ifndef GUARD_BATTLE_GFX_SFX_UTIL_H
|
||||
#define GUARD_BATTLE_GFX_SFX_UTIL_H
|
||||
|
||||
void AllocateBattleSpritesData(void);
|
||||
void FreeBattleSpritesData(void);
|
||||
u16 ChooseMoveAndTargetInBattlePalace(void);
|
||||
void sub_805D714(struct Sprite *sprite);
|
||||
void sub_805D770(struct Sprite *sprite, bool8 arg1);
|
||||
void sub_805D7AC(struct Sprite *sprite);
|
||||
void sub_8033E3C(struct Sprite *sprite);
|
||||
void sub_8033EEC(struct Sprite *sprite);
|
||||
void InitAndLaunchChosenStatusAnimation(bool8 isStatus2, u32 status);
|
||||
bool8 TryHandleLaunchBattleTableAnimation(u8 activeBank, u8 atkBank, u8 defBank, u8 tableId, u16 argument);
|
||||
void InitAndLaunchSpecialAnimation(u8 activeBank, u8 atkBank, u8 defBank, u8 tableId);
|
||||
bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattler, u8 atkBattler, u8 defBattler, u8 tableId, u16 argument);
|
||||
void InitAndLaunchSpecialAnimation(u8 activeBattler, u8 atkBattler, u8 defBattler, u8 tableId);
|
||||
bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn);
|
||||
bool8 mplay_80342A4(u8 bank);
|
||||
void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 bank);
|
||||
void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 bank);
|
||||
void nullsub_23(void);
|
||||
void nullsub_24(u16 species);
|
||||
void DecompressTrainerFrontPic(u16 frontPicId, u8 bank);
|
||||
void DecompressTrainerBackPic(u16 backPicId, u8 bank);
|
||||
void nullsub_25(u8 arg0);
|
||||
void FreeTrainerFrontPicPalette(u16 frontPicId);
|
||||
void sub_805DFFC(void);
|
||||
bool8 mplay_80342A4(u8 battlerId);
|
||||
void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId);
|
||||
void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId);
|
||||
void DecompressGhostFrontPic(struct Pokemon *unused, u8 battlerId);
|
||||
void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId);
|
||||
void DecompressTrainerBackPalette(u16 a1, u8 a2);
|
||||
void nullsub_16(u8 a1);
|
||||
void FreeTrainerFrontPicPaletteAndTile(u16 frontPicId);
|
||||
bool8 BattleLoadAllHealthBoxesGfx(u8 state);
|
||||
void LoadBattleBarGfx(u8 arg0);
|
||||
bool8 BattleInitAllSprites(u8 *state1, u8 *bank);
|
||||
bool8 BattleInitAllSprites(u8 *state, u8 *battlerId);
|
||||
void ClearSpritesHealthboxAnimData(void);
|
||||
void CopyAllBattleSpritesInvisibilities(void);
|
||||
void CopyBattleSpriteInvisibility(u8 bank);
|
||||
void HandleSpeciesGfxDataChange(u8 bankAtk, u8 bankDef, bool8 notTransform);
|
||||
void BattleLoadSubstituteOrMonSpriteGfx(u8 bank, bool8 loadMonSprite);
|
||||
void LoadBattleMonGfxAndAnimate(u8 bank, bool8 loadMonSprite, u8 spriteId);
|
||||
void TrySetBehindSubstituteSpriteBit(u8 bank, u16 move);
|
||||
void ClearBehindSubstituteBit(u8 bank);
|
||||
void HandleLowHpMusicChange(struct Pokemon *mon, u8 bank);
|
||||
void CopyBattleSpriteInvisibility(u8 battlerId);
|
||||
void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 notTransform);
|
||||
void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite);
|
||||
void LoadBattleMonGfxAndAnimate(u8 battlerId, bool8 loadMonSprite, u8 spriteId);
|
||||
void TrySetBehindSubstituteSpriteBit(u8 battlerId, u16 move);
|
||||
void ClearBehindSubstituteBit(u8 battlerId);
|
||||
void HandleLowHpMusicChange(struct Pokemon *mon, u8 battlerId);
|
||||
void BattleStopLowHpSound(void);
|
||||
u8 GetMonHPBarLevel(struct Pokemon *mon);
|
||||
void sub_805EAE8(void);
|
||||
void sub_805EB9C(u8 affineMode);
|
||||
void HandleBattleLowHpMusicChange(void);
|
||||
void sub_8035450(u8 affineMode);
|
||||
void LoadAndCreateEnemyShadowSprites(void);
|
||||
void SpriteCB_SetInvisible(struct Sprite *sprite);
|
||||
void SetBankEnemyShadowSpriteCallback(u8 bank, u16 species);
|
||||
void EnemyShadowCallbackToSetInvisible(u8 bank);
|
||||
void sub_805EF14(void);
|
||||
void ClearTemporarySpeciesSpriteData(u8 bank, bool8 dontClearSubstitute);
|
||||
void SetBattlerShadowSpriteCallback(u8 battlerId, u16 species);
|
||||
void HideBattlerShadowSprite(u8 battlerId);
|
||||
void sub_80357C8(void);
|
||||
void ClearTemporarySpeciesSpriteData(u8 battlerId, bool8 dontClearSubstitute);
|
||||
void AllocateMonSpritesGfx(void);
|
||||
void FreeMonSpritesGfx(void);
|
||||
bool32 ShouldPlayNormalPokeCry(struct Pokemon *mon);
|
||||
|
||||
#endif // GUARD_BATTLE_GFX_SFX_UTIL
|
||||
#endif // GUARD_BATTLE_GFX_SFX_UTIL_H
|
||||
|
||||
@@ -30,12 +30,18 @@ enum
|
||||
#define TAG_HEALTHBOX_OPPONENT1_TILE 0xD701
|
||||
#define TAG_HEALTHBOX_OPPONENT2_TILE 0xD702
|
||||
|
||||
#define TAG_HEALTHBAR_PLAYER1_TILE 0xD704
|
||||
#define TAG_HEALTHBAR_OPPONENT1_TILE 0xD705
|
||||
#define TAG_HEALTHBAR_PLAYER2_TILE 0xD706
|
||||
#define TAG_HEALTHBAR_OPPONENT2_TILE 0xD707
|
||||
|
||||
#define TAG_HEALTHBOX_SAFARI_TILE 0xD70B
|
||||
|
||||
#define TAG_STATUS_SUMMARY_BAR_TILE 0xD70C
|
||||
#define TAG_STATUS_SUMMARY_BALLS_TILE 0xD714
|
||||
|
||||
#define TAG_HEALTHBOX_PAL 0xD6FF
|
||||
#define TAG_HEALTHBAR_PAL 0xD704
|
||||
#define TAG_STATUS_SUMMARY_BAR_PAL 0xD710
|
||||
#define TAG_STATUS_SUMMARY_BALLS_PAL 0xD712
|
||||
|
||||
@@ -55,7 +61,8 @@ enum
|
||||
HEALTHBOX_SAFARI_BALLS_TEXT
|
||||
};
|
||||
|
||||
u8 CreateBankHealthboxSprites(u8 bank);
|
||||
void Task_HidePartyStatusSummary(u8 taskId);
|
||||
u8 CreateBattlerHealthboxSprites(u8 bank);
|
||||
u8 CreateSafariPlayerHealthboxSprites(void);
|
||||
void SetBattleBarStruct(u8 bank, u8 healthboxSpriteId, s32 maxVal, s32 currVal, s32 receivedValue);
|
||||
void SetHealthboxSpriteInvisible(u8 healthboxSpriteId);
|
||||
@@ -63,7 +70,7 @@ void SetHealthboxSpriteVisible(u8 healthboxSpriteId);
|
||||
void DestoryHealthboxSprite(u8 healthboxSpriteId);
|
||||
void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly);
|
||||
void UpdateOamPriorityInAllHealthboxes(u8 priority);
|
||||
void SetBankHealthboxSpritePos(u8 bank);
|
||||
void InitBattlerHealthboxCoords(u8 bank);
|
||||
void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent);
|
||||
void SwapHpBarsWithHpText(void);
|
||||
u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 arg2, bool8 isBattleStart);
|
||||
@@ -72,5 +79,8 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
|
||||
s32 sub_8074AA0(u8 bank, u8 healthboxSpriteId, u8 whichBar, u8 arg3);
|
||||
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
|
||||
u8 GetHPBarLevel(s16 hp, s16 maxhp);
|
||||
void sub_80496C0(u8 spriteId, struct Pokemon *mon);
|
||||
void sub_804981C(u8 spriteId, u8);
|
||||
s32 MoveBattleBar(u8 battler, u8 healthboxSpriteId, u8 whichBar, u8 arg3);
|
||||
|
||||
#endif // GUARD_BATTLE_INTERFACE_H
|
||||
|
||||
@@ -1,8 +1,47 @@
|
||||
#ifndef GUARD_BATTLE_2_H
|
||||
#define GUARD_BATTLE_2_H
|
||||
#ifndef GUARD_BATTLE_MAIN_H
|
||||
#define GUARD_BATTLE_MAIN_H
|
||||
|
||||
#include "global.h"
|
||||
#include "sprite.h"
|
||||
struct TrainerMoney
|
||||
{
|
||||
u8 classId;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct UnknownPokemonStruct4
|
||||
{
|
||||
/*0x00*/ u16 species;
|
||||
/*0x02*/ u16 heldItem;
|
||||
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0F*/ u8 level;
|
||||
/*0x10*/ u16 hp;
|
||||
/*0x12*/ u16 maxhp;
|
||||
/*0x14*/ u32 status;
|
||||
/*0x18*/ u32 personality;
|
||||
/*0x1C*/ u8 gender;
|
||||
/*0x1D*/ u8 language;
|
||||
};
|
||||
|
||||
#define TYPE_NAME_LENGTH 6
|
||||
#define ABILITY_NAME_LENGTH 12
|
||||
|
||||
// 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
|
||||
|
||||
// defines for the 'DoBounceEffect' function
|
||||
#define BOUNCE_MON 0x0
|
||||
#define BOUNCE_HEALTHBOX 0x1
|
||||
|
||||
void CB2_InitBattle(void);
|
||||
void BattleMainCB2(void);
|
||||
@@ -10,27 +49,25 @@ void CB2_QuitRecordedBattle(void);
|
||||
void sub_8038528(struct Sprite* sprite);
|
||||
void sub_8038A04(void); // unused
|
||||
void VBlankCB_Battle(void);
|
||||
void nullsub_17(void);
|
||||
void sub_8038B74(struct Sprite *sprite);
|
||||
void sub_8038D64(void);
|
||||
void sub_8011A1C(void);
|
||||
u32 sub_80391E0(u8 arrayId, u8 caseId);
|
||||
u32 sub_80397C4(u32 setId, u32 tableId);
|
||||
void oac_poke_opponent(struct Sprite *sprite);
|
||||
void SpriteCallbackDummy_2(struct Sprite *sprite);
|
||||
void sub_8039934(struct Sprite *sprite);
|
||||
void sub_8039AD8(struct Sprite *sprite);
|
||||
void sub_8039B2C(struct Sprite *sprite);
|
||||
void sub_8012098(struct Sprite *sprite);
|
||||
void sub_8012044(struct Sprite *sprite);
|
||||
void sub_8039B58(struct Sprite *sprite);
|
||||
void sub_8039BB4(struct Sprite *sprite);
|
||||
void sub_80105DC(struct Sprite *sprite);
|
||||
void sub_8039C00(struct Sprite *sprite);
|
||||
void dp11b_obj_instanciate(u8 bank, u8 b, s8 c, s8 d);
|
||||
void dp11b_obj_free(u8 bank, bool8 b);
|
||||
void sub_8012110(struct Sprite *sprite);
|
||||
void DoBounceEffect(u8 bank, u8 b, s8 c, s8 d);
|
||||
void EndBounceEffect(u8 bank, bool8 b);
|
||||
void sub_8039E44(struct Sprite *sprite);
|
||||
void sub_8039E60(struct Sprite *sprite);
|
||||
void sub_8039E84(struct Sprite *sprite);
|
||||
void sub_8039E9C(struct Sprite *sprite);
|
||||
void nullsub_20(void);
|
||||
void BeginBattleIntro(void);
|
||||
void SwitchInClearSetData(void);
|
||||
void FaintClearSetData(void);
|
||||
@@ -38,7 +75,7 @@ void sub_803B3AC(void); // unused
|
||||
void sub_803B598(void); // unused
|
||||
void BattleTurnPassed(void);
|
||||
u8 IsRunningFromBattleImpossible(void);
|
||||
void sub_803BDA0(u8 bank);
|
||||
void sub_8013F6C(u8 battlerId);
|
||||
void SwapTurnOrder(u8 id1, u8 id2);
|
||||
u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves);
|
||||
void RunBattleScriptCommands_PopCallbacksStack(void);
|
||||
@@ -46,6 +83,9 @@ void RunBattleScriptCommands(void);
|
||||
bool8 TryRunFromBattle(u8 bank);
|
||||
void sub_800FD9C(void);
|
||||
void sub_80120C4(struct Sprite *);
|
||||
void sub_8012100(struct Sprite *);
|
||||
void nullsub_12(void);
|
||||
void SpriteCB_FaintOpponentMon(struct Sprite *sprite);
|
||||
|
||||
extern const u8 gStatusConditionString_PoisonJpn[8];
|
||||
extern const u8 gStatusConditionString_SleepJpn[8];
|
||||
@@ -57,4 +97,7 @@ extern const u8 gStatusConditionString_LoveJpn[8];
|
||||
|
||||
extern const u8 * const gStatusConditionStringsTable[7][2];
|
||||
|
||||
#endif // GUARD_BATTLE_2_H
|
||||
extern const u8 gTypeEffectiveness[336];
|
||||
extern const struct TrainerMoney gTrainerMoneyTable[];
|
||||
|
||||
#endif // GUARD_BATTLE_MAIN_H
|
||||
@@ -35,11 +35,11 @@
|
||||
#define B_TXT_EFF_ABILITY 0x1B
|
||||
#define B_TXT_TRAINER1_CLASS 0x1C
|
||||
#define B_TXT_TRAINER1_NAME 0x1D
|
||||
#define B_TXT_1E 0x1E // trainer name for a link player
|
||||
#define B_TXT_1F 0x1F // trainer name for a link player
|
||||
#define B_TXT_20 0x20 // trainer name for a link player
|
||||
#define B_TXT_21 0x21 // trainer name for a link player
|
||||
#define B_TXT_22 0x22 // trainer name for a link player
|
||||
#define B_TXT_LINK_PLAYER_NAME 0x1E
|
||||
#define B_TXT_LINK_PARTNER_NAME 0x1F
|
||||
#define B_TXT_LINK_OPPONENT1_NAME 0x20
|
||||
#define B_TXT_LINK_OPPONENT2_NAME 0x21
|
||||
#define B_TXT_LINK_SCR_TRAINER_NAME 0x22
|
||||
#define B_TXT_PLAYER_NAME 0x23
|
||||
#define B_TXT_TRAINER1_LOSE_TEXT 0x24
|
||||
#define B_TXT_TRAINER1_WIN_TEXT 0x25
|
||||
@@ -196,7 +196,7 @@
|
||||
textVar[4] = B_BUFF_EOS; \
|
||||
}
|
||||
|
||||
struct StringInfoBattle
|
||||
struct BattleMsgData
|
||||
{
|
||||
u16 currentMove;
|
||||
u16 originallyUsedMove;
|
||||
@@ -205,7 +205,7 @@ struct StringInfoBattle
|
||||
u8 scrActive;
|
||||
u8 unk1605E;
|
||||
u8 hpScale;
|
||||
u8 StringBank;
|
||||
u8 itemEffectBattler;
|
||||
u8 moveType;
|
||||
u8 abilities[4];
|
||||
u8 textBuffs[3][0x10];
|
||||
@@ -217,6 +217,10 @@ u32 BattleStringExpandPlaceholders(const u8* src, u8* dst);
|
||||
void BattleHandleAddTextPrinter(const u8* text, u8 arg1);
|
||||
void SetPpNumbersPaletteInMoveSelection(void);
|
||||
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp);
|
||||
void BattlePutTextOnWindow(const u8* text, u8 arg1);
|
||||
bool8 sub_80D89B0(u16);
|
||||
|
||||
extern struct BattleMsgData *gBattleMsgDataPtr;
|
||||
|
||||
#define TEXT_BUFF_ARRAY_COUNT 16
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_BATTLE_RECORDS_H
|
||||
#define GUARD_BATTLE_RECORDS_H
|
||||
|
||||
void ClearPlayerLinkBattleRecords(void);
|
||||
|
||||
#endif // GUARD_BATTLE_RECORDS_H
|
||||
@@ -14,10 +14,6 @@
|
||||
#define CMP_COMMON_BITS 0x4
|
||||
#define CMP_NO_COMMON_BITS 0x5
|
||||
|
||||
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update
|
||||
#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability
|
||||
#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
|
||||
|
||||
#define ATK48_STAT_NEGATIVE 0x1
|
||||
#define ATK48_STAT_BY_TWO 0x2
|
||||
#define ATK48_BIT_x4 0x4
|
||||
@@ -25,19 +21,6 @@
|
||||
|
||||
#define ATK4F_DONT_CHECK_STATUSES 0x80
|
||||
|
||||
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
|
||||
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
|
||||
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
|
||||
#define VARIOUS_GET_MOVE_TARGET 3
|
||||
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
|
||||
#define VARIOUS_EMIT_YESNOBOX 13
|
||||
#define VARIOUS_WAIT_CRY 18
|
||||
#define VARIOUS_RETURN_OPPONENT_MON1 19
|
||||
#define VARIOUS_RETURN_OPPONENT_MON2 20
|
||||
#define VARIOUS_SET_TELEPORT_OUTCOME 25
|
||||
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
|
||||
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1
|
||||
#define ATK80_DMG_DOUBLED 2
|
||||
@@ -51,18 +34,18 @@
|
||||
#define WINDOW_CLEAR 0x1
|
||||
#define WINDOW_x80 0x80
|
||||
|
||||
void AI_CalcDmg(u8 bankAtk, u8 bankDef);
|
||||
u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
|
||||
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
|
||||
u8 BankGetTurnOrder(u8 bank);
|
||||
void SetMoveEffect(bool8 primary, u8 certain);
|
||||
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
|
||||
void BattleCreateYesNoCursorAt(u8 cursorPosition);
|
||||
void BufferMoveToLearnIntoBattleTextBuff2(void);
|
||||
bool8 UproarWakeUpCheck(u8 battlerId);
|
||||
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
|
||||
u8 TypeCalc(u16 move, u8 attacker, u8 defender);
|
||||
void AI_CalcDmg(u8 attacker, u8 defender);
|
||||
bool32 IsMonGettingExpSentOut(void);
|
||||
void BattleCreateYesNoCursorAt(void);
|
||||
void BattleDestroyYesNoCursorAt(void);
|
||||
void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
|
||||
bool8 UproarWakeUpCheck(u8 bank);
|
||||
u8 GetBattlerTurnOrderNum(u8 battlerId);
|
||||
void BufferMoveToLearnIntoBattleTextBuff2(void);
|
||||
|
||||
extern void (* const gBattleScriptingCommandsTable[])(void);
|
||||
extern const u8 gUnknown_0831C494[][4];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
+14
-75
@@ -28,16 +28,8 @@ extern const u8 BattleScript_LocalBattleLost[];
|
||||
extern const u8 BattleScript_LocalBattleLostPrintWhiteOut[];
|
||||
extern const u8 BattleScript_LocalBattleLostEnd[];
|
||||
extern const u8 BattleScript_CheckDomeDrew[];
|
||||
extern const u8 BattleScript_82DAA0B[];
|
||||
extern const u8 BattleScript_82DAA31[];
|
||||
extern const u8 BattleScript_LinkBattleWonOrLost[];
|
||||
extern const u8 BattleScript_82DAA5C[];
|
||||
extern const u8 BattleScript_82DAA83[];
|
||||
extern const u8 BattleScript_FrontierTrainerBattleWon[];
|
||||
extern const u8 BattleScript_82DAAAB[];
|
||||
extern const u8 BattleScript_82DAAAE[];
|
||||
extern const u8 BattleScript_82DAACB[];
|
||||
extern const u8 BattleScript_82DAADA[];
|
||||
extern const u8 BattleScript_SmokeBallEscape[];
|
||||
extern const u8 BattleScript_RanAwayUsingMonAbility[];
|
||||
extern const u8 BattleScript_GotAwaySafely[];
|
||||
@@ -47,11 +39,6 @@ extern const u8 BattleScript_PrintFailedToRunString[];
|
||||
extern const u8 BattleScript_PrintCantEscapeFromBattle[];
|
||||
extern const u8 BattleScript_PrintFullBox[];
|
||||
extern const u8 BattleScript_ActionSwitch[];
|
||||
extern const u8 BattleScript_82DAB35[];
|
||||
extern const u8 BattleScript_82DAB37[];
|
||||
extern const u8 BattleScript_82DAB44[];
|
||||
extern const u8 BattleScript_82DAB77[];
|
||||
extern const u8 BattleScript_82DABB8[];
|
||||
extern const u8 BattleScript_Pausex20[];
|
||||
extern const u8 BattleScript_LevelUp[];
|
||||
extern const u8 BattleScript_RainContinuesOrEnds[];
|
||||
@@ -64,13 +51,10 @@ extern const u8 BattleScript_SideStatusWoreOff[];
|
||||
extern const u8 BattleScript_SafeguardProtected[];
|
||||
extern const u8 BattleScript_SafeguardEnds[];
|
||||
extern const u8 BattleScript_LeechSeedTurnDrain[];
|
||||
extern const u8 BattleScript_82DAD47[];
|
||||
extern const u8 BattleScript_82DAD4D[];
|
||||
extern const u8 BattleScript_BideStoringEnergy[];
|
||||
extern const u8 BattleScript_BideAttack[];
|
||||
extern const u8 BattleScript_BideNoEnergyToAttack[];
|
||||
extern const u8 BattleScript_SuccessForceOut[];
|
||||
extern const u8 BattleScript_82DADF1[];
|
||||
extern const u8 BattleScript_MistProtected[];
|
||||
extern const u8 BattleScript_RageIsBuilding[];
|
||||
extern const u8 BattleScript_MoveUsedIsDisabled[];
|
||||
@@ -81,32 +65,16 @@ extern const u8 BattleScript_SelectingUnusableMoveInPalace[];
|
||||
extern const u8 BattleScript_EncoredNoMore[];
|
||||
extern const u8 BattleScript_DestinyBondTakesLife[];
|
||||
extern const u8 BattleScript_SpikesOnAttacker[];
|
||||
extern const u8 BattleScript_82DAE7A[];
|
||||
extern const u8 BattleScript_SpikesOnTarget[];
|
||||
extern const u8 BattleScript_82DAEB1[];
|
||||
extern const u8 BattleScript_SpikesOngBank1[];
|
||||
extern const u8 BattleScript_82DAEE8[];
|
||||
extern const u8 BattleScript_82DAEFE[];
|
||||
extern const u8 BattleScript_PerishSongTakesLife[];
|
||||
extern const u8 BattleScript_PerishSongCountGoesDown[];
|
||||
extern const u8 BattleScript_AllStatsUp[];
|
||||
extern const u8 BattleScript_82DAF54[];
|
||||
extern const u8 BattleScript_82DAF72[];
|
||||
extern const u8 BattleScript_82DAF86[];
|
||||
extern const u8 BattleScript_82DAF9A[];
|
||||
extern const u8 BattleScript_82DAFAE[];
|
||||
extern const u8 BattleScript_82DAFC2[];
|
||||
extern const u8 BattleScript_RapidSpinAway[];
|
||||
extern const u8 BattleScript_WrapFree[];
|
||||
extern const u8 BattleScript_LeechSeedFree[];
|
||||
extern const u8 BattleScript_SpikesFree[];
|
||||
extern const u8 BattleScript_MonTookFutureAttack[];
|
||||
extern const u8 BattleScript_82DB001[];
|
||||
extern const u8 BattleScript_82DB008[];
|
||||
extern const u8 BattleScript_82DB020[];
|
||||
extern const u8 BattleScript_82DB027[];
|
||||
extern const u8 BattleScript_82DB03F[];
|
||||
extern const u8 BattleScript_82DB058[];
|
||||
extern const u8 BattleScript_NoMovesLeft[];
|
||||
extern const u8 BattleScript_SelectingMoveWithNoPP[];
|
||||
extern const u8 BattleScript_NoPPForMove[];
|
||||
@@ -119,27 +87,21 @@ extern const u8 BattleScript_SelectingNotAllowedMoveTauntInPalace[];
|
||||
extern const u8 BattleScript_WishComesTrue[];
|
||||
extern const u8 BattleScript_IngrainTurnHeal[];
|
||||
extern const u8 BattleScript_AtkDefDown[];
|
||||
extern const u8 BattleScript_82DB144[];
|
||||
extern const u8 BattleScript_82DB167[];
|
||||
extern const u8 BattleScript_KnockedOff[];
|
||||
extern const u8 BattleScript_MoveUsedIsImprisoned[];
|
||||
extern const u8 BattleScript_SelectingImprisionedMove[];
|
||||
extern const u8 BattleScript_SelectingImprisionedMoveInPalace[];
|
||||
extern const u8 BattleScript_SelectingImprisonedMove[];
|
||||
extern const u8 BattleScript_SelectingImprisonedMoveInPalace[];
|
||||
extern const u8 BattleScript_GrudgeTakesPp[];
|
||||
extern const u8 BattleScript_MagicCoatBounce[];
|
||||
extern const u8 BattleScript_SnatchedMove[];
|
||||
extern const u8 BattleScript_EnduredMsg[];
|
||||
extern const u8 BattleScript_OneHitKOMsg[];
|
||||
extern const u8 BattleScript_SAtkDown2[];
|
||||
extern const u8 BattleScript_82DB1FE[];
|
||||
extern const u8 BattleScript_FocusPunchSetUp[];
|
||||
extern const u8 BattleScript_MoveUsedIsAsleep[];
|
||||
extern const u8 BattleScript_MoveUsedWokeUp[];
|
||||
extern const u8 BattleScript_MonWokeUpInUproar[];
|
||||
extern const u8 BattleScript_PoisonTurnDmg[];
|
||||
extern const u8 BattleScript_82DB243[];
|
||||
extern const u8 BattleScript_82DB245[];
|
||||
extern const u8 BattleScript_82DB25E[];
|
||||
extern const u8 BattleScript_BurnTurnDmg[];
|
||||
extern const u8 BattleScript_MoveUsedIsFrozen[];
|
||||
extern const u8 BattleScript_MoveUsedUnfroze[];
|
||||
@@ -149,19 +111,17 @@ extern const u8 BattleScript_MoveUsedFlinched[];
|
||||
extern const u8 BattleScript_PrintUproarOverTurns[];
|
||||
extern const u8 BattleScript_ThrashConfuses[];
|
||||
extern const u8 BattleScript_MoveUsedIsConfused[];
|
||||
extern const u8 BattleScript_82DB2D4[];
|
||||
extern const u8 BattleScript_82DB2FF[];
|
||||
extern const u8 BattleScript_MoveUsedIsConfusedNoMore[];
|
||||
extern const u8 BattleScript_PrintPayDayMoneyString[];
|
||||
extern const u8 BattleScript_WrapTurnDmg[];
|
||||
extern const u8 BattleScript_WrapEnds[];
|
||||
extern const u8 BattleScript_MoveUsedIsInLove[];
|
||||
extern const u8 BattleScript_MoveUsedIsInLoveCantAttack[];
|
||||
extern const u8 BattleScript_MoveUsedIsParalyzedCantAttack[];
|
||||
extern const u8 BattleScript_NightmareTurnDmg[];
|
||||
extern const u8 BattleScript_CurseTurnDmg[];
|
||||
extern const u8 BattleScript_TargetPRLZHeal[];
|
||||
extern const u8 BattleScript_MoveEffectSleep[];
|
||||
extern const u8 BattleScript_82DB374[];
|
||||
extern const u8 BattleScript_YawnMakesAsleep[];
|
||||
extern const u8 BattleScript_MoveEffectPoison[];
|
||||
extern const u8 BattleScript_MoveEffectBurn[];
|
||||
@@ -185,14 +145,6 @@ extern const u8 BattleScript_ShedSkinActivates[];
|
||||
extern const u8 BattleScript_WeatherFormChanges[];
|
||||
extern const u8 BattleScript_WeatherFormChangesLoop[];
|
||||
extern const u8 BattleScript_CastformChange[];
|
||||
extern const u8 BattleScript_82DB4AF[];
|
||||
extern const u8 BattleScript_82DB4B8[];
|
||||
extern const u8 BattleScript_82DB4BE[];
|
||||
extern const u8 BattleScript_82DB4C1[];
|
||||
extern const u8 BattleScript_82DB4CD[];
|
||||
extern const u8 BattleScript_82DB510[];
|
||||
extern const u8 BattleScript_82DB51B[];
|
||||
extern const u8 BattleScript_82DB51C[];
|
||||
extern const u8 BattleScript_DroughtActivates[];
|
||||
extern const u8 BattleScript_TookAttack[];
|
||||
extern const u8 BattleScript_SturdyPreventsOHKO[];
|
||||
@@ -220,12 +172,9 @@ extern const u8 BattleScript_ApplySecondaryEffect[];
|
||||
extern const u8 BattleScript_SynchronizeActivates[];
|
||||
extern const u8 BattleScript_NoItemSteal[];
|
||||
extern const u8 BattleScript_AbilityCuredStatus[];
|
||||
extern const u8 BattleScript_82DB695[];
|
||||
extern const u8 BattleScript_IgnoresAndUsesRandomMove[];
|
||||
extern const u8 BattleScript_MoveUsedLoafingAround[];
|
||||
extern const u8 BattleScript_82DB6C7[];
|
||||
extern const u8 BattleScript_IgnoresAndFallsAsleep[];
|
||||
extern const u8 BattleScript_82DB6F0[];
|
||||
extern const u8 BattleScript_SubstituteFade[];
|
||||
extern const u8 BattleScript_BerryCurePrlzEnd2[];
|
||||
extern const u8 BattleScript_BerryCureParRet[];
|
||||
@@ -251,18 +200,8 @@ extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItem[];
|
||||
extern const u8 BattleScript_HangedOnMsg[];
|
||||
extern const u8 BattleScript_BerryConfuseHealEnd2[];
|
||||
extern const u8 BattleScript_BerryStatRaiseEnd2[];
|
||||
extern const u8 BattleScript_82DB85B[];
|
||||
extern const u8 BattleScript_BerryFocusEnergyEnd2[];
|
||||
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
|
||||
extern const u8 BattleScript_82DB87D[];
|
||||
extern const u8 BattleScript_82DB881[];
|
||||
extern const u8 BattleScript_82DB887[];
|
||||
extern const u8 BattleScript_82DB89D[];
|
||||
extern const u8 BattleScript_82DB8BE[];
|
||||
extern const u8 BattleScript_82DB8E0[];
|
||||
extern const u8 BattleScript_82DB8F3[];
|
||||
extern const u8 BattleScript_82DB973[];
|
||||
extern const u8 BattleScript_82DB992[];
|
||||
extern const u8 BattleScript_AskIfWantsToForfeitMatch[];
|
||||
extern const u8 BattleScript_PrintPlayerForfeited[];
|
||||
extern const u8 BattleScript_PrintPlayerForfeitedLinkBattle[];
|
||||
@@ -270,23 +209,23 @@ extern const u8 BattleScript_BallThrow[];
|
||||
extern const u8 BattleScript_BallThrowByWally[];
|
||||
extern const u8 BattleScript_SafariBallThrow[];
|
||||
extern const u8 BattleScript_SuccessBallThrow[];
|
||||
extern const u8 BattleScript_82DBD92[];
|
||||
extern const u8 BattleScript_82DBDA5[];
|
||||
extern const u8 BattleScript_82DBDC2[];
|
||||
extern const u8 BattleScript_82DBDC3[];
|
||||
extern const u8 BattleScript_WallyBallThrow[];
|
||||
extern const u8 BattleScript_ShakeBallThrow[];
|
||||
extern const u8 BattleScript_82DBE01[];
|
||||
extern const u8 BattleScript_TrainerBallBlock[];
|
||||
extern const u8 BattleScript_82DBE12[];
|
||||
extern const u8 BattleScript_82DBE1C[];
|
||||
extern const u8 BattleScript_82DBE4B[];
|
||||
extern const u8 BattleScript_82DBE6F[];
|
||||
extern const u8 BattleScript_82DBE91[];
|
||||
extern const u8 BattleScript_RunByUsingItem[];
|
||||
extern const u8 BattleScript_ActionWatchesCarefully[];
|
||||
extern const u8 BattleScript_ActionGetNear[];
|
||||
extern const u8 BattleScript_ActionThrowPokeblock[];
|
||||
extern const u8 BattleScript_82DBEE3[];
|
||||
extern const u8 gUnknown_81D9192[];
|
||||
extern const u8 gUnknown_81D9180[];
|
||||
extern const u8 BattleScript_IntimidateActivates[];
|
||||
extern const u8 BattleScript_IntimidateActivatesEnd3[];
|
||||
extern const u8 BattleScript_IgnoresWhileAsleep[];
|
||||
extern const u8 BattleScript_IgnoresAndHitsItself[];
|
||||
extern const u8 BattleScript_MoveEffectRecoil[];
|
||||
extern const u8 BattleScript_FlushMessageBox[];
|
||||
extern const u8 BattleScript_SpikesOnFaintedBattler[];
|
||||
extern const u8 BattleScript_GhostBallDodge[];
|
||||
extern const u8 gUnknown_81D9A88[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
||||
@@ -6,5 +6,7 @@
|
||||
u16 sub_8164FCC(u8, u8);
|
||||
void sub_80E7524(u32 *);
|
||||
void ValidateEReaderTrainer(void);
|
||||
u8 GetBattleTowerTrainerFrontSpriteId(void);
|
||||
u8 GetEreaderTrainerFrontSpriteId(void);
|
||||
|
||||
#endif //GUARD_BATTLE_TOWER_H
|
||||
|
||||
+49
-49
@@ -8,35 +8,37 @@
|
||||
#define MOVE_LIMITATION_DISABLED (1 << 2)
|
||||
#define MOVE_LIMITATION_TORMENTED (1 << 3)
|
||||
#define MOVE_LIMITATION_TAUNT (1 << 4)
|
||||
#define MOVE_LIMITATION_IMPRISION (1 << 5)
|
||||
#define MOVE_LIMITATION_IMPRISON (1 << 5)
|
||||
|
||||
#define ABILITYEFFECT_ON_SWITCHIN 0x0
|
||||
#define ABILITYEFFECT_ENDTURN 0x1
|
||||
#define ABILITYEFFECT_MOVES_BLOCK 0x2
|
||||
#define ABILITYEFFECT_ABSORBING 0x3
|
||||
#define ABILITYEFFECT_CONTACT 0x4
|
||||
#define ABILITYEFFECT_IMMUNITY 0x5
|
||||
#define ABILITYEFFECT_FORECAST 0x6
|
||||
#define ABILITYEFFECT_SYNCHRONIZE 0x7
|
||||
#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8
|
||||
#define ABILITYEFFECT_INTIMIDATE1 0x9
|
||||
#define ABILITYEFFECT_INTIMIDATE2 0xA
|
||||
#define ABILITYEFFECT_TRACE 0xB
|
||||
#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC
|
||||
#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD
|
||||
#define ABILITYEFFECT_FIELD_SPORT 0xE
|
||||
#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF
|
||||
#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10
|
||||
#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11
|
||||
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
|
||||
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
|
||||
#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF
|
||||
#define ABILITYEFFECT_ON_SWITCHIN 0x0
|
||||
#define ABILITYEFFECT_ENDTURN 0x1
|
||||
#define ABILITYEFFECT_MOVES_BLOCK 0x2
|
||||
#define ABILITYEFFECT_ABSORBING 0x3
|
||||
#define ABILITYEFFECT_MOVE_END 0x4
|
||||
#define ABILITYEFFECT_IMMUNITY 0x5
|
||||
#define ABILITYEFFECT_FORECAST 0x6
|
||||
#define ABILITYEFFECT_SYNCHRONIZE 0x7
|
||||
#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8
|
||||
#define ABILITYEFFECT_INTIMIDATE1 0x9
|
||||
#define ABILITYEFFECT_INTIMIDATE2 0xA
|
||||
#define ABILITYEFFECT_TRACE 0xB
|
||||
#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC
|
||||
#define ABILITYEFFECT_CHECK_BATTLER_SIDE 0xD
|
||||
#define ABILITYEFFECT_FIELD_SPORT 0xE
|
||||
#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER 0xF // TODO: Is it correct?
|
||||
#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10
|
||||
#define ABILITYEFFECT_COUNT_BATTLER_SIDE 0x11
|
||||
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
|
||||
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
|
||||
#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF
|
||||
|
||||
#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 ITEMEFFECT_ON_SWITCH_IN 0x0
|
||||
#define ITEMEFFECT_MOVE_END 0x3
|
||||
#define ITEMEFFECT_KINGSROCK_SHELLBELL 0x4
|
||||
|
||||
#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 WEATHER_HAS_EFFECT2 ((!AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, ABILITY_AIR_LOCK, 0, 0)))
|
||||
@@ -50,43 +52,41 @@
|
||||
#define BS_GET_PLAYER2 13
|
||||
#define BS_GET_OPPONENT2 14
|
||||
|
||||
u8 GetBattleBank(u8 caseId);
|
||||
void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move);
|
||||
void PressurePPLoseOnUsingPerishSong(u8 bankAtk);
|
||||
void PressurePPLoseOnUsingImprision(u8 bankAtk);
|
||||
void MarkAllBufferBanksForExecution(void); // unused
|
||||
void MarkBufferBankForExecution(u8 bank);
|
||||
void sub_803F850(u8 arg0);
|
||||
void CancelMultiTurnMoves(u8 bank);
|
||||
bool8 WasUnableToUseMove(u8 bank);
|
||||
void PrepareStringBattle(u16 stringId, u8 bank);
|
||||
u8 GetBattlerForBattleScript(u8 caseId);
|
||||
void PressurePPLose(u8 target, u8 attacker, u16 move);
|
||||
void PressurePPLoseOnUsingImprison(u8 attacker);
|
||||
void PressurePPLoseOnUsingPerishSong(u8 attacker);
|
||||
void MarkAllBattlersForControllerExec(void);
|
||||
void MarkBattlerForControllerExec(u8 battlerId);
|
||||
void sub_8017298(u8 arg0);
|
||||
void CancelMultiTurnMoves(u8 battler);
|
||||
bool8 WasUnableToUseMove(u8 battler);
|
||||
void PrepareStringBattle(u16 stringId, u8 battler);
|
||||
void ResetSentPokesToOpponentValue(void);
|
||||
void sub_803F9EC(u8 bank);
|
||||
void sub_803FA70(u8 bank);
|
||||
void BattleScriptPush(const u8* bsPtr);
|
||||
void sub_8017434(u8 battler);
|
||||
void sub_80174B8(u8 battler);
|
||||
void BattleScriptPush(const u8 *bsPtr);
|
||||
void BattleScriptPushCursor(void);
|
||||
void BattleScriptPop(void);
|
||||
u8 TrySetCantSelectMoveBattleScript(void);
|
||||
u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check);
|
||||
u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check);
|
||||
bool8 AreAllMovesUnusable(void);
|
||||
u8 GetImprisonedMovesCount(u8 bank, u16 move);
|
||||
u8 UpdateTurnCounters(void);
|
||||
u8 TurnBasedEffects(void);
|
||||
u8 GetImprisonedMovesCount(u8 battlerId, u16 move);
|
||||
u8 DoFieldEndTurnEffects(void);
|
||||
u8 DoBattlerEndTurnEffects(void);
|
||||
bool8 HandleWishPerishSongOnTurnEnd(void);
|
||||
bool8 HandleFaintedMonActions(void);
|
||||
void TryClearRageStatuses(void);
|
||||
u8 AtkCanceller_UnableToUseMove(void);
|
||||
bool8 sub_80423F4(u8 bank, u8 r1, u8 r2);
|
||||
u8 CastformDataTypeChange(u8 bank);
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
|
||||
void BattleScriptExecute(const u8* BS_ptr);
|
||||
void BattleScriptPushCursorAndCallback(const u8* BS_ptr);
|
||||
u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn);
|
||||
void ClearFuryCutterDestinyBondGrudge(u8 bank);
|
||||
bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
|
||||
u8 CastformDataTypeChange(u8 battler);
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveArg);
|
||||
void BattleScriptExecute(const u8 *BS_ptr);
|
||||
void BattleScriptPushCursorAndCallback(const u8 *BS_ptr);
|
||||
u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn);
|
||||
void ClearFuryCutterDestinyBondGrudge(u8 battlerId);
|
||||
void HandleAction_RunBattleScript(void);
|
||||
u8 GetMoveTarget(u16 move, u8 useMoveTarget);
|
||||
u8 GetMoveTarget(u16 move, u8 setTarget);
|
||||
u8 IsMonDisobedient(void);
|
||||
void MarkBufferBankForExecution(u8 battlerId);
|
||||
void sub_80174B8(u8 battlerId);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
||||
@@ -6,7 +6,5 @@
|
||||
void AllocateBattleResources(void);
|
||||
void FreeBattleResources(void);
|
||||
void AdjustFriendshipOnBattleFaint(u8 bank);
|
||||
void sub_80571DC(u8 bank, u8 arg1);
|
||||
u32 sub_805725C(u8 bank);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
||||
@@ -62,6 +62,7 @@ void FieldObjectInteractionPickBerryTree(void);
|
||||
void FieldObjectInteractionRemoveBerryTree(void);
|
||||
u8 PlayerHasBerries(void);
|
||||
void ResetBerryTreeSparkleFlags(void);
|
||||
void sub_809C794(void);
|
||||
const struct Berry * sub_809C8A0(u8 berryIdx);
|
||||
|
||||
extern const struct Berry gBerries[];
|
||||
|
||||
+16
-4
@@ -3,10 +3,22 @@
|
||||
|
||||
#include "task.h"
|
||||
|
||||
enum BerryPouchType
|
||||
{
|
||||
BERRYPOUCH_FROMFIELD,
|
||||
BERRYPOUCH_FROMPARTYGIVE,
|
||||
BERRYPOUCH_FROMMARTSELL,
|
||||
BERRYPOUCH_FROMPOKEMONSTORAGEPC,
|
||||
BERRYPOUCH_FROMBATTLE,
|
||||
BERRYPOUCH_FROMBERRYCRUSH,
|
||||
BERRYPOUCH_NA
|
||||
};
|
||||
|
||||
void BerryPouch_StartFadeToExitCallback(u8 taskId);
|
||||
void BerryPouch_SetExitCallback(void (*)(void));
|
||||
void InitBerryPouch(u8, void (*)(void), u8);
|
||||
void DisplayItemMessageInBerryPouch(u8 taskId, u8 bgId, const u8 * str, TaskFunc followUpFunc);
|
||||
void sub_813E2B8(u8 taskId);
|
||||
void BerryPouch_SetExitCallback(void (*exitCallback)(void));
|
||||
void InitBerryPouch(u8 type, void (*savedCallback)(void), u8 allowSelect);
|
||||
void DisplayItemMessageInBerryPouch(u8 taskId, u8 fontId, const u8 * str, TaskFunc followUpFunc);
|
||||
void Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu(u8 taskId);
|
||||
void BerryPouch_CursorResetToTop(void);
|
||||
|
||||
#endif //GUARD_BERRY_POUCH_H
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
#define GUARD_BERRY_POWDER_H
|
||||
|
||||
u32 GetBerryPowder(void);
|
||||
void SetBerryPowder(u32 *powder, u32 amount);
|
||||
|
||||
#endif //GUARD_BERRY_POWDER_H
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_BG_REGS_H
|
||||
#define GUARD_BG_REGS_H
|
||||
|
||||
extern const u8 gBGControlRegOffsets[];
|
||||
|
||||
#endif //GUARD_BG_REGS_H
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef GUARD_CABLE_CLUB_H
|
||||
#define GUARD_CABLE_CLUB_H
|
||||
|
||||
#include "task.h"
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
void sub_8081A90(u8 taskId);
|
||||
u8 sub_8081150(void);
|
||||
|
||||
#endif //GUARD_CABLE_CLUB_H
|
||||
@@ -53,7 +53,7 @@
|
||||
#define BATTLE_TYPE_MULTI 0x0040
|
||||
#define BATTLE_TYPE_SAFARI 0x0080
|
||||
#define BATTLE_TYPE_BATTLE_TOWER 0x0100
|
||||
#define BATTLE_TYPE_WALLY_TUTORIAL 0x0200
|
||||
#define BATTLE_TYPE_OLDMAN_TUTORIAL 0x0200
|
||||
#define BATTLE_TYPE_ROAMER 0x0400
|
||||
#define BATTLE_TYPE_EREADER_TRAINER 0x0800
|
||||
#define BATTLE_TYPE_KYOGRE_GROUDON 0x1000
|
||||
@@ -63,7 +63,7 @@
|
||||
#define BATTLE_TYPE_POKEDUDE 0x10000
|
||||
#define BATTLE_TYPE_PALACE 0x20000
|
||||
#define BATTLE_TYPE_ARENA 0x40000
|
||||
#define BATTLE_TYPE_FACTORY 0x80000
|
||||
#define BATTLE_TYPE_TRAINER_TOWER 0x80000
|
||||
#define BATTLE_TYPE_PIKE 0x100000
|
||||
#define BATTLE_TYPE_PYRAMID 0x200000
|
||||
#define BATTLE_TYPE_INGAME_PARTNER 0x400000
|
||||
@@ -174,7 +174,7 @@
|
||||
#define HITMARKER_GRUDGE 0x01000000
|
||||
#define HITMARKER_OBEYS 0x02000000
|
||||
#define HITMARKER_x4000000 0x04000000
|
||||
#define HITMARKER_x8000000 0x08000000
|
||||
#define HITMARKER_CHARGING 0x08000000
|
||||
#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 0x1C)
|
||||
#define HITMARKER_UNK(battler) (0x10000000 << battler)
|
||||
|
||||
@@ -207,12 +207,12 @@
|
||||
#define WEATHER_SANDSTORM_TEMPORARY (1 << 3)
|
||||
#define WEATHER_SANDSTORM_PERMANENT (1 << 4)
|
||||
#define WEATHER_SANDSTORM_ANY (WEATHER_SANDSTORM_TEMPORARY | WEATHER_SANDSTORM_PERMANENT)
|
||||
#define WEATHER_SUNNY_TEMPORARY (1 << 5)
|
||||
#define WEATHER_SUNNY_PERMANENT (1 << 6)
|
||||
#define WEATHER_SUNNY_ANY (WEATHER_SUNNY_TEMPORARY | WEATHER_SUNNY_PERMANENT)
|
||||
#define WEATHER_SUN_TEMPORARY (1 << 5)
|
||||
#define WEATHER_SUN_PERMANENT (1 << 6)
|
||||
#define WEATHER_SUN_ANY (WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT)
|
||||
#define WEATHER_HAIL (1 << 7)
|
||||
#define WEATHER_HAIL_ANY (WEATHER_HAIL)
|
||||
#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUNNY_ANY | WEATHER_HAIL_ANY)
|
||||
#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY)
|
||||
|
||||
// Move Effects
|
||||
#define MOVE_EFFECT_SLEEP 0x1
|
||||
@@ -281,4 +281,16 @@
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x40
|
||||
#define MOVE_EFFECT_CERTAIN 0x80
|
||||
|
||||
// Battle terrain defines for gBattleTerrain.
|
||||
#define BATTLE_TERRAIN_GRASS 0
|
||||
#define BATTLE_TERRAIN_LONG_GRASS 1
|
||||
#define BATTLE_TERRAIN_SAND 2
|
||||
#define BATTLE_TERRAIN_UNDERWATER 3
|
||||
#define BATTLE_TERRAIN_WATER 4
|
||||
#define BATTLE_TERRAIN_POND 5
|
||||
#define BATTLE_TERRAIN_MOUNTAIN 6
|
||||
#define BATTLE_TERRAIN_CAVE 7
|
||||
#define BATTLE_TERRAIN_BUILDING 8
|
||||
#define BATTLE_TERRAIN_PLAIN 9
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_H
|
||||
|
||||
@@ -0,0 +1,443 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_ANIM_H
|
||||
#define GUARD_CONSTANTS_BATTLE_ANIM_H
|
||||
|
||||
// Sprites start at 10000 and thus must be subtracted of 10000 to account for the true index.
|
||||
#define GET_TRUE_SPRITE_INDEX(i) ((i - ANIM_SPRITES_START))
|
||||
|
||||
// Particle ids.
|
||||
#define ANIM_SPRITES_START 10000
|
||||
|
||||
#define ANIM_TAG_BONE (ANIM_SPRITES_START + 0)
|
||||
#define ANIM_TAG_SPARK (ANIM_SPRITES_START + 1)
|
||||
#define ANIM_TAG_PENCIL (ANIM_SPRITES_START + 2)
|
||||
#define ANIM_TAG_AIR_WAVE (ANIM_SPRITES_START + 3)
|
||||
#define ANIM_TAG_ORB (ANIM_SPRITES_START + 4)
|
||||
#define ANIM_TAG_SWORD (ANIM_SPRITES_START + 5)
|
||||
#define ANIM_TAG_SEED (ANIM_SPRITES_START + 6)
|
||||
#define ANIM_TAG_EXPLOSION_6 (ANIM_SPRITES_START + 7)
|
||||
#define ANIM_TAG_PINK_ORB (ANIM_SPRITES_START + 8) // unused
|
||||
#define ANIM_TAG_GUST (ANIM_SPRITES_START + 9)
|
||||
#define ANIM_TAG_ICE_CUBE (ANIM_SPRITES_START + 10)
|
||||
#define ANIM_TAG_SPARK_2 (ANIM_SPRITES_START + 11)
|
||||
#define ANIM_TAG_ORANGE (ANIM_SPRITES_START + 12) // unused
|
||||
#define ANIM_TAG_YELLOW_BALL (ANIM_SPRITES_START + 13)
|
||||
#define ANIM_TAG_LOCK_ON (ANIM_SPRITES_START + 14)
|
||||
#define ANIM_TAG_TIED_BAG (ANIM_SPRITES_START + 15)
|
||||
#define ANIM_TAG_BLACK_SMOKE (ANIM_SPRITES_START + 16)
|
||||
#define ANIM_TAG_BLACK_BALL (ANIM_SPRITES_START + 17)
|
||||
#define ANIM_TAG_CONVERSION (ANIM_SPRITES_START + 18)
|
||||
#define ANIM_TAG_GLASS (ANIM_SPRITES_START + 19) // unused
|
||||
#define ANIM_TAG_HORN_HIT (ANIM_SPRITES_START + 20)
|
||||
#define ANIM_TAG_HIT (ANIM_SPRITES_START + 21)
|
||||
#define ANIM_TAG_HIT_2 (ANIM_SPRITES_START + 22)
|
||||
#define ANIM_TAG_BLUE_SHARDS (ANIM_SPRITES_START + 23) // unused
|
||||
#define ANIM_TAG_CLOSING_EYE (ANIM_SPRITES_START + 24) // unused
|
||||
#define ANIM_TAG_WAVING_HAND (ANIM_SPRITES_START + 25) // unused
|
||||
#define ANIM_TAG_HIT_DUPLICATE (ANIM_SPRITES_START + 26) // unused
|
||||
#define ANIM_TAG_LEER (ANIM_SPRITES_START + 27)
|
||||
#define ANIM_TAG_BLUE_BURST (ANIM_SPRITES_START + 28) // unused
|
||||
#define ANIM_TAG_SMALL_EMBER (ANIM_SPRITES_START + 29)
|
||||
#define ANIM_TAG_GRAY_SMOKE (ANIM_SPRITES_START + 30)
|
||||
#define ANIM_TAG_BLUE_STAR (ANIM_SPRITES_START + 31)
|
||||
#define ANIM_TAG_BUBBLE_BURST (ANIM_SPRITES_START + 32)
|
||||
#define ANIM_TAG_FIRE (ANIM_SPRITES_START + 33)
|
||||
#define ANIM_TAG_SPINNING_FIRE (ANIM_SPRITES_START + 34) // unused
|
||||
#define ANIM_TAG_FIRE_PLUME (ANIM_SPRITES_START + 35)
|
||||
#define ANIM_TAG_LIGHTNING_2 (ANIM_SPRITES_START + 36) // unused
|
||||
#define ANIM_TAG_LIGHTNING (ANIM_SPRITES_START + 37)
|
||||
#define ANIM_TAG_CLAW_SLASH_2 (ANIM_SPRITES_START + 38) // unused
|
||||
#define ANIM_TAG_CLAW_SLASH (ANIM_SPRITES_START + 39)
|
||||
#define ANIM_TAG_SCRATCH_3 (ANIM_SPRITES_START + 40) // unused
|
||||
#define ANIM_TAG_SCRATCH_2 (ANIM_SPRITES_START + 41) // unused
|
||||
#define ANIM_TAG_BUBBLE_BURST_2 (ANIM_SPRITES_START + 42) // unused
|
||||
#define ANIM_TAG_ICE_CHUNK (ANIM_SPRITES_START + 43)
|
||||
#define ANIM_TAG_GLASS_2 (ANIM_SPRITES_START + 44) // unused
|
||||
#define ANIM_TAG_PINK_HEART_2 (ANIM_SPRITES_START + 45) // unused
|
||||
#define ANIM_TAG_SAP_DRIP (ANIM_SPRITES_START + 46) // unused
|
||||
#define ANIM_TAG_SAP_DRIP_2 (ANIM_SPRITES_START + 47) // unused
|
||||
#define ANIM_TAG_SPARKLE_1 (ANIM_SPRITES_START + 48)
|
||||
#define ANIM_TAG_SPARKLE_2 (ANIM_SPRITES_START + 49)
|
||||
#define ANIM_TAG_HUMANOID_FOOT (ANIM_SPRITES_START + 50)
|
||||
#define ANIM_TAG_MONSTER_FOOT (ANIM_SPRITES_START + 51)
|
||||
#define ANIM_TAG_HUMANOID_HAND (ANIM_SPRITES_START + 52) // unused
|
||||
#define ANIM_TAG_NOISE_LINE (ANIM_SPRITES_START + 53)
|
||||
#define ANIM_TAG_YELLOW_UNK (ANIM_SPRITES_START + 54) // unused
|
||||
#define ANIM_TAG_RED_FIST (ANIM_SPRITES_START + 55) // unused
|
||||
#define ANIM_TAG_SLAM_HIT (ANIM_SPRITES_START + 56)
|
||||
#define ANIM_TAG_RING (ANIM_SPRITES_START + 57) // unused
|
||||
#define ANIM_TAG_ROCKS (ANIM_SPRITES_START + 58)
|
||||
#define ANIM_TAG_Z (ANIM_SPRITES_START + 59) // unused
|
||||
#define ANIM_TAG_YELLOW_UNK_2 (ANIM_SPRITES_START + 60) // unused
|
||||
#define ANIM_TAG_AIR_SLASH (ANIM_SPRITES_START + 61) // unused
|
||||
#define ANIM_TAG_SPINNING_GREEN_ORBS (ANIM_SPRITES_START + 62) // unused
|
||||
#define ANIM_TAG_LEAF (ANIM_SPRITES_START + 63)
|
||||
#define ANIM_TAG_FINGER (ANIM_SPRITES_START + 64)
|
||||
#define ANIM_TAG_POISON_POWDER (ANIM_SPRITES_START + 65)
|
||||
#define ANIM_TAG_BROWN_TRIANGLE (ANIM_SPRITES_START + 66) // unused
|
||||
#define ANIM_TAG_SLEEP_POWDER (ANIM_SPRITES_START + 67)
|
||||
#define ANIM_TAG_STUN_SPORE (ANIM_SPRITES_START + 68)
|
||||
#define ANIM_TAG_POWDER (ANIM_SPRITES_START + 69) // unused
|
||||
#define ANIM_TAG_SPARKLE_3 (ANIM_SPRITES_START + 70)
|
||||
#define ANIM_TAG_SPARKLE_4 (ANIM_SPRITES_START + 71)
|
||||
#define ANIM_TAG_MUSIC_NOTES (ANIM_SPRITES_START + 72)
|
||||
#define ANIM_TAG_DUCK (ANIM_SPRITES_START + 73)
|
||||
#define ANIM_TAG_MUD_SAND (ANIM_SPRITES_START + 74)
|
||||
#define ANIM_TAG_ALERT (ANIM_SPRITES_START + 75)
|
||||
#define ANIM_TAG_BLUE_FLAMES (ANIM_SPRITES_START + 76) // unused
|
||||
#define ANIM_TAG_BLUE_FLAMES_2 (ANIM_SPRITES_START + 77) // unused
|
||||
#define ANIM_TAG_SHOCK_4 (ANIM_SPRITES_START + 78) // unused
|
||||
#define ANIM_TAG_SHOCK (ANIM_SPRITES_START + 79)
|
||||
#define ANIM_TAG_BELL_2 (ANIM_SPRITES_START + 80) // unused
|
||||
#define ANIM_TAG_PINK_GLOVE (ANIM_SPRITES_START + 81) // unused
|
||||
#define ANIM_TAG_BLUE_LINES (ANIM_SPRITES_START + 82) // unused
|
||||
#define ANIM_TAG_IMPACT_3 (ANIM_SPRITES_START + 83) // unused
|
||||
#define ANIM_TAG_IMPACT_2 (ANIM_SPRITES_START + 84) // unused
|
||||
#define ANIM_TAG_RETICLE (ANIM_SPRITES_START + 85) // unused
|
||||
#define ANIM_TAG_BREATH (ANIM_SPRITES_START + 86)
|
||||
#define ANIM_TAG_ANGER (ANIM_SPRITES_START + 87)
|
||||
#define ANIM_TAG_SNOWBALL (ANIM_SPRITES_START + 88) // unused
|
||||
#define ANIM_TAG_VINE (ANIM_SPRITES_START + 89) // unused
|
||||
#define ANIM_TAG_SWORD_2 (ANIM_SPRITES_START + 90) // unused
|
||||
#define ANIM_TAG_CLAPPING (ANIM_SPRITES_START + 91) // unused
|
||||
#define ANIM_TAG_RED_TUBE (ANIM_SPRITES_START + 92) // unused
|
||||
#define ANIM_TAG_AMNESIA (ANIM_SPRITES_START + 93)
|
||||
#define ANIM_TAG_STRING_2 (ANIM_SPRITES_START + 94) // unused
|
||||
#define ANIM_TAG_PENCIL_2 (ANIM_SPRITES_START + 95) // unused
|
||||
#define ANIM_TAG_PETAL (ANIM_SPRITES_START + 96) // unused
|
||||
#define ANIM_TAG_BENT_SPOON (ANIM_SPRITES_START + 97)
|
||||
#define ANIM_TAG_WEB (ANIM_SPRITES_START + 98) // unused
|
||||
#define ANIM_TAG_MILK_BOTTLE (ANIM_SPRITES_START + 99)
|
||||
#define ANIM_TAG_COIN (ANIM_SPRITES_START + 100)
|
||||
#define ANIM_TAG_CRACKED_EGG (ANIM_SPRITES_START + 101) // unused
|
||||
#define ANIM_TAG_HATCHED_EGG (ANIM_SPRITES_START + 102) // unused
|
||||
#define ANIM_TAG_FRESH_EGG (ANIM_SPRITES_START + 103) // unused
|
||||
#define ANIM_TAG_FANGS (ANIM_SPRITES_START + 104) // unused
|
||||
#define ANIM_TAG_EXPLOSION_2 (ANIM_SPRITES_START + 105) // unused
|
||||
#define ANIM_TAG_EXPLOSION_3 (ANIM_SPRITES_START + 106) // unused
|
||||
#define ANIM_TAG_WATER_DROPLET (ANIM_SPRITES_START + 107) // unused
|
||||
#define ANIM_TAG_WATER_DROPLET_2 (ANIM_SPRITES_START + 108) // unused
|
||||
#define ANIM_TAG_SEED_2 (ANIM_SPRITES_START + 109) // unused
|
||||
#define ANIM_TAG_SPROUT (ANIM_SPRITES_START + 110) // unused
|
||||
#define ANIM_TAG_RED_WAND (ANIM_SPRITES_START + 111) // unused
|
||||
#define ANIM_TAG_PURPLE_GREEN_UNK (ANIM_SPRITES_START + 112) // unused
|
||||
#define ANIM_TAG_WATER_COLUMN (ANIM_SPRITES_START + 113) // unused
|
||||
#define ANIM_TAG_MUD_UNK (ANIM_SPRITES_START + 114) // unused
|
||||
#define ANIM_TAG_RAIN_DROPS (ANIM_SPRITES_START + 115)
|
||||
#define ANIM_TAG_FURY_SWIPES (ANIM_SPRITES_START + 116) // unused
|
||||
#define ANIM_TAG_VINE_2 (ANIM_SPRITES_START + 117) // unused
|
||||
#define ANIM_TAG_TEETH (ANIM_SPRITES_START + 118) // unused
|
||||
#define ANIM_TAG_BONE_2 (ANIM_SPRITES_START + 119) // unused
|
||||
#define ANIM_TAG_WHITE_BAG (ANIM_SPRITES_START + 120) // unused
|
||||
#define ANIM_TAG_UNKNOWN (ANIM_SPRITES_START + 121) // unused
|
||||
#define ANIM_TAG_PURPLE_CORAL (ANIM_SPRITES_START + 122) // unused
|
||||
#define ANIM_TAG_PURPLE_DROPLET (ANIM_SPRITES_START + 123) // unused
|
||||
#define ANIM_TAG_SHOCK_2 (ANIM_SPRITES_START + 124) // unused
|
||||
#define ANIM_TAG_CLOSING_EYE_2 (ANIM_SPRITES_START + 125) // unused
|
||||
#define ANIM_TAG_METAL_BALL (ANIM_SPRITES_START + 126) // unused
|
||||
#define ANIM_TAG_MONSTER_DOLL (ANIM_SPRITES_START + 127) // unused
|
||||
#define ANIM_TAG_WHIRLWIND (ANIM_SPRITES_START + 128) // unused
|
||||
#define ANIM_TAG_WHIRLWIND_2 (ANIM_SPRITES_START + 129) // unused
|
||||
#define ANIM_TAG_EXPLOSION_4 (ANIM_SPRITES_START + 130) // unused
|
||||
#define ANIM_TAG_EXPLOSION_5 (ANIM_SPRITES_START + 131) // unused
|
||||
#define ANIM_TAG_TONGUE (ANIM_SPRITES_START + 132) // unused
|
||||
#define ANIM_TAG_SMOKE (ANIM_SPRITES_START + 133) // unused
|
||||
#define ANIM_TAG_SMOKE_2 (ANIM_SPRITES_START + 134) // unused
|
||||
#define ANIM_TAG_IMPACT (ANIM_SPRITES_START + 135)
|
||||
#define ANIM_TAG_CIRCLE_IMPACT (ANIM_SPRITES_START + 136)
|
||||
#define ANIM_TAG_SCRATCH (ANIM_SPRITES_START + 137)
|
||||
#define ANIM_TAG_CUT (ANIM_SPRITES_START + 138)
|
||||
#define ANIM_TAG_SHARP_TEETH (ANIM_SPRITES_START + 139)
|
||||
#define ANIM_TAG_RAINBOW_RINGS (ANIM_SPRITES_START + 140)
|
||||
#define ANIM_TAG_ICE_CRYSTALS (ANIM_SPRITES_START + 141)
|
||||
#define ANIM_TAG_ICE_SPIKES (ANIM_SPRITES_START + 142)
|
||||
#define ANIM_TAG_HANDS_AND_FEET (ANIM_SPRITES_START + 143)
|
||||
#define ANIM_TAG_MIST_CLOUD (ANIM_SPRITES_START + 144)
|
||||
#define ANIM_TAG_CLAMP (ANIM_SPRITES_START + 145)
|
||||
#define ANIM_TAG_BUBBLE (ANIM_SPRITES_START + 146)
|
||||
#define ANIM_TAG_ORBS (ANIM_SPRITES_START + 147)
|
||||
#define ANIM_TAG_WATER_IMPACT (ANIM_SPRITES_START + 148)
|
||||
#define ANIM_TAG_WATER_ORB (ANIM_SPRITES_START + 149)
|
||||
#define ANIM_TAG_POISON_BUBBLE (ANIM_SPRITES_START + 150)
|
||||
#define ANIM_TAG_TOXIC_BUBBLE (ANIM_SPRITES_START + 151)
|
||||
#define ANIM_TAG_SPIKES (ANIM_SPRITES_START + 152)
|
||||
#define ANIM_TAG_HORN_HIT_2 (ANIM_SPRITES_START + 153)
|
||||
#define ANIM_TAG_AIR_WAVE_2 (ANIM_SPRITES_START + 154)
|
||||
#define ANIM_TAG_SMALL_BUBBLES (ANIM_SPRITES_START + 155)
|
||||
#define ANIM_TAG_ROUND_SHADOW (ANIM_SPRITES_START + 156)
|
||||
#define ANIM_TAG_SUNLIGHT (ANIM_SPRITES_START + 157)
|
||||
#define ANIM_TAG_SPORE (ANIM_SPRITES_START + 158)
|
||||
#define ANIM_TAG_FLOWER (ANIM_SPRITES_START + 159)
|
||||
#define ANIM_TAG_RAZOR_LEAF (ANIM_SPRITES_START + 160)
|
||||
#define ANIM_TAG_NEEDLE (ANIM_SPRITES_START + 161)
|
||||
#define ANIM_TAG_WHIRLWIND_LINES (ANIM_SPRITES_START + 162)
|
||||
#define ANIM_TAG_GOLD_RING (ANIM_SPRITES_START + 163)
|
||||
#define ANIM_TAG_PURPLE_RING (ANIM_SPRITES_START + 164)
|
||||
#define ANIM_TAG_BLUE_RING (ANIM_SPRITES_START + 165)
|
||||
#define ANIM_TAG_GREEN_LIGHT_WALL (ANIM_SPRITES_START + 166)
|
||||
#define ANIM_TAG_BLUE_LIGHT_WALL (ANIM_SPRITES_START + 167)
|
||||
#define ANIM_TAG_RED_LIGHT_WALL (ANIM_SPRITES_START + 168)
|
||||
#define ANIM_TAG_GRAY_LIGHT_WALL (ANIM_SPRITES_START + 169)
|
||||
#define ANIM_TAG_ORANGE_LIGHT_WALL (ANIM_SPRITES_START + 170)
|
||||
#define ANIM_TAG_BLACK_BALL_2 (ANIM_SPRITES_START + 171)
|
||||
#define ANIM_TAG_PURPLE_GAS_CLOUD (ANIM_SPRITES_START + 172)
|
||||
#define ANIM_TAG_SPARK_H (ANIM_SPRITES_START + 173)
|
||||
#define ANIM_TAG_YELLOW_STAR (ANIM_SPRITES_START + 174)
|
||||
#define ANIM_TAG_LARGE_FRESH_EGG (ANIM_SPRITES_START + 175)
|
||||
#define ANIM_TAG_SHADOW_BALL (ANIM_SPRITES_START + 176)
|
||||
#define ANIM_TAG_LICK (ANIM_SPRITES_START + 177)
|
||||
#define ANIM_TAG_VOID_LINES (ANIM_SPRITES_START + 178)
|
||||
#define ANIM_TAG_STRING (ANIM_SPRITES_START + 179)
|
||||
#define ANIM_TAG_WEB_THREAD (ANIM_SPRITES_START + 180)
|
||||
#define ANIM_TAG_SPIDER_WEB (ANIM_SPRITES_START + 181)
|
||||
#define ANIM_TAG_LIGHTBULB (ANIM_SPRITES_START + 182) // unused
|
||||
#define ANIM_TAG_SLASH (ANIM_SPRITES_START + 183)
|
||||
#define ANIM_TAG_FOCUS_ENERGY (ANIM_SPRITES_START + 184)
|
||||
#define ANIM_TAG_SPHERE_TO_CUBE (ANIM_SPRITES_START + 185)
|
||||
#define ANIM_TAG_TENDRILS (ANIM_SPRITES_START + 186)
|
||||
#define ANIM_TAG_EYE (ANIM_SPRITES_START + 187)
|
||||
#define ANIM_TAG_WHITE_SHADOW (ANIM_SPRITES_START + 188)
|
||||
#define ANIM_TAG_TEAL_ALERT (ANIM_SPRITES_START + 189)
|
||||
#define ANIM_TAG_OPENING_EYE (ANIM_SPRITES_START + 190)
|
||||
#define ANIM_TAG_ROUND_WHITE_HALO (ANIM_SPRITES_START + 191)
|
||||
#define ANIM_TAG_FANG_ATTACK (ANIM_SPRITES_START + 192)
|
||||
#define ANIM_TAG_PURPLE_HAND_OUTLINE (ANIM_SPRITES_START + 193)
|
||||
#define ANIM_TAG_MOON (ANIM_SPRITES_START + 194)
|
||||
#define ANIM_TAG_GREEN_SPARKLE (ANIM_SPRITES_START + 195)
|
||||
#define ANIM_TAG_SPIRAL (ANIM_SPRITES_START + 196)
|
||||
#define ANIM_TAG_SNORE_Z (ANIM_SPRITES_START + 197)
|
||||
#define ANIM_TAG_EXPLOSION (ANIM_SPRITES_START + 198)
|
||||
#define ANIM_TAG_NAIL (ANIM_SPRITES_START + 199)
|
||||
#define ANIM_TAG_GHOSTLY_SPIRIT (ANIM_SPRITES_START + 200)
|
||||
#define ANIM_TAG_WARM_ROCK (ANIM_SPRITES_START + 201)
|
||||
#define ANIM_TAG_BREAKING_EGG (ANIM_SPRITES_START + 202)
|
||||
#define ANIM_TAG_THIN_RING (ANIM_SPRITES_START + 203)
|
||||
#define ANIM_TAG_PUNCH_IMPACT (ANIM_SPRITES_START + 204) // unused
|
||||
#define ANIM_TAG_BELL (ANIM_SPRITES_START + 205)
|
||||
#define ANIM_TAG_MUSIC_NOTES_2 (ANIM_SPRITES_START + 206)
|
||||
#define ANIM_TAG_SPEED_DUST (ANIM_SPRITES_START + 207)
|
||||
#define ANIM_TAG_TORN_METAL (ANIM_SPRITES_START + 208)
|
||||
#define ANIM_TAG_THOUGHT_BUBBLE (ANIM_SPRITES_START + 209)
|
||||
#define ANIM_TAG_MAGENTA_HEART (ANIM_SPRITES_START + 210)
|
||||
#define ANIM_TAG_ELECTRIC_ORBS (ANIM_SPRITES_START + 211)
|
||||
#define ANIM_TAG_CIRCLE_OF_LIGHT (ANIM_SPRITES_START + 212)
|
||||
#define ANIM_TAG_ELECTRICITY (ANIM_SPRITES_START + 213)
|
||||
#define ANIM_TAG_FINGER_2 (ANIM_SPRITES_START + 214)
|
||||
#define ANIM_TAG_MOVEMENT_WAVES (ANIM_SPRITES_START + 215)
|
||||
#define ANIM_TAG_RED_HEART (ANIM_SPRITES_START + 216)
|
||||
#define ANIM_TAG_RED_ORB (ANIM_SPRITES_START + 217)
|
||||
#define ANIM_TAG_EYE_SPARKLE (ANIM_SPRITES_START + 218)
|
||||
#define ANIM_TAG_PINK_HEART (ANIM_SPRITES_START + 219)
|
||||
#define ANIM_TAG_ANGEL (ANIM_SPRITES_START + 220)
|
||||
#define ANIM_TAG_DEVIL (ANIM_SPRITES_START + 221)
|
||||
#define ANIM_TAG_SWIPE (ANIM_SPRITES_START + 222)
|
||||
#define ANIM_TAG_ROOTS (ANIM_SPRITES_START + 223)
|
||||
#define ANIM_TAG_ITEM_BAG (ANIM_SPRITES_START + 224)
|
||||
#define ANIM_TAG_JAGGED_MUSIC_NOTE (ANIM_SPRITES_START + 225)
|
||||
#define ANIM_TAG_POKEBALL (ANIM_SPRITES_START + 226)
|
||||
#define ANIM_TAG_SPOTLIGHT (ANIM_SPRITES_START + 227)
|
||||
#define ANIM_TAG_LETTER_Z (ANIM_SPRITES_START + 228)
|
||||
#define ANIM_TAG_RAPID_SPIN (ANIM_SPRITES_START + 229)
|
||||
#define ANIM_TAG_TRI_FORCE_TRIANGLE (ANIM_SPRITES_START + 230)
|
||||
#define ANIM_TAG_WISP_ORB (ANIM_SPRITES_START + 231)
|
||||
#define ANIM_TAG_WISP_FIRE (ANIM_SPRITES_START + 232)
|
||||
#define ANIM_TAG_GOLD_STARS (ANIM_SPRITES_START + 233)
|
||||
#define ANIM_TAG_ECLIPSING_ORB (ANIM_SPRITES_START + 234)
|
||||
#define ANIM_TAG_GRAY_ORB (ANIM_SPRITES_START + 235)
|
||||
#define ANIM_TAG_BLUE_ORB (ANIM_SPRITES_START + 236)
|
||||
#define ANIM_TAG_RED_ORB_2 (ANIM_SPRITES_START + 237)
|
||||
#define ANIM_TAG_PINK_PETAL (ANIM_SPRITES_START + 238)
|
||||
#define ANIM_TAG_PAIN_SPLIT (ANIM_SPRITES_START + 239)
|
||||
#define ANIM_TAG_CONFETTI (ANIM_SPRITES_START + 240)
|
||||
#define ANIM_TAG_GREEN_STAR (ANIM_SPRITES_START + 241)
|
||||
#define ANIM_TAG_PINK_CLOUD (ANIM_SPRITES_START + 242)
|
||||
#define ANIM_TAG_SWEAT_DROP (ANIM_SPRITES_START + 243)
|
||||
#define ANIM_TAG_GUARD_RING (ANIM_SPRITES_START + 244)
|
||||
#define ANIM_TAG_PURPLE_SCRATCH (ANIM_SPRITES_START + 245)
|
||||
#define ANIM_TAG_PURPLE_SWIPE (ANIM_SPRITES_START + 246)
|
||||
#define ANIM_TAG_TAG_HAND (ANIM_SPRITES_START + 247)
|
||||
#define ANIM_TAG_SMALL_RED_EYE (ANIM_SPRITES_START + 248)
|
||||
#define ANIM_TAG_HOLLOW_ORB (ANIM_SPRITES_START + 249)
|
||||
#define ANIM_TAG_X_SIGN (ANIM_SPRITES_START + 250)
|
||||
#define ANIM_TAG_BLUEGREEN_ORB (ANIM_SPRITES_START + 251)
|
||||
#define ANIM_TAG_PAW_PRINT (ANIM_SPRITES_START + 252)
|
||||
#define ANIM_TAG_PURPLE_FLAME (ANIM_SPRITES_START + 253)
|
||||
#define ANIM_TAG_RED_BALL (ANIM_SPRITES_START + 254)
|
||||
#define ANIM_TAG_SMELLINGSALT_EFFECT (ANIM_SPRITES_START + 255)
|
||||
#define ANIM_TAG_METEOR (ANIM_SPRITES_START + 256)
|
||||
#define ANIM_TAG_FLAT_ROCK (ANIM_SPRITES_START + 257)
|
||||
#define ANIM_TAG_MAGNIFYING_GLASS (ANIM_SPRITES_START + 258)
|
||||
#define ANIM_TAG_BROWN_ORB (ANIM_SPRITES_START + 259)
|
||||
#define ANIM_TAG_METAL_SOUND_WAVES (ANIM_SPRITES_START + 260)
|
||||
#define ANIM_TAG_FLYING_DIRT (ANIM_SPRITES_START + 261)
|
||||
#define ANIM_TAG_ICICLE_SPEAR (ANIM_SPRITES_START + 262)
|
||||
#define ANIM_TAG_HAIL (ANIM_SPRITES_START + 263)
|
||||
#define ANIM_TAG_GLOWY_RED_ORB (ANIM_SPRITES_START + 264)
|
||||
#define ANIM_TAG_GLOWY_GREEN_ORB (ANIM_SPRITES_START + 265)
|
||||
#define ANIM_TAG_GREEN_SPIKE (ANIM_SPRITES_START + 266)
|
||||
#define ANIM_TAG_WHITE_CIRCLE_OF_LIGHT (ANIM_SPRITES_START + 267)
|
||||
#define ANIM_TAG_GLOWY_BLUE_ORB (ANIM_SPRITES_START + 268)
|
||||
#define ANIM_TAG_POKEBLOCK (ANIM_SPRITES_START + 269)
|
||||
#define ANIM_TAG_WHITE_FEATHER (ANIM_SPRITES_START + 270)
|
||||
#define ANIM_TAG_SPARKLE_6 (ANIM_SPRITES_START + 271)
|
||||
#define ANIM_TAG_SPLASH (ANIM_SPRITES_START + 272)
|
||||
#define ANIM_TAG_SWEAT_BEAD (ANIM_SPRITES_START + 273)
|
||||
#define ANIM_TAG_GEM_1 (ANIM_SPRITES_START + 274) // unused
|
||||
#define ANIM_TAG_GEM_2 (ANIM_SPRITES_START + 275) // unused
|
||||
#define ANIM_TAG_GEM_3 (ANIM_SPRITES_START + 276) // unused
|
||||
#define ANIM_TAG_SLAM_HIT_2 (ANIM_SPRITES_START + 277)
|
||||
#define ANIM_TAG_RECYCLE (ANIM_SPRITES_START + 278)
|
||||
#define ANIM_TAG_RED_PARTICLES (ANIM_SPRITES_START + 279) // unused
|
||||
#define ANIM_TAG_PROTECT (ANIM_SPRITES_START + 280)
|
||||
#define ANIM_TAG_DIRT_MOUND (ANIM_SPRITES_START + 281)
|
||||
#define ANIM_TAG_SHOCK_3 (ANIM_SPRITES_START + 282)
|
||||
#define ANIM_TAG_WEATHER_BALL (ANIM_SPRITES_START + 283)
|
||||
#define ANIM_TAG_BIRD (ANIM_SPRITES_START + 284)
|
||||
#define ANIM_TAG_CROSS_IMPACT (ANIM_SPRITES_START + 285)
|
||||
#define ANIM_TAG_SLASH_2 (ANIM_SPRITES_START + 286)
|
||||
#define ANIM_TAG_WHIP_HIT (ANIM_SPRITES_START + 287)
|
||||
#define ANIM_TAG_BLUE_RING_2 (ANIM_SPRITES_START + 288)
|
||||
|
||||
// battlers
|
||||
#define ANIM_ATTACKER 0
|
||||
#define ANIM_TARGET 1
|
||||
#define ANIM_ATK_PARTNER 2
|
||||
#define ANIM_DEF_PARTNER 3
|
||||
|
||||
// stereo panning constants [0-255]
|
||||
//
|
||||
// 0
|
||||
// . .
|
||||
// . .
|
||||
// 192 . . 63
|
||||
// . .
|
||||
// . .
|
||||
// . .
|
||||
// 127
|
||||
//
|
||||
#define SOUND_PAN_ATTACKER -64
|
||||
#define SOUND_PAN_TARGET 63
|
||||
|
||||
// move background ids
|
||||
#define BG_DARK_ 0 // the same as BG_DARK but is unused
|
||||
#define BG_DARK 1
|
||||
#define BG_GHOST 2
|
||||
#define BG_PSYCHIC 3
|
||||
#define BG_IMPACT_OPPONENT 4
|
||||
#define BG_IMPACT_PLAYER 5
|
||||
#define BG_IMPACT_CONTESTS 6
|
||||
#define BG_DRILL 7
|
||||
#define BG_DRILL_CONTESTS 8
|
||||
#define BG_HIGHSPEED_OPPONENT 9
|
||||
#define BG_HIGHSPEED_PLAYER 10
|
||||
#define BG_THUNDER 11
|
||||
#define BG_GUILLOTINE_OPPONENT 12
|
||||
#define BG_GUILLOTINE_PLAYER 13
|
||||
#define BG_GUILLOTINE_CONTESTS 14
|
||||
#define BG_ICE 15
|
||||
#define BG_COSMIC 16
|
||||
#define BG_IN_AIR 17
|
||||
#define BG_SKY 18
|
||||
#define BG_SKY_CONTESTS 19
|
||||
#define BG_AURORA 20
|
||||
#define BG_FISSURE 21
|
||||
#define BG_BUG_OPPONENT 22
|
||||
#define BG_BUG_PLAYER 23
|
||||
#define BG_SOLARBEAM_OPPONENT 24
|
||||
#define BG_SOLARBEAM_PLAYER 25
|
||||
#define BG_SOLARBEAM_CONTESTS 26
|
||||
|
||||
// table ids for general animations
|
||||
#define B_ANIM_CASTFORM_CHANGE 0x0
|
||||
#define B_ANIM_STATS_CHANGE 0x1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 0x2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
|
||||
#define B_ANIM_POKEBLOCK_THROW 0x4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 0x5
|
||||
#define B_ANIM_TURN_TRAP 0x6
|
||||
#define B_ANIM_ITEM_EFFECT 0x7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 0x8
|
||||
#define B_ANIM_HANGED_ON 0x9
|
||||
#define B_ANIM_RAIN_CONTINUES 0xA
|
||||
#define B_ANIM_SUN_CONTINUES 0xB
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 0xC
|
||||
#define B_ANIM_HAIL_CONTINUES 0xD
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 0xE
|
||||
#define B_ANIM_MON_HIT 0xF
|
||||
#define B_ANIM_ITEM_STEAL 0x10
|
||||
#define B_ANIM_SNATCH_MOVE 0x11
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 0x13
|
||||
#define B_ANIM_FOCUS_PUNCH_SETUP 0x14
|
||||
#define B_ANIM_INGRAIN_HEAL 0x15
|
||||
#define B_ANIM_WISH_HEAL 0x16
|
||||
#define B_ANIM_x19 0x19
|
||||
|
||||
// special animations table
|
||||
#define B_ANIM_LVL_UP 0x0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
|
||||
#define B_ANIM_BALL_THROW 0x3
|
||||
#define B_ANIM_SAFARI_BALL_THROW 0x4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 0x5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 0x6
|
||||
|
||||
// status animation table
|
||||
#define B_ANIM_STATUS_PSN 0x0
|
||||
#define B_ANIM_STATUS_CONFUSION 0x1
|
||||
#define B_ANIM_STATUS_BRN 0x2
|
||||
#define B_ANIM_STATUS_INFATUATION 0x3
|
||||
#define B_ANIM_STATUS_SLP 0x4
|
||||
#define B_ANIM_STATUS_PRZ 0x5
|
||||
#define B_ANIM_STATUS_FRZ 0x6
|
||||
#define B_ANIM_STATUS_CURSED 0x7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 0x8
|
||||
#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
|
||||
|
||||
// Most tasks return a value to gBattleAnimArgs[7].
|
||||
#define ARG_RET_ID 0x7
|
||||
|
||||
// Trapping Wrap-like moves end turn animation.
|
||||
#define TRAP_ANIM_BIND 0
|
||||
#define TRAP_ANIM_WRAP 0
|
||||
#define TRAP_ANIM_FIRE_SPIN 1
|
||||
#define TRAP_ANIM_WHIRLPOOL 2
|
||||
#define TRAP_ANIM_CLAMP 3
|
||||
#define TRAP_ANIM_SAND_TOMB 4
|
||||
|
||||
// Weather defines for battle animation scripts.
|
||||
#define ANIM_WEATHER_NONE 0
|
||||
#define ANIM_WEATHER_SUN 1
|
||||
#define ANIM_WEATHER_RAIN 2
|
||||
#define ANIM_WEATHER_SANDSTORM 3
|
||||
#define ANIM_WEATHER_HAIL 4
|
||||
|
||||
// Battle mon back animations.
|
||||
#define BACK_ANIM_NONE 0x00
|
||||
#define BACK_ANIM_H_SLIDE_QUICK 0x01
|
||||
#define BACK_ANIM_H_SLIDE 0x02
|
||||
#define BACK_ANIM_H_SLIDE_WITH_V_COMPRESS_1 0x03
|
||||
#define BACK_ANIM_H_SLIDE_WITH_V_COMPRESS_2 0x04
|
||||
#define BACK_ANIM_SHRINK_GROW_1 0x05
|
||||
#define BACK_ANIM_GROW_1 0x06
|
||||
#define BACK_ANIM_CIRCLE_MOVE_COUNTERCLOCKWISE 0x07
|
||||
#define BACK_ANIM_HORIZONTAL_SHAKE 0x08
|
||||
#define BACK_ANIM_VERTICAL_SHAKE 0x09
|
||||
#define BACK_ANIM_V_SHAKE_WITH_H_SLIDE 0x0a
|
||||
#define BACK_ANIM_VERTICAL_STRETCH 0x0b
|
||||
#define BACK_ANIM_HORIZONTAL_STRETCH 0x0c
|
||||
#define BACK_ANIM_GROW_2 0x0d
|
||||
#define BACK_ANIM_V_SHAKE_WITH_PAUSE 0x0e
|
||||
#define BACK_ANIM_CIRCLE_MOVE_CLOCKWISE 0x0f
|
||||
#define BACK_ANIM_CONCAVE_DOWN_ARC_SWAY_SMALL 0x10
|
||||
#define BACK_ANIM_CONCAVE_DOWN_ARC_SWAY_LARGE 0x11
|
||||
#define BACK_ANIM_CONCAVE_UP_ARC_SWAY_LARGE 0x12
|
||||
#define BACK_ANIM_DIP_RIGHT_SIDE 0x13
|
||||
#define BACK_ANIM_SHRINK_GROW_2 0x14
|
||||
#define BACK_ANIM_JOLT_RIGHT 0x15
|
||||
#define BACK_ANIM_FLASH_YELLOW_WITH_SHAKE 0x16
|
||||
#define BACK_ANIM_FADE_RED_WITH_SHAKE 0x17
|
||||
#define BACK_ANIM_FADE_GREEN_WITH_SHAKE 0x18
|
||||
#define BACK_ANIM_FADE_BLUE_WITH_SHAKE 0x19
|
||||
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_ANIM_H
|
||||
@@ -0,0 +1,127 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
#define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
// Battle Scripting and BattleCommunication addresses
|
||||
#define sPAINSPLIT_HP gBattleScripting
|
||||
#define sBIDE_DMG gBattleScripting + 4
|
||||
#define sMULTIHIT_STRING gBattleScripting + 8
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0xE
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0xF
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11
|
||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12
|
||||
#define sMOVEEND_STATE gBattleScripting + 0x14
|
||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15
|
||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16
|
||||
#define sBATTLER gBattleScripting + 0x17
|
||||
#define sB_ANIM_TURN gBattleScripting + 0x18
|
||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19
|
||||
#define sSTATCHANGER gBattleScripting + 0x1A
|
||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B
|
||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C
|
||||
#define sBATTLE_STYLE gBattleScripting + 0x1D
|
||||
#define sLVLBOX_STATE gBattleScripting + 0x1E
|
||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F
|
||||
#define sFIELD_20 gBattleScripting + 0x20
|
||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21
|
||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22
|
||||
#define sFIELD_23 gBattleScripting + 0x23
|
||||
#define sWINDOWS_TYPE gBattleScripting + 0x24
|
||||
#define sMULTIPLAYER_ID gBattleScripting + 0x25
|
||||
#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26
|
||||
|
||||
#define cEFFECT_CHOOSER gBattleCommunication + 3
|
||||
#define cMULTISTRING_CHOOSER gBattleCommunication + 5
|
||||
|
||||
// Battle Script defines for getting the wanted battler
|
||||
#define BS_TARGET 0
|
||||
#define BS_ATTACKER 1
|
||||
#define BS_EFFECT_BATTLER 2
|
||||
#define BS_FAINTED 3
|
||||
#define BS_BATTLER_0 7
|
||||
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_updatestatusicon
|
||||
#define BS_ATTACKER_SIDE 8 // for atk1E_jumpifability
|
||||
#define BS_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
|
||||
#define BS_SCRIPTING 10
|
||||
#define BS_PLAYER1 11
|
||||
#define BS_OPPONENT1 12
|
||||
#define BS_PLAYER2 13 // for atk98_updatestatusicon
|
||||
#define BS_OPPONENT2 14
|
||||
|
||||
// atk 01, accuracy calc
|
||||
#define NO_ACC_CALC 0xFFFE
|
||||
#define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF
|
||||
#define ACC_CURR_MOVE 0
|
||||
|
||||
// compare operands
|
||||
#define CMP_EQUAL 0x0
|
||||
#define CMP_NOT_EQUAL 0x1
|
||||
#define CMP_GREATER_THAN 0x2
|
||||
#define CMP_LESS_THAN 0x3
|
||||
#define CMP_COMMON_BITS 0x4
|
||||
#define CMP_NO_COMMON_BITS 0x5
|
||||
|
||||
// TODO: documentation
|
||||
// atk76, various
|
||||
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
|
||||
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
|
||||
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
|
||||
#define VARIOUS_GET_MOVE_TARGET 3
|
||||
#define VARIOUS_CASE_4 4
|
||||
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
|
||||
#define VARIOUS_CASE_7 7
|
||||
#define VARIOUS_CASE_8 8
|
||||
#define VARIOUS_RETURN_OPPONENT_MON1 9
|
||||
#define VARIOUS_RETURN_OPPONENT_MON2 10
|
||||
#define VARIOUS_CASE_11 11
|
||||
#define VARIOUS_CASE_12 12
|
||||
|
||||
// atk80, dmg manipulation
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1
|
||||
#define ATK80_DMG_DOUBLED 2
|
||||
|
||||
// atk4F, a flag used for the jumpifcantswitch command
|
||||
#define ATK4F_DONT_CHECK_STATUSES 0x80
|
||||
|
||||
// statchange defines
|
||||
#define STAT_CHANGE_BS_PTR 0x1
|
||||
#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20
|
||||
|
||||
// atk48
|
||||
#define ATK48_STAT_NEGATIVE 0x1
|
||||
#define ATK48_STAT_BY_TWO 0x2
|
||||
#define ATK48_ONLY_MULTIPLE 0x4
|
||||
#define ATK48_DONT_CHECK_LOWER 0x8
|
||||
|
||||
// atk49, moveend cases
|
||||
#define ATK49_RAGE 0
|
||||
#define ATK49_DEFROST 1
|
||||
#define ATK49_SYNCHRONIZE_TARGET 2
|
||||
#define ATK49_MOVE_END_ABILITIES 3
|
||||
#define ATK49_STATUS_IMMUNITY_ABILITIES 4
|
||||
#define ATK49_SYNCHRONIZE_ATTACKER 5
|
||||
#define ATK49_CHOICE_MOVE 6
|
||||
#define ATK49_CHANGED_ITEMS 7
|
||||
#define ATK49_ATTACKER_INVISIBLE 8
|
||||
#define ATK49_ATTACKER_VISIBLE 9
|
||||
#define ATK49_TARGET_VISIBLE 10
|
||||
#define ATK49_ITEM_EFFECTS_ALL 11
|
||||
#define ATK49_KINGSROCK_SHELLBELL 12
|
||||
#define ATK49_SUBSTITUTE 13
|
||||
#define ATK49_UPDATE_LAST_MOVES 14
|
||||
#define ATK49_MIRROR_MOVE 15
|
||||
#define ATK49_NEXT_TARGET 16
|
||||
#define ATK49_COUNT 17
|
||||
|
||||
#define BIT_HP 0x1
|
||||
#define BIT_ATK 0x2
|
||||
#define BIT_DEF 0x4
|
||||
#define BIT_SPEED 0x8
|
||||
#define BIT_SPATK 0x10
|
||||
#define BIT_SPDEF 0x20
|
||||
#define BIT_ACC 0x40
|
||||
#define BIT_EVASION 0x80
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
@@ -668,7 +668,7 @@
|
||||
#define FLAG_0x240 0x240
|
||||
#define FLAG_0x241 0x241
|
||||
#define FLAG_0x242 0x242
|
||||
#define FLAG_0x243 0x243
|
||||
#define FLAG_GOT_COIN_CASE 0x243
|
||||
#define FLAG_0x244 0x244
|
||||
#define FLAG_0x245 0x245
|
||||
#define FLAG_0x246 0x246
|
||||
|
||||
@@ -77,4 +77,10 @@
|
||||
#define STAT_ACC 6 // only in battles
|
||||
#define STAT_EVASION 7 // only in battles
|
||||
|
||||
#define NUM_STATS 6
|
||||
#define NUM_BATTLE_STATS 8
|
||||
|
||||
// Shiny odds
|
||||
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_TRAINERS_H
|
||||
#define GUARD_TRAINERS_H
|
||||
|
||||
#define F_TRAINER_FEMALE (1 << 7)
|
||||
|
||||
// All trainer parties specify the IV, level, and species for each Pokémon in the
|
||||
// party. Some trainer parties also specify held items and custom moves for each
|
||||
// Pokémon.
|
||||
#define F_TRAINER_PARTY_CUSTOM_MOVESET (1 << 0)
|
||||
#define F_TRAINER_PARTY_HELD_ITEM (1 << 1)
|
||||
|
||||
#endif // GUARD_TRAINERS_H
|
||||
@@ -39,8 +39,8 @@
|
||||
#define VAR_0x4021 0x4021
|
||||
#define VAR_ICE_STEP_COUNT 0x4022
|
||||
#define VAR_0x4023 0x4023
|
||||
#define VAR_MIRAGE_RND_H 0x4024
|
||||
#define VAR_MIRAGE_RND_L 0x4025
|
||||
#define VAR_0x4024 0x4024
|
||||
#define VAR_0x4025 0x4025
|
||||
#define VAR_SECRET_BASE_MAP 0x4026
|
||||
#define VAR_0x4027 0x4027
|
||||
#define VAR_0x4028 0x4028
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#ifndef GUARD_DATA2_H
|
||||
#define GUARD_DATA2_H
|
||||
#ifndef GUARD_DATA_H
|
||||
#define GUARD_DATA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct MonCoords
|
||||
{
|
||||
// This would use a bitfield, but some function
|
||||
// uses it as a u8 and casting won't match.
|
||||
u8 coords; // u8 x:4, y:4;
|
||||
u8 size; // u8 width:4, height:4;
|
||||
u8 y_offset;
|
||||
};
|
||||
|
||||
@@ -23,8 +24,22 @@ extern const u16 gUnknown_8251FEE[];
|
||||
extern const u16 gUnknown_8252324[];
|
||||
extern const u16 gUnknown_82539D4[];
|
||||
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||
extern const struct CompressedSpriteSheet gMonBackPicTable[];
|
||||
extern const struct CompressedSpritePalette gMonPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
|
||||
extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
|
||||
|
||||
extern const u8 gEnemyMonElevation[NUM_SPECIES];
|
||||
|
||||
extern const u8 *const gBattleAnims_General[];
|
||||
extern const u8 *const gBattleAnims_Special[];
|
||||
|
||||
extern const union AnimCmd *const *const gTrainerBackAnimsPtrTable[];
|
||||
extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[];
|
||||
|
||||
@@ -44,4 +59,4 @@ extern const struct SpriteFrameImage gUnknown_8234788[];
|
||||
extern const struct SpriteFrameImage gUnknown_82347A8[];
|
||||
extern const struct SpriteFrameImage gUnknown_82347C8[];
|
||||
|
||||
#endif // GUARD_DATA2_H
|
||||
#endif // GUARD_DATA_H
|
||||
@@ -38,6 +38,7 @@ void InitializeEasyChatWordArray(u16 *words, u16 length);
|
||||
void ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2);
|
||||
bool8 ECWord_CheckIfOutsideOfValidRange(u16 word);
|
||||
void sub_80BDE28(void);
|
||||
void InitEasyChatPhrases(void);
|
||||
void EnableRareWord(u8);
|
||||
|
||||
#endif // GUARD_EASYCHAT_H
|
||||
|
||||
@@ -36,8 +36,8 @@ bool32 sub_806E2BC(void);
|
||||
void sub_806E6FC(void);
|
||||
void sub_806E2D0(void);
|
||||
void sub_806E370(void);
|
||||
bool32 sub_806E25C(void);
|
||||
|
||||
bool32 IsNationalPokedexEnabled(void);
|
||||
void sub_806E190(void);
|
||||
extern u16 gSpecialVar_0x8000;
|
||||
extern u16 gSpecialVar_0x8001;
|
||||
extern u16 gSpecialVar_0x8002;
|
||||
|
||||
@@ -1153,4 +1153,9 @@ extern const u8 EventScript_SafariRetire[];
|
||||
extern const u8 EventScript_SafariWarpOut[];
|
||||
extern const u8 EventScript_SafariOutOfBalls[];
|
||||
|
||||
extern const u8 EventScript_ItemfinderDigUpUnderfootItem[];
|
||||
|
||||
// new_game
|
||||
extern const u8 EventScript_ResetAllMapFlags[];
|
||||
|
||||
#endif //GUARD_EVENT_SCRIPTS_H
|
||||
|
||||
@@ -85,5 +85,9 @@ void FieldEffectActiveListRemove(u8 id);
|
||||
void sub_8085620(void);
|
||||
void FieldEffectStop(struct Sprite *sprite, u8 id);
|
||||
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
|
||||
void sub_8084454(void);
|
||||
void sub_8084784(u8 a0, u8 a1);
|
||||
void sub_8084F2C(u8 a0);
|
||||
void sub_80853CC(u8 a0);
|
||||
|
||||
#endif //GUARD_FIELD_EFFECTS_H
|
||||
|
||||
@@ -16,4 +16,6 @@ void sub_807DC18(void);
|
||||
void FieldCallback_ReturnToEventScript2(void);
|
||||
void sub_807DC00(void);
|
||||
|
||||
bool32 sub_807E418(void);
|
||||
|
||||
#endif // GUARD_FIELD_FADETRANSITION_H
|
||||
|
||||
@@ -52,9 +52,12 @@ u8 SpawnSpecialFieldObjectParameterized(u8, u8, u8, s16, s16, u8);
|
||||
u8 SpawnSpecialFieldObject(struct MapObjectTemplate *);
|
||||
void sub_8093038(s16, s16, s16 *, s16 *);
|
||||
void CameraObjectReset1(void);
|
||||
void CameraObjectReset2(void);
|
||||
void FieldObjectSetGraphicsId(struct MapObject *, u8);
|
||||
void FieldObjectTurn(struct MapObject *, u8);
|
||||
void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8);
|
||||
void FieldObjectForceSetSpecialAnim(struct MapObject *, u8);
|
||||
u8 sub_8064270(u8 a0);
|
||||
const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8);
|
||||
void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8);
|
||||
void gpu_pal_allocator_reset__manage_upper_four(void);
|
||||
@@ -90,6 +93,7 @@ u8 sub_805EB44(u8, u8, s16, s16);
|
||||
void npc_paltag_set_load(u8 mode);
|
||||
bool8 FieldObjectIsMovementOverridden(struct MapObject *mapObject);
|
||||
u8 FieldObjectCheckHeldMovementStatus(struct MapObject *mapObject);
|
||||
u8 sub_8063F84(u8 direction);
|
||||
|
||||
// Exported data declarations
|
||||
|
||||
|
||||
@@ -28,5 +28,10 @@ u8 GetPlayerAvatarObjectId(void);
|
||||
u8 PlayerGetZCoord(void);
|
||||
u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
void sub_805CB70(void);
|
||||
void sub_805CB04(bool8);
|
||||
void sub_805DC04(void);
|
||||
void sub_805DAB0(void);
|
||||
bool32 sub_805DAD0(void);
|
||||
bool32 sub_805DC24(void);
|
||||
|
||||
#endif //GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
@@ -7,5 +7,7 @@ void sub_80AF79C(void);
|
||||
void sub_807F028(u8);
|
||||
void sub_80B0244(void);
|
||||
void sub_807E3EC(void);
|
||||
void sub_807F114(void);
|
||||
void sub_807F204(u8 taskId);
|
||||
|
||||
#endif // GUARD_FIELD_SCREEN_EFFECT_H
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
enum HiddenItemAttr
|
||||
{
|
||||
HIDDEN_ITEM_ID = 0,
|
||||
HIDDEN_ITEM_FLAG,
|
||||
HIDDEN_ITEM_QUANTITY,
|
||||
HIDDEN_ITEM_UNDERFOOT
|
||||
};
|
||||
|
||||
u8 GetLeadMonIndex(void);
|
||||
u8 CountDigits(u16 number);
|
||||
void TV_PrintIntToStringVar(u8, int);
|
||||
@@ -13,5 +21,8 @@ void nullsub_61(void);
|
||||
u8 ContextNpcGetTextColor(void);
|
||||
void set_unknown_box_id(u8);
|
||||
u16 get_unknown_box_id(void);
|
||||
bool8 sub_80CC7B4(void);
|
||||
u16 GetHiddenItemAttr(struct HiddenItemStruct hiddenItem, u8 attr);
|
||||
u8 GetUnlockedSeviiAreas(void);
|
||||
|
||||
#endif // GUARD_FIELD_SPECIALS_H
|
||||
|
||||
@@ -16,5 +16,7 @@ void PlayRainStoppingSoundEffect(void);
|
||||
bool8 sub_807AA70(void);
|
||||
void SetWeatherScreenFadeOut(void);
|
||||
void sub_807B070(void);
|
||||
u8 GetCurrentWeather(void);
|
||||
void FieldWeather_StartFadingOutCreditsMap(u8, u8, u32);
|
||||
|
||||
#endif // GUARD_WEATHER_H
|
||||
|
||||
@@ -23,5 +23,7 @@ bool8 MapGridIsImpassableAt(s32, s32);
|
||||
s32 GetMapBorderIdAt(s32, s32);
|
||||
bool32 CanCameraMoveInDirection(s32);
|
||||
u32 GetBehaviorByMetatileIdAndMapData(struct MapData *mapData, u16 metatile, u8 attr);
|
||||
const struct MapHeader * mapconnection_get_mapheader(struct MapConnection * connection);
|
||||
struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y);
|
||||
|
||||
#endif //GUARD_FIELDMAP_H
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
gTasks[taskId].data[8] = (u32)func >> 16; \
|
||||
gTasks[taskId].data[9] = (u32)func;
|
||||
|
||||
extern u8 *gUnknown_203AAB0;
|
||||
extern struct MapPosition gPlayerFacingPosition;
|
||||
|
||||
bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId);
|
||||
u8 oei_task_add(void);
|
||||
|
||||
// flash
|
||||
u8 sub_80C9DCC(u8 lightLevel, u8 mapType);
|
||||
u8 sub_80C9D7C(u8 mapType1, u8 mapType2);
|
||||
|
||||
// cut
|
||||
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define IWRAM_DATA __attribute__((section("__DATA,iwram_data")))
|
||||
#define EWRAM_DATA __attribute__((section("__DATA,ewram_data")))
|
||||
#else
|
||||
#define IWRAM_DATA __attribute__((section("iwram_data")))
|
||||
#define EWRAM_DATA __attribute__((section("ewram_data")))
|
||||
#endif
|
||||
|
||||
#define ALIGNED(n) __attribute__((aligned(n)))
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@ struct OamData
|
||||
/*0x06*/ u16 affineParam;
|
||||
};
|
||||
|
||||
#define ST_OAM_HFLIP 0x08
|
||||
#define ST_OAM_VFLIP 0x10
|
||||
#define ST_OAM_MNUM_FLIP_MASK 0x18
|
||||
|
||||
#define ST_OAM_OBJ_NORMAL 0
|
||||
#define ST_OAM_OBJ_BLEND 1
|
||||
#define ST_OAM_OBJ_WINDOW 2
|
||||
|
||||
+22
-14
@@ -120,26 +120,34 @@ struct CoordEvent
|
||||
u8 *script;
|
||||
};
|
||||
|
||||
struct HiddenItemStruct
|
||||
{
|
||||
u32 itemId:16;
|
||||
u32 hiddenItemId:8; // flag offset to determine flag lookup
|
||||
u32 quantity:7;
|
||||
u32 isUnderfoot:1;
|
||||
};
|
||||
|
||||
union BgUnion
|
||||
{ // carried over from diego's FR/LG work, seems to be the same struct
|
||||
// in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union.
|
||||
u8 *script;
|
||||
|
||||
// hidden item type probably
|
||||
struct HiddenItemStruct hiddenItem;
|
||||
|
||||
// secret base type
|
||||
u32 secretBaseId;
|
||||
|
||||
};
|
||||
|
||||
struct BgEvent
|
||||
{
|
||||
u16 x, y;
|
||||
u8 unk4;
|
||||
u8 kind;
|
||||
// 0x2 padding for the union beginning.
|
||||
union { // carried over from diego's FR/LG work, seems to be the same struct
|
||||
// in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union.
|
||||
u8 *script;
|
||||
|
||||
// hidden item type probably
|
||||
struct {
|
||||
u8 filler6[0x2];
|
||||
u16 hiddenItemId; // flag offset to determine flag lookup
|
||||
} hiddenItem;
|
||||
|
||||
// secret base type
|
||||
u32 secretBaseId;
|
||||
|
||||
} bgUnion;
|
||||
union BgUnion bgUnion;
|
||||
};
|
||||
|
||||
struct MapEvents
|
||||
|
||||
+17
-6
@@ -205,6 +205,14 @@ struct UnkSaveBlock2Substruct_55C
|
||||
/* 0x016:0x572 */ u8 unk_16;
|
||||
}; // size: 0x018
|
||||
|
||||
struct UnkSaveBlock2Substruct_B0
|
||||
{
|
||||
/* 0x000:0x0B0 */ u8 field_0[0x3F0];
|
||||
/* 0x3F0:0x4A0 */ u32 field_3F0[0x2F];
|
||||
/* 0x4AC:0x55C */ struct UnkSaveBlock2Substruct_55C field_4AC;
|
||||
/* 0x4C4:0x574 */ u8 field_4C4[0x324];
|
||||
}; // size: 0x7E8
|
||||
|
||||
struct SaveBlock2
|
||||
{
|
||||
/*0x000*/ u8 playerName[PLAYER_NAME_LENGTH];
|
||||
@@ -227,14 +235,16 @@ struct SaveBlock2
|
||||
/*0x098*/ struct Time localTimeOffset;
|
||||
/*0x0A0*/ struct Time lastBerryTreeUpdate;
|
||||
/*0x0A8*/ u32 field_A8;
|
||||
/*0x0AC*/ u8 filler_AC[0x3F4];
|
||||
/*0x4A0*/ u32 unk_4A0[0x2F];
|
||||
/*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C;
|
||||
/*0x574*/ u8 filler_574[0x324];
|
||||
/*0x0AC*/ u8 field_AC;
|
||||
/*0x0AD*/ u8 field_AD;
|
||||
/*0x0AE*/ u8 filler_AE[0x2];
|
||||
/*0x0B0*/ struct UnkSaveBlock2Substruct_B0 unk_B0;
|
||||
/*0x898*/ u16 mapView[0x100];
|
||||
/*0xA98*/ struct LinkBattleRecords linkBattleRecords;
|
||||
/*0xAF0*/ struct BerryCrush berryCrush;
|
||||
/*0xB00*/ u8 filler_B00[0x420];
|
||||
/*0xB00*/ struct PokemonJumpResults pokeJump;
|
||||
/*0xB10*/ struct BerryPickingResults berryPick;
|
||||
/*0xB20*/ u8 filler_B20[0x400];
|
||||
/*0xF20*/ u32 encryptionKey;
|
||||
};
|
||||
|
||||
@@ -498,7 +508,8 @@ typedef union QuestLogScene QuestLogScene;
|
||||
#define BERRY_TREES_COUNT 128
|
||||
#define FLAGS_COUNT 288 // 300
|
||||
#define VARS_COUNT 256
|
||||
#define MAIL_COUNT 16
|
||||
#define MAIL_COUNT (PARTY_SIZE + 10)
|
||||
#define PC_MAIL_NUM(i) (PARTY_SIZE + (i))
|
||||
|
||||
// Declare here so that it can be recursively referenced.
|
||||
union QuestLogMovement;
|
||||
|
||||
+34
-2
@@ -176,7 +176,7 @@ extern const u32 gTradeGba_Gfx[];
|
||||
extern const u8 gUnknown_8E86240[];
|
||||
extern const u8 gUnknown_8E86BE8[];
|
||||
extern const u8 gUnknown_8E86D6C[];
|
||||
extern const u8 gUnknown_8E86F98[];
|
||||
extern const u32 gUnknown_8E86F98[];
|
||||
|
||||
// berry_fix_program
|
||||
extern const u8 gBerryFixGameboy_Gfx[];
|
||||
@@ -201,7 +201,7 @@ extern const u8 gBerryFixWindow_Pal[];
|
||||
// item_pc
|
||||
|
||||
extern const u8 gItemPcTiles[];
|
||||
extern const u8 gItemPcBgPals[];
|
||||
extern const u32 gItemPcBgPals[];
|
||||
extern const u8 gItemPcTilemap[];
|
||||
|
||||
// item_menu_icons
|
||||
@@ -974,4 +974,36 @@ extern const u8 gGraphics_TitleScreen_CopyrightPressStartMap[];
|
||||
extern const u16 gGraphics_TitleScreen_FirePals[];
|
||||
extern const u8 gGraphics_TitleScreen_BlankObjTiles[];
|
||||
|
||||
extern const u32 gHealthboxSinglesPlayerGfx[];
|
||||
extern const u32 gHealthboxSinglesOpponentGfx[];
|
||||
extern const u32 gHealthboxDoublesPlayerGfx[];
|
||||
extern const u32 gHealthboxDoublesOpponentGfx[];
|
||||
extern const u32 gHealthboxSafariGfx[];
|
||||
extern const u32 gBlankGfxCompressed[];
|
||||
extern const u16 gBattleInterface_BallStatusBarPal[];
|
||||
extern const u16 gBattleInterface_BallDisplayPal[];
|
||||
extern const u32 gFile_graphics_interface_hp_numbers[];
|
||||
|
||||
extern const u32 gGhostFrontPic[];
|
||||
extern const u32 gGhostPalette[];
|
||||
extern const u32 gSubstituteDollGfx[];
|
||||
extern const u32 gSubstituteDollTilemap[];
|
||||
extern const u32 gSubstituteDollPal[];
|
||||
|
||||
// credits
|
||||
extern const u32 gCreditsPokeballBgGfxTiles[];
|
||||
extern const u32 gCreditsPokeballBgGfxMap[];
|
||||
extern const u16 gCreditsMonBackdropPals[][16];
|
||||
extern const u16 gCreditsAllRightsReservedGfxPal[];
|
||||
extern const u8 gCreditsAllRightsReservedGfxTiles[];
|
||||
extern const u8 gCreditsAllRightsReservedGfxMap[];
|
||||
|
||||
// berry_pouch
|
||||
extern const u32 gBerryPouchSpriteTiles[];
|
||||
extern const u8 gBerryPouchBgGfx[];
|
||||
extern const u32 gBerryPouchBgPals[];
|
||||
extern const u32 gBerryPouchBgPal0FemaleOverride[];
|
||||
extern const u32 gBerryPouchSpritePalette[];
|
||||
extern const u8 gBerryPouchBg1Tilemap[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
||||
+5
-5
@@ -62,20 +62,20 @@ u8 ItemId_GetBattleUsage(u16 itemId);
|
||||
ItemUseFunc ItemId_GetBattleFunc(u16 itemId);
|
||||
u8 ItemId_GetSecondaryId(u16 itemId);
|
||||
u16 itemid_get_market_price(u16 itemId);
|
||||
void ClearItemSlotsInAllBagPockets(void);
|
||||
void ClearBag(void);
|
||||
void ClearPCItemSlots(void);
|
||||
void CopyItemName(u16, u8 *);
|
||||
void sub_809A824(u16 itemId);
|
||||
bool8 AddBagItem(u16 itemId, u16 amount);
|
||||
|
||||
void SortPocketAndPlaceHMsFirst(struct BagPocket *);
|
||||
u16 BagGetItemIdByPocketPosition(u8 a0, u16 a1);
|
||||
u16 BagGetQuantityByPocketPosition(u8 a0, u16 a1);
|
||||
void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket);
|
||||
u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 itemId);
|
||||
u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 itemId);
|
||||
bool8 itemid_is_unique(u16 itemId);
|
||||
void BagPocketCompaction(struct ItemSlot * slots, u8 capacity);
|
||||
u16 GetPcItemQuantity(u16 *);
|
||||
|
||||
void ItemPcCompaction(void);
|
||||
void RemoveItemFromPC(u16 itemId, u16 quantity);
|
||||
void SortAndCompactBagPocket(struct BagPocket * pocket);
|
||||
|
||||
#endif // GUARD_ITEM_H
|
||||
|
||||
@@ -26,6 +26,7 @@ extern u16 gSpecialVar_ItemId;
|
||||
void sub_81AAC50(void);
|
||||
void sub_81AAC70(void);
|
||||
void sub_8108CF0(void);
|
||||
void sub_81089BC(void);
|
||||
void sub_810B108(u8);
|
||||
void ReturnToBagFromKeyItem(void);
|
||||
void ItemMenu_MoveItemSlotToNewPositionInArray(struct ItemSlot * slots, int pos1, int pos2);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef GUARD_ITEMFINDER_H
|
||||
#define GUARD_ITEMFINDER_H
|
||||
|
||||
void sub_813EC8C(u8 taskId);
|
||||
void ItemUseOnFieldCB_Itemfinder(u8 taskId);
|
||||
|
||||
#endif //GUARD_ITEMFINDER_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef GUARD_LIBGCMMULTIBOOT_H
|
||||
#ifndef GUARD_LIBGCNMULTIBOOT_H
|
||||
#define GUARD_LIBGCNMULTIBOOT_H
|
||||
|
||||
struct GcmbStruct
|
||||
|
||||
+137
-4
@@ -1,3 +1,6 @@
|
||||
#ifndef GUARD_LIBRFU_H
|
||||
#define GUARD_LIBRFU_H
|
||||
|
||||
#include "main.h"
|
||||
|
||||
enum
|
||||
@@ -116,8 +119,8 @@ struct RfuStruct
|
||||
void (*callbackM)();
|
||||
void (*callbackS)();
|
||||
u32 callbackID;
|
||||
union RfuPacket *txPacket;
|
||||
union RfuPacket *rxPacket;
|
||||
union RfuPacket * txPacket;
|
||||
union RfuPacket * rxPacket;
|
||||
vu8 unk_2c;
|
||||
u8 padding[3];
|
||||
};
|
||||
@@ -130,6 +133,136 @@ struct RfuIntrStruct
|
||||
u8 block2[0x30];
|
||||
};
|
||||
|
||||
extern struct RfuStruct *gRfuState;
|
||||
struct RfuUnk1
|
||||
{
|
||||
u16 unk_0;
|
||||
u8 unk_2;
|
||||
u8 unk_3;
|
||||
u8 fill_4[14];
|
||||
u8 unk_12;
|
||||
u32 unk_14;
|
||||
u32 unk_18;
|
||||
struct RfuIntrStruct unk_1c;
|
||||
};
|
||||
|
||||
void STWI_init_all(struct RfuIntrStruct *interruptStruct, IntrFunc *interrupt, bool8 copyInterruptToRam);
|
||||
struct RfuUnk2
|
||||
{
|
||||
u16 unk_0;
|
||||
u16 unk_2;
|
||||
u8 fill_4[0x16];
|
||||
u8 unk_1a;
|
||||
u8 fill_1b[0x19];
|
||||
u16 unk_34;
|
||||
u16 unk_36;
|
||||
u8 fill_38[0x16];
|
||||
u8 unk_4e;
|
||||
u8 fill_4f[0x12];
|
||||
u8 unk_61;
|
||||
u8 fill_62[6];
|
||||
void *unk_68;
|
||||
void *unk_6c;
|
||||
u8 unk_70[0x70];
|
||||
};
|
||||
|
||||
struct RfuUnk3
|
||||
{
|
||||
u32 unk_0;
|
||||
u32 unk_4;
|
||||
u8 unk_8[0xD4];
|
||||
u32 unk_dc;
|
||||
};
|
||||
|
||||
struct RfuUnk5Sub
|
||||
{
|
||||
u16 unk_00;
|
||||
u8 unk_02;
|
||||
u16 unk_04;
|
||||
struct UnkLinkRfuStruct_02022B14 unk_06;
|
||||
u8 fill_13[1];
|
||||
u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
};
|
||||
|
||||
struct RfuUnk5
|
||||
{
|
||||
u8 unk_00;
|
||||
u8 unk_01;
|
||||
u8 unk_02;
|
||||
u8 unk_03;
|
||||
u8 unk_04;
|
||||
u8 unk_05;
|
||||
u8 unk_06;
|
||||
u8 unk_07;
|
||||
u8 unk_08;
|
||||
u8 filler_09[1];
|
||||
u8 unk_0a[4];
|
||||
u8 filler_0e[6];
|
||||
struct RfuUnk5Sub unk_14[4];
|
||||
};
|
||||
|
||||
extern struct RfuStruct * gRfuState;
|
||||
|
||||
extern struct RfuUnk5 * gUnknown_3007460;
|
||||
extern u32 *gUnknown_3007464;
|
||||
extern struct RfuUnk3 * gUnknown_3007468;
|
||||
extern struct RfuUnk2 * gUnknown_3007450[4];
|
||||
extern struct RfuUnk1 * gUnknown_3007440[4];
|
||||
extern struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u8 fill6[4];
|
||||
u16 unkA;
|
||||
} gUnknown_3007470;
|
||||
|
||||
extern void rfu_STC_clearAPIVariables(void);
|
||||
|
||||
void STWI_init_all(struct RfuIntrStruct * interruptStruct, IntrFunc *interrupt, bool8 copyInterruptToRam);
|
||||
void rfu_REQ_stopMode(void);
|
||||
void rfu_waitREQComplete(void);
|
||||
u32 rfu_REQBN_softReset_and_checkID(void);
|
||||
void rfu_REQ_sendData(u8);
|
||||
void rfu_setMSCCallback(void (*func)(u16));
|
||||
void rfu_setREQCallback(void (*func)(u16, u16));
|
||||
bool8 rfu_getMasterSlave(void);
|
||||
void rfu_REQBN_watchLink(u16 a0, u8 *a1, u8 *a2, u8 *a3);
|
||||
bool16 rfu_syncVBlank(void);
|
||||
void rfu_REQ_reset(void);
|
||||
void rfu_REQ_configSystem(u16, u8, u8);
|
||||
void rfu_REQ_configGameData(u8, u16, struct UnkLinkRfuStruct_02022B14 *, u8 *);
|
||||
void rfu_REQ_startSearchChild(void);
|
||||
void rfu_REQ_pollSearchChild(void);
|
||||
void rfu_REQ_endSearchChild(void);
|
||||
void rfu_REQ_startSearchParent(void);
|
||||
void rfu_REQ_pollSearchParent(void);
|
||||
void rfu_REQ_endSearchParent(void);
|
||||
void rfu_REQ_startConnectParent(u16);
|
||||
void rfu_REQ_pollConnectParent(void);
|
||||
void rfu_REQ_endConnectParent(void);
|
||||
void rfu_REQ_CHILD_startConnectRecovery(u8);
|
||||
void rfu_REQ_CHILD_pollConnectRecovery(void);
|
||||
void rfu_REQ_CHILD_endConnectRecovery(void);
|
||||
void rfu_REQ_changeMasterSlave(void);
|
||||
void rfu_REQ_RFUStatus(void);
|
||||
void rfu_getRFUStatus(u8 *status);
|
||||
u8 *rfu_getSTWIRecvBuffer(void);
|
||||
u8 rfu_NI_CHILD_setSendGameName(u8 a0, u8 a1);
|
||||
void rfu_clearSlot(u8 a0, u8 a1);
|
||||
void rfu_clearAllSlot(void);
|
||||
bool16 rfu_CHILD_getConnectRecoveryStatus(u8 *status);
|
||||
bool16 rfu_getConnectParentStatus(u8 *status, u8 *a1);
|
||||
bool16 rfu_UNI_PARENT_getDRAC_ACK(u8 *a0);
|
||||
void rfu_REQ_disconnect(u8 who);
|
||||
void rfu_changeSendTarget(u8 a0, u8 who, u8 a2);
|
||||
void rfu_NI_stopReceivingData(u8 who);
|
||||
u16 rfu_initializeAPI(u32 *unk0, u16 unk1, IntrFunc *interrupt, bool8 copyInterruptToRam);
|
||||
void rfu_setTimerInterrupt(u8 which, IntrFunc *intr);
|
||||
void rfu_setRecvBuffer(u8 a0, u8 a1, void *a2, size_t a3);
|
||||
bool16 rfu_UNI_setSendData(u8 flag, void *ptr, u8 size);
|
||||
void rfu_REQ_recvData(void);
|
||||
void rfu_UNI_readySendData(u8 a0);
|
||||
void rfu_UNI_clearRecvNewDataFlag(u8 a0);
|
||||
void rfu_REQ_PARENT_resumeRetransmitAndChange(void);
|
||||
void rfu_NI_setSendData(u8, u8, const void *, u32);
|
||||
|
||||
#endif // GUARD_LIBRFU_H
|
||||
|
||||
+61
-14
@@ -9,6 +9,9 @@
|
||||
#define QUEUE_CAPACITY 50
|
||||
#define BLOCK_BUFFER_SIZE 0x100
|
||||
|
||||
#define LINK_SLAVE 0
|
||||
#define LINK_MASTER 8
|
||||
|
||||
#define LINK_STAT_LOCAL_ID 0x00000003
|
||||
#define LINK_STAT_PLAYER_COUNT 0x0000001C
|
||||
#define LINK_STAT_PLAYER_COUNT_SHIFT 2
|
||||
@@ -18,7 +21,23 @@
|
||||
#define LINK_STAT_CONN_ESTABLISHED_SHIFT 6
|
||||
#define LINK_STAT_RECEIVED_NOTHING 0x00000100
|
||||
#define LINK_STAT_RECEIVED_NOTHING_SHIFT 8
|
||||
#define LINK_STAT_UNK_FLAG_9 0x00000200
|
||||
#define LINK_STAT_UNK_FLAG_9_SHIFT 9
|
||||
#define LINK_STAT_ERRORS 0x0007F000
|
||||
#define LINK_STAT_ERRORS_SHIFT 12
|
||||
|
||||
#define LINK_STAT_ERROR_HARDWARE 0x00001000
|
||||
#define LINK_STAT_ERROR_HARDWARE_SHIFT 12
|
||||
#define LINK_STAT_ERROR_CHECKSUM 0x00002000
|
||||
#define LINK_STAT_ERROR_CHECKSUM_SHIFT 13
|
||||
#define LINK_STAT_ERROR_QUEUE_FULL 0x00004000
|
||||
#define LINK_STAT_ERROR_QUEUE_FULL_SHIFT 14
|
||||
#define LINK_STAT_ERROR_LAG_MASTER 0x00010000
|
||||
#define LINK_STAT_ERROR_LAG_MASTER_SHIFT 16
|
||||
#define LINK_STAT_ERROR_INVALID_ID 0x00020000
|
||||
#define LINK_STAT_ERROR_INVALID_ID_SHIFT 17
|
||||
#define LINK_STAT_ERROR_LAG_SLAVE 0x00040000
|
||||
#define LINK_STAT_ERROR_LAG_SLAVE_SHIFT 18
|
||||
|
||||
#define EXTRACT_PLAYER_COUNT(status) \
|
||||
(((status) & LINK_STAT_PLAYER_COUNT) >> LINK_STAT_PLAYER_COUNT_SHIFT)
|
||||
@@ -28,6 +47,23 @@
|
||||
(((status) >> LINK_STAT_CONN_ESTABLISHED_SHIFT) & 1)
|
||||
#define EXTRACT_RECEIVED_NOTHING(status) \
|
||||
(((status) >> LINK_STAT_RECEIVED_NOTHING_SHIFT) & 1)
|
||||
#define EXTRACT_LINK_ERRORS(status) \
|
||||
(((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT)
|
||||
|
||||
#define LINKCMD_SEND_LINK_TYPE 0x2222
|
||||
#define LINKCMD_0x2FFE 0x2FFE
|
||||
#define LINKCMD_SEND_HELD_KEYS 0x4444
|
||||
#define LINKCMD_0x5555 0x5555
|
||||
#define LINKCMD_0x5566 0x5566
|
||||
#define LINKCMD_0x5FFF 0x5FFF
|
||||
#define LINKCMD_0x6666 0x6666
|
||||
#define LINKCMD_0x7777 0x7777
|
||||
#define LINKCMD_CONT_BLOCK 0x8888
|
||||
#define LINKCMD_0xAAAA 0xAAAA
|
||||
#define LINKCMD_0xAAAB 0xAAAB
|
||||
#define LINKCMD_INIT_BLOCK 0xBBBB
|
||||
#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE
|
||||
#define LINKCMD_0xCCCC 0xCCCC
|
||||
|
||||
#define MASTER_HANDSHAKE 0x8FFF
|
||||
#define SLAVE_HANDSHAKE 0xB9A0
|
||||
@@ -47,6 +83,10 @@ enum
|
||||
EXCHANGE_COMPLETE,
|
||||
EXCHANGE_TIMED_OUT,
|
||||
EXCHANGE_IN_PROGRESS,
|
||||
EXCHANGE_STAT_4,
|
||||
EXCHANGE_STAT_5,
|
||||
EXCHANGE_STAT_6,
|
||||
EXCHANGE_STAT_7
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -138,28 +178,28 @@ extern u16 gRecvCmds[MAX_RFU_PLAYERS][CMD_LENGTH];
|
||||
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
|
||||
extern u16 gLinkType;
|
||||
extern u32 gLinkStatus;
|
||||
extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
|
||||
extern u16 gBlockRecvBuffer[MAX_RFU_PLAYERS][BLOCK_BUFFER_SIZE / 2];
|
||||
extern u16 gSendCmd[CMD_LENGTH];
|
||||
extern u8 gShouldAdvanceLinkState;
|
||||
extern struct LinkPlayer gLinkPlayers[];
|
||||
extern u16 word_3002910[];
|
||||
extern bool8 gReceivedRemoteLinkPlayers;
|
||||
extern bool8 gLinkVSyncDisabled;
|
||||
extern u8 gWirelessCommType;
|
||||
|
||||
extern u8 gUnknown_3003F84;
|
||||
extern u64 gSioMlt_Recv;
|
||||
extern u8 gShouldAdvanceLinkState;
|
||||
|
||||
void Task_DestroySelf(u8);
|
||||
void OpenLink(void);
|
||||
void CloseLink(void);
|
||||
u16 LinkMain2(u16 *);
|
||||
u16 LinkMain2(const u16 *);
|
||||
void sub_8007B14(void);
|
||||
bool32 sub_8007B24(void);
|
||||
void ClearLinkCallback(void);
|
||||
void ClearLinkCallback_2(void);
|
||||
u8 GetLinkPlayerCount(void);
|
||||
void OpenLinkTimed(void);
|
||||
u8 GetLinkPlayerDataExchangeStatusTimed(void);
|
||||
u8 GetLinkPlayerDataExchangeStatusTimed(int lower, int higher);
|
||||
bool8 IsLinkPlayerDataExchangeComplete(void);
|
||||
u32 GetLinkPlayerTrainerId(u8);
|
||||
void ResetLinkPlayers(void);
|
||||
@@ -180,7 +220,7 @@ bool8 IsLinkConnectionEstablished(void);
|
||||
void SetSuppressLinkErrorMessage(bool8);
|
||||
bool8 HasLinkErrorOccurred(void);
|
||||
void ResetSerial(void);
|
||||
u32 LinkMain1(u8 *, u16 *, u16[CMD_LENGTH][MAX_LINK_PLAYERS]);
|
||||
u32 LinkMain1(u8 *, u16 *, u16[MAX_RFU_PLAYERS][CMD_LENGTH]);
|
||||
void RFUVSync(void);
|
||||
void Timer3Intr(void);
|
||||
void SerialCB(void);
|
||||
@@ -191,23 +231,30 @@ void sub_800E0E8(void);
|
||||
bool8 sub_800A520(void);
|
||||
bool8 sub_8010500(void);
|
||||
void sub_800DFB4(u8, u8);
|
||||
void sub_800ADF8(void);
|
||||
void sub_800AB9C(void);
|
||||
void sub_800B488(void);
|
||||
void sub_8009734(void);
|
||||
void sub_800A620(void);
|
||||
void sub_8011BD0(void);
|
||||
u8 sub_800ABAC(void);
|
||||
u8 sub_800ABBC(void);
|
||||
void sub_800AC34(void);
|
||||
void sub_8009804(void);
|
||||
bool8 sub_800AA48(void);
|
||||
void sub_800A5BC(void);
|
||||
void sub_800AA80(u8);
|
||||
void sub_800AAC0(void);
|
||||
void OpenLink(void);
|
||||
bool8 IsLinkMaster(void);
|
||||
void CheckShouldAdvanceLinkState(void);
|
||||
void sub_800AA80(u16 a0);
|
||||
void sub_80098D8(void);
|
||||
void CloseLink(void);
|
||||
bool8 sub_800A4BC(void);
|
||||
bool8 IsLinkTaskFinished(void);
|
||||
bool32 sub_800B270(void);
|
||||
void sub_800B388(void);
|
||||
void ResetSerial(void);
|
||||
void sub_8054A28(void);
|
||||
void sub_800B1F4(void);
|
||||
void LoadWirelessStatusIndicatorSpriteGfx(void);
|
||||
void CreateWirelessStatusIndicatorSprite(u8, u8);
|
||||
void sub_8009FE8(void);
|
||||
void ClearLinkCallback_2(void);
|
||||
void sub_80FA42C(void);
|
||||
void sub_800B284(struct LinkPlayer * linkPlayer);
|
||||
|
||||
#endif // GUARD_LINK_H
|
||||
|
||||
+22
-1
@@ -11,12 +11,33 @@ bool32 MG_PrintTextOnWindow1AndWaitButton(u8 * cmdPtr, const u8 * src);
|
||||
void sub_80FA190(void);
|
||||
void MG_DrawCheckerboardPattern(void);
|
||||
void task_add_05_task_del_08FA224_when_no_RfuFunc(void);
|
||||
bool8 IsNoOneConnected(void);
|
||||
bool8 IsRfuTaskFinished(void);
|
||||
void DestroyWirelessStatusIndicatorSprite(void);
|
||||
void MEvent_CreateTask_CardOrNewsWithFriend(u8);
|
||||
void MEvent_CreateTask_CardOrNewsOverWireless(u8);
|
||||
void MEvent_CreateTask_Leader(u8);
|
||||
void sub_80F9E2C(void * data);
|
||||
u8 sub_8116DE0(void);
|
||||
void sub_80FBB4C(void);
|
||||
void sub_80F86F4(void);
|
||||
void sub_80FB128(bool32 a0);
|
||||
u32 sub_80FD3A4(void);
|
||||
bool32 IsSendingKeysToRfu(void);
|
||||
void Rfu_set_zero(void);
|
||||
u8 GetRfuPlayerCount(void);
|
||||
void sub_80F9828(void);
|
||||
u8 rfu_get_multiplayer_id(void);
|
||||
bool8 Rfu_InitBlockSend(const void * src, u16 size);
|
||||
bool8 sub_80FA0F8(u8 a0);
|
||||
u8 Rfu_GetBlockReceivedStatus(void);
|
||||
void Rfu_SetBlockReceivedFlag(u8 who);
|
||||
void Rfu_ResetBlockReceivedFlag(u8 who);
|
||||
bool8 Rfu_IsMaster(void);
|
||||
void sub_80F85F8(void);
|
||||
bool32 sub_80FAE94(void);
|
||||
bool32 sub_80FAEF0(void);
|
||||
bool32 IsRfuRecvQueueEmpty(void);
|
||||
u32 GetRfuRecvQueueLength(void);
|
||||
void sub_80F8DC0(void);
|
||||
|
||||
#endif //GUARD_LINK_RFU_H
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_MAILBOX_PC_H
|
||||
#define GUARD_MAILBOX_PC_H
|
||||
|
||||
bool8 MailboxPC_InitBuffers(u8 num);
|
||||
u8 MailboxPC_GetAddWindow(u8 winIdx);
|
||||
void MailboxPC_RemoveWindow(u8 winIdx);
|
||||
u8 MailboxPC_GetWindowId(u8 winIdx);
|
||||
u8 MailboxPC_InitListMenu(struct PlayerPC_Unk_203AAC4 * playerPcStruct);
|
||||
void MailboxPC_AddScrollIndicatorArrows(struct PlayerPC_Unk_203AAC4 * playerPcStruct);
|
||||
void MailboxPC_DestroyListMenuBuffer(void);
|
||||
|
||||
#endif //GUARD_MAILBOX_PC_H
|
||||
@@ -67,8 +67,11 @@ void SetVBlankCounter1Ptr(u32 *ptr);
|
||||
void DisableVBlankCounter1(void);
|
||||
void StartTimer1(void);
|
||||
void SeedRngAndSetTrainerId(void);
|
||||
u16 GetGeneratedTrainerIdLower(void);
|
||||
|
||||
extern const char RomHeaderGameCode[4];
|
||||
extern const char RomHeaderSoftwareVersion;
|
||||
|
||||
extern u8 gLinkTransferringData;
|
||||
|
||||
#endif // GUARD_MAIN_H
|
||||
|
||||
@@ -47,5 +47,7 @@ struct MapPreviewScreen
|
||||
u16 sub_80F8318(u8 id);
|
||||
void sub_80F85BC(u16 a0);
|
||||
u16 sub_80F856C(u8 id);
|
||||
bool8 sub_80F8110(u8 mapsec, bool8 forceFirstTime);
|
||||
bool32 sub_80F83B0(void);
|
||||
|
||||
#endif //GUARD_MAP_PREVIEW_SCREEN_H
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ struct MenuAction
|
||||
};
|
||||
|
||||
// menu2
|
||||
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const struct TextColor * color, s8 speed, const u8 * str);
|
||||
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
|
||||
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const u8 * color, s8 speed, const u8 * str);
|
||||
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
||||
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing);
|
||||
void sub_812E6DC(u8 windowId, const u8 * src, u16 x, u16 y);
|
||||
void StartBlendTask(u8 eva_start, u8 evb_start, u8 eva_end, u8 evb_end, u8 ev_step, u8 priority);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "task.h"
|
||||
#include "window.h"
|
||||
|
||||
struct YesNoFuncTable
|
||||
{
|
||||
@@ -22,7 +23,7 @@ void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 tileNum, u8 palet
|
||||
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 fontId, u8 left, u8 top, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
|
||||
u8 GetLRKeysState(void);
|
||||
u8 sub_80BF66C(void);
|
||||
bool8 sub_80BF6A8(u16 itemId);
|
||||
bool8 itemid_link_can_give_berry(u16 itemId);
|
||||
bool8 itemid_80BF6D8_mail_related(u16 itemId);
|
||||
void ClearVramOamPltt(void);
|
||||
|
||||
|
||||
@@ -66,5 +66,6 @@ void MENews_RemoveScrollIndicatorArrowPair(void);
|
||||
bool32 WonderNews_Test_Unk_02(void);
|
||||
bool32 WonderCard_Test_Unk_08_6(void);
|
||||
u32 MENews_GetInput(u16 input);
|
||||
void sub_8143D24(void);
|
||||
|
||||
#endif //GUARD_MEVENT_H
|
||||
|
||||
+3
-10
@@ -3,17 +3,10 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void WriteUnalignedWord(u32 var, u8 *dataPtr);
|
||||
u32 ReadUnalignedWord(u8* dataPtr);
|
||||
void CopyUnalignedWord(u8 *copyTo, u8 *copyFrom);
|
||||
void InitPlayerTrainerId(void);
|
||||
void SetDefaultOptions(void);
|
||||
void ClearPokedexFlags(void);
|
||||
void WarpToTruck(void);
|
||||
void SetTrainerId(u32 trainerId, u8 *dst);
|
||||
void CopyTrainerId(u8 *dst, u8 *src);
|
||||
void NewGameInitData(void);
|
||||
void ResetMiniGamesResults(void);
|
||||
void sub_808447C(void);
|
||||
void Sav2_ClearSetDefault(void);
|
||||
void ResetMenuAndMonGlobals(void);
|
||||
void Sav2_ClearSetDefault(void);
|
||||
|
||||
#endif // GUARD_NEW_GAME_H
|
||||
|
||||
@@ -30,7 +30,7 @@ void sub_80F6E9C(void);
|
||||
void DrawDialogueFrame(u8 windowId, bool8 transfer);
|
||||
void DrawStdWindowFrame(u8 windowId, bool8 copyNow);
|
||||
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
void ClearStdWindowAndFrame(u8 taskId, bool8 copyNow);
|
||||
void ClearStdWindowAndFrame(u8 windowId, bool8 copyNow);
|
||||
void sub_80F6C14(void);
|
||||
void sub_80F771C(bool8 copyToVram);
|
||||
void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
||||
|
||||
+30
-5
@@ -1,5 +1,5 @@
|
||||
#ifndef GUARD_ROM4_H
|
||||
#define GUARD_ROM4_H
|
||||
#ifndef GUARD_OVERWORLD_H
|
||||
#define GUARD_OVERWORLD_H
|
||||
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
@@ -23,6 +23,18 @@ struct UCoords32
|
||||
u32 x, y;
|
||||
};
|
||||
|
||||
struct CreditsOverworldCmd
|
||||
{
|
||||
s16 unk_0;
|
||||
u16 unk_2;
|
||||
u16 unk_4;
|
||||
};
|
||||
|
||||
/* gDisableMapMusicChangeOnMapLoad */
|
||||
#define MUSIC_DISABLE_OFF 0
|
||||
#define MUSIC_DISABLE_STOP 1
|
||||
#define MUSIC_DISABLE_KEEP 2
|
||||
|
||||
extern struct UCoords32 gDirectionToVectors[];
|
||||
|
||||
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4];
|
||||
@@ -37,7 +49,7 @@ void IncrementGameStat(u8 index);
|
||||
void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
|
||||
void Overworld_SetMapObjTemplateMovementType(u8, u8);
|
||||
|
||||
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
|
||||
void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void SetDynamicWarpWithCoords(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
@@ -96,8 +108,9 @@ void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y);
|
||||
void ResetInitialPlayerAvatarState(void);
|
||||
void sub_8055D40(u16 mapDataId);
|
||||
void CleanupOverworldWindowsAndTilemaps(void);
|
||||
u32 sub_8054C04(void);
|
||||
|
||||
extern u8 gUnknown_2031DD8;
|
||||
extern u8 gDisableMapMusicChangeOnMapLoad;
|
||||
extern u8 gUnknown_2036E28;
|
||||
|
||||
extern void (*gFieldCallback)(void);
|
||||
@@ -118,5 +131,17 @@ bool8 is_light_level_8_or_9(u8 mapType);
|
||||
bool32 sub_8055C9C(void);
|
||||
void Overworld_ResetStateAfterDigEscRope(void);
|
||||
bool32 sub_8058244(void);
|
||||
u8 GetCurrentMapType(void);
|
||||
|
||||
#endif //GUARD_ROM4_H
|
||||
u8 get_map_light_from_warp0(void);
|
||||
const struct MapHeader *warp1_get_mapheader(void);
|
||||
void sub_8055F88(void);
|
||||
void sub_8056788(void);
|
||||
void ResetGameStats(void);
|
||||
|
||||
void Overworld_CreditsMainCB(void);
|
||||
bool32 Overworld_DoScrollSceneForCredits(u8 *, const struct CreditsOverworldCmd *, u8);
|
||||
|
||||
bool32 sub_8058318(void);
|
||||
|
||||
#endif //GUARD_OVERWORLD_H
|
||||
|
||||
+28
-30
@@ -3,8 +3,6 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#define gPaletteFade_selectedPalettes (gPaletteFade.multipurpose1) // normal and fast fade
|
||||
#define gPaletteFade_blendCnt (gPaletteFade.multipurpose1) // hardware fade
|
||||
#define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade
|
||||
@@ -13,10 +11,15 @@
|
||||
#define PLTT_BUFFER_SIZE 0x200
|
||||
#define PLTT_DECOMP_BUFFER_SIZE (PLTT_BUFFER_SIZE * 2)
|
||||
|
||||
#define PALETTE_FADE_STATUS_DELAY 2
|
||||
#define PALETTE_FADE_STATUS_ACTIVE 1
|
||||
#define PALETTE_FADE_STATUS_DONE 0
|
||||
#define PALETTE_FADE_STATUS_LOADING 0xFF
|
||||
|
||||
enum
|
||||
{
|
||||
FAST_FADE_IN_FROM_WHITE,
|
||||
FAST_FADE_OUT_TO_WHTIE,
|
||||
FAST_FADE_OUT_TO_WHITE,
|
||||
FAST_FADE_IN_FROM_BLACK,
|
||||
FAST_FADE_OUT_TO_BLACK,
|
||||
};
|
||||
@@ -39,44 +42,39 @@ struct PaletteFadeControl
|
||||
u16 softwareFadeFinishing:1;
|
||||
u16 objPaletteToggle:1;
|
||||
u8 deltaY:4; // rate of change of blend coefficient
|
||||
u32 unused;
|
||||
};
|
||||
|
||||
extern struct PaletteFadeControl gPaletteFade;
|
||||
extern u32 gPlttBufferTransferPending;
|
||||
extern u8 *gUnknown_203AAB0;
|
||||
extern u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE];
|
||||
extern u16 gPlttBufferFaded[PLTT_BUFFER_SIZE];
|
||||
|
||||
void LoadCompressedPalette(const void *, u16, u16);
|
||||
void LoadPalette(const void *, u16, u16);
|
||||
void FillPalette(u16, u16, u16);
|
||||
void LoadCompressedPalette(const u32 *src, u16 offset, u16 size);
|
||||
void LoadPalette(const void *src, u16 offset, u16 size);
|
||||
void FillPalette(u16 value, u16 offset, u16 size);
|
||||
void TransferPlttBuffer(void);
|
||||
u8 UpdatePaletteFade(void);
|
||||
void ResetPaletteFade(void);
|
||||
void ReadPlttIntoBuffers(void);
|
||||
bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
|
||||
bool8 unref_sub_8073D3C(u32, u8, u8, u8, u16);
|
||||
void unref_sub_8073D84(u8, u32 *);
|
||||
void ResetPaletteStructByUid(u16);
|
||||
void ResetPaletteStruct(u8);
|
||||
void ResetPaletteFadeControl();
|
||||
void unref_sub_8074168(u16);
|
||||
void unref_sub_8074194(u16);
|
||||
void InvertPlttBuffer(u32);
|
||||
void TintPlttBuffer(u32, s8, s8, s8);
|
||||
void UnfadePlttBuffer(u32);
|
||||
void BeginFastPaletteFade(u8);
|
||||
void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
|
||||
void BlendPalettes(u32, u8, u16);
|
||||
void BlendPalettesUnfaded(u32, u8, u16);
|
||||
void sub_80716F8(const u16 *, u16 *, u16, u8);
|
||||
void TintPalette_GrayScale(u16 *, u16);
|
||||
void TintPalette_GrayScale2(u16 *, u16);
|
||||
void TintPalette_SepiaTone(u16 *, u16);
|
||||
void sub_80717A8(u32, s8, u8, u8, u16, u8, u8);
|
||||
bool32 sub_807185C(u8);
|
||||
bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targetY, u16 blendColor);
|
||||
void ResetPaletteFadeControl(void);
|
||||
void InvertPlttBuffer(u32 selectedPalettes);
|
||||
void TintPlttBuffer(u32 selectedPalettes, s8 r, s8 g, s8 b);
|
||||
void UnfadePlttBuffer(u32 selectedPalettes);
|
||||
void BeginFastPaletteFade(u8 submode);
|
||||
void BeginHardwarePaletteFade(u8 blendCnt, u8 delay, u8 y, u8 targetY, u8 shouldResetBlendRegisters);
|
||||
void BlendPalettes(u32 selectedPalettes, u8 coeff, u16 color);
|
||||
void BlendPalettesUnfaded(u32 selectedPalettes, u8 coeff, u16 color);
|
||||
void TintPalette_GrayScale(u16 *palette, u16 count);
|
||||
void TintPalette_GrayScale2(u16 *palette, u16 count);
|
||||
void TintPalette_SepiaTone(u16 *palette, u16 count);
|
||||
void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 bTone);
|
||||
void sub_80716F8(const u16 *src, u16 *dst, u16 count, u8 a4);
|
||||
void sub_80717A8(u32 a1, s8 a2, u8 a3, u8 a4, u16 a5, u8 a6, u8 a7);
|
||||
bool32 sub_807185C(u8 var);
|
||||
void sub_8071898(void);
|
||||
|
||||
extern struct PaletteFadeControl gPaletteFade;
|
||||
void ResetPaletteStructByUid(u16 a1);
|
||||
void ResetPaletteStruct(u8 paletteNum);
|
||||
|
||||
#endif // GUARD_PALETTE_H
|
||||
|
||||
+22
-2
@@ -10,7 +10,19 @@ enum {
|
||||
AILMENT_PRZ,
|
||||
AILMENT_SLP,
|
||||
AILMENT_FRZ,
|
||||
AILMENT_BRN
|
||||
AILMENT_BRN,
|
||||
AILMENT_PKRS,
|
||||
AILMENT_FNT
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PARTY_CHOOSE_MON,
|
||||
PARTY_MUST_CHOOSE_MON,
|
||||
PARTY_CANT_SWITCH,
|
||||
PARTY_USE_ITEM_ON,
|
||||
PARTY_ABILITY_PREVENTS,
|
||||
PARTY_GIVE_ITEM,
|
||||
};
|
||||
|
||||
struct Struct203B0A0
|
||||
@@ -29,7 +41,9 @@ struct Struct203B0A0
|
||||
};
|
||||
|
||||
extern struct Struct203B0A0 gUnknown_203B0A0;
|
||||
|
||||
extern u8 gUnknown_203B0C0;
|
||||
extern u8 gUnknown_203B0C1;
|
||||
extern u8 gUnknown_203B0DC[3];
|
||||
extern void (*gUnknown_3005E98)(u8 taskId, TaskFunc func);
|
||||
|
||||
bool8 FieldCallback_PrepareFadeInFromMenu(void);
|
||||
@@ -62,5 +76,11 @@ void sub_81279E0(void);
|
||||
void ItemUseCB_Medicine(u8 taskId, TaskFunc followUpFunc);
|
||||
u8 GetItemEffectType(u16 itemId);
|
||||
u8 pokemon_order_func(u8);
|
||||
void sub_8127CAC(void);
|
||||
void sub_8127DA8(u8 battlerId, u8 multiplayerFlag);
|
||||
void OpenPartyMenuInBattle(u8 arg);
|
||||
void sub_8127EC4(u8 battlerId, u8 unk, u8 arrayIndex);
|
||||
bool8 IsMultiBattle(void);
|
||||
void sub_8126EDC(void);
|
||||
|
||||
#endif // GUARD_PARTY_MENU_H
|
||||
|
||||
@@ -2,13 +2,25 @@
|
||||
#define GUARD_PLAYER_PC_H
|
||||
|
||||
#include "global.h"
|
||||
#include "list_menu.h"
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
struct PlayerPC_Unk_203AAC4
|
||||
{
|
||||
u16 selectedRow;
|
||||
u16 scrollOffset;
|
||||
u8 unk_4;
|
||||
u8 unk_5;
|
||||
u8 filler_6[4];
|
||||
u8 unk_A;
|
||||
};
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
|
||||
void sub_816B060(u8 taskId);
|
||||
void NewGameInitPCItems(void);
|
||||
|
||||
#endif //GUARD_PLAYER_PC_H
|
||||
|
||||
@@ -31,5 +31,6 @@ void sub_8076918(u8 bank);
|
||||
void DoHitAnimHealthboxEffect(u8 bank);
|
||||
void LoadBallGfx(u8 ballId);
|
||||
void FreeBallGfx(u8 ballId);
|
||||
void sub_804BD94(u8 battler);
|
||||
|
||||
#endif // GUARD_POKEBALL_H
|
||||
|
||||
@@ -45,4 +45,6 @@ u16 GetNationalPokedexCount(u8);
|
||||
u16 sub_80C0844(u8);
|
||||
u16 GetKantoPokedexCount(u8);
|
||||
|
||||
u32 sub_8106B60(u16 species);
|
||||
|
||||
#endif // GUARD_POKEDEX_H
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef GUARD_POKEDEX_AREA_MARKERS_H
|
||||
#define GUARD_POKEDEX_AREA_MARKERS_H
|
||||
|
||||
struct PAM_TaskData
|
||||
{
|
||||
struct SubspriteTable subsprites;
|
||||
void * buffer;
|
||||
u8 unk_0C;
|
||||
u8 spr_id;
|
||||
u16 tilesTag;
|
||||
u16 unk_10;
|
||||
};
|
||||
|
||||
void SetAreaSubsprite(s32 i, s32 whichArea, struct Subsprite * subsprites);
|
||||
|
||||
#endif //GUARD_POKEDEX_AREA_MARKERS_H
|
||||
+14
-11
@@ -50,7 +50,7 @@
|
||||
#define MON_DATA_SPATK_IV 43
|
||||
#define MON_DATA_SPDEF_IV 44
|
||||
#define MON_DATA_IS_EGG 45
|
||||
#define MON_DATA_ALT_ABILITY 46
|
||||
#define MON_DATA_ABILITY_NUM 46
|
||||
#define MON_DATA_TOUGH 47
|
||||
#define MON_DATA_SHEEN 48
|
||||
#define MON_DATA_OT_GENDER 49
|
||||
@@ -94,6 +94,8 @@
|
||||
#define MON_DATA_SPATK2 87
|
||||
#define MON_DATA_SPDEF2 88
|
||||
|
||||
#define MAX_LEVEL 100
|
||||
|
||||
#define OT_ID_RANDOM_NO_SHINY 2
|
||||
#define OT_ID_PRESET 1
|
||||
#define OT_ID_PLAYER_ID 0
|
||||
@@ -244,7 +246,7 @@ struct PokemonSubstruct3
|
||||
/* 0x05 */ u32 spAttackIV:5;
|
||||
/* 0x06 */ u32 spDefenseIV:5;
|
||||
/* 0x07 */ u32 isEgg:1;
|
||||
/* 0x07 */ u32 altAbility:1;
|
||||
/* 0x07 */ u32 abilityNum:1;
|
||||
|
||||
/* 0x08 */ u32 coolRibbon:3;
|
||||
/* 0x08 */ u32 beautyRibbon:3;
|
||||
@@ -342,7 +344,7 @@ struct BattleTowerPokemon
|
||||
u32 spAttackIV:5;
|
||||
u32 spDefenseIV:5;
|
||||
u32 gap:1;
|
||||
u32 altAbility:1;
|
||||
u32 abilityNum:1;
|
||||
/*0x1C*/ u32 personality;
|
||||
/*0x20*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x2B*/ u8 friendship;
|
||||
@@ -366,7 +368,7 @@ struct BattlePokemon
|
||||
/*0x16*/ u32 spAttackIV:5;
|
||||
/*0x17*/ u32 spDefenseIV:5;
|
||||
/*0x17*/ u32 isEgg:1;
|
||||
/*0x17*/ u32 altAbility:1;
|
||||
/*0x17*/ u32 abilityNum:1;
|
||||
/*0x18*/ s8 statStages[BATTLE_STATS_NO];
|
||||
/*0x20*/ u8 ability;
|
||||
/*0x21*/ u8 type1;
|
||||
@@ -539,6 +541,7 @@ extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1];
|
||||
extern const u16 *const gLevelUpLearnsets[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
extern const u8 gFacilityClassToTrainerClass[];
|
||||
extern const struct SpriteTemplate gUnknown_825DEF0[];
|
||||
|
||||
void ZeroBoxMonData(struct BoxPokemon *boxMon);
|
||||
void ZeroMonData(struct Pokemon *mon);
|
||||
@@ -597,7 +600,7 @@ u8 GiveMonToPlayer(struct Pokemon *mon);
|
||||
u8 CalculatePlayerPartyCount(void);
|
||||
u8 CalculateEnemyPartyCount(void);
|
||||
u8 GetMonsStateToDoubles(void);
|
||||
u8 GetAbilityBySpecies(u16 species, bool8 altAbility);
|
||||
u8 GetAbilityBySpecies(u16 species, bool8 abilityNum);
|
||||
u8 GetMonAbility(struct Pokemon *mon);
|
||||
u8 GetSecretBaseTrainerPicIndex(void);
|
||||
u8 GetSecretBaseTrainerNameIndex(void);
|
||||
@@ -607,8 +610,8 @@ u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex);
|
||||
void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex);
|
||||
void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex);
|
||||
bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex);
|
||||
bool8 PokemonUseItemEffects(struct Pokemon *pkmn, u16 item, u8 partyIndex, u8 moveIndex, u8 e);
|
||||
bool8 PokemonUseItemEffects2(struct Pokemon *pkmn, u16 item, u8 partyIndex, u8 moveIndex, u8 e);
|
||||
bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, u8 e);
|
||||
bool8 PokemonUseItemEffects2(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex);
|
||||
u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit);
|
||||
const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId);
|
||||
u8 GetNature(struct Pokemon *mon);
|
||||
@@ -620,8 +623,8 @@ u16 SpeciesToCryId(u16 species);
|
||||
void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4);
|
||||
void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies);
|
||||
bool8 sub_80435E0(void);
|
||||
bool8 GetLinkTrainerFlankId(u8 linkPlayerId);
|
||||
s32 GetBankMultiplayerId(u16 a1);
|
||||
bool16 GetLinkTrainerFlankId(u8 linkPlayerId);
|
||||
s32 GetBattlerMultiplayerId(u16 a1);
|
||||
u8 GetTrainerEncounterMusicId(u16 trainer);
|
||||
void AdjustFriendship(struct Pokemon *mon, u8 event);
|
||||
void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies);
|
||||
@@ -640,7 +643,7 @@ void ClearBattleMonForms(void);
|
||||
void PlayBattleBGM(void);
|
||||
void PlayMapChosenOrBattleBGM(u16 songId);
|
||||
const u32 *GetMonFrontSpritePal(struct Pokemon *mon);
|
||||
const u32 *GetFrontSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality);
|
||||
const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality);
|
||||
const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon);
|
||||
const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16 species, u32 otId , u32 personality);
|
||||
bool32 IsHMMove2(u16 move);
|
||||
@@ -650,7 +653,7 @@ bool8 IsTradedMon(struct Pokemon *mon);
|
||||
bool8 IsOtherTrainer(u32 otId, u8 *otName);
|
||||
void MonRestorePP(struct Pokemon *mon);
|
||||
void BoxMonRestorePP(struct BoxPokemon *boxMon);
|
||||
void sub_8044348(void);
|
||||
void SetMonPreventsSwitchingString(void);
|
||||
void SetWildMonHeldItem(void);
|
||||
bool8 IsMonShiny(struct Pokemon *mon);
|
||||
u8 *GetTrainerPartnerName(void);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_POKEMON_JUMP_H
|
||||
#define GUARD_POKEMON_JUMP_H
|
||||
|
||||
#include "main.h"
|
||||
|
||||
void ResetPokeJumpResults(void);
|
||||
|
||||
#endif // GUARD_POKEMON_JUMP_H
|
||||
@@ -11,6 +11,9 @@ void InitLotadSizeRecord(void);
|
||||
void GetLotadSizeRecordInfo(void);
|
||||
void CompareLotadSize(void);
|
||||
|
||||
void sub_80A0904(void);
|
||||
void sub_80A0958(void);
|
||||
|
||||
void GiveGiftRibbonToParty(u8 index, u8 ribbonId);
|
||||
|
||||
#endif // GUARD_POKEMON_SIZE_RECORD_H
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_POKEMON_SPECIAL_ANIM_H
|
||||
#define GUARD_POKEMON_SPECIAL_ANIM_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void sub_811E5B8(u16, u16, u16, u16, u16, u16);
|
||||
bool8 sub_811E680(void);
|
||||
void GetMonLevelUpWindowStats(struct Pokemon *mon, u16 *currStats);
|
||||
void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr);
|
||||
void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 shadowClr);
|
||||
|
||||
#endif // GUARD_POKEMON_SPECIAL_ANIM_H
|
||||
@@ -14,6 +14,7 @@ u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request);
|
||||
void sub_808BCB4(u8 boxId, u8 monPosition);
|
||||
u8 * GetBoxNamePtr(u8 boxId);
|
||||
void sub_808CE60(void);
|
||||
void ResetPokemonStorageSystem(void);
|
||||
u8 StorageGetCurrentBox(void);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef GUARD_POKEMON_SUMMARY_SCREEN_H
|
||||
#define GUARD_POKEMON_SUMMARY_SCREEN_H
|
||||
|
||||
#include "main.h"
|
||||
|
||||
extern u8 gLastViewedMonIndex;
|
||||
|
||||
extern const u8 *const gMoveDescriptionPointers[];
|
||||
extern const u8 *const gNatureNamePointers[];
|
||||
|
||||
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||
void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16);
|
||||
void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||
u8 sub_8138B2C(void);
|
||||
void SummaryScreen_SetUnknownTaskId(u8 a0);
|
||||
void SummaryScreen_DestroyUnknownTask(void);
|
||||
|
||||
// The Pokemon Summary Screen can operate in different modes. Certain features,
|
||||
// such as move re-ordering, are available in the different modes.
|
||||
enum PokemonSummaryScreenMode
|
||||
{
|
||||
PSS_MODE_NORMAL,
|
||||
PSS_MODE_UNK1,
|
||||
PSS_MODE_BOX,
|
||||
PSS_MODE_SELECT_MOVE,
|
||||
};
|
||||
|
||||
enum PokemonSummaryScreenPage
|
||||
{
|
||||
PSS_PAGE_INFO,
|
||||
PSS_PAGE_SKILLS,
|
||||
PSS_PAGE_BATTLE_MOVES,
|
||||
PSS_PAGE_CONTEST_MOVES,
|
||||
};
|
||||
|
||||
#endif // GUARD_POKEMON_SUMMARY_SCREEN_H
|
||||
@@ -32,6 +32,9 @@ void sub_8112EDC(u8 a0);
|
||||
u8 sub_8112EB4(void);
|
||||
void sub_8113018(const u8 * text, u8 mode);
|
||||
void MapNamePopupWindowIdSetDummy(void);
|
||||
void sub_8111CF0(void);
|
||||
void sub_811089C(void);
|
||||
void sub_8113044(void);
|
||||
|
||||
extern u8 gUnknown_203ADFA;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void nullsub_35(void);
|
||||
void nullsub_44(void);
|
||||
void ReshowBattleScreenAfterMenu(void);
|
||||
|
||||
#endif // GUARD_RESHOW_BATTLE_SCREEN_H
|
||||
|
||||
@@ -15,5 +15,6 @@ u8 TryStartRoamerEncounter(void);
|
||||
void UpdateRoamerHPStatus(struct Pokemon *mon);
|
||||
void SetRoamerInactive(void);
|
||||
void GetRoamerLocation(u8 *mapGroup, u8 *mapNum);
|
||||
u16 GetRoamerLocationMapSectionId(void);
|
||||
|
||||
#endif // GUARD_ROAMER_H
|
||||
|
||||
@@ -4,5 +4,7 @@
|
||||
#include "global.h"
|
||||
|
||||
void AppendToList(u8* list, u8* pos, u8 newEntry);
|
||||
void sub_806F1F0(u8 taskId);
|
||||
void sub_806F1D4(void);
|
||||
|
||||
#endif // GUARD_START_MENU_H
|
||||
|
||||
+129
-1
@@ -94,6 +94,7 @@ extern const u8 gText_Pokemon[];
|
||||
extern const u8 gText_PkmnFainted3[];
|
||||
|
||||
extern const u8 gOtherText_Use[];
|
||||
extern const u8 gOtherText_Toss[];
|
||||
extern const u8 gOtherText_Give[];
|
||||
extern const u8 gOtherText_Exit[];
|
||||
extern const u8 gText_ThreeHyphens[];
|
||||
@@ -179,7 +180,7 @@ extern const u8 gUnknown_841623D[];
|
||||
extern const u8 gUnknown_84162BD[];
|
||||
extern const u8 gUnknown_841D148[];
|
||||
|
||||
// pokemon.c
|
||||
// pokemon
|
||||
extern const u8 BattleText_Rose[];
|
||||
extern const u8 BattleText_UnknownString3[];
|
||||
extern const u8 BattleText_GetPumped[];
|
||||
@@ -208,4 +209,131 @@ extern const u8 gString_OutOfCoins[];
|
||||
extern const u8 gString_QuitPlaying[];
|
||||
extern const u8 gString_SlotMachineControls[];
|
||||
|
||||
// battle_controller_safari
|
||||
extern const u8 gUnknown_83FDA4C[];
|
||||
extern const u8 gUnknown_83FE747[];
|
||||
extern const u8 gUnknown_83FE6E6[];
|
||||
|
||||
// battle_controller_player
|
||||
extern const u8 gText_BattleSwitchWhich[];
|
||||
extern const u8 gUnknown_83FE770[];
|
||||
extern const u8 gText_MoveInterfacePP[];
|
||||
extern const u8 gUnknown_83FE770[];
|
||||
extern const u8 gText_MoveInterfaceType[];
|
||||
extern const u8 gText_LinkStandby[];
|
||||
extern const u8 gUnknown_83FE725[];
|
||||
extern const u8 gText_WhatWillPkmnDo[];
|
||||
|
||||
// battle_script_commands
|
||||
extern const u8 gText_BattleYesNoChoice[];
|
||||
|
||||
// credits
|
||||
extern const u8 gString_Dummy[];
|
||||
extern const u8 gString_PokemonFireRed_Staff[]; // FR
|
||||
extern const u8 gString_PokemonLeafGreen_Staff[]; // LG
|
||||
extern const u8 gCreditsString_Director[];
|
||||
extern const u8 gCreditsString_Junichi_Masuda[];
|
||||
extern const u8 gCreditsString_Art_Director_Battle_Director[];
|
||||
extern const u8 gCreditsString_Ken_Sugimori_Shigeki_Morimoto[];
|
||||
extern const u8 gCreditsString_Program_Leader_Planning_Leader_Graphic_Design_Leader[];
|
||||
extern const u8 gCreditsString_Tetsuya_Watanabe_Koji_Nishino_Takao_Unno[];
|
||||
extern const u8 gCreditsString_Programmers[];
|
||||
extern const u8 gCreditsString_Hiroyuki_Nakamura_Masao_Taya_Satoshi_Nohara_Miyuki_Iwasawa_Daisuke_Goto[];
|
||||
extern const u8 gCreditsString_System_Programmers[];
|
||||
extern const u8 gCreditsString_Tetsuya_Watanabe_Akito_Mori_Hisashi_Sogabe_Sousuke_Tamada[];
|
||||
extern const u8 gCreditsString_Graphic_Designers[];
|
||||
extern const u8 gCreditsString_Takao_Unno_Asuka_Iwashita_Kanako_Eo_Hiroki_Fuchino[];
|
||||
extern const u8 gCreditsString_Graphic_Designers_2[];
|
||||
extern const u8 gCreditsString_Ken_Sugimori_Hironobu_Yoshida[];
|
||||
extern const u8 gCreditsString_Music_Composition[];
|
||||
extern const u8 gCreditsString_Go_Ichinose_Junichi_Masuda[];
|
||||
extern const u8 gCreditsString_Sound_Effects[];
|
||||
extern const u8 gCreditsString_Go_Ichinose[];
|
||||
extern const u8 gCreditsString_Game_Designers[];
|
||||
extern const u8 gCreditsString_Junichi_Masuda_Koji_Nishino_Tetsuji_Ohta[];
|
||||
extern const u8 gCreditsString_Game_Designers_2[];
|
||||
extern const u8 gCreditsString_Hitomi_Sato_Shigeru_Ohmori_Tadashi_Takahashi[];
|
||||
extern const u8 gCreditsString_Game_Scenario[];
|
||||
extern const u8 gCreditsString_Hitomi_Sato_Satoshi_Tajiri[];
|
||||
extern const u8 gCreditsString_Script_Designer_Map_Designer[];
|
||||
extern const u8 gCreditsString_Satoshi_Nohara_Shigeru_Ohmori[];
|
||||
extern const u8 gCreditsString_Parametric_Designers[];
|
||||
extern const u8 gCreditsString_Koji_Nishino_Tetsuji_Ohta_Shigeki_Morimoto[];
|
||||
extern const u8 gCreditsString_POKeDEX_Text[];
|
||||
extern const u8 gCreditsString_Kenji_Matsushima[];
|
||||
extern const u8 gCreditsString_POKeMON_Designers[];
|
||||
extern const u8 gCreditsString_Ken_Sugimori_Motofumi_Fujiwara_Shigeki_Morimoto_Hironobu_Yoshida[];
|
||||
extern const u8 gCreditsString_POKeMON_Designers_2[];
|
||||
extern const u8 gCreditsString_Satoshi_Ohta_Asuka_Iwashita_Takao_Unno_Kanako_Eo_Aimi_Tomita[];
|
||||
extern const u8 gCreditsString_POKeMON_Designers_3[];
|
||||
extern const u8 gCreditsString_Atsuko_Nishida_Muneo_Saito_Rena_Yoshikawa_Jun_Okutani[];
|
||||
extern const u8 gCreditsString_Supporting_Programmers[];
|
||||
extern const u8 gCreditsString_Teruyuki_Yoshioka_Takao_Nakano_Satoshi_Mitsuhara_Daisuke_Hoshino[];
|
||||
extern const u8 gCreditsString_NCL_Product_Testing[];
|
||||
extern const u8 gCreditsString_NCL_Super_Mario_Club[];
|
||||
extern const u8 gCreditsString_Special_Thanks[];
|
||||
extern const u8 gCreditsString_Hiro_Nakamura_Hiroyuki_Uesugi_Teruki_Murakawa_Kazuya_Suyama[];
|
||||
extern const u8 gCreditsString_Special_Thanks_2[];
|
||||
extern const u8 gCreditsString_Kenji_Tominaga_Kenjiro_Ito_Tomotaka_Komura_Michiko_Takizawa[];
|
||||
extern const u8 gCreditsString_Special_Thanks_3[];
|
||||
extern const u8 gCreditsString_Makiko_Takada_Mikiko_Ohashi_Shusaku_Egami_Takanao_Kondo_Rui_Kawaguchi[];
|
||||
extern const u8 gCreditsString_Braille_Code_Check[];
|
||||
extern const u8 gCreditsString_Japan_Braille_Library[];
|
||||
extern const u8 gCreditsString_Information_Supervisors[];
|
||||
extern const u8 gCreditsString_Hiroki_Enomoto_Kazuyuki_Terada_Yuri_Sakurai_Yumi_Funasaka_Naoko_Yanase[];
|
||||
extern const u8 gCreditsString_Coordinators[];
|
||||
extern const u8 gCreditsString_Azusa_Tajima_Akira_Kinashi_Kazuki_Yoshihara_Retsuji_Nomoto[];
|
||||
extern const u8 gCreditsString_Task_Managers[];
|
||||
extern const u8 gCreditsString_Hitoshi_Yamagami_Gakuji_Nomoto[];
|
||||
extern const u8 gCreditsString_Producers[];
|
||||
extern const u8 gCreditsString_Hiroyuki_Jinnai_Takehiro_Izushi_Hiroaki_Tsuru[];
|
||||
extern const u8 gCreditsString_Executive_Director[];
|
||||
extern const u8 gCreditsString_Satoshi_Tajiri[];
|
||||
extern const u8 gCreditsString_Executive_Producer[];
|
||||
extern const u8 gCreditsString_Satoru_Iwata[];
|
||||
extern const u8 gCreditsString_Executive_Producer_2[];
|
||||
extern const u8 gCreditsString_Tsunekaz_Ishihara[];
|
||||
extern const u8 gCreditsString_English_Version_Coordinators[];
|
||||
extern const u8 gCreditsString_Hiro_Nakamura_Seth_McMahill[];
|
||||
extern const u8 gCreditsString_Translator_Text_Editor[];
|
||||
extern const u8 gCreditsString_Nob_Ogasawara_Teresa_Lillygren[];
|
||||
extern const u8 gCreditsString_Programmers_2[];
|
||||
extern const u8 gCreditsString_Teruki_Murakawa_Souichi_Yamamoto_Yuichiro_Ito_Akira_Kinashi[];
|
||||
extern const u8 gCreditsString_Environment_Tool_Programmers[];
|
||||
extern const u8 gCreditsString_Teruki_Murakawa_Souichi_Yamamoto_Kimiko_Nakamichi[];
|
||||
extern const u8 gCreditsString_NOA_Product_Testing[];
|
||||
extern const u8 gCreditsString_Thomas_Hertzog_Kathy_Huguenard_Mika_Kurosawa[];
|
||||
extern const u8 gCreditsString_Braille_Code_Check_2[];
|
||||
extern const u8 gCreditsString_National_Federation_of_the_Blind_Patricia_A_Maurer_Japan_Braille_Library_European_Blind_Union[];
|
||||
extern const u8 gCreditsString_Braille_Code_Check_3[];
|
||||
extern const u8 gCreditsString_National_Information_Library_Service_Margaret_Campion[];
|
||||
extern const u8 gCreditsString_Special_Thanks_4[];
|
||||
extern const u8 gCreditsString_Takehiro_Izushi_Motoyasu_Tojima_Hitoshi_Yamagami_Hiroyuki_Uesugi[];
|
||||
extern const u8 gCreditsString_Special_Thanks_5[];
|
||||
extern const u8 gCreditsString_Nicola_Pratt_Barlow_Shellie_Dow_Anthony_Howitt_Naoko_Saeki_Kyoko_Onishi[];
|
||||
extern const u8 gCreditsString_Braille_Code_Check_4[];
|
||||
extern const u8 gCreditsString_The_Royal_New_Zealand_Foundation_of_the_Blind_Greg_Moran[];
|
||||
extern const u8 gCreditsString_Graphic_Designer[];
|
||||
extern const u8 gCreditsString_Akira_Kinashi[];
|
||||
|
||||
// berry_pouch
|
||||
extern const u8 gText_TheStrVar1CantBeHeldHere[];
|
||||
extern const u8 gText_TossOutHowManyStrVar1s[];
|
||||
extern const u8 gText_ThrewAwayStrVar2StrVar1s[];
|
||||
extern const u8 gText_ThrowAwayStrVar2OfThisItemQM[];
|
||||
extern const u8 gText_BerryPouch[];
|
||||
extern const u8 gText_TheBerryPouchWillBePutAway[];
|
||||
|
||||
// itemfinder
|
||||
extern const u8 gText_ItemfinderResponding[];
|
||||
extern const u8 gText_ItemfinderShakingWildly[];
|
||||
extern const u8 gText_NopeTheresNoResponse[];
|
||||
|
||||
// link
|
||||
extern const u8 gText_CommErrorEllipsis[];
|
||||
extern const u8 gText_MoveCloserToLinkPartner[];
|
||||
extern const u8 gText_CommErrorCheckConnections[];
|
||||
extern const u8 gText_ABtnTitleScreen[];
|
||||
extern const u8 gText_ABtnRegistrationCounter[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
||||
+25
-30
@@ -83,7 +83,16 @@
|
||||
#define TEXT_COLOR_DARK_GREY 0x2
|
||||
|
||||
// battle placeholders are located in battle_message.h
|
||||
|
||||
#define EXT_CTRL_CODE_COLOR 0x1
|
||||
#define EXT_CTRL_CODE_HIGHLIGHT 0x2
|
||||
#define EXT_CTRL_CODE_SHADOW 0x3
|
||||
//
|
||||
#define EXT_CTRL_CODE_UNKNOWN_7 0x7
|
||||
//
|
||||
#define EXT_CTRL_CODE_CLEAR 0x11
|
||||
//
|
||||
#define EXT_CTRL_CODE_CLEAR_TO 0x13
|
||||
#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14
|
||||
#define EXT_CTRL_CODE_JPN 0x15
|
||||
#define EXT_CTRL_CODE_ENG 0x16
|
||||
|
||||
@@ -105,18 +114,13 @@ enum
|
||||
|
||||
struct TextPrinterSubStruct
|
||||
{
|
||||
u8 font_type:4; // 0x14
|
||||
u8 font_type_upper:1;
|
||||
u8 glyphId:4; // 0x14
|
||||
bool8 hasPrintBeenSpedUp:1;
|
||||
u8 font_type_5:3;
|
||||
u8 field_1:5;
|
||||
u8 field_1_upmid:2;
|
||||
u8 field_1_top:1;
|
||||
u8 frames_visible_counter;
|
||||
u8 field_3;
|
||||
u8 field_4; // 0x18
|
||||
u8 field_5;
|
||||
u8 field_6;
|
||||
u8 active;
|
||||
u8 downArrowDelay:5;
|
||||
u8 downArrowYPosIdx:2;
|
||||
u8 hasGlyphIdBeenSet:1;
|
||||
u8 autoScrollDelay;
|
||||
};
|
||||
|
||||
struct TextPrinterTemplate // TODO: Better name
|
||||
@@ -138,18 +142,15 @@ struct TextPrinterTemplate // TODO: Better name
|
||||
|
||||
struct TextPrinter
|
||||
{
|
||||
struct TextPrinterTemplate subPrinter;
|
||||
|
||||
struct TextPrinterTemplate printerTemplate;
|
||||
void (*callback)(struct TextPrinterTemplate *, u16); // 0x10
|
||||
|
||||
union {
|
||||
union __attribute__((packed)) {
|
||||
struct TextPrinterSubStruct sub;
|
||||
|
||||
u8 sub_fields[8];
|
||||
} sub_union;
|
||||
|
||||
u8 fields[7];
|
||||
} subUnion;
|
||||
u8 active;
|
||||
u8 state; // 0x1C
|
||||
u8 text_speed;
|
||||
u8 textSpeed;
|
||||
u8 delayCounter;
|
||||
u8 scrollDistance;
|
||||
u8 minLetterSpacing; // 0x20
|
||||
@@ -173,13 +174,13 @@ extern const struct FontInfo *gFonts;
|
||||
|
||||
struct GlyphWidthFunc
|
||||
{
|
||||
u32 font_id;
|
||||
u32 fontId;
|
||||
s32 (*func)(u16 glyphId, bool32 isJapanese);
|
||||
};
|
||||
|
||||
struct KeypadIcon
|
||||
{
|
||||
u16 tile_offset;
|
||||
u16 tileOffset;
|
||||
u8 width;
|
||||
u8 height;
|
||||
};
|
||||
@@ -193,13 +194,6 @@ typedef struct {
|
||||
|
||||
extern TextFlags gTextFlags;
|
||||
|
||||
struct __attribute__((packed)) TextColor
|
||||
{
|
||||
u8 fgColor;
|
||||
u8 bgColor;
|
||||
u8 shadowColor;
|
||||
};
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
extern u8 gStringVar2[];
|
||||
extern u8 gStringVar3[];
|
||||
@@ -269,5 +263,6 @@ s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese);
|
||||
void sub_80062B0(struct Sprite *sprite);
|
||||
u8 CreateTextCursorSpriteForOakSpeech(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority);
|
||||
void sub_8006398(u8 spriteId);
|
||||
s32 GetGlyphWidthFont6(u16 font_type, bool32 isJapanese);
|
||||
|
||||
#endif // GUARD_TEXT_H
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_TRADE_H
|
||||
#define GUARD_TRADE_H
|
||||
|
||||
s32 sub_804FB34(void);
|
||||
|
||||
#endif //GUARD_TRADE_H
|
||||
@@ -14,5 +14,7 @@ u8 sub_818D97C(u8 a0, u8 a1);
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass);
|
||||
u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 LoadMonPicInWindow(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId);
|
||||
|
||||
#endif // GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
#define GUARD_TRAINER_TOWER_H
|
||||
|
||||
void PrintTrainerTowerRecords(void);
|
||||
void InitTrainerTowerBattleStruct(void);
|
||||
void FreeTrainerTowerBattleStruct(void);
|
||||
u8 GetTrainerTowerTrainerFrontSpriteId(void);
|
||||
void sub_815D838(void);
|
||||
void ResetTrainerTowerResults(void);
|
||||
|
||||
#endif //GUARD_TRAINER_TOWER_H
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_UNION_ROOM_CHAT_H
|
||||
#define GUARD_UNION_ROOM_CHAT_H
|
||||
|
||||
void sub_801DD98(void);
|
||||
void copy_strings_to_sav1(void);
|
||||
|
||||
#endif // GUARD_UNION_ROOM_CHAT_H
|
||||
@@ -45,5 +45,6 @@ bool8 UpdateRepelCounter(void);
|
||||
void sub_8082740(u8);
|
||||
u8 GetUnownLetterByPersonalityLoByte(u32 personality);
|
||||
bool8 SweetScentWildEncounter(void);
|
||||
void sub_8083214(u16 randVal);
|
||||
|
||||
#endif // GUARD_WILD_ENCOUNTER_H
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_WILD_POKEMON_AREA_H
|
||||
#define GUARD_WILD_POKEMON_AREA_H
|
||||
|
||||
s32 BuildPokedexAreaSubspriteBuffer(u16 species, struct Subsprite * subsprites);
|
||||
|
||||
#endif //GUARD_WILD_POKEMON_AREA_H
|
||||
+1
-1
@@ -63,7 +63,7 @@ void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height);
|
||||
void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height);
|
||||
void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
|
||||
void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
|
||||
void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset);
|
||||
void CopyToWindowPixelBuffer(u8 windowId, const void *src, u16 size, u16 tileOffset);
|
||||
void FillWindowPixelBuffer(u8 windowId, u8 fillValue);
|
||||
void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue);
|
||||
void CallWindowFunction(u8 windowId, WindowFunc func);
|
||||
|
||||
Reference in New Issue
Block a user