mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-08 12:16:19 -04:00
Implement & partial match m_actor.c
This commit is contained in:
@@ -325,7 +325,8 @@ COMMON_DEFINES = [
|
||||
"-d _LANGUAGE_C",
|
||||
"-d F3DEX_GBI_2",
|
||||
"-d NDEBUG",
|
||||
"-d DEBUG=0"
|
||||
"-d DEBUG=0",
|
||||
"-d MUST_MATCH"
|
||||
]
|
||||
DOL_DEFINES = COMMON_DEFINES + []
|
||||
REL_DEFINES = COMMON_DEFINES + [
|
||||
|
||||
@@ -12,6 +12,11 @@ m_all_grow.c:
|
||||
.rodata: [0x806412C0, 0x806412E8]
|
||||
.data: [0x8064D598, 0x8064D600]
|
||||
.bss: [0x8125A7C8, 0x8125A7E8]
|
||||
m_actor.c:
|
||||
.text: [0x803742B8, 0x8037619C]
|
||||
.rodata: [0x806412E8, 0x80641328]
|
||||
.data: [0x8064D600, 0x8064D628]
|
||||
.bss: [0x8125A7E8, 0x8125A828]
|
||||
m_actor_dlftbls.c:
|
||||
.text: [0x8037619C, 0x803761BC]
|
||||
.data: [0x8064D628, 0x8064F4E8]
|
||||
|
||||
+26
-1
@@ -4,6 +4,8 @@
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "m_play.h"
|
||||
#include "ac_npc_h.h"
|
||||
#include "m_actor_dlftbls.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -11,11 +13,34 @@ extern "C" {
|
||||
|
||||
typedef struct ac_npc_clip_s aNPC_Clip_c;
|
||||
|
||||
typedef struct npc_draw_data_s {
|
||||
s16 model_bank;
|
||||
s16 texture_bank;
|
||||
u8 _04[0x68]; // TODO
|
||||
} aNPC_draw_data_c;
|
||||
|
||||
typedef int (*aNPC_SETUP_ACTOR_PROC)(GAME_PLAY*, mActor_name_t, s8, int, s16, int, int, int, int);
|
||||
typedef void (*aNPC_DMA_DRAW_DATA_PROC)(aNPC_draw_data_c*, mActor_name_t);
|
||||
typedef void (*aNPC_FREE_OVERLAY_AREA_PROC)(ACTOR_DLFTBL*);
|
||||
typedef ACTOR* (*aNPC_GET_ACTOR_AREA_PROC)(size_t, const char*, int);
|
||||
typedef void (*aNPC_FREE_ACTOR_AREA_PROC)(ACTOR*);
|
||||
|
||||
struct ac_npc_clip_s {
|
||||
aNPC_SETUP_ACTOR_PROC setupActor_proc;
|
||||
void* _004[(0x12C - 0x004) / sizeof(void*)];
|
||||
void* _004;
|
||||
aNPC_FREE_OVERLAY_AREA_PROC free_overlay_area_proc;
|
||||
aNPC_GET_ACTOR_AREA_PROC get_actor_area_proc;
|
||||
aNPC_FREE_ACTOR_AREA_PROC free_actor_area_proc;
|
||||
aNPC_DMA_DRAW_DATA_PROC dma_draw_data_proc;
|
||||
void* _018[(0x12C - 0x018) / sizeof(void*)];
|
||||
};
|
||||
|
||||
struct npc_actor_s {
|
||||
ACTOR actor_class;
|
||||
// TODO: finish
|
||||
u8 _174[0x718 - 0x174];
|
||||
int texture_bank_idx; // TEMP: this is part of draw struct
|
||||
u8 _71C[0x9D8 - 0x71C];
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Npc_Profile;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef AC_NPC_H_H
|
||||
#define AC_NPC_H_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct npc_actor_s NPC_ACTOR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -223,7 +223,6 @@ typedef struct actor_overlay_info_s {
|
||||
int used;
|
||||
} aSTR_Overlay_info_c;
|
||||
|
||||
// TODO: finish clip
|
||||
typedef struct actor_structure_clip_s {
|
||||
aSTR_SETUP_ACTOR_PROC setup_actor_proc;
|
||||
aSTR_GET_OVERLAY_AREA_PROC get_overlay_area_proc;
|
||||
|
||||
+19
-9
@@ -17,10 +17,16 @@ extern "C" {
|
||||
typedef void (*mActor_proc)(ACTOR*, GAME*);
|
||||
#define NONE_ACTOR_PROC ((mActor_proc)&none_proc1)
|
||||
|
||||
#define mAc_MAX_ACTORS 200
|
||||
|
||||
#define ACTOR_STATE_NONE 0
|
||||
#define ACTOR_STATE_NO_MOVE_WHILE_CULLED (1 << 4)
|
||||
#define ACTOR_STATE_NO_DRAW_WHILE_CULLED (1 << 5)
|
||||
#define ACTOR_STATE_11 (1 << 11)
|
||||
#define ACTOR_STATE_NO_CULL (1 << 6)
|
||||
#define ACTOR_STATE_INVISIBLE (1 << 7)
|
||||
#define ACTOR_STATE_TA_SET (1 << 11)
|
||||
#define ACTOR_STATE_LIGHTING (1 << 22) // does lighting NOT affect this actor?
|
||||
#define ACTOR_STATE_24 (1 << 24)
|
||||
#define ACTOR_STATE_CAN_MOVE_IN_DEMO_SCENES (1 << 29)
|
||||
|
||||
#define ACTOR_OBJ_BANK_NONE 0
|
||||
@@ -34,8 +40,8 @@ enum actor_part {
|
||||
ACTOR_PART_FG,
|
||||
ACTOR_PART_ITEM,
|
||||
ACTOR_PART_PLAYER,
|
||||
ACTOR_PART_3, /* Thought this was for NPCs but maybe not? */
|
||||
ACTOR_PART_NPC,
|
||||
ACTOR_PART_4, /* TODO: figure this one out */
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_PART_EFFECT,
|
||||
ACTOR_PART_CONTROL,
|
||||
@@ -340,16 +346,13 @@ struct actor_s {
|
||||
/* 0x008 */ s8 block_x;
|
||||
/* 0x009 */ s8 block_z;
|
||||
/* 0x00A */ s16 move_actor_list_idx; /* used in aBC_setupCommonMvActor */
|
||||
/* 0x00C */ xyz_t home_position; /* actor 'home' pos */
|
||||
/* 0x018 */ s_xyz home_rotation; /* actor 'home' rotation */
|
||||
/* 0x00C */ PositionAngle home; /* Home position & rotation */
|
||||
/* 0x020 */ u32 state_bitfield; /* bitfield of current actor state */
|
||||
/* 0x024 */ s16 actor_specific; /* actor specific temp data */
|
||||
/* 0x026 */ s16 data_bank_id; /* data bank id actor is in */
|
||||
/* 0x028 */ xyz_t world_position;
|
||||
/* 0x034 */ s_xyz world_rotation;
|
||||
/* 0x028 */ PositionAngle world; /* World position & rotation */
|
||||
/* 0x03C */ xyz_t last_world_position; /* previous actor world position */
|
||||
/* 0x048 */ xyz_t eye_position; /* actor "eyes" (head/lookat) world position */
|
||||
/* 0x054 */ s_xyz eye_rotation; /* actor "eyes" (head/lookat) world rotation */
|
||||
/* 0x048 */ PositionAngle eye; /* actor "eyes" (head/lookat) world position & rotation */
|
||||
/* 0x05C */ xyz_t scale; /* actor size */
|
||||
/* 0x068 */ xyz_t position_speed; /* actor movement velocity (see Actor_position_speed_set) */
|
||||
/* 0x074 */ f32 speed; /* movement speed */
|
||||
@@ -398,10 +401,17 @@ typedef struct actor_info_s {
|
||||
Actor_list list[ACTOR_PART_NUM];
|
||||
} Actor_info;
|
||||
|
||||
typedef struct actor_data_s {
|
||||
s16 profile;
|
||||
s_xyz position;
|
||||
s_xyz rotation;
|
||||
s16 arg;
|
||||
} Actor_data;
|
||||
|
||||
extern void Actor_delete(ACTOR* actor);
|
||||
extern ACTOR* Actor_info_fgName_search(Actor_info* actor_info, mActor_name_t fg_name, int part);
|
||||
extern void Actor_world_to_eye(ACTOR* actor, f32 eye_height);
|
||||
extern void Shape_Info_init(ACTOR* actor, f32 y_ofs, mActor_shadow_proc shadow_proc, f32 shadow_sizeX, f32 shadow_sizeZ);
|
||||
extern void Shape_Info_init(ACTOR* actor, f32 ofs_y, mActor_shadow_proc shadow_proc, f32 shadow_size_x, f32 shadow_size_z);
|
||||
extern void Actor_position_moveF(ACTOR* actor);
|
||||
extern ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 profile, f32 x, f32 y, f32 z, short rot_x, short rot_y, short rot_z, s8 block_x, s8 block_z, s16 mvactor_list_no, mActor_name_t actor_name, s16 arg, s8 npc_idx, int data_bank);
|
||||
extern void Setpos_HiliteReflect_init(xyz_t* wpos, GAME_PLAY* play);
|
||||
|
||||
@@ -8,6 +8,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mBI_ct();
|
||||
extern void mBI_move(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ extern void ClObjPipe_set5(GAME_PLAY* play, ClObjPipe_c* pipe, ACTOR* owner, ClO
|
||||
extern void CollisionCheck_Uty_ActorWorldPosSetPipeC(ACTOR* actor, ClObjPipe_c* col_pipe);
|
||||
extern int CollisionCheck_setOC(GAME_PLAY* play, CollisionCheck_c* collision_check, ClObj_c* col_obj);
|
||||
extern void CollisionCheck_Status_set3(Status_c* status, StatusData_c* data);
|
||||
extern void CollisionCheck_Status_ct(Status_c* status);
|
||||
extern void CollisionCheck_Status_Clear(Status_c* status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -155,7 +155,9 @@ typedef struct common_data_s {
|
||||
/* 0x02614D */ u8 transFadeDuration;
|
||||
/* 0x02614E */ u8 transWipeSpeed;
|
||||
/* 0x02614F */ u8 wipeType; /* maybe unused? */
|
||||
/* 0x02614F */ u8 _26150[0x26164 - 0x26150];
|
||||
/* 0x026150 */ s16 bg_item_type;
|
||||
/* 0x026152 */ s16 bg_item_profile;
|
||||
/* 0x026154 */ u8 _26154[0x26164 - 0x26154];
|
||||
/* 0x026164 */ mNpc_NpcList_c npclist[ANIMAL_NUM_MAX];
|
||||
/* 0x0264AC */ mNpc_NpcList_c unk_264AC; // fits exact size of npc list struct, seems unused
|
||||
/* 0x0264E4 */ mNpc_NpcList_c island_npclist[1]; // TODO: define for island npc count
|
||||
@@ -177,7 +179,7 @@ typedef struct common_data_s {
|
||||
/* 0x028530 */ Door_data_c door_data; /* misc door data */
|
||||
/* 0x028544 */ Door_data_c structure_exit_door_data; /* door data for when exiting a building */
|
||||
/* 0x028558 */ u8 tmp1[0x028592 - 0x028558];
|
||||
/* 0x028592 */ mActor_name_t demo_profiles[2];
|
||||
/* 0x028592 */ s16 demo_profiles[mDemo_CLIP_TYPE_NUM - 1];
|
||||
/* 0x028596 */ u8 _28596[0x285C0 - 0x28596];
|
||||
/* 0x0285C0 */ s8 player_decoy_flag;
|
||||
/* 0x0285C1 */ u8 _285C1[0x028838 - 0x0285C1];
|
||||
|
||||
@@ -148,6 +148,9 @@ extern mActor_name_t mFI_GetOtherFruit();
|
||||
extern int mFI_Wpos2UtNum_inBlock(int* ut_x, int* ut_z, xyz_t wpos);
|
||||
extern int mFI_GetItemNumInBlock(mActor_name_t item_no, mActor_name_t* block_items);
|
||||
extern int mFI_BkNum2WposXZ(f32* wpos_x, f32* wpos_z, int block_x, int block_z);
|
||||
extern void mFI_SetBearActor(GAME_PLAY* play, xyz_t wpos, int update_before_block_table);
|
||||
extern void mFI_FieldMove(xyz_t player_wpos);
|
||||
extern int mFI_search_unit_around(xyz_t* wpos, mActor_name_t item);
|
||||
|
||||
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
|
||||
extern void mFI_PrintFgAttr(gfxprint_t* gfxprint);
|
||||
|
||||
+15
-5
@@ -2,6 +2,7 @@
|
||||
#define M_KANKYO_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_lights.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -26,11 +27,20 @@ enum weather_intensity {
|
||||
mEnv_WEATHER_INTENSITY_NUM,
|
||||
};
|
||||
|
||||
typedef struct kankyo_s{
|
||||
/*0x00 */ u8 pad[0x9A];
|
||||
/*0x9A */ u8 ambientColor[3];
|
||||
/*0x9E */ u8 pad2[0x32];
|
||||
}Kankyo;
|
||||
typedef void (*NATURE_PROC)(ACTOR*);
|
||||
|
||||
typedef struct nature_s {
|
||||
NATURE_PROC proc;
|
||||
void* arg;
|
||||
} Nature;
|
||||
|
||||
typedef struct kankyo_s {
|
||||
/* 0x00 */ Lights sun_light;
|
||||
/* 0x0E */ u8 pad[0x9A - 0x0E];
|
||||
/* 0x9A */ u8 ambientColor[3];
|
||||
/* 0x9E */ u8 pad2[0xC8 - 0x9E];
|
||||
/* 0xC8 */ Nature nature;
|
||||
} Kankyo;
|
||||
|
||||
extern int mEnv_NowWeather();
|
||||
|
||||
|
||||
@@ -46,6 +46,11 @@ typedef struct rgba_t { //can be put in other place
|
||||
u8 r, g, b, a;
|
||||
} rgba_t;
|
||||
|
||||
typedef struct {
|
||||
xyz_t position;
|
||||
s_xyz angle;
|
||||
} PositionAngle;
|
||||
|
||||
extern void mem_copy(u8* dst, u8* src, size_t size);
|
||||
extern void mem_clear(u8* dst, size_t size, u8 val);
|
||||
extern int mem_cmp(u8* p1, u8* p2, size_t size);
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ extern void LightsN_disp_BG(LightsN* lights, GRAPH* graph);
|
||||
extern void LightsN_disp(LightsN* lights, GRAPH* graph);
|
||||
extern void LightsN_list_check(LightsN* lights, LightNode* node, xyz_t* pos);
|
||||
extern void Global_light_ct(Global_light* glight);
|
||||
extern void Global_light_read(Global_light* glight, GRAPH* graph);
|
||||
extern LightsN* Global_light_read(Global_light* glight, GRAPH* graph);
|
||||
extern void Global_light_list_new(GAME_PLAY*, Global_light* glight, Lights* light);
|
||||
extern void Global_light_list_delete(Global_light* glight, LightNode* light);
|
||||
extern void Light_list_point_draw(GAME_PLAY* play);
|
||||
|
||||
@@ -207,6 +207,7 @@ extern u8 mNpc_GetPaperType();
|
||||
extern void mMl_set_mail_name_npcinfo(Mail_nm_c* mail_name, AnmPersonalID_c* anm_pid);
|
||||
extern int mNpc_ReceiveHPMail(Mail_c* hp_mail);
|
||||
extern void mNpc_SendMailtoNpc(Mail_c* mail);
|
||||
extern void mNpc_SetNpcinfo(ACTOR* actor, s8 npc_info_idx);
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
+18
-5
@@ -20,11 +20,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int (*DRAW_CHK_PROC)(ACTOR*, GAME_PLAY*);
|
||||
|
||||
/* sizeof(struct game_play_s) == 0x2600 */
|
||||
struct game_play_s {
|
||||
/* 0x0000 */ GAME game;
|
||||
// TODO: finish
|
||||
/* 0x00E0 */ int _00E0;
|
||||
/* 0x00E0 */ s16 scene_id;
|
||||
/* 0x00E4 */ mFI_block_tbl_c block_table;
|
||||
/* 0x00F4 */ mFI_block_tbl_c last_block_table;
|
||||
/* 0x0104 */ u8 _0104[0x0110 - 0x0104];
|
||||
@@ -38,10 +40,20 @@ struct game_play_s {
|
||||
/* 0x1DEC */ Submenu submenu;
|
||||
/* 0x1FA4 */ u8 _1FA4[0x2008 - 0x1FA4];
|
||||
/* 0x2008 */ int next_scene_no;
|
||||
/* 0x200C */ MtxF matrix;
|
||||
/* 0x204C */ u8 _204C[0x2090 - 0x204C];
|
||||
/* 0x200C */ MtxF projection_matrix;
|
||||
/* 0x204C */ MtxF mtx_204C;
|
||||
/* 0x208C */ int _208C;
|
||||
/* 0x2090 */ u32 game_frame;
|
||||
/* 0x2094 */ u8 _2094[0x20D0 - 0x2094];
|
||||
/* 0x2094 */ u8 _2094;
|
||||
/* 0x2095 */ u8 actor_data_num;
|
||||
/* 0x2096 */ u8 ctrl_actor_data_num;
|
||||
/* 0x2097 */ u8 obj_bank_data_num;
|
||||
/* 0x2098 */ Actor_data* player_data;
|
||||
/* 0x209C */ Actor_data* actor_data;
|
||||
/* 0x20A0 */ s16* ctrl_actor_data;
|
||||
/* 0x20A4 */ s16* obj_bank_data;
|
||||
/* 0x20A8 */ int _20A8;
|
||||
/* 0x20AC */ u8 _20AC[0x20D0 - 0x20AC];
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
@@ -49,7 +61,8 @@ struct game_play_s {
|
||||
/* 0x20D8 */ fbdemo_wipe fbdemo_wipe;
|
||||
/* 0x2318 */ fbdemo_fade color_fade;
|
||||
/* 0x2328 */ CollisionCheck_c collision_check;
|
||||
/* 0x23F8 */ u8 _23F8[0x2600 - 0x23F8];
|
||||
/* 0x23F8 */ DRAW_CHK_PROC draw_chk_proc; // only used by mikanbox actor
|
||||
/* 0x23FC */ u8 _23FC[0x2600 - 0x23FC];
|
||||
};
|
||||
|
||||
|
||||
|
||||
+10
-2
@@ -26,14 +26,22 @@ typedef struct object_bank_s {
|
||||
s16 bank_id;
|
||||
char* ram_start;
|
||||
// TODO: others
|
||||
u8 _08[0x5C - 8];
|
||||
u8 _08[0x58 - 0x08];
|
||||
s16 num_exist;
|
||||
u8 _0x5A[0x5C - 0x5A];
|
||||
} Object_Bank_c;
|
||||
|
||||
typedef struct object_exchange_s {
|
||||
Object_Bank_c banks[mSc_OBJECT_BANK_NUM];
|
||||
u8 _1928[0x1958-0x1928];
|
||||
int _1928;
|
||||
int _192C;
|
||||
int exchange_id;
|
||||
u8 _1934[0x1958-0x1934];
|
||||
} Object_Exchange_c;
|
||||
|
||||
extern int mSc_bank_regist_check(Object_Exchange_c* exchange, s16 bank_id);
|
||||
extern void mSc_regist_initial_exchange_bank(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
#define SKIN_MATRIX_H
|
||||
|
||||
#include "libultra/ultratypes.h"
|
||||
#include "libu64/u64types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
void Skin_Matrix_PrjMulVector(MtxF*, Vec3f*, Vec3f*, f32*);
|
||||
void Skin_Matrix_PrjMulVector(MtxF*, xyz_t*, xyz_t*, f32*);
|
||||
void Skin_Matrix_MulMatrix(MtxF*, MtxF*, MtxF*);
|
||||
void Skin_Matrix_SetScale(MtxF* , f32 , f32, f32);
|
||||
void Skin_Matrix_SetTranslate(MtxF*, f32, f32, f32);
|
||||
|
||||
+12
-12
@@ -43,7 +43,7 @@ static void Airplane_Actor_ct(ACTOR* actor, GAME* game) {
|
||||
airplane->y_speed = 0.0f;
|
||||
airplane->actor_class.speed = airplane->speed;
|
||||
|
||||
airplane->rotY = RAD2DEG(SHORTANGLE2RAD((f32)actor->world_rotation.y));
|
||||
airplane->rotY = RAD2DEG(SHORTANGLE2RAD((f32)actor->world.angle.y));
|
||||
airplane->rotY_goal = airplane->rotY;
|
||||
airplane->rotY_min = airplane->rotY;
|
||||
airplane->rotZ = 0.0f;
|
||||
@@ -54,7 +54,7 @@ static void Airplane_Actor_ct(ACTOR* actor, GAME* game) {
|
||||
airplane->wind_change_frame = 0;
|
||||
airplane->wind = NULL;
|
||||
|
||||
actor->world_position.y = mCoBG_GetBgY_AngleS_FromWpos(NULL, actor->world_position, -5.5f);
|
||||
actor->world.position.y = mCoBG_GetBgY_AngleS_FromWpos(NULL, actor->world.position, -5.5f);
|
||||
}
|
||||
|
||||
static void Airplane_Actor_dt(ACTOR* actor, GAME* game) { }
|
||||
@@ -105,7 +105,7 @@ static void aAp_GroundFriction(ACTOR* actor, GAME* game) {
|
||||
if (airplane->ground_timer >= 5) {
|
||||
airplane->ground_timer = 0;
|
||||
|
||||
(*Common_Get(clip.effect_clip)->effect_make_proc)(eEC_EFFECT_DUST, actor->world_position, 1, actor->world_rotation.y, game, actor->npc_id, 0, 8);
|
||||
(*Common_Get(clip.effect_clip)->effect_make_proc)(eEC_EFFECT_DUST, actor->world.position, 1, actor->world.angle.y, game, actor->npc_id, 0, 8);
|
||||
}
|
||||
|
||||
airplane->ground_timer++;
|
||||
@@ -196,9 +196,9 @@ static void aAp_StartFlyMove(ACTOR* actor, GAME* game) {
|
||||
|
||||
goal_angle_random_tbl = adjusted_y > 50 ? goal_angle_random2 : goal_angle_random;
|
||||
|
||||
actor->world_position.y = player->actor_class.world_position.y + 25.0f;
|
||||
actor->world_position.x = player->actor_class.world_position.x;
|
||||
actor->world_position.z = player->actor_class.world_position.z;
|
||||
actor->world.position.y = player->actor_class.world.position.y + 25.0f;
|
||||
actor->world.position.x = player->actor_class.world.position.x;
|
||||
actor->world.position.z = player->actor_class.world.position.z;
|
||||
|
||||
airplane->rotY = RAD2DEG(SHORTANGLE2RAD(player->actor_class.shape_info.rotation.y));
|
||||
airplane->rotY_goal = airplane->rotY + (RAD2DEG(SHORTANGLE2RAD(goal_angle_random_tbl[goal])));
|
||||
@@ -226,10 +226,10 @@ static void aAp_FallFlyMove(ACTOR* actor, GAME* game) {
|
||||
aAp_RubberMove(&airplane->rotX, 60.0f, 0.04f);
|
||||
aAp_RubberMove(&airplane->speed, 5.0f, 0.02f);
|
||||
|
||||
actor->world_position.y -= 0.15f;
|
||||
actor->world.position.y -= 0.15f;
|
||||
|
||||
if (actor->bg_collision_check.result.on_ground) {
|
||||
Common_Get(clip.effect_clip)->effect_make_proc(eEC_EFFECT_DUST, actor->world_position, 1, actor->world_rotation.y, game, actor->npc_id, 0, 8);
|
||||
Common_Get(clip.effect_clip)->effect_make_proc(eEC_EFFECT_DUST, actor->world.position, 1, actor->world.angle.y, game, actor->npc_id, 0, 8);
|
||||
airplane->status = aAp_STATUS_STOP_FLY_MOVE;
|
||||
}
|
||||
}
|
||||
@@ -239,10 +239,10 @@ static void aAp_FallFlyMove2(ACTOR* actor, GAME* game) {
|
||||
aAp_RubberMove(&airplane->rotX, 70.0f, 0.15f);
|
||||
aAp_RubberMove(&airplane->speed, 10.0f, 0.02f);
|
||||
|
||||
actor->world_position.y -= 0.15f;
|
||||
actor->world.position.y -= 0.15f;
|
||||
|
||||
if (actor->bg_collision_check.result.on_ground) {
|
||||
Common_Get(clip.effect_clip)->effect_make_proc(eEC_EFFECT_DUST, actor->world_position, 1, actor->world_rotation.y, game, actor->npc_id, 0, 8);
|
||||
Common_Get(clip.effect_clip)->effect_make_proc(eEC_EFFECT_DUST, actor->world.position, 1, actor->world.angle.y, game, actor->npc_id, 0, 8);
|
||||
airplane->status = aAp_STATUS_STOP_FLY_MOVE;
|
||||
}
|
||||
}
|
||||
@@ -302,8 +302,8 @@ static void aAp_CommonHandle(ACTOR* actor, AIRPLANE_ACTOR* airplane, GAME* game)
|
||||
actor->speed = airplane->speed * cosf_table(DEG2RAD(airplane->rotX));
|
||||
airplane->y_speed = airplane->speed * sinf_table(DEG2RAD(airplane->rotX));
|
||||
|
||||
actor->world_position.y -= airplane->y_speed;
|
||||
actor->world_rotation.y = RAD2SHORTANGLE(DEG2RAD(airplane->rotY));
|
||||
actor->world.position.y -= airplane->y_speed;
|
||||
actor->world.angle.y = RAD2SHORTANGLE(DEG2RAD(airplane->rotY));
|
||||
actor->shape_info.rotation.y = RAD2SHORTANGLE(DEG2RAD(airplane->rotY));
|
||||
|
||||
Actor_position_moveF(actor);
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ static void aDOU_actor_draw(ACTOR*, GAME*);
|
||||
ACTOR_PROFILE Douzou_Profile = {
|
||||
mAc_PROFILE_DOUZOU,
|
||||
ACTOR_PART_ITEM,
|
||||
ACTOR_STATE_11,
|
||||
ACTOR_STATE_TA_SET,
|
||||
DOUZOU,
|
||||
ACTOR_OBJ_BANK_3,
|
||||
sizeof(STRUCTURE_ACTOR),
|
||||
@@ -172,11 +172,11 @@ static void aDOU_actor_ct(ACTOR* actor, GAME* game) {
|
||||
cKF_SkeletonInfo_R_ct(&douzou->keyframe, skl[douzou->season == mTM_SEASON_WINTER], NULL, douzou->work_area, douzou->morph_area);
|
||||
aDOU_set_bgOffset(actor, 1);
|
||||
|
||||
wpos.x = actor->world_position.x + xpostbl[0];
|
||||
wpos.y = actor->world_position.y;
|
||||
wpos.z = actor->world_position.z + zpostbl[0];
|
||||
wpos.x = actor->world.position.x + xpostbl[0];
|
||||
wpos.y = actor->world.position.y;
|
||||
wpos.z = actor->world.position.z + zpostbl[0];
|
||||
|
||||
actor->world_position.y = mCoBG_GetBgY_OnlyCenter_FromWpos2(wpos, 0.0f);
|
||||
actor->world.position.y = mCoBG_GetBgY_OnlyCenter_FromWpos2(wpos, 0.0f);
|
||||
actor->cull_width = 850.0f;
|
||||
actor->cull_radius = 850.0f;
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ static void aDOU_actor_draw(ACTOR* actor, GAME* game) {
|
||||
{
|
||||
xyz_t wpos;
|
||||
|
||||
xyz_t_move(&wpos, &actor->world_position);
|
||||
xyz_t_move(&wpos, &actor->world.position);
|
||||
wpos.x += xpostbl[i];
|
||||
wpos.z += zpostbl[i];
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ static void aDOU_keep_item(ACTOR* actor) {
|
||||
|
||||
for (i = 0; i < mHS_HOUSE_NUM; i++) {
|
||||
if (aDOU_set_check(i)) {
|
||||
xyz_t_move(&wpos, &actor->world_position);
|
||||
xyz_t_move(&wpos, &actor->world.position);
|
||||
wpos.x += xpostbl[i];
|
||||
wpos.z += zpostbl[i];
|
||||
KeepItem(wpos);
|
||||
@@ -98,7 +98,7 @@ static int aDOU_setEffect_sub(ACTOR* actor, GAME* game, int house_no, int color)
|
||||
Matrix_push();
|
||||
|
||||
/* Initialize base position */
|
||||
xyz_t_move(&wpos, &actor->world_position);
|
||||
xyz_t_move(&wpos, &actor->world.position);
|
||||
wpos.x += xpostbl[house_no];
|
||||
wpos.z += zpostbl[house_no];
|
||||
Matrix_translate(wpos.x, wpos.y, wpos.z, 0);
|
||||
@@ -163,7 +163,7 @@ static void aDOU_set_bgOffset(ACTOR* actor, int height) {
|
||||
int i;
|
||||
for (i = 0; i < mHS_HOUSE_NUM; i++) {
|
||||
if (aDOU_set_check(i)) {
|
||||
xyz_t_move(&wpos, &actor->home_position);
|
||||
xyz_t_move(&wpos, &actor->home.position);
|
||||
wpos.x += xpostbl[i];
|
||||
wpos.z += zpostbl[i];
|
||||
|
||||
@@ -212,11 +212,11 @@ static void aDOU_wait(ACTOR* actor, GAME* game) {
|
||||
if (mDemo_Check(mDemo_TYPE_SPEAK, actor) == TRUE) {
|
||||
i = douzou->arg2;
|
||||
|
||||
xyz_t_move(&wpos, &actor->world_position);
|
||||
xyz_t_move(&wpos, &actor->world.position);
|
||||
wpos.x += xpostbl[i];
|
||||
wpos.z += zpostbl[i];
|
||||
|
||||
target = search_position_angleY(&player->actor_class.world_position, &wpos);
|
||||
target = search_position_angleY(&player->actor_class.world.position, &wpos);
|
||||
now_angle = player->actor_class.shape_info.rotation.y;
|
||||
add_calc_short_angle2(&now_angle, target, 0.3f, 0x1000, 0);
|
||||
target_rot.x = player->actor_class.shape_info.rotation.x;
|
||||
@@ -232,15 +232,15 @@ static void aDOU_wait(ACTOR* actor, GAME* game) {
|
||||
f32 dist_xz;
|
||||
s16 angle_y;
|
||||
|
||||
xyz_t_move(&t_wpos, &actor->world_position);
|
||||
xyz_t_move(&t_wpos, &actor->world.position);
|
||||
|
||||
for (i = 0; i < mHS_HOUSE_NUM; i++) {
|
||||
if (aDOU_set_check(i)) {
|
||||
wpos.x = t_wpos.x + xpostbl[i];
|
||||
wpos.z = t_wpos.z + zpostbl[i];
|
||||
|
||||
dist_xz = search_position_distanceXZ(&player->actor_class.world_position, &wpos);
|
||||
now_angle = search_position_angleY(&wpos, &player->actor_class.world_position);
|
||||
dist_xz = search_position_distanceXZ(&player->actor_class.world.position, &wpos);
|
||||
now_angle = search_position_angleY(&wpos, &player->actor_class.world.position);
|
||||
|
||||
|
||||
if (dist_xz > 50.0f) {
|
||||
@@ -291,7 +291,7 @@ static void aDOU_actor_move(ACTOR* actor, GAME* game) {
|
||||
}
|
||||
|
||||
static void aDOU_actor_init(ACTOR* actor, GAME* game) {
|
||||
mFI_SetFG_common(DUMMY_DOUZOU, actor->home_position, FALSE);
|
||||
mFI_SetFG_common(DUMMY_DOUZOU, actor->home.position, FALSE);
|
||||
aDOU_actor_move(actor, game);
|
||||
actor->mv_proc = &aDOU_actor_move;
|
||||
}
|
||||
|
||||
+5
-5
@@ -723,7 +723,7 @@ static void aHNW_pl_approach_door(ACTOR* actor, GAME* game) {
|
||||
|
||||
if (player != NULL) {
|
||||
int house_idx = haniwa->house_idx;
|
||||
int stage = ((chk_posX[house_idx] - player->actor_class.world_position.x) * chk_val[house_idx]) <= 0.0f;
|
||||
int stage = ((chk_posX[house_idx] - player->actor_class.world.position.x) * chk_val[house_idx]) <= 0.0f;
|
||||
xyz_t* goal = goal_pos[house_idx] + stage;
|
||||
|
||||
if (haniwa->player_approach_door_stage != stage && mPlib_request_main_demo_walk_type1(game, goal->x, goal->z, 3.0f, FALSE)) {
|
||||
@@ -736,11 +736,11 @@ static void aHNW_pl_approach_door(ACTOR* actor, GAME* game) {
|
||||
MY_HOUSE_ACTOR* house_actor = (MY_HOUSE_ACTOR*)Actor_info_fgName_search(&play->actor_info, HOUSE0 + haniwa->house_idx, ACTOR_PART_ITEM);
|
||||
|
||||
if (house_actor != NULL) {
|
||||
house_actor->actor_class.world_rotation.z = 1;
|
||||
house_actor->actor_class.world.angle.z = 1;
|
||||
aHNW_setupAction(actor, game, aHNW_ACTION_WAIT);
|
||||
}
|
||||
}
|
||||
else if (stage == 1 && search_position_distanceXZ(goal, &player->actor_class.world_position) < 3.0f) {
|
||||
else if (stage == 1 && search_position_distanceXZ(goal, &player->actor_class.world.position) < 3.0f) {
|
||||
aHNW_setupAction(actor, game, aHNW_ACTION_DOOR_OPEN_WAIT);
|
||||
}
|
||||
}
|
||||
@@ -776,7 +776,7 @@ static void aHNW_door_open_timer(ACTOR* actor, GAME* game) {
|
||||
else {
|
||||
haniwa->door_approach_frame++;
|
||||
if (haniwa->door_approach_frame > 80) {
|
||||
house_actor->actor_class.world_rotation.z = 1;
|
||||
house_actor->actor_class.world.angle.z = 1;
|
||||
aHNW_setupAction(actor, game, aHNW_ACTION_WAIT);
|
||||
}
|
||||
}
|
||||
@@ -960,7 +960,7 @@ static void aHNW_actor_init(ACTOR* actor, GAME* game) {
|
||||
HANIWA_ACTOR* haniwa = (HANIWA_ACTOR*)actor;
|
||||
int house_idx = haniwa->house_idx;
|
||||
|
||||
mFI_SetFG_common((mActor_name_t)(house_idx + DUMMY_HANIWA0), actor->world_position, FALSE);
|
||||
mFI_SetFG_common((mActor_name_t)(house_idx + DUMMY_HANIWA0), actor->world.position, FALSE);
|
||||
actor->mv_proc = &aHNW_actor_move;
|
||||
actor->dw_proc = &aHNW_actor_draw;
|
||||
aHNW_setupAction((ACTOR*)haniwa, game, aHNW_ACTION_WAIT); // weird that we have to re-cast to ACTOR so fequently for matches
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ static void Ac_Sample_Actor_main_talk(SAMPLE_ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
if (mDemo_Check(mDemo_TYPE_TALK, (ACTOR*)actor)) {
|
||||
s16 angle = add_calc_short_angle2(&actor->actor_class.shape_info.rotation.y, actor->actor_class.player_angle_y, 1.0f, 5000, 100);
|
||||
actor->actor_class.world_rotation.y = actor->actor_class.shape_info.rotation.y;
|
||||
actor->actor_class.world.angle.y = actor->actor_class.shape_info.rotation.y;
|
||||
|
||||
if (mDemo_Check_ListenAble() == FALSE && mDemo_Check_DiffAngle_forTalk(angle)) {
|
||||
mDemo_Set_ListenAble();
|
||||
|
||||
@@ -19,7 +19,7 @@ static int aSetMgr_get_player_block(int* bx, int* bz, GAME_PLAY* play) {
|
||||
PLAYER_ACTOR* player_actor = get_player_actor_withoutCheck(play);
|
||||
|
||||
if (player_actor != NULL) {
|
||||
res = mFI_Wpos2BlockNum(bx, bz, player_actor->actor_class.world_position);
|
||||
res = mFI_Wpos2BlockNum(bx, bz, player_actor->actor_class.world.position);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
+17
-17
@@ -39,7 +39,7 @@ static void aTR0_actor_ct(ACTOR* actor, GAME* GAME){
|
||||
1.0f, 25.0f, 1.0f, 0.5f, 0.0f, 1, NULL);
|
||||
cKF_SkeletonInfo_R_play(&train0->keyframe);
|
||||
train0->actor_class.cull_width = 600.0f;
|
||||
train0->actor_class.world_rotation.y = 16384;
|
||||
train0->actor_class.world.angle.y = 16384;
|
||||
train0->tr_action = 5;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ static void aTR0_actor_dt(ACTOR* actor, GAME* game){
|
||||
|
||||
xyz_t tr_home_pos;
|
||||
|
||||
tr_home_pos = train0->actor_class.home_position;
|
||||
tr_home_pos = train0->actor_class.home.position;
|
||||
|
||||
mFI_SetFG_common(0, tr_home_pos, 0);
|
||||
|
||||
@@ -73,13 +73,13 @@ static void aTR0_ctrl_engineer(ACTOR* actor, GAME* game){
|
||||
if(ac_p == NULL){
|
||||
|
||||
if((*Common_Get(clip.npc_clip)->setupActor_proc)(play, SP_NPC_ENGINEER, -1,-1,-1,-1,-1,0,0) == 1){
|
||||
train0->tr_actor_p = Actor_info_fgName_search(&play->actor_info, SP_NPC_ENGINEER, ACTOR_PART_4);
|
||||
train0->tr_actor_p = Actor_info_fgName_search(&play->actor_info, SP_NPC_ENGINEER, ACTOR_PART_NPC);
|
||||
}
|
||||
}
|
||||
else{
|
||||
ac_p->world_position.x = -40.0f + train0->actor_class.world_position.x;
|
||||
ac_p->world_position.y = 47.0f + train0->actor_class.world_position.y;
|
||||
ac_p->world_position.z = 20.0f + train0->actor_class.world_position.z;
|
||||
ac_p->world.position.x = -40.0f + train0->actor_class.world.position.x;
|
||||
ac_p->world.position.y = 47.0f + train0->actor_class.world.position.y;
|
||||
ac_p->world.position.z = 20.0f + train0->actor_class.world.position.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ static void aTR0_set_effect(ACTOR* actor, GAME* game){
|
||||
else{
|
||||
train0->effect_num = 12;
|
||||
}
|
||||
xyz_t_move(&pos, &train0->actor_class.world_position);
|
||||
xyz_t_move(&pos, &train0->actor_class.world.position);
|
||||
pos.x += 36.0f;
|
||||
pos.y += 110.0f;
|
||||
|
||||
@@ -119,9 +119,9 @@ static void aTR0_steam_work_sub(ACTOR* actor, GAME* game, int x_idx){
|
||||
static f32 setX[] = {15.0f, 22.0f};
|
||||
static s16 angl[] = {0xd000, 0x0400};
|
||||
|
||||
pos.x = train0->actor_class.world_position.x + setX[x_idx];
|
||||
pos.y = train0->actor_class.world_position.y + 21.0f;
|
||||
pos.z = train0->actor_class.world_position.z + 42.0f;
|
||||
pos.x = train0->actor_class.world.position.x + setX[x_idx];
|
||||
pos.y = train0->actor_class.world.position.y + 21.0f;
|
||||
pos.z = train0->actor_class.world.position.z + 42.0f;
|
||||
unk2c0 = train0->unk2c0;
|
||||
if(mEv_CheckTitleDemo() == 0){
|
||||
clip_pos = pos;
|
||||
@@ -169,7 +169,7 @@ static void aTR0_ctrl_back_car(ACTOR* actor){
|
||||
TRAIN0_ACTOR* train0 = (TRAIN0_ACTOR*)actor;
|
||||
|
||||
f32 tr_back_calc = train0->tr1_pos;
|
||||
f32 base_x_pos = -125.0f + train0->actor_class.world_position.x;
|
||||
f32 base_x_pos = -125.0f + train0->actor_class.world.position.x;
|
||||
tr_back_calc += 0.5f * train0->tr_speed;
|
||||
|
||||
if((tr_back_calc - base_x_pos) > 2.0f){
|
||||
@@ -208,8 +208,8 @@ static void aTR0_move(ACTOR* actor){
|
||||
train0->tr_action = Common_Get(train_action);
|
||||
}
|
||||
pos = Common_Get(train_position);
|
||||
train0->actor_class.world_position.x = pos.x;
|
||||
train0->actor_class.world_position.z = pos.z;
|
||||
train0->actor_class.world.position.x = pos.x;
|
||||
train0->actor_class.world.position.z = pos.z;
|
||||
train0->actor_class.speed = Common_Get(train_speed);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ static void aTR0_delcheck(ACTOR* actor,GAME* game){
|
||||
int abs_x;
|
||||
xyz_t pos;
|
||||
|
||||
pos = train0->actor_class.world_position;
|
||||
pos = train0->actor_class.world.position;
|
||||
|
||||
mFI_Wpos2BlockNum(&x,&z,pos);
|
||||
x -= play->block_table.block_x;
|
||||
@@ -251,7 +251,7 @@ static void aTR0_actor_move(ACTOR* actor, GAME* game){
|
||||
}
|
||||
|
||||
if(mEv_CheckTitleDemo() == 1){
|
||||
train0->tr1_pos = -125.0f + train0->actor_class.world_position.x;
|
||||
train0->tr1_pos = -125.0f + train0->actor_class.world.position.x;
|
||||
}
|
||||
else{
|
||||
aTR0_ctrl_back_car(actor);
|
||||
@@ -284,8 +284,8 @@ static void aTR0_actor_draw(ACTOR* actor, GAME* game){
|
||||
if (mtx != NULL){
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
Matrix_push();
|
||||
Matrix_translate(train0->tr1_pos, train0->actor_class.world_position.y,
|
||||
train0->actor_class.world_position.z, 0);
|
||||
Matrix_translate(train0->tr1_pos, train0->actor_class.world.position.y,
|
||||
train0->actor_class.world.position.z, 0);
|
||||
Matrix_scale(train0->actor_class.scale.x, train0->actor_class.scale.y,
|
||||
train0->actor_class.scale.z, 1);
|
||||
|
||||
|
||||
+13
-13
@@ -44,7 +44,7 @@ static void aTR1_actor_ct(ACTOR* actor, GAME* game){
|
||||
cKF_SkeletonInfo_R_ct(&train1->keyframe, &cKF_bs_r_obj_train1_3, NULL, train1->work, train1->morph);
|
||||
aTR1_setupAction((ACTOR*)train1, 5);
|
||||
train1->anim_state = cKF_SkeletonInfo_R_play(&train1->keyframe);
|
||||
actor->world_rotation.y = 0x4000;
|
||||
actor->world.angle.y = 0x4000;
|
||||
train1->tr_speed = 1.0f;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ static void aTR1_actor_dt(ACTOR* actor, GAME* game){
|
||||
|
||||
xyz_t tr_home_pos;
|
||||
|
||||
tr_home_pos = train1->actor_class.home_position;
|
||||
tr_home_pos = train1->actor_class.home.position;
|
||||
|
||||
mFI_SetFG_common(EMPTY_NO, tr_home_pos, FALSE);
|
||||
cKF_SkeletonInfo_R_dt(&train1->keyframe);
|
||||
@@ -63,7 +63,7 @@ static void aTR1_actor_dt(ACTOR* actor, GAME* game){
|
||||
static void aTR1_OngenTrgStart(ACTOR* actor, u16 id){
|
||||
TRAIN1_ACTOR* train1 = (TRAIN1_ACTOR*)actor;
|
||||
|
||||
sAdo_OngenTrgStart(id, &train1->actor_class.world_position);
|
||||
sAdo_OngenTrgStart(id, &train1->actor_class.world.position);
|
||||
}
|
||||
|
||||
static f32 calc_speed1(ACTOR* actor0, ACTOR* actor1) {
|
||||
@@ -96,22 +96,22 @@ static void aTR1_position_move(ACTOR* actor){
|
||||
f32 tr_back_calc;
|
||||
f32 base_x_pos;
|
||||
|
||||
tr_back_calc = train1->actor_class.world_position.x;
|
||||
tr_back_calc = train1->actor_class.world.position.x;
|
||||
base_x_pos = -125.0f + train0->tr1_pos;
|
||||
tr_back_calc += 0.5f * train1->actor_class.speed;
|
||||
|
||||
diff = tr_back_calc - base_x_pos;
|
||||
if((diff) <= 0.0f){
|
||||
train1->actor_class.speed = calc_speed1(actor->parent_actor, actor);
|
||||
train1->actor_class.world_position.x = base_x_pos;
|
||||
train1->actor_class.world.position.x = base_x_pos;
|
||||
}
|
||||
else if((diff) > 2.0f){
|
||||
train1->actor_class.speed = calc_speed2(actor->parent_actor);
|
||||
train1->actor_class.world_position.x = 2.0f + base_x_pos;
|
||||
train1->actor_class.world.position.x = 2.0f + base_x_pos;
|
||||
}
|
||||
else{
|
||||
chase_f(&train1->actor_class.speed, 0.0f, 0.0025f);
|
||||
train1->actor_class.world_position.x = tr_back_calc;
|
||||
train1->actor_class.world.position.x = tr_back_calc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,18 +140,18 @@ static void aTR1_passenger_ctrl(ACTOR* actor){
|
||||
s_xyz rot;
|
||||
|
||||
if(train1->player_pass_exists == 1){
|
||||
pos.x = train1->actor_class.world_position.x + 60.0f;
|
||||
pos.y = train1->actor_class.world_position.y + 20.0f;
|
||||
pos.z = train1->actor_class.world_position.z + 20.0f;
|
||||
pos.x = train1->actor_class.world.position.x + 60.0f;
|
||||
pos.y = train1->actor_class.world.position.y + 20.0f;
|
||||
pos.z = train1->actor_class.world.position.z + 20.0f;
|
||||
rot.x = ZeroSVec.x;
|
||||
rot.y = ZeroSVec.y;
|
||||
rot.z = ZeroSVec.z;
|
||||
get_player_actor_withoutCheck((GAME_PLAY*)gamePT)->Set_force_position_angle_proc(gamePT, &pos, &rot, mPlayer_FORCE_POSITION_ANGLE_POSX | mPlayer_FORCE_POSITION_ANGLE_POSY | mPlayer_FORCE_POSITION_ANGLE_POSZ | mPlayer_FORCE_POSITION_ANGLE_ROTY);
|
||||
}
|
||||
else if(train1->player_pass_leaving == 1){
|
||||
pos.x = train1->actor_class.world_position.x + 2.0f;
|
||||
pos.y = train1->actor_class.world_position.y + 16.0f;
|
||||
pos.z = train1->actor_class.world_position.z + 20.0f;
|
||||
pos.x = train1->actor_class.world.position.x + 2.0f;
|
||||
pos.y = train1->actor_class.world.position.y + 16.0f;
|
||||
pos.z = train1->actor_class.world.position.z + 20.0f;
|
||||
get_player_actor_withoutCheck((GAME_PLAY*)gamePT)->Set_force_position_angle_proc(gamePT, &pos, NULL, mPlayer_FORCE_POSITION_ANGLE_POSX | mPlayer_FORCE_POSITION_ANGLE_POSY | mPlayer_FORCE_POSITION_ANGLE_POSZ);
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ static void aTRD_set_door_SE(ACTOR* actor){
|
||||
for(i = 0; i < 2; i++){
|
||||
|
||||
if(cKF_FrameControl_passCheck_now(&traindoor->keyframe.frame_control,chk_pat[i]) != 0){
|
||||
sAdo_OngenTrgStart(se_no[i], &traindoor->actor_class.world_position);
|
||||
sAdo_OngenTrgStart(se_no[i], &traindoor->actor_class.world.position);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+1017
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -786,12 +786,12 @@ extern void Game_play_Projection_Trans(GAME_PLAY* const play, xyz_t* world_pos,
|
||||
xyz_t* screen_pos) {
|
||||
f32 w;
|
||||
|
||||
Matrix_mult(&play->matrix, 0);
|
||||
Matrix_mult(&play->projection_matrix, 0);
|
||||
Matrix_Position(world_pos, screen_pos);
|
||||
w = play->matrix.ww +
|
||||
((play->matrix.wx * world_pos->x) +
|
||||
(play->matrix.wy * world_pos->y) +
|
||||
(play->matrix.wz * world_pos->z));
|
||||
w = play->projection_matrix.ww +
|
||||
((play->projection_matrix.wx * world_pos->x) +
|
||||
(play->projection_matrix.wy * world_pos->y) +
|
||||
(play->projection_matrix.wz * world_pos->z));
|
||||
screen_pos->x = (SCREEN_WIDTH_F / 2.0f) + ((screen_pos->x / w) * (SCREEN_WIDTH_F / 2.0f));
|
||||
screen_pos->y = (SCREEN_HEIGHT_F / 2.0f) - ((screen_pos->y / w) * (SCREEN_HEIGHT_F / 2.0f));
|
||||
}
|
||||
|
||||
+4
-5
@@ -157,7 +157,7 @@ static void LightsN__point_proc(LightsN* lights, LightParams* lightInfo, xyz_t*
|
||||
}
|
||||
}
|
||||
|
||||
static void LightsN__P_point_proc(LightsN* lights, LightParams* lightInfo, xyz_t*){
|
||||
static void LightsN__P_point_proc(LightsN* lights, LightParams* lightInfo, xyz_t* pos){
|
||||
|
||||
f32 rad;
|
||||
xyz_t point;
|
||||
@@ -303,9 +303,8 @@ static void Global_light_fog_set(Global_light* glight, u8 r, u8 g, u8 b, s16 nea
|
||||
}
|
||||
|
||||
|
||||
extern void Global_light_read(Global_light* glight, GRAPH* graph){
|
||||
|
||||
new_LightsN(graph, glight->ambientColor[0], glight->ambientColor[1], glight->ambientColor[2]);
|
||||
extern LightsN* Global_light_read(Global_light* glight, GRAPH* graph){
|
||||
return new_LightsN(graph, glight->ambientColor[0], glight->ambientColor[1], glight->ambientColor[2]);
|
||||
}
|
||||
|
||||
static void Global_light_list_ct(Global_light* glight){
|
||||
@@ -313,7 +312,7 @@ static void Global_light_list_ct(Global_light* glight){
|
||||
glight->list = NULL;
|
||||
}
|
||||
|
||||
extern void Global_light_list_new(GAME_PLAY*, Global_light* glight, Lights* light){
|
||||
extern void Global_light_list_new(GAME_PLAY* play, Global_light* glight, Lights* light){
|
||||
|
||||
LightNode* clight;
|
||||
|
||||
|
||||
+1
-1
@@ -591,7 +591,7 @@ static void mMP_set_init_data(mMP_Overlay_c* map_ovl, mSM_MenuInfo_c* menu_info)
|
||||
mFI_Wpos2BlockNum(&block_x, &block_z, pos);
|
||||
}
|
||||
else {
|
||||
mFI_Wpos2BlockNum(&block_x, &block_z, player->actor_class.world_position);
|
||||
mFI_Wpos2BlockNum(&block_x, &block_z, player->actor_class.world.position);
|
||||
}
|
||||
|
||||
map_ovl->player_bx = block_x - 1;
|
||||
|
||||
+1
-1
@@ -415,7 +415,7 @@ static int mPO_make_post_man(GAME_PLAY* play) {
|
||||
ACTOR* post_office_structure = Actor_info_fgName_search(&play->actor_info, POST_OFFICE, ACTOR_PART_ITEM);
|
||||
|
||||
if (post_office_structure != NULL) {
|
||||
mFI_Wpos2UtNum_inBlock(&post_utx, &post_utz, post_office_structure->world_position);
|
||||
mFI_Wpos2UtNum_inBlock(&post_utx, &post_utz, post_office_structure->world.position);
|
||||
spawned_postman = (*Common_Get(clip).npc_clip->setupActor_proc)(play, SP_NPC_POST_MAN, -1, -1, 1, play->block_table.block_x, play->block_table.block_z, post_utx - 3, post_utz);
|
||||
|
||||
if (spawned_postman == TRUE) {
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ static void mTD_player_keydata_init(GAME_PLAY* play) {
|
||||
angle = get_demo_header(mEv_CheckTitleDemo() - 1, mTD_HEADER_ROTATION);
|
||||
|
||||
player->actor_class.shape_info.rotation.y = angle;
|
||||
player->actor_class.world_rotation.y = angle;
|
||||
player->actor_class.world.angle.y = angle;
|
||||
}
|
||||
|
||||
S_tdemo_frame = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ static void mTRC_SetMicPos(GAME_PLAY* play, xyz_t* mic_pos) {
|
||||
}
|
||||
else {
|
||||
if (player != NULL) {
|
||||
xyz_t_move(&pos, &player->actor_class.world_position);
|
||||
xyz_t_move(&pos, &player->actor_class.world.position);
|
||||
}
|
||||
else {
|
||||
xyz_t_move(&pos, &ZeroVec);
|
||||
@@ -467,7 +467,7 @@ static void mTRC_trainSet(GAME_PLAY* play) {
|
||||
xyz_pos.z = xz_pos.z;
|
||||
xyz_pos.y = mCoBG_GetBgY_OnlyCenter_FromWpos2(xyz_pos, 0.0f);
|
||||
|
||||
xyz_t_move(&train_actor->world_position, &xyz_pos);
|
||||
xyz_t_move(&train_actor->world.position, &xyz_pos);
|
||||
}
|
||||
|
||||
x -= 250.0f;
|
||||
@@ -484,7 +484,7 @@ static void mTRC_trainSet(GAME_PLAY* play) {
|
||||
xyz_pos.z = 740.0f;
|
||||
xyz_pos.y = mCoBG_GetBgY_OnlyCenter_FromWpos2(xyz_pos, 0.0f);
|
||||
|
||||
xyz_t_move(&caboose_actor->world_position, &xyz_pos);
|
||||
xyz_t_move(&caboose_actor->world.position, &xyz_pos);
|
||||
}
|
||||
|
||||
Common_Set(train_flag, FALSE);
|
||||
|
||||
@@ -131,7 +131,7 @@ extern void watch_my_step_move(GAME_PLAY* play) {
|
||||
}
|
||||
|
||||
if (S_watch_my_step.mode != 0) {
|
||||
xyz_t position = player_actor->actor_class.world_position;
|
||||
xyz_t position = player_actor->actor_class.world.position;
|
||||
xyz_t screen_pos;
|
||||
position.y += 30.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user