address review comments

This commit is contained in:
PikalaxALT 2024-07-18 21:45:15 -04:00
parent 4aa485cd89
commit c0ca2d687c
23 changed files with 388 additions and 342 deletions

View File

@ -160,7 +160,7 @@
.public SealOnCapsuleGetY
.public GetMonData
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public sub_02071FDC
.public sub_020729D8
.public sub_020729FC

View File

@ -7,7 +7,7 @@
.public GetMonData
.public GetPercentProgressTowardsNextLevel
.public GetMonExpBySpeciesAndLevel
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public MaskOfFlagNo
.public GetMoveMaxPP
.public Party_GetCount

View File

@ -73,7 +73,7 @@
.public GetMonBaseStat
.public GetNatureFromPersonality
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public sub_02070C24
.public sub_02070D84
.public CopyPokemonToPokemon

View File

@ -238,7 +238,7 @@
.public GetMonBaseStat_HandleAlternateForm
.public GetPokemonSpriteCharAndPlttNarcIds
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public GetBattleMonIconNaixEx
.public GetBattleMonIconPaletteEx
.public sub_02074490

View File

@ -254,7 +254,7 @@
.public GetGenderBySpeciesAndPersonality
.public CalcShininessByOtIdAndPersonality
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public PCStorage_IsBonusWallpaperUnlocked
.public GetMonIconNaixEx
.public GetMonIconPaletteEx

View File

@ -105,7 +105,7 @@
.public GetGenderBySpeciesAndPersonality
.public CalcShininessByOtIdAndPersonality
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public sub_020729D8
.public NNS_G2dGetImageLocation
.public NNS_G2dGetImagePaletteLocation

View File

@ -332,7 +332,7 @@
.public OverworldModelLookupHasFemaleForm
.public GetMonBaseStat
.public GetMonSpriteCharAndPlttNarcIdsEx
.public GetMonPicHeightBySpeciesGenderForme
.public GetMonPicHeightBySpeciesGenderForm
.public GetMonIconNaixEx
.public GetMonIconPaletteEx
.public sub_02074490

View File

@ -32487,7 +32487,7 @@ _0222B7DA:
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r2, r0, #0
add r5, sp, #0x24
mov r3, #0xa
@ -50968,7 +50968,7 @@ _022347D4:
lsl r1, r1, #0x18
lsr r0, r0, #0x10
lsr r1, r1, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
ldr r1, [r5]
lsl r1, r1, #2
add r1, r5, r1
@ -51148,7 +51148,7 @@ _022349A0:
lsr r0, r0, #0x10
lsr r1, r1, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
ldr r1, [r5]
lsl r1, r1, #2
add r1, r5, r1

View File

