Some misc graphics stuff

This commit is contained in:
robojumper
2025-03-15 00:07:44 +01:00
parent 7400f6c66a
commit 3967ab8dc6
30 changed files with 991 additions and 156 deletions
+7
View File
@@ -14,6 +14,13 @@ struct cBgS_PolyInfo;
struct SoundSource {
virtual ~SoundSource() {}
// TODO
virtual bool shutdown(); // 0x48
virtual bool isReadyMaybe(); // 0x100
virtual bool load(void *data, const char *name); // 0x100
virtual void setFrame(f32 frame); // 0x108
virtual void setRate(f32 frame); // 0x10C
};
struct SoundInfo {
+24 -2
View File
@@ -2,6 +2,7 @@
#define D_A_OBJ_BASE_H
#include "c/c_math.h"
#include "common.h"
#include "d/a/d_a_base.h"
#include "d/col/c/c_cc_d.h"
#include "d/col/c/c_m3d_g_aab.h"
@@ -9,6 +10,7 @@
#include "m/m3d/m_shadow.h"
#include "m/m3d/m_smdl.h"
#include "m/m_angle.h"
#include "m/m_color.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "m/types_m.h"
@@ -60,9 +62,29 @@ struct ActorCarryStruct {
// Ghidra has it as `unk_ActorObjectBase`
struct LightingInfo {
/* 0x00 */ u8 mField_0x00[0x60 - 0x00];
/* 0x00 */ u8 mField_0x00[0x40 - 0x00];
/* 0x40 */ mColor mTev0Color;
/* 0x44 */ mColor mTev1Color;
/* 0x48 */ mColor mTev2Color;
/* 0x4C */ mColor mTevPrevColor;
/* 0x50 */ mColor mTevK0Color;
/* 0x54 */ mColor mTevK1Color;
/* 0x58 */ mColor mTevK2Color;
/* 0x5C */ mColor mTevK3Color;
/* 0x60 */ u8 mLightingCode;
/* 0x61 */ u8 mField_0x61[0x70 - 0x61];
/* 0x61 */ u8 _0x61;
/* 0x62 */ u8 _0x62;
/* 0x63 */ u8 _0x63;
/* 0x64 */ u8 _0x64;
/* 0x65 */ bool mUseTev0;
/* 0x66 */ bool mUseTev1;
/* 0x67 */ bool mUseTev2;
/* 0x68 */ bool mUseTevPrev;
/* 0x69 */ bool mUseTevK0;
/* 0x6A */ bool mUseTevK1;
/* 0x6B */ bool mUseTevK2;
/* 0x6C */ bool mUseTevK3;
/* 0x6D */ u8 mField_0x69[0x70 - 0x6D];
};
// Ghidra: ActorObjectBase
+2 -2
View File
@@ -4,7 +4,7 @@
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/bg/d_bg_w.h"
#include "m/m3d/m_anmtexsrt.h"
#include "toBeSorted/unk_with_water.h"
#include "toBeSorted/d_d3d.h"
class dAcOtreasureIsland_c : public dAcObjBase_c {
public:
@@ -20,7 +20,7 @@ private:
const static f32 unkFloat0;
const static f32 unkFloat1;
/* 0x330 */ UnkWithWater waterStuff;
/* 0x330 */ d3d::UnkWithWater waterStuff;
/* 0x348 */ m3d::smdl_c mModel;
/* 0x364 */ m3d::smdl_c mWater00;
/* 0x380 */ m3d::smdl_c mWater01;
+3 -3
View File
@@ -18,8 +18,8 @@
#include "nw4r/math/math_geometry.h"
#include "s/s_State.hpp"
#include "sized_string.h"
#include "toBeSorted/d_d3d.h"
#include "toBeSorted/raii_ptr.h"
#include "toBeSorted/unk_with_water.h"
struct DrawPriorityConfig {
u8 pDrawOpa1;
@@ -57,7 +57,7 @@ class dRoom_c : public dBase_c {
public:
model_c() {}
bool create(nw4r::g3d::ResFile resFile, mAllocator_c &alloc, s32 idx, UnkWithWater *waterThing);
bool create(nw4r::g3d::ResFile resFile, mAllocator_c &alloc, s32 idx, d3d::UnkWithWater *waterThing);
bool getBounds(mVec3_c *min, mVec3_c *max) const;
nw4r::g3d::ResNode getResNode(const char *nodeName);
void updateObjNode(const char *node, bool visible);
@@ -197,7 +197,7 @@ private:
/* 0x068 */ mHeapAllocator_c mAllocator;
/* 0x084 */ nw4r::g3d::ResFile mRoomRes;
/* 0x088 */ UnkWithWater mWaterThing;
/* 0x088 */ d3d::UnkWithWater mWaterThing;
/* 0x0A0 */ model_c mModels[ROOM_NUM_MODELS];
/* 0x220 */ dBgWKCol mBg[ROOM_NUM_BG];
/* 0x4E0 */ STATE_MGR_DECLARE(dRoom_c);
+3 -3
View File
@@ -16,8 +16,8 @@
#include "toBeSorted/arc_managers/layout_arc_manager.h"
#include "toBeSorted/arc_managers/oarc_manager.h"
#include "toBeSorted/attention.h"
#include "toBeSorted/d_d3d.h"
#include "toBeSorted/time_area_mgr.h"
#include "toBeSorted/unk_with_water.h"
class RelObjCtrl {
public:
@@ -62,8 +62,8 @@ public:
return (field_0x88A0 & flag) != 0;
}
void initUnkWithWater(u32 val, UnkWithWater *waterThing);
void destroyUnkWithWater(u32 val, UnkWithWater *waterThing);
void initUnkWithWater(u32 val, d3d::UnkWithWater *waterThing);
void destroyUnkWithWater(u32 val, d3d::UnkWithWater *waterThing);
const RMPL *getRmpl() const {
return mpRmpl;
+25
View File
@@ -0,0 +1,25 @@
#ifndef D_T_SIREN_H
#define D_T_SIREN_H
#include "common.h"
#include "d/t/d_tg.h"
class dTgSiren_c : public dTg_c {
public:
dTgSiren_c() {}
virtual ~dTgSiren_c() {}
static bool isOutOfTime() {
if (sInstance == nullptr) {
return false;
}
return sInstance->outOfTime();
}
private:
bool outOfTime() const;
static dTgSiren_c *sInstance;
};
#endif