ac_snowman 50%

This commit is contained in:
Cuyler36
2025-06-06 02:11:16 -04:00
parent dee81a6d87
commit 63f29f3eb4
10 changed files with 846 additions and 26 deletions
+27 -19
View File
@@ -8,25 +8,34 @@
extern "C" {
#endif
#define aSMAN_SCALE_MAX (6400.0f)
typedef void (*aSMAN_PROC)(ACTOR* actorx, GAME* game);
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[0x1F8 - 0x1F2];
s16 unk_1F8;
u8 _1FA[0x2];
/* 0x000 */ ACTOR actor_class;
/* 0x174 */ ClObjPipe_c col_pipe;
/* 0x190 */ aSMAN_PROC process;
/* 0x194 */ ACTOR* col_actor;
/* 0x198 */ xyz_t _198;
/* 0x1A4 */ xyz_t rev_pos;
/* 0x1B0 */ xyz_t fg_pos;
/* 0x1BC */ f32 y_ofs;
/* 0x1C0 */ f32 _1C0;
/* 0x1C4 */ f32 base_speed;
/* 0x1C8 */ f32 accel;
/* 0x1CC */ f32 roll_speed;
/* 0x1D0 */ f32 normalized_scale; /* normalized ball scale, [0, 1.0f] */
/* 0x1D4 */ f32 body_scale;
/* 0x1D8 */ f32 move_dist; /* [0, 6400.0f] */
/* 0x1DC */ f32 _1DC;
/* 0x1E0 */ int result;
/* 0x1E4 */ int msg_no;
/* 0x1E8 */ int snowman_part;
/* 0x1EC */ s_xyz head_vec;
/* 0x1F2 */ s_xyz ground_angle;
/* 0x1F8 */ s16 flags;
/* 0x1FA */ s16 timer;
} SNOWMAN_ACTOR;
extern ACTOR_PROFILE Snowman_Profile;
@@ -36,4 +45,3 @@ extern ACTOR_PROFILE Snowman_Profile;
#endif
#endif
+1 -1
View File
@@ -18,7 +18,7 @@ extern "C" {
s16 sins(u16);
s16 coss(u16);
f32 fatan2(f32, f32);
f64 fsqrt(f32);
f32 fsqrt(f32);
f32 facos(f32);
#ifdef __cplusplus
+8
View File
@@ -20,6 +20,11 @@ extern "C" {
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (((x) > (max) ? (max) : (x))))
#define CLAMP2(x, min, max) ((min) < (x) ? (((x) < (max) ? (x) : (max))) : (min))
// clamp macro specifically for Animal Crossing
#ifndef M_CLAMP
#define M_CLAMP(v, l, h) MAX(MIN((v), (l)), (h))
#endif
/* Float modulo operator */
#define MOD_F(a, m) (a - (int)((a) * (1.0f / (m))) * (m))
@@ -47,6 +52,9 @@ extern "C" {
/* degrees -> radians */
#define DEG2RAD(deg) ((F_PI / 180.0f) * (deg))
// short angle difference
#define DIFF_SHORT_ANGLE(x, y) ((s16)((x) - (y)))
typedef struct rgba_t { // can be put in other place
u8 r, g, b, a;
} rgba_t;
+13
View File
@@ -1504,6 +1504,19 @@ extern int mNT_check_unknown(mActor_name_t item_no);
#define FTR_DINO_TRILOBITE_WEST 0x1F4F
#define FTR_DINO_END FTR_DINO_TRILOBITE_WEST
#define FTR_MODERN_LAMP 0x1F50
#define FTR_SNOWMAN_FRIDGE 0x1F54
#define FTR_SNOWMAN_TABLE 0x1F58
#define FTR_SNOWMAN_BED 0x1F5C
#define FTR_SNOWMAN_CHAIR 0x1F60
#define FTR_SNOWMAN_LAMP 0x1F64
#define FTR_SNOWMAN_SOFA 0x1F68
#define FTR_SNOWMAN_TV 0x1F6C
#define FTR_SNOWMAN_DRESSER 0x1F70
#define FTR_SNOWMAN_WARDROBE 0x1F74
#define FTR_SNOWMAN_CLOCK 0x1F78
#define FTR_DINO_DISP_TRICERA 0x1F7C
#define FTR_DINO_DISP_TREX 0x1F80
#define FTR_DINO_DISP_BRONTO 0x1F84
+1 -1
View File
@@ -26,7 +26,7 @@ typedef struct snowman_save_data_s {
/* sizeof(mSN_snowman_info_c) == 0xC */
typedef struct snowman_info_s{
/* 0x00 */ int scale;
/* 0x00 */ mSN_snowman_data_c data;
/* 0x04 */ xyz_t pos;
} mSN_snowman_info_c;