mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
document move type variables in pss
This commit is contained in:
parent
1895383352
commit
ce949ba705
@ -8,6 +8,7 @@ enum
|
|||||||
CONTEST_CATEGORY_CUTE,
|
CONTEST_CATEGORY_CUTE,
|
||||||
CONTEST_CATEGORY_SMART,
|
CONTEST_CATEGORY_SMART,
|
||||||
CONTEST_CATEGORY_TOUGH,
|
CONTEST_CATEGORY_TOUGH,
|
||||||
|
CONTEST_CATEGORIES_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -393,7 +393,10 @@ static const u8 gUnknown_0861CE7B[] = _("{COLOR WHITE}{SHADOW DARK_GREY}");
|
|||||||
static const u8 gUnknown_0861CE82[] = _("{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}\n{SPECIAL_F7 0x03}");
|
static const u8 gUnknown_0861CE82[] = _("{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}\n{SPECIAL_F7 0x03}");
|
||||||
static const u8 gUnknown_0861CE8E[] = _("{SPECIAL_F7 0x00}\n{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}");
|
static const u8 gUnknown_0861CE8E[] = _("{SPECIAL_F7 0x00}\n{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}");
|
||||||
static const u8 gUnknown_0861CE97[] = _("{PP}{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}");
|
static const u8 gUnknown_0861CE97[] = _("{PP}{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}");
|
||||||
static const struct OamData gOamData_861CEA0 =
|
|
||||||
|
#define TAG_MOVE_TYPES 30002
|
||||||
|
|
||||||
|
static const struct OamData sOamData_MoveTypes =
|
||||||
{
|
{
|
||||||
.y = 0,
|
.y = 0,
|
||||||
.affineMode = 0,
|
.affineMode = 0,
|
||||||
@ -409,140 +412,166 @@ static const struct OamData gOamData_861CEA0 =
|
|||||||
.paletteNum = 0,
|
.paletteNum = 0,
|
||||||
.affineParam = 0,
|
.affineParam = 0,
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEA8[] = {
|
static const union AnimCmd sSpriteAnim_TypeNormal[] = {
|
||||||
ANIMCMD_FRAME(0, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_NORMAL * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEB0[] = {
|
static const union AnimCmd sSpriteAnim_TypeFighting[] = {
|
||||||
ANIMCMD_FRAME(8, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_FIGHTING * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEB8[] = {
|
static const union AnimCmd sSpriteAnim_TypeFlying[] = {
|
||||||
ANIMCMD_FRAME(16, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_FLYING * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEC0[] = {
|
static const union AnimCmd sSpriteAnim_TypePoison[] = {
|
||||||
ANIMCMD_FRAME(24, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_POISON * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEC8[] = {
|
static const union AnimCmd sSpriteAnim_TypeGround[] = {
|
||||||
ANIMCMD_FRAME(32, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_GROUND * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CED0[] = {
|
static const union AnimCmd sSpriteAnim_TypeRock[] = {
|
||||||
ANIMCMD_FRAME(40, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_ROCK * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CED8[] = {
|
static const union AnimCmd sSpriteAnim_TypeBug[] = {
|
||||||
ANIMCMD_FRAME(48, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_BUG * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEE0[] = {
|
static const union AnimCmd sSpriteAnim_TypeGhost[] = {
|
||||||
ANIMCMD_FRAME(56, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_GHOST * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEE8[] = {
|
static const union AnimCmd sSpriteAnim_TypeSteel[] = {
|
||||||
ANIMCMD_FRAME(64, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_STEEL * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEF0[] = {
|
static const union AnimCmd sSpriteAnim_TypeMystery[] = {
|
||||||
ANIMCMD_FRAME(72, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_MYSTERY * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CEF8[] = {
|
static const union AnimCmd sSpriteAnim_TypeFire[] = {
|
||||||
ANIMCMD_FRAME(80, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_FIRE * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF00[] = {
|
static const union AnimCmd sSpriteAnim_TypeWater[] = {
|
||||||
ANIMCMD_FRAME(88, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_WATER * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF08[] = {
|
static const union AnimCmd sSpriteAnim_TypeGrass[] = {
|
||||||
ANIMCMD_FRAME(96, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_GRASS * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF10[] = {
|
static const union AnimCmd sSpriteAnim_TypeElectric[] = {
|
||||||
ANIMCMD_FRAME(104, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_ELECTRIC * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF18[] = {
|
static const union AnimCmd sSpriteAnim_TypePsychic[] = {
|
||||||
ANIMCMD_FRAME(112, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_PSYCHIC * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF20[] = {
|
static const union AnimCmd sSpriteAnim_TypeIce[] = {
|
||||||
ANIMCMD_FRAME(120, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_ICE * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF28[] = {
|
static const union AnimCmd sSpriteAnim_TypeDragon[] = {
|
||||||
ANIMCMD_FRAME(128, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_DRAGON * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF30[] = {
|
static const union AnimCmd sSpriteAnim_TypeDark[] = {
|
||||||
ANIMCMD_FRAME(136, 0, FALSE, FALSE),
|
ANIMCMD_FRAME(TYPE_DARK * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF38[] = {
|
static const union AnimCmd sSpriteAnim_CategoryCool[] = {
|
||||||
ANIMCMD_FRAME(144, 0, FALSE, FALSE),
|
ANIMCMD_FRAME((CONTEST_CATEGORY_COOL + NUMBER_OF_MON_TYPES) * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF40[] = {
|
static const union AnimCmd sSpriteAnim_CategoryBeauty[] = {
|
||||||
ANIMCMD_FRAME(152, 0, FALSE, FALSE),
|
ANIMCMD_FRAME((CONTEST_CATEGORY_BEAUTY + NUMBER_OF_MON_TYPES) * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF48[] = {
|
static const union AnimCmd sSpriteAnim_CategoryCute[] = {
|
||||||
ANIMCMD_FRAME(160, 0, FALSE, FALSE),
|
ANIMCMD_FRAME((CONTEST_CATEGORY_CUTE + NUMBER_OF_MON_TYPES) * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF50[] = {
|
static const union AnimCmd sSpriteAnim_CategorySmart[] = {
|
||||||
ANIMCMD_FRAME(168, 0, FALSE, FALSE),
|
ANIMCMD_FRAME((CONTEST_CATEGORY_SMART + NUMBER_OF_MON_TYPES) * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd gSpriteAnim_861CF58[] = {
|
static const union AnimCmd sSpriteAnim_CategoryTough[] = {
|
||||||
ANIMCMD_FRAME(176, 0, FALSE, FALSE),
|
ANIMCMD_FRAME((CONTEST_CATEGORY_TOUGH + NUMBER_OF_MON_TYPES) * 8, 0, FALSE, FALSE),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
static const union AnimCmd *const gSpriteAnimTable_861CF60[] = {
|
static const union AnimCmd *const sSpriteAnimTable_MoveTypes[NUMBER_OF_MON_TYPES + CONTEST_CATEGORIES_COUNT] = {
|
||||||
gSpriteAnim_861CEA8,
|
sSpriteAnim_TypeNormal,
|
||||||
gSpriteAnim_861CEB0,
|
sSpriteAnim_TypeFighting,
|
||||||
gSpriteAnim_861CEB8,
|
sSpriteAnim_TypeFlying,
|
||||||
gSpriteAnim_861CEC0,
|
sSpriteAnim_TypePoison,
|
||||||
gSpriteAnim_861CEC8,
|
sSpriteAnim_TypeGround,
|
||||||
gSpriteAnim_861CED0,
|
sSpriteAnim_TypeRock,
|
||||||
gSpriteAnim_861CED8,
|
sSpriteAnim_TypeBug,
|
||||||
gSpriteAnim_861CEE0,
|
sSpriteAnim_TypeGhost,
|
||||||
gSpriteAnim_861CEE8,
|
sSpriteAnim_TypeSteel,
|
||||||
gSpriteAnim_861CEF0,
|
sSpriteAnim_TypeMystery,
|
||||||
gSpriteAnim_861CEF8,
|
sSpriteAnim_TypeFire,
|
||||||
gSpriteAnim_861CF00,
|
sSpriteAnim_TypeWater,
|
||||||
gSpriteAnim_861CF08,
|
sSpriteAnim_TypeGrass,
|
||||||
gSpriteAnim_861CF10,
|
sSpriteAnim_TypeElectric,
|
||||||
gSpriteAnim_861CF18,
|
sSpriteAnim_TypePsychic,
|
||||||
gSpriteAnim_861CF20,
|
sSpriteAnim_TypeIce,
|
||||||
gSpriteAnim_861CF28,
|
sSpriteAnim_TypeDragon,
|
||||||
gSpriteAnim_861CF30,
|
sSpriteAnim_TypeDark,
|
||||||
gSpriteAnim_861CF38,
|
sSpriteAnim_CategoryCool,
|
||||||
gSpriteAnim_861CF40,
|
sSpriteAnim_CategoryBeauty,
|
||||||
gSpriteAnim_861CF48,
|
sSpriteAnim_CategoryCute,
|
||||||
gSpriteAnim_861CF50,
|
sSpriteAnim_CategorySmart,
|
||||||
gSpriteAnim_861CF58,
|
sSpriteAnim_CategoryTough,
|
||||||
};
|
};
|
||||||
static const struct CompressedSpriteSheet gUnknown_0861CFBC =
|
|
||||||
|
static const struct CompressedSpriteSheet sSpriteSheet_MoveTypes =
|
||||||
{
|
{
|
||||||
.data = gMoveTypes_Gfx,
|
.data = gMoveTypes_Gfx,
|
||||||
.size = 0x1700,
|
.size = (NUMBER_OF_MON_TYPES + CONTEST_CATEGORIES_COUNT) * 0x100,
|
||||||
.tag = 30002
|
.tag = TAG_MOVE_TYPES
|
||||||
};
|
};
|
||||||
static const struct SpriteTemplate gUnknown_0861CFC4 =
|
static const struct SpriteTemplate sSpriteTemplate_MoveTypes =
|
||||||
{
|
{
|
||||||
.tileTag = 30002,
|
.tileTag = TAG_MOVE_TYPES,
|
||||||
.paletteTag = 30002,
|
.paletteTag = TAG_MOVE_TYPES,
|
||||||
.oam = &gOamData_861CEA0,
|
.oam = &sOamData_MoveTypes,
|
||||||
.anims = gSpriteAnimTable_861CF60,
|
.anims = sSpriteAnimTable_MoveTypes,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = SpriteCallbackDummy
|
.callback = SpriteCallbackDummy
|
||||||
};
|
};
|
||||||
static const u8 gUnknown_0861CFDC[] = {13, 13, 14, 14, 13, 13, 15, 14, 13, 15, 13, 14, 15, 13, 14, 14, 15, 13, 13, 14, 14, 15, 13};
|
static const u8 sMoveTypeToOamPaletteNum[NUMBER_OF_MON_TYPES + CONTEST_CATEGORIES_COUNT] =
|
||||||
|
{
|
||||||
|
[TYPE_NORMAL] = 13,
|
||||||
|
[TYPE_FIGHTING] = 13,
|
||||||
|
[TYPE_FLYING] = 14,
|
||||||
|
[TYPE_POISON] = 14,
|
||||||
|
[TYPE_GROUND] = 13,
|
||||||
|
[TYPE_ROCK] = 13,
|
||||||
|
[TYPE_BUG] = 15,
|
||||||
|
[TYPE_GHOST] = 14,
|
||||||
|
[TYPE_STEEL] = 13,
|
||||||
|
[TYPE_MYSTERY] = 15,
|
||||||
|
[TYPE_FIRE] = 13,
|
||||||
|
[TYPE_WATER] = 14,
|
||||||
|
[TYPE_GRASS] = 15,
|
||||||
|
[TYPE_ELECTRIC] = 13,
|
||||||
|
[TYPE_PSYCHIC] = 14,
|
||||||
|
[TYPE_ICE] = 14,
|
||||||
|
[TYPE_DRAGON] = 15,
|
||||||
|
[TYPE_DARK] = 13,
|
||||||
|
[NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_COOL] = 13,
|
||||||
|
[NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_BEAUTY] = 14,
|
||||||
|
[NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_CUTE] = 14,
|
||||||
|
[NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_SMART] = 15,
|
||||||
|
[NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_TOUGH] = 13,
|
||||||
|
};
|
||||||
static const struct OamData gOamData_861CFF4 =
|
static const struct OamData gOamData_861CFF4 =
|
||||||
{
|
{
|
||||||
.y = 0,
|
.y = 0,
|
||||||
@ -968,7 +997,7 @@ static bool8 SummaryScreen_DecompressGraphics(void)
|
|||||||
pssData->unk40F0++;
|
pssData->unk40F0++;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
LoadCompressedObjectPic(&gUnknown_0861CFBC);
|
LoadCompressedObjectPic(&sSpriteSheet_MoveTypes);
|
||||||
pssData->unk40F0++;
|
pssData->unk40F0++;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
@ -3415,7 +3444,7 @@ static void sub_81C42C8(void)
|
|||||||
for (i = 3; i < 8; i++)
|
for (i = 3; i < 8; i++)
|
||||||
{
|
{
|
||||||
if (pssData->spriteIds[i] == 0xFF)
|
if (pssData->spriteIds[i] == 0xFF)
|
||||||
pssData->spriteIds[i] = CreateSprite(&gUnknown_0861CFC4, 0, 0, 2);
|
pssData->spriteIds[i] = CreateSprite(&sSpriteTemplate_MoveTypes, 0, 0, 2);
|
||||||
|
|
||||||
sub_81C4204(i, TRUE);
|
sub_81C4204(i, TRUE);
|
||||||
}
|
}
|
||||||
@ -3425,7 +3454,7 @@ static void SetMoveTypeSpritePosAndType(u8 typeId, u8 x, u8 y, u8 spriteArrayId)
|
|||||||
{
|
{
|
||||||
struct Sprite *sprite = &gSprites[pssData->spriteIds[spriteArrayId]];
|
struct Sprite *sprite = &gSprites[pssData->spriteIds[spriteArrayId]];
|
||||||
StartSpriteAnim(sprite, typeId);
|
StartSpriteAnim(sprite, typeId);
|
||||||
sprite->oam.paletteNum = gUnknown_0861CFDC[typeId];
|
sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId];
|
||||||
sprite->pos1.x = x + 16;
|
sprite->pos1.x = x + 16;
|
||||||
sprite->pos1.y = y + 8;
|
sprite->pos1.y = y + 8;
|
||||||
sub_81C4204(spriteArrayId, FALSE);
|
sub_81C4204(spriteArrayId, FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user