mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04:00
d_kankyo_data and d_kankyo work (#158)
* Copy over progress * Comment other d_kankyo_data dat section stuff * Compiling * Progress * Progress * Close * Match * Clean * Change loop * Clean * Clean * Before attempt clean * Work on dKy_F_SP121Check, not compiling * Adjust comparisons * Adjust headers * Close * Matching * Remove * Comments * Fix u8 pointer * Comment * Adjust * Comment stage names * Rename member * Decomp dKy_darkworld_spot_check * Decomp dKy_darkworld_Area_set * Adjust * Comments, small adjust * Add phase1 base txt * Working through d_s_play phase_1 * Finish function outline * Comments * Add darkLv enum * Rename enum * Refactor * Comment * Documentation * Move out notes * Comments * Adjust * Rename structs * Comments * Minor adjust * Comment * Adjust and Comments * Adjust * Adjust * Comment * Clean * Add back addresses * Adjust comment * Adjust comments * Comments * Comment * Adjust for clang-format-10 * Edit getName * Fix fog table * Make l_field_data use placeholder struct * Make l_envr_default use placeholder struct * Make l_vr_box_data use placeholder struct * Make l_pselect_default use placeholder struct
This commit is contained in:
@@ -157,7 +157,7 @@ public:
|
||||
void setMaxOxygen(int max) { mMaxOxygen = max; }
|
||||
u8 getDoStatus() { return mDoStatus; }
|
||||
u8 getRStatus() { return mRStatus; }
|
||||
char* getStartStageName() { return mStartStage.getName(); }
|
||||
const char* getStartStageName() { return mStartStage.getName(); }
|
||||
s8 getStartStageRoomNo() { return mStartStage.getRoomNo(); }
|
||||
s8 getStartStageLayer() { return mStartStage.getLayer(); }
|
||||
u8 isHeapLockFlag() { return mHeapLockFlag; }
|
||||
@@ -173,6 +173,8 @@ public:
|
||||
dAttention_c& getAttention() { return mAttention; }
|
||||
JKRArchive* getMsgDtArchive(int idx) { return mMsgDtArchive[idx]; }
|
||||
s16 getStartStagePoint() { return mStartStage.getPoint(); }
|
||||
s8 getStartStageDarkArea() { return mStartStage.getDarkArea(); }
|
||||
void setStartStageDarkArea(s8 darkArea) { mStartStage.setDarkArea(darkArea); }
|
||||
void* getPlayerPtr(int ptrIdx) { return mPlayerPtr[ptrIdx]; }
|
||||
JKRArchive* getMain2DArchive() { return mMain2DArchive; }
|
||||
J2DGrafContext* getCurrentGrafPort() { return mCurrentGrafPort; }
|
||||
@@ -741,7 +743,7 @@ inline u32 dComIfGp_getNowVibration() {
|
||||
return g_dComIfG_gameInfo.play.getNowVibration();
|
||||
}
|
||||
|
||||
inline char* dComIfGp_getStartStageName() {
|
||||
inline const char* dComIfGp_getStartStageName() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageName();
|
||||
}
|
||||
|
||||
@@ -757,6 +759,10 @@ inline s8 dComIfGp_roomControl_getStayNo() {
|
||||
return dStage_roomControl_c::getStayNo();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setStartStage(dStage_startStage_c* pStartStage) {
|
||||
g_dComIfG_gameInfo.play.setStartStage(pStartStage);
|
||||
}
|
||||
|
||||
inline s8 dComIfGp_getStartStageRoomNo() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageRoomNo();
|
||||
}
|
||||
@@ -765,6 +771,14 @@ inline s8 dComIfGp_getStartStageLayer() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageLayer();
|
||||
}
|
||||
|
||||
inline s8 dComIfGp_getStartStageDarkArea() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageDarkArea();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setStartStageDarkArea(s8 darkArea) {
|
||||
g_dComIfG_gameInfo.play.setStartStageDarkArea(darkArea);
|
||||
}
|
||||
|
||||
inline roomRead_class* dComIfGp_getStageRoom() {
|
||||
return g_dComIfG_gameInfo.play.getStage().getRoom();
|
||||
}
|
||||
|
||||
+7
-4
@@ -548,13 +548,16 @@ private:
|
||||
class dStage_startStage_c {
|
||||
public:
|
||||
void set(const char*, s8, s16, s8);
|
||||
inline char* getName() { return mStage; }
|
||||
s8 getLayer() { return mLayer; }
|
||||
const char* getName() const { return mName; }
|
||||
s16 getPoint() const { return mPoint; }
|
||||
s8 getRoomNo() const { return mRoomNo; }
|
||||
s16 getPoint() { return mPoint; }
|
||||
s8 getLayer() const { return mLayer; }
|
||||
void setLayer(s8 layer) { mLayer = layer; }
|
||||
s8 getDarkArea() const { return mDarkArea; }
|
||||
void setDarkArea(s8 darkArea) { mDarkArea = darkArea; }
|
||||
|
||||
private:
|
||||
/* 0x0 */ char mStage[8];
|
||||
/* 0x0 */ char mName[8];
|
||||
/* 0x8 */ s16 mPoint;
|
||||
/* 0xA */ s8 mRoomNo;
|
||||
/* 0xB */ s8 mLayer;
|
||||
|
||||
@@ -3,4 +3,49 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Invented name; Used as u8 `darkLv` in dKyd_darkworldTblEntry.
|
||||
enum dKyd_DARKLV {
|
||||
FARON = 0,
|
||||
ELDIN = 1,
|
||||
LANAYRU = 2,
|
||||
TEST = 5, // Only used with nonexistent test stages
|
||||
UNCLEARABLE = 6, // Default. Palace of Twilight stages use this
|
||||
ALWAYS_DARK = 8, // Unused. Forces Twilight
|
||||
};
|
||||
|
||||
// Invented name
|
||||
struct dKyd_darkworldTblEntry {
|
||||
char* stageName;
|
||||
u8 darkLv;
|
||||
}; // Size: 0x8
|
||||
|
||||
// Invented name; adjust as needed in the future.
|
||||
// Notes (needs more investigation):
|
||||
// startTime and endTime are in the range 0 to 360, which is the same as the current time of day.
|
||||
// l_time_attribute and l_time_attribute_boss are arrays of `dKyd_lightSchedjule` with their times
|
||||
// set up such that the current time of day will fall in the range of one dKyd_lightSchedjule. For
|
||||
// example, if the current time is 110.0f (7:20 AM), then the dKyd_lightSchedjule {105.0f, 135.0f,
|
||||
// 1, 2} would be selected. If the time was 105.0f, we would use light 1. If the time was 135.0f, we
|
||||
// would use light 2. Since 110.0f is closer to 105.0f than 135.0f, we get a blend of lights 1 and 2
|
||||
// which is mostly 1. Blending the lights over time is how we get a smooth day-night transition.
|
||||
struct dKyd_lightSchejule {
|
||||
float startTime;
|
||||
float endTime;
|
||||
u8 startTimeLight;
|
||||
u8 endTimeLight;
|
||||
}; // Size: 0xC
|
||||
|
||||
void* dKyd_dmpalet_getp();
|
||||
void* dKyd_dmpselect_getp();
|
||||
void* dKyd_dmenvr_getp();
|
||||
void* dKyd_dmvrbox_getp();
|
||||
dKyd_lightSchejule* dKyd_schejule_getp();
|
||||
dKyd_lightSchejule* dKyd_schejule_boss_getp();
|
||||
void dKyd_xfog_table_set(u8);
|
||||
void* dKyd_maple_col_getp();
|
||||
dKyd_darkworldTblEntry* dKyd_darkworld_tbl_getp();
|
||||
void* dKyd_light_size_tbl_getp();
|
||||
void* dKyd_light_tw_size_tbl_getp();
|
||||
void* dKyd_BloomInf_tbl_getp(int);
|
||||
|
||||
#endif /* D_KANKYO_D_KANKYO_DATA_H */
|
||||
|
||||
Reference in New Issue
Block a user