mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Move smokescreen data to src
This commit is contained in:
parent
d11cd5d217
commit
ac1738e11d
@ -1,64 +0,0 @@
|
||||
@ data used in battle_7.s and smokescreen.s, can't split because they're interleaved
|
||||
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C604:: @ 831C604
|
||||
.byte 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x02, 0x00
|
||||
.byte 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x01
|
||||
.byte 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gSmokescreenImpactSpriteSheet:: @ 831C620
|
||||
obj_tiles gSmokescreenImpactTiles, 0x0180, 0xd6eb
|
||||
|
||||
.align 2
|
||||
gSmokescreenlImpactSpritePalette:: @ 831C628
|
||||
obj_pal gSmokescreenImpactPalette, 0xd6eb
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C630:: @ 831C630
|
||||
.byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C638:: @ 831C638
|
||||
.2byte 0x0000, 0x0004, 0x0004, 0x0004, 0x0008, 0x0004, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C648:: @ 831C648
|
||||
.2byte 0x0000, 0x0044, 0x0004, 0x0044, 0x0008, 0x0044, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C658:: @ 831C658
|
||||
.2byte 0x0000, 0x0084, 0x0004, 0x0084, 0x0008, 0x0084, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C668:: @ 831C668
|
||||
.2byte 0x0000, 0x00c4, 0x0004, 0x00c4, 0x0008, 0x00c4, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C678:: @ 831C678
|
||||
.4byte gUnknown_0831C638
|
||||
.4byte gUnknown_0831C648
|
||||
.4byte gUnknown_0831C658
|
||||
.4byte gUnknown_0831C668
|
||||
|
||||
.align 2
|
||||
gSmokescreenImpactSpriteTemplate:: @ 831C688
|
||||
spr_template 0xd6eb, 0xd6eb, gUnknown_0831C630, gUnknown_0831C678, NULL, gDummySpriteAffineAnimTable, SpriteCB_DestroySprite
|
||||
|
||||
.align 2
|
||||
gSpriteSheet_EnemyShadow:: @ 831C6A0
|
||||
obj_tiles gEnemyMonShadow_Gfx, 0x0080, 0xd759
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C6A8:: @ 831C6A8
|
||||
.byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x0c, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_EnemyShadow:: @ 831C6B0
|
||||
spr_template 0xd759, 0xd6ff, gUnknown_0831C6A8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCB_SetInvisible
|
@ -4142,6 +4142,9 @@ extern const u32 gBattleWindowTextPalette[];
|
||||
|
||||
extern const u32 gContest2Pal[];
|
||||
|
||||
extern const u32 gSmokescreenImpactTiles[];
|
||||
extern const u32 gSmokescreenImpactPalette[];
|
||||
|
||||
extern const u32 gBattleAnimSpriteGfx_Bone[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Spark[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Pencil[];
|
||||
@ -4800,6 +4803,8 @@ extern const u32 gBattleAnimBgImage_Surf[];
|
||||
extern const u32 gBattleAnimBgPalette_Surf[];
|
||||
extern const u32 gBattleAnimBackgroundImageMuddyWater_Pal[];
|
||||
|
||||
extern const u32 gEnemyMonShadow_Gfx[];
|
||||
|
||||
extern const u32 gBattleAnimFogTilemap[];
|
||||
|
||||
extern const u32 gUsePokeblockGraph_Gfx[];
|
||||
|
@ -468,7 +468,7 @@ SECTIONS {
|
||||
src/battle_util.o(.rodata);
|
||||
src/battle_script_commands.o(.rodata);
|
||||
src/battle_controller_player.o(.rodata);
|
||||
data/smokescreen.o(.rodata);
|
||||
src/smokescreen.o(.rodata);
|
||||
src/battle_controller_opponent.o(.rodata);
|
||||
src/battle_ai_switch_items.o(.rodata);
|
||||
src/battle_controller_link_opponent.o(.rodata);
|
||||
|
@ -1,14 +1,156 @@
|
||||
#include "global.h"
|
||||
#include "battle_gfx_sfx_util.h"
|
||||
#include "data.h"
|
||||
#include "decompress.h"
|
||||
#include "graphics.h"
|
||||
#include "sprite.h"
|
||||
#include "util.h"
|
||||
#include "constants/pokemon.h"
|
||||
|
||||
static void SmokescreenImpact_Callback(struct Sprite *);
|
||||
static void SpriteCB_DestroySprite(struct Sprite *sprite);
|
||||
|
||||
extern const struct CompressedSpriteSheet gSmokescreenImpactSpriteSheet;
|
||||
extern const struct CompressedSpritePalette gSmokescreenlImpactSpritePalette;
|
||||
extern const struct SpriteTemplate gSmokescreenImpactSpriteTemplate;
|
||||
// The below data for smokescreen starts and ends with some data that belongs to battle_gfx_sfx_util.c
|
||||
|
||||
const u8 gUnknown_0831C604[] =
|
||||
{
|
||||
[NATURE_HARDY] = 0,
|
||||
[NATURE_LONELY] = 0,
|
||||
[NATURE_BRAVE] = 1,
|
||||
[NATURE_ADAMANT] = 0,
|
||||
[NATURE_NAUGHTY] = 1,
|
||||
[NATURE_BOLD] = 1,
|
||||
[NATURE_DOCILE] = 2,
|
||||
[NATURE_RELAXED] = 0,
|
||||
[NATURE_IMPISH] = 0,
|
||||
[NATURE_LAX] = 0,
|
||||
[NATURE_TIMID] = 1,
|
||||
[NATURE_HASTY] = 1,
|
||||
[NATURE_SERIOUS] = 1,
|
||||
[NATURE_JOLLY] = 0,
|
||||
[NATURE_NAIVE] = 2,
|
||||
[NATURE_MODEST] = 1,
|
||||
[NATURE_MILD] = 0,
|
||||
[NATURE_QUIET] = 1,
|
||||
[NATURE_BASHFUL] = 1,
|
||||
[NATURE_RASH] = 0,
|
||||
[NATURE_CALM] = 0,
|
||||
[NATURE_GENTLE] = 0,
|
||||
[NATURE_SASSY] = 1,
|
||||
[NATURE_CAREFUL] = 1,
|
||||
[NATURE_QUIRKY] = 0,
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet gSmokescreenImpactSpriteSheet =
|
||||
{
|
||||
.data = gSmokescreenImpactTiles, .size = 0x180, .tag = 55019
|
||||
};
|
||||
|
||||
static const struct CompressedSpritePalette gSmokescreenlImpactSpritePalette =
|
||||
{
|
||||
.data = gSmokescreenImpactPalette, .tag = 55019
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_0831C630 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 0,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0831C638[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4),
|
||||
ANIMCMD_FRAME(4, 4),
|
||||
ANIMCMD_FRAME(8, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0831C648[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4, .hFlip = TRUE),
|
||||
ANIMCMD_FRAME(4, 4, .hFlip = TRUE),
|
||||
ANIMCMD_FRAME(8, 4, .hFlip = TRUE),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0831C658[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4, .vFlip = TRUE),
|
||||
ANIMCMD_FRAME(4, 4, .vFlip = TRUE),
|
||||
ANIMCMD_FRAME(8, 4, .vFlip = TRUE),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0831C668[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4, .hFlip = TRUE, .vFlip = TRUE),
|
||||
ANIMCMD_FRAME(4, 4, .hFlip = TRUE, .vFlip = TRUE),
|
||||
ANIMCMD_FRAME(8, 4, .hFlip = TRUE, .vFlip = TRUE),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_0831C678[] =
|
||||
{
|
||||
gUnknown_0831C638,
|
||||
gUnknown_0831C648,
|
||||
gUnknown_0831C658,
|
||||
gUnknown_0831C668,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gSmokescreenImpactSpriteTemplate =
|
||||
{
|
||||
.tileTag = 55019,
|
||||
.paletteTag = 55019,
|
||||
.oam = &gUnknown_0831C630,
|
||||
.anims = gUnknown_0831C678,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_DestroySprite
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow =
|
||||
{
|
||||
.data = gEnemyMonShadow_Gfx, .size = 0x80, .tag = 55129
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_0831C6A8 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 0,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(32x8),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(32x8),
|
||||
.tileNum = 0,
|
||||
.priority = 3,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_EnemyShadow =
|
||||
{
|
||||
.tileTag = 55129,
|
||||
.paletteTag = 55039,
|
||||
.oam = &gUnknown_0831C6A8,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_SetInvisible
|
||||
};
|
||||
|
||||
u8 SmokescreenImpact(s16 x, s16 y, u8 a3)
|
||||
{
|
||||
@ -65,7 +207,7 @@ static void SmokescreenImpact_Callback(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void SpriteCB_DestroySprite(struct Sprite *sprite)
|
||||
static void SpriteCB_DestroySprite(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user