mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-02 01:30:00 -04:00
Ongoing gameplay dev (#49)
* launch.json cwd * bodge to load gci for testing * stub card stat * gameplay bodges * viewport, ub fixes * add release with debug info cmake variant * be fixes, sound stub * viewport h * d_msg_flow BE * be fopAcM_createItemFromEnemyID * update launch configuration to use iso * more audio stubs * Attempt to set viewport and get messages for brightness check * skip opening scene again, fixed JMessage::TResourceContainer::TCResource::Do_destroy * add guards for viewport changes * moar endian swapping to get Link sitting in PROC_OPENING_SCENE and for dialogues * BE d_msg_class i_data * stub bgm start * fix div by 0 error (for now) * TEMP_BROKEN in d_menu_ring * REQUIRES_GX_LINES * properly stub renderingAmap::draw with REQUIRES_GX_LINES * better stubbing outside of stubs * fix event data getting swapped multiple times * evil draw vp fix * Stub log imgui This redirects all spammy logs to an imgui window that is cleared per frame. This fixes the serious performance dip of the logging, and makes the regular log readable. * Oops move those optimization changes I accidentally committed behind a flag DUSK_SELECTED_OPT * gx_line macro in map * fix audio stubbing * switch to CARD API aurora impl * remove kabufuda from link libs * refactor imgui stuff and add input viewer * merge stub log with refactor * accidentally committed a metaforce header shh * basic map loader * ImGuiConsole: Add missing <thread> include * you may now play as luigi (you may now load stages with bridges) * bloom fix * bloom leak fix * cloud shadow fix * add soft reset button to imgui menu * if it broke dont not fix it * i swear i committed this * BE swap indMtx in JPAResource::setPTev * wnark ct fix * frsqrte implementation from kinoko * Fix Clang compile error in JAISeq::prepare_getSeqData_ * Add endian conversions to dMsgFlow_c::getInitNodeIndex This fixes a freeze when Fado tries to stop you from leaving the starting area. * Add RAII GXTexObj wrapper; fix almost all leaks * Update aurora for indirect texturing * Update aurora for CARD fix * Fix Clang build * More d_msg_flow endian fixes Fixes softlock when trying to talk to Fado and possibly other NPCs. * no frame limiter * get pause menu working * proper frame limiting * particle pointer size fix * improve map loader a bit --------- Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net> Co-authored-by: TakaRikka <takarikka@outlook.com> Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com> Co-authored-by: Luke Street <luke@street.dev> Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com> Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com> Co-authored-by: tgsm <doodrabbit@hotmail.com> Co-authored-by: Max Roncace <me@caseif.net> Co-authored-by: Phillip Stephens <antidote.crk@gmail.com>
This commit is contained in:
+16
-16
@@ -49,8 +49,8 @@ void dMsgFlow_c::init(fopAc_ac_c* i_partner, int i_flowID, int param_2, fopAc_ac
|
||||
|
||||
labelInfoTBL = mLabelInfo_p + 0x10;
|
||||
mFlowNodeTBL = (mesg_flow*)(mFlow_p + 0x10);
|
||||
mFlowIdxTBL = (u16*)(mFlowNodeTBL + (*(u16*)(mFlow_p + 8)));
|
||||
field_0x18 = mFlowIdxTBL + *(u16*)(mFlow_p + 8);
|
||||
mFlowIdxTBL = (BE(u16)*)(mFlowNodeTBL + (*(BE(u16)*)(mFlow_p + 8)));
|
||||
field_0x18 = mFlowIdxTBL + *(BE(u16)*)(mFlow_p + 8);
|
||||
|
||||
mFlow = prevFlowID;
|
||||
|
||||
@@ -322,8 +322,8 @@ void dMsgFlow_c::setInitValueGroupChange(int i_msgNo, fopAc_ac_c** i_talkPartner
|
||||
labelInfoTBL = mLabelInfo_p + 0x10;
|
||||
|
||||
mFlowNodeTBL = (mesg_flow*)(mFlow_p + 0x10);
|
||||
mFlowIdxTBL = (u16*)(mFlowNodeTBL + *(u16*)(mFlow_p + 8));
|
||||
field_0x18 = mFlowIdxTBL + *(u16*)(mFlow_p + 8);
|
||||
mFlowIdxTBL = (BE(u16)*)(mFlowNodeTBL + *(BE(u16)*)(mFlow_p + 8));
|
||||
field_0x18 = mFlowIdxTBL + *(BE(u16)*)(mFlow_p + 8);
|
||||
mFlow = var_r28;
|
||||
setNodeIndex(getInitNodeIndex(mFlow), i_talkPartners);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ u8* dMsgFlow_c::getMsgDataBlock(char const* block_tag) {
|
||||
aMsgRes_p = dMsgObject_getMsgDtPtr();
|
||||
JUT_ASSERT(742, NULL != aMsgRes_p);
|
||||
|
||||
u32 num = *(u32*)(aMsgRes_p + 0xC);
|
||||
u32 num = *(BE(u32)*)(aMsgRes_p + 0xC);
|
||||
aMsgRes_p += 0x20;
|
||||
|
||||
for (u32 i = 0; i < num; i++) {
|
||||
@@ -348,7 +348,7 @@ u8* dMsgFlow_c::getMsgDataBlock(char const* block_tag) {
|
||||
return aMsgRes_p;
|
||||
}
|
||||
|
||||
aMsgRes_p += *(int*)(block_p + 4);
|
||||
aMsgRes_p += *(BE(int)*)(block_p + 4);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -361,9 +361,9 @@ u16 dMsgFlow_c::getInitNodeIndex(u16 param_1) {
|
||||
JUT_ASSERT(777, NULL != mLabelInfo_p);
|
||||
var_r30 = mLabelInfo_p + 0x10;
|
||||
|
||||
for (int i = 0; i < *(u16*)(mLabelInfo_p + 8); i++) {
|
||||
if (*(u32*)var_r30 >> 16 == param_1) {
|
||||
var_r27 = *(u16*)(var_r30 + 4);
|
||||
for (int i = 0; i < *(BE(u16)*)(mLabelInfo_p + 8); i++) {
|
||||
if (*(BE(u32)*)var_r30 >> 16 == param_1) {
|
||||
var_r27 = *(BE(u16)*)(var_r30 + 4);
|
||||
}
|
||||
|
||||
var_r30 += 0x8;
|
||||
@@ -441,13 +441,13 @@ void dMsgFlow_c::setNodeIndex(u16 i_nodeIdx, fopAc_ac_c** i_talkPartners) {
|
||||
|
||||
int dMsgFlow_c::setSelectMsg(mesg_flow_node* i_flowNode_p, mesg_flow_node* param_2,
|
||||
fopAc_ac_c* i_speaker_p) {
|
||||
u16* inf_p = NULL;
|
||||
BE(u16)* inf_p = NULL;
|
||||
u16 temp_r25;
|
||||
u16 msg_no;
|
||||
|
||||
mesg_flow_node* var_r29 = NULL;
|
||||
|
||||
inf_p = (u16*)getMsgDataBlock("INF1");
|
||||
inf_p = (BE(u16)*)getMsgDataBlock("INF1");
|
||||
|
||||
var_r29 = param_2;
|
||||
temp_r25 = ((inf_p + (var_r29->msg_index) * 10))[10];
|
||||
@@ -491,13 +491,13 @@ int dMsgFlow_c::setSelectMsg(mesg_flow_node* i_flowNode_p, mesg_flow_node* param
|
||||
}
|
||||
|
||||
int dMsgFlow_c::setNormalMsg(mesg_flow_node* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
u16* inf_p = NULL;
|
||||
BE(u16)* inf_p = NULL;
|
||||
mesg_flow_node* var_r29 = NULL;
|
||||
u16 msg_no;
|
||||
|
||||
var_r29 = i_flowNode_p;
|
||||
inf_p = (u16*)getMsgDataBlock("INF1");
|
||||
msg_no = ((inf_p + (var_r29->msg_index) * 10))[10];
|
||||
inf_p = (BE(u16)*)getMsgDataBlock("INF1");
|
||||
msg_no = (inf_p + (var_r29->msg_index) * 10)[10];
|
||||
|
||||
// "Message Set"
|
||||
OS_REPORT("\x1B[44;37mメッセ−ジセット \x1B[m|:");
|
||||
@@ -727,8 +727,8 @@ int dMsgFlow_c::nodeProc(fopAc_ac_c* i_speaker_p, fopAc_ac_c** i_talkPartners) {
|
||||
}
|
||||
|
||||
int dMsgFlow_c::getParam(u16* prm0, u16* prm1, u8* params) {
|
||||
*prm0 = *(u16*)params;
|
||||
*prm1 = *(u16*)(params + 2);
|
||||
*prm0 = *(BE(u16)*)params;
|
||||
*prm1 = *(BE(u16)*)(params + 2);
|
||||
|
||||
return *(int*)params;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user