summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/6B3DC0.h10
-rw-r--r--include/m_choice_main.h261
-rw-r--r--include/m_msg_main.h39
3 files changed, 201 insertions, 109 deletions
diff --git a/include/6B3DC0.h b/include/6B3DC0.h
index d191522..1289c78 100644
--- a/include/6B3DC0.h
+++ b/include/6B3DC0.h
@@ -12,7 +12,7 @@ struct Game;
// void func_80090178_jp();
// void func_80090188_jp();
// void func_8009028C_jp();
-// void func_800902CC_jp();
+s32 mFont_GetStringWidth(char*, s32, s32);
// void func_8009034C_jp();
// void func_800903A8_jp();
// void func_800903CC_jp();
@@ -28,7 +28,7 @@ struct Game;
// void func_80090848_jp();
// void func_8009087C_jp();
// void func_80090CC0_jp();
-f32 mFont_SetLineStrings_AndSpace(struct Game*, char*, s32, f32 x, f32 y, s32 , s32 , s32 , s32 , s32, s32, s32, f32, f32, s32);
+f32 mFont_SetLineStrings_AndSpace(struct Game*, char*, s32, f32 x, f32 y, s32, s32, s32, s32, s32, s32, s32, f32, f32,s32);
// void func_80090E98_jp();
void mFont_SetMatrix(struct GraphicsContext* gfxCtx, s32 type);
void mFont_UnSetMatrix(struct GraphicsContext* gfxCtx, s32 type);
@@ -63,11 +63,11 @@ void func_80091074_jp(struct GraphicsContext* gfxCtx);
// void func_80091FCC_jp();
// void func_80092000_jp();
// void func_80092034_jp();
-// void func_800921D0_jp();
+f32 mFont_SetMarkChar(struct Game*, u8, f32, f32, s32, s32, s32, s32, s32, f32, f32, s32);
// void func_80092440_jp();
// void func_80092468_jp();
-void func_800924CC_jp(void*,void*,void*);
+void func_800924CC_jp(void*, void*, void*);
// void func_80092538_jp();
-s32 mFont_UnintToString(char*, u32, s32, s32, s32);
+s32 mFont_UnintToString(char*, u32, s32, s32, s32);
#endif
diff --git a/include/m_choice_main.h b/include/m_choice_main.h
index c7998ae..b13a9e8 100644
--- a/include/m_choice_main.h
+++ b/include/m_choice_main.h
@@ -2,94 +2,179 @@
#define M_CHOICE_MAIN_H
#include "ultra64.h"
+#include "color.h"
-// void func_80065040_jp();
-// void func_80065064_jp();
-// void func_80065158_jp();
-// void func_80065164_jp();
-// void func_80065170_jp();
-// void func_80065198_jp();
-// void func_800651A4_jp();
-// void func_80065278_jp();
-// void func_80065348_jp();
-// void func_800653CC_jp();
-// void func_800653DC_jp();
-// void func_800654FC_jp();
-// void func_80065508_jp();
-// void func_80065518_jp();
-// void func_80065528_jp();
-// void func_80065668_jp();
-// void func_8006568C_jp();
-// void func_800656C8_jp();
-// void func_80065704_jp();
-// void func_80065728_jp();
-// void func_8006574C_jp();
-// void func_80065770_jp();
-// void func_80065794_jp();
-// void func_800657B8_jp();
-// void func_800657DC_jp();
-// void func_80065800_jp();
-// void func_8006584C_jp();
-// void func_8006586C_jp();
-// void func_80065890_jp();
-// void func_800658B4_jp();
-// void func_800658D8_jp();
-// void func_800658FC_jp();
-// void func_80065920_jp();
-// void func_80065944_jp();
-// void func_80065968_jp();
-// void func_8006598C_jp();
-// void func_800659B0_jp();
-// void func_800659D4_jp();
-// void func_800659F8_jp();
-// void func_80065A1C_jp();
-// void func_80065A40_jp();
-// void func_80065A64_jp();
-// void func_80065A88_jp();
-// void func_80065AAC_jp();
-// void func_80065AD0_jp();
-// void func_80065AF4_jp();
-// void func_80065B18_jp();
-// void func_80065B5C_jp();
-// void func_80065B80_jp();
-// void func_80065BA4_jp();
-// void func_80065BF0_jp();
-// void func_80065C10_jp();
-// void func_80065C34_jp();
-// void func_80065C58_jp();
-// void func_80065C7C_jp();
-// void func_80065CA0_jp();
-// void func_80065CF8_jp();
-// void func_80065D90_jp();
-// void func_80065EE8_jp();
-// void func_80065EF8_jp();
-// void func_80065F18_jp();
-// void func_80065F38_jp();
-// void func_80065F58_jp();
-// void func_80065F78_jp();
-// void func_80065F98_jp();
-// void func_80066068_jp();
-// void func_80066094_jp();
-// void func_800660DC_jp();
-// void func_80066130_jp();
-// void func_80066194_jp();
-// void func_800665C0_jp();
-// void func_800665EC_jp();
-// void func_80066634_jp();
-// void func_8006666C_jp();
-// void func_80066740_jp();
-// void func_8006676C_jp();
-// void func_800667B4_jp();
-// void func_8006680C_jp();
-// void func_8006685C_jp();
-// void func_800668A4_jp();
-// void func_800669A4_jp();
-// void func_80066A60_jp();
-// void func_80066A80_jp();
-// void func_80066B18_jp();
-// void func_80066BB0_jp();
-// void func_80066D4C_jp();
-// void func_80066DFC_jp();
-// void func_80066E34_jp();
+struct Game;
+struct Actor;
+
+#define Choice_CHOICE_STRING_LEN 10
+
+typedef enum Choice_CHOICE {
+ Choice_CHOICE0,
+ Choice_CHOICE1,
+ Choice_CHOICE2,
+ Choice_CHOICE3,
+ Choice_CHOICE_MAX,
+} Choice_CHOICE;
+
+typedef enum Choice_AUTOMOVETYPE {
+ Choice_AUTOMOVE_STOPPED,
+ Choice_AUTOMOVE_INCREMENT_WAIT,
+ Choice_AUTOMOVE_INCREMENT,
+ Choice_AUTOMOVE_DECREMENT_WAIT,
+ Choice_AUTOMOVE_DECREMENT,
+ Choice_AUTOMOVE_MAX
+} Choice_AUTOMOVETYPE;
+
+typedef struct ChoiceData {
+ /* 0x00 */ char strings[Choice_CHOICE_MAX][Choice_CHOICE_STRING_LEN];
+ /* 0x28 */ s32 stringLens[Choice_CHOICE_MAX];
+ /* 0x38 */ char determinationString[Choice_CHOICE_STRING_LEN];
+ /* 0x44 */ s32 determinationLenght;
+ /* 0x48 */ s32 choiceNum;
+ /* 0x4C */ s32 selectedChoiceIdx;
+} ChoiceData; // size = 0x50
+
+typedef struct Choice {
+ /* 0x00 */f32 centerX;
+ /* 0x04 */f32 centerY;
+
+ /* Initial XY position */
+ /* 0x08 */ f32 centerXBegin;
+ /* 0x0C */ f32 centerYBegin;
+
+ /* Target XY position */
+ /* 0x10 */ f32 centerXTarget;
+ /* 0x14 */ f32 centerYTarget;
+
+ /* Text settings */
+ /* 0x18 */ Color_RGBA8 textColor;
+ /* 0x1C */ f32 textScaleX;
+ /* 0x20 */ f32 textScaleY;
+ /* 0x24 */ f32 textX;
+ /* 0x28 */ f32 textY;
+
+ /* Window scaling XY */
+ /* 0x2C */ f32 scaleX;
+ /* 0x30 */ f32 scaleY;
+
+ /* Text related data */
+ /* 0x34 */ ChoiceData data;
+
+ /* 0x84 */ s32 selectedChoiceIdx;
+ /* 0x88 */ Color_RGBA8 selectedChoiceTextColor;
+
+ /* 0x8C */ Color_RGBA8 backgroundColor;
+
+ /* 0x90 */ f32 unk_D4;
+ /* 0x94 */ f32 unk_D8;
+
+ /* 0x98 */ f32 scale; // total choice window scaling percentage
+
+ /* 0x9C */ s32 mainIdx;
+ /* 0xA0 */ s32 requestedMainIdx;
+
+ /* 0xA4 */ s32 isWindowVisible;
+ /* 0xA8 */ s32 isFontVisible;
+
+ /* 0xAC */ s32 choiceAutomoveType;
+ /* 0xB0 */ f32 choiceAutomoveTimer;
+
+ /* 0xB4 */ f32 timer;
+
+ /* 0xB8 */ u8 noBFlag; // can't press B to select last option
+ /* 0xB9 */ u8 noCloseFlag; // pressing B won't auto-cancel the choice selection?
+} Choice; // size = 0xBC
+
+
+Choice* mChoice_Get_base_window_p();
+void mChoice_init(Choice* choice, struct Game* game);
+void mChoice_Change_request_main_index(Choice* choice, s32 idx);
+s32 mChoice_check_main_index(Choice* choice);
+s32 mChoice_check_main_normal(Choice* choice);
+void mChoice_Init_choice_data(Choice* choice);
+s32 mChoice_Add_choice_data(Choice* choice, char* str, s32 max_len);
+void mChoice_Set_choice_data(Choice* choice, char* str0, s32 str0len, char* str1, s32 str1len, char* str2, s32 str2len,
+ char* str3, s32 str3len);
+s32 mChoice_Get_MaxStringDotWidth(Choice* choice);
+s32 mChoice_Get_MaxStringDotHeight(Choice* choice);
+void mChoice_Set_DisplayScaleAndDisplayPos(Choice* choice);
+s32 mChoice_Get_ChoseNum(Choice* choice);
+void mChoice_Clear_ChoseNum(Choice* choice);
+void mChoice_check_ct( Choice* choice, struct Game* game);
+void mChoice_Get_StringDataAddressAndSize(s32 idx, u32** addr, u32* size);
+s32 mChoice_Put_String_PLAYER_NAME(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_TALK_NAME(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_TAIL(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_YEAR(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_MONTH(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_WEEK(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_DAY(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_HOUR(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_MIN(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_SEC(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE(char* data, s32 idx, s32 maxSize, struct Actor* actor, s32 freeIdx);
+s32 mChoice_Put_String_FREE0(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE1(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE2(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE3(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE4(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE5(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE6(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE7(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE8(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE9(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE10(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE11(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE12(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE13(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE14(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE15(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE16(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE17(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE18(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_FREE19(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_DETERMINATION(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_COUNTRY_NAME(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_RAMDOM_NUMBER2(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_ITEM(char* data, s32 idx, s32 maxSize, struct Actor* actor, s32 itemIdx);
+s32 mChoice_Put_String_ITEM0(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_ITEM1(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_ITEM2(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_ITEM3(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String_ITEM4(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+s32 mChoice_Put_String(char* data, s32 idx, s32 maxSize, struct Actor* actor);
+void mChoice_Change_ControlCode(char* data, s32 maxSize, struct Actor* actor);
+void mChoice_Load_ChoseStringFromRom(s32 , char* str, s32 idx, struct Actor* actor);
+void mChoice_no_b_set(Choice* choice);
+void mChoice_sound_SENTAKU_KETTEI(void);
+void mChoice_sound_SENTAKU_OPEN(void);
+void mChoice_sound_CURSOL(void);
+void mChoice_Main_Hide(Choice* choice, struct Game* game);
+void mChoice_MainSetup_Hide(Choice* choice, struct Game* game);
+s32 mChoice_Main_Appear_SetScale(Choice* choice, struct Game* game);
+void mChoice_request_main_index_fromAppear(Choice* choice, struct Game* game, s32 flag);
+void mChoice_Main_Appear(Choice* choice, struct Game* game);
+void mChoice_MainSetup_Appear(Choice* choice, struct Game* game);
+void mChoice_determimation_set(Choice* choice);
+s32 mChoice_Main_Normal_SetChoice(Choice* choice, struct Game* game);
+void mChoice_request_main_index_fromNormal(Choice* choice, struct Game* game, s32 flag);
+void mChoice_Main_Normal(Choice* choice, struct Game* game);
+void mChoice_MainSetup_Normal(Choice* choice, struct Game* game);
+s32 mChoice_Main_Disappear_SetScale(Choice* choice, struct Game* game);
+void mChoice_request_main_index_fromDisappear(Choice* choice, struct Game* game, s32 flag);
+void mChoice_Main_Disappear(Choice* choice, struct Game* game);
+void mChoice_MainSetup_Disappear(Choice* choice, struct Game* game);
+void mChoice_MainSetup(Choice* choice, struct Game* game);
+void mChoice_Main(Choice* choice, struct Game* game);
+void mChoice_SetMatrix(Choice* choice, struct Game* game, s32 type);
+void mChoice_SetMatrixDisplay(Choice* choice, struct Game* game, s32 type);
+void mChoice_UnSetMatrix(void);
+void mChoice_UnSetMatrixDisplay(struct Game* game, s32 type);
+void mChoice_DrawWindowBody(Choice* choice, struct Game* game, s32 type);
+void mChoice_DrawFont(Choice* choice, struct Game* game, s32 type);
+void mChoice_Draw(Choice* choice, struct Game* game, s32 mode);
+void mChoice_ct(Choice* choice, struct Game* game);
+void mChoice_dt(Choice* choice, struct Game* game);
#endif
diff --git a/include/m_msg_main.h b/include/m_msg_main.h
index fbb49f2..cbe841d 100644
--- a/include/m_msg_main.h
+++ b/include/m_msg_main.h
@@ -3,10 +3,17 @@
#include "ultra64.h"
#include "unk.h"
+#include "m_choice_main.h"
struct Game_Play;
+struct Actor;
-UNK_PTR mMsg_Get_base_window_p(void);
+typedef struct MessageWindow {
+ /* 0x000 */ UNK_TYPE1 unk_000[0x1B0];
+ /* 0x1B0 */ Choice choiceWindow;
+} MessageWindow; // size >= 0x26C
+
+MessageWindow* mMsg_Get_base_window_p(void);
// void func_8009D200_jp();
// void func_8009D210_jp();
// void func_8009D260_jp();
@@ -93,22 +100,22 @@ size_t mMsg_Get_Length_String(char*, s32);
// void func_8009EA2C_jp();
// void func_8009EB44_jp();
// void func_8009EBB0_jp();
-// void func_8009EC88_jp();
-// void func_8009ED14_jp();
-// void func_8009EDBC_jp();
-// void func_8009EE78_jp();
-// void func_8009EF00_jp();
-// void func_8009EF88_jp();
-// void func_8009F010_jp();
-// void func_8009F098_jp();
-// void func_8009F120_jp();
-// void func_8009F1A8_jp();
-// void func_8009F230_jp();
+s32 mMsg_CopyPlayerName(char*, s32, s32);
+s32 mMsg_CopyTalkName(struct Actor*, char*, s32, s32);
+s32 mMsg_CopyTail(struct Actor*, char*, s32, s32);
+s32 mMsg_CopyYear(char*, s32, s32);
+s32 mMsg_CopyMonth(char*, s32, s32);
+s32 mMsg_CopyWeek(char*, s32, s32);
+s32 mMsg_CopyDay(char*, s32, s32);
+s32 mMsg_CopyHour(char*, s32, s32);
+s32 mMsg_CopyMin(char*, s32, s32);
+s32 mMsg_CopySec(char*, s32, s32);
+s32 mMsg_CopyFree(MessageWindow*, s32, char*, s32, s32);
// void func_8009F2EC_jp();
-// void func_8009F3A8_jp();
-// void func_8009F428_jp();
-// void func_8009F50C_jp();
-// void func_8009F5B4_jp();
+s32 mMsg_CopyDetermination(MessageWindow*, char*, s32, s32);
+s32 mMsg_CopyCountryName(char*,s32,s32);
+s32 mMsg_CopyRamdomNumber2(char*,s32,s32);
+s32 mMsg_CopyItem(MessageWindow*, s32, char*, s32, s32);
// void func_8009F670_jp();
// void func_8009F730_jp();
// void func_8009F75C_jp();