Files
tp/include/d/kankyo/d_kankyo_data.h
T
icogn f6f7e7ce38 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
2021-12-02 23:43:22 +01:00

52 lines
1.8 KiB
C

#ifndef D_KANKYO_D_KANKYO_DATA_H
#define D_KANKYO_D_KANKYO_DATA_H
#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 */