Skip to content

Commit f8837ca

Browse files
committed
MAP2_S00: func_800DC200
1 parent 5c80d02 commit f8837ca

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

include/maps/map2/map2_s00.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ extern s32 D_800F1A24;
4545
/** Time. */
4646
extern q3_12 D_800F534E;
4747

48+
extern VECTOR3 D_800F216C;
49+
4850
/* TODO: Rename these, give them sequental namea (not really essential, but would be nice). */
4951
extern SVECTOR3 D_800F5344;
5052
extern s8 D_800F534C;
@@ -148,4 +150,8 @@ s32 func_800DC598(s_SubCharacter* chara);
148150

149151
void func_800D5974(s_SubCharacter* chara);
150152

153+
s32 func_800DC200(s_SubCharacter* chara);
154+
155+
s32 func_800DC98C(s_SubCharacter* chara, VECTOR3* arg1, VECTOR3* arg2, VECTOR3* arg3);
156+
151157
#endif

src/maps/map2_s00/map2_s00.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,20 @@ INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DC0A8);
381381

382382
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DC0E4);
383383

384-
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DC200);
384+
s32 func_800DC200(s_SubCharacter* chara)
385+
{
386+
if ((g_SysWork.field_2388.field_154.field_0.field_0.s_field_0.field_0 & 1)&&
387+
(g_SavegamePtr->gameDifficulty_260 <= GameDifficulty_Normal || chara->model_0.charaId_0 == Chara_AirScreamer))
388+
{
389+
return 0;
390+
}
391+
392+
D_800F216C.vx = chara->position_18.vx + FP_MULTIPLY_PRECISE(Math_Sin(chara->rotation_24.vy), Q12(2.0f), Q12_SHIFT);
393+
D_800F216C.vy = chara->position_18.vy + Q12(0.5f);
394+
D_800F216C.vz = chara->position_18.vz + FP_MULTIPLY_PRECISE(Math_Cos(chara->rotation_24.vy), Q12(2.0f), Q12_SHIFT);
395+
396+
return func_800DC98C(chara, NULL, &D_800F216C, NULL) != 0;
397+
}
385398

386399
INCLUDE_ASM("asm/maps/map2_s00/nonmatchings/map2_s00", func_800DC30C);
387400

0 commit comments

Comments
 (0)