mirror of
https://github.com/pret/pmd-red.git
synced 2026-10-02 05:48:45 -05:00
Cast to struct PortraitGfx
This commit is contained in:
@@ -39,12 +39,6 @@ struct MonPortraitMsg
|
||||
u8 unkE;
|
||||
};
|
||||
|
||||
struct FileMonPortraits
|
||||
{
|
||||
/* 0x0 */ File *file;
|
||||
/* 0x4 */ struct PortraitGfx *data;
|
||||
};
|
||||
|
||||
#define FORMAT_BUFFER_LEN 80
|
||||
#define FRIEND_AREA_BUFFER_LEN 184
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ static void PrintPersonalityTypeDescription(void)
|
||||
static void PersonalityTest_DisplayStarterSprite(void)
|
||||
{
|
||||
s32 starterID;
|
||||
struct FileMonPortraits *faceFile;
|
||||
struct OpenedFile *faceFile;
|
||||
s32 palleteIndex;
|
||||
s32 emotionId;
|
||||
const u8 *gfx;
|
||||
@@ -397,14 +397,14 @@ static void PersonalityTest_DisplayStarterSprite(void)
|
||||
CallPrepareTextbox_8008C54(1);
|
||||
sub_80073B8(1);
|
||||
|
||||
faceFile = (void*) GetDialogueSpriteDataPtr(starterID);
|
||||
gfx = faceFile->data->sprites[EMOTION_HAPPY].gfx;
|
||||
faceFile = GetDialogueSpriteDataPtr(starterID);
|
||||
gfx = ((struct PortraitGfx *)(faceFile->data))->sprites[EMOTION_HAPPY].gfx;
|
||||
emotionId = EMOTION_HAPPY;
|
||||
for (palleteIndex = 0; palleteIndex < 0x10; palleteIndex++) {
|
||||
SetBGPaletteBufferColorArray(palleteIndex + 0xE0, &faceFile->data->sprites[emotionId].pal[palleteIndex]);
|
||||
SetBGPaletteBufferColorArray(palleteIndex + 0xE0, &((struct PortraitGfx *)(faceFile->data))->sprites[emotionId].pal[palleteIndex]);
|
||||
}
|
||||
|
||||
DisplayMonPortraitSpriteFlipped(1, gfx, 14);
|
||||
CloseFile((void*)faceFile);
|
||||
CloseFile(faceFile);
|
||||
sub_80073E0(1);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ static void RedrawPartnerSelectionMenu(void)
|
||||
static void PersonalityTest_DisplayPartnerSprite(void)
|
||||
{
|
||||
s32 partnerID;
|
||||
struct FileMonPortraits *faceFile;
|
||||
struct OpenedFile *faceFile;
|
||||
s32 palleteIndex;
|
||||
const u8 *gfx;
|
||||
s32 emotionId;
|
||||
@@ -252,15 +252,15 @@ static void PersonalityTest_DisplayPartnerSprite(void)
|
||||
partnerID = gUnknown_203B404->PartnerArray[gUnknown_203B404->s18.s0.input.menuIndex];
|
||||
CallPrepareTextbox_8008C54(1);
|
||||
sub_80073B8(1);
|
||||
faceFile = (void*) GetDialogueSpriteDataPtr(partnerID);
|
||||
gfx = faceFile->data->sprites[EMOTION_NORMAL].gfx;
|
||||
faceFile = GetDialogueSpriteDataPtr(partnerID);
|
||||
gfx = ((struct PortraitGfx *)(faceFile->data))->sprites[EMOTION_NORMAL].gfx;
|
||||
emotionId = EMOTION_NORMAL;
|
||||
for (palleteIndex = 0; palleteIndex < 0x10; palleteIndex++) {
|
||||
SetBGPaletteBufferColorArray(palleteIndex + 0xE0, &faceFile->data->sprites[emotionId].pal[palleteIndex]);
|
||||
SetBGPaletteBufferColorArray(palleteIndex + 0xE0, &((struct PortraitGfx *)(faceFile->data))->sprites[emotionId].pal[palleteIndex]);
|
||||
}
|
||||
|
||||
DisplayMonPortraitSpriteFlipped(1, gfx, 14);
|
||||
CloseFile((void*)faceFile);
|
||||
CloseFile(faceFile);
|
||||
sub_80073E0(1);
|
||||
gUnknown_203B404->unk16 = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user