mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-24 06:50:43 -04:00
change time of day with midna
This commit is contained in:
@@ -177,6 +177,11 @@ public:
|
||||
int event040(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event041(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event042(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
#if TARGET_PC
|
||||
// events for rando
|
||||
int event043(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event044(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
#endif
|
||||
|
||||
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
|
||||
|
||||
@@ -192,7 +197,7 @@ public:
|
||||
bool checkEndFlow() { return (u32)field_0x26 == 1; }
|
||||
|
||||
static queryFunc mQueryList[DUSK_IF_ELSE(54, 53)];
|
||||
static eventFunc mEventList[43];
|
||||
static eventFunc mEventList[DUSK_IF_ELSE(45, 43)];
|
||||
|
||||
private:
|
||||
/* 0x04 */ u8* mFlow_p;
|
||||
|
||||
+7
-1
@@ -384,7 +384,13 @@ int dEvt_control_c::talkEnd() {
|
||||
if (item != NULL && fopAcM_GetName(item) == fpcNm_ITEM_e) {
|
||||
item->dead();
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (g_randomizerState.getHasPendingToDChange())
|
||||
{
|
||||
g_randomizerState.setHasPendingToDChange(false);
|
||||
g_randomizerState.handleTimeOfDayChange();
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+28
-1
@@ -659,6 +659,10 @@ int dMsgFlow_c::branchNodeProc(fopAc_ac_c* i_speaker_p, fopAc_ac_c** i_talkPartn
|
||||
// Overwrite this node if we have a patch for it
|
||||
if (randomizer_IsActive()) {
|
||||
u32 key = (dMsgObject_getGroupID() << 16) | mNodeIdx;
|
||||
// Dirty check to see if this node is part of bmg 0
|
||||
if (*(reinterpret_cast<u16*>(&mFlowNodeTBL[0])) == 0x0803) {
|
||||
key &= 0x0000FFFF;
|
||||
}
|
||||
if (randomizer_GetContext().mFlowPatches.contains(key)) {
|
||||
node = reinterpret_cast<mesg_flow_node_branch*>(&randomizer_GetContext().mFlowPatches[key]);
|
||||
}
|
||||
@@ -679,6 +683,10 @@ int dMsgFlow_c::eventNodeProc(fopAc_ac_c* i_speaker_p, fopAc_ac_c** i_talkPartne
|
||||
// Overwrite this node if we have a patch for it
|
||||
if (randomizer_IsActive()) {
|
||||
u32 key = (dMsgObject_getGroupID() << 16) | mNodeIdx;
|
||||
// Dirty check to see if this node is part of bmg 0
|
||||
if (*(reinterpret_cast<u16*>(&mFlowNodeTBL[0])) == 0x0803) {
|
||||
key &= 0x0000FFFF;
|
||||
}
|
||||
if (randomizer_GetContext().mFlowPatches.contains(key)) {
|
||||
node = reinterpret_cast<mesg_flow_node_event*>(&randomizer_GetContext().mFlowPatches[key]);
|
||||
}
|
||||
@@ -1844,7 +1852,7 @@ u16 dMsgFlow_c::query054(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_spea
|
||||
return ret;
|
||||
}
|
||||
|
||||
eventFunc dMsgFlow_c::mEventList[43] = {
|
||||
eventFunc dMsgFlow_c::mEventList[DUSK_IF_ELSE(45, 43)] = {
|
||||
&dMsgFlow_c::event000, &dMsgFlow_c::event001, &dMsgFlow_c::event002, &dMsgFlow_c::event003,
|
||||
&dMsgFlow_c::event004, &dMsgFlow_c::event005, &dMsgFlow_c::event006, &dMsgFlow_c::event007,
|
||||
&dMsgFlow_c::event008, &dMsgFlow_c::event009, &dMsgFlow_c::event010, &dMsgFlow_c::event011,
|
||||
@@ -1856,6 +1864,9 @@ eventFunc dMsgFlow_c::mEventList[43] = {
|
||||
&dMsgFlow_c::event032, &dMsgFlow_c::event033, &dMsgFlow_c::event034, &dMsgFlow_c::event035,
|
||||
&dMsgFlow_c::event036, &dMsgFlow_c::event037, &dMsgFlow_c::event038, &dMsgFlow_c::event039,
|
||||
&dMsgFlow_c::event040, &dMsgFlow_c::event041, &dMsgFlow_c::event042,
|
||||
#if TARGET_PC
|
||||
&dMsgFlow_c::event043, &dMsgFlow_c::event044,
|
||||
#endif
|
||||
};
|
||||
|
||||
int dMsgFlow_c::event000(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
@@ -2706,3 +2717,19 @@ int dMsgFlow_c::event041(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speak
|
||||
int dMsgFlow_c::event042(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// rando events
|
||||
int dMsgFlow_c::event043(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dMsgFlow_c::event044(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
if (daPy_py_c::checkNowWolf()) {
|
||||
g_randomizerState.setHasPendingToDChange(true);
|
||||
} else {
|
||||
g_randomizerState.handleTimeOfDayChange();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@@ -2,7 +2,21 @@
|
||||
|
||||
# NOTE: All data is expressed in little endian
|
||||
|
||||
#0: # zel_00.bmg
|
||||
0: # zel_00.bmg
|
||||
# Change Talk to Midna options to use custom event 44
|
||||
# which changes the time of day
|
||||
- index: 0x18F
|
||||
type: event
|
||||
event: 44
|
||||
parameters: 0x00000000
|
||||
next node index: 0x116
|
||||
|
||||
- index: 0x192
|
||||
type: event
|
||||
event: 44
|
||||
parameters: 0x00000000
|
||||
next node index: 0x110
|
||||
|
||||
#1: # zel_01.bmg
|
||||
2: # zel_02.bmg
|
||||
# Patch Barnes branch to see if you can buy the bomb bag to use
|
||||
|
||||
@@ -324,6 +324,38 @@ Partially Filled Sky Book Get Item Text:
|
||||
<fast>You got a <red>Sky Character<white>!
|
||||
You've collected <red>{}<white> so far.
|
||||
|
||||
#Midna Call As Human Two Choice:
|
||||
# Standard:
|
||||
# Text: |-
|
||||
# <choice 1>Transform into wolf
|
||||
# <choice 2>Change time
|
||||
#
|
||||
#Midna Call As Wolf Two Choice:
|
||||
# Standard:
|
||||
# Text: |-
|
||||
# <choice 1>Transform into human
|
||||
# <choice 2>Change time
|
||||
|
||||
#Midna Call As Wolf No Shadow Crystal Two Choice:
|
||||
# Standard:
|
||||
# Text: |-
|
||||
# <choice 1>Warp
|
||||
# <choice 2>Change time
|
||||
|
||||
Midna Call As Human Three Choice:
|
||||
Standard:
|
||||
Text: |-
|
||||
<choice 1>Transform into wolf
|
||||
<choice 2>Warp
|
||||
<choice 3>Change time
|
||||
|
||||
Midna Call As Wolf Three Choice:
|
||||
Standard:
|
||||
Text: |-
|
||||
<choice 1>Transform into human
|
||||
<choice 2>Warp
|
||||
<choice 3>Change time
|
||||
|
||||
Charlo Donation Choice Text:
|
||||
Standard:
|
||||
Text: |-
|
||||
|
||||
@@ -222,6 +222,26 @@
|
||||
Group: 0
|
||||
Message Id: 335
|
||||
|
||||
#- Name: Midna Call As Human Two Choice
|
||||
# Group: 0
|
||||
# Message Id: 2004
|
||||
#
|
||||
#- Name: Midna Call As Wolf Two Choice
|
||||
# Group: 0
|
||||
# Message Id: 2005
|
||||
|
||||
#- Name: Midna Call As Wolf No Shadow Crystal Two Choice
|
||||
# Group: 0
|
||||
# Message Id: 2039
|
||||
|
||||
- Name: Midna Call As Human Three Choice
|
||||
Group: 0
|
||||
Message Id: 2040
|
||||
|
||||
- Name: Midna Call As Wolf Three Choice
|
||||
Group: 0
|
||||
Message Id: 2041
|
||||
|
||||
- Name: Charlo Donation Choice Text
|
||||
Group: 4
|
||||
Message Id: 6403
|
||||
|
||||
Reference in New Issue
Block a user