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 17:09:47 -07: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
+218 -201
View File
@@ -4,208 +4,146 @@
//
#include "rel/d/a/d_a_mg_fshop/d_a_mg_fshop.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "d/bg/d_bg_w.h"
#include "d/com/d_com_inf_game.h"
#include "d/d_procname.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "f_pc/f_pc_executor.h"
#include "m_Do/m_Do_controller_pad.h"
//
// Types:
//
struct request_of_phase_process_class {};
struct mDoMtx_stack_c {
/* 8000CCC8 */ void push();
/* 8000CD14 */ void pop();
/* 8000CD9C */ void transM(f32, f32, f32);
/* 8000CE38 */ void scaleM(f32, f32, f32);
static u8 now[48];
};
struct mDoExt_3DlineMat_c {};
struct mDoExt_3DlineMatSortPacket {
/* 80014738 */ void setMat(mDoExt_3DlineMat_c*);
};
struct dKy_tevstr_c {};
struct _GXColor {};
struct mDoExt_3DlineMat0_c {
/* 800125E0 */ void init(u16, u16, int);
/* 80012874 */ void update(int, f32, _GXColor&, u16, dKy_tevstr_c*);
/* 80012E3C */ void update(int, _GXColor&, dKy_tevstr_c*);
};
struct mDoCPd_c {
static u8 m_cpadInfo[256];
};
struct fshop_class {};
struct fs_weed_s {
/* 8086FED8 */ ~fs_weed_s();
/* 8086FF38 */ fs_weed_s();
/* 0x00 */ cXyz field_0x00[15];
/* 0xB4 */ f32 field_0xb4;
/* 0xB8 */ f32 field_0xb8;
/* 0xBC */ s16 field_0xbc;
};
struct fs_tsubo_s {
/* 8086FE98 */ ~fs_tsubo_s();
/* 8086FED4 */ fs_tsubo_s();
/* 0x00 */ u8 field_0x00[0x14 - 0x00];
/* 0x14 */ J3DModel* field_0x14;
/* 0x18 */ u8 field_0x18[0x1C - 0x18];
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ s16 field_0x20;
/* 0x22 */ s16 field_0x22;
/* 0x24 */ s16 field_0x24;
};
struct fs_rod_s {
/* 8086FF84 */ ~fs_rod_s();
/* 8086FFC0 */ fs_rod_s();
/* 0x00 */ u8 field_0x00[0x04 - 0x00];
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 field_0x08;
/* 0x0C */ u8 field_0x0C[0x14 - 0x0C];
/* 0x14 */ J3DModel* field_0x14;
/* 0x18 */ J3DModel* field_0x18[6];
/* 0x30 */ mDoExt_3DlineMat0_c line_mat;
/* 0x4C */ int field_0x4c;
/* 0x50 */ u8 field_0x50[0x54 - 0x50];
/* 0x54 */ f32 field_0x54;
/* 0x58 */ u8 field_0x58[0x5C - 0x58];
};
struct fs_lure_s {
/* 8086FFDC */ ~fs_lure_s();
/* 80870018 */ fs_lure_s();
/* 0x00 */ f32 field_0x00;
/* 0x04 */ u8 field_0x04[0x08 - 0x04];
/* 0x08 */ f32 field_0x08;
/* 0x0C */ s16 field_0x0c;
/* 0x0E */ s16 field_0x0e;
/* 0x10 */ s16 field_0x10;
/* 0x12 */ u8 field_0x12[0x14 - 0x12];
/* 0x14 */ J3DModel* field_0x14;
/* 0x18 */ J3DModel* field_0x18[2];
/* 0x20 */ u8 field_0x20[0x24 - 0x20];
/* 0x24 */ int field_0x24;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
/* 0x30 */ s16 field_0x30;
/* 0x32 */ s16 field_0x32;
/* 0x34 */ s16 field_0x34;
/* 0x36 */ s16 field_0x36;
/* 0x38 */ f32 field_0x38;
/* 0x3C */ f32 field_0x3c;
};
struct fs_koro2_s {
/* 8086FD78 */ ~fs_koro2_s();
/* 8086FDB4 */ fs_koro2_s();
/* 0x00 */ J3DModel* mpModel;
/* 0x04 */ J3DModelData* field_0x04;
/* 0x08 */ u8 field_0x08[0x34 - 0x08];
/* 0x34 */ s8 field_0x34;
/* 0x35 */ u8 field_0x35[0x38 - 0x35];
/* 0x38 */ cXyz field_0x38;
/* 0x44 */ cXyz field_0x44;
/* 0x50 */ s16 field_0x50;
/* 0x52 */ u8 field_0x52[0x54 - 0x52];
/* 0x54 */ cXyz field_0x54;
/* 0x60 */ u8 field_0x60;
/* 0x61 */ u8 field_0x61[0x64 - 0x61];
/* 0x64 */ dBgW* mpBgW;
};
struct fopAc_ac_c {
/* 80018B64 */ fopAc_ac_c();
class fshop_class : public fopAc_ac_c {
public:
/* 0x0568 */ request_of_phase_process_class mPhase;
/* 0x0570 */ s16 field_0x0570;
/* 0x0572 */ s16 field_0x0572;
/* 0x0574 */ fs_lure_s mLure[48];
/* 0x1174 */ fs_rod_s mRod[3];
/* 0x1288 */ fs_weed_s mWeed[60];
/* 0x3F88 */ mDoExt_3DlineMat0_c field_0x3f88;
/* 0x3FA4 */ fs_tsubo_s mTsubo[2];
/* 0x3FF4 */ J3DModel* field_0x3ff4;
/* 0x3FF8 */ s16 field_0x3ff8;
/* 0x3FFA */ s16 field_0x3ffa;
/* 0x3FFC */ f32 field_0x3ffc;
/* 0x4000 */ f32 field_0x4000;
/* 0x4004 */ J3DModel* field_0x4004;
/* 0x4008 */ fshop_class* field_0x4008;
/* 0x400C */ u8 field_0x400C[0x400D - 0x400C];
/* 0x400D */ u8 field_0x400d;
/* 0x400E */ u8 field_0x400e;
/* 0x4010 */ s16 field_0x4010;
/* 0x4014 */ cXyz field_0x4014;
/* 0x4020 */ csXyz field_0x4020;
/* 0x4028 */ J3DModel* mpA_crwaku_model;
/* 0x402C */ dBgW* field_0x402c;
/* 0x4030 */ Mtx field_0x4030;
/* 0x4060 */ s16 field_0x4060;
/* 0x4062 */ s16 field_0x4062;
/* 0x4064 */ cXyz field_0x4064;
/* 0x4070 */ J3DModel* field_0x4070;
/* 0x4074 */ dBgS_AcchCir field_0x4074;
/* 0x40B4 */ dBgS_ObjAcch field_0x40b4;
/* 0x428C */ u8 field_0x428c;
/* 0x428D */ u8 field_0x428d;
/* 0x4290 */ fs_koro2_s mKoro2[100];
/* 0x6B30 */ J3DModel* field_0x6b30;
/* 0x6B34 */ s16 field_0x6b34;
/* 0x6B38 */ Mtx field_0x6b38;
/* 0x6B68 */ dBgW* field_0x6b68;
/* 0x6B6C */ u32 field_0x6b6c[2];
/* 0x6B74 */ u8 field_0x6B74[0x6B7C - 0x6B74];
/* 0x6B7C */ u8 field_0x6b7c;
};
struct dSv_event_c {
/* 80034A04 */ void getEventReg(u16) const;
};
struct J3DModelData {};
struct Vec {};
struct cXyz {
/* 80266AE4 */ void operator+(Vec const&) const;
/* 80266B34 */ void operator-(Vec const&) const;
/* 80266B84 */ void operator*(f32) const;
/* 8086CC30 */ ~cXyz();
/* 8086FF80 */ 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 dPa_levelEcallBack {};
struct csXyz {
/* 802673F4 */ csXyz(s16, s16, s16);
};
struct dPa_control_c {
/* 8004D4CC */ void set(u32, u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*,
cXyz const*, u8, dPa_levelEcallBack*, s8, _GXColor const*,
_GXColor const*, cXyz const*, f32);
};
struct dDlst_shadowControl_c {
static u8 mSimpleTexObj[32];
};
struct J3DModel {};
struct dComIfG_play_c {
/* 8002CAF0 */ void addSimpleModel(J3DModelData*, int, u8);
/* 8002CB30 */ void removeSimpleModel(J3DModelData*, int);
/* 8002CB68 */ void entrySimpleModel(J3DModel*, int);
};
struct dBgW_Base {};
struct dBgW {
/* 8007B970 */ dBgW();
/* 8007B9C0 */ void Move();
};
struct dBgS_PolyPassChk {
/* 80078E68 */ void SetObj();
};
struct dBgS_ObjAcch {
/* 8086FDB8 */ ~dBgS_ObjAcch();
};
struct dBgS_LinChk {
/* 80077C68 */ dBgS_LinChk();
/* 80077CDC */ ~dBgS_LinChk();
/* 80077D64 */ void Set(cXyz const*, cXyz const*, fopAc_ac_c const*);
};
struct dBgS_GndChk {
/* 8007757C */ dBgS_GndChk();
/* 800775F0 */ ~dBgS_GndChk();
};
struct dBgS_AcchCir {
/* 80075EAC */ dBgS_AcchCir();
/* 80075F58 */ void SetWall(f32, f32);
/* 8086FE28 */ ~dBgS_AcchCir();
};
struct dBgS {
/* 80074A08 */ void Regist(dBgW_Base*, fopAc_ac_c*);
};
struct dBgS_Acch {
/* 80075F94 */ ~dBgS_Acch();
/* 800760A0 */ dBgS_Acch();
/* 80076248 */ void Set(cXyz*, cXyz*, fopAc_ac_c*, int, dBgS_AcchCir*, cXyz*, csXyz*, csXyz*);
/* 80076AAC */ void CrrPos(dBgS&);
/* 800773EC */ void OnWallSort();
};
struct cM3dGCir {
/* 8026EF18 */ ~cM3dGCir();
};
struct cBgD_t {};
struct cBgW {
/* 80079F38 */ void Set(cBgD_t*, u32, f32 (*)[3][4]);
};
struct cBgS_PolyInfo {
/* 802680B0 */ ~cBgS_PolyInfo();
};
struct cBgS_LinChk {};
struct cBgS_GndChk {
/* 80267D28 */ void SetPos(cXyz const*);
};
struct cBgS {
/* 80074250 */ void Release(dBgW_Base*);
/* 800743B4 */ void LineCross(cBgS_LinChk*);
/* 800744A0 */ void GroundCross(cBgS_GndChk*);
};
struct _GXTexObj {};
struct JMath {
static u8 sincosTable_[65536];
};
struct J3DSys {
static u8 mCurrentMtx[48];
};
struct J3DJoint {};
//
// Forward References:
//
@@ -333,11 +271,6 @@ extern "C" void MtxScale__FfffUc();
extern "C" void MtxPosition__FP4cXyzP4cXyz();
extern "C" void* __nw__FUl();
extern "C" void __dl__FPv();
extern "C" void PSMTXCopy();
extern "C" void PSMTXTrans();
extern "C" void PSMTXMultVec();
extern "C" void PSVECAdd();
extern "C" void PSVECSquareMag();
extern "C" void __destroy_arr();
extern "C" void __construct_array();
extern "C" void _savegpr_14();
@@ -363,18 +296,11 @@ extern "C" void _restgpr_27();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" extern void* __vt__19mDoExt_3DlineMat0_c[5];
extern "C" extern void* g_fopAc_Method[8];
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
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" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
extern "C" extern u8 g_env_light[4880];
extern "C" extern u8 j3dSys[284];
extern "C" u8 mCurrentMtx__6J3DSys[48];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" extern void* calc_mtx[1 + 1 /* padding */];
extern "C" extern u32 __float_nan;
extern "C" void __register_global_object();
//
@@ -1970,7 +1896,8 @@ static asm void rod_set(fshop_class* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm cXyz::~cXyz() {
// asm cXyz::~cXyz() {
extern "C" asm void __dt__4cXyzFv() {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__dt__4cXyzFv.s"
}
@@ -2101,14 +2028,11 @@ static asm void weed_control(fshop_class* param_0, fs_weed_s* param_1) {
#pragma pop
/* 8086D1A0-8086D1EC 001220 004C+00 1/1 0/0 0/0 .text stage_copy__FP11fshop_classP11fshop_class */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void stage_copy(fshop_class* param_0, fshop_class* param_1) {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/stage_copy__FP11fshop_classP11fshop_class.s"
static void stage_copy(fshop_class* param_0, fshop_class* param_1) {
param_0->field_0x4014 = param_1->field_0x4014;
param_0->field_0x4020 = param_1->field_0x4020;
param_0->mScale = param_1->mScale;
}
#pragma pop
/* ############################################################################################## */
/* 80870110-80870114 00007C 0004+00 0/1 0/0 0/0 .rodata @4376 */
@@ -2164,7 +2088,7 @@ static asm void koro2_mtx_set(fshop_class* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void s_sel_sub(void* param_0, void* param_1) {
static asm void* s_sel_sub(void* param_0, void* param_1) {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/s_sel_sub__FPvPv.s"
}
@@ -2174,7 +2098,7 @@ static asm void s_sel_sub(void* param_0, void* param_1) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void s_ball_sub(void* param_0, void* param_1) {
static asm void* s_ball_sub(void* param_0, void* param_1) {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/s_ball_sub__FPvPv.s"
}
@@ -2265,6 +2189,91 @@ static u8 old_stick_x[4];
static u8 data_80870AC4[4];
/* 8086D55C-8086D854 0015DC 02F8+00 1/1 0/0 0/0 .text koro2_game__FP11fshop_class */
#ifdef NONMATCHING
static void koro2_game(fshop_class* i_this) {
cXyz sp5C;
cXyz sp68;
i_this->mScale.x = 1.0f;
switch (i_this->field_0x4010) {
case 0:
i_this->field_0x4014.x = 284.0f;
i_this->field_0x4014.y = 87.8f;
i_this->field_0x4014.z = 432.0;
i_this->field_0x4020.z = 0;
i_this->field_0x4020.x = 0;
break;
case 1:
i_this->field_0x4014.x = 204.0f;
i_this->field_0x4014.y = -1352.2f;
i_this->field_0x4014.z = 430.0;
i_this->field_0x4020.y = -0x4000;
cLib_addCalcAngleS2(&i_this->field_0x4020.x, 0, 2, 0x200);
cLib_addCalcAngleS2(&i_this->field_0x4020.z, 0, 2, 0x200);
case 2:
i_this->mScale.x = 10.0f;
if (i_this->field_0x4010 == 2) {
static f32 old_stick_x = 0.0f;
if ((mDoCPd_c::getSubStickX(PAD_1) >= 0.8f && old_stick_x < 0.8f) ||
(mDoCPd_c::getSubStickX(PAD_1) <= -0.8f && old_stick_x > -0.8f))
{
if (mDoCPd_c::getSubStickX(PAD_1) > 0.0f) {
i_this->field_0x4062 += 0x4000;
} else {
i_this->field_0x4062 += -0x4000;
}
}
old_stick_x = mDoCPd_c::getSubStickX(PAD_1);
cLib_addCalcAngleS2(&i_this->field_0x4060, i_this->field_0x4062, 4, 0x1000);
mDoMtx_YrotS(*calc_mtx, -i_this->field_0x4060);
sp5C.x = mDoCPd_c::getStickX3D(PAD_1);
sp5C.y = 0.0f;
sp5C.z = mDoCPd_c::getStickY(PAD_1);
MtxPosition(&sp5C, &sp68);
f32 var_f2 = sp68.x;
f32 var_f3 = sp68.z;
f32 var_f31;
f32 var_f3_2;
if (var_f2 > 0.15f) {
var_f31 = var_f2 - 0.15f;
} else if (var_f2 < -0.15f) {
var_f31 = var_f2 + 0.15f;
} else {
var_f31 = 0.0f;
}
if (var_f3 > 0.15f) {
var_f3_2 = var_f3 - 0.15f;
} else if (var_f3 < -0.15f) {
var_f3_2 = var_f3 + 0.15f;
} else {
var_f3_2 = 0.0f;
}
cLib_addCalcAngleS2(&i_this->field_0x4020.x, var_f3_2 * -6000.0f, 4, 0x200);
cLib_addCalcAngleS2(&i_this->field_0x4020.z, var_f31 * -6000.0f, 4, 0x200);
}
break;
}
i_this->field_0x4008 = (fshop_class*)i_fpcM_Search(s_sel_sub, i_this);
if (i_this->field_0x4008 != NULL) {
stage_copy(i_this->field_0x4008, i_this);
i_this->field_0x4008->field_0x400d = 0;
fshop_class* ball_p = (fshop_class*)i_fpcM_Search(s_ball_sub, i_this);
if (ball_p != NULL) {
ball_p->field_0x4008 = i_this->field_0x4008;
}
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -2273,6 +2282,7 @@ static asm void koro2_game(fshop_class* param_0) {
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/koro2_game__FP11fshop_class.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 808707A4-808707B4 000520 0010+00 1/1 0/0 0/0 .data c_x$4477 */
@@ -2946,7 +2956,8 @@ asm fs_koro2_s::~fs_koro2_s() {
#pragma pop
/* 8086FDB4-8086FDB8 003E34 0004+00 1/1 0/0 0/0 .text __ct__10fs_koro2_sFv */
fs_koro2_s::fs_koro2_s() {
// fs_koro2_s::fs_koro2_s() {
extern "C" void __ct__10fs_koro2_sFv() {
/* empty function */
}
@@ -2954,7 +2965,8 @@ fs_koro2_s::fs_koro2_s() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dBgS_ObjAcch::~dBgS_ObjAcch() {
// asm dBgS_ObjAcch::~dBgS_ObjAcch() {
extern "C" asm void __dt__12dBgS_ObjAcchFv() {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__dt__12dBgS_ObjAcchFv.s"
}
@@ -2964,7 +2976,8 @@ asm dBgS_ObjAcch::~dBgS_ObjAcch() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dBgS_AcchCir::~dBgS_AcchCir() {
// asm dBgS_AcchCir::~dBgS_AcchCir() {
extern "C" asm void __dt__12dBgS_AcchCirFv() {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__dt__12dBgS_AcchCirFv.s"
}
@@ -2981,7 +2994,8 @@ asm fs_tsubo_s::~fs_tsubo_s() {
#pragma pop
/* 8086FED4-8086FED8 003F54 0004+00 1/1 0/0 0/0 .text __ct__10fs_tsubo_sFv */
fs_tsubo_s::fs_tsubo_s() {
// fs_tsubo_s::fs_tsubo_s() {
extern "C" void __ct__10fs_tsubo_sFv() {
/* empty function */
}
@@ -2999,14 +3013,16 @@ asm fs_weed_s::~fs_weed_s() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm fs_weed_s::fs_weed_s() {
// asm fs_weed_s::fs_weed_s() {
extern "C" asm void __ct__9fs_weed_sFv() {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__ct__9fs_weed_sFv.s"
}
#pragma pop
/* 8086FF80-8086FF84 004000 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */
cXyz::cXyz() {
// cXyz::cXyz() {
extern "C" void __ct__4cXyzFv() {
/* empty function */
}
@@ -3024,7 +3040,8 @@ asm fs_rod_s::~fs_rod_s() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm fs_rod_s::fs_rod_s() {
// asm fs_rod_s::fs_rod_s() {
extern "C" asm void __ct__8fs_rod_sFv() {
nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__ct__8fs_rod_sFv.s"
}
@@ -3041,7 +3058,8 @@ asm fs_lure_s::~fs_lure_s() {
#pragma pop
/* 80870018-8087001C 004098 0004+00 1/1 0/0 0/0 .text __ct__9fs_lure_sFv */
fs_lure_s::fs_lure_s() {
// fs_lure_s::fs_lure_s() {
extern "C" void __ct__9fs_lure_sFv() {
/* empty function */
}
@@ -3049,8 +3067,7 @@ fs_lure_s::fs_lure_s() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void __sinit_d_a_mg_fshop_cpp() {
nofralloc
asm void __sinit_d_a_mg_fshop_cpp(){nofralloc
#include "asm/rel/d/a/d_a_mg_fshop/d_a_mg_fshop/__sinit_d_a_mg_fshop_cpp.s"
}
#pragma pop
+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 = {