d_a_obj_junk_repairing OK (#27)

* d_a_obj_junk_repairing OK

* Fix rel_sieve with multi-file RELs
This commit is contained in:
robojumper
2024-09-15 20:54:45 +02:00
committed by GitHub
parent 63365331d8
commit 2f7ceff5b1
11 changed files with 210 additions and 64 deletions
+3 -1
View File
@@ -3,6 +3,8 @@
#include "d/a/d_a_base.h"
#include "m/m_mtx.h"
#include "m/m3d/m_smdl.h"
#include "m/m3d/m_shadow.h"
#include "m/types_m.h"
#include "nw4r/g3d/g3d_resfile.h"
@@ -102,7 +104,7 @@ public:
// Disabling make Lava and other objects Disappear
/* 8002ecd0 */ void drawModel2();
/* 8002ed20 */ void fn_8002ed20();
/* 8002edb0 */ void fn_8002edb0();
/* 8002edb0 */ void fn_8002edb0(m3d::mShadowCircle_c& shadow, m3d::smdl_c& smdl, const mQuat_c *rot, s32, s32, f32);
/* 8002ee40 */ void drawShadow();
/* 8002ef40 */ void createChildAttached(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot,
mVec3_c *scale, u32 params2, u32 roomId);
+42
View File
@@ -0,0 +1,42 @@
#ifndef D_A_OBJ_JUNK_REPAIRING_H
#define D_A_OBJ_JUNK_REPAIRING_H
#include <d/a/obj/d_a_obj_base.h>
#include <m/m3d/m_smdl.h>
#include <m/m3d/m_shadow.h>
#include <s/s_State.hpp>
#include <s/s_StateMgr.hpp>
class dMyShadowCircle_c : public m3d::mShadowCircle_c {};
class dAcOJunkRep_c : public dAcObjBase_c {
public:
dAcOJunkRep_c() : mStateMgr(*this, sStateID::null), mpModelToUse(nullptr) {}
virtual ~dAcOJunkRep_c() {}
virtual bool createHeap() override;
virtual int create() override;
virtual int actorExecute() override;
virtual int draw() override;
virtual int doDelete() override;
STATE_FUNC_DECLARE(dAcOJunkRep_c, Wait);
private:
static const f32 sSomeFloat;
static char sMdlName1[];
static char sMdlName2[];
bool loadMdl(m3d::smdl_c &mdl, const char *name);
void realizeState();
bool getState();
nw4r::g3d::ResFile mResFile;
m3d::smdl_c *mpModelToUse;
m3d::smdl_c mModel1;
m3d::smdl_c mModel2;
dMyShadowCircle_c mShadow;
STATE_MGR_DECLARE(dAcOJunkRep_c);
};
#endif
+1
View File
@@ -9,6 +9,7 @@ namespace EGG {
struct Quatf : public Vector3f {
Quatf() {}
Quatf(f32 f, Vector3f v) : w(f), Vector3f(v) {}
Quatf(f32 f, f32 x, f32 y, f32 z) : w(f), Vector3f(Vector3f(x, y, z)) {}
~Quatf() {}
friend Quatf operator*(const Quatf &q, const Vector3f &vec) {
+2
View File
@@ -6,6 +6,8 @@
class mQuat_c : public EGG::Quatf {
public:
mQuat_c() {}
mQuat_c(f32 x, f32 y, f32 z, f32 w): EGG::Quatf(w, x, y, z) {}
void fn_802F2780(const mQuat_c &other);
};