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] 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);