battle 7 is decompiled
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "battle_script_commands.h"
|
||||
#include "battle_2.h"
|
||||
#include "battle_ai_switch_items.h"
|
||||
#include "battle_gfx_sfx_util.h"
|
||||
|
||||
/*
|
||||
Banks are a name given to what could be called a 'battlerId' or 'monControllerId'.
|
||||
@@ -670,7 +671,7 @@ struct BattleStruct
|
||||
u8 fillerDC[0xDF-0xDC];
|
||||
u8 field_DF;
|
||||
u8 mirrorMoveArrays[32];
|
||||
u16 castformPalette[4][16];
|
||||
u16 castformPalette[BATTLE_BANKS_COUNT][16];
|
||||
u8 field_180;
|
||||
u8 field_181;
|
||||
u8 field_182;
|
||||
@@ -807,6 +808,18 @@ extern struct BattleStruct* gBattleStruct;
|
||||
#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_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40
|
||||
#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit
|
||||
@@ -864,43 +877,6 @@ void AdjustFriendshipOnBattleFaint(u8 bank);
|
||||
void sub_80571DC(u8 bank, u8 arg1);
|
||||
u32 sub_805725C(u8 bank);
|
||||
|
||||
// battle 7
|
||||
void AllocateBattleSpritesData(void);
|
||||
void FreeBattleSpritesData(void);
|
||||
void AllocateMonSpritesGfx(void);
|
||||
void FreeMonSpritesGfx(void);
|
||||
void BattleMusicStop(void);
|
||||
void sub_805E990(struct Pokemon *mon, u8 bank);
|
||||
void sub_805EF14(void);
|
||||
bool8 BattleInitAllSprites(u8 *state1, u8 *state2);
|
||||
void sub_805E350(void);
|
||||
bool8 BattleLoadAllHealthBoxesGfx(u8 state);
|
||||
void LoadAndCreateEnemyShadowSprites(void);
|
||||
void SetBankEnemyShadowSpriteCallback(u8 bank, u16 species);
|
||||
void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 bank);
|
||||
void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 bank);
|
||||
void BattleLoadSubstituteSpriteGfx(u8 bank, bool8 arg1);
|
||||
void nullsub_24(u16 arg0);
|
||||
void nullsub_25(u8 arg0);
|
||||
void ClearTemporarySpeciesSpriteData(u8 bank, bool8 dontClearSubstitute);
|
||||
void sub_805D714(struct Sprite *sprite);
|
||||
void DecompressTrainerBackPic(u16 backPicId, u8 bank);
|
||||
void DecompressTrainerFrontPic(u16 frontPicId, u8 bank);
|
||||
void FreeTrainerFrontPicPalette(u16 frontPicId);
|
||||
void sub_805D7AC(struct Sprite *sprite);
|
||||
bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn);
|
||||
void sub_805EB9C(u8 arg0);
|
||||
void sub_805E394(void);
|
||||
void TrySetBehindSubstituteSpriteBit(u8 bank, u16 move);
|
||||
void DoStatusAnimation(bool8 isStatus2, u32 status);
|
||||
void DoSpecialBattleAnimation(u8 activeBank, u8 atkBank, u8 defBank, u8 tableId);
|
||||
bool8 DoBattleAnimationFromTable(u8 active, u8 atkBank, u8 defBank, u8 tableId, u16 argument);
|
||||
void CopyBattleSpriteInvisibility(u8 bank);
|
||||
u16 ChooseMoveAndTargetInBattlePalace(void);
|
||||
void LoadBattleBarGfx(u8 arg0);
|
||||
bool8 mplay_80342A4(u8 bank);
|
||||
void sub_805EEE0(u8 bank);
|
||||
|
||||
enum
|
||||
{
|
||||
BACK_PIC_BRENDAN,
|
||||
@@ -921,7 +897,7 @@ u8 GetBankByIdentity(u8 bank);
|
||||
struct BattleSpriteInfo
|
||||
{
|
||||
u16 invisible : 1; // 0x1
|
||||
u16 flag_x2 : 1; // 0x2
|
||||
u16 lowHpSong : 1; // 0x2
|
||||
u16 behindSubstitute : 1; // 0x4
|
||||
u16 flag_x8 : 1; // 0x8
|
||||
u16 hpNumbersNoBars : 1; // 0x10
|
||||
@@ -930,7 +906,7 @@ struct BattleSpriteInfo
|
||||
|
||||
struct BattleAnimationInfo
|
||||
{
|
||||
u16 field; // to fill up later
|
||||
u16 animArg; // to fill up later
|
||||
u8 field_2;
|
||||
u8 field_3;
|
||||
u8 field_4;
|
||||
@@ -972,7 +948,7 @@ struct BattleHealthboxInfo
|
||||
u8 animationState;
|
||||
u8 field_5;
|
||||
u8 field_6;
|
||||
u8 field_7;
|
||||
u8 shadowSpriteId;
|
||||
u8 field_8;
|
||||
u8 field_9;
|
||||
u8 field_A;
|
||||
@@ -1012,8 +988,11 @@ struct MonSpritesGfx
|
||||
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
|
||||
void* sprites[4];
|
||||
struct SpriteTemplate templates[4];
|
||||
u8 field_74[0x100];
|
||||
u8 *fontPixels;
|
||||
struct SpriteFrameImage field_74[4][4];
|
||||
u8 field_F4[0x80];
|
||||
u8 *barFontGfx;
|
||||
void *field_178;
|
||||
void *field_17C;
|
||||
};
|
||||
|
||||
extern struct BattleSpritesGfx* gMonSpritesGfx;
|
||||
|
||||
Reference in New Issue
Block a user