Update DecorationTable

This commit is contained in:
Lavos1 2020-11-15 23:15:59 +00:00
parent b3c8870efb
commit 5315827969
2 changed files with 7 additions and 10 deletions

View File

@ -1135,10 +1135,9 @@ typedef struct DecorationTable {
/* 0x8AC */ u8 effectType; /* 0 = blur, 14 = none? */ /* 0x8AC */ u8 effectType; /* 0 = blur, 14 = none? */
/* 0x8AD */ char unk_8AD[11]; /* 0x8AD */ char unk_8AD[11];
/* 0x8B8 */ u8 decorationType[2]; /* 0x8B8 */ u8 decorationType[2];
/* 0x8BA */ u8 unk_8BA; /* 0x8BA */ u8 unk_8BA[2];
/* 0x8BB */ u8 unk_8BB; /* 0x8BC */ u8 unk_8BC[2];
/* 0x8BC */ u8 unk_8BC; /* 0x8BD */ char unk_8BD[42];
/* 0x8BD */ char unk_8BD[43];
} DecorationTable; // size = 0x8E8 } DecorationTable; // size = 0x8E8
typedef struct Shop { typedef struct Shop {

View File

@ -283,14 +283,12 @@ INCLUDE_ASM(s32, "code_190B20", func_802670C8);
void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType) { void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType) {
if ((part->idleAnimations) && !(part->flags & 2)) { if ((part->idleAnimations) && !(part->flags & 2)) {
char* decorationTable = part->decorationTable->unk_00; DecorationTable* decorationTable = part->decorationTable;
DecorationTable* decoration;
_remove_part_decoration(part, decorationIndex); _remove_part_decoration(part, decorationIndex);
decoration = &decorationTable[decorationIndex]; decorationTable->decorationType[decorationIndex] = decorationType;
decoration->decorationType[0] = decorationType; decorationTable->unk_8BA[decorationIndex] = 1;
decoration->unk_8BA = 1; decorationTable->unk_8BC[decorationIndex] = 0;
decoration->unk_8BC = 0;
func_8025CEC8(part); func_8025CEC8(part);
} }
} }