Skip to content

Commit 8bb4de8

Browse files
committed
MAP2_S00: func_800DDF74
1 parent 0a0c47a commit 8bb4de8

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

include/maps/map2/map2_s00.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,6 @@ void func_800EE5D0(void);
156156

157157
void func_800DF80C(s_SubCharacter* chara);
158158

159+
void func_800DDF74(s_SubCharacter* chara, s32 xMul, s32 angle0);
160+
159161
#endif

src/maps/map2_s00/map2_s00.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,24 @@ INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DDA80);
426426

427427
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DDE14);
428428

429-
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DDF74);
429+
void func_800DDF74(s_SubCharacter* chara, s32 xMul, s32 angle0)
430+
{
431+
s32 posX;
432+
s32 posZ;
433+
s32 calcY;
434+
435+
posX = chara->position_18.vx;
436+
posZ = chara->position_18.vz;
437+
438+
posX += FP_MULTIPLY_PRECISE(xMul, Math_Sin(angle0), Q12_SHIFT);
439+
posZ += FP_MULTIPLY_PRECISE(xMul, Math_Cos(angle0), Q12_SHIFT);
440+
441+
calcY = func_80080884(posX, posZ);
442+
chara->properties_E4.unk0.field_F8.vx = posX;
443+
chara->properties_E4.unk0.field_F8.vy = calcY;
444+
chara->properties_E4.unk0.field_F8.vz = posZ;
445+
sharedFunc_800D4E84_0_s01(chara);
446+
}
430447

431448
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DE034);
432449

0 commit comments

Comments
 (0)