Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Largely match m_shadow #20

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/SOUE01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,14 @@ m/m3d/m_scnleaf.cpp:
.text start:0x802EBBD0 end:0x802EBFF8
.data start:0x80542708 end:0x8054272C

m/m3d/m_shadow.cpp:
.text start:0x802EC000 end:0x802EDF2C
.ctors start:0x804DB8C8 end:0x804DB8CC
.data start:0x80542730 end:0x805427EC
.sdata start:0x80573FC8 end:0x80573FCC
.sbss start:0x80575BF0 end:0x80575C04
.sdata2 start:0x8057CD68 end:0x8057CD90

m/m3d/m_smdl.cpp:
.text start:0x802EDF30 end:0x802EE094
.data start:0x805427F0 end:0x80542820
Expand Down
106 changes: 53 additions & 53 deletions config/SOUE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17655,40 +17655,40 @@ calc__Q23m3d9scnLeaf_cFb = .text:0x802EBE20; // type:function size:0x78
calcVtx__Q23m3d9scnLeaf_cFb = .text:0x802EBEA0; // type:function size:0x78
calcView__Q23m3d9scnLeaf_cFPvb = .text:0x802EBF20; // type:function size:0x84
setPriorityDraw__Q23m3d9scnLeaf_cFii = .text:0x802EBFB0; // type:function size:0x48
fn_802EC000 = .text:0x802EC000; // type:function size:0x88
fn_802EC090 = .text:0x802EC090; // type:function size:0x7C
fn_802EC110 = .text:0x802EC110; // type:function size:0x1E8
fn_802EC300 = .text:0x802EC300; // type:function size:0x2C
fn_802EC330 = .text:0x802EC330; // type:function size:0xD4
fn_802EC410 = .text:0x802EC410; // type:function size:0x8C
fn_802EC4A0 = .text:0x802EC4A0; // type:function size:0x1DC
fn_802EC680 = .text:0x802EC680; // type:function size:0x9C
fn_802EC720 = .text:0x802EC720; // type:function size:0x24
fn_802EC750 = .text:0x802EC750; // type:function size:0x28
fn_802EC780 = .text:0x802EC780; // type:function size:0xA4
fn_802EC830 = .text:0x802EC830; // type:function size:0x368
fn_802ECBA0 = .text:0x802ECBA0; // type:function size:0x170
fn_802ECD10 = .text:0x802ECD10; // type:function size:0x3E4
fn_802ED100 = .text:0x802ED100; // type:function size:0xE8
fn_802ED1F0 = .text:0x802ED1F0; // type:function size:0x20
fn_802ED210 = .text:0x802ED210; // type:function size:0x20
fn_802ED230 = .text:0x802ED230; // type:function size:0x20
fn_802ED250 = .text:0x802ED250; // type:function size:0x78
fn_802ED2D0 = .text:0x802ED2D0; // type:function size:0x60
fn_802ED330 = .text:0x802ED330; // type:function size:0x9C
fn_802ED3D0 = .text:0x802ED3D0; // type:function size:0x7C
fn_802ED450 = .text:0x802ED450; // type:function size:0x40
fn_802ED490 = .text:0x802ED490; // type:function size:0x16C
fn_802ED600 = .text:0x802ED600; // type:function size:0xF8
fn_802ED700 = .text:0x802ED700; // type:function size:0x148
fn_802ED850 = .text:0x802ED850; // type:function size:0x24C
fn_802EDAA0 = .text:0x802EDAA0; // type:function size:0x108
fn_802EDBB0 = .text:0x802EDBB0; // type:function size:0x68
fn_802EDC20 = .text:0x802EDC20; // type:function size:0x58
fn_802EDC80 = .text:0x802EDC80; // type:function size:0x8
fn_802EDC90 = .text:0x802EDC90; // type:function size:0x17C
fn_802EDE10 = .text:0x802EDE10; // type:function size:0x10C
fn_802EDF20 = .text:0x802EDF20; // type:function size:0xC
__dt__Q23m3d9mShadow_cFv = .text:0x802EC000; // type:function size:0x88
drawOpa__Q23m3d9mShadow_cFv = .text:0x802EC090; // type:function size:0x7C
create__Q23m3d9mShadow_cFiUciUsUlQ34nw4r3g3d6ResMdlUl = .text:0x802EC110; // type:function size:0x1E8
__ct__Q23m3d14mShadowChild_cFv = .text:0x802EC300; // type:function size:0x2C
remove__Q23m3d9mShadow_cFv = .text:0x802EC330; // type:function size:0xD4
reset__Q23m3d9mShadow_cFv = .text:0x802EC410; // type:function size:0x8C
addCircle__Q23m3d9mShadow_cFPQ23m3d15mShadowCircle_cUlUl = .text:0x802EC4A0; // type:function size:0x1DC
drawMdl__Q23m3d9mShadow_cFPQ23m3d15mShadowCircle_cUlRQ23m3d9scnLeaf_cRC7mQuat_cR7mVec3_c6mColorUlf = .text:0x802EC680; // type:function size:0x9C
addMdlToCircle__Q23m3d9mShadow_cFPQ23m3d15mShadowCircle_cRQ23m3d9scnLeaf_cRC7mQuat_c = .text:0x802EC720; // type:function size:0x24
removeCircle__Q23m3d9mShadow_cFPQ23m3d15mShadowCircle_c = .text:0x802EC750; // type:function size:0x28
drawTexObj__Q23m3d9mShadow_cFPQ23m3d15mShadowCircle_cUlPC9_GXTexObjRC6mMtx_cRC7mQuat_cR7mVec3_c6mColorUlf = .text:0x802EC780; // type:function size:0xA4
drawSub2__3m3dFPvUc = .text:0x802EC830; // type:function size:0x368 scope:local
drawSub1__3m3dFPvUc = .text:0x802ECBA0; // type:function size:0x170 scope:local
drawAllShadows__Q23m3d9mShadow_cFv = .text:0x802ECD10; // type:function size:0x3E4
create__Q23m3d9mShadow_cFPCQ23m3d19mShadowCircleConfigQ34nw4r3g3d6ResMdlPQ23EGG4Heap = .text:0x802ED100; // type:function size:0xE8
beforeDraw__Q23m3d9mShadow_cFv = .text:0x802ED1F0; // type:function size:0x20
draw__Q23m3d9mShadow_cFRC6mMtx_cUl = .text:0x802ED210; // type:function size:0x20
afterDraw__Q23m3d9mShadow_cFv = .text:0x802ED230; // type:function size:0x20
swapHeaps__Q23m3d9mShadow_cFv = .text:0x802ED250; // type:function size:0x78
destroy__Q23m3d9mShadow_cFv = .text:0x802ED2D0; // type:function size:0x60
__dt__Q23m3d14mShadowChild_cFv = .text:0x802ED330; // type:function size:0x9C
create__Q23m3d14mShadowChild_cFUcPQ23EGG4Heap = .text:0x802ED3D0; // type:function size:0x7C
set__Q23m3d14mShadowChild_cFRC7mVec3_cf6mColor = .text:0x802ED450; // type:function size:0x40
addMdl__Q23m3d14mShadowChild_cFRQ23m3d9scnLeaf_cRC7mQuat_c = .text:0x802ED490; // type:function size:0x16C
setGeom__Q23m3d14mShadowChild_cFPC9_GXTexObjRC6mMtx_cRC7mQuat_c = .text:0x802ED600; // type:function size:0xF8
updateMtx__Q23m3d14mShadowChild_cFv = .text:0x802ED700; // type:function size:0x148
drawMdl__Q23m3d14mShadowChild_cFv = .text:0x802ED850; // type:function size:0x24C
draw__Q23m3d14mShadowChild_cFv = .text:0x802EDAA0; // type:function size:0x108
__dt__Q23m3d15mShadowCircle_cFv = .text:0x802EDBB0; // type:function size:0x68
__dt__Q23m3d15mCustomShadow_cFv = .text:0x802EDC20; // type:function size:0x58
getType__Q23m3d15mCustomShadow_cCFv = .text:0x802EDC80; // type:function size:0x8
draw__Q23m3d15mCustomShadow_cFRC6mMtx_c = .text:0x802EDC90; // type:function size:0x17C
calc__Q23m3d15mCustomShadow_cF6mMtx_cR6mMtx_c = .text:0x802EDE10; // type:function size:0x10C
__sinit_\m_shadow_cpp = .text:0x802EDF20; // type:function size:0xC scope:local
__ct__Q23m3d6smdl_cFv = .text:0x802EDF30; // type:function size:0x4C
__dt__Q23m3d6smdl_cFv = .text:0x802EDF80; // type:function size:0x58
create__Q23m3d6smdl_cFQ34nw4r3g3d6ResMdlP12mAllocator_cUliPUl = .text:0x802EDFE0; // type:function size:0xB4
Expand Down Expand Up @@ -17865,7 +17865,7 @@ __arraydtor$4414 = .text:0x802F2310; // type:function size:0x1C
fn_802F2330 = .text:0x802F2330; // type:function size:0x120
fn_802F2450 = .text:0x802F2450; // type:function size:0x18C
fn_802F25E0 = .text:0x802F25E0; // type:function size:0x19C
fn_802F2780 = .text:0x802F2780; // type:function size:0x198
fn_802F2780__7mQuat_cFRC7mQuat_c = .text:0x802F2780; // type:function size:0x198
fn_802F2920 = .text:0x802F2920; // type:function size:0x48
fn_802F2970 = .text:0x802F2970; // type:function size:0x110
fn_802F2A80 = .text:0x802F2A80; // type:function size:0xF0
Expand Down Expand Up @@ -24732,7 +24732,7 @@ fn_8044E680 = .text:0x8044E680; // type:function size:0x50
fn_8044E6D0 = .text:0x8044E6D0; // type:function size:0x16C
fn_8044E840 = .text:0x8044E840; // type:function size:0x270
fn_8044EAB0 = .text:0x8044EAB0; // type:function size:0x494
fn_8044EF50 = .text:0x8044EF50; // type:function size:0x8A4
Draw1Mat1ShpDirectly__Q24nw4r3g3dFQ34nw4r3g3d6ResMatQ34nw4r3g3d6ResShpPCQ34nw4r4math5MTX34PCQ34nw4r4math5MTX34UlPQ34nw4r3g3d16Draw1Mat1ShpSwapPQ44nw4r3g3d8G3DState8IndMtxOp = .text:0x8044EF50; // type:function size:0x8A4
fn_8044F800 = .text:0x8044F800; // type:function size:0xC0
fn_8044F8C0 = .text:0x8044F8C0; // type:function size:0xD8
fn_8044F9A0 = .text:0x8044F9A0; // type:function size:0x260
Expand Down Expand Up @@ -26234,8 +26234,8 @@ resizeForMBlock__Q23EGG7FrmHeapFPvUl = .text:0x804962B0; // type:function size:0
getTotalFreeSize__Q23EGG7FrmHeapFv = .text:0x804962C0; // type:function size:0x14
getAllocatableSize__Q23EGG7FrmHeapFl = .text:0x804962E0; // type:function size:0x8
adjust__Q23EGG7FrmHeapFv = .text:0x804962F0; // type:function size:0x78
FUN_80496370 = .text:0x80496370; // type:function size:0x8
FUN_80496380 = .text:0x80496380; // type:function size:0x8
recordState__Q23EGG7FrmHeapFUl = .text:0x80496370; // type:function size:0x8
freeState__Q23EGG7FrmHeapFUl = .text:0x80496380; // type:function size:0x8
getHeapKind__Q23EGG7FrmHeapCFv = .text:0x80496390; // type:function size:0x8
__ct__Q23EGG10AssertHeapFP12MEMiHeapHead = .text:0x804963A0; // type:function size:0x3C
__dt__Q23EGG10AssertHeapFv = .text:0x804963E0; // type:function size:0x74
Expand Down Expand Up @@ -35707,14 +35707,14 @@ __vt__Q23m3d6fanm_c = .data:0x805426A8; // type:object size:0x18
__vt__Q23m3d5mdl_c = .data:0x805426C0; // type:object size:0x2C
__vt__Q33m3d5mdl_c13mdlCallback_c = .data:0x805426F0; // type:object size:0x18
__vt__Q23m3d9scnLeaf_c = .data:0x80542708; // type:object size:0x24
lbl_80542730 = .data:0x80542730; // type:object size:0x10
lbl_80542740 = .data:0x80542740; // type:object size:0x20
lbl_80542760 = .data:0x80542760; // type:object size:0x10
lbl_80542770 = .data:0x80542770; // type:object size:0x10
lbl_80542780 = .data:0x80542780; // type:object size:0x28
lbl_805427A8 = .data:0x805427A8; // type:object size:0x2C
lbl_805427D4 = .data:0x805427D4; // type:object size:0xC
lbl_805427E0 = .data:0x805427E0; // type:object size:0x10
lbl_80542730 = .data:0x80542730; // type:object size:0xA scope:local data:string
sTexMtx__3m3d = .data:0x80542740; // type:object size:0x20 scope:local
sColors__3m3d = .data:0x80542760; // type:object size:0x10 scope:local
sChans__3m3d = .data:0x80542770; // type:object size:0x10 scope:local
__vt__Q23m3d15mCustomShadow_c = .data:0x80542780; // type:object size:0x28
__vt__Q23m3d9mShadow_c = .data:0x805427A8; // type:object size:0x2C
__vt__Q23m3d15mShadowCircle_c = .data:0x805427D4; // type:object size:0xC
__vt__Q23m3d14mShadowChild_c = .data:0x805427E0; // type:object size:0xC
__vt__Q23m3d6smdl_c = .data:0x805427F0; // type:object size:0x2C
__vt__16mHeapAllocator_c = .data:0x80542820; // type:object size:0x14
__vt__12mAllocator_c = .data:0x80542834; // type:object size:0x14
Expand Down Expand Up @@ -39073,7 +39073,7 @@ lbl_80573FB0 = .sdata:0x80573FB0; // type:object size:0x4 data:4byte
lbl_80573FB4 = .sdata:0x80573FB4; // type:object size:0x4 data:4byte
m_rootUniqueID__7fBase_c = .sdata:0x80573FB8; // type:object size:0x4 data:4byte
m_nowLoopProc__10fManager_c = .sdata:0x80573FC0; // type:object size:0x4 data:4byte
lbl_80573FC8 = .sdata:0x80573FC8; // type:object size:0x8 data:4byte
STEP__3m3d = .sdata:0x80573FC8; // type:object size:0x4 data:4byte
lbl_80573FD0 = .sdata:0x80573FD0; // type:object size:0x4
lbl_80573FD4 = .sdata:0x80573FD4; // type:object size:0x1 data:byte
lbl_80573FD8 = .sdata:0x80573FD8; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -40303,11 +40303,11 @@ l_lightMgr_pp__Q23m3d8internal = .sbss:0x80575BDC; // type:object size:0x4 data:
l_numFogMgr__Q23m3d8internal = .sbss:0x80575BE0; // type:object size:0x4 data:4byte
l_fogMgr_pp__Q23m3d8internal = .sbss:0x80575BE4; // type:object size:0x4 data:4byte
l_alignment__Q23m3d8internal = .sbss:0x80575BE8; // type:object size:0x4 data:4byte
lbl_80575BF0 = .sbss:0x80575BF0; // type:object size:0x4 data:4byte
lbl_80575BF4 = .sbss:0x80575BF4; // type:object size:0x4 data:4byte
lbl_80575BF8 = .sbss:0x80575BF8; // type:object size:0x4 data:4byte
lbl_80575BFC = .sbss:0x80575BFC; // type:object size:0x1 data:byte
lbl_80575C00 = .sbss:0x80575C00; // type:object size:0x8 data:4byte
sInstance__Q23m3d9mShadow_c = .sbss:0x80575BF0; // type:object size:0x4 data:4byte
sTexObj__Q23m3d9mShadow_c = .sbss:0x80575BF4; // type:object size:0x4 data:4byte
sResShp__Q23m3d9mShadow_c = .sbss:0x80575BF8; // type:object size:0x4 data:4byte
@GUARD@draw__Q23m3d15mCustomShadow_cFRC6mMtx_c@nullMat = .sbss:0x80575BFC; // type:object size:0x1 data:byte
@LOCAL@draw__Q23m3d15mCustomShadow_cFRC6mMtx_c@nullMat = .sbss:0x80575C00; // type:object size:0x4 data:4byte
Zero__7mAng3_c = .sbss:0x80575C08; // type:object size:0x6 data:2byte
somePtr__4mDvd = .sbss:0x80575C10; // type:object size:0x4 data:4byte
someNumber__4mDvd = .sbss:0x80575C14; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -49129,7 +49129,7 @@ l_param__4mDvd = .bss:0x805CAF68; // type:object size:0x30
lbl_805CAF98 = .bss:0x805CAF98; // type:object size:0xC
@LOCAL@loadToMainRAM__4mDvdFiPcPQ23EGG4HeapQ33EGG9DvdRipper15EAllocDirectionlPUlPUlUl@DvdFile = .bss:0x805CAFA8; // type:object size:0xD0
g_gameHeaps__5mHeap = .bss:0x805CB078; // type:object size:0x10 data:4byte
lbl_805CB088 = .bss:0x805CB088; // type:object size:0x30 data:4byte
Identity__6mMtx_c = .bss:0x805CB088; // type:object size:0x30 data:4byte
g_core__4mPad = .bss:0x805CB0B8; // type:object size:0x10 data:4byte
lbl_805CB0C8 = .bss:0x805CB0C8; // type:object size:0xC
g_PadAdditionalData__4mPad = .bss:0x805CB0D8; // type:object size:0x60 data:float
Expand Down
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
Object(Matching, "m/m3d/m_calc_ratio.cpp"),
Object(Matching, "m/m3d/m_fanm.cpp"),
Object(Matching, "m/m3d/m_mdl.cpp"),
Object(NonMatching, "m/m3d/m_shadow.cpp"),
Object(Matching, "m/m3d/m_scnleaf.cpp"),
Object(Matching, "m/m3d/m_smdl.cpp"),
Object(Matching, "m/m_allocator.cpp"),
Expand Down
3 changes: 1 addition & 2 deletions include/egg/math/eggQuat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

