mirror of
https://github.com/zeldaret/tp
synced 2026-08-04 17:10:28 -04:00
merge
This commit is contained in:
+1
-15
@@ -8,6 +8,7 @@
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "JSystem/JStudio/JStudio/stb.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2AudioMgr.h"
|
||||
#include "d/a/d_a_horse_static.h"
|
||||
@@ -335,20 +336,6 @@ struct dCamera_c {
|
||||
/* 80181500 */ void GetForceLockOnActor();
|
||||
};
|
||||
|
||||
namespace JStudio {
|
||||
namespace stb {
|
||||
struct data {
|
||||
struct TParse_TParagraph_data {
|
||||
struct TData {};
|
||||
|
||||
/* 80289A80 */ void getData(JStudio::stb::data::TParse_TParagraph_data::TData*) const;
|
||||
};
|
||||
};
|
||||
|
||||
}; // namespace stb
|
||||
|
||||
}; // namespace JStudio
|
||||
|
||||
struct JASKernel {
|
||||
/* 80290B08 */ void getAramHeap();
|
||||
};
|
||||
@@ -3339,7 +3326,6 @@ extern "C" u8 mCurrentMtx__6J3DSys[48];
|
||||
extern "C" u8 sincosTable___5JMath[65536];
|
||||
extern "C" extern u32 g_whiteColor;
|
||||
extern "C" u16 m_branchId__7dDemo_c[1 + 3 /* padding */];
|
||||
extern "C" extern u32 __float_max;
|
||||
extern "C" extern u8 data_80450B38[4];
|
||||
extern "C" f32 mGroundY__11fopAcM_gc_c;
|
||||
extern "C" f32 mWaterY__11fopAcM_wt_c[1 + 1 /* padding */];
|
||||
|
||||
@@ -1201,7 +1201,7 @@ int dComIfG_play_c::getLayerNo(int param_0) {
|
||||
}
|
||||
|
||||
int layer = dComIfGp_getStartStageLayer();
|
||||
char* stage = dComIfGp_getStartStageName();
|
||||
const char* stage = dComIfGp_getStartStageName();
|
||||
|
||||
return getLayerNo_common(stage, roomNo, layer);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,6 @@ extern "C" u8 dist_table__12dAttention_c[6552];
|
||||
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u32 __float_max;
|
||||
extern "C" extern u8 data_80450F58[8];
|
||||
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
|
||||
|
||||
+3
-35
@@ -4,6 +4,9 @@
|
||||
//
|
||||
|
||||
#include "d/d_demo.h"
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "JSystem/JStudio/JStudio/fvb.h"
|
||||
#include "JSystem/JStudio/JStudio/stb.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -293,13 +296,6 @@ struct TControl {
|
||||
|
||||
}; // namespace ctb
|
||||
|
||||
namespace fvb {
|
||||
struct TControl {
|
||||
/* 802847D0 */ void destroyObject_all();
|
||||
};
|
||||
|
||||
}; // namespace fvb
|
||||
|
||||
struct TCreateObject {
|
||||
/* 80285488 */ ~TCreateObject();
|
||||
};
|
||||
@@ -332,25 +328,6 @@ struct TAdaptor_message {
|
||||
/* 802875E0 */ ~TAdaptor_message();
|
||||
};
|
||||
|
||||
namespace stb {
|
||||
struct data {
|
||||
struct TParse_TBlock_object {};
|
||||
|
||||
struct TParse_TParagraph_data {
|
||||
struct TData {};
|
||||
|
||||
/* 80289A80 */ void getData(JStudio::stb::data::TParse_TParagraph_data::TData*) const;
|
||||
};
|
||||
};
|
||||
|
||||
struct TControl {
|
||||
/* 80289300 */ void destroyObject_all();
|
||||
/* 80289404 */ void reset();
|
||||
/* 802894B4 */ void forward(u32);
|
||||
};
|
||||
|
||||
}; // namespace stb
|
||||
|
||||
struct TObject_message {
|
||||
/* 80287640 */ TObject_message(JStudio::stb::data::TParse_TBlock_object const&,
|
||||
JStudio::TAdaptor_message*);
|
||||
@@ -377,15 +354,6 @@ struct JMessage {
|
||||
};
|
||||
};
|
||||
|
||||
namespace JGadget {
|
||||
struct binary {
|
||||
struct TParse_header_block {
|
||||
/* 802DC910 */ void parse_next(void const**, u32);
|
||||
};
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
@@ -302,7 +302,6 @@ extern "C" u8 mBackColor__13mDoGph_gInf_c[4];
|
||||
extern "C" extern u8 g_clearColor[4];
|
||||
extern "C" extern u32 g_blackColor;
|
||||
extern "C" extern u32 g_whiteColor;
|
||||
extern "C" extern u32 __float_max;
|
||||
extern "C" f32 mSystemFar__14mDoLib_clipper;
|
||||
extern "C" f32 mFovyRate__14mDoLib_clipper;
|
||||
extern "C" extern f32 G_CM3D_F_ABS_MIN[1 + 1 /* padding */];
|
||||
|
||||
+1
-1
@@ -2588,7 +2588,7 @@ u8 check_itemno(int i_itemId) {
|
||||
|
||||
if (g_dComIfG_gameInfo.play.getLayerNo(0) == 0xD ||
|
||||
g_dComIfG_gameInfo.play.getLayerNo(0) == 0xE) {
|
||||
char* tmp = dComIfGp_getStartStageName();
|
||||
const char* tmp = dComIfGp_getStartStageName();
|
||||
// D_MN08: Palace of Twilight
|
||||
if (strncmp(tmp, "D_MN08", 6)) {
|
||||
return GREEN_RUPEE;
|
||||
|
||||
@@ -88,7 +88,6 @@ extern "C" extern void* __vt__8cM3dGPla[3];
|
||||
extern "C" extern void* __vt__8cM3dGCyl[3];
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
extern "C" u8 BaseZ__4cXyz[12];
|
||||
extern "C" extern u32 __float_max;
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ SECTION_DEAD static char const* const pad_80394F3D = "\0\0";
|
||||
// matching but need gameinfo setup
|
||||
#ifdef NONMATCHING
|
||||
bool dKyeff_c::execute() {
|
||||
char* stageName = dComIfGp_getStartStageName();
|
||||
const char* stageName = dComIfGp_getStartStageName();
|
||||
int strcmp_result = strcmp(stageName, "Name"); // strcmp(stageName,"Name");
|
||||
if (strcmp_result != 0) {
|
||||
dKyw_wether_move();
|
||||
|
||||
+2
-2
@@ -546,8 +546,8 @@ static asm int dStage_RoomKeepDoorInit(dStage_dt_c* param_0, void* param_1, int
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
void dStage_startStage_c::set(const char* i_Stage, s8 i_RoomNo, s16 i_Point, s8 i_Layer) {
|
||||
strcpy(mStage, i_Stage);
|
||||
void dStage_startStage_c::set(const char* i_Name, s8 i_RoomNo, s16 i_Point, s8 i_Layer) {
|
||||
strcpy(mName, i_Name);
|
||||
mRoomNo = i_RoomNo;
|
||||
mPoint = i_Point;
|
||||
mLayer = i_Layer;
|
||||
|
||||
+159
-38
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "d/kankyo/d_kankyo.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/kankyo/d_kankyo_data.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -383,6 +384,12 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
// TODO: Temporarily putting here. There is said to be some issues in `d_com_inf_game.h` which need
|
||||
// to be sorted out before we can correctly use this function from there.
|
||||
inline BOOL dComIfGs_isEventBit(u16 id) {
|
||||
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
|
||||
}
|
||||
|
||||
/* 8019C388-8019C3A4 196CC8 001C+00 2/2 0/0 0/0 .text dKy_WolfPowerup_AmbCol__FP11_GXColorS10 */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
@@ -3177,52 +3184,166 @@ asm void dKy_darkworld_check() {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80394C6C-80394C6C 0212CC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_80394ED5 = "F_SP108";
|
||||
#pragma pop
|
||||
|
||||
/**
|
||||
* @brief Returns the following info about a room: (1) if the room must not be in twilight and (2)
|
||||
* which darkLv the room belongs to (Faron, Eldin, etc.).
|
||||
*
|
||||
* @param stageName stage name
|
||||
* @param roomNo room number
|
||||
* @param out_darkLv byte pointer to write darkLv to, or NULL
|
||||
* @param tblIndex index in darkworld table for the stageName
|
||||
* @return int Returns -1 if the given room must not be loaded in twilight, else returns 0 or 1. A
|
||||
* return of 1 means darkLv should be read from out_darkLv and 0 means it should be read from the
|
||||
* darkworld table.
|
||||
*/
|
||||
/* 801AC5BC-801AC70C 1A6EFC 0150+00 3/3 0/0 0/0 .text dKy_F_SP121Check__FPCciPUci */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dKy_F_SP121Check(char const* param_0, int param_1, u8* param_2, int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/kankyo/d_kankyo/dKy_F_SP121Check__FPCciPUci.s"
|
||||
}
|
||||
#pragma pop
|
||||
static int dKy_F_SP121Check(char const* stageName, int roomNo, u8* out_darkLv, int tblIndex) {
|
||||
dKyd_darkworldTblEntry* darkworldTbl = dKyd_darkworld_tbl_getp();
|
||||
int result = 0;
|
||||
|
||||
if (out_darkLv != NULL) {
|
||||
*out_darkLv = UNCLEARABLE;
|
||||
}
|
||||
|
||||
// Stage is Hyrule Field
|
||||
if (!strcmp(stageName, "F_SP121")) {
|
||||
// Room is one of:
|
||||
// - Eldin Field (0)
|
||||
// - Kakariko Gorge (3)
|
||||
// - Eldin Field / Kakariko Gorge Path North (5) and South (4)
|
||||
// - Faron Field / Kakariko Gorge Path North (2)
|
||||
// - Outside Hidden Village (7)
|
||||
if (roomNo == 0 || (2 <= roomNo && roomNo <= 5) || roomNo == 7) {
|
||||
if (out_darkLv != NULL) {
|
||||
*out_darkLv = ELDIN;
|
||||
}
|
||||
result = 1;
|
||||
}
|
||||
|
||||
// Room is one of:
|
||||
// - Lanayru Field (10)
|
||||
// - Great Bridge of Hylia (13)
|
||||
// - Lanayru Field / Great Bridge of Hylia Path North (11) and South (12)
|
||||
// - Faron Field / Great Bridge of Hylia Path North (14)
|
||||
// - Lanayru Field / Outside Hidden Village Path (9)
|
||||
else if (roomNo >= 9 && roomNo <= 14) {
|
||||
if (out_darkLv != NULL) {
|
||||
*out_darkLv = LANAYRU;
|
||||
}
|
||||
result = 1;
|
||||
}
|
||||
|
||||
// Room is one of:
|
||||
// - Faron Field (6)
|
||||
// - Faron Field / Kakariko Gorge Path South (1)
|
||||
// - Faron Field / Great Bridge of Hylia Path South (15)
|
||||
else {
|
||||
result = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Faron Spring; No twilight during Rusl cutscene at very beginning of game.
|
||||
else if (!strcmp(stageName, "F_SP108") && roomNo == 1 && dComIfGp_getStartStageLayer() == 13) {
|
||||
result = -1;
|
||||
}
|
||||
|
||||
// Prevent twilight if stage depends on Faron Twilight cleared status (Faron Woods, Coro's
|
||||
// Lantern Shop, Faron Woods Cave) but haven't finished Ordon Day 2.
|
||||
if (darkworldTbl[tblIndex].darkLv == FARON && !dComIfGs_isEventBit(0x4510)) {
|
||||
result = -1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns TRUE if (1) the room is one which can be loaded in twilight, (2) there is nothing
|
||||
* currently preventing it from being loaded in twilight, and (3) the player has not cleared the
|
||||
* relevant dark level (Faron Twilight, etc.). Otherwise returns FALSE.
|
||||
*
|
||||
* @param stageName stage name
|
||||
* @param roomNo room number
|
||||
* @return BOOL Returns TRUE if the room can be loaded as twilight and the player has not already
|
||||
* cleared it, else FALSE.
|
||||
*/
|
||||
/* 801AC70C-801AC7E0 1A704C 00D4+00 0/0 2/2 0/0 .text dKy_darkworld_stage_check__FPCci */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm bool dKy_darkworld_stage_check(char const* param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/kankyo/d_kankyo/dKy_darkworld_stage_check__FPCci.s"
|
||||
}
|
||||
#pragma pop
|
||||
BOOL dKy_darkworld_stage_check(char const* stageName, int roomNo) {
|
||||
dKyd_darkworldTblEntry* darkworldTbl = dKyd_darkworld_tbl_getp();
|
||||
BOOL result = FALSE;
|
||||
u8 darkLv[1];
|
||||
|
||||
/* 801AC7E0-801AC870 1A7120 0090+00 0/0 1/1 0/0 .text dKy_darkworld_spot_check__FPCci */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dKy_darkworld_spot_check(char const* param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/kankyo/d_kankyo/dKy_darkworld_spot_check__FPCci.s"
|
||||
for (int i = 0; i < 34; i++) {
|
||||
if (!strcmp(stageName, darkworldTbl[i].stageName)) {
|
||||
if (darkworldTbl[i].darkLv != ALWAYS_DARK) {
|
||||
int fsp121CheckResult = dKy_F_SP121Check(stageName, roomNo, darkLv, i);
|
||||
if (fsp121CheckResult >= 0) {
|
||||
if (fsp121CheckResult == 0) {
|
||||
*darkLv = darkworldTbl[i].darkLv;
|
||||
}
|
||||
if (!dComIfGs_isDarkClearLV(*darkLv)) {
|
||||
result = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// ALWAYS_DARK is used to force twilight (likely for testing). This will
|
||||
// never normally run since it is not present in l_darkworld_tbl.
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns TRUE if a given room would be loaded in twilight. This function always behaves as
|
||||
* if the player has not cleared any twilights.
|
||||
*
|
||||
* For example, Eldin Field will always return TRUE. Faron Woods on the other hand might return TRUE
|
||||
* or FALSE depending on whether or not the player has completed Ordon Day 2.
|
||||
*
|
||||
* @param stageName stage name
|
||||
* @param roomNo room number
|
||||
* @return BOOL Returns TRUE if a given room would be loaded in twilight. This function always
|
||||
* behaves as if the player has not cleared any twilights.
|
||||
*/
|
||||
/* 801AC7E0-801AC870 1A7120 0090+00 0/0 1/1 0/0 .text dKy_darkworld_spot_check__FPCci */
|
||||
BOOL dKy_darkworld_spot_check(char const* stageName, int roomNo) {
|
||||
dKyd_darkworldTblEntry* darkworldTblPtr = dKyd_darkworld_tbl_getp();
|
||||
BOOL result = FALSE;
|
||||
|
||||
for (int i = 0; i < 34; i++) {
|
||||
if (!strcmp(stageName, darkworldTblPtr->stageName) &&
|
||||
dKy_F_SP121Check(stageName, roomNo, NULL, i) >= 0) {
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
darkworldTblPtr++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 801AC870-801AC918 1A71B0 00A8+00 0/0 1/1 0/0 .text dKy_darkworld_Area_set__FPCci */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dKy_darkworld_Area_set(char const* param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/kankyo/d_kankyo/dKy_darkworld_Area_set__FPCci.s"
|
||||
void dKy_darkworld_Area_set(char const* stageName, int roomNo) {
|
||||
dKyd_darkworldTblEntry* darkworldTblPtr = dKyd_darkworld_tbl_getp();
|
||||
u8 darkLv[1];
|
||||
|
||||
for (int i = 0; i < 34; i++) {
|
||||
if (!strcmp(stageName, darkworldTblPtr[i].stageName)) {
|
||||
int fsp121CheckResult = dKy_F_SP121Check(stageName, roomNo, darkLv, i);
|
||||
if (fsp121CheckResult >= 0) {
|
||||
if (fsp121CheckResult == 0) {
|
||||
*darkLv = darkworldTblPtr[i].darkLv;
|
||||
}
|
||||
dComIfGp_setStartStageDarkArea(*darkLv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453E00-80453E04 002400 0004+00 1/1 0/0 0/0 .sdata2 @10483 */
|
||||
|
||||
+356
-956
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#include "d/msg/d_msg_object.h"
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -388,21 +389,6 @@ struct JMessage {
|
||||
};
|
||||
};
|
||||
|
||||
namespace JGadget {
|
||||
struct binary {
|
||||
struct TParse_header_block {
|
||||
/* 802DC910 */ void parse_next(void const**, u32);
|
||||
};
|
||||
};
|
||||
|
||||
struct TNodeLinkList {
|
||||
struct iterator {};
|
||||
|
||||
/* 802DCA58 */ void erase(JGadget::TNodeLinkList::iterator);
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#include "d/msg/d_msg_string_base.h"
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -79,21 +80,6 @@ struct JKRArchive {
|
||||
/* 802D5B38 */ void getGlbResource(u32, char const*, JKRArchive*);
|
||||
};
|
||||
|
||||
namespace JGadget {
|
||||
struct binary {
|
||||
struct TParse_header_block {
|
||||
/* 802DC910 */ void parse_next(void const**, u32);
|
||||
};
|
||||
};
|
||||
|
||||
struct TNodeLinkList {
|
||||
struct iterator {};
|
||||
|
||||
/* 802DCA58 */ void erase(JGadget::TNodeLinkList::iterator);
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user