Merge pull request #79 from MrPolymorph/d_a_kytag06

[Actor] d_a_kytag06 mostly ok (98%) complete
This commit is contained in:
Jasper St. Pierre
2023-09-25 12:37:48 -07:00
committed by GitHub
4 changed files with 90 additions and 11 deletions
+4
View File
@@ -1246,6 +1246,10 @@ inline char* dComIfGp_evmng_getMyStringP(int staffIdx, const char* name) {
return reinterpret_cast<char*>(dComIfGp_getEventManager().getMySubstanceP(staffIdx, name, 4)); //type 4 is string
}
inline BOOL dComIfGp_evmng_startCheck(char* eventID) {
return dComIfGp_getEventManager().startCheckOld(eventID);
}
inline BOOL dComIfGp_evmng_endCheck(s16 eventID) {
return dComIfGp_getEventManager().endCheck(eventID);
}
+1
View File
@@ -402,6 +402,7 @@ void dKy_vrbox_addcol_set(s16, s16, s16, f32);
BOOL dKy_daynight_check();
void dKy_tevstr_init(dKy_tevstr_c*, s8, u8);
void dKy_Sound_init();
void dKy_change_colpat(u8 param_0);
u8 dKy_pship_existense_chk();
void dKy_Itemgetcol_chg_move();
void dKy_arrowcol_chg_move();
+83 -10
View File
@@ -3,31 +3,104 @@
// Translation Unit: d_a_kytag06.cpp
//
#include "d_a_kytag06.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
#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"
struct kytag06_class : fopAc_ac_c {
public:
/* 0x290 */ int field_0x290;
/* 0x294 */ float field_0x294;
};
const float mfloat_4090 = 21.12f;
/* 00000078-00000080 .text daKytag06_Draw__FP13kytag06_class */
void daKytag06_Draw(kytag06_class*) {
/* Nonmatching */
static bool daKytag06_Draw(kytag06_class*) {
return true;
}
/* 00000080-00000194 .text daKytag06_Execute__FP13kytag06_class */
void daKytag06_Execute(kytag06_class*) {
BOOL daKytag06_Execute(kytag06_class* i_this) {
/* Nonmatching */
int iVar1 = 1;
if (g_dComIfG_gameInfo.play.mEvtCtrl.mMode == 0) {
return 1;
}
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);
}
g_env_light.mThunderEff.mMode = 1;
cLib_addCalc(&i_this->field_0x294, 1.0f, 0.1f, 0.001f, 0.0001);
return 1;
}
/* 00000194-0000019C .text daKytag06_IsDelete__FP13kytag06_class */
void daKytag06_IsDelete(kytag06_class*) {
/* Nonmatching */
static bool daKytag06_IsDelete(kytag06_class*) {
return true;
}
/* 0000019C-000001A4 .text daKytag06_Delete__FP13kytag06_class */
void daKytag06_Delete(kytag06_class*) {
/* Nonmatching */
static bool daKytag06_Delete(kytag06_class*) {
return true;
}
/* 000001A4-00000224 .text daKytag06_Create__FP10fopAc_ac_c */
void daKytag06_Create(fopAc_ac_c*) {
/* Nonmatching */
static int daKytag06_Create(fopAc_ac_c* i_this) {
kytag06_class* tag = (kytag06_class*)i_this;
int var;
fopAcM_SetupActor(tag, kytag06_class);
if(dComIfGs_isSymbol(0) != 0) {
var = 5;
} else {
tag->field_0x294 = 0;
var = 4;
}
return var;
}
static actor_method_class l_kytag06__Method = {
(process_method_func)daKytag06_Execute,
(process_method_func)daKytag06_Draw,
(process_method_func)daKytag06_IsDelete,
(process_method_func)daKytag06_Delete,
(process_method_func)daKytag06_Create,
};
extern actor_process_profile_definition g_profile_RECTANGLE = {
fpcLy_CURRENT_e,
7,
fpcLy_CURRENT_e,
PROC_KYTAG06,
&g_fpcLf_Method.mBase,
sizeof(kytag06_class),
0,
0,
&g_fopAc_Method.base,
0xA6,
&l_kytag06__Method,
0x00044000,
fopAc_ACTOR_e,
fopAc_CULLBOX_0_e,
};
+2 -1
View File
@@ -109,10 +109,11 @@ void dEvent_manager_c::order(short) {
/* 800744E8-80074528 .text startCheck__16dEvent_manager_cFs */
void dEvent_manager_c::startCheck(short) {
/* Nonmatching */
startCheckOld()
}
/* 80074528-80074564 .text startCheckOld__16dEvent_manager_cFPCc */
void dEvent_manager_c::startCheckOld(const char*) {
int dEvent_manager_c::startCheckOld(const char*) {
/* Nonmatching */
}