d_a_obj_wood match

This commit is contained in:
Jasper St. Pierre
2023-11-26 15:25:15 -08:00
parent ed215c92aa
commit 3da166c0b7
5 changed files with 101 additions and 80 deletions
+1 -1
View File
@@ -1289,7 +1289,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_toripost", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_tousekiki"),
ActorRel(NonMatching, "d_a_obj_warpt"),
ActorRel(NonMatching, "d_a_obj_wood"),
ActorRel(Matching, "d_a_obj_wood", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_pirate_flag"),
ActorRel(NonMatching, "d_a_race_item"),
ActorRel(NonMatching, "d_a_rd", extra_cflags=['-pragma "nosyminline on"']),
+17 -8
View File
@@ -2,18 +2,27 @@
#define D_A_OBJ_WOOD_H
#include "f_op/f_op_actor.h"
#include "d/d_cc_d.h"
namespace daObjWood {
class Method : public fopAc_ac_c {
class Act_c : public fopAc_ac_c {
public:
void Create(void*);
void Delete(void*);
void Execute(void*);
void Draw(void*);
void IsDelete(void*);
inline s32 _create();
inline bool _delete();
inline bool _execute();
inline bool _draw();
public:
/* Place member variables here */
/* 0x290 */ u32 field_0x290[3];
/* 0x2B4 */ dCcD_Stts mStts;
/* 0x2D8 */ dCcD_Cyl mCyl;
};
namespace Method {
s32 Create(void*);
BOOL Delete(void*);
BOOL Execute(void*);
BOOL Draw(void*);
BOOL IsDelete(void*);
};
};
+19 -56
View File
@@ -1636,65 +1636,28 @@ inline dDetect_c& dComIfGp_getDetect() {
return g_dComIfG_gameInfo.play.getDetect();
}
inline dMagma_packet_c* dComIfGp_getMagma() {
return g_dComIfG_gameInfo.play.getMagma();
}
inline dGrass_packet_c* dComIfGp_createGrass() { return g_dComIfG_gameInfo.play.createGrass(); }
inline dTree_packet_c* dComIfGp_createTree() { return g_dComIfG_gameInfo.play.createTree(); }
inline dFlower_packet_c* dComIfGp_createFlower() { return g_dComIfG_gameInfo.play.createFlower(); }
inline dWood::Packet_c* dComIfGp_createWood() { return g_dComIfG_gameInfo.play.createWood(); }
inline dGrass_packet_c* dComIfGp_getGrass() {
return g_dComIfG_gameInfo.play.getGrass();
}
inline dMagma_packet_c* dComIfGp_getMagma() { return g_dComIfG_gameInfo.play.getMagma(); }
inline dGrass_packet_c* dComIfGp_getGrass() { return g_dComIfG_gameInfo.play.getGrass(); }
inline dTree_packet_c* dComIfGp_getTree() { return g_dComIfG_gameInfo.play.getTree(); }
inline dFlower_packet_c* dComIfGp_getFlower() { return g_dComIfG_gameInfo.play.getFlower(); }
inline dWood::Packet_c* dComIfGp_getWood() { return g_dComIfG_gameInfo.play.getWood(); }
inline dTree_packet_c* dComIfGp_getTree() {
return g_dComIfG_gameInfo.play.getTree();
}
inline void dComIfGp_executeMagma() { return g_dComIfG_gameInfo.play.executeMagma(); }
inline void dComIfGp_executeGrass() { return g_dComIfG_gameInfo.play.executeGrass(); }
inline void dComIfGp_executeTree() { return g_dComIfG_gameInfo.play.executeTree(); }
inline void dComIfGp_executeFlower() { return g_dComIfG_gameInfo.play.executeFlower(); }
inline void dComIfGp_executeWood() { return g_dComIfG_gameInfo.play.executeWood(); }
inline dWood::Packet_c* dComIfGp_getWood() {
return g_dComIfG_gameInfo.play.getWood();
}
inline dFlower_packet_c* dComIfGp_getFlower() {
return g_dComIfG_gameInfo.play.getFlower();
}
inline void dComIfGp_executeMagma() {
return g_dComIfG_gameInfo.play.executeMagma();
}
inline void dComIfGp_executeGrass() {
return g_dComIfG_gameInfo.play.executeGrass();
}
inline void dComIfGp_executeTree() {
return g_dComIfG_gameInfo.play.executeTree();
}
inline void dComIfGp_executeWood() {
return g_dComIfG_gameInfo.play.executeWood();
}
inline void dComIfGp_executeFlower() {
return g_dComIfG_gameInfo.play.executeFlower();
}
inline void dComIfGp_drawMagma() {
return g_dComIfG_gameInfo.play.drawMagma();
}
inline void dComIfGp_drawGrass() {
return g_dComIfG_gameInfo.play.drawGrass();
}
inline void dComIfGp_drawTree() {
return g_dComIfG_gameInfo.play.drawTree();
}
inline void dComIfGp_drawWood() {
return g_dComIfG_gameInfo.play.drawWood();
}
inline void dComIfGp_drawFlower() {
return g_dComIfG_gameInfo.play.drawFlower();
}
inline void dComIfGp_drawMagma() { return g_dComIfG_gameInfo.play.drawMagma(); }
inline void dComIfGp_drawGrass() { return g_dComIfG_gameInfo.play.drawGrass(); }
inline void dComIfGp_drawTree() { return g_dComIfG_gameInfo.play.drawTree(); }
inline void dComIfGp_drawFlower() { return g_dComIfG_gameInfo.play.drawFlower(); }
inline void dComIfGp_drawWood() { return g_dComIfG_gameInfo.play.drawWood(); }
inline void dComIfGp_map_mapBufferSendAGB(int param_0) {
dMap_c::mapBufferSendAGB(param_0);
+3 -3
View File
@@ -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;
+61 -12
View File
@@ -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,
};