custom flow nodes and initial custom midna choices

This commit is contained in:
gymnast86
2026-07-21 00:51:33 -07:00
parent a245876f7f
commit 21a7823045
22 changed files with 1171 additions and 220 deletions
+23
View File
@@ -37,6 +37,26 @@ public:
/* 0x12 */ BE(u16) unk_0x12;
};
#if TARGET_PC
// Default attributes for custom text ids
static JMSMesgEntry_c defaultEntry{
.string_offset = 0,
.message_id = 0,
.event_label_id = 0,
.se_speaker = 0x15,
.fuki_kind = 0x0D,
.output_type = 0x01,
.fuki_pos_type = 0x00,
.unk_0xc = 0xFF,
.unk_0xd = 0x00,
.se_mood = 0x0D,
.camera_id = 0x0,
.base_anm_id = 0x1F,
.face_anm_id = 0x1F,
.unk_0x12 = 0x400,
};
#endif
class JMSMesgInfo_c {
public:
/* 0x00 */ bmg_section_t header; // section header
@@ -44,6 +64,9 @@ public:
/* 0x0A */ BE(u16) entry_size; // size of an entry
/* 0x0C */ u8 padding[4]; // padding
/* 0x10 */ JMSMesgEntry_c entries[0];
#if TARGET_PC
JMSMesgEntry_c& getEntry(u16 index);
#endif
};
class COutFont_c;
+7 -2
View File
@@ -133,6 +133,8 @@ public:
u16 query053(mesg_flow_node_branch*, fopAc_ac_c*, int);
#if TARGET_PC
u16 query054(mesg_flow_node_branch*, fopAc_ac_c*, int);
u16 query055(mesg_flow_node_branch*, fopAc_ac_c*, int);
u16 query056(mesg_flow_node_branch*, fopAc_ac_c*, int);
#endif
int event000(mesg_flow_node_event*, fopAc_ac_c*);
int event001(mesg_flow_node_event*, fopAc_ac_c*);
@@ -181,6 +183,7 @@ public:
// events for rando
int event043(mesg_flow_node_event*, fopAc_ac_c*);
int event044(mesg_flow_node_event*, fopAc_ac_c*);
int event045(mesg_flow_node_event*, fopAc_ac_c*);
#endif
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
@@ -196,12 +199,14 @@ public:
void setMsg(u32 msg) { mMsg = msg; }
bool checkEndFlow() { return (u32)field_0x26 == 1; }
static DUSK_GAME_DATA queryFunc mQueryList[DUSK_IF_ELSE(54, 53)];
static DUSK_GAME_DATA eventFunc mEventList[DUSK_IF_ELSE(45, 43)];
static DUSK_GAME_DATA queryFunc mQueryList[DUSK_IF_ELSE(56, 53)];
static DUSK_GAME_DATA eventFunc mEventList[DUSK_IF_ELSE(46, 43)];
#if TARGET_PC
// patch funcs for rando
u32 getKeyForIndex(u16 nodeIdx);
void randoPatchNodeType(u8& type, u16 nodeIdx);
void randoPatchMessageNode(mesg_flow_node*& message_node, u16 nodeIdx);
void randoPatchBranchNode(mesg_flow_node_branch*& branch_node, u16 nodeIdx);
void randoPatchEventNode(mesg_flow_node_event*& event_node, u16 nodeIdx);
#endif