@ -915,7 +915,7 @@ _02262754:
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
b _022627C8
_022627A6:
add r0, r1, #0
@ -933,7 +933,7 @@ _022627A6:
lsr r1, r1, #0x1c
lsr r2, r2, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
_022627C8:
add r1, sp, #0xc
strb r0, [r1, #1]
@ -1098,7 +1098,7 @@ _022628C0:
lsl r1, r1, #0x18
lsr r1, r1, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
b _02262930
_0226290E:
add r0, r5, #0
@ -1116,7 +1116,7 @@ _0226290E:
lsl r1, r1, #0x1c
lsr r1, r1, #0x1c
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
_02262930:
add r1, sp, #8
strb r0, [r1, #1]

View File

@ -1713,7 +1713,7 @@ _02259418:
ldrb r1, [r4, #4]
ldrb r3, [r4, #1]
lsr r2, r2, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r6, r0, #0
ldr r0, [sp, #0x10]
bl ov12_0223A99C
@ -2425,7 +2425,7 @@ _022599F2:
lsl r3, r3, #0x18
lsr r1, r1, #0x1e
lsr r3, r3, #0x1b
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
str r0, [sp, #0x2c]
mov r0, #0x69
lsl r0, r0, #2
@ -2666,7 +2666,7 @@ _02259BE4:
ldrb r2, [r2]
lsr r1, r1, #0x1e
lsr r3, r3, #0x1b
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r1, r4, #0
add r1, #0x85
strb r0, [r1]
@ -2873,7 +2873,7 @@ _02259D92:
ldrb r2, [r2]
lsr r1, r1, #0x1e
lsr r3, r3, #0x1b
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r1, r5, #0
add r1, #0x85
strb r0, [r1]
@ -15462,7 +15462,7 @@ _022602CE:
ldrb r1, [r1]
ldrb r2, [r2]
ldrb r3, [r3]
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
mov r3, #0x50
sub r0, r3, r0
str r0, [sp]

View File

@ -32497,7 +32497,7 @@ _021F5F4A:
ldrb r1, [r3, #1]
ldrh r0, [r5, r0]
ldrb r3, [r3]
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r2, r0, #0
lsl r0, r4, #2
add r1, r5, r0
@ -33627,7 +33627,7 @@ _021F6872:
ldrh r0, [r5, r0]
ldrb r3, [r3]
add r2, r6, #0
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
_021F6886:
cmp r4, #1
bne _021F68EC

View File

@ -23595,7 +23595,7 @@ _022374D0:
mov r2, #2
lsr r3, r3, #0x18
str r6, [sp]
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
ldr r0, [sp, #0x20]
ldr r2, [sp, #0x1c]
str r0, [sp]

View File

@ -1870,7 +1870,7 @@ _021E67D0:
ldrb r3, [r5, r3]
lsr r1, r1, #0x18
mov r2, #2
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
add r7, r0, #0
ldr r0, [sp, #0x1c]
add r3, sp, #0x3c

View File

@ -57309,7 +57309,7 @@ _022017F2:
ldrh r3, [r3, #2]
lsl r3, r3, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
lsl r1, r5, #0xc
str r1, [sp, #0x80]
mov r1, #0x5e
@ -62031,7 +62031,7 @@ _02203E5E:
ldrb r1, [r6, #7]
lsl r3, r3, #0x18
lsr r3, r3, #0x18
bl GetMonPicHeightBySpeciesGenderForme
bl GetMonPicHeightBySpeciesGenderForm
mov r1, #0x5e
lsl r1, r1, #2
add r0, r0, r1

View File

@ -482,7 +482,7 @@ typedef struct OpponentData {
u32 unk0[6];
u32 unk18;
u32 *unk1C;
Pokepic *unk20;
Pokepic *pokepic;
u32 *unk24;
BattleHpBar hpBar;
OpponentData_UnkSub_70 unk70;

View File

@ -137,17 +137,17 @@ int GetMonBaseStatEx_HandleAlternateForm(NARC *narc, int species, int form, int
u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex);
u8 GetGenderBySpeciesAndPersonality_PreloadedPersonal(const BASE_STATS *personal, u16 species, u32 pid);
BOOL BoxMonIsHoldingMail(BoxPokemon *boxMon);
void GetPokemonSpriteCharAndPlttNarcIds(PokepicTemplate *a0, Pokemon *mon, u8 whichFacing);
void sub_02070130(PokepicTemplate *a0, BoxPokemon *boxMon, u8 whichFacing);
void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *spC, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14);
void GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality);
void GetPokemonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, Pokemon *mon, u8 whichFacing);
void sub_02070130(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 whichFacing);
void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14);
void GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality);
u8 sub_02070438(u16 species, u8 form);
void sub_02070560(PokepicTemplate * spC, u16 species, u8 whichFacing, u8 gender, u32 shiny);
void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality);
void sub_02070560(PokepicTemplate *pokepicTemplate, u16 species, u8 whichFacing, u8 gender, u32 shiny);
void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality);
u8 sub_0207083C(BoxPokemon *boxMon, u8 whichFacing);
u8 sub_02070848(BoxPokemon *boxMon, u8 whichFacing);
u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2);
u8 GetMonPicHeightBySpeciesGenderForme(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
u8 GetMonPicHeightBySpeciesGenderForm(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
u8 GetMonPicHeightBySpeciesGenderForme_PBR(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
struct UnkImageStruct *sub_02070C24(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, PaletteData *plttData, int x, int y, int trainerClass, int battlerPosition, BOOL isLink, int resTag, HeapID heapId);
void sub_02070D3C(s32 trainer_class, s32 a1, BOOL a2, struct UnkStruct_02070D3C *a3);

View File

@ -5,6 +5,56 @@
#include "pokemon_types_def.h"
#include "heap.h"
typedef enum PokepicAttr {
POKEPIC_X,
POKEPIC_Y,
POKEPIC_Z,
POKEPIC_XOFFSET,
POKEPIC_YOFFSET,
POKEPIC_ZOFFSET,
POKEPIC_VANISHED,
POKEPIC_XROT,
POKEPIC_YROT,
POKEPIC_ZROT,
POKEPIC_XPIVOT,
POKEPIC_YPIVOT,
POKEPIC_AFFINEW,
POKEPIC_AFFINEH,
POKEPIC_VISIBLE,
POKEPIC_XOFF2,
POKEPIC_YOFF2,
POKEPIC_W,
POKEPIC_H,
POKEPIC_SHADOW_X,
POKEPIC_SHADOW_Y,
POKEPIC_SHADOW_XOFFSET,
POKEPIC_SHADOW_YOFFSET,
POKEPIC_ALPHA,
POKEPIC_DIFFUSE_R,
POKEPIC_DIFFUSE_G,
POKEPIC_DIFFUSE_B,
POKEPIC_AMBIENT_R,
POKEPIC_AMBIENT_G,
POKEPIC_AMBIENT_B,
POKEPIC_FADE,
POKEPIC_FADE_COLOR,
POKEPIC_FADE_BLDY,
POKEPIC_FADE_BLDY_TARGET,
POKEPIC_FADE_SPEED,
POKEPIC_HFLIP,
POKEPIC_VFLIP,
POKEPIC_NODRAW,
POKEPIC_ANIM_STEP,
POKEPIC_39,
POKEPIC_MOSAIC,
POKEPIC_SHADOW_H,
POKEPIC_SHADOW_PLTT,
POKEPIC_SHADOW_XADJ_REQ,
POKEPIC_SHADOW_YADJ_REQ,
POKEPIC_SHADOW_AFFINE,
POKEPIC_SHADOW_SIZE,
} PokepicAttr;
typedef struct PokepicAnimScript {
s8 next;
u8 duration;

View File

@ -17,7 +17,7 @@ void ov12_02262014(OpponentData *data) {
SysTask_Destroy(data->unk198);
data->unk198 = NULL;
data->unk19C = 0;
Pokepic_SetAttr(data->unk20, 4, 0);
Pokepic_SetAttr(data->pokepic, 4, 0);
}
}
@ -32,5 +32,5 @@ static void ov12_0226203C(SysTask *task, void *_data) {
int dy = FX_Mul(GF_SinDegNoWrap(data->unk19C), FX32_CONST(1.5)) / FX32_ONE;
Pokepic_SetAttr(data->unk20, 4, dy);
Pokepic_SetAttr(data->pokepic, 4, dy);
}

View File

@ -152,7 +152,7 @@ struct StarterChooseMonSpriteData {
struct StarterChooseMonObjResPtrs objs[3];
void *charDatas[3];
void *plttDatas[3];
struct PokepicTemplate param;
struct PokepicTemplate pokepicTemplate;
SpriteList *spriteList;
GF_G2dRenderer g2dRender;
struct Sprite *sprites[3];
@ -1182,7 +1182,7 @@ static void createMonSprites(struct ChooseStarterAppWork *work) {
spriteData->objs[i].cellResObj = AddCellOrAnimResObjFromOpenNarc(spriteData->cellResMan, narc, NARC_choose_starter_sub_res_choose_starter_sub_res_00000010_NCER, FALSE, i, GF_GFX_RES_TYPE_CELL, work->heapId);
spriteData->objs[i].animResObj = AddCellOrAnimResObjFromOpenNarc(spriteData->animResMan, narc, NARC_choose_starter_sub_res_choose_starter_sub_res_00000016_NANR, FALSE, i, GF_GFX_RES_TYPE_ANIM, work->heapId);
GetMonSpriteCharAndPlttNarcIdsEx(
&spriteData->param,
&spriteData->pokepicTemplate,
GetMonData(work->choices[i], MON_DATA_SPECIES, NULL),
GetMonData(work->choices[i], MON_DATA_GENDER, NULL),
2,
@ -1190,8 +1190,8 @@ static void createMonSprites(struct ChooseStarterAppWork *work) {
0,
0
);
spriteData->charDatas[i] = sub_0201442C((NarcId)spriteData->param.narcID, spriteData->param.charDataID, work->heapId);
spriteData->plttDatas[i] = sub_02014450((NarcId)spriteData->param.narcID, spriteData->param.palDataID, work->heapId);
spriteData->charDatas[i] = sub_0201442C((NarcId)spriteData->pokepicTemplate.narcID, spriteData->pokepicTemplate.charDataID, work->heapId);
spriteData->plttDatas[i] = sub_02014450((NarcId)spriteData->pokepicTemplate.narcID, spriteData->pokepicTemplate.palDataID, work->heapId);
loadOneMonObj(spriteData->charResMan, spriteData->plttResMan, spriteData->charDatas[i], spriteData->plttDatas[i], i);
createOneMonRender(spriteData, i, work->heapId);
}

View File

@ -40,13 +40,13 @@ void LoadMonPersonal(int species, BASE_STATS *dest);
int ResolveMonForm(int species, int form);
u8 GetGenderBySpeciesAndPersonality_PreloadedPersonal(const BASE_STATS *personal, u16 species, u32 pid);
u32 MaskOfFlagNo(int flagno);
void GetBoxmonSpriteCharAndPlttNarcIds(struct PokepicTemplate *a0, BoxPokemon *boxMon, u8 whichFacing, BOOL a3);
void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct PokepicTemplate *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid);
void GetMonSpriteCharAndPlttNarcIdsEx(struct PokepicTemplate *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid);
void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 whichFacing, BOOL a3);
void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid);
void GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid);
u8 sub_02070438(u16 species, u8 form);
u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2);
u8 GetMonPicHeightBySpeciesGenderForme_PBR(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
u8 GetMonPicHeightBySpeciesGenderForme(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
u8 GetMonPicHeightBySpeciesGenderForm_PBR(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
u8 GetMonPicHeightBySpeciesGenderForm(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid);
void sub_02070D3C(s32 trainer_class, s32 a1, BOOL a2, struct UnkStruct_02070D3C *a3);
int TrainerClassToBackpicID(int trainer_class, int a1);
void LoadMonEvolutionTable(u16 species, struct Evolution *evoTable);
@ -2151,15 +2151,15 @@ u32 GenerateShinyPersonality(u32 otid) {
return (u32)((r5 << 16) | r6);
}
void GetPokemonSpriteCharAndPlttNarcIds(struct PokepicTemplate *a0, Pokemon *mon, u8 whichFacing) {
void GetPokemonSpriteCharAndPlttNarcIds(PokepicTemplate *a0, Pokemon *mon, u8 whichFacing) {
GetBoxmonSpriteCharAndPlttNarcIds(a0, &mon->box, whichFacing, FALSE);
}
void sub_02070130(struct PokepicTemplate *a0, BoxPokemon *boxMon, u8 whichFacing) {
void sub_02070130(PokepicTemplate *a0, BoxPokemon *boxMon, u8 whichFacing) {
GetBoxmonSpriteCharAndPlttNarcIds(a0, boxMon, whichFacing, TRUE);
}
void GetBoxmonSpriteCharAndPlttNarcIds(struct PokepicTemplate *spC, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14) {
void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14) {
BOOL decry = AcquireBoxMonLock(boxMon);
u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES_OR_EGG, NULL);
u8 gender = GetBoxMonGender(boxMon);
@ -2176,103 +2176,103 @@ void GetBoxmonSpriteCharAndPlttNarcIds(struct PokepicTemplate *spC, BoxPokemon *
form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL);
}
if (sp14 == TRUE) {
DP_GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, form, pid);
DP_GetMonSpriteCharAndPlttNarcIdsEx(pokepicTemplate, species, gender, whichFacing, shiny, form, pid);
} else {
GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, form, pid);
GetMonSpriteCharAndPlttNarcIdsEx(pokepicTemplate, species, gender, whichFacing, shiny, form, pid);
}
ReleaseBoxMonLock(boxMon, decry);
}
void GetMonSpriteCharAndPlttNarcIdsEx(struct PokepicTemplate * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) {
spC->species = 0;
spC->isAnimated = 0;
spC->personality = 0;
void GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) {
pokepicTemplate->species = SPECIES_NONE;
pokepicTemplate->isAnimated = FALSE;
pokepicTemplate->personality = 0;
form = sub_02070438(species, form);
switch (species) {
case SPECIES_BURMY:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2);
spC->palDataID = (u16)(shiny + 0xAA + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2);
break;
case SPECIES_WORMADAM:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2);
spC->palDataID = (u16)(shiny + 0xB0 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xB0 + form * 2);
break;
case SPECIES_SHELLOS:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x54 + form);
spC->palDataID = (u16)(shiny + 0xB6 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x54 + form);
pokepicTemplate->palDataID = (u16)(shiny + 0xB6 + form * 2);
break;
case SPECIES_GASTRODON:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x58 + form);
spC->palDataID = (u16)(shiny + 0xBA + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x58 + form);
pokepicTemplate->palDataID = (u16)(shiny + 0xBA + form * 2);
break;
case SPECIES_CHERRIM:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x5C + form);
spC->palDataID = (u16)(shiny * 2 + 0xBE + form);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x5C + form);
pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xBE + form);
break;
case SPECIES_ARCEUS:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2);
spC->palDataID = (u16)(shiny + 0xC2 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xC2 + form * 2);
break;
case SPECIES_CASTFORM:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing * 2 + 0x40 + form);
spC->palDataID = (u16)(shiny * 4 + 0xA2 + form);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing * 2 + 0x40 + form);
pokepicTemplate->palDataID = (u16)(shiny * 4 + 0xA2 + form);
break;
case SPECIES_DEOXYS:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + form * 2);
spC->palDataID = (u16)(shiny + 0x9E);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0x9E);
break;
case SPECIES_UNOWN:
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2);
spC->palDataID = (u16)(shiny + 0xA0);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xA0);
break;
case SPECIES_EGG: // egg, manaphy egg
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(0x84 + form);
spC->palDataID = (u16)(0xE6 + form);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(0x84 + form);
pokepicTemplate->palDataID = (u16)(0xE6 + form);
break;
case SPECIES_MANAPHY_EGG: // bad egg
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = 0x84;
spC->palDataID = 0xE6;
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = 0x84;
pokepicTemplate->palDataID = 0xE6;
break;
case SPECIES_SHAYMIN: // land, sky
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2);
spC->palDataID = (u16)(shiny + 0xE8 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xE8 + form * 2);
break;
case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2);
spC->palDataID = (u16)(shiny + 0xEC + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2);
break;
case SPECIES_GIRATINA: // altered, origin
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2);
spC->palDataID = (u16)(shiny + 0xF8 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2);
break;
case SPECIES_PICHU: // spiky-ear
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x9A + form * 2);
spC->palDataID = (u16)(shiny + 0xFC + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x9A + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xFC + form * 2);
break;
default:
spC->narcID = NARC_poketool_pokegra_pokegra;
spC->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1));
spC->palDataID = (u16)(shiny + (species * 6 + 4));
pokepicTemplate->narcID = NARC_poketool_pokegra_pokegra;
pokepicTemplate->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1));
pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4));
if (species == SPECIES_SPINDA && whichFacing == MON_PIC_FACING_FRONT)
{
spC->species = SPECIES_SPINDA;
spC->isAnimated = 0;
spC->personality = personality;
pokepicTemplate->species = SPECIES_SPINDA;
pokepicTemplate->isAnimated = FALSE;
pokepicTemplate->personality = personality;
}
break;
}
@ -2354,116 +2354,116 @@ u8 sub_02070438(u16 species, u8 form) {
return form;
}
void sub_02070560(struct PokepicTemplate * spC, u16 species, u8 whichFacing, u8 gender, u32 shiny) {
spC->narcID = NARC_pbr_pokegra;
spC->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1));
spC->palDataID = (u16)(shiny + (species * 6 + 4));
void sub_02070560(PokepicTemplate *pokepicTemplate, u16 species, u8 whichFacing, u8 gender, u32 shiny) {
pokepicTemplate->narcID = NARC_pbr_pokegra;
pokepicTemplate->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1));
pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4));
}
void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct PokepicTemplate * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) {
spC->species = 0;
spC->isAnimated = 0;
spC->personality = 0;
void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) {
pokepicTemplate->species = SPECIES_NONE;
pokepicTemplate->isAnimated = FALSE;
pokepicTemplate->personality = 0;
form = sub_02070438(species, form);
switch (species) {
case SPECIES_BURMY:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2);
spC->palDataID = (u16)(shiny + 0x92 + form * 2);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0x92 + form * 2);
break;
case SPECIES_WORMADAM:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2);
spC->palDataID = (u16)(shiny + 0x98 + form * 2);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0x98 + form * 2);
break;
case SPECIES_SHELLOS:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x54 + form);
spC->palDataID = (u16)(shiny + 0x9E + form * 2);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x54 + form);
pokepicTemplate->palDataID = (u16)(shiny + 0x9E + form * 2);
break;
case SPECIES_GASTRODON:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x58 + form);
spC->palDataID = (u16)(shiny + 0xA2 + form * 2);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x58 + form);
pokepicTemplate->palDataID = (u16)(shiny + 0xA2 + form * 2);
break;
case SPECIES_CHERRIM:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing + 0x5C + form);
spC->palDataID = (u16)(shiny * 2 + 0xA6 + form);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing + 0x5C + form);
pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xA6 + form);
break;
case SPECIES_ARCEUS:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2);
spC->palDataID = (u16)(shiny + 0xAA + form * 2);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2);
break;
case SPECIES_CASTFORM:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing * 2 + 0x40 + form);
spC->palDataID = (u16)(shiny * 4 + 0x8A + form);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing * 2 + 0x40 + form);
pokepicTemplate->palDataID = (u16)(shiny * 4 + 0x8A + form);
break;
case SPECIES_DEOXYS:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + form * 2);
spC->palDataID = (u16)(shiny + 0x86);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0x86);
break;
case SPECIES_UNOWN:
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2);
spC->palDataID = (u16)(shiny + 0x88);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0x88);
break;
case SPECIES_EGG: // egg, manaphy egg
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = (u16)(0x84 + form);
spC->palDataID = (u16)(0xCE + form);
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = (u16)(0x84 + form);
pokepicTemplate->palDataID = (u16)(0xCE + form);
break;
case SPECIES_MANAPHY_EGG: // bad egg
spC->narcID = NARC_pbr_otherpoke;
spC->charDataID = 0x84;
spC->palDataID = 0xCE;
pokepicTemplate->narcID = NARC_pbr_otherpoke;
pokepicTemplate->charDataID = 0x84;
pokepicTemplate->palDataID = 0xCE;
break;
case SPECIES_SHAYMIN: // land, sky
if (form != 0) {
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2);
spC->palDataID = (u16)(shiny + 0xEA);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xEA);
} else {
sub_02070560(spC, species, whichFacing, gender, shiny);
sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny);
}
break;
case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost
if (form != 0) {
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2);
spC->palDataID = (u16)(shiny + 0xEC + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2);
} else {
sub_02070560(spC, species, whichFacing, gender, shiny);
sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny);
}
break;
case SPECIES_GIRATINA: // altered, origin
if (form != 0) {
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2);
spC->palDataID = (u16)(shiny + 0xF8 + form * 2);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2);
pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2);
} else {
sub_02070560(spC, species, whichFacing, gender, shiny);
sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny);
}
break;
case SPECIES_PICHU: // spiky-ear
if (form != 0) {
spC->narcID = NARC_poketool_pokegra_otherpoke;
spC->charDataID = (u16)(whichFacing / 2 + 0x9C);
spC->palDataID = (u16)(shiny + 0xFE);
pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke;
pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x9C);
pokepicTemplate->palDataID = (u16)(shiny + 0xFE);
} else {
sub_02070560(spC, species, whichFacing, gender, shiny);
sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny);
}
break;
default:
sub_02070560(spC, species, whichFacing, gender, shiny);
sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny);
if (species == SPECIES_SPINDA && whichFacing == MON_PIC_FACING_FRONT)
{
spC->species = SPECIES_SPINDA;
spC->isAnimated = 0;
spC->personality = personality;
pokepicTemplate->species = SPECIES_SPINDA;
pokepicTemplate->isAnimated = FALSE;
pokepicTemplate->personality = personality;
}
break;
}
@ -2492,18 +2492,13 @@ u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2) {
form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL);
}
if (a2 == TRUE) {
return GetMonPicHeightBySpeciesGenderForme_PBR(species, gender, whichFacing, form, pid);
return GetMonPicHeightBySpeciesGenderForm_PBR(species, gender, whichFacing, form, pid);
} else {
return GetMonPicHeightBySpeciesGenderForme(species, gender, whichFacing, form, pid);
return GetMonPicHeightBySpeciesGenderForm(species, gender, whichFacing, form, pid);
}
}
u8 GetMonPicHeightBySpeciesGenderForme(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) {
// species -> r5
// gender -> r6
// whichFacing -> r4
// form -> <overwrittten>
// pid -> sp18
u8 GetMonPicHeightBySpeciesGenderForm(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) {
#pragma unused(pid)
NarcId narcId;
s32 fileId;
@ -2580,7 +2575,7 @@ u8 GetMonPicHeightBySpeciesGenderForme(u16 species, u8 gender, u8 whichFacing, u
return ret;
}
u8 GetMonPicHeightBySpeciesGenderForme_PBR(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) {
u8 GetMonPicHeightBySpeciesGenderForm_PBR(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) {
// species -> r5
// gender -> r6
// whichFacing -> r4

View File

@ -529,150 +529,150 @@ void PokepicManager_DeleteAllPics(PokepicManager *pokepicManager) {
void Pokepic_SetAttr(Pokepic *pokepic, int attr, int value) {
switch (attr) {
case 0:
case POKEPIC_X:
pokepic->drawParam.xCenter = value;
break;
case 1:
case POKEPIC_Y:
pokepic->drawParam.yCenter = value;
break;
case 2:
case POKEPIC_Z:
pokepic->drawParam.zCenter = value;
break;
case 3:
case POKEPIC_XOFFSET:
pokepic->drawParam.xOffset = value;
break;
case 4:
case POKEPIC_YOFFSET:
pokepic->drawParam.yOffset = value;
break;
case 5:
case POKEPIC_ZOFFSET:
pokepic->drawParam.zOffset = value;
break;
case 6:
case POKEPIC_VANISHED:
pokepic->drawParam.hasVanished = value;
break;
case 7:
case POKEPIC_XROT:
pokepic->drawParam.rotX = value;
break;
case 8:
case POKEPIC_YROT:
pokepic->drawParam.rotY = value;
break;
case 9:
case POKEPIC_ZROT:
pokepic->drawParam.rotZ = value;
break;
case 10:
case POKEPIC_XPIVOT:
pokepic->drawParam.xPivot = value;
break;
case 11:
case POKEPIC_YPIVOT:
pokepic->drawParam.yPivot = value;
break;
case 12:
case POKEPIC_AFFINEW:
pokepic->drawParam.affineWidth = value;
break;
case 13:
case POKEPIC_AFFINEH:
pokepic->drawParam.affineHeight = value;
break;
case 14:
case POKEPIC_VISIBLE:
pokepic->drawParam.visible = value;
break;
case 15:
case POKEPIC_XOFF2:
pokepic->drawParam.xOffset2 = value;
break;
case 16:
case POKEPIC_YOFF2:
pokepic->drawParam.yOffset2 = value;
break;
case 17:
case POKEPIC_W:
pokepic->drawParam.width = value;
break;
case 18:
case POKEPIC_H:
pokepic->drawParam.height = value;
break;
case 19:
case POKEPIC_SHADOW_X:
pokepic->shadow.x = value;
break;
case 20:
case POKEPIC_SHADOW_Y:
pokepic->shadow.y = value;
break;
case 21:
case POKEPIC_SHADOW_XOFFSET:
pokepic->shadow.xOffset = value;
break;
case 22:
case POKEPIC_SHADOW_YOFFSET:
pokepic->shadow.yOffset = value;
break;
case 23:
case POKEPIC_ALPHA:
pokepic->drawParam.alpha = value;
break;
case 24:
case POKEPIC_DIFFUSE_R:
pokepic->drawParam.diffuseR = value;
break;
case 25:
case POKEPIC_DIFFUSE_G:
pokepic->drawParam.diffuseG = value;
break;
case 26:
case POKEPIC_DIFFUSE_B:
pokepic->drawParam.diffuseB = value;
break;
case 27:
case POKEPIC_AMBIENT_R:
pokepic->drawParam.ambientR = value;
break;
case 28:
case POKEPIC_AMBIENT_G:
pokepic->drawParam.ambientG = value;
break;
case 29:
case POKEPIC_AMBIENT_B:
pokepic->drawParam.ambientB = value;
break;
case 30:
case POKEPIC_FADE:
pokepic->drawParam.fadeActive = value;
pokepic->needReloadPltt = TRUE;
break;
case 31:
case POKEPIC_FADE_COLOR:
pokepic->drawParam.fadeTargetColor = value;
pokepic->needReloadPltt = TRUE;
break;
case 32:
case POKEPIC_FADE_BLDY:
pokepic->drawParam.fadeCur = value;
pokepic->needReloadPltt = TRUE;
break;
case 33:
case POKEPIC_FADE_BLDY_TARGET:
pokepic->drawParam.fadeEnd = value;
pokepic->needReloadPltt = TRUE;
break;
case 34:
case POKEPIC_FADE_SPEED:
pokepic->drawParam.fadeDelayCounter = value;
break;
case 35:
case POKEPIC_HFLIP:
pokepic->drawParam.hflip = value;
pokepic->needReloadChar = TRUE;
break;
case 36:
case POKEPIC_VFLIP:
pokepic->drawParam.vflip = value;
pokepic->needReloadChar = TRUE;
break;
case 37:
case POKEPIC_NODRAW:
pokepic->drawParam.dontDraw = value;
break;
case 38:
case POKEPIC_ANIM_STEP:
pokepic->whichAnimStep = value;
break;
case 40:
case POKEPIC_MOSAIC:
pokepic->drawParam.mosaic = value;
pokepic->needReloadChar = TRUE;
break;
case 41:
case POKEPIC_SHADOW_H:
pokepic->shadow.height = value;
break;
case 42:
case POKEPIC_SHADOW_PLTT:
pokepic->shadow.palSlot = value;
pokepic->needReloadPltt = TRUE;
break;
case 43:
case POKEPIC_SHADOW_XADJ_REQ:
pokepic->shadow.shouldAdjustX = value;
break;
case 44:
case POKEPIC_SHADOW_YADJ_REQ:
pokepic->shadow.shouldAdjustY = value;
break;
case 45:
case POKEPIC_SHADOW_AFFINE:
pokepic->shadow.isAffine = value;
break;
case 46:
case POKEPIC_SHADOW_SIZE:
pokepic->shadow.size = value;
break;
}
@ -680,97 +680,97 @@ void Pokepic_SetAttr(Pokepic *pokepic, int attr, int value) {
int Pokepic_GetAttr(Pokepic *pokepic, int attr) {
switch (attr) {
case 0:
case POKEPIC_X:
return pokepic->drawParam.xCenter;
case 1:
case POKEPIC_Y:
return pokepic->drawParam.yCenter;
case 2:
case POKEPIC_Z:
return pokepic->drawParam.zCenter;
case 3:
case POKEPIC_XOFFSET:
return pokepic->drawParam.xOffset;
case 4:
case POKEPIC_YOFFSET:
return pokepic->drawParam.yOffset;
case 5:
case POKEPIC_ZOFFSET:
return pokepic->drawParam.zOffset;
case 6:
case POKEPIC_VANISHED:
return pokepic->drawParam.hasVanished;
case 7:
case POKEPIC_XROT:
return pokepic->drawParam.rotX;
case 8:
case POKEPIC_YROT:
return pokepic->drawParam.rotY;
case 9:
case POKEPIC_ZROT:
return pokepic->drawParam.rotZ;
case 10:
case POKEPIC_XPIVOT:
return pokepic->drawParam.xPivot;
case 11:
case POKEPIC_YPIVOT:
return pokepic->drawParam.yPivot;
case 12:
case POKEPIC_AFFINEW:
return pokepic->drawParam.affineWidth;
case 13:
case POKEPIC_AFFINEH:
return pokepic->drawParam.affineHeight;
case 14:
case POKEPIC_VISIBLE:
return pokepic->drawParam.visible;
case 15:
case POKEPIC_XOFF2:
return pokepic->drawParam.xOffset2;
case 16:
case POKEPIC_YOFF2:
return pokepic->drawParam.yOffset2;
case 17:
case POKEPIC_W:
return pokepic->drawParam.width;
case 18:
case POKEPIC_H:
return pokepic->drawParam.height;
case 19:
case POKEPIC_SHADOW_X:
return pokepic->shadow.x;
case 20:
case POKEPIC_SHADOW_Y:
return pokepic->shadow.y;
case 21:
case POKEPIC_SHADOW_XOFFSET:
return pokepic->shadow.xOffset;
case 22:
case POKEPIC_SHADOW_YOFFSET:
return pokepic->shadow.yOffset;
case 23:
case POKEPIC_ALPHA:
return pokepic->drawParam.alpha;
case 24:
case POKEPIC_DIFFUSE_R:
return pokepic->drawParam.diffuseR;
case 25:
case POKEPIC_DIFFUSE_G:
return pokepic->drawParam.diffuseG;
case 26:
case POKEPIC_DIFFUSE_B:
return pokepic->drawParam.diffuseB;
case 27:
case POKEPIC_AMBIENT_R:
return pokepic->drawParam.ambientR;
case 28:
case POKEPIC_AMBIENT_G:
return pokepic->drawParam.ambientG;
case 29:
case POKEPIC_AMBIENT_B:
return pokepic->drawParam.ambientB;
case 30:
case POKEPIC_FADE:
return pokepic->drawParam.fadeActive;
case 31:
case POKEPIC_FADE_COLOR:
return pokepic->drawParam.fadeTargetColor;
case 32:
case POKEPIC_FADE_BLDY:
return pokepic->drawParam.fadeCur;
case 33:
case POKEPIC_FADE_BLDY_TARGET:
return pokepic->drawParam.fadeEnd;
case 34:
case POKEPIC_FADE_SPEED:
return pokepic->drawParam.fadeDelayCounter;
case 35:
case POKEPIC_HFLIP:
return pokepic->drawParam.hflip;
case 36:
case POKEPIC_VFLIP:
return pokepic->drawParam.vflip;
case 37:
case POKEPIC_NODRAW:
return pokepic->drawParam.dontDraw;
case 38:
case POKEPIC_ANIM_STEP:
return pokepic->whichAnimStep;
case 40:
case POKEPIC_MOSAIC:
return pokepic->drawParam.mosaic;
case 41:
case POKEPIC_SHADOW_H:
return pokepic->shadow.height;
case 42:
case POKEPIC_SHADOW_PLTT:
return pokepic->shadow.palSlot;
case 43:
case POKEPIC_SHADOW_XADJ_REQ:
return pokepic->shadow.shouldAdjustX;
case 44:
case POKEPIC_SHADOW_YADJ_REQ:
return pokepic->shadow.shouldAdjustY;
case 45:
case POKEPIC_SHADOW_AFFINE:
return pokepic->shadow.isAffine;
case 46:
case POKEPIC_SHADOW_SIZE:
return pokepic->shadow.size;
}
@ -780,150 +780,150 @@ int Pokepic_GetAttr(Pokepic *pokepic, int attr) {
void Pokepic_AddAttr(Pokepic *pokepic, int attr, int addend) {
switch (attr) {
case 0:
case POKEPIC_X:
pokepic->drawParam.xCenter += addend;
break;
case 1:
case POKEPIC_Y:
pokepic->drawParam.yCenter += addend;
break;
case 2:
case POKEPIC_Z:
pokepic->drawParam.zCenter += addend;
break;
case 3:
case POKEPIC_XOFFSET:
pokepic->drawParam.xOffset += addend;
break;
case 4:
case POKEPIC_YOFFSET:
pokepic->drawParam.yOffset += addend;
break;
case 5:
case POKEPIC_ZOFFSET:
pokepic->drawParam.zOffset += addend;
break;
case 6:
case POKEPIC_VANISHED:
pokepic->drawParam.hasVanished += addend;
break;
case 7:
case POKEPIC_XROT:
pokepic->drawParam.rotX += addend;
break;
case 8:
case POKEPIC_YROT:
pokepic->drawParam.rotY += addend;
break;
case 9:
case POKEPIC_ZROT:
pokepic->drawParam.rotZ += addend;
break;
case 10:
case POKEPIC_XPIVOT:
pokepic->drawParam.xPivot += addend;
break;
case 11:
case POKEPIC_YPIVOT:
pokepic->drawParam.yPivot += addend;
break;
case 12:
case POKEPIC_AFFINEW:
pokepic->drawParam.affineWidth += addend;
break;
case 13:
case POKEPIC_AFFINEH:
pokepic->drawParam.affineHeight += addend;
break;
case 14:
case POKEPIC_VISIBLE:
pokepic->drawParam.visible += addend;
break;
case 15:
case POKEPIC_XOFF2:
pokepic->drawParam.xOffset2 += addend;
break;
case 16:
case POKEPIC_YOFF2:
pokepic->drawParam.yOffset2 += addend;
break;
case 17:
case POKEPIC_W:
pokepic->drawParam.width += addend;
break;
case 18:
case POKEPIC_H:
pokepic->drawParam.height += addend;
break;
case 19:
case POKEPIC_SHADOW_X:
pokepic->shadow.x += addend;
break;
case 20:
case POKEPIC_SHADOW_Y:
pokepic->shadow.y += addend;
break;
case 21:
case POKEPIC_SHADOW_XOFFSET:
pokepic->shadow.xOffset += addend;
break;
case 22:
case POKEPIC_SHADOW_YOFFSET:
pokepic->shadow.yOffset += addend;
break;
case 23:
case POKEPIC_ALPHA:
pokepic->drawParam.alpha += addend;
break;
case 24:
case POKEPIC_DIFFUSE_R:
pokepic->drawParam.diffuseR += addend;
break;
case 25:
case POKEPIC_DIFFUSE_G:
pokepic->drawParam.diffuseG += addend;
break;
case 26:
case POKEPIC_DIFFUSE_B:
pokepic->drawParam.diffuseB += addend;
break;
case 27:
case POKEPIC_AMBIENT_R:
pokepic->drawParam.ambientR += addend;
break;
case 28:
case POKEPIC_AMBIENT_G:
pokepic->drawParam.ambientG += addend;
break;
case 29:
case POKEPIC_AMBIENT_B:
pokepic->drawParam.ambientB += addend;
break;
case 30:
case POKEPIC_FADE:
pokepic->drawParam.fadeActive += addend;
pokepic->needReloadPltt = TRUE;
break;
case 31:
case POKEPIC_FADE_COLOR:
pokepic->drawParam.fadeTargetColor += addend;
pokepic->needReloadPltt = TRUE;
break;
case 32:
case POKEPIC_FADE_BLDY:
pokepic->drawParam.fadeCur += addend;
pokepic->needReloadPltt = TRUE;
break;
case 33:
case POKEPIC_FADE_BLDY_TARGET:
pokepic->drawParam.fadeEnd += addend;
pokepic->needReloadPltt = TRUE;
break;
case 34:
case POKEPIC_FADE_SPEED:
pokepic->drawParam.fadeDelayCounter += addend;
break;
case 35:
case POKEPIC_HFLIP:
pokepic->drawParam.hflip += addend;
pokepic->needReloadChar = TRUE;
break;
case 36:
case POKEPIC_VFLIP:
pokepic->drawParam.vflip += addend;
pokepic->needReloadChar = TRUE;
break;
case 37:
case POKEPIC_NODRAW:
pokepic->drawParam.dontDraw += addend;
break;
case 38:
case POKEPIC_ANIM_STEP:
pokepic->whichAnimStep += addend;
break;
case 40:
case POKEPIC_MOSAIC:
pokepic->drawParam.mosaic += addend;
pokepic->needReloadChar = TRUE;
break;
case 41:
case POKEPIC_SHADOW_H:
pokepic->shadow.height += addend;
break;
case 42:
case POKEPIC_SHADOW_PLTT:
pokepic->shadow.palSlot += addend;
pokepic->needReloadPltt = TRUE;
break;
case 43:
case POKEPIC_SHADOW_XADJ_REQ:
pokepic->shadow.shouldAdjustX += addend;
break;
case 44:
case POKEPIC_SHADOW_YADJ_REQ:
pokepic->shadow.shouldAdjustY += addend;
break;
case 45:
case POKEPIC_SHADOW_AFFINE:
pokepic->shadow.isAffine += addend;
break;
case 46:
case POKEPIC_SHADOW_SIZE:
pokepic->shadow.size += addend;
break;
}

View File

@ -145,7 +145,7 @@ typedef enum RegisterHallOfFame_MetLocationType {
typedef struct RegisterHofMon {
Pokemon *mon;
u8 tsure_param[4];
u8 follow_poke_param[4];
u32 personality;
u16 species;
u16 level;
@ -255,6 +255,7 @@ typedef struct RegHOFSpritePosScaleAnimParam {
f32 scaleStart;
f32 scaleEnd;
} RegHOFSpritePosScaleAnimParam;
typedef struct RegisterHofTaskData_IndivMonAnimAndCry {
RegisterHofMon *hofMon;
PokepicAnim anim;
@ -1610,7 +1611,7 @@ static void RegisterHallOfFame_RestoreMonPicPalette(RegisterHallOfFameData *data
}
static void RegisterHallOfFame_IndivMonsScene_LoadMonOverworldSprite(RegisterHallOfFameData *data, RegisterHofMon *mon) {
if (mon->tsure_param[1]) {
if (mon->follow_poke_param[1]) {
SpriteRenderer_LoadCharResObjFromOpenNarc(
data->spriteRenderer,
data->spriteGfxHandler,
@ -1698,7 +1699,7 @@ static void RegisterHallOfFame_IndivMonsScene_SetMon3dSpriteTex(RegisterHallOfFa
void *fileData;
const void *texData;
u32 imageLoc = NNS_G2dGetImageLocation(Sprite_GetImageProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN);
int spriteSquareDim = hofMon->tsure_param[1] ? 8 : 4;
int spriteSquareDim = hofMon->follow_poke_param[1] ? 8 : 4;
u32 size = 32 * spriteSquareDim * spriteSquareDim;
int fileno = RegisterHallOfFame_GetMmodelBySpeciesFormGender(hofMon->species, hofMon->form, hofMon->gender);
fileData = AllocAndReadWholeNarcMemberByIdPair(NARC_data_mmodel_mmodel, fileno, HEAP_ID_REGISTER_HALL_OF_FAME);
@ -1893,7 +1894,7 @@ static void RegisterHallOfFame_IndivMonsScene_CreateMonSprites(RegisterHallOfFam
}
static void RegisterHallOfFame_IndivMonsScene_SetOverworldSpritePos(RegisterHallOfFameData *data, RegisterHofMon *mon) {
if (mon->tsure_param[1]) {
if (mon->follow_poke_param[1]) {
UnkImageStruct_AddSpritePositionXY(data->monPics[REGHOF_PIC_INDIV_OWSPRITE], -32, -32);
UnkImageStruct_AddSpritePositionXY(data->monPics[REGHOF_PIC_INDIV_OWSPRITE_SHADOW], -32, -32);
} else {
@ -2357,7 +2358,7 @@ static void RegisterHallOfFame_GetPartyDetails(RegisterHallOfFameData *data) {
hofMon->personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL);
hofMon->form = GetMonData(pokemon, MON_DATA_FORM, NULL);
hofMon->gender = GetMonData(pokemon, MON_DATA_GENDER, NULL);
hofMon->yOffset = GetMonPicHeightBySpeciesGenderForme(hofMon->species, hofMon->gender, 0, hofMon->form, hofMon->personality) + 8;
hofMon->yOffset = GetMonPicHeightBySpeciesGenderForm(hofMon->species, hofMon->gender, 0, hofMon->form, hofMon->personality) + 8;
hofMon->metLocation = GetMonData(pokemon, MON_DATA_MET_LOCATION, NULL);
hofMon->level = GetMonData(pokemon, MON_DATA_LEVEL, NULL);
hofMon->partyIndex = i;
@ -2366,7 +2367,7 @@ static void RegisterHallOfFame_GetPartyDetails(RegisterHallOfFameData *data) {
} else {
hofMon->printGender = TRUE;
}
ReadWholeNarcMemberByIdPair(hofMon->tsure_param, NARC_fielddata_tsurepoke_tp_param, SpeciesToOverworldModelIndexOffset(hofMon->species));
ReadWholeNarcMemberByIdPair(hofMon->follow_poke_param, NARC_fielddata_tsurepoke_tp_param, SpeciesToOverworldModelIndexOffset(hofMon->species));
GetPokemonSpriteCharAndPlttNarcIds(&sp40, pokemon, MON_PIC_FACING_FRONT);
sub_02014510((NarcId)sp40.narcID, sp40.charDataID, HEAP_ID_REGISTER_HALL_OF_FAME, &sp20[0], hofMon->frontspriteCharbuf[0], hofMon->personality, TRUE, 2, hofMon->species);
sub_02014510((NarcId)sp40.narcID, sp40.charDataID, HEAP_ID_REGISTER_HALL_OF_FAME, &sp20[1], hofMon->frontspriteCharbuf[1], hofMon->personality, TRUE, 2, hofMon->species);