mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-07 20:11:51 -04:00
Implement & link m_roll_lib.c
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct snowman_actor_s {
|
||||
ACTOR actor_class;
|
||||
ClObjPipe_c _174;
|
||||
int _190;
|
||||
ACTOR* head_actor_p;
|
||||
xyz_t _198;
|
||||
u8 _1A4[0x1C4 - 0x1A4];
|
||||
xyz_t snowball_scale;
|
||||
f32 normalized_scale; /* normalized ball scale, [0, 1.0f] */
|
||||
f32 _1D4;
|
||||
f32 ball_scale; /* [0, 6400.0f] */
|
||||
f32 _1DC;
|
||||
int scale_result;
|
||||
int msg_info;
|
||||
int snowman_part;
|
||||
s_xyz head_vec;
|
||||
u8 _1F2[0x1FC - 0x1F2];
|
||||
} SNOWMAN_ACTOR;
|
||||
|
||||
extern ACTOR_PROFILE Snowman_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -83,6 +83,12 @@ typedef union collision_bg_u {
|
||||
u32 raw;
|
||||
} mCoBG_Collision_u;
|
||||
|
||||
#define mCoBG_HIT_WALL (1 << 0) /* in contact with *any* wall */
|
||||
#define mCoBG_HIT_WALL_FRONT (1 << 1) /* in contact with wall to the front */
|
||||
#define mCoBG_HIT_WALL_RIGHT (1 << 2) /* in contact with wall to the right */
|
||||
#define mCoBG_HIT_WALL_LEFT (1 << 3) /* in contact with wall to the left */
|
||||
#define mCoBG_HIT_WALL_BACK (1 << 4) /* in contact with wall to the back */
|
||||
|
||||
typedef struct collision_bg_check_result_s {
|
||||
u32 on_ground:1;
|
||||
u32 hit_attribute_wall:5;
|
||||
@@ -172,6 +178,9 @@ extern void mCoBG_Ut2SetDefaultOffset(int ut_x, int ut_z);
|
||||
extern int mCoBG_CheckWaveAttr(u32 attribute);
|
||||
extern int mCoBG_CheckPlant(xyz_t wpos);
|
||||
extern void mCoBG_InitBoatCollision();
|
||||
extern int mCoBG_CheckAttribute_BallRolling(s16* angles, const xyz_t* wpos);
|
||||
extern f32 mCoBG_CheckBallRollingArea(s16 angle, const xyz_t* wpos);
|
||||
extern int mCoBG_ExistHeightGap_KeepAndNow_Detail(xyz_t wpos);
|
||||
|
||||
extern void mCoBG_InitMoveBgData();
|
||||
extern void mCoBG_InitBlockBgCheckMode();
|
||||
|
||||
@@ -12,6 +12,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* acre unit world size */
|
||||
#define mFI_UNIT_BASE_SIZE 40
|
||||
#define mFI_UNIT_BASE_SIZE_F ((f32)mFI_UNIT_BASE_SIZE)
|
||||
|
||||
#define mFI_UT_WORLDSIZE_X 40
|
||||
#define mFI_UT_WORLDSIZE_Z 40
|
||||
|
||||
|
||||
@@ -261,6 +261,8 @@ extern void mNpc_SendRegisteredGoodbyMail();
|
||||
extern void mNpc_IslandNpcRoomDataSet(mFM_fg_data_c** sorted_fg_data_list, int fg_name_start);
|
||||
extern Animal_c* mNpc_GetAnimalInfoP(mActor_name_t npc_name);
|
||||
extern int mNpc_RegistMaskNpc(mActor_name_t mask_id, mActor_name_t npc_id, mActor_name_t cloth);
|
||||
extern int mNpc_CheckNpcSet(int bx, int bz, int ut_x, int ut_z);
|
||||
extern int mNpc_GetMakeUtNuminBlock_hard_area(int* ut_x, int* ut_z, int bx, int bz, int start_ut);
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef M_ROLL_LIB_H
|
||||
#define M_ROLL_LIB_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_actor.h"
|
||||
#include "m_play_h.h"
|
||||
#include "m_demo.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mRlib_spdXZ_to_spdF_Angle(xyz_t* speed_vec, f32* speedf, s16* angle_y_s);
|
||||
extern void mRlib_spdF_Angle_to_spdXZ(xyz_t* speed_vec, f32* speedf, s16* angle_y_s);
|
||||
extern int mRlib_position_move_for_sloop(ACTOR* actor, s_xyz* slope_angle);
|
||||
extern int mRlib_Get_norm_Clif(ACTOR* actor, xyz_t* normal_vec);
|
||||
extern void mRlib_Roll_Matrix_to_s_xyz(ACTOR* actor, s_xyz* rot, s16 angle);
|
||||
extern s16 mRlib_Get_HitWallAngleY(ACTOR* actor);
|
||||
extern void mRlib_Station_step_modify_to_wall(ACTOR* actor);
|
||||
extern int mRlib_Set_Position_Check(ACTOR* actor);
|
||||
extern int mRlib_HeightGapCheck_And_ReversePos(ACTOR* actor);
|
||||
extern int mRlib_Hole_check(ACTOR* actor);
|
||||
extern int mRlib_Get_ground_norm_inHole(ACTOR* actor, xyz_t* normal, f32* dist, s16* angle_y, s16* angle_rate, f32 rate_mod);
|
||||
extern int mRlib_PSnowmanBreakCheck(ACTOR* actor, GAME_PLAY* play, f32* speed);
|
||||
extern int mRlib_PSnowmanBreakNeckSwing(s16* head_angle_y, f32 f0, f32 scale);
|
||||
extern int mRlib_PSnowman_NormalTalk(ACTOR* actor, GAME_PLAY* play, f32* speed, mDemo_REQUEST_PROC demo_req_proc);
|
||||
extern int mRlib_snowman_ball_unit_check_from_pos(GAME_PLAY* play, const xyz_t* wpos);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -31,6 +31,7 @@ typedef struct math_3d_triangle_s {
|
||||
} Math3D_triangle_c; // size = 0x34
|
||||
|
||||
extern f32 Math3DVecLength(xyz_t* vec);
|
||||
extern f32 Math3DVecLengthSquare2D(f32 x, f32 y);
|
||||
extern void sMath_RotateX(xyz_t* pos, f32 rad);
|
||||
extern void sMath_RotateY(xyz_t* pos, f32 rad);
|
||||
extern void sMath_RotateZ(xyz_t* pos, f32 rad);
|
||||
|
||||
Reference in New Issue
Block a user