summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrakxo <87568477+Prakxo@users.noreply.github.com>2024-10-10 17:18:22 +0200
committerGitHub <noreply@github.com>2024-10-10 08:18:22 -0700
commit60cc4c9e2368f4ae47c24931b6530dabdc5e35dd (patch)
tree232bef68f206ebcf251acf6c0c9ea38782528d42 /include
parentc7a6aa2b880c34fafc10fd8238ee3b7c222fee8c (diff)
m_demo OK (#221)
* m_demo OK * camera fix
Diffstat (limited to 'include')
-rw-r--r--include/67E840.h6
-rw-r--r--include/683030.h22
-rw-r--r--include/69E2C0.h73
-rw-r--r--include/m_common_data.h7
-rw-r--r--include/m_demo.h230
-rw-r--r--include/m_msg_main.h6
-rw-r--r--include/m_player_lib.h26
7 files changed, 268 insertions, 102 deletions
diff --git a/include/67E840.h b/include/67E840.h
index 9d52f95..7c38846 100644
--- a/include/67E840.h
+++ b/include/67E840.h
@@ -154,8 +154,8 @@ void mBGMPsComp_make_ps_wipe(s32 arg0);
// void func_8005E8F4_jp();
// void func_8005E9B4_jp();
// void func_8005E9C8_jp();
-// void func_8005E9DC_jp();
-// void func_8005E9F0_jp();
+void mBGMPsComp_volume_talk_start(void);
+void mBGMPsComp_volume_talk_end(void);
// void func_8005EA14_jp();
// void func_8005EA24_jp();
// void func_8005EA38_jp();
@@ -174,7 +174,7 @@ void mBGMPsComp_scene_mode(s32 arg0);
// void func_8005ED78_jp();
// void func_8005ED98_jp();
// void func_8005EDC4_jp();
-// void func_8005EDD8_jp();
+void mBGMForce_inform_end(void);
// void func_8005EDEC_jp();
void mBGMForce_room_nonstop_start(void);
// void func_8005EE20_jp();
diff --git a/include/683030.h b/include/683030.h
index 8e0cf17..be53653 100644
--- a/include/683030.h
+++ b/include/683030.h
@@ -6,11 +6,14 @@
#include "z64math.h"
struct Game_Play;
+struct Actor;
typedef struct Camera2{
/* 0x000 */ xyz_t unk0;
/* 0x00C */ xyz_t unk4;
- /* 0x018 */ UNK_TYPE1 unk18[0x120];
+ /* 0x018 */ UNK_TYPE1 unk18[0x48];
+ /* 0x060 */ s32 unk60;
+ /* 0x0D4 */ UNK_TYPE1 unk64[0xD4];
} Camera2; //size = 0x138
// void func_8005F390_jp();
@@ -66,7 +69,7 @@ xyz_t* Camera2_getMicPos_p(struct Game_Play* game_play);
// void func_80061104_jp();
// void func_80061134_jp();
// void func_80061188_jp();
-// void func_800611D4_jp();
+s32 Camera2_request_main_talk(struct Game_Play* play, struct Actor* speaker, struct Actor* listener, s32 priority);
// void func_80061280_jp();
// void func_8006136C_jp();
// void func_800613DC_jp();
@@ -91,7 +94,7 @@ xyz_t* Camera2_getMicPos_p(struct Game_Play* game_play);
// void func_80062510_jp();
// void func_80062644_jp();
// void func_80062668_jp();
-// void Camera2_request_main_normal();
+s32 Camera2_request_main_normal(struct Game_Play* play, s32 flags, s32 priority);
// void func_800626E4_jp();
// void func_80062760_jp();
// void func_800627A0_jp();
@@ -101,7 +104,7 @@ xyz_t* Camera2_getMicPos_p(struct Game_Play* game_play);
// void func_80062B24_jp();
// void func_80062B74_jp();
// void func_80062BA0_jp();
-// void func_80062C84_jp();
+s32 Camera2_request_main_item(struct Game_Play* play, s32 type, s32 priority);
// void func_80062CD8_jp();
// void func_80062DD8_jp();
// void func_80062E00_jp();
@@ -117,7 +120,7 @@ xyz_t* Camera2_getMicPos_p(struct Game_Play* game_play);
// void func_800631C0_jp();
// void func_800631EC_jp();
// void func_8006328C_jp();
-// void func_800632C8_jp();
+s32 Camera2_request_main_door(struct Game_Play* play, struct Actor* doorActor, u32 flags, s32 priority);
// void func_8006333C_jp();
// void func_8006339C_jp();
// void func_80063468_jp();
@@ -126,18 +129,19 @@ xyz_t* Camera2_getMicPos_p(struct Game_Play* game_play);
// void func_80063608_jp();
// void func_80063628_jp();
// void func_80063674_jp();
-// void func_8006370C_jp();
+s32 Camera2_request_main_simple_kirin(struct Game_Play* play, xyz_t* center, s32 priority);
// void func_800637C8_jp();
// void func_8006393C_jp();
-// void func_800639A0_jp();
+s32 Camera2_request_main_simple(struct Game_Play* play, xyz_t* pos, s_xyz* dir, f32 dist, s32 morphCounter,
+ s32 priority);
// void func_80063A34_jp();
-// void func_80063AA0_jp();
+void Camera2_main_Simple_AngleDistStd(struct Game_Play* play, s_xyz* angle, f32* dist);
// void func_80063B1C_jp();
// void func_80063B8C_jp();
// void func_80063CA0_jp();
// void func_80063D10_jp();
// void func_80063D38_jp();
-// void func_80063D9C_jp();
+s32 Camera2_request_main_listen_front_low_talk(struct Game_Play* play, struct Actor* speaker, struct Actor* listener, s32 priority);
// void func_80063E14_jp();
// void func_80063E94_jp();
// void func_80063EF0_jp();
diff --git a/include/69E2C0.h b/include/69E2C0.h
index 5ce8734..bfa2b16 100644
--- a/include/69E2C0.h
+++ b/include/69E2C0.h
@@ -18,78 +18,5 @@ void Debug_mode_input(struct Input *input);
// void Debug_mode_output_sub();
// void Debug_mode_zelda_malloc_info_output();
void Debug_mode_output(struct GraphicsContext* gfxCtx);
-struct Actor* mDemo_Get_talk_actor(void);
-// void func_8007B44C_jp();
-// void func_8007B49C_jp();
-// void func_8007B4EC_jp();
-void mDemo_Set_msg_num(s32 arg0);
-// void func_8007B5F4_jp();
-// void func_8007B650_jp();
-// void func_8007B670_jp();
-// void func_8007B684_jp();
-// void func_8007B6A4_jp();
-// void func_8007B724_jp();
-// void func_8007B760_jp();
-void mDemo_Set_talk_display_name(s8 arg0);
-// void func_8007B7DC_jp();
-// void func_8007B818_jp();
-// void func_8007B854_jp();
-// void func_8007B890_jp();
-// void func_8007B8CC_jp();
-// void func_8007B908_jp();
-// void func_8007B944_jp();
-void mDemo_Set_talk_window_color(Color_RGBA8* color);
-// void func_8007B9E0_jp();
-void mDemo_Set_camera(s32 arg0);
-// void func_8007BA38_jp();
-// void func_8007BA4C_jp();
-// void func_8007BA84_jp();
-// void func_8007BC28_jp();
-// void func_8007BCE4_jp();
-// void func_8007BD9C_jp();
-// void func_8007BE58_jp();
-// void func_8007C00C_jp();
-// void func_8007C0B4_jp();
-// void func_8007C0C0_jp();
-// void func_8007C104_jp();
-// void func_8007C24C_jp();
-// void func_8007C290_jp();
-// void func_8007C3D8_jp();
-// void func_8007C484_jp();
-// void func_8007C570_jp();
-// void func_8007C5EC_jp();
-// void weight_of_talk_position();
-// void func_8007C808_jp();
-// void func_8007C814_jp();
-// void func_8007C820_jp();
-// void func_8007C844_jp();
-// void func_8007C868_jp();
-// void func_8007C88C_jp();
-// void func_8007C8B0_jp();
-// void func_8007C8D4_jp();
-// void func_8007C8FC_jp();
-// void func_8007C924_jp();
-// void func_8007CB28_jp();
-// void func_8007CB50_jp();
-// void func_8007CBEC_jp();
-// void func_8007CC9C_jp();
-void mDemo_stock_clear(void);
-void mDemo_Request(s32 arg0, struct Actor* actor, void* arg2);
-s32 mDemo_Check(s32 arg0, struct Actor* actor);
-// void func_8007CF34_jp();
-// void func_8007CF44_jp();
-void mDemo_End(struct Actor*);
-void mDemo_Main(struct Game_Play* game_play);
-void func_8007CFD8_jp(struct Game_Play* game_play);
-// void func_8007D030_jp();
-// void func_8007D048_jp();
-// void func_8007D080_jp();
-void mDemo_Set_ListenAble(void);
-// void func_8007D0B0_jp();
-// void func_8007D0C4_jp();
-// void func_8007D0D8_jp();
-s32 mDemo_Check_ListenAble(void);
-s32 mDemo_Check_DiffAngle_forTalk(s16 angle);
-// void func_8007D128_jp();
#endif
diff --git a/include/m_common_data.h b/include/m_common_data.h
index a1527fa..3201dc2 100644
--- a/include/m_common_data.h
+++ b/include/m_common_data.h
@@ -17,6 +17,7 @@
#include "m_snowman.h"
#include "m_clip.h"
#include "m_scene.h"
+#include "m_demo.h"
typedef enum Season {
/* 0 */ SPRING,
@@ -158,7 +159,8 @@ typedef struct CommonData {
/* 0x10752 */ s16 goodsPower;
/* 0x10754 */ DoorData doorData;
/* 0x10764 */ DoorData structureExitDoorData;
- /* 0x1077C */ UNK_TYPE1 unk_1077C[0x24];
+ /* 0x1077C */ DemoRequest startDemoRequest;
+ /* 0x1078C */ DoorData eventDoorData;
/* 0x107A0 */ DoorData famicomEmuDoorData;
/* 0x107B4 */ s8 unk_107B4;
/* 0x107B5 */ s8 floorIdx;
@@ -166,7 +168,8 @@ typedef struct CommonData {
/* 0x107B8 */ UNK_TYPE1 unk_107B8[0x27];
/* 0x107FF*/ s8 paymentType;
/* 0x107E0 */ s8 playerDecoyFlag;
- /* 0x107E1 */ UNK_TYPE1 unk_107E1[0x3];
+ /* 0x107E1 */ s8 unk_107E1;
+ /* 0x107E2 */ s16 unk_107E2;
/* 0x107E4 */ s16 unk_107E4;
/* 0x107E6 */ UNK_TYPE1 unk107E6[0x212];
/* 0x109F8 */ u8 unk109F8;
diff --git a/include/m_demo.h b/include/m_demo.h
new file mode 100644
index 0000000..9f5f7c2
--- /dev/null
+++ b/include/m_demo.h
@@ -0,0 +1,230 @@
+#ifndef M_DEMO_H
+#define M_DEMO_H
+
+#include "ultra64.h"
+#include "color.h"
+#include "m_scene.h"
+
+struct Actor;
+struct Game_Play;
+
+#define DEMO_ORDER_VALUE_MAX 10
+#define DEMO_REQUEST_MAX 32
+
+#define DEMO_MSG_PRIORITY 5
+#define DEMO_CAMERA_PRIORITY 6
+
+#define DEMO_WINDOW_COLOR_R 235
+#define DEMO_WINDOW_COLOR_G 255
+#define DEMO_WINDOW_COLOR_B 235
+#define DEMO_WINDOW_COLOR_A 255
+
+typedef enum DemoState {
+ DEMO_STATE_WAIT,
+ DEMO_STATE_READY,
+ DEMO_STATE_RUN,
+ DEMO_STATE_STOP = 9,
+
+ DEMO_STATE_MAX
+} DemoState;
+
+typedef enum DemoDirection {
+ DEMO_DIRECT_N,
+ DEMO_DIRECT_NE,
+ DEMO_DIRECT_E,
+ DEMO_DIRECT_SE,
+ DEMO_DIRECT_S,
+ DEMO_DIRECT_SW,
+ DEMO_DIRECT_W,
+ DEMO_DIRECT_NW,
+
+ DEMO_DIRECT_MAX
+} DemoDirection;
+
+typedef enum DemoType {
+ DEMO_TYPE_NONE,
+ DEMO_TYPE_SCROLL,
+ DEMO_TYPE_EXITSCENE,
+ DEMO_TYPE_DOOR,
+ DEMO_TYPE_4,
+ DEMO_TYPE_SCROLL2,
+ DEMO_TYPE_DOOR2,
+ DEMO_TYPE_TALK,
+ DEMO_TYPE_SPEAK,
+ DEMO_TYPE_REPORT,
+ DEMO_TYPE_OUTDOOR,
+ DEMO_TYPE_B,
+ DEMO_TYPE_EVENTMSG,
+ DEMO_TYPE_D,
+ DEMO_TYPE_MAX
+} DemoType;
+
+typedef enum DemoOrderType {
+ DEMO_ORDER_PLAYER,
+ DEMO_ORDER_1,
+ DEMO_ORDER_2,
+ DEMO_ORDER_3,
+ DEMO_ORDER_NPC0,
+ DEMO_ORDER_NPC1,
+ DEMO_ORDER_NPC2,
+ DEMO_ORDER_7,
+ DEMO_ORDER_8,
+ DEMO_ORDER_QUEST,
+
+ DEMO_ORDER_MAX
+} DemoOrderType;
+
+typedef void (*DemoRequestFunc)(struct Actor*);
+
+typedef struct DemoClip {
+ void* demoActor;
+ s32 type;
+} DemoClip;
+
+typedef enum DemoClipType {
+ DEMO_CLIP_TYPE_NONE,
+ DEMO_CLIP_TYPE_INTRO_DEMO,
+ DEMO_CLIP_TYPE_RIDE_OFF_DEMO,
+ DEMO_CLIP_TYPE_PRESENT_DEMO,
+ DEMO_CLIP_TYPE_BOAT_DEMO,
+ DEMO_CLIP_TYPE_RESET_DEMO,
+
+ DEMO_CLIP_TYPE_MAX
+} DemoClipType;
+
+typedef struct DemoRequest {
+ struct Actor* actor;
+ s32 type;
+ DemoRequestFunc proc;
+ f32 talkWeight;
+} DemoRequest;
+
+typedef struct DemoDoorData {
+ s32 type;
+ struct houseInfo{
+ f32 size;
+ s32 direct;
+ } houseInfo;
+} DemoDoorData;
+
+typedef struct DemoEMsgData {
+ s32 msgNo;
+ Color_RGBA8 windowColor;
+ s32 msgDelayTimer;
+ s32 sceneDelayTimer;
+ DoorData doorData;
+ UNK_TYPE1 unk_24[0x4];
+} DemoEMsgData;
+
+typedef struct DemoTalkData {
+ s32 msgNo;
+ s32 turn;
+ s32 useZoomSound;
+ s32 displayName;
+ s32 changePlayer;
+ s32 returnDemoWait;
+ Color_RGBA8 windowColor;
+ u8 actorSavedMass;
+} DemoTalkData;
+
+typedef struct DemoData {
+ struct Actor* speaker;
+ struct Actor* listener;
+ s32 isAbleSpeaker;
+ s32 isAbleListener;
+ u16 orderData[DEMO_ORDER_MAX][DEMO_ORDER_VALUE_MAX];
+ s8 changePlayerDestiny;
+ s32 state;
+ DemoRequest current;
+ DemoRequest request[DEMO_REQUEST_MAX];
+ s32 requestId;
+ s32 priorityType;
+ s32 cameraType;
+ s32 keepCameraType;
+
+ union {
+ DemoDoorData door;
+ DemoEMsgData emsg;
+ DemoTalkData talk;
+ } data;
+} DemoData;
+
+extern DemoData* demo;
+
+struct Actor* mDemo_Get_talk_actor(void);
+void mDemo_Set_OrderValue(s32 type, s32 idx, u16 value);
+u16 mDemo_Get_OrderValue(s32 type, s32 idx);
+void mDemo_Init_OrderValue(void);
+void mDemo_Set_msg_num(s32 msgNo);
+s32 mDemo_Get_Talk_Actors(struct Actor** speaker, struct Actor** listener);
+void mDemo_Set_change_player_destiny(s8 destiny);
+s32 mDemo_Get_change_player_destiny(void);
+void mDemo_Clear_change_player_destiny(void);
+void mDemo_Copy_change_player_destiny(void);
+void mDemo_Set_use_zoom_sound(u8 useZoomSound);
+s32 mDemo_Get_use_zoom_sound(void);
+void mDemo_Set_talk_display_name(s8 displayName);
+s32 mDemo_Get_talk_display_name(void);
+void mDemo_Set_talk_change_player(u8 changePlayer);
+s32 mDemo_Get_talk_change_player(void);
+void mDemo_Set_talk_return_demo_wait(u8 returnDemoWait);
+s32 mDemo_Get_talk_return_demo_wait(void);
+void mDemo_Set_talk_turn(u8 turn);
+s32 mDemo_Get_talk_turn(void);
+void mDemo_Set_talk_window_color(Color_RGBA8* windowColor);
+Color_RGBA8* mDemo_Get_talk_window_color_p(void);
+void mDemo_Set_camera(u8 cameraType);
+s32 mDemo_Get_camera(void);
+s32 mDemo_CheckDemoType(void);
+s32 change_camera(s32 cameraType);
+s32 set_speak_default(void);
+s32 set_report_default(void);
+s32 set_talk_default(void);
+s32 wait_talk_start(void);
+s32 wait_talk_end(void);
+s32 wait_scroll_start(void);
+s32 set_door_default(void);
+s32 wait_door_start(void);
+s32 mDemo_Set_house_info(f32 size, s32 direct);
+s32 wait_door2_start(void);
+s16 get_title_no_for_event(s16 event);
+s32 set_emsg_default(void);
+s32 wait_emsg_start(void);
+s32 wait_emsg_end(void);
+f32 weight_of_talk_position(struct Actor* actor);
+s32 allways_true(void);
+s32 allways_false(void);
+s32 scroll_check(void);
+s32 scroll2_check(void);
+s32 scroll3_check(void);
+s32 door_check(void);
+s32 outdoor_check(void);
+s32 talk_check(void);
+s32 speak_check(void);
+s32 choice_demo(void);
+void emsg_set(struct Actor* actor);
+void init_demo(void);
+void run_demo(void);
+void main_proc(void);
+void mDemo_stock_clear(void);
+s32 mDemo_Request(s32 type, struct Actor* actor, DemoRequestFunc request);
+s32 mDemo_Check(s32 type, struct Actor* actor);
+s32 mDemo_Start(struct Actor* actor);
+s32 mDemo_Check_and_Go(s32 type, struct Actor* actor);
+s32 mDemo_End(struct Actor* actor);
+void mDemo_Main(struct Game_Play* play);
+void mDemo_Init(struct Game_Play* play);
+s32 mDemo_CheckDemo(void);
+s32 mDemo_CheckDemo4Event(void);
+void mDemo_Set_SpeakerAble(void);
+void mDemo_Set_ListenAble(void);
+void mDemo_Unset_SpeakerAble(void);
+void mDemo_Unset_ListenAble(void);
+s32 mDemo_Check_SpeakerAble(void);
+s32 mDemo_Check_ListenAble(void);
+int mDemo_Check_DiffAngle_forTalk(s16 diffAngle);
+void mDemo_KeepCamera(s32 cameraType);
+
+
+
+#endif
diff --git a/include/m_msg_main.h b/include/m_msg_main.h
index cbe841d..c06adbb 100644
--- a/include/m_msg_main.h
+++ b/include/m_msg_main.h
@@ -7,6 +7,7 @@
struct Game_Play;
struct Actor;
+struct Color_RGBA8;
typedef struct MessageWindow {
/* 0x000 */ UNK_TYPE1 unk_000[0x1B0];
@@ -16,13 +17,14 @@ typedef struct MessageWindow {
MessageWindow* mMsg_Get_base_window_p(void);
// void func_8009D200_jp();
// void func_8009D210_jp();
-// void func_8009D260_jp();
+s32 mMsg_Check_main_index(MessageWindow*, s32);
// void func_8009D274_jp();
UNK_RET mMsg_Check_not_series_main_wait(UNK_PTR arg0);
UNK_RET mMsg_Check_main_hide(UNK_PTR arg0);
// void func_8009D308_jp();
// void func_8009D3B4_jp();
-// void func_8009D3E4_jp();
+s32 mMsg_request_main_appear(MessageWindow*, struct Actor*, s32 , struct Color_RGBA8*,
+ s32, s32);
// void func_8009D458_jp();
// void func_8009D4A0_jp();
// void func_8009D4F0_jp();
diff --git a/include/m_player_lib.h b/include/m_player_lib.h
index 456041e..ce6430e 100644
--- a/include/m_player_lib.h
+++ b/include/m_player_lib.h
@@ -63,7 +63,7 @@ void mPlib_Load_PlayerTexAndPallet(u8*, u8*, s32);
// void func_800B21A0_jp();
// void func_800B21D0_jp();
// void func_800B21E0_jp();
-// void func_800B21F0_jp();
+s32 mPlib_Check_able_force_speak_label(struct Game_Play*, struct Actor*);
// void func_800B2244_jp();
// void func_800B2284_jp();
// void func_800B22A4_jp();
@@ -73,8 +73,8 @@ void mPlib_Load_PlayerTexAndPallet(u8*, u8*, s32);
void mPlib_request_main_invade_type1(struct Game_Play*);
void mPlib_request_main_refuse_type1(struct Game_Play*);
void mPlib_request_main_wait_type3(struct Game_Play*);
-// void func_800B2450_jp();
-// void func_800B24A0_jp();
+s32 mPlib_request_main_talk_end_type1(struct Game_Play*, s32);
+s32 mPlib_request_main_talk_type1(struct Game_Play*, struct Actor*, s32, s32);
// void func_800B24F8_jp();
// void func_800B255C_jp();
// void func_800B25F4_jp();
@@ -82,8 +82,8 @@ void mPlib_request_main_wait_type3(struct Game_Play*);
// void func_800B26E8_jp();
// void func_800B2720_jp();
// void func_800B2778_jp();
-// void func_800B27B0_jp();
-// void func_800B2814_jp();
+void mPlib_request_main_door_type1(struct Game_Play*, xyz_t*, s16, s32, struct Actor*);
+void mPlib_request_main_door_type2(struct Game_Play*, xyz_t*, s16, s32, struct Actor*);
// void func_800B286C_jp();
// void func_800B28B0_jp();
// void func_800B2908_jp();
@@ -100,18 +100,18 @@ void func_800B2AD0_jp(struct Game_Play*);
// void func_800B2CD8_jp();
// void func_800B2D18_jp();
// void func_800B2D74_jp();
-// void func_800B2DAC_jp();
-// void func_800B2EBC_jp();
-// void func_800B2F1C_jp();
-// void func_800B2F7C_jp();
-// void func_800B2FDC_jp();
-// void func_800B30A4_jp();
+s32 mPlib_check_request_main_talk_type1_priority(struct Game_Play*);
+s32 mPlib_check_request_main_speak_type1_priority(struct Game_Play*);
+s32 mPlib_check_request_main_demo_geton_boat_wade_priority(struct Game_Play*);
+s32 mPlib_check_request_main_door_type1_priority(struct Game_Play*);
+s32 mPlib_check_request_main_wade_priority(struct Game_Play*);
+s32 mPlib_check_request_main_demo_wade_priority(struct Game_Play*);
// void func_800B3104_jp();
// void func_800B314C_jp();
// void func_800B31B4_jp();
// void func_800B321C_jp();
-// void func_800B3284_jp();
-// void func_800B32EC_jp();
+void mPlib_strength_request_main_door_priority(struct Game_Play*);
+s32 mPlib_check_request_main_outdoor_priority(struct Game_Play*);
// void func_800B32FC_jp();
// void func_800B3330_jp();
// void func_800B33AC_jp();