summaryrefslogtreecommitdiff
path: root/src/battle_gfx_sfx_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_gfx_sfx_util.c')
-rw-r--r--src/battle_gfx_sfx_util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index 99a82f3ca..22be086f0 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -6,21 +6,21 @@
#include "battle_interface.h"
#include "main.h"
#include "malloc.h"
-#include "rng.h"
+#include "random.h"
#include "util.h"
#include "pokemon.h"
-#include "moves.h"
+#include "constants/moves.h"
#include "task.h"
#include "sprite.h"
#include "sound.h"
#include "m4a.h"
-#include "species.h"
+#include "constants/species.h"
#include "decompress.h"
#include "data2.h"
#include "palette.h"
#include "blend_palette.h"
#include "contest.h"
-#include "songs.h"
+#include "constants/songs.h"
extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200];
extern u8 gActiveBank;
@@ -332,7 +332,7 @@ static u16 BattlePalaceGetTargetRetValue(void)
void sub_805D714(struct Sprite *sprite)
{
- u8 spriteId = sprite->data1;
+ u8 spriteId = sprite->data[1];
if (!gSprites[spriteId].affineAnimEnded)
return;
@@ -367,7 +367,7 @@ void sub_805D7AC(struct Sprite *sprite)
{
if (!(gUnknown_020243FC & 1))
{
- sprite->pos2.x += sprite->data0;
+ sprite->pos2.x += sprite->data[0];
if (sprite->pos2.x == 0)
{
if (sprite->pos2.y != 0)
@@ -1134,7 +1134,7 @@ void sub_805EB9C(u8 affineMode)
}
}
-#define tBank data0
+#define tBank data[0]
void LoadAndCreateEnemyShadowSprites(void)
{
@@ -1143,14 +1143,14 @@ void LoadAndCreateEnemyShadowSprites(void)
LoadCompressedObjectPic(&gSpriteSheet_EnemyShadow);
bank = GetBankByIdentity(IDENTITY_OPPONENT_MON1);
- gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, sub_80A5C6C(bank, 0), sub_80A5C6C(bank, 1) + 29, 0xC8);
- gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data0 = bank;
+ gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBankPosition(bank, 0), GetBankPosition(bank, 1) + 29, 0xC8);
+ gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data[0] = bank;
if (IsDoubleBattle())
{
bank = GetBankByIdentity(IDENTITY_OPPONENT_MON2);
- gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, sub_80A5C6C(bank, 0), sub_80A5C6C(bank, 1) + 29, 0xC8);
- gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data0 = bank;
+ gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBankPosition(bank, 0), GetBankPosition(bank, 1) + 29, 0xC8);
+ gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data[0] = bank;
}
}