Kytag09 and Kytag11 OK, work on d_a_bg_obj and d_kankyo (#1877)

* work on kankyo / d_a_bg_obj

* d_a_bg_obj work / kytag09 and kytag11 OK

* remove asm
This commit is contained in:
TakaRikka
2023-08-12 18:09:47 -06:00
committed by GitHub
parent c8bb857b13
commit 08fa2f03fc
75 changed files with 1831 additions and 4386 deletions
+33 -29
View File
@@ -562,7 +562,7 @@ SECTION_DEAD static char const* const stringBase_804593C6 = "room.plc";
#pragma pop
/* 804582B8-80458750 000738 0498+00 2/2 0/0 1/1 .text createHeap__6daBg_cFv */
// regalloc
// regalloc, but equivalent
#ifdef NONMATCHING
int daBg_c::createHeap() {
const char* arcName = setArcName();
@@ -773,6 +773,7 @@ SECTION_DEAD static char const* const stringBase_80459418 = "MA00_Kusa";
#pragma pop
/* 804588C4-80458F38 000D44 0674+00 1/1 0/0 0/0 .text draw__6daBg_cFv */
// just regalloc + some reorder issues
#ifdef NONMATCHING
int daBg_c::draw() {
int roomNo = fopAcM_GetParam(this);
@@ -782,8 +783,10 @@ int daBg_c::draw() {
mDoLib_clipper::changeFar(1000000.0f);
for (int i = 0; i < 6; bgData++, i++) {
if (bgData->mpBgModel != NULL) {
J3DModelData* modelData = bgData->mpBgModel->getModelData();
J3DModel* bg_model = bgData->mpBgModel;
if (bg_model != NULL) {
J3DModelData* modelData = bg_model->getModelData();
if (bgData->mpBgBtk != NULL) {
bgData->mpBgBtk->entryFrame();
@@ -797,7 +800,7 @@ int daBg_c::draw() {
}
}
bgData->mpBgModel->calc();
bg_model->calc();
for (u16 j = 0; j < modelData->getShapeNum(); j++) {
J3DShape* shape = modelData->getShapeNodePointer(j);
@@ -810,45 +813,45 @@ int daBg_c::draw() {
}
g_env_light.settingTevStruct(l_tevStrType[i], NULL, bgData->mpTevStr);
g_env_light.setLightTevColorType_MAJI(bgData->mpBgModel, bgData->mpTevStr);
dKy_bg_MAxx_proc(bgData->mpBgModel);
g_env_light.setLightTevColorType_MAJI(bg_model, bgData->mpTevStr);
dKy_bg_MAxx_proc(bg_model);
if (bgData->mpBgModel != NULL) {
modelData = bgData->mpBgModel->getModelData();
if (bg_model != NULL) {
modelData = bg_model->getModelData();
for (u16 j = 0; j < modelData->getMaterialNum(); j++) {
J3DMaterial* mat = modelData->getMaterialNodePointer(j);
const char* name = modelData->getMaterialName()->getName(j);
if (!memcmp(&name[3], &"MA12", 4)) {
if (!memcmp(&name[3], "MA12", 4)) {
if (g_env_light.mColPatCurr == 6) {
field_0x5f0 = 0;
}
} else if (!memcmp(&name[3], &"MA18", 4)) {
if (dDemo_c::getFrame() > 1117) {
} else if (!memcmp(&name[3], "MA18", 4)) {
if (dDemo_c::getFrame() >= 1118) {
field_0x5f0 = 0;
}
if (i_dComIfGs_isEventBit(0x0D04)) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::M_077)) {
field_0x5f0 = 9;
}
} else if (!memcmp(&name[3], &"MA15", 4)) {
if (dComIfGs_BossLife_public_Get() == -1) {
field_0x5f0 = 0;
} else if (!memcmp(&name[3], "MA15", 4)) {
if (dComIfGs_BossLife_public_Get() != -1) {
field_0x5f1 = dComIfGs_BossLife_public_Get() + 1;
} else {
field_0x5f0 = dComIfGs_BossLife_public_Get() + 1;
field_0x5f1 = 0;
}
} else if (!memcmp(&name[3], &"MA09", 4)) {
bgData->mBtkAnmSpeed = 1.0f - (1.0f - g_env_light.mWaterSurfaceShineRate);
} else if (!memcmp(&name[3], &"MA05", 4)) {
bgData->mpTevStr->field_0x378 |= j;
} else if (!memcmp(&name[3], "MA09", 4)) {
bgData->mBtkAnmSpeed = 1.0f - (1.0f - g_env_light.mWaterSurfaceShineRate) * 0.9f;
} else if (!memcmp(&name[3], "MA05", 4)) {
bgData->mpTevStr->field_0x378 |= (u8)j;
}
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") ||
!strcmp(dComIfGp_getStartStageName(), "R_SP127")) {
if (!memcmp(&name[3], &"MA00_Enkei_Tree_Color", 21) ||
!memcmp(&name[3], &"MA00_Gake", 9) ||
!memcmp(&name[3], &"MA00_Kusa", 9)) {
if (!memcmp(&name[3], "MA00_Enkei_Tree_Color", 21) ||
!memcmp(&name[3], "MA00_Gake", 9) ||
!memcmp(&name[3], "MA00_Kusa", 9)) {
J3DGXColorS10 colorS10;
J3DGXColor color;
@@ -883,22 +886,22 @@ int daBg_c::draw() {
if (var_f2 > 1.0f) {
var_f2 = 1.0f;
}
colorS10.mColor.r = var_r5 * var_f2;
colorS10.r = var_r5 * var_f2;
f32 temp_f2_2 = bgData->mpTevStr->mColorC0.g / 10.0f;
f32 var_f2_2 = temp_f2_2 * temp_f2_2;
if (var_f2_2 > 1.0f) {
var_f2_2 = 1.0f;
}
colorS10.mColor.g = var_r0 * var_f2_2;
colorS10.g = var_r0 * var_f2_2;
f32 temp_f2_3 = bgData->mpTevStr->mColorC0.b / 10.0f;
f32 var_f2_3 = temp_f2_3 * temp_f2_3;
if (var_f2_3 > 1.0f) {
var_f2_3 = 1.0f;
}
colorS10.mColor.b = var_r3 * var_f2_3;
colorS10.mColor.a = 255;
colorS10.b = var_r3 * var_f2_3;
colorS10.a = 255;
mat->setTevColor(0, &colorS10);
color.r = 0;
@@ -910,14 +913,15 @@ int daBg_c::draw() {
}
}
mDoExt_modelEntryDL(bgData->mpBgModel);
mDoExt_modelEntryDL(bg_model);
dComIfGd_setListBG();
}
}
}
dComIfGd_setList();
g_env_light.settingTevStruct(0x10, NULL, dComIfGp_roomControl_getTevStr(roomNo));
dKy_tevstr_c* tevstr = dComIfGp_roomControl_getTevStr(roomNo);
g_env_light.settingTevStruct(0x10, NULL, tevstr);
return 1;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+153 -220
View File
@@ -1,242 +1,175 @@
//
// Generated By: dol2asm
// Translation Unit: d_a_kytag09
//
/**
* d_a_kytag09.cpp
* Twilight Film Tag
*/
#include "rel/d/a/kytag/d_a_kytag09/d_a_kytag09.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct request_of_phase_process_class {};
struct mDoMtx_stack_c {
static u8 now[48];
};
struct J3DMaterialTable {};
struct J3DAnmTextureSRTKey {};
struct mDoExt_btkAnm {
/* 8000D63C */ void init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16);
/* 8000D6D8 */ void entry(J3DMaterialTable*, f32);
};
struct mDoExt_baseAnm {
/* 8000D428 */ void play();
};
struct kytag09_class {};
struct fopAc_ac_c {
/* 80018B64 */ fopAc_ac_c();
};
struct dSv_player_status_b_c {
/* 80032BB0 */ void isDarkClearLV(int) const;
};
struct dKy_tevstr_c {};
struct J3DModelData {};
struct cXyz {};
struct dScnKy_env_light_c {
/* 801A37C4 */ void settingTevStruct(int, cXyz*, dKy_tevstr_c*);
/* 801A4DA0 */ void setLightTevColorType_MAJI(J3DModelData*, dKy_tevstr_c*);
};
struct dRes_info_c {};
struct dRes_control_c {
/* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int);
};
struct J3DModel {};
struct J3DFrameCtrl {
/* 803283FC */ void init(s16);
/* 8085B9F4 */ ~J3DFrameCtrl();
};
//
// Forward References:
//
extern "C" static void daKytag09_Draw__FP13kytag09_class();
extern "C" static bool daKytag09_Execute__FP13kytag09_class();
extern "C" static bool daKytag09_IsDelete__FP13kytag09_class();
extern "C" static void daKytag09_Delete__FP13kytag09_class();
extern "C" static void useHeapInit__FP10fopAc_ac_c();
extern "C" static void useHeapInit2__FP10fopAc_ac_c();
extern "C" static void daKytag09_Create__FP10fopAc_ac_c();
extern "C" void __dt__12J3DFrameCtrlFv();
extern "C" extern char const* const d_a_kytag09__stringBase0;
//
// External References:
//
extern "C" void play__14mDoExt_baseAnmFv();
extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss();
extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef();
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
extern "C" void __ct__10fopAc_ac_cFv();
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
extern "C" void isDarkClearLV__21dSv_player_status_b_cCFi();
extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
extern "C" void __dl__FPv();
extern "C" void init__12J3DFrameCtrlFs();
extern "C" void PSMTXCopy();
extern "C" void PSMTXTrans();
extern "C" void _savegpr_28();
extern "C" void _savegpr_29();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" extern void* g_fopAc_Method[8];
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" extern u8 g_env_light[4880];
extern "C" extern u8 j3dSys[284];
//
// Declarations:
//
/* ############################################################################################## */
/* 8085BA44-8085BA48 000000 0004+00 1/1 0/0 0/0 .rodata @3863 */
SECTION_RODATA static u8 const lit_3863[4] = {
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x8085BA44, &lit_3863);
#include "JSystem/JKernel/JKRHeap.h"
#include "d/com/d_com_inf_game.h"
#include "d/d_procname.h"
/* 8085B3F8-8085B5F4 000078 01FC+00 1/0 0/0 0/0 .text daKytag09_Draw__FP13kytag09_class
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daKytag09_Draw(kytag09_class* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/daKytag09_Draw__FP13kytag09_class.s"
static int daKytag09_Draw(kytag09_class* i_this) {
J3DModelData* modelData = i_this->mpModel->getModelData();
g_env_light.settingTevStruct(0x10, NULL, &i_this->mTevStr);
g_env_light.setLightTevColorType_MAJI(modelData, &i_this->mTevStr);
if (i_this->mType != 1) {
modelData = i_this->mpModel2->getModelData();
g_env_light.setLightTevColorType_MAJI(modelData, &i_this->mTevStr);
}
mDoMtx_stack_c::transS(0.0f, 0.0f, 0.0f);
Mtx m;
cMtx_copy(mDoMtx_stack_c::get(), m);
dComIfGd_setListBG();
if (i_this->mType != 1) {
i_this->mpModel->i_setBaseTRMtx(m);
i_this->mpModel2->i_setBaseTRMtx(m);
if (!dComIfGs_isDarkClearLV(1)) {
i_this->mBtk_2.entry(i_this->mpModel->getModelData());
i_this->mBtk_2.play();
mDoExt_modelUpdateDL(i_this->mpModel);
} else if (!dComIfGs_isDarkClearLV(2)) {
i_this->mBtk.entry(i_this->mpModel2->getModelData());
i_this->mBtk.play();
mDoExt_modelUpdateDL(i_this->mpModel2);
}
} else {
i_this->mpModel->i_setBaseTRMtx(m);
if (!dComIfGs_isDarkClearLV(0)) {
i_this->mBtk_2.entry(i_this->mpModel->getModelData());
i_this->mBtk_2.play();
mDoExt_modelUpdateDL(i_this->mpModel);
}
}
dComIfGd_setList();
return 1;
}
#pragma pop
/* 8085B5F4-8085B5FC 000274 0008+00 1/0 0/0 0/0 .text daKytag09_Execute__FP13kytag09_class */
static bool daKytag09_Execute(kytag09_class* param_0) {
return true;
static int daKytag09_Execute(kytag09_class* i_this) {
return 1;
}
/* 8085B5FC-8085B604 00027C 0008+00 1/0 0/0 0/0 .text daKytag09_IsDelete__FP13kytag09_class */
static bool daKytag09_IsDelete(kytag09_class* param_0) {
return true;
static int daKytag09_IsDelete(kytag09_class* i_this) {
return 1;
}
/* ############################################################################################## */
/* 8085BA4C-8085BA4C 000008 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_8085BA4C = "Kytag09";
SECTION_DEAD static char const* const stringBase_8085BA54 = "kytag09_2";
#pragma pop
/* 8085B604-8085B658 000284 0054+00 1/0 0/0 0/0 .text daKytag09_Delete__FP13kytag09_class
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daKytag09_Delete(kytag09_class* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/daKytag09_Delete__FP13kytag09_class.s"
}
#pragma pop
static int daKytag09_Delete(kytag09_class* i_this) {
if (i_this->mType != 1) {
dComIfG_resDelete(&i_this->mPhase, "Kytag09");
} else {
dComIfG_resDelete(&i_this->mPhase, "kytag09_2");
}
/* ############################################################################################## */
/* 8085BA48-8085BA4C 000004 0004+00 2/2 0/0 0/0 .rodata @3906 */
SECTION_RODATA static f32 const lit_3906 = 1.0f;
COMPILER_STRIP_GATE(0x8085BA48, &lit_3906);
return 1;
}
/* 8085B658-8085B7C0 0002D8 0168+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
static int useHeapInit(fopAc_ac_c* i_this) {
kytag09_class* this_ = (kytag09_class*)i_this;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Kytag09", 4);
J3DModelData* modelData2 = (J3DModelData*)dComIfG_getObjectRes("Kytag09", 5);
this_->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
if (this_->mpModel == NULL) {
return 0;
}
J3DAnmTextureSRTKey* btkp = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Kytag09", 9);
if (!this_->mBtk_2.init(modelData, btkp, TRUE, 2, 1.0f, 0, -1)) {
return 0;
}
this_->mpModel2 = mDoExt_J3DModel__create(modelData2, 0x80000, 0x11000284);
if (this_->mpModel2 == NULL) {
return 0;
}
J3DAnmTextureSRTKey* btk2p = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Kytag09", 10);
if (!this_->mBtk.init(modelData2, btk2p, TRUE, 2, 1.0f, 0, -1)) {
return 0;
}
return 1;
}
/* 8085B7C0-8085B894 000440 00D4+00 1/1 0/0 0/0 .text useHeapInit2__FP10fopAc_ac_c */
static int useHeapInit2(fopAc_ac_c* i_this) {
kytag09_class* this_ = (kytag09_class*)i_this;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("kytag09_2", 4);
this_->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
if (this_->mpModel == NULL) {
return 0;
}
J3DAnmTextureSRTKey* btkp = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("kytag09_2", 7);
if (!this_->mBtk_2.init(modelData, btkp, TRUE, 2, 1.0f, 0, -1)) {
return 0;
}
return 1;
}
/* 8085B894-8085B9F4 000514 0160+00 1/0 0/0 0/0 .text daKytag09_Create__FP10fopAc_ac_c */
static int daKytag09_Create(fopAc_ac_c* i_this) {
kytag09_class* this_ = (kytag09_class*)i_this;
this_->mType = fopAcM_GetParam(this_) & 0xFF;
if (!fopAcM_CheckCondition(this_, 8)) {
new (this_) kytag09_class();
fopAcM_OnCondition(this_, 8);
}
int phase;
if (this_->mType != 1) {
phase = dComIfG_resLoad(&this_->mPhase, "Kytag09");
if (phase == cPhs_COMPLEATE_e && !fopAcM_entrySolidHeap(this_, useHeapInit, 0x5EB0)) {
return cPhs_ERROR_e;
}
} else {
phase = dComIfG_resLoad(&this_->mPhase, "kytag09_2");
if (phase == cPhs_COMPLEATE_e && !fopAcM_entrySolidHeap(this_, useHeapInit2, 0x1880)) {
return cPhs_ERROR_e;
}
}
return phase;
}
/* 8085BA60-8085BA80 -00001 0020+00 1/0 0/0 0/0 .data l_daKytag09_Method */
SECTION_DATA static void* l_daKytag09_Method[8] = {
(void*)daKytag09_Create__FP10fopAc_ac_c,
(void*)daKytag09_Delete__FP13kytag09_class,
(void*)daKytag09_Execute__FP13kytag09_class,
(void*)daKytag09_IsDelete__FP13kytag09_class,
(void*)daKytag09_Draw__FP13kytag09_class,
(void*)NULL,
(void*)NULL,
(void*)NULL,
static actor_method_class l_daKytag09_Method = {
(process_method_func)daKytag09_Create, (process_method_func)daKytag09_Delete,
(process_method_func)daKytag09_Execute, (process_method_func)daKytag09_IsDelete,
(process_method_func)daKytag09_Draw,
};
/* 8085BA80-8085BAB0 -00001 0030+00 0/2 0/0 1/0 .data g_profile_KYTAG09 */
SECTION_DATA extern void* g_profile_KYTAG09[12] = {
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
(void*)0x02B30000, (void*)&g_fpcLf_Method,
(void*)0x000005C8, (void*)NULL,
(void*)NULL, (void*)&g_fopAc_Method,
(void*)0x00670000, (void*)&l_daKytag09_Method,
(void*)0x00060000, (void*)NULL,
extern actor_process_profile_definition g_profile_KYTAG09 = {
-3,
7,
-3,
PROC_KYTAG09,
&g_fpcLf_Method.mBase,
sizeof(kytag09_class),
0,
0,
&g_fopAc_Method.base,
103,
&l_daKytag09_Method,
0x60000,
0,
0,
};
/* 8085B658-8085B7C0 0002D8 0168+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void useHeapInit(fopAc_ac_c* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/useHeapInit__FP10fopAc_ac_c.s"
}
#pragma pop
/* 8085B7C0-8085B894 000440 00D4+00 1/1 0/0 0/0 .text useHeapInit2__FP10fopAc_ac_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void useHeapInit2(fopAc_ac_c* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/useHeapInit2__FP10fopAc_ac_c.s"
}
#pragma pop
/* ############################################################################################## */
/* 8085BAB0-8085BABC 000050 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */
SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__12J3DFrameCtrlFv,
};
/* 8085B894-8085B9F4 000514 0160+00 1/0 0/0 0/0 .text daKytag09_Create__FP10fopAc_ac_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daKytag09_Create(fopAc_ac_c* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/daKytag09_Create__FP10fopAc_ac_c.s"
}
#pragma pop
/* 8085B9F4-8085BA3C 000674 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm J3DFrameCtrl::~J3DFrameCtrl() {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag09/d_a_kytag09/__dt__12J3DFrameCtrlFv.s"
}
#pragma pop
/* 8085BA4C-8085BA4C 000008 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+124 -162
View File
@@ -1,193 +1,155 @@
//
// Generated By: dol2asm
// Translation Unit: d_a_kytag11
//
/**
* d_a_kytag11.cpp
* Time Control Tag
*/
#include "rel/d/a/kytag/d_a_kytag11/d_a_kytag11.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct kytag11_class {};
struct fopAc_ac_c {
/* 80018B64 */ fopAc_ac_c();
};
struct dSv_info_c {
/* 80035360 */ void isSwitch(int, int) const;
};
struct dSv_event_tmp_flag_c {
static u8 const tempBitLabels[370 + 2 /* padding */];
};
struct dSv_event_flag_c {
static u8 saveBitLabels[1644 + 4 /* padding */];
};
struct dSv_event_c {
/* 800349A4 */ void offEventBit(u16);
/* 800349BC */ void isEventBit(u16) const;
};
//
// Forward References:
//
extern "C" static bool daKytag11_Draw__FP13kytag11_class();
extern "C" static void daKytag11_Execute__FP13kytag11_class();
extern "C" static bool daKytag11_IsDelete__FP13kytag11_class();
extern "C" static bool daKytag11_Delete__FP13kytag11_class();
extern "C" static void daKytag11_Create__FP10fopAc_ac_c();
extern "C" static void dKankyo_DayProc__Fv();
extern "C" extern void* g_profile_KYTAG11[12];
//
// External References:
//
extern "C" void __ct__10fopAc_ac_cFv();
extern "C" void offEventBit__11dSv_event_cFUs();
extern "C" void isEventBit__11dSv_event_cCFUs();
extern "C" void isSwitch__10dSv_info_cCFii();
extern "C" void dKy_getdaytime_hour__Fv();
extern "C" void __cvt_fp2unsigned();
extern "C" void _savegpr_29();
extern "C" void _restgpr_29();
extern "C" u8 const tempBitLabels__20dSv_event_tmp_flag_c[370 + 2 /* padding */];
extern "C" extern void* g_fopAc_Method[8];
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" extern u8 g_env_light[4880];
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
//
// Declarations:
//
#include "JSystem/JKernel/JKRHeap.h"
#include "d/com/d_com_inf_game.h"
#include "d/d_procname.h"
/* 80529518-80529520 000078 0008+00 1/0 0/0 0/0 .text daKytag11_Draw__FP13kytag11_class
*/
static bool daKytag11_Draw(kytag11_class* param_0) {
return true;
static int daKytag11_Draw(kytag11_class* i_this) {
return 1;
}
/* ############################################################################################## */
/* 80529894-80529898 000000 0004+00 1/1 0/0 0/0 .rodata @3874 */
SECTION_RODATA static f32 const lit_3874 = 15.0f;
COMPILER_STRIP_GATE(0x80529894, &lit_3874);
/* 80529898-8052989C 000004 0004+00 0/1 0/0 0/0 .rodata @3875 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3875 = 0.5f;
COMPILER_STRIP_GATE(0x80529898, &lit_3875);
#pragma pop
/* 8052989C-805298A0 000008 0004+00 0/1 0/0 0/0 .rodata @3876 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3876 = 255.0f;
COMPILER_STRIP_GATE(0x8052989C, &lit_3876);
#pragma pop
/* 805298A0-805298A4 00000C 0004+00 0/1 0/0 0/0 .rodata @3877 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3877 = 360.0f;
COMPILER_STRIP_GATE(0x805298A0, &lit_3877);
#pragma pop
/* 805298A4-805298AC 000010 0004+04 0/1 0/0 0/0 .rodata @3878 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_3878[4 + 4 /* padding */] = {
0x00,
0x00,
0x00,
0x00,
/* padding */
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x805298A4, &lit_3878);
#pragma pop
/* 805298AC-805298B4 000018 0008+00 0/1 0/0 0/0 .rodata @3880 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_3880[8] = {
0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x805298AC, &lit_3880);
#pragma pop
/* 80529520-80529798 000080 0278+00 1/0 0/0 0/0 .text daKytag11_Execute__FP13kytag11_class */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daKytag11_Execute(kytag11_class* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag11/d_a_kytag11/daKytag11_Execute__FP13kytag11_class.s"
static int daKytag11_Execute(kytag11_class* i_this) {
dScnKy_env_light_c* env_light = i_dKy_getEnvlight();
i_this->mChangeTime = false;
i_this->mChangeTime = true;
if (i_this->mOnEventID != 0xFFF) {
if (!i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_this->mOnEventID])) {
i_this->mChangeTime = false;
}
} else if (i_this->mOnSwitchNo != 0xFF) {
s32 room_no = dComIfGp_roomControl_getStayNo();
if (!dComIfGs_isSwitch(i_this->mOnSwitchNo, room_no)) {
i_this->mChangeTime = false;
}
}
if (i_this->mOffEventID != 0xFFF) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_this->mOffEventID])) {
i_this->mChangeTime = false;
}
} else if (i_this->mOffSwitchNo != 0xFF) {
s32 room_no = dComIfGp_roomControl_getStayNo();
if (dComIfGs_isSwitch(i_this->mOffSwitchNo, room_no)) {
i_this->mChangeTime = false;
}
}
if (!i_this->mChangeTime) {
return 1;
}
if (!i_this->mInitTimeChange) {
if (i_this->mNewTime != 0x1F) {
env_light->mDaytime = dComIfGs_getTime();
f32 new_time = i_this->mNewTime * 15.0f;
env_light->mDaytime = new_time;
dComIfGs_setTime(new_time);
}
i_this->mInitTimeChange = true;
}
env_light->field_0x12fb = 1;
if (i_this->mStopTime != 0x1F && i_this->mStopTime == (u8)dKy_getdaytime_hour()) {
return 1;
}
f32 new_env_time = ((i_this->mEnvTime / 255.0f) * 0.5f);
f32 current_time = dComIfGs_getTime();
env_light->mDaytime = current_time;
env_light->mDate = dComIfGs_getDate();
new_env_time = current_time + new_env_time;
env_light->mDaytime = new_env_time;
if ((u32)new_env_time >= 360.0f) {
env_light->mDaytime = 0.0f;
env_light->mDate++;
dKankyo_DayProc();
}
dComIfGs_setTime(env_light->mDaytime);
dComIfGs_setDate(env_light->mDate);
return 1;
}
#pragma pop
/* 80529798-805297A0 0002F8 0008+00 1/0 0/0 0/0 .text daKytag11_IsDelete__FP13kytag11_class */
static bool daKytag11_IsDelete(kytag11_class* param_0) {
return true;
static int daKytag11_IsDelete(kytag11_class* i_this) {
return 1;
}
/* 805297A0-805297A8 000300 0008+00 1/0 0/0 0/0 .text daKytag11_Delete__FP13kytag11_class
*/
static bool daKytag11_Delete(kytag11_class* param_0) {
return true;
static int daKytag11_Delete(kytag11_class* i_this) {
return 1;
}
/* 805297A8-80529854 000308 00AC+00 1/0 0/0 0/0 .text daKytag11_Create__FP10fopAc_ac_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daKytag11_Create(fopAc_ac_c* param_0) {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag11/d_a_kytag11/daKytag11_Create__FP10fopAc_ac_c.s"
static int daKytag11_Create(fopAc_ac_c* i_this) {
if (!fopAcM_CheckCondition(i_this, 8)) {
new (i_this) kytag11_class();
fopAcM_OnCondition(i_this, 8);
}
kytag11_class* this_ = (kytag11_class*)i_this;
this_->mNewTime = fopAcM_GetParam(this_) & 0x1F;
this_->mStopTime = (fopAcM_GetParam(this_) >> 5) & 0x1F;
this_->mEnvTime = (fopAcM_GetParam(this_) >> 10) & 0xFF;
this_->mOnEventID = this_->current.angle.x & 0xFFF;
this_->mOffEventID = this_->current.angle.y & 0xFFF;
this_->mOnSwitchNo = this_->current.angle.z & 0xFF;
this_->mOffSwitchNo = (this_->current.angle.z >> 8) & 0xFF;
this_->mChangeTime = false;
this_->mInitTimeChange = false;
return cPhs_COMPLEATE_e;
}
#pragma pop
/* 80529854-8052988C 0003B4 0038+00 1/1 0/0 0/0 .text dKankyo_DayProc__Fv */
// this is a weak func that should be compiler generated, unsure how to make it do that for now
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKankyo_DayProc() {
nofralloc
#include "asm/rel/d/a/kytag/d_a_kytag11/d_a_kytag11/dKankyo_DayProc__Fv.s"
#pragma force_active on
extern "C" void dKankyo_DayProc__Fv() {
dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[91]);
}
#pragma pop
/* ############################################################################################## */
/* 805298B4-805298D4 -00001 0020+00 1/0 0/0 0/0 .data l_daKytag11_Method */
SECTION_DATA static void* l_daKytag11_Method[8] = {
(void*)daKytag11_Create__FP10fopAc_ac_c,
(void*)daKytag11_Delete__FP13kytag11_class,
(void*)daKytag11_Execute__FP13kytag11_class,
(void*)daKytag11_IsDelete__FP13kytag11_class,
(void*)daKytag11_Draw__FP13kytag11_class,
(void*)NULL,
(void*)NULL,
(void*)NULL,
static actor_method_class l_daKytag11_Method = {
(process_method_func)daKytag11_Create, (process_method_func)daKytag11_Delete,
(process_method_func)daKytag11_Execute, (process_method_func)daKytag11_IsDelete,
(process_method_func)daKytag11_Draw,
};
/* 805298D4-80529904 -00001 0030+00 0/0 0/0 1/0 .data g_profile_KYTAG11 */
SECTION_DATA extern void* g_profile_KYTAG11[12] = {
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
(void*)0x02B50000, (void*)&g_fpcLf_Method,
(void*)0x00000574, (void*)NULL,
(void*)NULL, (void*)&g_fopAc_Method,
(void*)0x00690000, (void*)&l_daKytag11_Method,
(void*)0x00044000, (void*)NULL,
extern actor_process_profile_definition g_profile_KYTAG11 = {
-3,
7,
-3,
PROC_KYTAG11,
&g_fpcLf_Method.mBase,
sizeof(kytag11_class),
0,
0,
&g_fopAc_Method.base,
105,
&l_daKytag11_Method,
0x44000,
0,
0,
};
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* d_a_kytag15.cpp
*
* Z Shake Tag
*/
#include "rel/d/a/kytag/d_a_kytag15/d_a_kytag15.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* d_a_kytag16.cpp
*
* Pikari Tag
*/
#include "rel/d/a/kytag/d_a_kytag16/d_a_kytag16.h"
+5 -10
View File
@@ -1,14 +1,12 @@
/**
* d_a_kytag17.cpp
* Environment Tag 17
* Light Mask Tag
*/
#include "rel/d/a/kytag/d_a_kytag17/d_a_kytag17.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "d/kankyo/d_kankyo.h"
#include "d/d_procname.h"
#include "d/kankyo/d_kankyo.h"
/* 8046DB58-8046DB60 000078 0008+00 1/0 0/0 0/0 .text daKytag17_Draw__FP13kytag17_class
*/
@@ -49,12 +47,9 @@ static int daKytag17_Create(fopAc_ac_c* i_this) {
/* ############################################################################################## */
/* 8046DBE8-8046DC08 -00001 0020+00 1/0 0/0 0/0 .data l_daKytag17_Method */
static actor_method_class l_daKytag17_Method = {
(process_method_func)daKytag17_Create,
(process_method_func)daKytag17_Delete,
(process_method_func)daKytag17_Execute,
(process_method_func)daKytag17_IsDelete,
(process_method_func)daKytag17_Draw
};
(process_method_func)daKytag17_Create, (process_method_func)daKytag17_Delete,
(process_method_func)daKytag17_Execute, (process_method_func)daKytag17_IsDelete,
(process_method_func)daKytag17_Draw};
/* 8046DC08-8046DC38 -00001 0030+00 0/0 0/0 1/0 .data g_profile_KYTAG17 */
extern actor_process_profile_definition g_profile_KYTAG17 = {