DRA func_8010DA70 (#1095)

Thanks to the anonymous person who managed to match the last part:
https://decomp.me/scratch/3mKBR
This commit is contained in:
Luciano Ciccariello 2024-03-07 22:19:44 +00:00 committed by GitHub
parent 65948d3717
commit c5159842c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 50 additions and 9 deletions

View File

@ -61,6 +61,7 @@ D_800AFFB8 = 0x800B007C;
D_800B0130 = 0x800B01F4;
D_800B0188 = 0x800B024C;
D_800B01B8 = 0x800B027C;
D_800B0594 = 0x800B0658;
D_800B0608 = 0x800B06CC;
D_800B0688 = 0x800B074C;
D_800B06C8 = 0x800B078C;
@ -194,7 +195,6 @@ func_8010D010 = 0x8010CD54;
func_8010D2C8 = 0x8010D00C;
SetPlayerStep = 0x8010D2C8;
func_8010DA48 = 0x8010D78C;
func_8010DA70 = 0x8010D7B4;
func_8010DFF0 = 0x8010DD34;
func_8010E168 = 0x8010DEAC;
DecelerateX = 0x8010DF30;

View File

@ -140,8 +140,40 @@ void func_8010DA48(u32 arg0) {
g_CurrentEntity->animFrameIdx = 0;
}
AnimationFrame* func_8010DA70(s32* frames);
INCLUDE_ASM("dra/nonmatchings/6D59C", func_8010DA70);
AnimationFrame* func_8010DA70(AnimationFrame** frames) {
Entity* entity;
AnimationFrame* frame;
s32 idx;
AnimationFrame* frameSub;
s32 idxSub;
entity = g_CurrentEntity;
frame = frames[entity->ext.player.unkAC];
idx = 0;
while (true) {
if (frame->duration == 0xFFFD) {
frameSub = D_800B0594[(u8)frame->unk2];
idxSub = 0;
while (true) {
if (frameSub[idxSub].duration == 0xFFFF) {
break;
}
entity = g_CurrentEntity;
if (idx == entity->animFrameIdx) {
return &frameSub[idxSub];
}
idx++;
idxSub++;
}
frame++;
} else if (idx == g_CurrentEntity->animFrameIdx) {
return frame;
} else {
idx++;
frame++;
}
}
}
u32 UpdateUnarmedAnim(s8* frameProps, u16** frames) {
u16* frameIndex;

View File

@ -459,6 +459,7 @@ extern RECT c_backbufferClear;
extern s16 D_800AFFB8[];
extern s32 D_800B0130[];
extern s32 D_800B01B8[];
extern AnimationFrame* D_800B0594[];
extern u8 D_800B0608[];
extern Point32 D_800B0688[];
extern u16 D_800B06C8[0x30];

View File

@ -62,6 +62,20 @@ s32 D_800978C4;
s32 D_80097C98;
s8 D_80097B98;
s8 D_80097B99;
AnimationFrame D_800B0594_sub[] = {
{0x0002, 0x0239},
{0xFFFF, 0x0000},
};
AnimationFrame* D_800B0594[] = {
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub, D_800B0594_sub, D_800B0594_sub,
D_800B0594_sub, D_800B0594_sub,
};
u8 D_800B0608[0xC0]; // size guessed
s16 D_80136308[1];
u16 g_Clut[0x3000];
@ -635,12 +649,6 @@ s32 func_800F0CD8(s32 arg0) {
void func_80118C28(s32 arg0) { NOT_IMPLEMENTED; }
AnimationFrame frame = {0};
AnimationFrame* func_8010DA70(s32* frames) {
NOT_IMPLEMENTED;
return &frame;
}
void EntityWeaponAttack(Entity* self) { NOT_IMPLEMENTED; }
void func_ptr_80170004(Entity* self) { NOT_IMPLEMENTED; }
void func_ptr_80170008(Entity* self) { NOT_IMPLEMENTED; }