mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-16 12:45:20 -04:00
d_a_obj_wood match
This commit is contained in:
@@ -143,7 +143,7 @@ s32 daGrass_Create(fopAc_ac_c* i_ac) {
|
||||
|
||||
if (kind == 0) {
|
||||
// grass
|
||||
if (g_dComIfG_gameInfo.play.createGrass() != NULL) {
|
||||
if (dComIfGp_createGrass() != NULL) {
|
||||
s8 item = daGrass_prm::getItemNo(i_this);
|
||||
if (item < 0x20 || item >= 0x40)
|
||||
item = -1;
|
||||
@@ -158,7 +158,7 @@ s32 daGrass_Create(fopAc_ac_c* i_ac) {
|
||||
}
|
||||
} else if (kind == 1) {
|
||||
// tree
|
||||
if (g_dComIfG_gameInfo.play.createTree() != NULL) {
|
||||
if (dComIfGp_createTree() != NULL) {
|
||||
f32 cosR = cM_scos(i_this->current.angle.y), sinR = cM_ssin(i_this->current.angle.y);
|
||||
cXyz pos;
|
||||
pos.y = acpos.y;
|
||||
@@ -172,7 +172,7 @@ s32 daGrass_Create(fopAc_ac_c* i_ac) {
|
||||
}
|
||||
} else if (kind == 2 || kind == 3) {
|
||||
// white flower, pink flower
|
||||
if (g_dComIfG_gameInfo.play.createFlower() != NULL) {
|
||||
if (dComIfGp_createFlower() != NULL) {
|
||||
s8 item = daGrass_prm::getItemNo(i_this);
|
||||
if (item < 0x20 || item >= 0x40)
|
||||
item = 0xFF;
|
||||
|
||||
@@ -4,32 +4,81 @@
|
||||
//
|
||||
|
||||
#include "d/actor/d_a_obj_wood.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
s32 daObjWood::Act_c::_create() {
|
||||
fopAcM_SetupActor(this, Act_c);
|
||||
if (dComIfGp_createWood() != NULL)
|
||||
dComIfGp_getWood()->put_unit(current.pos, fopAcM_GetRoomNo(this));
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
bool daObjWood::Act_c::_delete() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool daObjWood::Act_c::_execute() {
|
||||
mCyl.SetC(current.pos);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool daObjWood::Act_c::_draw() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00000078-00000190 .text Create__Q29daObjWood6MethodFPv */
|
||||
void daObjWood::Method::Create(void*) {
|
||||
/* Nonmatching */
|
||||
s32 daObjWood::Method::Create(void* i_this) {
|
||||
return ((Act_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
/* 00000348-00000350 .text Delete__Q29daObjWood6MethodFPv */
|
||||
void daObjWood::Method::Delete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjWood::Method::Delete(void* i_this) {
|
||||
return ((Act_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
/* 00000350-00000380 .text Execute__Q29daObjWood6MethodFPv */
|
||||
void daObjWood::Method::Execute(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjWood::Method::Execute(void* i_this) {
|
||||
return ((Act_c*)i_this)->_execute();
|
||||
}
|
||||
|
||||
/* 00000380-00000388 .text Draw__Q29daObjWood6MethodFPv */
|
||||
void daObjWood::Method::Draw(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjWood::Method::Draw(void* i_this) {
|
||||
return ((Act_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
/* 00000388-00000390 .text IsDelete__Q29daObjWood6MethodFPv */
|
||||
void daObjWood::Method::IsDelete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjWood::Method::IsDelete(void* i_this) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
namespace daObjWood {
|
||||
namespace Method {
|
||||
actor_method_class Table = {
|
||||
(process_method_func)Create,
|
||||
(process_method_func)Delete,
|
||||
(process_method_func)Execute,
|
||||
(process_method_func)IsDelete,
|
||||
(process_method_func)Draw,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
actor_process_profile_definition g_profile_Obj_Wood = {
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 7,
|
||||
/* ListPrio */ fpcPi_CURRENT_e,
|
||||
/* ProcName */ PROC_Obj_Wood,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.mBase,
|
||||
/* Size */ sizeof(daObjWood::Act_c),
|
||||
/* SizeOther */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x0110,
|
||||
/* Actor SubMtd */ &daObjWood::Method::Table,
|
||||
/* Status */ fopAcStts_UNK40000_e | fopAcStts_CULL_e | fopAcStts_NOCULLEXEC_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user