d_stage / d_lib (#136)

* d_lib move

* move / work on d_stage

* add mDoExt funcs to header

* d_kyeff/kyeff2, d_bg_s_poly_pass_chk

* use array_size in d_stage
This commit is contained in:
TakaRikka
2021-06-18 06:33:51 -07:00
committed by GitHub
parent 8c2a3ae7ea
commit ba5ad31b54
185 changed files with 1626 additions and 4873 deletions
+50 -31
View File
@@ -4,6 +4,7 @@
//
#include "d/d_kyeff.h"
#include "d/kankyo/d_kankyo_wether.h"
#include "dol2asm.h"
#include "dolphin/types.h"
@@ -13,10 +14,6 @@
struct kankyo_class {};
struct dKyeff_c {
/* 801ADD5C */ void execute();
};
struct Z2EnvSeMgr {
/* 802C66B0 */ void framework();
};
@@ -58,15 +55,10 @@ extern "C" extern u8 g_mEnvSeMgr[780];
// Declarations:
//
/* 801ADD38-801ADD5C 1A8678 0024+00 1/0 0/0 0/0 .text dKyeff_Draw__FP8dKyeff_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyeff_Draw(dKyeff_c* param_0) {
nofralloc
#include "asm/d/d_kyeff/dKyeff_Draw__FP8dKyeff_c.s"
static bool dKyeff_Draw(dKyeff_c* ptr) {
dKyw_wether_draw();
return true;
}
#pragma pop
/* ############################################################################################## */
/* 80394F38-80394F38 021598 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -78,39 +70,42 @@ SECTION_DEAD static char const* const pad_80394F3D = "\0\0";
#pragma pop
/* 801ADD5C-801ADDB4 1A869C 0058+00 1/1 0/0 0/0 .text execute__8dKyeff_cFv */
// matching but need gameinfo setup
#ifdef NONMATCHING
bool dKyeff_c::execute() {
char* stageName = dComIfGp_getStartStageName();
int strcmp_result = strcmp(stageName, "Name"); // strcmp(stageName,"Name");
if (strcmp_result != 0) {
dKyw_wether_move();
}
dKyw_wether_move_draw();
dKy_FiveSenses_fullthrottle_dark();
mDoAud_mEnvse_framework();
return true;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyeff_c::execute() {
asm bool dKyeff_c::execute() {
nofralloc
#include "asm/d/d_kyeff/execute__8dKyeff_cFv.s"
}
#pragma pop
#endif
/* 801ADDB4-801ADDD4 1A86F4 0020+00 1/0 0/0 0/0 .text dKyeff_Execute__FP8dKyeff_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyeff_Execute(dKyeff_c* param_0) {
nofralloc
#include "asm/d/d_kyeff/dKyeff_Execute__FP8dKyeff_c.s"
static bool dKyeff_Execute(dKyeff_c* ptr) {
return ptr->execute();
}
#pragma pop
/* 801ADDD4-801ADDDC 1A8714 0008+00 1/0 0/0 0/0 .text dKyeff_IsDelete__FP8dKyeff_c */
static bool dKyeff_IsDelete(dKyeff_c* param_0) {
static bool dKyeff_IsDelete(dKyeff_c* ptr) {
return true;
}
/* 801ADDDC-801ADE00 1A871C 0024+00 1/0 0/0 0/0 .text dKyeff_Delete__FP8dKyeff_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyeff_Delete(dKyeff_c* param_0) {
nofralloc
#include "asm/d/d_kyeff/dKyeff_Delete__FP8dKyeff_c.s"
static bool dKyeff_Delete(dKyeff_c* ptr) {
dKyw_wether_delete();
return true;
}
#pragma pop
/* ############################################################################################## */
/* 80453E58-80453E5C 002458 0004+00 1/1 0/0 0/0 .sdata2 @3804 */
@@ -134,6 +129,29 @@ SECTION_SDATA2 static f32 lit_3843 = 7.0f / 10.0f;
SECTION_SDATA2 static f32 lit_3844 = 15.0f;
/* 801ADE00-801ADEA0 1A8740 00A0+00 1/0 0/0 0/0 .text dKyeff_Create__FP12kankyo_class */
// matching but need gameinfo setup
#ifdef NONMATCHING
u32 dKyeff_Create(kankyo_class* kankyo_class_ptr) {
int strcmp_result;
OSTime Time;
OSCalendarTime CalendarTime;
dKyw_wether_init();
strcmp_result = strcmp(dComIfGp_getStartStageName(), "Name");
if (strcmp_result == 0) {
Time = OSGetTime();
OSTicksToCalendarTime(
Time,
&CalendarTime); // CONCAT44(iVar1,(int)((ulonglong)OVar2 >> 0x20)),&CalendarTime);
lbl_8042CA54.field_0xe48 = 1.0f;
lbl_8042CA54.field_0xe4c = 0.0f;
lbl_8042CA54.field_0xe50 = 0.0f;
lbl_8042CA54.field_0xe58 = 0.7f;
lbl_8042CA54.field_0x1244 = CalendarTime.hours * 15.0f;
}
return 4;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -142,6 +160,7 @@ static asm void dKyeff_Create(kankyo_class* param_0) {
#include "asm/d/d_kyeff/dKyeff_Create__FP12kankyo_class.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 803BC158-803BC16C -00001 0014+00 1/0 0/0 0/0 .data l_dKyeff_Method */