From c549df80aef5d7df991e41bc00da0e1dff576b50 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:41:48 +0100 Subject: [PATCH 1/7] 100% match --- src/d/actor/d_a_kytag06.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index f79138b7c..4721710b8 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -1,8 +1,6 @@ -// -// Generated by dtk -// Translation Unit: d_a_kytag06.cpp -// - +/** +* d_a_kytag06.cpp +*/ #include "JSystem/JKernel/JKRHeap.h" #include "f_op/f_op_actor.h" #include "f_op/f_op_actor_mng.h" @@ -19,8 +17,6 @@ public: /* 0x294 */ float field_0x294; }; -const float mfloat_4090 = 21.12f; - /* 00000078-00000080 .text daKytag06_Draw__FP13kytag06_class */ static bool daKytag06_Draw(kytag06_class*) { return true; @@ -28,8 +24,8 @@ static bool daKytag06_Draw(kytag06_class*) { /* 00000080-00000194 .text daKytag06_Execute__FP13kytag06_class */ BOOL daKytag06_Execute(kytag06_class* i_this) { - /* Nonmatching */ - int iVar1 = 1; + f32 time; + int date; if (g_dComIfG_gameInfo.play.mEvtCtrl.mMode == 0) { return 1; @@ -37,16 +33,19 @@ BOOL daKytag06_Execute(kytag06_class* i_this) { if(dComIfGp_evmng_startCheck("ARRIVAL_BRK") == 0) { return 1; } - u16 date = dComIfGs_getDate(); - if (90.0f >= dComIfGs_getTime() && dComIfGs_getTime() < 342.0f) { - dComIfGs_setTime(dComIfGs_getTime() + 0.05f); - dComIfGs_setDate(date); - } - dKy_change_colpat(iVar1); - iVar1 = i_this->field_0x294 * 250.0f; - if (iVar1 > g_env_light.mRainCount) { - dKyw_rain_set(iVar1); + time = dComIfGs_getTime(); + date = dComIfGs_getDate(); + if (time >= 90.0f && time < 345) { + time += 0.05f; + } + dComIfGs_setTime(time); + dComIfGs_setDate(date); + + dKy_change_colpat(1); + date = i_this->field_0x294 * 250.0f; + if (date > g_env_light.mRainCount) { + dKyw_rain_set(date); } g_env_light.mThunderEff.mMode = 1; cLib_addCalc(&i_this->field_0x294, 1.0f, 0.1f, 0.001f, 0.0001); From 19c2833d4e05d5b1b020802c776ed64319674d36 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:43:26 +0100 Subject: [PATCH 2/7] Update configure.py --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 8c0b18f6d..464f0757a 100644 --- a/configure.py +++ b/configure.py @@ -1231,7 +1231,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_kytag03"), ActorRel(NonMatching, "d_a_kytag04"), ActorRel(NonMatching, "d_a_kytag05"), - ActorRel(NonMatching, "d_a_kytag06"), + ActorRel(Matching, "d_a_kytag06"), ActorRel(NonMatching, "d_a_kytag07"), ActorRel(NonMatching, "d_a_lamp"), ActorRel(NonMatching, "d_a_lod_bg"), From d9119401d8d98aeb08930df724b21e7df1fb526b Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:44:12 +0100 Subject: [PATCH 3/7] Update d_a_kytag06.cpp --- src/d/actor/d_a_kytag06.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index 4721710b8..470951ddb 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -87,7 +87,7 @@ static actor_method_class l_kytag06__Method = { (process_method_func)daKytag06_Create, }; -extern actor_process_profile_definition g_profile_RECTANGLE = { +extern actor_process_profile_definition g_profile_KYTAG06 = { fpcLy_CURRENT_e, 7, fpcLy_CURRENT_e, From a6d24fc46c698fdac9382fc5d8ed2d84cd973252 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:06:17 +0100 Subject: [PATCH 4/7] parking --- src/d/actor/d_a_kytag06.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index 470951ddb..ba845b9ea 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -17,6 +17,8 @@ public: /* 0x294 */ float field_0x294; }; +static const float[] unk = {1.0f, 0.1f, 0.001f, 0.0001}; + /* 00000078-00000080 .text daKytag06_Draw__FP13kytag06_class */ static bool daKytag06_Draw(kytag06_class*) { return true; From 160ec741454803c8ce7b81e5194ff9073a88cc47 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Wed, 27 Sep 2023 20:31:27 +0100 Subject: [PATCH 5/7] fix naming / formatting --- configure.py | 2 +- src/d/actor/d_a_kytag06.cpp | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure.py b/configure.py index 464f0757a..d1909c6ed 100644 --- a/configure.py +++ b/configure.py @@ -1231,7 +1231,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_kytag03"), ActorRel(NonMatching, "d_a_kytag04"), ActorRel(NonMatching, "d_a_kytag05"), - ActorRel(Matching, "d_a_kytag06"), + ActorRel(Matching, "d_a_kytag06"), ActorRel(NonMatching, "d_a_kytag07"), ActorRel(NonMatching, "d_a_lamp"), ActorRel(NonMatching, "d_a_lod_bg"), diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index ba845b9ea..da7b3607f 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -17,15 +17,13 @@ public: /* 0x294 */ float field_0x294; }; -static const float[] unk = {1.0f, 0.1f, 0.001f, 0.0001}; - /* 00000078-00000080 .text daKytag06_Draw__FP13kytag06_class */ static bool daKytag06_Draw(kytag06_class*) { return true; } /* 00000080-00000194 .text daKytag06_Execute__FP13kytag06_class */ -BOOL daKytag06_Execute(kytag06_class* i_this) { +static BOOL daKytag06_Execute(kytag06_class* i_this) { f32 time; int date; @@ -55,12 +53,12 @@ BOOL daKytag06_Execute(kytag06_class* i_this) { } /* 00000194-0000019C .text daKytag06_IsDelete__FP13kytag06_class */ -static bool daKytag06_IsDelete(kytag06_class*) { +static BOOL daKytag06_IsDelete(kytag06_class*) { return true; } /* 0000019C-000001A4 .text daKytag06_Delete__FP13kytag06_class */ -static bool daKytag06_Delete(kytag06_class*) { +static BOOL daKytag06_Delete(kytag06_class*) { return true; } @@ -81,7 +79,7 @@ static int daKytag06_Create(fopAc_ac_c* i_this) { return var; } -static actor_method_class l_kytag06__Method = { +static actor_method_class l_daKytag06_Method = { (process_method_func)daKytag06_Execute, (process_method_func)daKytag06_Draw, (process_method_func)daKytag06_IsDelete, @@ -100,7 +98,7 @@ extern actor_process_profile_definition g_profile_KYTAG06 = { 0, &g_fopAc_Method.base, 0xA6, - &l_kytag06__Method, + &l_daKytag06_Method, 0x00044000, fopAc_ACTOR_e, fopAc_CULLBOX_0_e, From 9ca4cf524a17e240efe8ea3a7d14784fd51ca838 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Wed, 27 Sep 2023 20:45:25 +0100 Subject: [PATCH 6/7] this should be a class --- src/d/actor/d_a_kytag06.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index da7b3607f..bfcc44a60 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -11,7 +11,7 @@ #include "d/d_procname.h" #include "dolphin/types.h" -struct kytag06_class : fopAc_ac_c { +class kytag06_class : public fopAc_ac_c { public: /* 0x290 */ int field_0x290; /* 0x294 */ float field_0x294; From 0712ebb529fbc135901476c44bef73cd28a10244 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Wed, 27 Sep 2023 21:02:51 +0100 Subject: [PATCH 7/7] marked as nonmatching --- configure.py | 2 +- src/d/actor/d_a_kytag06.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/configure.py b/configure.py index d1909c6ed..8c0b18f6d 100644 --- a/configure.py +++ b/configure.py @@ -1231,7 +1231,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_kytag03"), ActorRel(NonMatching, "d_a_kytag04"), ActorRel(NonMatching, "d_a_kytag05"), - ActorRel(Matching, "d_a_kytag06"), + ActorRel(NonMatching, "d_a_kytag06"), ActorRel(NonMatching, "d_a_kytag07"), ActorRel(NonMatching, "d_a_lamp"), ActorRel(NonMatching, "d_a_lod_bg"), diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index bfcc44a60..b92865d2f 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -7,7 +7,6 @@ #include "d/d_com_inf_game.h" #include "d/d_kankyo.h" #include "d/d_kankyo_wether.h" -#include "d/d_npc.h" #include "d/d_procname.h" #include "dolphin/types.h" @@ -17,12 +16,10 @@ public: /* 0x294 */ float field_0x294; }; -/* 00000078-00000080 .text daKytag06_Draw__FP13kytag06_class */ static bool daKytag06_Draw(kytag06_class*) { return true; } -/* 00000080-00000194 .text daKytag06_Execute__FP13kytag06_class */ static BOOL daKytag06_Execute(kytag06_class* i_this) { f32 time; int date; @@ -52,17 +49,14 @@ static BOOL daKytag06_Execute(kytag06_class* i_this) { return 1; } -/* 00000194-0000019C .text daKytag06_IsDelete__FP13kytag06_class */ static BOOL daKytag06_IsDelete(kytag06_class*) { return true; } -/* 0000019C-000001A4 .text daKytag06_Delete__FP13kytag06_class */ static BOOL daKytag06_Delete(kytag06_class*) { return true; } -/* 000001A4-00000224 .text daKytag06_Create__FP10fopAc_ac_c */ static int daKytag06_Create(fopAc_ac_c* i_this) { kytag06_class* tag = (kytag06_class*)i_this; int var;