namespace EGG {

struct Quatf : Vector3f {
struct Quatf : public Vector3f {
Quatf() {}
Quatf(f32 f, Vector3f v) : w(f), Vector3f(v) {}

~Quatf() {}

friend Quatf operator*(const Quatf &q, const Vector3f &vec) {
Expand Down
6 changes: 5 additions & 1 deletion include/m/m3d/m_scnleaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ class scnLeaf_c : UnkClass, EGG::Disposer {

void setPriorityDraw(int, int);

inline nw4r::g3d::ScnLeaf *getG3dObject() {
return mpScnLeaf;
}

protected:
nw4r::g3d::ScnLeaf *mpScnLeaf;
/* 0x14 */ nw4r::g3d::ScnLeaf *mpScnLeaf;
};

} // namespace m3d
Expand Down
187 changes: 187 additions & 0 deletions include/m/m3d/m_shadow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
#ifndef M3D_M_SHADOW_H
#define M3D_M_SHADOW_H

#include <egg/core/eggFrmHeap.h>
#include <egg/core/eggHeap.h>
#include <m/m3d/m_proc.h>
#include <m/m_color.h>
#include <m/m_frustum.h>
#include <m/m_heap.h>
#include <m/m_mtx.h>
#include <m/m_quat.h>
#include <m/m_vec.h>

namespace m3d {

/**
* A configuration struct for our global shadow manager.
* The game uses one for most rooms and one for the Koloktos boss fight.
*/
struct mShadowCircleConfig {
u32 heapSize;
u8 count;
u8 unk1;
u8 unk2;
u8 texBufferSize;
u8 drawOpaPriority;
};

/**
* A callback that allows the stage manager to customize parts of
* the shadow pipeline.
*/
class mShadowCallback_c {
public:
virtual ~mShadowCallback_c() {}
virtual void beforeDraw() = 0;
virtual void draw(const mMtx_c &, u32) = 0;
virtual void afterDraw() = 0;
};

class mShadowCircle_c;

/**
* Represents an internal shadow circle.
*/
class mShadowChild_c {
friend class mShadow_c;

public:
nw4r::ut::Node mNode;

mShadowChild_c() : mpCircle(nullptr), mpLeaves(nullptr), field_0x154(0), mNumLeaves(0) {}
/* vt at 0x08 */
virtual ~mShadowChild_c();

bool create(u8, EGG::Heap *);
void set(const mVec3_c &pos, f32 dist, mColor color);
bool setGeom(const GXTexObj *texObj, const mMtx_c &mtx, const mQuat_c &quat);
void draw();
void updateMtx();
void drawMdl();

bool addMdl(scnLeaf_c &mdl, const mQuat_c &quat);

void set0x154(UNKWORD arg) {
field_0x154 = arg;
}

private:
/* 0x00C */ EGG::Heap *mpHeap;
/* 0x010 */ mShadowCircle_c *mpCircle;
/* 0x014 */ u32 mPriorityMaybe;
/* 0x018 */ GXTexObj mTexObj;
/* 0x038 */ mColor mShadowColor;
/* 0x03C */ mQuat_c mQuat;
/* 0x04C */ mFrustum_c mFrustum;
/* 0x13C */ f32 field_0x13C;
/* 0x140 */ scnLeaf_c **mpLeaves;
/* 0x144 */ mVec3_c mPositionMaybe;
/* 0x150 */ f32 mOffsetMaybe;
/* 0x154 */ UNKWORD field_0x154;
/* 0x158 */ u8 mMaxNumLeaves;
/* 0x159 */ u8 mNumLeaves;
/* 0x15A */ u8 mColorChanIdx;
};

/**
* An RAII handle to a shadow circle.
*/
class mShadowCircle_c {
friend class mShadow_c;
friend class mShadowChild_c;

public:
mShadowCircle_c() : mpChild(nullptr) {}
virtual ~mShadowCircle_c();

private:
mShadowChild_c *mpChild;
};

/**
* The global shadow circle manager.
*/
class mShadow_c : public proc_c {
friend class mShadowCircle_c;
friend class mShadowChild_c;

public:
mShadow_c(EGG::Heap *heap)
: mpHeap(heap), mpCurrentHeap(nullptr), mpChilds(nullptr), mpTexBuf(nullptr), mpCallback(nullptr),
mCurrentHeapIdx(0), mFreeChildIdx(0), field_0x66(true) {
nw4r::ut::List_Init(&mList, 0);
}
virtual ~mShadow_c();
virtual void remove() override;
virtual void drawOpa() override;

bool drawMdl(mShadowCircle_c *circle, u32 priority, scnLeaf_c &mdl, const mQuat_c &quat, mVec3_c &pos, mColor color,
u32 param9, f32 dist);
bool drawTexObj(mShadowCircle_c *circle, u32 priority, const GXTexObj *texObj, const mMtx_c &mtx,
const mQuat_c &quat, mVec3_c &pos, mColor color, u32 param9, f32 dist);

bool addMdlToCircle(mShadowCircle_c *circle, scnLeaf_c &mdl, const mQuat_c &quat);

void beforeDraw();
void draw(const mMtx_c &, u32);
void afterDraw();

EGG::FrmHeap *changeHeap(int index) {
mCurrentHeapIdx = index % 2;
mpCurrentHeap = mpFrmHeaps[mCurrentHeapIdx];
}
void swapHeaps();
void create(int count, u8 unk1, int unk2, u16 texBufferSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl,
u32 heapSize);
void reset();

bool addCircle(mShadowCircle_c *circle, u32 priority, u32 unk);
void removeCircle(mShadowCircle_c *circle);

void drawAllShadows();

static void create(const mShadowCircleConfig *, nw4r::g3d::ResMdl mdl, EGG::Heap *heap);
static void destroy();

static mShadow_c *sInstance;

private:
/* 0x18 */ EGG::Heap *mpHeap;
/* 0x1C */ mAllocator_c mAllocator;
/* 0x38 */ EGG::FrmHeap *mpFrmHeaps[2];
/* 0x40 */ EGG::FrmHeap *mpCurrentHeap;
/* 0x44 */ nw4r::ut::List mList;
/* 0x50 */ mShadowChild_c *mpChilds;
/* 0x54 */ void *mpTexBuf;
/* 0x58 */ u32 mTexBufferSize;
/* 0x5C */ mShadowCallback_c *mpCallback;
/* 0x60 */ u8 mCurrentHeapIdx;
/* 0x61 */ u8 mChildCount;
/* 0x62 */ u8 mFreeChildIdx;
/* 0x63 */ u8 mNumTexBuffers;
/* 0x64 */ u8 mFreeTexIdx;
/* 0x65 */ u8 mTexSize;
/* 0x66 */ bool field_0x66;

public:
static GXTexObj *sTexObj;
static nw4r::g3d::ResShp sResShp;
};

class mCustomShadow_c : public scnLeaf_c {
public:
virtual ~mCustomShadow_c();
virtual int getType() const override;
/* 0x24 */ virtual void draw(const mMtx_c &);

void calc(mMtx_c, mMtx_c &);

/* 0x18 */ mMtx_c mMtx;
/* 0x48 */ f32 field_0x48;
/* 0x4C */ f32 field_0x4C;
};

} // namespace m3d

#endif
Loading