review PrepareBattleGraphicsMaybe and efxbattle

This commit is contained in:
MokhaLeee 2024-02-22 07:37:36 +00:00
parent 723409e9a6
commit e4521b7f33
40 changed files with 561 additions and 503 deletions

View File

@ -189,7 +189,7 @@ _080513EE:
strh r4, [r3]
strh r2, [r3, #2]
ldrh r7, [r5]
ldr r0, _0805142C @ gEkrPairMaxHP
ldr r0, _0805142C @ gBanimMaxHP
ldrh r6, [r0]
ldrh r1, [r5, #2]
mov r8, r1
@ -214,10 +214,10 @@ _0805141C: .4byte gUnknown_08802428
_08051420: .4byte gBG0TilemapBuffer
_08051424: .4byte gBanimSomeHp
_08051428: .4byte gEkrGaugeHp
_0805142C: .4byte gEkrPairMaxHP
_0805142C: .4byte gBanimMaxHP
_08051430: .4byte gEkrDistanceType
_08051434:
ldr r0, _08051448 @ gEkrPairSideVaild
ldr r0, _08051448 @ gBanimValid
movs r1, #0
ldrsh r0, [r0, r1]
cmp r0, #1
@ -228,7 +228,7 @@ _08051434:
adds r0, #0x38
b _0805145C
.align 2, 0
_08051448: .4byte gEkrPairSideVaild
_08051448: .4byte gBanimValid
_0805144C:
mov r4, sl
movs r1, #0x32
@ -920,7 +920,7 @@ _080519A6:
cmp r4, #0
bne _08051A12
str r4, [sp, #0x24]
ldr r1, _08051AB4 @ gEkrPairWTABonus
ldr r1, _08051AB4 @ gBanimWtaBonus
movs r2, #0
ldrsh r0, [r1, r2]
ldr r5, [sp, #0xe4]
@ -973,7 +973,7 @@ _08051A12:
cmp r4, #0
bne _08051A7E
str r4, [sp, #0x24]
ldr r1, _08051AB4 @ gEkrPairWTABonus
ldr r1, _08051AB4 @ gBanimWtaBonus
movs r6, #2
ldrsh r0, [r1, r6]
ldr r5, [sp, #0xe4]
@ -1039,7 +1039,7 @@ _08051AA4: .4byte 0x0000B1C0
_08051AA8: .4byte 0x0000C1F0
_08051AAC: .4byte gUnknown_085B94F0
_08051AB0: .4byte 0x0000C1C0
_08051AB4: .4byte gEkrPairWTABonus
_08051AB4: .4byte gBanimWtaBonus
_08051AB8: .4byte gUnknown_085B9544
_08051ABC: .4byte 0x0000D1DC
_08051AC0: .4byte 0x0000E1DE

View File

@ -204,6 +204,6 @@ u16 GetBattleAnimationId(struct Unit * unit, const struct BattleAnimDef * anim_d
bool CheckBattleHasHit(void);
// ??? sub_805893C(???);
u16 * FilterBattleAnimCharacterPalette(s16 banim_index, u16 item);
int GetAllegienceId(u32 faction);
int GetBanimFactionPalette(u32 faction);
#endif // GUARD_ANIME_H

View File

@ -201,8 +201,8 @@ void BattleInitTargetCanCounter(void);
void InitObstacleBattleUnit(void);
void UpdateObstacleFromBattle(struct BattleUnit* bu);
void BeginBattleAnimations(void);
int GetUnitSoloBattleAnimType(struct Unit* unit);
int GetBattleAnimType(void);
int GetSoloAnimPreconfType(struct Unit* unit);
int GetBattleAnimPreconfType(void);
void BattleInitItemEffect(struct Unit* actor, int itemSlot);
void BattleInitItemEffectTarget(struct Unit* unit);
void BattleApplyMiscAction(struct Proc* proc);

View File

@ -14,14 +14,14 @@ struct ProcEfx {
/* 2A */ u8 type;
/* 2B */ STRUCT_PAD(0x2B, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 unk2E;
/* 2E */ s16 step;
/* 30 */ s16 unk30;
/* 32 */ u16 unk32;
/* 34 */ STRUCT_PAD(0x34, 0x44);
/* 44 */ u32 unk44;
/* 48 */ u32 unk48;
/* 4C */ u32 unk4C;
/* 50 */ u32 unk50;
/* 4C */ u32 frame;
/* 50 */ u32 speed;
/* 54 */ s16 * unk54;
/* 58 */ s16 ** unk58;
/* 5C */ struct Anim * anim;
@ -33,15 +33,21 @@ struct ProcEfxBG {
PROC_HEADER;
/* 29 */ u8 unk29;
STRUCT_PAD(0x2A, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 terminator;
/* 30 */ s16 unk30;
/* 32 */ s16 unk32;
/* 34 */ s16 unk34;
STRUCT_PAD(0x36, 0x3C);
/* 3C */ s16 unk3C;
STRUCT_PAD(0x3E, 0x44);
/* 44 */ u32 frame;
/* 48 */ const u16 * frame_config;
/* 4C */ u16 ** tsal;
@ -55,30 +61,37 @@ struct ProcEfxBGCOL {
PROC_HEADER;
STRUCT_PAD(0x29, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 timer2;
/* 30 */ s16 terminator;
/* 32 */ s16 unk32;
STRUCT_PAD(0x34, 0x44);
/* 44 */ u32 frame;
/* 48 */ const u16 * frame_config;
/* 4C */ void * pal;
STRUCT_PAD(0x50, 0x5C);
/* 5C */ struct Anim * anim;
};
struct ProcEfxRST
{
struct ProcEfxRST {
PROC_HEADER;
STRUCT_PAD(0x29, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 unk2E;
/* 30 */ s16 unk30;
STRUCT_PAD(0x32, 0x5C);
/* 2E */ s16 duration;
STRUCT_PAD(0x30, 0x5C);
/* 5C */ struct Anim * anim;
STRUCT_PAD(0x60, 0x64);
/* 64 */ ProcPtr unk64;
/* 64 */ struct ProcEfx * efxproc;
};
struct ProcEfxOBJ {
@ -86,7 +99,9 @@ struct ProcEfxOBJ {
/* 29 */ u8 unk29;
/* 2A */ u8 unk2A;
STRUCT_PAD(0x2B, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 terminator;
/* 30 */ u16 unk30;
@ -102,30 +117,36 @@ struct ProcEfxOBJ {
/* 44 */ int unk44;
/* 48 */ int unk48;
/* 4C */ int unk4C;
STRUCT_PAD(0x50, 0x5C);
/* 5C */ struct Anim * anim;
/* 60 */ struct Anim * anim2;
/* 64 */ struct Anim * anim3;
/* 68 */ struct Anim * anim4;
};
struct ProcEfxALPHA
{
struct ProcEfxALPHA {
PROC_HEADER;
/* 29 */ u8 unk29;
STRUCT_PAD(0x2A, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 unk2E;
/* 30 */ s16 unk30;
STRUCT_PAD(0x32, 0x5C);
/* 5C */ struct Anim * anim;
};
struct ProcEfxSCR
{
struct ProcEfxSCR {
/* 00 */ PROC_HEADER;
/* 29 */ STRUCT_PAD(0x29, 0x2C);
/* 2C */ s16 timer;
/* 2E */ s16 unk2E;
/* 34 */ STRUCT_PAD(0x30, 0x44);
@ -139,11 +160,17 @@ struct ProcEkrDispUP {
/* 29 */ u8 sync;
/* 2A */ u8 asnyc;
/* 2B */ u8 _pad_2B[0x32 - 0x2B];
/* 32 */ u16 x; /* unused actually */
/* 34 */ u8 _pad_32[0x3A - 0x34];
/* 3A */ u16 y;
/* 3C */ u8 _pad_3C[0x4C - 0x3C];
/* 4C */ u32 unk4C;
/* 50 */ u32 unk50;
};
@ -458,7 +485,7 @@ extern u16 gUnknown_02016DC8[];
// extern ??? gUnknown_02017248
// extern ??? gUnknown_02017448
// extern ??? gUnknown_020176F0
extern u16 gDecodedEkrHitDmgCritBuf[];
extern u16 gEkrGaugeDecoder[];
extern u32 gEkrBattleEndFlag;
extern u32 gEkrHPBarCount;
extern u32 gEfxSpellAnimExists;

View File

@ -385,10 +385,17 @@ int CheckEfxSoundSeExist(void);
*/
extern int gBanimBossBGMs[];
enum banim_faction_palette_idx {
BANIMPAL_BLUE = 0,
BANIMPAL_RED = 1,
BANIMPAL_GREEN = 2,
BANIMPAL_PURPLE = 3,
};
extern int gEkrDebugTimer, gEkrDebugUnk1;
extern u16 gEkrPairBanimID[2];
extern s16 gAnimCharaPalIndex[2];
extern u16 gBanimIdx_bak[2];
extern s16 gBanimUniquePal[2];
extern struct BattleUnit *gpEkrBattleUnitLeft;
extern struct BattleUnit *gpEkrBattleUnitRight;
@ -422,36 +429,36 @@ extern int gBanimLinkArenaFlag;
extern int gBattleDeamonActive;
extern struct ProcEkrBattleDeamon *gpProcEkrBattleDeamon;
extern s16 gEkrDebugModeMaybe;
extern s16 gBanimBackgroundIndex;
extern s16 gBanimBG;
extern s16 gEkrInitialHitSide;
extern s16 gEkrSnowWeather;
extern s16 gEkrPairSideVaild[2];
extern s16 gBanimValid[2];
extern s16 gEkrInitialPosition[2];
extern s16 gEkrFactions[2];
extern s16 gBanimFactionPal[2];
extern s16 gEkrSpellAnimIndex[];
// extern ??? gUnknown_0203E11A
extern EWRAM_DATA s16 gBanimTerrainIndexMaybe[2];
extern EWRAM_DATA short gEkrPairBmLoc[4];
extern EWRAM_DATA s16 gBanimFloorfx[2];
extern EWRAM_DATA short gEkrBmLocation[4];
extern s16 gEfxPairHpBufOffset[];
extern s16 gEkrPairBanimID2[];
extern s16 gBanimIdx[];
extern u8 gEkrPids[2];
extern struct Unit *gpEkrTriangleUnits[2];
extern char *gBanimTriAtkPalettes[2];
extern void * gUnknown_0203E1A4[2];
extern void * gBanimForceUnitChgDebug[2];
extern s16 gEkrGaugeHp[2];
extern s16 gEkrPairMaxHP[2];
extern s16 gBanimMaxHP[2];
extern s16 gBanimSomeHp[2];
extern s16 gEkrPairHit[2];
extern s16 gEkrPairDmgPair[2];
extern s16 gEkrPairCritPair[2];
extern s16 gEkrPairExpPrevious[2];
extern s16 gEkrPairExpGain[2];
extern s16 gEkrPairTerrainID[2];
extern s16 gEkrPairBaseCon[2];
extern s16 gEkrPairWTABonus[2];
extern s16 gEkrPairEffectiveAgainst[2];
extern s16 gUnknown_0203E1DC[2];
extern s16 gEkrGaugeHit[2];
extern s16 gEkrGaugeDmg[2];
extern s16 gEkrGaugeCrt[2];
extern s16 gBanimExpPrevious[2];
extern s16 gBanimExpGain[2];
extern s16 gBanimTerrain[2];
extern s16 gBanimCon[2];
extern s16 gBanimWtaBonus[2];
extern s16 gBanimEffectiveness[2];
extern s16 gBanimUniquePaletteDisabled[2];
extern u8 gBanimScrLeft[];
extern u8 gBanimScrRight[];
@ -886,7 +893,7 @@ void AnimScrAdvance(struct Anim * anim);
void NewEkrChienCHR(struct Anim * anim);
// ??? EkrChienCHRMain(???);
void RegisterAISSheetGraphics(struct Anim * anim);
void sub_8059970(u32 *, int);
void ApplyBanimUniquePalette(u32 *, int);
int GetBanimPalette(int banim_id, enum ekr_battle_unit_position pos);
void UpdateBanimFrame(void);
void InitMainAnims(void);

View File

@ -221,6 +221,14 @@ struct PlaySt { // Chapter Data Struct
u8 tutorial_counter;
} BITPACKED;
/* PlaySt::config::animationType */
enum PlaySt_AnimConfType {
PLAY_ANIMCONF_ON = 0,
PLAY_ANIMCONF_OFF = 1,
PLAY_ANIMCONF_SOLO_ANIM = 2,
PLAY_ANIMCONF_ON_UNIQUE_BG = 3,
};
/**
* Use with PlaySt field chapterStateBits
*/

View File

@ -49,8 +49,8 @@ extern u16 gUiTmScratchA[];
extern u16 gUiTmScratchB[];
extern u16 gUiTmScratchC[];
extern u16 gBanimPal1[];
extern u16 gBanimPal2[];
extern u16 gBanimPaletteLeft[];
extern u16 gBanimPaletteRight[];
extern u32 gBanimOaml[];
// extern ??? gChapterStatusText
@ -771,27 +771,27 @@ extern CONST_DATA s8 BanimTerrainGround_Tileset11[];
extern CONST_DATA s8 BanimTerrainGround_Tileset12[];
extern CONST_DATA s8 BanimTerrainGround_Tileset13[];
extern CONST_DATA s8 BanimTerrainGround_Tileset14[];
extern CONST_DATA s8 gBanimBackgroundIndexLutDefault[];
extern CONST_DATA s8 gBanimBackgroundIndexLut01[];
extern CONST_DATA s8 gBanimBackgroundIndexLut02[];
extern CONST_DATA s8 gBanimBackgroundIndexLut03[];
extern CONST_DATA s8 gBanimBackgroundIndexLut04[];
extern CONST_DATA s8 gBanimBackgroundIndexLut05[];
extern CONST_DATA s8 gBanimBackgroundIndexLut06[];
extern CONST_DATA s8 gBanimBackgroundIndexLut07[];
extern CONST_DATA s8 gBanimBackgroundIndexLut08[];
extern CONST_DATA s8 gBanimBackgroundIndexLut09[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0A[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0B[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0C[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0D[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0E[];
extern CONST_DATA s8 gBanimBackgroundIndexLut0F[];
extern CONST_DATA s8 gBanimBackgroundIndexLut10[];
extern CONST_DATA s8 gBanimBackgroundIndexLut11[];
extern CONST_DATA s8 gBanimBackgroundIndexLut12[];
extern CONST_DATA s8 gBanimBackgroundIndexLut13[];
extern CONST_DATA s8 gBanimBackgroundIndexLut14[];
extern CONST_DATA s8 gBanimBGLutDefault[];
extern CONST_DATA s8 gBanimBGLut01[];
extern CONST_DATA s8 gBanimBGLut02[];
extern CONST_DATA s8 gBanimBGLut03[];
extern CONST_DATA s8 gBanimBGLut04[];
extern CONST_DATA s8 gBanimBGLut05[];
extern CONST_DATA s8 gBanimBGLut06[];
extern CONST_DATA s8 gBanimBGLut07[];
extern CONST_DATA s8 gBanimBGLut08[];
extern CONST_DATA s8 gBanimBGLut09[];
extern CONST_DATA s8 gBanimBGLut0A[];
extern CONST_DATA s8 gBanimBGLut0B[];
extern CONST_DATA s8 gBanimBGLut0C[];
extern CONST_DATA s8 gBanimBGLut0D[];
extern CONST_DATA s8 gBanimBGLut0E[];
extern CONST_DATA s8 gBanimBGLut0F[];
extern CONST_DATA s8 gBanimBGLut10[];
extern CONST_DATA s8 gBanimBGLut11[];
extern CONST_DATA s8 gBanimBGLut12[];
extern CONST_DATA s8 gBanimBGLut13[];
extern CONST_DATA s8 gBanimBGLut14[];
extern u16 CONST_DATA gUnknown_0880D374[]; // terrainid-to-textid lookup
// extern ??? gUnknown_088ACBC4

View File

@ -88,68 +88,68 @@ int GetBanimBackgroundIndex(u16 terrain, u16 tileset)
{
switch (tileset) {
case 0x01:
return gBanimBackgroundIndexLut01[terrain];
return gBanimBGLut01[terrain];
case 0x02:
return gBanimBackgroundIndexLut02[terrain];
return gBanimBGLut02[terrain];
case 0x03:
return gBanimBackgroundIndexLut03[terrain];
return gBanimBGLut03[terrain];
case 0x04:
return gBanimBackgroundIndexLut04[terrain];
return gBanimBGLut04[terrain];
case 0x05:
return gBanimBackgroundIndexLut05[terrain];
return gBanimBGLut05[terrain];
case 0x06:
return gBanimBackgroundIndexLut06[terrain];
return gBanimBGLut06[terrain];
case 0x07:
return gBanimBackgroundIndexLut07[terrain];
return gBanimBGLut07[terrain];
case 0x08:
return gBanimBackgroundIndexLut08[terrain];
return gBanimBGLut08[terrain];
case 0x09:
return gBanimBackgroundIndexLut09[terrain];
return gBanimBGLut09[terrain];
case 0x0A:
return gBanimBackgroundIndexLut0A[terrain];
return gBanimBGLut0A[terrain];
case 0x0B:
return gBanimBackgroundIndexLut0B[terrain];
return gBanimBGLut0B[terrain];
case 0x0C:
return gBanimBackgroundIndexLut0C[terrain];
return gBanimBGLut0C[terrain];
case 0x0D:
return gBanimBackgroundIndexLut0D[terrain];
return gBanimBGLut0D[terrain];
case 0x0E:
return gBanimBackgroundIndexLut0E[terrain];
return gBanimBGLut0E[terrain];
case 0x0F:
return gBanimBackgroundIndexLut0F[terrain];
return gBanimBGLut0F[terrain];
case 0x10:
return gBanimBackgroundIndexLut10[terrain];
return gBanimBGLut10[terrain];
case 0x11:
return gBanimBackgroundIndexLut11[terrain];
return gBanimBGLut11[terrain];
case 0x12:
return gBanimBackgroundIndexLut12[terrain];
return gBanimBGLut12[terrain];
case 0x13:
return gBanimBackgroundIndexLut13[terrain];
return gBanimBGLut13[terrain];
case 0x14:
return gBanimBackgroundIndexLut14[terrain];
return gBanimBGLut14[terrain];
case 0:
default:
return gBanimBackgroundIndexLutDefault[terrain];
return gBanimBGLutDefault[terrain];
}
}
@ -468,8 +468,8 @@ void ParseBattleHitToBanimCmd(void)
gEfxHpLut[r10 * 2 + 1] = new_hp;
new_hp = GetEfxHp(r9 * 2) + hit->hpChange;
if (new_hp > gEkrPairMaxHP[POS_L])
new_hp = gEkrPairMaxHP[POS_L];
if (new_hp > gBanimMaxHP[POS_L])
new_hp = gBanimMaxHP[POS_L];
r9 = r9 + 1;
gEfxHpLut[r9 * 2] = new_hp;
@ -484,8 +484,8 @@ void ParseBattleHitToBanimCmd(void)
gEfxHpLut[r9 * 2] = new_hp;
new_hp = GetEfxHp(r10 * 2 + 1) + hit->hpChange;
if (new_hp > gEkrPairMaxHP[POS_R])
new_hp = gEkrPairMaxHP[POS_R];
if (new_hp > gBanimMaxHP[POS_R])
new_hp = gBanimMaxHP[POS_R];
r10 = r10 + 1;
gEfxHpLut[r10 * 2 + 1] = new_hp;
@ -1076,7 +1076,7 @@ void ParseBattleHitToBanimCmd(void)
ldrsb r1, [r7, r1]\n\
adds r0, r0, r1\n\
lsls r0, r0, #0x10\n\
ldr r3, _08058630 @ gEkrPairMaxHP\n\
ldr r3, _08058630 @ gBanimMaxHP\n\
lsrs r2, r0, #0x10\n\
asrs r0, r0, #0x10\n\
movs r5, #0\n\
@ -1095,7 +1095,7 @@ void ParseBattleHitToBanimCmd(void)
.align 2, 0\n\
_08058628: .4byte gEkrInitialPosition\n\
_0805862C: .4byte gEfxHpLut\n\
_08058630: .4byte gEkrPairMaxHP\n\
_08058630: .4byte gBanimMaxHP\n\
_08058634:\n\
mov r1, r9\n\
lsls r0, r1, #1\n\
@ -1126,7 +1126,7 @@ void ParseBattleHitToBanimCmd(void)
ldrsb r1, [r7, r1]\n\
adds r0, r0, r1\n\
lsls r0, r0, #0x10\n\
ldr r3, _0805869C @ gEkrPairMaxHP\n\
ldr r3, _0805869C @ gBanimMaxHP\n\
lsrs r2, r0, #0x10\n\
asrs r0, r0, #0x10\n\
movs r5, #2\n\
@ -1149,7 +1149,7 @@ void ParseBattleHitToBanimCmd(void)
b _0805881C\n\
.align 2, 0\n\
_08058698: .4byte gEfxHpLut\n\
_0805869C: .4byte gEkrPairMaxHP\n\
_0805869C: .4byte gBanimMaxHP\n\
_080586A0:\n\
ldr r0, _08058764 @ gEkrInitialPosition\n\
movs r1, #0\n\

View File

@ -85,7 +85,7 @@ void sub_8052F24(struct ProcEfxDead *proc)
PlaySound8FForArenaMaybe();
NewEfxDead(proc->anim1, proc->anim2);
EfxPrepareScreenFx();
gEkrPairSideVaild[GetAnimPosition(proc->anim1)] = false;
gBanimValid[GetAnimPosition(proc->anim1)] = false;
BG_EnableSyncByMask(BG0_SYNC_BIT);
NewEkrWindowAppear(0, 7);
NewEkrNamewinAppear(0, 7, 0);

View File

@ -70,7 +70,7 @@ void EfxFlashHPBarRestorePal(struct ProcEfxFlashing * proc)
if (GetAnimPosition(proc->anim) == EKR_POS_L)
{
if (gEkrGaugeHp[EKR_POS_L] <= 80)
CpuCopy16(&PAL_BUF_COLOR(gUnknown_08802B04, gEkrFactions[EKR_POS_L], 0),
CpuCopy16(&PAL_BUF_COLOR(gUnknown_08802B04, gBanimFactionPal[EKR_POS_L], 0),
PAL_OBJ(OBPAL_EFXHPBAR_L), 0x20);
else
CpuCopy16(gPalEfxHpBarPurple, PAL_OBJ(OBPAL_EFXHPBAR_R), 0x20); /* Why right? */
@ -78,7 +78,7 @@ void EfxFlashHPBarRestorePal(struct ProcEfxFlashing * proc)
else
{
if (gEkrGaugeHp[EKR_POS_R] <= 80)
CpuCopy16(&PAL_BUF_COLOR(gUnknown_08802B04, gEkrFactions[EKR_POS_R], 0),
CpuCopy16(&PAL_BUF_COLOR(gUnknown_08802B04, gBanimFactionPal[EKR_POS_R], 0),
PAL_OBJ(OBPAL_EFXHPBAR_R), 0x20);
else
CpuCopy16(gPalEfxHpBarPurple, PAL_OBJ(OBPAL_EFXHPBAR_R), 0x20);
@ -137,12 +137,12 @@ void NewEfxHPBarColorChange(struct Anim * anim)
proc->unk29 = 0;
EfxSplitColor(
gUnknown_08802B04 + gEkrFactions[POS_L] * 0x10,
gUnknown_08802B04 + gBanimFactionPal[POS_L] * 0x10,
gEfxSplitedColorBuf,
0x10);
EfxSplitColor(
gUnknown_08802BC4 + gEkrFactions[POS_L] * 0x10,
gUnknown_08802BC4 + gBanimFactionPal[POS_L] * 0x10,
gUnknown_0201F978,
0x10);
@ -153,12 +153,12 @@ void NewEfxHPBarColorChange(struct Anim * anim)
0x10, 5);
EfxSplitColor(
gUnknown_08802B04 + gEkrFactions[POS_R] * 0x10,
gUnknown_08802B04 + gBanimFactionPal[POS_R] * 0x10,
gUnknown_0201FA08,
0x10);
EfxSplitColor(
gUnknown_08802BC4 + gEkrFactions[POS_R] * 0x10,
gUnknown_08802BC4 + gBanimFactionPal[POS_R] * 0x10,
gUnknown_0201FA38,
0x10);

View File

@ -99,7 +99,7 @@ void EfxHp_BarDeclineWithDeathJudge(struct ProcEfxHPBar * proc)
else {
PlaySound8FForArenaMaybe();
NewEfxDead(anim1, anim2);
gEkrPairSideVaild[GetAnimPosition(proc->anim60)] = false;
gBanimValid[GetAnimPosition(proc->anim60)] = false;
}
}
@ -298,7 +298,7 @@ void EfxHPBarResire_805282C(struct ProcEfxHPBar * proc)
else {
PlaySound8FForArenaMaybe();
NewEfxDead(anim3, anim4);
gEkrPairSideVaild[GetAnimPosition(proc->anim60)] = false;
gBanimValid[GetAnimPosition(proc->anim60)] = false;
}
}

View File

@ -36,7 +36,7 @@ ProcPtr NewEfxPartsofScroll(void)
Proc_Start(ProcScr_EfxPartsofScroll, PROC_TREE_3);
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
return proc;
}
@ -100,7 +100,7 @@ ProcPtr NewEfxPartsofScroll2(void)
Proc_Start(ProcScr_EfxPartsofScroll2, PROC_TREE_3);
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
return proc;
}

View File

@ -344,7 +344,7 @@ void StartSubSpell_efxExcaliburSCR(int unk)
{
struct ProcEfx * proc = Proc_Start(ProcScr_efxExcaliburSCR, PROC_TREE_3);
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = 0;
StartSubSpell_efxExcaliburSCR2(proc, unk);

View File

@ -170,13 +170,13 @@ void StartSubSpell_efxDarkGradoMapFadeOut(void)
//! FE8U = 0x08068D9C
void sub_8068D9C(void)
{
if (gBanimBackgroundIndex == 0)
if (gBanimBG == 0)
{
EfxChapterMapFadeOUT(4);
}
else
{
PutBanimBgPAL(gBanimBackgroundIndex - 1);
PutBanimBgPAL(gBanimBG - 1);
EfxPalBlackInOut(gPaletteBuffer, 6, 10, 0);
EnablePaletteSync();
}

View File

@ -209,7 +209,7 @@ void StartSubSpell_efxLunaSCR(void)
struct ProcEfx * proc = Proc_Start(ProcScr_efxLunaSCR, PROC_TREE_3);
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = 0;
StartSubSpell_efxLunaSCR2(proc);
@ -840,7 +840,7 @@ struct ProcCmd CONST_DATA ProcScr_efxLunaRST[] =
// clang-format on
//! FE8U = 0x0806428C
void StartSubSpell_efxLunaRST(struct Anim * anim, ProcPtr b, int c)
void StartSubSpell_efxLunaRST(struct Anim * anim, ProcPtr efxproc, int duration)
{
struct ProcEfxRST * proc;
@ -850,25 +850,21 @@ void StartSubSpell_efxLunaRST(struct Anim * anim, ProcPtr b, int c)
proc->anim = anim;
proc->timer = 0;
proc->unk2E = c;
proc->unk64 = b;
return;
proc->duration = duration;
proc->efxproc = efxproc;
}
//! FE8U = 0x080642BC
void efxLunaRST_Loop(struct ProcEfxRST * proc)
{
struct ProcEfx * otherProc = proc->unk64;
otherProc->unk4C = Interpolate(INTERPOLATE_RSQUARE, 0x80, 0, proc->timer, proc->unk2E);
struct ProcEfx * otherProc = proc->efxproc;
otherProc->frame = Interpolate(INTERPOLATE_RSQUARE, 0x80, 0, proc->timer, proc->duration);
proc->timer++;
if (proc->timer > proc->unk2E)
if (proc->timer > proc->duration)
{
gEfxBgSemaphore--;
Proc_Break(proc);
}
return;
}

View File

@ -951,7 +951,7 @@ void StartSubSpell_efxNaglfarBlack(struct Anim * anim, int b, int c)
proc->anim = anim;
proc->timer = 0;
proc->unk2E = b;
proc->step = b;
proc->unk30 = c;
return;

View File

@ -564,7 +564,7 @@ struct ProcCmd CONST_DATA ProcScr_efxResireRST[] =
// clang-format on
//! FE8U = 0x0805F838
void StartSubSpell_efxResireRST(struct Anim * anim, ProcPtr b, int c)
void StartSubSpell_efxResireRST(struct Anim * anim, ProcPtr efxproc, int c)
{
struct ProcEfxRST * proc;
@ -573,8 +573,8 @@ void StartSubSpell_efxResireRST(struct Anim * anim, ProcPtr b, int c)
proc = Proc_Start(ProcScr_efxResireRST, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->unk2E = c;
proc->unk64 = b;
proc->duration = c;
proc->efxproc = efxproc;
return;
}
@ -582,13 +582,13 @@ void StartSubSpell_efxResireRST(struct Anim * anim, ProcPtr b, int c)
//! FE8U = 0x0805F868
void efxResireRST_Loop(struct ProcEfxRST * proc)
{
struct ProcEfx * otherProc = proc->unk64;
struct ProcEfx * otherProc = proc->efxproc;
otherProc->unk4C = Interpolate(INTERPOLATE_RSQUARE, 0, 128, proc->timer, proc->unk2E);
otherProc->frame = Interpolate(INTERPOLATE_RSQUARE, 0, 128, proc->timer, proc->duration);
proc->timer++;
if (proc->timer > proc->unk2E)
if (proc->timer > proc->duration)
{
gEfxBgSemaphore--;
Proc_Break(proc);

View File

@ -114,7 +114,7 @@ CONST_DATA struct ProcCmd ProcScr_efxRestRST[] = {
PROC_END
};
ProcPtr NewefxRestRST(struct Anim *anim, int unk44, int unk48, int frame, int unk50)
ProcPtr NewefxRestRST(struct Anim *anim, int unk44, int unk48, int frame, int speed)
{
struct ProcEfx *proc;
@ -123,11 +123,11 @@ ProcPtr NewefxRestRST(struct Anim *anim, int unk44, int unk48, int frame, int un
proc->anim = anim;
proc->timer = 0,
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = unk44;
proc->unk48 = unk48;
proc->unk4C = frame;
proc->unk50 = unk50;
proc->frame = frame;
proc->speed = speed;
return proc;
}
@ -149,12 +149,12 @@ void efxRestRSTMain(struct ProcEfx *proc)
else
buf = gpBg1ScrollOffsetList1;
val1 = proc->unk2E;
proc->unk2E += proc->unk50;
val1 = proc->step;
proc->step += proc->speed;
for (i = 0; i < 0x78; buf++, i++) {
val1 += proc->unk48;
*buf = (((gUnknown_0875879C[val1] * proc->unk4C) << 8) >> 0x10) + gLCDControlBuffer.bgoffset[1].x;
*buf = (((gUnknown_0875879C[val1] * proc->frame) << 8) >> 0x10) + gLCDControlBuffer.bgoffset[1].x;
}
if (++proc->timer == proc->unk44)
@ -176,7 +176,7 @@ void NewEfxTwobaiRST(struct Anim *anim, int unk44)
proc->anim = anim;
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = unk44;
for (i = 0; i < 0x78; i++)
@ -209,7 +209,7 @@ void NewDummvRST(struct Anim *anim, int unk44)
proc->anim = anim;
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = unk44;
}
@ -250,7 +250,7 @@ void NewEfxRestWIN(struct Anim *anim, int unk44, void *unk54, void *unk58)
proc->anim = anim;
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = unk44;
proc->unk54 = unk54;
proc->unk58 = unk58;
@ -281,11 +281,11 @@ void EfxRestWINMain(struct ProcEfx *proc)
buf = gpBg2ScrollOffsetTable1;
base = proc->unk54;
val2 = base[proc->unk2E];
val2 = base[proc->step];
buf2 = proc->unk58[val2];
if (val2 != 0xFFFF) {
proc->unk2E++;
proc->step++;
for (i = 0; i < 0x78; buf2 = buf2 + 2, buf++, i++) {
if (buf2[0] == 0x7FFF)
buf[0] = 0;
@ -452,11 +452,11 @@ void NewEfxALPHA(struct Anim *anim, int a, int b, int c, int d, int e)
proc = Proc_Start(ProcScr_efxALPHA, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->unk2E = a;
proc->step = a;
proc->unk30 = a + b;
proc->unk44 = c;
proc->unk48 = d;
proc->unk4C = e;
proc->frame = e;
}
const char aEfxalpha[] = "efxALPHA";

View File

@ -299,7 +299,7 @@ void NewEfxMagfcast(struct Anim *anim, int type)
proc->anim = anim;
proc->timer = 0;
id2 = gEkrPairBanimID2[GetAnimPosition(anim)] - 0x6A;
id2 = gBanimIdx[GetAnimPosition(anim)] - 0x6A;
switch (id2) {
case 0x0:
case 0x1:
@ -465,7 +465,7 @@ void NewEfxSunakemuriOBJ(struct Anim *anim, int type)
proc->anim2 = EfxCreateFrontAnim(anim, scr2, scr1, scr2, scr1);
terrain = gEkrPairTerrainID[GetAnimPosition(proc->anim)];
terrain = gBanimTerrain[GetAnimPosition(proc->anim)];
switch (terrain) {
case TERRAIN_PLAINS:
case TERRAIN_ROAD:
@ -844,7 +844,7 @@ void NewEfxSRankWeaponEffectSCR(void)
struct ProcEfx *proc;
proc = Proc_Start(efxSRankWeaponEffectSCR, PROC_TREE_3);
proc->timer = 0;
proc->unk2E = 0;
proc->step = 0;
proc->unk44 = 0;
NewEfxSRankWeaponEffectSCR2(proc);
}
@ -982,7 +982,7 @@ void NewEfxMantBatabata(struct Anim *anim)
struct ProcEfxOBJ *proc;
struct Anim *anim2;
banim_index = gEkrPairBanimID2[GetAnimPosition(anim)] - 0x6A;
banim_index = gBanimIdx[GetAnimPosition(anim)] - 0x6A;
switch (banim_index) {
case 0x2:
case 0x4:

View File

@ -137,9 +137,9 @@ void EfxPlaySEwithCmdCtrl(struct Anim * anim, int cmd)
pos = GetAnimPosition(anim);
if (pos == POS_L)
terrain = gEkrPairTerrainID[POS_L];
terrain = gBanimTerrain[POS_L];
else
terrain = gEkrPairTerrainID[POS_R];
terrain = gBanimTerrain[POS_R];
sound_type = GetEfxSoundType1FromTerrain(terrain);
if (terrain == TERRAIN_BRIDGE_14)
@ -149,9 +149,9 @@ void EfxPlaySEwithCmdCtrl(struct Anim * anim, int cmd)
}
if (pos == POS_L)
basecon = gEkrPairBaseCon[POS_L];
basecon = gBanimCon[POS_L];
else
basecon = gEkrPairBaseCon[POS_R];
basecon = gBanimCon[POS_R];
val2 = GetEfxSoundType2FromBaseCon(basecon);
@ -325,9 +325,9 @@ void EfxPlaySEwithCmdCtrl(struct Anim * anim, int cmd)
case 52:
if (pos != POS_L)
tmp = gEkrPairBanimID2[POS_L];
tmp = gBanimIdx[POS_L];
else
tmp = gEkrPairBanimID2[POS_R];
tmp = gBanimIdx[POS_R];
switch (tmp) {
case 0xBC: /* todo: battle anim index */
@ -896,7 +896,7 @@ void EkrPlayMainBGM(void)
gEkrMainBgmPlaying = 1;
songid = gEkrFactions[gEkrInitialHitSide] != 1 ? 0x19 : 0x1A;
songid = gBanimFactionPal[gEkrInitialHitSide] != 1 ? 0x19 : 0x1A;
if (GetBattleAnimArenaFlag() == 1)
{
@ -924,7 +924,7 @@ void EkrPlayMainBGM(void)
if (!EkrCheckAttackRound(1))
ret = false;
if (gEkrPairSideVaild[POS_L] == false)
if (gBanimValid[POS_L] == false)
ret = false;
pid = UNIT_CHAR_ID(&bul->unit);
@ -958,7 +958,7 @@ void EkrPlayMainBGM(void)
if (UNIT_FACTION(GetUnitFromCharId(UNIT_CHAR_ID(&bul->unit))) == FACTION_BLUE)
songid2 = -1;
if (gEkrPairSideVaild[POS_L] == false)
if (gBanimValid[POS_L] == false)
songid2 = -1;
if (songid2 != -1)

View File

@ -337,7 +337,7 @@ void ekrBattleSetFlashingEffect(struct ProcEkrBattle *proc)
{
NewEfxStatusUnit(gAnims[0]);
NewEfxStatusUnit(gAnims[2]);
NewEfxWeaponIcon(gEkrPairEffectiveAgainst[0], gEkrPairEffectiveAgainst[1]);
NewEfxWeaponIcon(gBanimEffectiveness[0], gBanimEffectiveness[1]);
if (gBattleStats.config & BATTLE_CONFIG_REFRESH)
DisableEfxStatusUnits(gAnims[0]);
@ -371,7 +371,7 @@ void ekrBattleTriggerNewRoundStart(struct ProcEkrBattle *proc)
if (++proc->timer <= 0x1E)
return;
if (gEkrPairSideVaild[0] == true) {
if (gBanimValid[0] == true) {
anim = gAnims[0];
anim->state3 = ANIM_BIT3_NEW_ROUND_START;
anim->state2 |= ANIM_BIT2_STOP;
@ -381,7 +381,7 @@ void ekrBattleTriggerNewRoundStart(struct ProcEkrBattle *proc)
anim->state2 |= ANIM_BIT2_STOP;
}
if (gEkrPairSideVaild[1] == true) {
if (gBanimValid[1] == true) {
anim = gAnims[2];
anim->state3 = ANIM_BIT3_NEW_ROUND_START;
anim->state2 |= ANIM_BIT2_STOP;
@ -417,7 +417,7 @@ void ekrBattle_WaitPromotionIdle(struct ProcEkrBattle *proc)
{
if (EkrClasschgFinished() == true) {
EndEkrClasschg();
gEkrPairExpGain[0] = 1;
gBanimExpGain[0] = 1;
proc->proc_idleCb = (ProcFunc)ekrBattle_ExecEkrLvup;
}
}
@ -436,20 +436,20 @@ void ekrBattleInRoundIdle(struct ProcEkrBattle *proc)
if (GetBattleAnimArenaFlag() == 0)
ret = 1;
else {
gEkrPairExpGain[0] = gpEkrBattleUnitLeft->expGain;
gEkrPairExpGain[1] = gpEkrBattleUnitRight->expGain;
gBanimExpGain[0] = gpEkrBattleUnitLeft->expGain;
gBanimExpGain[1] = gpEkrBattleUnitRight->expGain;
if (gEkrGaugeHp[0] == 0) {
ArenaSetResult(1);
ret = 1;
} else if (gEkrGaugeHp[1] == 0) {
ArenaSetResult(2);
gEkrPairExpGain[1] = 0;
gBanimExpGain[1] = 0;
ret = 1;
} else if (proc->speedup == true) {
sub_805B094();
ArenaSetResult(4);
gEkrPairExpGain[1] = 0;
gBanimExpGain[1] = 0;
ret = 1;
} else {
u8 val = 0;
@ -457,9 +457,9 @@ void ekrBattleInRoundIdle(struct ProcEkrBattle *proc)
struct Anim *anim2 = gAnims[2];
switch (anim1->currentRoundType) {
case 6:
case 7:
case 8:
case BANIM_MODE_CLOSE_DODGE:
case BANIM_MODE_RANGED_DODGE:
case BANIM_MODE_STANDING:
val = 1;
break;
@ -468,9 +468,9 @@ void ekrBattleInRoundIdle(struct ProcEkrBattle *proc)
} /* switch */
switch (anim2->currentRoundType) {
case 6:
case 7:
case 8:
case BANIM_MODE_CLOSE_DODGE:
case BANIM_MODE_RANGED_DODGE:
case BANIM_MODE_STANDING:
val++;
break;
@ -479,6 +479,22 @@ void ekrBattleInRoundIdle(struct ProcEkrBattle *proc)
} /* switch */
if (val == 2) {
/**
* After both side of banim is done, exec new frame.
* Both of actor and target use C0D to update Anim::currentRoundType
*
* However, in the most cases, this part will not be exec.
* Becase the actor anim will use C06 to trigger another side battle anim's state:
*
* Anim::state3::ANIM_BIT3_NEXT_ROUND_START,
*
* which may cause target anim automatically
* update its anim in BattleAIS_ExecCommands()
*
* As a result, this part of code is only used if:
* 1. the developer failed to insert C06 for attack anim in mistake
* 2. arena
*/
if (GetUnitEfxDebuff(anim1) & 0xC)
SetUnitEfxDebuff(anim1, UNIT_STATUS_NONE);
@ -542,7 +558,7 @@ void ekrBattle_8050600(struct ProcEkrBattle *proc)
if (CheckEkrDragonDead(gAnims[0]) != false)
return;
if (gEkrPairExpGain[EKR_POS_L] != 0)
if (gBanimExpGain[EKR_POS_L] != 0)
pos = EKR_POS_L;
else
pos = EKR_POS_R;
@ -562,7 +578,7 @@ void ekrBattle_WaitForPostBattleAct(struct ProcEkrBattle *proc)
if (++proc->timer < 0x1E)
return;
if (GetBanimLinkArenaFlag() != 1 && gEkrPairExpGain[EKR_POS_L] != -gEkrPairExpGain[EKR_POS_R])
if (GetBanimLinkArenaFlag() != 1 && gBanimExpGain[EKR_POS_L] != -gBanimExpGain[EKR_POS_R])
proc->proc_idleCb = (ProcFunc)ekrBattleExecExpGain;
else
proc->proc_idleCb = (ProcFunc)ekrNewEkrPopup;
@ -610,10 +626,10 @@ void ekrBattleExecExpGain(struct ProcEkrBattle * proc)
EkrGauge_Setup44(1);
if (gEkrPairExpGain[EKR_POS_L] != 0)
val0 = gEkrPairExpPrevious[EKR_POS_L];
if (gBanimExpGain[EKR_POS_L] != 0)
val0 = gBanimExpPrevious[EKR_POS_L];
else
val0 = gEkrPairExpPrevious[EKR_POS_R];
val0 = gBanimExpPrevious[EKR_POS_R];
val1 = DivRem(val0, 100);
val2 = Div(val1, 10);
@ -649,12 +665,12 @@ void ekrBattle_80508F0(struct ProcEkrBattle *proc)
void ekrBattle_8050940(struct ProcEkrBattle *proc)
{
if (++proc->timer > 10) {
if (gEkrPairExpGain[0] != 0) {
proc->timer = gEkrPairExpPrevious[0];
proc->end = gEkrPairExpPrevious[0] + gEkrPairExpGain[0];
} else if (gEkrPairExpGain[1] != 0) {
proc->timer = gEkrPairExpPrevious[1];
proc->end = gEkrPairExpPrevious[1] + gEkrPairExpGain[1];
if (gBanimExpGain[0] != 0) {
proc->timer = gBanimExpPrevious[0];
proc->end = gBanimExpPrevious[0] + gBanimExpGain[0];
} else if (gBanimExpGain[1] != 0) {
proc->timer = gBanimExpPrevious[1];
proc->end = gBanimExpPrevious[1] + gBanimExpGain[1];
}
proc->proc_idleCb = (ProcFunc)ekrBattleWaitExpBarIdle;
@ -722,10 +738,10 @@ void ekrBattleLvupHanlder(struct ProcEkrBattle *proc)
int c;
if (++proc->timer == 0x18) {
if (gEkrPairExpGain[EKR_POS_L] != 0)
c = gEkrPairExpPrevious[EKR_POS_L] + gEkrPairExpGain[EKR_POS_L];
if (gBanimExpGain[EKR_POS_L] != 0)
c = gBanimExpPrevious[EKR_POS_L] + gBanimExpGain[EKR_POS_L];
else
c = gEkrPairExpPrevious[EKR_POS_R] + gEkrPairExpGain[EKR_POS_R];
c = gBanimExpPrevious[EKR_POS_R] + gBanimExpGain[EKR_POS_R];
if (c >= 100)
NewEkrLvlupFan();
}
@ -754,10 +770,10 @@ void ekrBattleLvupHanlder(struct ProcEkrBattle *proc)
SetWin0Box(0, 0, 0xF0, 0xA0);
if (gEkrPairExpGain[EKR_POS_L] != 0)
c = gEkrPairExpPrevious[EKR_POS_L] + gEkrPairExpGain[EKR_POS_L];
if (gBanimExpGain[EKR_POS_L] != 0)
c = gBanimExpPrevious[EKR_POS_L] + gBanimExpGain[EKR_POS_L];
else
c = gEkrPairExpPrevious[EKR_POS_R] + gEkrPairExpGain[EKR_POS_R];
c = gBanimExpPrevious[EKR_POS_R] + gBanimExpGain[EKR_POS_R];
if (c >= 100)
proc->proc_idleCb = (ProcFunc)ekrBattle_ExecEkrLvup;
else
@ -768,7 +784,7 @@ void ekrBattle_ExecEkrLvup(struct ProcEkrBattle *proc)
{
struct Anim *anim;
if (gEkrPairExpGain[EKR_POS_L] != 0)
if (gBanimExpGain[EKR_POS_L] != 0)
anim = gAnims[EKR_POS_L * 2];
else
anim = gAnims[EKR_POS_R * 2];

View File

@ -35,7 +35,7 @@ void ekrBattleEnding_80560F0(struct ProcEkrBattleEnding * proc)
{
int ret;
if (gBanimBackgroundIndex == 0) {
if (gBanimBG == 0) {
Proc_Break(proc);
return;
}
@ -51,7 +51,7 @@ void ekrBattleEnding_80560F0(struct ProcEkrBattleEnding * proc)
}
ret = Interpolate(INTERPOLATE_LINEAR, 0, 0x10, proc->timer, 0x8);
PutBanimBgPAL(gBanimBackgroundIndex - 1);
PutBanimBgPAL(gBanimBG - 1);
EfxPalBlackInOut(gPaletteBuffer, 0x6, 0xA, ret);
EnablePaletteSync();
@ -63,7 +63,7 @@ void ekrBattleEnding_80560F0(struct ProcEkrBattleEnding * proc)
void ekrBattleEnding_8056170(struct ProcEkrBattleEnding * proc)
{
if (gBanimBackgroundIndex == 0) {
if (gBanimBG == 0) {
Proc_Break(proc);
return;
}
@ -87,7 +87,7 @@ void ekrBattleEnding_8056170(struct ProcEkrBattleEnding * proc)
void ekrBattleEnding_80561C8(struct ProcEkrBattleEnding * proc)
{
if (gBanimBackgroundIndex == 0) {
if (gBanimBG == 0) {
Proc_Break(proc);
return;
}
@ -116,11 +116,11 @@ void ekrBattleEnding_8056228(struct ProcEkrBattleEnding * proc)
proc->timer = 0;
val = (gEkrPairBmLoc[0] + gEkrPairBmLoc[2]) * 8 + 8;
val = (gEkrBmLocation[0] + gEkrBmLocation[2]) * 8 + 8;
proc->x2 = val;
proc->x1 = val;
val = (gEkrPairBmLoc[1] + gEkrPairBmLoc[3]) * 8 + 8;
val = (gEkrBmLocation[1] + gEkrBmLocation[3]) * 8 + 8;
proc->y2 = val;
proc->y1 = val;

View File

@ -168,34 +168,34 @@ void NewEkrBaseKaiten(int identifier)
gLCDControlBuffer.bldcnt.target2_bd_on = 1;
if (gEkrPairBmLoc[0] == gEkrPairBmLoc[2])
if (gEkrBmLocation[POS_L] == gEkrBmLocation[2])
{
if (gEkrPairBmLoc[1] >= gEkrPairBmLoc[3])
if (gEkrBmLocation[POS_R] >= gEkrBmLocation[3])
mode = 6;
else
mode = 2;
}
else
{
if (gEkrPairBmLoc[1] == gEkrPairBmLoc[3])
if (gEkrBmLocation[POS_R] == gEkrBmLocation[3])
{
if (gEkrPairBmLoc[0] < gEkrPairBmLoc[2])
if (gEkrBmLocation[0] < gEkrBmLocation[2])
mode = 0;
else
mode = 4;
}
else
{
if (gEkrPairBmLoc[0] < gEkrPairBmLoc[2])
if (gEkrBmLocation[0] < gEkrBmLocation[2])
{
if (gEkrPairBmLoc[1] >= gEkrPairBmLoc[3])
if (gEkrBmLocation[1] >= gEkrBmLocation[3])
mode = 7;
else
mode = 1;
}
else
{
if (gEkrPairBmLoc[1] >= gEkrPairBmLoc[3])
if (gEkrBmLocation[1] >= gEkrBmLocation[3])
mode = 5;
else
mode = 3;
@ -231,8 +231,8 @@ void NewEkrBaseKaiten(int identifier)
proc->unk29 = 0;
proc->timer = 0;
proc->terminator = 0xB;
proc->x1 = (gEkrPairBmLoc[0] + gEkrPairBmLoc[2]) * 8 + 8;
proc->y1 = (gEkrPairBmLoc[1] + gEkrPairBmLoc[3]) * 8 + 8;
proc->x1 = (gEkrBmLocation[0] + gEkrBmLocation[2]) * 8 + 8;
proc->y1 = (gEkrBmLocation[1] + gEkrBmLocation[3]) * 8 + 8;
proc->x2 = 0x78;
proc->y2 = 0x68;
@ -267,8 +267,8 @@ void NewEkrBaseKaiten(int identifier)
proc->unk29 = 0;
proc->timer = 0;
proc->terminator = 0xB;
proc->x1 = gEkrPairBmLoc[0] * 0x10 + 8;
proc->y1 = gEkrPairBmLoc[1] * 0x10 + 8;
proc->x1 = gEkrBmLocation[0] * 0x10 + 8;
proc->y1 = gEkrBmLocation[1] * 0x10 + 8;
proc->x2 = 0x48;
proc->y2 = 0x68;
@ -304,8 +304,8 @@ void NewEkrBaseKaiten(int identifier)
proc->unk29 = 1;
proc->timer = 0;
proc->terminator = 0xB;
proc->x1 = gEkrPairBmLoc[2] * 0x10 + 8;
proc->y1 = gEkrPairBmLoc[3] * 0x10 + 8;
proc->x1 = gEkrBmLocation[2] * 0x10 + 8;
proc->y1 = gEkrBmLocation[3] * 0x10 + 8;
proc->x2 = 0xA8;
proc->y2 = 0x68;
@ -342,8 +342,8 @@ void NewEkrBaseKaiten(int identifier)
proc->unk29 = 0;
proc->timer = 0;
proc->terminator = 0xB;
proc->x1 = gEkrPairBmLoc[2] * 0x10 + 8;
proc->y1 = gEkrPairBmLoc[3] * 0x10 + 8;
proc->x1 = gEkrBmLocation[2] * 0x10 + 8;
proc->y1 = gEkrBmLocation[3] * 0x10 + 8;
proc->x2 = 0x78;
proc->y2 = 0x68;
@ -430,10 +430,10 @@ void NewEkrUnitKakudai(int identifier)
case EKR_DISTANCE_FAR:
case EKR_DISTANCE_FARFAR:
case EKR_DISTANCE_MONOCOMBAT:
if (gEkrPairSideVaild[POS_L] == true && GetBanimDragonStatusType() == EKRDRGON_TYPE_NORMAL)
if (gBanimValid[POS_L] == true && GetBanimDragonStatusType() == EKRDRGON_TYPE_NORMAL)
proc->valid_l = 1;
if (gEkrPairSideVaild[POS_R] == true)
if (gBanimValid[POS_R] == true)
proc->valid_r = 1;
return;
@ -505,7 +505,7 @@ void UnitKakudaiPrepareAnimScript(struct ProcUnitKakudai * proc)
if (gBattleStats.config & BATTLE_CONFIG_REFRESH)
EfxPalModifyPetrifyEffect(gPaletteBuffer, 0x17, 1);
if (gEkrPairSideVaild[POS_L] == true)
if (gBanimValid[POS_L] == true)
{
struct BanimModeData * unk;
const void * src;
@ -516,7 +516,7 @@ void UnitKakudaiPrepareAnimScript(struct ProcUnitKakudai * proc)
LZ77UnCompWram(src, gBanimLeftImgSheetBuf);
}
if (gEkrPairSideVaild[POS_R] == true)
if (gBanimValid[POS_R] == true)
{
struct BanimModeData * unk;
const void * src;
@ -527,11 +527,11 @@ void UnitKakudaiPrepareAnimScript(struct ProcUnitKakudai * proc)
LZ77UnCompWram(src, gBanimRightImgSheetBuf);
}
if (gUnknown_0203E1A4[POS_L] != NULL)
LZ77UnCompWram(gUnknown_0203E1A4[POS_L], gEkrKakudaiSomeBufLeft);
if (gBanimForceUnitChgDebug[POS_L] != NULL)
LZ77UnCompWram(gBanimForceUnitChgDebug[POS_L], gEkrKakudaiSomeBufLeft);
if (gUnknown_0203E1A4[POS_R] != NULL)
LZ77UnCompWram(gUnknown_0203E1A4[POS_R], gEkrKakudaiSomeBufRight);
if (gBanimForceUnitChgDebug[POS_R] != NULL)
LZ77UnCompWram(gBanimForceUnitChgDebug[POS_R], gEkrKakudaiSomeBufRight);
ptr = OBJ_VRAM1;
RegisterDataMove(gBanimLeftImgSheetBuf, ptr, 0x4000);
@ -539,10 +539,10 @@ void UnitKakudaiPrepareAnimScript(struct ProcUnitKakudai * proc)
proc->timer = 0;
proc->terminator = 0xB;
proc->x1 = gEkrPairBmLoc[0] * 0x10 + 8;
proc->y1 = gEkrPairBmLoc[1] * 0x10 + 8;
proc->x2 = gEkrPairBmLoc[2] * 0x10 + 8;
proc->y2 = gEkrPairBmLoc[3] * 0x10 + 8;
proc->x1 = gEkrBmLocation[0] * 0x10 + 8;
proc->y1 = gEkrBmLocation[1] * 0x10 + 8;
proc->x2 = gEkrBmLocation[2] * 0x10 + 8;
proc->y2 = gEkrBmLocation[3] * 0x10 + 8;
proc->left_pos = BanimTypesPosLeft[gEkrDistanceType];
proc->right_pos = BanimTypesPosRight[gEkrDistanceType];
@ -833,9 +833,9 @@ bool PrepareBattleGraphicsMaybe(void)
struct Unit * unit_bu2;
struct BattleUnit * bu1;
struct BattleUnit * bu2;
const struct CharacterData * sp_10;
const struct CharacterData * sp_14;
int v62;
const struct CharacterData * pinfo1;
const struct CharacterData * pinfo2;
int usrdefined_enable;
const void * animdef1;
const void * animdef2;
s16 valid_l;
@ -866,16 +866,16 @@ bool PrepareBattleGraphicsMaybe(void)
bu1 = gpEkrBattleUnitLeft = &gBattleActor;
bu2 = gpEkrBattleUnitRight = &gBattleTarget;
gEkrInitialPosition[0] = gEkrInitialPosition[1] = 0;
gEkrPairSideVaild[EKR_POS_R] = gEkrPairSideVaild[EKR_POS_L] = true;
gEkrInitialPosition[POS_L] = gEkrInitialPosition[POS_R] = 0;
gBanimValid[EKR_POS_R] = gBanimValid[EKR_POS_L] = true;
}
else
{
int pos;
u8 i1 = -0x40 & gBattleActor.unit.index;
u16 faction1 = GetAllegienceId(i1);
u16 faction1 = GetBanimFactionPalette(i1);
u8 i2 = -0x40 & gBattleTarget.unit.index;
u16 faction2 = GetAllegienceId(i2);
u16 faction2 = GetBanimFactionPalette(i2);
if (gBattleStats.config & BATTLE_CONFIG_REFRESH)
char_cnt = 2;
@ -884,42 +884,42 @@ bool PrepareBattleGraphicsMaybe(void)
else
char_cnt = GetSpellAssocCharCount(GetItemIndex(gBattleActor.weaponBefore));
gEkrPairSideVaild[EKR_POS_L] = gEkrPairSideVaild[EKR_POS_R] = true;
gBanimValid[EKR_POS_L] = gBanimValid[EKR_POS_R] = true;
if (EKR_POS_R == GetPosFunc(faction1, faction2))
{
bu1 = gpEkrBattleUnitLeft = &gBattleTarget;
bu2 = gpEkrBattleUnitRight = &gBattleActor;
gEkrInitialPosition[0] = true;
gEkrInitialPosition[1] = false;
gEkrInitialPosition[POS_L] = true;
gEkrInitialPosition[POS_R] = false;
if (char_cnt == 1)
gEkrPairSideVaild[EKR_POS_L] = false;
gBanimValid[EKR_POS_L] = false;
}
else
{
bu1 = gpEkrBattleUnitLeft = &gBattleActor;
bu2 = gpEkrBattleUnitRight = &gBattleTarget;
gEkrInitialPosition[0] = false;
gEkrInitialPosition[1] = true;
gEkrInitialPosition[POS_L] = false;
gEkrInitialPosition[POS_R] = true;
if (char_cnt == 1)
gEkrPairSideVaild[EKR_POS_R] = false;
gBanimValid[EKR_POS_R] = false;
}
}
unit_bu1 = &bu1->unit;
unit_bu2 = &bu2->unit;
sp_10 = unit_bu1->pCharacterData;
sp_14 = unit_bu2->pCharacterData;
pinfo1 = unit_bu1->pCharacterData;
pinfo2 = unit_bu2->pCharacterData;
animdef1 = animdef2 = 0;
valid_l = gEkrPairSideVaild[0];
valid_r = gEkrPairSideVaild[1];
valid_l = gBanimValid[POS_L];
valid_r = gBanimValid[POS_R];
if (valid_l)
animdef1 = unit_bu1->pClassData->pBattleAnimDef;
@ -929,14 +929,14 @@ bool PrepareBattleGraphicsMaybe(void)
if (valid_l)
{
gEkrPairBmLoc[0] = (16 * unit_bu1->xPos - gBmSt.camera.x) >> 4;
gEkrPairBmLoc[1] = (16 * unit_bu1->yPos - gBmSt.camera.y) >> 4;
gEkrBmLocation[POS_L] = (16 * unit_bu1->xPos - gBmSt.camera.x) >> 4;
gEkrBmLocation[POS_R] = (16 * unit_bu1->yPos - gBmSt.camera.y) >> 4;
}
if (valid_r)
{
gEkrPairBmLoc[2] = (16 * unit_bu2->xPos - gBmSt.camera.x) >> 4;
gEkrPairBmLoc[3] = (16 * unit_bu2->yPos - gBmSt.camera.y) >> 4;
gEkrBmLocation[2] = (16 * unit_bu2->xPos - gBmSt.camera.x) >> 4;
gEkrBmLocation[3] = (16 * unit_bu2->yPos - gBmSt.camera.y) >> 4;
}
if (gEkrDistanceType != EKR_DISTANCE_PROMOTION)
@ -950,8 +950,8 @@ bool PrepareBattleGraphicsMaybe(void)
if (valid_l + valid_r == 2)
{
s16 x_distance, y_distance;
x_distance = ABS(gEkrPairBmLoc[0] - gEkrPairBmLoc[2]);
y_distance = ABS(gEkrPairBmLoc[1] - gEkrPairBmLoc[3]);
x_distance = ABS(gEkrBmLocation[POS_L] - gEkrBmLocation[2]);
y_distance = ABS(gEkrBmLocation[1] - gEkrBmLocation[3]);
if (x_distance + y_distance <= 1)
{
@ -971,19 +971,19 @@ bool PrepareBattleGraphicsMaybe(void)
if (gEkrDistanceType == EKR_DISTANCE_PROMOTION)
{
gEkrPairBanimID2[0] = gEkrPairBanimID[0] = GetBattleAnimationId(unit_bu1, animdef1, bu1->weapon, &animid1);
gEkrPairBanimID2[1] = gEkrPairBanimID[1] = GetBattleAnimationId(unit_bu2, animdef2, bu2->weapon, &animid2);
gBanimIdx[POS_L] = gBanimIdx_bak[POS_L] = GetBattleAnimationId(unit_bu1, animdef1, bu1->weapon, &animid1);
gBanimIdx[POS_R] = gBanimIdx_bak[POS_R] = GetBattleAnimationId(unit_bu2, animdef2, bu2->weapon, &animid2);
}
else
{
if (valid_l)
{
gEkrPairBanimID2[0] = gEkrPairBanimID[0] = GetBattleAnimationId(unit_bu1, animdef1, bu1->weaponBefore, &animid1);
gBanimIdx[POS_L] = gBanimIdx_bak[POS_L] = GetBattleAnimationId(unit_bu1, animdef1, bu1->weaponBefore, &animid1);
}
if (valid_r)
{
gEkrPairBanimID2[1] = gEkrPairBanimID[1] = GetBattleAnimationId(unit_bu2, animdef2, bu2->weaponBefore, &animid2);
gBanimIdx[POS_R] = gBanimIdx_bak[POS_R] = GetBattleAnimationId(unit_bu2, animdef2, bu2->weaponBefore, &animid2);
}
}
@ -991,13 +991,13 @@ bool PrepareBattleGraphicsMaybe(void)
jid = unit_bu1->pClassData->number;
if (valid_l)
gAnimCharaPalIndex[0] = -1;
gBanimUniquePal[POS_L] = -1;
for (i = 0; i < 7; i++)
{
if (gAnimCharaPalConfig[pid][i] == jid && valid_l)
{
gAnimCharaPalIndex[0] = gAnimCharaPalIt[pid][i] - 1;
gBanimUniquePal[POS_L] = gAnimCharaPalIt[pid][i] - 1;
break;
}
}
@ -1006,53 +1006,53 @@ bool PrepareBattleGraphicsMaybe(void)
jid = unit_bu2->pClassData->number;
if (valid_r)
gAnimCharaPalIndex[1] = -1;
gBanimUniquePal[POS_R] = -1;
for (i = 0; i < 7; i++)
{
if (gAnimCharaPalConfig[pid][i] == jid && valid_r)
{
gAnimCharaPalIndex[1] = gAnimCharaPalIt[pid][i] - 1;
gBanimUniquePal[POS_R] = gAnimCharaPalIt[pid][i] - 1;
break;
}
}
if (valid_l)
gBanimTriAtkPalettes[0] = (void *)FilterBattleAnimCharacterPalette(gEkrPairBanimID2[0], bu1->weaponBefore);
gBanimTriAtkPalettes[POS_L] = (void *)FilterBattleAnimCharacterPalette(gBanimIdx[POS_L], bu1->weaponBefore);
if (valid_r)
gBanimTriAtkPalettes[1] = (void *)FilterBattleAnimCharacterPalette(gEkrPairBanimID2[1], bu2->weaponBefore);
gBanimTriAtkPalettes[POS_R] = (void *)FilterBattleAnimCharacterPalette(gBanimIdx[POS_R], bu2->weaponBefore);
gEkrPairTerrainID[0] = bu1->terrainId;
gEkrPairTerrainID[1] = bu2->terrainId;
gBanimTerrain[POS_L] = bu1->terrainId;
gBanimTerrain[POS_R] = bu2->terrainId;
gBanimTerrainIndexMaybe[0] = gBanimTerrainIndexMaybe[1] = -1;
gBanimFloorfx[POS_L] = gBanimFloorfx[POS_R] = -1;
if (valid_l)
gBanimTerrainIndexMaybe[0] =
gBanimFloorfx[POS_L] =
GetBanimTerrainGround(bu1->terrainId, GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
if (valid_r)
gBanimTerrainIndexMaybe[1] =
gBanimFloorfx[POS_R] =
GetBanimTerrainGround(bu2->terrainId, GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
if (gBmSt.gameStateBits & BM_FLAG_LINKARENA)
{
gEkrPairTerrainID[1] = gEkrPairTerrainID[0] = TERRAIN_ARENA_30;
gBanimTerrain[POS_R] = gBanimTerrain[POS_L] = TERRAIN_ARENA_30;
if (valid_l)
gBanimTerrainIndexMaybe[0] =
GetBanimTerrainGround(gEkrPairTerrainID[0], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
gBanimFloorfx[POS_L] =
GetBanimTerrainGround(gBanimTerrain[POS_L], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
if (valid_r)
gBanimTerrainIndexMaybe[1] =
GetBanimTerrainGround(gEkrPairTerrainID[1], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
gBanimFloorfx[POS_R] =
GetBanimTerrainGround(gBanimTerrain[POS_R], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
}
if (CheckBanimHensei() == true)
{
gBanimTerrainIndexMaybe[0] = gBanimTerrainIndexMaybe[1] = 20;
gEkrPairTerrainID[0] = gEkrPairTerrainID[1] = TERRAIN_ARENA_30;
gBanimFloorfx[POS_L] = gBanimFloorfx[POS_R] = 20;
gBanimTerrain[POS_L] = gBanimTerrain[POS_R] = TERRAIN_ARENA_30;
}
switch (gEkrDistanceType)
@ -1064,7 +1064,7 @@ bool PrepareBattleGraphicsMaybe(void)
break;
case EKR_DISTANCE_PROMOTION:
gBanimTerrainIndexMaybe[0] = gBanimTerrainIndexMaybe[1];
gBanimFloorfx[POS_L] = gBanimFloorfx[POS_R];
break;
}
@ -1081,49 +1081,49 @@ bool PrepareBattleGraphicsMaybe(void)
}
if (valid_l)
gEkrPairBaseCon[0] = unit_bu1->pClassData->baseCon;
gBanimCon[POS_L] = unit_bu1->pClassData->baseCon;
if (valid_r)
gEkrPairBaseCon[1] = unit_bu2->pClassData->baseCon;
gBanimCon[POS_R] = unit_bu2->pClassData->baseCon;
if (valid_l)
{
gEkrGaugeHp[0] = bu1->hpInitial;
gEkrPairMaxHP[0] = unit_bu1->maxHP;
gEkrGaugeHp[POS_L] = bu1->hpInitial;
gBanimMaxHP[POS_L] = unit_bu1->maxHP;
}
if (valid_r)
{
gEkrGaugeHp[1] = bu2->hpInitial;
gEkrPairMaxHP[1] = unit_bu2->maxHP;
gEkrGaugeHp[POS_R] = bu2->hpInitial;
gBanimMaxHP[POS_R] = unit_bu2->maxHP;
}
ParseBattleHitToBanimCmd();
if (gEkrDistanceType == EKR_DISTANCE_PROMOTION)
{
gEkrSpellAnimIndex[1] = 1;
gEkrSpellAnimIndex[0] = 1;
gEkrSpellAnimIndex[POS_R] = 1;
gEkrSpellAnimIndex[POS_L] = 1;
}
else
{
if (valid_l)
gEkrSpellAnimIndex[0] = GetSpellAnimId(unit_bu1->pClassData->number, bu1->weaponBefore);
gEkrSpellAnimIndex[POS_L] = GetSpellAnimId(unit_bu1->pClassData->number, bu1->weaponBefore);
if (valid_r)
gEkrSpellAnimIndex[1] = GetSpellAnimId(unit_bu2->pClassData->number, bu2->weaponBefore);
gEkrSpellAnimIndex[POS_R] = GetSpellAnimId(unit_bu2->pClassData->number, bu2->weaponBefore);
if (gBattleStats.config & BATTLE_CONFIG_REFRESH)
if (!IsItemDisplayedInBattle(bu2->weaponBefore))
if (unit_bu2->pClassData->number == CLASS_DANCER)
gEkrSpellAnimIndex[1] = 0xF;
gEkrSpellAnimIndex[POS_R] = 0xF;
}
if (valid_l)
UnsetMapStaffAnim(&gEkrSpellAnimIndex[0], 0, bu1->weaponBefore);
UnsetMapStaffAnim(&gEkrSpellAnimIndex[POS_L], 0, bu1->weaponBefore);
if (valid_r)
UnsetMapStaffAnim(&gEkrSpellAnimIndex[1], 1, bu2->weaponBefore);
UnsetMapStaffAnim(&gEkrSpellAnimIndex[POS_R], 1, bu2->weaponBefore);
switch (gEkrDistanceType)
{
@ -1133,11 +1133,11 @@ bool PrepareBattleGraphicsMaybe(void)
switch (unit_bu1->pClassData->number)
{
case CLASS_DRACO_ZOMBIE:
SetEkrDragonStatusType(gAnims[0], EKRDRGON_TYPE_DRACO_ZOMBIE);
SetEkrDragonStatusType(gAnims[POS_L], EKRDRGON_TYPE_DRACO_ZOMBIE);
break;
case CLASS_DEMON_KING:
SetEkrDragonStatusType(gAnims[0], EKRDRGON_TYPE_DEMON_KING);
SetEkrDragonStatusType(gAnims[POS_L], EKRDRGON_TYPE_DEMON_KING);
break;
}
@ -1154,124 +1154,124 @@ bool PrepareBattleGraphicsMaybe(void)
if (valid_l)
{
u8 i1 = -0x40 & unit_bu1->index;
gEkrFactions[POS_L] = GetAllegienceId(i1);
gBanimFactionPal[POS_L] = GetBanimFactionPalette(i1);
}
if (valid_r)
{
u8 i2 = -0x40 & unit_bu2->index;
gEkrFactions[POS_R] = GetAllegienceId(i2);
gBanimFactionPal[POS_R] = GetBanimFactionPalette(i2);
}
gEkrPids[1] = 0;
gEkrPids[0] = 0;
gEkrPids[POS_R] = 0;
gEkrPids[POS_L] = 0;
if (valid_l)
gEkrPids[0] = sp_10->number;
gEkrPids[POS_L] = pinfo1->number;
if (valid_r)
gEkrPids[1] = sp_14->number;
gEkrPids[POS_R] = pinfo2->number;
if (valid_l)
gEkrPairHit[0] = bu1->battleEffectiveHitRate;
gEkrGaugeHit[POS_L] = bu1->battleEffectiveHitRate;
if (valid_r)
gEkrPairHit[1] = bu2->battleEffectiveHitRate;
gEkrGaugeHit[POS_R] = bu2->battleEffectiveHitRate;
if (gEkrPairHit[0] == 0xFF)
gEkrPairHit[0] = -1;
if (gEkrGaugeHit[POS_L] == 0xFF)
gEkrGaugeHit[POS_L] = -1;
if (gEkrPairHit[1] == 0xFF)
gEkrPairHit[1] = -1;
if (gEkrGaugeHit[POS_R] == 0xFF)
gEkrGaugeHit[POS_R] = -1;
if (valid_l)
{
gEkrPairDmgPair[0] = bu1->battleAttack - bu2->battleDefense;
if (gEkrPairDmgPair[0] < 0)
gEkrPairDmgPair[0] = 0;
gEkrGaugeDmg[POS_L] = bu1->battleAttack - bu2->battleDefense;
if (gEkrGaugeDmg[POS_L] < 0)
gEkrGaugeDmg[POS_L] = 0;
if (bu1->battleAttack == 0xFF)
gEkrPairDmgPair[0] = -1;
gEkrGaugeDmg[POS_L] = -1;
if (GetItemIndex(bu1->weapon) == ITEM_MONSTER_STONE)
gEkrPairDmgPair[0] = -1;
gEkrGaugeDmg[POS_L] = -1;
}
if (valid_r)
{
gEkrPairDmgPair[1] = bu2->battleAttack - bu1->battleDefense;
if (gEkrPairDmgPair[1] < 0)
gEkrPairDmgPair[1] = 0;
gEkrGaugeDmg[POS_R] = bu2->battleAttack - bu1->battleDefense;
if (gEkrGaugeDmg[POS_R] < 0)
gEkrGaugeDmg[POS_R] = 0;
if (bu2->battleAttack == 0xFF)
gEkrPairDmgPair[1] = -1;
gEkrGaugeDmg[POS_R] = -1;
if (GetItemIndex(bu2->weapon) == ITEM_MONSTER_STONE)
gEkrPairDmgPair[1] = -1;
gEkrGaugeDmg[POS_R] = -1;
}
if (valid_l)
gEkrPairCritPair[0] = bu1->battleEffectiveCritRate;
gEkrGaugeCrt[POS_L] = bu1->battleEffectiveCritRate;
if (valid_r)
gEkrPairCritPair[1] = bu2->battleEffectiveCritRate;
gEkrGaugeCrt[POS_R] = bu2->battleEffectiveCritRate;
if (gEkrPairCritPair[0] == 0xFF)
gEkrPairCritPair[0] = -1;
if (gEkrGaugeCrt[POS_L] == 0xFF)
gEkrGaugeCrt[POS_L] = -1;
if (gEkrPairCritPair[1] == 0xFF)
gEkrPairCritPair[1] = -1;
if (gEkrGaugeCrt[POS_R] == 0xFF)
gEkrGaugeCrt[POS_R] = -1;
if (GetItemIndex(bu1->weapon) == ITEM_MONSTER_STONE)
gEkrPairCritPair[0] = -1;
gEkrGaugeCrt[POS_L] = -1;
if (GetItemIndex(bu2->weapon) == ITEM_MONSTER_STONE)
gEkrPairCritPair[1] = -1;
gEkrGaugeCrt[POS_R] = -1;
if (gEkrDistanceType == EKR_DISTANCE_PROMOTION)
{
gEkrPairHit[1] = -1;
gEkrPairDmgPair[1] = -1;
gEkrPairCritPair[1] = -1;
gEkrGaugeHit[POS_R] = -1;
gEkrGaugeDmg[POS_R] = -1;
gEkrGaugeCrt[POS_R] = -1;
}
if (valid_l)
gEkrPairExpPrevious[0] = (s8)bu1->expPrevious; // needed explicit casts
gBanimExpPrevious[POS_L] = (s8)bu1->expPrevious; // needed explicit casts
if (valid_r)
gEkrPairExpPrevious[1] = (s8)bu2->expPrevious; // needed explicit casts
gBanimExpPrevious[POS_R] = (s8)bu2->expPrevious; // needed explicit casts
if (valid_l)
gEkrPairExpGain[0] = bu1->expGain;
gBanimExpGain[POS_L] = bu1->expGain;
if (valid_r)
gEkrPairExpGain[1] = bu2->expGain;
gBanimExpGain[POS_R] = bu2->expGain;
gEkrPairWTABonus[1] = 0;
gEkrPairWTABonus[0] = 0;
gBanimWtaBonus[POS_R] = 0;
gBanimWtaBonus[POS_L] = 0;
if (gEkrDistanceType != EKR_DISTANCE_PROMOTION)
{
if (valid_l)
gEkrPairWTABonus[0] = bu1->wTriangleHitBonus;
gBanimWtaBonus[POS_L] = bu1->wTriangleHitBonus;
if (valid_r)
gEkrPairWTABonus[1] = bu2->wTriangleHitBonus;
gBanimWtaBonus[POS_R] = bu2->wTriangleHitBonus;
if (valid_l)
gEkrPairEffectiveAgainst[0] = IsUnitEffectiveAgainst(unit_bu1, unit_bu2);
gBanimEffectiveness[POS_L] = IsUnitEffectiveAgainst(unit_bu1, unit_bu2);
if (valid_r)
gEkrPairEffectiveAgainst[1] = IsUnitEffectiveAgainst(unit_bu2, unit_bu1);
gBanimEffectiveness[POS_R] = IsUnitEffectiveAgainst(unit_bu2, unit_bu1);
if (!gEkrPairEffectiveAgainst[0] && valid_l)
gEkrPairEffectiveAgainst[0] = IsItemEffectiveAgainst(bu1->weapon, unit_bu2);
if (!gBanimEffectiveness[POS_L] && valid_l)
gBanimEffectiveness[POS_L] = IsItemEffectiveAgainst(bu1->weapon, unit_bu2);
if (!gEkrPairEffectiveAgainst[1] && valid_r)
gEkrPairEffectiveAgainst[1] = IsItemEffectiveAgainst(bu2->weapon, unit_bu1);
if (!gBanimEffectiveness[POS_R] && valid_r)
gBanimEffectiveness[POS_R] = IsItemEffectiveAgainst(bu2->weapon, unit_bu1);
}
gUnknown_0203E1A4[0] = gUnknown_0203E1A4[1] = (void *)zero = 0;
gBanimForceUnitChgDebug[POS_L] = gBanimForceUnitChgDebug[POS_R] = (void *)zero = 0;
if (valid_l)
(void)GetItemIndex(bu1->weaponBefore);
@ -1281,43 +1281,51 @@ bool PrepareBattleGraphicsMaybe(void)
if (GetBanimLinkArenaFlag() == true || gPlaySt.config.unitColor)
{
gUnknown_0203E1DC[0] = gUnknown_0203E1DC[1] = 1;
gBanimUniquePaletteDisabled[POS_L] = gBanimUniquePaletteDisabled[POS_R] = 1;
}
else
{
gUnknown_0203E1DC[0] = gUnknown_0203E1DC[1] = zero;
gBanimUniquePaletteDisabled[POS_L] = gBanimUniquePaletteDisabled[POS_R] = zero;
}
++zero; --zero; // :/
gBanimBackgroundIndex = 0;
gBanimBG = 0;
if (GetBattleAnimType() == 3)
if (GetBattleAnimPreconfType() == PLAY_ANIMCONF_ON_UNIQUE_BG)
{
if (gEkrPairSideVaild[0] != false)
gBanimBackgroundIndex =
GetBanimBackgroundIndex(gEkrPairTerrainID[0], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
if (gBanimValid[POS_L] != false)
gBanimBG =
GetBanimBackgroundIndex(gBanimTerrain[POS_L], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
else
gBanimBackgroundIndex =
GetBanimBackgroundIndex(gEkrPairTerrainID[1], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
gBanimBG =
GetBanimBackgroundIndex(gBanimTerrain[POS_R], GetROMChapterStruct(gPlaySt.chapterIndex)->battleTileSet);
}
if (CheckBanimHensei() == 1)
gBanimBackgroundIndex = 0x3C;
gBanimBG = 0x3C;
v62 = 0;
if (GetBattleAnimType() == 0)
v62 = 1;
if (GetBattleAnimType() == 3)
v62 = 1;
if (GetBattleAnimType() == 1)
usrdefined_enable = false;
if (GetBattleAnimPreconfType() == PLAY_ANIMCONF_ON)
usrdefined_enable = true;
if (GetBattleAnimPreconfType() == PLAY_ANIMCONF_ON_UNIQUE_BG)
usrdefined_enable = true;
if (GetBattleAnimPreconfType() == PLAY_ANIMCONF_OFF)
{
/**
* Banim can also display regardless used-configuration
* in the following case:
*
* 1. promotion
* 2. arena
* 3. scriptted battle
*/
if (gEkrDistanceType == EKR_DISTANCE_PROMOTION)
v62 = 1;
if (GetBattleAnimArenaFlag() == 1)
v62 = 1;
if ((CheckBattleScriptted() == 1))
v62 = 1;
usrdefined_enable = true;
if (GetBattleAnimArenaFlag() == true)
usrdefined_enable = true;
if ((CheckBattleScriptted() == true))
usrdefined_enable = true;
}
SetBattleUnscriptted();
@ -1359,48 +1367,48 @@ bool PrepareBattleGraphicsMaybe(void)
unit_bu2->pClassData->number != CLASS_PHANTOM && unit_bu2->pClassData->number != CLASS_DRACO_ZOMBIE)
return true;
if (v62 == false)
if (usrdefined_enable == false)
return false;
if (gEkrPairSideVaild[0] == true)
if (gBanimValid[POS_L] == true)
{
if (unit_bu1->statusIndex == UNIT_STATUS_BERSERK)
return false;
if (gEkrPairBanimID2[0] == -1)
if (gBanimIdx[POS_L] == -1)
return false;
if (gEkrSpellAnimIndex[0] == -2)
if (gEkrSpellAnimIndex[POS_L] == -2)
return false;
if (gBanimTerrainIndexMaybe[0] == -1)
if (gBanimFloorfx[POS_L] == -1)
return false;
if (gEkrPairTerrainID[0] == TERRAIN_WALL_1B)
if (gBanimTerrain[POS_L] == TERRAIN_WALL_1B)
return false;
if (gEkrPairTerrainID[0] == TERRAIN_SNAG)
if (gBanimTerrain[POS_L] == TERRAIN_SNAG)
return false;
}
if (gEkrPairSideVaild[1] == true)
if (gBanimValid[POS_R] == true)
{
if (unit_bu2->statusIndex == UNIT_STATUS_BERSERK)
return false;
if (gEkrPairBanimID2[1] == -1)
if (gBanimIdx[POS_R] == -1)
return false;
if (gEkrSpellAnimIndex[1] == -2)
if (gEkrSpellAnimIndex[POS_R] == -2)
return false;
if (gBanimTerrainIndexMaybe[1] == -1)
if (gBanimFloorfx[POS_R] == -1)
return false;
if (gEkrPairTerrainID[1] == TERRAIN_WALL_1B)
if (gBanimTerrain[POS_R] == TERRAIN_WALL_1B)
return false;
if (gEkrPairTerrainID[1] == TERRAIN_SNAG)
if (gBanimTerrain[POS_R] == TERRAIN_SNAG)
return false;
}

View File

@ -107,11 +107,11 @@ void ekrBaStart_InitScreen(struct ProcEkrBattleStarting *proc)
proc->timer = 0;
proc->terminator = 0xF;
val = (gEkrPairBmLoc[0] + gEkrPairBmLoc[2]) * 8 + 8;
val = (gEkrBmLocation[0] + gEkrBmLocation[2]) * 8 + 8;
proc->x2 = val;
proc->x1 = val;
val = (gEkrPairBmLoc[1] + gEkrPairBmLoc[3]) * 8 + 8;
val = (gEkrBmLocation[1] + gEkrBmLocation[3]) * 8 + 8;
proc->y2 = val;
proc->y1 = val;
@ -172,12 +172,12 @@ void ekrBaStart_InitBattleScreen(struct ProcEkrBattleStarting *proc)
break;
case EKR_DISTANCE_MONOCOMBAT:
if (gEkrPairSideVaild[EKR_POS_L] == false) {
if (gBanimValid[EKR_POS_L] == false) {
EkrGauge_Set4C();
EkrDispUpSet4C();
}
if (gEkrPairSideVaild[EKR_POS_R] == false) {
if (gBanimValid[EKR_POS_R] == false) {
EkrGauge_Set50();
EkrDispUpSet50();
}
@ -207,7 +207,7 @@ void ekrBaStart_InitBattleScreen(struct ProcEkrBattleStarting *proc)
void ekrBaStart_ExecEkrBattle6C(struct ProcEkrBattleStarting *proc)
{
if (++proc->timer > 0xB) {
if (gBanimBackgroundIndex == 0 || GetBanimDragonStatusType() != EKRDRGON_TYPE_NORMAL) {
if (gBanimBG == 0 || GetBanimDragonStatusType() != EKRDRGON_TYPE_NORMAL) {
/* In normal battle, here will directly end the proc */
NewEkrBattle();
@ -237,7 +237,7 @@ void ekrBaStart_8056024(struct ProcEkrBattleStarting *proc)
else
gUnknown_0201FAD8 = 0xA;
PutBanimBG(gBanimBackgroundIndex - 1);
PutBanimBG(gBanimBG - 1);
EfxPalBlackInOut(gPaletteBuffer, 0x6, 0xA, 0x10);
Proc_Break(proc);
}
@ -246,7 +246,7 @@ void ekrBaStart_8056078(struct ProcEkrBattleStarting *proc)
{
int val = Interpolate(0, 0x10, 0, proc->timer, 8);
PutBanimBgPAL(gBanimBackgroundIndex - 1);
PutBanimBgPAL(gBanimBG - 1);
EfxPalBlackInOut(gPaletteBuffer, 0x6, 0xA, val);
EnablePaletteSync();

View File

@ -110,32 +110,29 @@ u16 * FilterBattleAnimCharacterPalette(s16 index, u16 item)
}
}
int GetAllegienceId(u32 arg)
int GetBanimFactionPalette(u32 arg)
{
u8 _arg = arg;
switch (_arg)
{
/* ? */
switch (_arg) {
case FACTION_RED:
return FACTION_ID_GREEN;
return BANIMPAL_RED;
/* ? */
case FACTION_GREEN:
return FACTION_ID_RED;
return BANIMPAL_GREEN;
case FACTION_PURPLE:
return FACTION_ID_PURPLE;
return BANIMPAL_PURPLE;
case FACTION_BLUE:
return FACTION_ID_BLUE;
return BANIMPAL_BLUE;
}
return FACTION_ID_BLUE;
return BANIMPAL_BLUE;
}
void EkrPrepareBanimfx(struct Anim * anim, u16 index)
{
gEkrPairBanimID2[GetAnimPosition(anim)] = index;
gBanimIdx[GetAnimPosition(anim)] = index;
UpdateBanimFrame();
SwitchAISFrameDataFromBARoundType(anim, 6);
}
@ -266,15 +263,15 @@ bool CheckBattleScriptted(void)
int GetEkrHit(int pos)
{
return gEkrPairHit[pos];
return gEkrGaugeHit[pos];
}
int GetEkrDmg(int pos)
{
return gEkrPairDmgPair[pos];
return gEkrGaugeDmg[pos];
}
int GetEkrCrit(int pos)
{
return gEkrPairCritPair[pos];
return gEkrGaugeCrt[pos];
}

View File

@ -181,8 +181,8 @@ void EfxClearScreenFx(void)
void sub_8051E00(void)
{
struct BanimUnkStructComm * unk0201FADC = &gUnknown_0201FADC;
struct BattleAnimTerrain * terrain1 = &battle_terrain_table[gBanimTerrainIndexMaybe[0]];
struct BattleAnimTerrain * terrain2 = &battle_terrain_table[gBanimTerrainIndexMaybe[1]];
struct BattleAnimTerrain * terrain1 = &battle_terrain_table[gBanimFloorfx[0]];
struct BattleAnimTerrain * terrain2 = &battle_terrain_table[gBanimFloorfx[1]];
switch (gEkrDistanceType) {
case EKR_DISTANCE_CLOSE:
@ -216,10 +216,10 @@ void sub_8051E00(void)
gUnknown_02000044[0] = gUnknown_085B9D6C[gEkrDistanceType * 2];
gUnknown_02000044[1] = gUnknown_085B9D6C[gEkrDistanceType * 2 + 1];
unk0201FADC->unk00 = gBanimTerrainIndexMaybe[0];
unk0201FADC->unk00 = gBanimFloorfx[0];
unk0201FADC->unk02 = 4;
unk0201FADC->unk04 = 640;
unk0201FADC->unk06 = gBanimTerrainIndexMaybe[1];
unk0201FADC->unk06 = gBanimFloorfx[1];
unk0201FADC->unk08 = 5;
unk0201FADC->unk0A = 640;
unk0201FADC->unk0C = gEkrDistanceType;
@ -241,7 +241,7 @@ void EfxPrepareScreenFx(void)
LZ77UnCompVram(gUnknown_08801C14, (void *)0x6001000);
/* left unit name */
if (gEkrPairSideVaild[EKR_POS_L] == false)
if (gBanimValid[EKR_POS_L] == false)
str = gNopStr;
else
str = GetStringFromIndex(gpEkrBattleUnitLeft->unit.pCharacterData->nameTextId);
@ -252,7 +252,7 @@ void EfxPrepareScreenFx(void)
Text_DrawString(&gTextEkrlvupMsg[0], str);
/* left unit item */
if (gEkrPairSideVaild[EKR_POS_L] == false)
if (gBanimValid[EKR_POS_L] == false)
str = gNopStr;
else
str = GetItemName(gpEkrBattleUnitLeft->weaponBefore);
@ -263,7 +263,7 @@ void EfxPrepareScreenFx(void)
Text_DrawString(&gTextEkrlvupMsg[2], str);
/* right unit name */
if (gEkrPairSideVaild[EKR_POS_R] == false)
if (gBanimValid[EKR_POS_R] == false)
str = gNopStr;
else
str = GetStringFromIndex(gpEkrBattleUnitRight->unit.pCharacterData->nameTextId);
@ -274,7 +274,7 @@ void EfxPrepareScreenFx(void)
Text_DrawString(&gTextEkrlvupMsg[3], str);
/* right unit item */
if (gEkrPairSideVaild[EKR_POS_R] == false)
if (gBanimValid[EKR_POS_R] == false)
str = gNopStr;
else
str = GetItemName(gpEkrBattleUnitRight->weaponBefore);
@ -290,8 +290,8 @@ void EfxPrepareScreenFx(void)
sub_8070D04(gBG0TilemapBuffer + 0x1E, 1, 20, 3, 128);
BG_EnableSyncByMask(BG0_SYNC_BIT);
CpuFastCopy(&PAL_BUF_COLOR(gUnknown_08802558, gEkrFactions[POS_L], 0), PAL_BG(0x2), 0x20);
CpuFastCopy(&PAL_BUF_COLOR(gUnknown_08802558, gEkrFactions[POS_R], 0), PAL_BG(0x3), 0x20);
CpuFastCopy(&PAL_BUF_COLOR(gUnknown_08802558, gBanimFactionPal[POS_L], 0), PAL_BG(0x2), 0x20);
CpuFastCopy(&PAL_BUF_COLOR(gUnknown_08802558, gBanimFactionPal[POS_R], 0), PAL_BG(0x3), 0x20);
EnablePaletteSync();
gEkrBg0QuakeVec.x = 0;

View File

@ -194,7 +194,7 @@ void EkrDK_ReloadTerrainEtc(struct ProcEkrDragon * proc)
gLCDControlBuffer.bg3cnt.priority = 3;
SetAnimStateHidden(GetAnimPosition(proc->anim));
gEkrPairSideVaild[GetAnimPosition(proc->anim)] = false;
gBanimValid[GetAnimPosition(proc->anim)] = false;
/* Reload the terrain palette */
NewEkrDragonBaseAppear(proc->anim);

View File

@ -188,7 +188,7 @@ void EkrDZ_ReloadCustomBg(struct ProcEkrDragon * proc)
if (++proc->timer == 0x9) {
proc->timer = 0;
gEkrPairSideVaild[GetAnimPosition(proc->anim)] = false;
gBanimValid[GetAnimPosition(proc->anim)] = false;
BG_Fill(gBG3TilemapBuffer, 0x6000);
BG_EnableSyncByMask(BG3_SYNC_BIT);
SetEkrDragonStatusUnk1(0);

View File

@ -140,8 +140,8 @@ void RegisterEkrDragonStatusType(void)
struct BattleUnit *bu1a = bu1, *bu2a = bu2;
u16 validl = gEkrPairSideVaild[EKR_POS_L];
u16 validr = gEkrPairSideVaild[EKR_POS_R];
u16 validl = gBanimValid[EKR_POS_L];
u16 validr = gBanimValid[EKR_POS_R];
switch (gEkrDistanceType) {
case EKR_DISTANCE_CLOSE:

View File

@ -70,12 +70,12 @@ void NewEkrGauge(void)
if (gEkrGaugeHp[0] > 0x50)
CpuCopy16(gPalEfxHpBarPurple, PAL_OBJ(0xB), 0x10 * sizeof(u16));
else
CpuCopy16(gUnknown_08802B04 + gEkrFactions[POS_L] * 0x10, PAL_OBJ(0xB), 0x10 * sizeof(u16));
CpuCopy16(gUnknown_08802B04 + gBanimFactionPal[POS_L] * 0x10, PAL_OBJ(0xB), 0x10 * sizeof(u16));
if (gEkrGaugeHp[1] > 0x50)
CpuCopy16(gPalEfxHpBarPurple, PAL_OBJ(0xC), 0x10 * sizeof(u16));
else
CpuCopy16(gUnknown_08802B04 + gEkrFactions[POS_R] * 0x10, PAL_OBJ(0xC), 0x10 * sizeof(u16));
CpuCopy16(gUnknown_08802B04 + gBanimFactionPal[POS_R] * 0x10, PAL_OBJ(0xC), 0x10 * sizeof(u16));
gBanimSomeHp[0] = -1;
gBanimSomeHp[1] = -1;
@ -84,19 +84,19 @@ void NewEkrGauge(void)
LZ77UnCompVram(Img_EfxWTAArrow1, (void *)0x6013940);
LZ77UnCompVram(Img_EfxWTAArrow2, (void *)0x6013D40);
CpuFastCopy(gUnknown_08802884 + gEkrFactions[POS_L] * 0x10, PAL_OBJ(0x5), 0x10 * sizeof(u16));
CpuFastCopy(gUnknown_08802884 + gEkrFactions[POS_R] * 0x10, PAL_OBJ(0x6), 0x10 * sizeof(u16));
CpuFastCopy(gUnknown_08802884 + gBanimFactionPal[POS_L] * 0x10, PAL_OBJ(0x5), 0x10 * sizeof(u16));
CpuFastCopy(gUnknown_08802884 + gBanimFactionPal[POS_R] * 0x10, PAL_OBJ(0x6), 0x10 * sizeof(u16));
EnablePaletteSync();
/* decode value to number for display: 998 --> 9 9 8 */
ModDec(gEkrPairHit[0], &gDecodedEkrHitDmgCritBuf[0x0]);
ModDec(gEkrPairDmgPair[0], &gDecodedEkrHitDmgCritBuf[0x3]);
ModDec(gEkrPairCritPair[0], &gDecodedEkrHitDmgCritBuf[0x6]);
ModDec(gEkrGaugeHit[0], &gEkrGaugeDecoder[0x0]);
ModDec(gEkrGaugeDmg[0], &gEkrGaugeDecoder[0x3]);
ModDec(gEkrGaugeCrt[0], &gEkrGaugeDecoder[0x6]);
ModDec(gEkrPairHit[1], &gDecodedEkrHitDmgCritBuf[0x9]);
ModDec(gEkrPairDmgPair[1], &gDecodedEkrHitDmgCritBuf[0xC]);
ModDec(gEkrPairCritPair[1], &gDecodedEkrHitDmgCritBuf[0xF]);
ModDec(gEkrGaugeHit[1], &gEkrGaugeDecoder[0x9]);
ModDec(gEkrGaugeDmg[1], &gEkrGaugeDecoder[0xC]);
ModDec(gEkrGaugeCrt[1], &gEkrGaugeDecoder[0xF]);
CpuFastFill(0, gObjBuf_EkrSideHitDmgCrit, 0x400);
@ -106,7 +106,7 @@ void NewEkrGauge(void)
int r4 = i * 0x40 + j * 0x10;
CpuCopy16(
gUnknown_088026E4 + gDecodedEkrHitDmgCritBuf[i * 3 + j] * 0x10,
gUnknown_088026E4 + gEkrGaugeDecoder[i * 3 + j] * 0x10,
gObjBuf_EkrSideHitDmgCrit + r4,
0x10 * sizeof(u16));
}
@ -307,13 +307,13 @@ void ekrGaugeMain(struct ProcEkrGauge * proc)
gBanimSomeHp[POS_R] != gEkrGaugeHp[POS_R];
lhp = gEkrGaugeHp[POS_L]; /* R7 */
lhpmax = gEkrPairMaxHP[POS_L]; /* r6 */
lhpmax = gBanimMaxHP[POS_L]; /* r6 */
rhp = gEkrGaugeHp[POS_R]; /* R8 */
rhpmax = gEkrPairMaxHP[POS_R]; /* var64 */
rhpmax = gBanimMaxHP[POS_R]; /* var64 */
switch (gEkrDistanceType) {
case 3:
if (gEkrPairSideVaild[POS_L] == true)
if (gBanimValid[POS_L] == true)
y2 = proc->unk32 + 0x38;
else
y2 = proc->unk32 - 0x38;

View File

@ -64,7 +64,7 @@ void sub_8076380(struct ProcEkrHensei *proc)
NewEkrDispUP();
NewEkrBattle();
PutBanimBG(gBanimBackgroundIndex - 1);
PutBanimBG(gBanimBG - 1);
CpuFastCopy(PAL_BG(0), gEfxPal, 0x400);
EfxPalBlackInOut(PAL_BG(0), 0, 0x20, 0x10);
EnablePaletteSync();

View File

@ -331,10 +331,10 @@ void EkrLvup_InitScreen(struct ProcEkrLevelup *proc)
RegisterDataMove(gBG2TilemapBuffer, BG_SCREEN_ADDR(0xA), 0x800);
RegisterDataMove(gBG2TilemapBuffer, BG_SCREEN_ADDR(0xB), 0x800);
buf->unk00 = gBanimTerrainIndexMaybe[EKR_POS_L];
buf->unk00 = gBanimFloorfx[EKR_POS_L];
buf->unk02 = 3;
buf->unk04 = 0x100;
buf->unk06 = gBanimTerrainIndexMaybe[EKR_POS_R];
buf->unk06 = gBanimFloorfx[EKR_POS_R];
buf->unk08 = 4;
buf->unk0A = 0x140;
buf->unk0C = gEkrDistanceType;
@ -637,7 +637,7 @@ void EkrLvup_MainAnime(struct ProcEkrLevelup *proc)
diff);
if (proc->index == EKRLVUP_STAT_HP) {
gEkrPairMaxHP[1] = gEkrLvupBaseStatus[proc->index];
gBanimMaxHP[1] = gEkrLvupBaseStatus[proc->index];
gBanimSomeHp[1] = -1;
}
proc->timer = 0;
@ -709,10 +709,10 @@ void EkrLvup_ResetScreen(struct ProcEkrLevelup *proc)
SetBackgroundScreenSize(2, 0);
buf = &_buf;
buf->unk00 = gBanimTerrainIndexMaybe[0];
buf->unk00 = gBanimFloorfx[0];
buf->unk02 = 4;
buf->unk04 = 0x280;
buf->unk06 = gBanimTerrainIndexMaybe[1];
buf->unk06 = gBanimFloorfx[1];
buf->unk08 = 5;
buf->unk0A = 0x280;
buf->unk0C = gEkrDistanceType;

View File

@ -163,11 +163,11 @@ void RegisterAISSheetGraphics(struct Anim * anim)
RegisterDataMove(anim->pImgSheetBuf, mmap, 0x2000);
}
void sub_8059970(u32 *buf, int pos)
void ApplyBanimUniquePalette(u32 *buf, int pos)
{
u32 i;
if (gUnknown_0203E1DC[pos] == 0)
if (gBanimUniquePaletteDisabled[pos] == 0)
return;
for (i = 0; i < 8; i++)
@ -214,22 +214,22 @@ void UpdateBanimFrame(void)
gpImgSheet[1] = NULL;
gpImgSheet[0] = NULL;
if (gEkrPairSideVaild[EKR_POS_L] == true) {
bid = gEkrPairBanimID2[EKR_POS_L];
bid_pal = gEkrFactions[EKR_POS_L];
chara_pal = gAnimCharaPalIndex[EKR_POS_L];
if (gBanimValid[EKR_POS_L] == true) {
bid = gBanimIdx[EKR_POS_L];
bid_pal = gBanimFactionPal[EKR_POS_L];
chara_pal = gBanimUniquePal[EKR_POS_L];
LZ77UnCompWram(banim[bid].script, gBanimScrLeft);
gpBanimModesLeft = banim[bid].modes;
LZ77UnCompWram(banim[GetBanimPalette(bid, 0)].pal, gBanimPal1);
LZ77UnCompWram(banim[GetBanimPalette(bid, 0)].pal, gBanimPaletteLeft);
if (chara_pal != -1) {
LZ77UnCompWram(cbapt[chara_pal].pal, gBanimPal1);
sub_8059970((u32 *)gBanimPal1, 0);
LZ77UnCompWram(cbapt[chara_pal].pal, gBanimPaletteLeft);
ApplyBanimUniquePalette((u32 *)gBanimPaletteLeft, POS_L);
}
gpEfxUnitPaletteBackup[0] = &PAL_BUF_COLOR(gBanimPal1, bid_pal, 0);
CpuFastCopy(&PAL_BUF_COLOR(gBanimPal1, bid_pal, 0), PAL_OBJ(0x7), 0x20);
gpEfxUnitPaletteBackup[POS_L] = &PAL_BUF_COLOR(gBanimPaletteLeft, bid_pal, 0);
CpuFastCopy(&PAL_BUF_COLOR(gBanimPaletteLeft, bid_pal, 0), PAL_OBJ(0x7), 0x20);
CpuFastCopy(gBanimTriAtkPalettes[0], PAL_OBJ(0x8), 0x20);
/* WTF a horrible bug... */
@ -244,22 +244,22 @@ void UpdateBanimFrame(void)
gBanimOaml[0x57F0 / 4] = 1;
}
if (gEkrPairSideVaild[EKR_POS_R] == true) {
bid = gEkrPairBanimID2[EKR_POS_R];
bid_pal = gEkrFactions[EKR_POS_R];
chara_pal = gAnimCharaPalIndex[EKR_POS_R];
if (gBanimValid[EKR_POS_R] == true) {
bid = gBanimIdx[EKR_POS_R];
bid_pal = gBanimFactionPal[EKR_POS_R];
chara_pal = gBanimUniquePal[EKR_POS_R];
LZ77UnCompWram(banim[bid].script, gBanimScrRight);
gpBanimModesRight = banim[bid].modes;
LZ77UnCompWram(banim[GetBanimPalette(bid, 1)].pal, gBanimPal2);
LZ77UnCompWram(banim[GetBanimPalette(bid, 1)].pal, gBanimPaletteRight);
if (chara_pal != -1) {
LZ77UnCompWram(cbapt[chara_pal].pal, gBanimPal2);
sub_8059970((u32 *)gBanimPal2, 1);
LZ77UnCompWram(cbapt[chara_pal].pal, gBanimPaletteRight);
ApplyBanimUniquePalette((u32 *)gBanimPaletteRight, POS_R);
}
gpEfxUnitPaletteBackup[1] = &PAL_BUF_COLOR(gBanimPal2, bid_pal, 0);
CpuFastCopy(&PAL_BUF_COLOR(gBanimPal2, bid_pal, 0), PAL_OBJ(0x9), 0x20);
gpEfxUnitPaletteBackup[POS_R] = &PAL_BUF_COLOR(gBanimPaletteRight, bid_pal, 0);
CpuFastCopy(&PAL_BUF_COLOR(gBanimPaletteRight, bid_pal, 0), PAL_OBJ(0x9), 0x20);
CpuFastCopy(gBanimTriAtkPalettes[1], PAL_OBJ(0xA), 0x20);
EnablePaletteSync();
@ -351,10 +351,10 @@ void InitBattleAnimFrame(int round_type_left, int round_type_right)
gAnims[2] = NULL;
gAnims[3] = NULL;
if (gEkrPairSideVaild[EKR_POS_L] == true)
if (gBanimValid[EKR_POS_L] == true)
InitLeftAnim(round_type_left);
if (gEkrPairSideVaild[EKR_POS_R] == true)
if (gBanimValid[EKR_POS_R] == true)
InitRightAnim(round_type_right);
/* Hide the left anim on init promotion */

View File

@ -314,7 +314,7 @@ void NewEkrPopup(void)
proc->rdebuf = 0;
proc->rbuf = 0;
if (gEkrFactions[EKR_POS_L] == FACTION_ID_BLUE)
if (gBanimFactionPal[EKR_POS_L] == FACTION_ID_BLUE)
{
if (HasBattleUnitGainedWeaponLevel(gpEkrBattleUnitLeft) == true)
proc->lbuff = gpEkrBattleUnitLeft->weaponBefore;
@ -323,7 +323,7 @@ void NewEkrPopup(void)
proc->ldebuf = gpEkrBattleUnitLeft->weaponBefore;
}
if (gEkrFactions[EKR_POS_R] == FACTION_ID_BLUE)
if (gBanimFactionPal[EKR_POS_R] == FACTION_ID_BLUE)
{
if (HasBattleUnitGainedWeaponLevel(gpEkrBattleUnitRight) == true)
proc->rbuf = gpEkrBattleUnitRight->weaponBefore;

View File

@ -315,7 +315,7 @@ void BattleAIS_ExecCommands(void)
}
#endif
if (gUnknown_0203E1A4[GetAnimPosition(anim)] == NULL) {
if (gBanimForceUnitChgDebug[GetAnimPosition(anim)] == NULL) {
if (gpImgSheet[GetAnimPosition(anim1)] != anim1->pImgSheet) {
NewEkrChienCHR(anim1);
gpImgSheet[GetAnimPosition(anim1)] = anim1->pImgSheet;
@ -674,7 +674,7 @@ void BattleAIS_ExecCommands(void)
// _080596E0
if (type & ANIM_BIT2_FRAME) {
if (GetAISLayerId(anim) == 0) {
if (gUnknown_0203E1A4[GetAnimPosition(anim)] == NULL)
if (gBanimForceUnitChgDebug[GetAnimPosition(anim)] == NULL)
if (!(anim->state3 & ANIM_BIT3_4000))
if (gpImgSheet[GetAnimPosition(anim)] != anim->pImgSheet) {
RegisterAISSheetGraphics(anim);

View File

@ -2041,40 +2041,39 @@ void BeginBattleAnimations(void) {
}
}
int GetUnitSoloBattleAnimType(struct Unit* unit) {
int GetSoloAnimPreconfType(struct Unit* unit) {
// TODO: battle anim type constants
if (unit->state & US_SOLOANIM_1)
return 0;
return PLAY_ANIMCONF_ON;
if (unit->state & US_SOLOANIM_2)
return 3;
return PLAY_ANIMCONF_ON_UNIQUE_BG;
return 1;
return PLAY_ANIMCONF_OFF;
}
int GetBattleAnimType(void) {
// TODO: battle anim type constants
int GetBattleAnimPreconfType(void) {
// If not solo anim, return global type
if (gPlaySt.config.animationType != 2)
if (gPlaySt.config.animationType != PLAY_ANIMCONF_SOLO_ANIM)
return gPlaySt.config.animationType;
// If both units are players, use actor solo anim type
if (UNIT_FACTION(&gBattleActor.unit) == FACTION_BLUE)
if (UNIT_FACTION(&gBattleTarget.unit) == FACTION_BLUE)
return GetUnitSoloBattleAnimType(&gBattleActor.unit);
return GetSoloAnimPreconfType(&gBattleActor.unit);
// If neither are players, return 1
if (UNIT_FACTION(&gBattleActor.unit) != FACTION_BLUE)
if (UNIT_FACTION(&gBattleTarget.unit) != FACTION_BLUE)
return 1;
return PLAY_ANIMCONF_OFF;
// Return solo anim type for the one that is a player unit
if (UNIT_FACTION(&gBattleActor.unit) == FACTION_BLUE)
return GetUnitSoloBattleAnimType(&gBattleActor.unit);
return GetSoloAnimPreconfType(&gBattleActor.unit);
else
return GetUnitSoloBattleAnimType(&gBattleTarget.unit);
return GetSoloAnimPreconfType(&gBattleTarget.unit);
}
void BattlePrintDebugUnitInfo(struct BattleUnit* actor, struct BattleUnit* target) {

View File

@ -216,7 +216,7 @@ bool HandlePostActionTraps(ProcPtr proc) {
WriteSuspendSave(3);
if (GetBattleAnimType() == 1) {
if (GetBattleAnimPreconfType() == PLAY_ANIMCONF_OFF) {
RefreshUnitSprites();
}

View File

@ -554,7 +554,7 @@ void sub_80CD47C(int a, int b, int c, int d, int e) {
gUnknown_030053A0.oam2Pal = 0xa;
gUnknown_030053A0.pImgSheetBuf = gBanimLeftImgSheetBuf;
gUnknown_030053A0.unk_24 = gBanimOaml;
gUnknown_030053A0.unk_20 = gBanimPal1;
gUnknown_030053A0.unk_20 = gBanimPaletteLeft;
gUnknown_030053A0.unk_28 = gBanimScrLeft;
gUnknown_030053A0.unk_30 = &gUnknown_030053E0;
gUnknown_030053E0.u00 = 0x4;

View File

@ -5646,7 +5646,7 @@ CONST_DATA s8 BanimTerrainGround_Tileset14[] = {
[TERRAIN_MAST] = 28,
};
CONST_DATA s8 gBanimBackgroundIndexLutDefault[] = {
CONST_DATA s8 gBanimBGLutDefault[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 3,
[TERRAIN_ROAD] = 3,
@ -5714,7 +5714,7 @@ CONST_DATA s8 gBanimBackgroundIndexLutDefault[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut01[] = {
CONST_DATA s8 gBanimBGLut01[] = {
[TERRAIN_TILE_00] = 18,
[TERRAIN_PLAINS] = 18,
[TERRAIN_ROAD] = 18,
@ -5782,7 +5782,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut01[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut02[] = {
CONST_DATA s8 gBanimBGLut02[] = {
[TERRAIN_TILE_00] = 56,
[TERRAIN_PLAINS] = 56,
[TERRAIN_ROAD] = 56,
@ -5850,7 +5850,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut02[] = {
[TERRAIN_MAST] = 56,
};
CONST_DATA s8 gBanimBackgroundIndexLut03[] = {
CONST_DATA s8 gBanimBGLut03[] = {
[TERRAIN_TILE_00] = 10,
[TERRAIN_PLAINS] = 10,
[TERRAIN_ROAD] = 10,
@ -5918,7 +5918,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut03[] = {
[TERRAIN_MAST] = 10,
};
CONST_DATA s8 gBanimBackgroundIndexLut04[] = {
CONST_DATA s8 gBanimBGLut04[] = {
[TERRAIN_TILE_00] = 37,
[TERRAIN_PLAINS] = 37,
[TERRAIN_ROAD] = 37,
@ -5986,7 +5986,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut04[] = {
[TERRAIN_MAST] = 13,
};
CONST_DATA s8 gBanimBackgroundIndexLut05[] = {
CONST_DATA s8 gBanimBGLut05[] = {
[TERRAIN_TILE_00] = 47,
[TERRAIN_PLAINS] = 47,
[TERRAIN_ROAD] = 47,
@ -6054,7 +6054,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut05[] = {
[TERRAIN_MAST] = 25,
};
CONST_DATA s8 gBanimBackgroundIndexLut06[] = {
CONST_DATA s8 gBanimBGLut06[] = {
[TERRAIN_TILE_00] = 59,
[TERRAIN_PLAINS] = 59,
[TERRAIN_ROAD] = 59,
@ -6122,7 +6122,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut06[] = {
[TERRAIN_MAST] = 25,
};
CONST_DATA s8 gBanimBackgroundIndexLut07[] = {
CONST_DATA s8 gBanimBGLut07[] = {
[TERRAIN_TILE_00] = 59,
[TERRAIN_PLAINS] = 59,
[TERRAIN_ROAD] = 59,
@ -6190,7 +6190,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut07[] = {
[TERRAIN_MAST] = 13,
};
CONST_DATA s8 gBanimBackgroundIndexLut08[] = {
CONST_DATA s8 gBanimBGLut08[] = {
[TERRAIN_TILE_00] = 13,
[TERRAIN_PLAINS] = 13,
[TERRAIN_ROAD] = 13,
@ -6258,7 +6258,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut08[] = {
[TERRAIN_MAST] = 13,
};
CONST_DATA s8 gBanimBackgroundIndexLut09[] = {
CONST_DATA s8 gBanimBGLut09[] = {
[TERRAIN_TILE_00] = 8,
[TERRAIN_PLAINS] = 8,
[TERRAIN_ROAD] = 8,
@ -6326,7 +6326,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut09[] = {
[TERRAIN_MAST] = 8,
};
CONST_DATA s8 gBanimBackgroundIndexLut0A[] = {
CONST_DATA s8 gBanimBGLut0A[] = {
[TERRAIN_TILE_00] = 47,
[TERRAIN_PLAINS] = 47,
[TERRAIN_ROAD] = 47,
@ -6394,7 +6394,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0A[] = {
[TERRAIN_MAST] = 47,
};
CONST_DATA s8 gBanimBackgroundIndexLut0B[] = {
CONST_DATA s8 gBanimBGLut0B[] = {
[TERRAIN_TILE_00] = 15,
[TERRAIN_PLAINS] = 15,
[TERRAIN_ROAD] = 8,
@ -6462,7 +6462,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0B[] = {
[TERRAIN_MAST] = 8,
};
CONST_DATA s8 gBanimBackgroundIndexLut0C[] = {
CONST_DATA s8 gBanimBGLut0C[] = {
[TERRAIN_TILE_00] = 47,
[TERRAIN_PLAINS] = 47,
[TERRAIN_ROAD] = 8,
@ -6530,7 +6530,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0C[] = {
[TERRAIN_MAST] = 8,
};
CONST_DATA s8 gBanimBackgroundIndexLut0D[] = {
CONST_DATA s8 gBanimBGLut0D[] = {
[TERRAIN_TILE_00] = 36,
[TERRAIN_PLAINS] = 36,
[TERRAIN_ROAD] = 36,
@ -6598,7 +6598,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0D[] = {
[TERRAIN_MAST] = 8,
};
CONST_DATA s8 gBanimBackgroundIndexLut0E[] = {
CONST_DATA s8 gBanimBGLut0E[] = {
[TERRAIN_TILE_00] = 47,
[TERRAIN_PLAINS] = 47,
[TERRAIN_ROAD] = 3,
@ -6666,7 +6666,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0E[] = {
[TERRAIN_MAST] = 8,
};
CONST_DATA s8 gBanimBackgroundIndexLut0F[] = {
CONST_DATA s8 gBanimBGLut0F[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 3,
[TERRAIN_ROAD] = 3,
@ -6734,7 +6734,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut0F[] = {
[TERRAIN_MAST] = 61,
};
CONST_DATA s8 gBanimBackgroundIndexLut10[] = {
CONST_DATA s8 gBanimBGLut10[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 3,
[TERRAIN_ROAD] = 3,
@ -6802,7 +6802,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut10[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut11[] = {
CONST_DATA s8 gBanimBGLut11[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 38,
[TERRAIN_ROAD] = 3,
@ -6870,7 +6870,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut11[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut12[] = {
CONST_DATA s8 gBanimBGLut12[] = {
[TERRAIN_TILE_00] = 6,
[TERRAIN_PLAINS] = 6,
[TERRAIN_ROAD] = 6,
@ -6938,7 +6938,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut12[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut13[] = {
CONST_DATA s8 gBanimBGLut13[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 3,
[TERRAIN_ROAD] = 3,
@ -7006,7 +7006,7 @@ CONST_DATA s8 gBanimBackgroundIndexLut13[] = {
[TERRAIN_MAST] = 2,
};
CONST_DATA s8 gBanimBackgroundIndexLut14[] = {
CONST_DATA s8 gBanimBGLut14[] = {
[TERRAIN_TILE_00] = 3,
[TERRAIN_PLAINS] = 3,
[TERRAIN_ROAD] = 3,

View File

@ -65,8 +65,8 @@
. = 0x003BE8; gUnknown_02003BE8 = .;
. = 0x003BFC; gStatScreen = .;
. = 0x003D2C; gUiTmScratchA = .;
. = 0x004088; gBanimPal1 = .;
. = 0x004128; gBanimPal2 = .;
. = 0x004088; gBanimPaletteLeft = .;
. = 0x004128; gBanimPaletteRight = .;
. = 0x0041C8; gBanimOaml = .;
. = 0x00422C; gUiTmScratchB = .;
. = 0x00472C; gUiTmScratchC = .;
@ -136,7 +136,7 @@
. = 0x017648; gSomeFontStruct = .;
. = 0x017660; gTextEkrlvupMsg = .;
. = 0x0176A0; gTextEkrlvupValue = .;
. = 0x017700; gDecodedEkrHitDmgCritBuf = .;
. = 0x017700; gEkrGaugeDecoder = .;
. = 0x017724; gEkrBattleEndFlag = .;
. = 0x017728; gEkrHPBarCount = .;
. = 0x01772C; gEfxSpellAnimExists = .;
@ -301,42 +301,42 @@
. = 0x03E0F4; gBattleDeamonActive = .;
. = 0x03E0F8; gpProcEkrBattleDeamon = .;
. = 0x03E0FC; gEkrDebugModeMaybe = .;
. = 0x03E0FE; gBanimBackgroundIndex = .;
. = 0x03E0FE; gBanimBG = .;
. = 0x03E100; gEkrInitialHitSide = .;
. = 0x03E102; gEkrSnowWeather = .;
. = 0x03E104; gEkrPairSideVaild = .;
. = 0x03E104; gBanimValid = .;
. = 0x03E108; gEkrInitialPosition = .;
. = 0x03E10C; gEkrPairBanimID = .;
. = 0x03E110; gAnimCharaPalIndex = .;
. = 0x03E114; gEkrFactions = .;
. = 0x03E10C; gBanimIdx_bak = .;
. = 0x03E110; gBanimUniquePal = .;
. = 0x03E114; gBanimFactionPal = .;
. = 0x03E118; gEkrSpellAnimIndex = .;
. = 0x03E11A; gUnknown_0203E11A = .;
. = 0x03E11C; gBanimTerrainIndexMaybe = .;
. = 0x03E11C; gBanimFloorfx = .;
. = 0x03E120; gEkrDistanceType = .;
. = 0x03E122; gEkrPairBmLoc = .;
. = 0x03E122; gEkrBmLocation = .;
. = 0x03E12A; gAnimRoundData = .;
. = 0x03E152; gEfxPairHpBufOffset = .;
. = 0x03E156; gEfxHpLut = .;
. = 0x03E182; gEkrPairBanimID2 = .;
. = 0x03E182; gBanimIdx = .;
. = 0x03E188; gpEkrBattleUnitLeft = .;
. = 0x03E18C; gpEkrBattleUnitRight = .;
. = 0x03E190; gEkrPids = .;
. = 0x03E194; gpEkrTriangleUnits = .;
. = 0x03E19C; gBanimTriAtkPalettes = .;
. = 0x03E1A4; gUnknown_0203E1A4 = .;
. = 0x03E1A4; gBanimForceUnitChgDebug = .;
. = 0x03E1AC; gEkrGaugeHp = .;
. = 0x03E1B0; gEkrPairMaxHP = .;
. = 0x03E1B0; gBanimMaxHP = .;
. = 0x03E1B4; gBanimSomeHp = .;
. = 0x03E1B8; gEkrPairHit = .;
. = 0x03E1BC; gEkrPairDmgPair = .;
. = 0x03E1C0; gEkrPairCritPair = .;
. = 0x03E1C4; gEkrPairExpPrevious = .;
. = 0x03E1C8; gEkrPairExpGain = .;
. = 0x03E1CC; gEkrPairTerrainID = .;
. = 0x03E1D0; gEkrPairBaseCon = .;
. = 0x03E1D4; gEkrPairWTABonus = .;
. = 0x03E1D8; gEkrPairEffectiveAgainst = .;
. = 0x03E1DC; gUnknown_0203E1DC = .;
. = 0x03E1B8; gEkrGaugeHit = .;
. = 0x03E1BC; gEkrGaugeDmg = .;
. = 0x03E1C0; gEkrGaugeCrt = .;
. = 0x03E1C4; gBanimExpPrevious = .;
. = 0x03E1C8; gBanimExpGain = .;
. = 0x03E1CC; gBanimTerrain = .;
. = 0x03E1D0; gBanimCon = .;
. = 0x03E1D4; gBanimWtaBonus = .;
. = 0x03E1D8; gBanimEffectiveness = .;
. = 0x03E1DC; gBanimUniquePaletteDisabled = .;
. = 0x03E1E0; gBattleScriptted = .;
. = 0x03E1E4; gBaArenaFlag = .;
. = 0x03E1E8; gpActiveClassReelSpellProc = .;