Skip to content

Commit

Permalink
anmTexPat_c OK
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper committed Jun 21, 2024
1 parent e0a615a commit ae9477d
Show file tree
Hide file tree
Showing 19 changed files with 369 additions and 34 deletions.
8 changes: 8 additions & 0 deletions config/SOUE01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ m/m3d/m3d.cpp:
.text start:0x802E3E50 end:0x802E4714
.sbss start:0x80575BD0 end:0x80575BE8

m/m3d/m_proc.cpp:
.text start:0x802E4720 end:0x802E48D4

m/m3d/m_anmchr.cpp:
.text start:0x802E48E0 end:0x802E4D98
.data start:0x805424D0 end:0x805424E8
Expand All @@ -285,6 +288,11 @@ m/m3d/m_anmmatclr.cpp:
.data start:0x80542500 end:0x80542530
.sdata2 start:0x8057CCD0 end:0x8057CCE0

m/m3d/m_anmtexpat.cpp:
.text start:0x802E63C0 end:0x802E6EB4
.data start:0x80542568 end:0x80542598
.sdata2 start:0x8057CCF8 end:0x8057CD08

m/m3d/m_anmtexsrt.cpp:
.text start:0x802E6EC0 end:0x802E7A54
.data start:0x80542598 end:0x805425C8
Expand Down
36 changes: 18 additions & 18 deletions config/SOUE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17441,21 +17441,21 @@ fn_802E47C0 = .text:0x802E47C0; // type:function size:0x4
fn_802E47D0 = .text:0x802E47D0; // type:function size:0x4
create__Q23m3d6proc_cFP12mAllocator_cPUl = .text:0x802E47E0; // type:function size:0xF4
__dt__Q23m3d8anmChr_cFv = .text:0x802E48E0; // type:function size:0x58
getType__Q23m3d8anmChr_cFv = .text:0x802E4940; // type:function size:0x8
getType__Q23m3d8anmChr_cCFv = .text:0x802E4940; // type:function size:0x8
create__Q23m3d8anmChr_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmChrP12mAllocator_cPUl = .text:0x802E4950; // type:function size:0x120
setAnm__Q23m3d8anmChr_cFRQ23m3d6bmdl_cQ34nw4r3g3d9ResAnmChrQ23m3d10playMode_e = .text:0x802E4A70; // type:function size:0x84
setAnmAfter__Q23m3d8anmChr_cFRQ23m3d6bmdl_cQ34nw4r3g3d9ResAnmChrQ23m3d10playMode_e = .text:0x802E4B00; // type:function size:0x22C
setFrmCtrlDefault__Q23m3d8anmChr_cFRQ34nw4r3g3d9ResAnmChrQ23m3d10playMode_e = .text:0x802E4D30; // type:function size:0x68
__dt__Q23m3d13anmChrBlend_cFv = .text:0x802E4DA0; // type:function size:0x58
getType__Q23m3d13anmChrBlend_cFv = .text:0x802E4E00; // type:function size:0x8
getType__Q23m3d13anmChrBlend_cCFv = .text:0x802E4E00; // type:function size:0x8
create__Q23m3d13anmChrBlend_cFQ34nw4r3g3d6ResMdliP12mAllocator_cPUl = .text:0x802E4E10; // type:function size:0xB8
attach__Q23m3d13anmChrBlend_cFiPQ34nw4r3g3d12AnmObjChrResf = .text:0x802E4ED0; // type:function size:0xD8
attach__Q23m3d13anmChrBlend_cFiPQ23m3d8anmChr_cf = .text:0x802E4FB0; // type:function size:0xB4
detach__Q23m3d13anmChrBlend_cFi = .text:0x802E5070; // type:function size:0xA0
setWeight__Q23m3d13anmChrBlend_cFif = .text:0x802E5110; // type:function size:0xB0
getWeight__Q23m3d13anmChrBlend_cCFi = .text:0x802E51C0; // type:function size:0xA0
__dt__Q33m3d11anmMatClr_c7child_cFv = .text:0x802E5260; // type:function size:0x58
getType__Q33m3d11anmMatClr_c7child_cFv = .text:0x802E52C0; // type:function size:0x8
getType__Q33m3d11anmMatClr_c7child_cCFv = .text:0x802E52C0; // type:function size:0x8
heapCost__Q33m3d11anmMatClr_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmClrb = .text:0x802E52D0; // type:function size:0x7C
create__Q33m3d11anmMatClr_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmClrP12mAllocator_cPUl = .text:0x802E5350; // type:function size:0x11C
setAnm__Q33m3d11anmMatClr_c7child_cFRQ23m3d6bmdl_cQ34nw4r3g3d9ResAnmClrQ23m3d10playMode_e = .text:0x802E5470; // type:function size:0xB4
Expand All @@ -17464,7 +17464,7 @@ setFrmCtrlDefault__Q33m3d11anmMatClr_c7child_cFRQ34nw4r3g3d9ResAnmClrQ23m3d10pla
heapCost__Q23m3d11anmMatClr_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmClrlb = .text:0x802E5600; // type:function size:0xE0
create__Q23m3d11anmMatClr_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmClrP12mAllocator_cPUll = .text:0x802E56E0; // type:function size:0x23C
__dt__Q23m3d11anmMatClr_cFv = .text:0x802E5920; // type:function size:0x6C
getType__Q23m3d11anmMatClr_cFv = .text:0x802E5990; // type:function size:0x8
getType__Q23m3d11anmMatClr_cCFv = .text:0x802E5990; // type:function size:0x8
remove__Q23m3d11anmMatClr_cFv = .text:0x802E59A0; // type:function size:0xEC
setAnm__Q23m3d11anmMatClr_cFRQ23m3d6bmdl_cQ34nw4r3g3d9ResAnmClrlQ23m3d10playMode_e = .text:0x802E5A90; // type:function size:0x140
play__Q23m3d11anmMatClr_cFv = .text:0x802E5BD0; // type:function size:0xAC
Expand Down Expand Up @@ -17493,17 +17493,17 @@ fn_802E6130 = .text:0x802E6130; // type:function size:0x8
fn_802E6140 = .text:0x802E6140; // type:function size:0x120
fn_802E6260 = .text:0x802E6260; // type:function size:0xEC
fn_802E6350 = .text:0x802E6350; // type:function size:0x68
fn_802E63C0 = .text:0x802E63C0; // type:function size:0x8
fn_802E63D0 = .text:0x802E63D0; // type:function size:0x58
getType__Q33m3d11anmTexPat_c7child_cCFv = .text:0x802E63C0; // type:function size:0x8
__dt__Q33m3d11anmTexPat_c7child_cFv = .text:0x802E63D0; // type:function size:0x58
heapCost__Q33m3d11anmTexPat_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexPatb = .text:0x802E6430; // type:function size:0x7C
create__Q33m3d11anmTexPat_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexPatP12mAllocator_cPUl = .text:0x802E64B0; // type:function size:0x11C
fn_802E65D0 = .text:0x802E65D0; // type:function size:0xB4
setAnm__Q33m3d11anmTexPat_c7child_cFRQ23m3d6bmdl_cQ34nw4r3g3d12ResAnmTexPatQ23m3d10playMode_e = .text:0x802E65D0; // type:function size:0xB4
releaseAnm__Q33m3d11anmTexPat_c7child_cFv = .text:0x802E6690; // type:function size:0x5C
setFrmCtrlDefault__Q33m3d11anmTexPat_c7child_cFRQ34nw4r3g3d12ResAnmTexPatQ23m3d10playMode_e = .text:0x802E66F0; // type:function size:0x68
heapCost__Q23m3d11anmTexPat_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexPatlb = .text:0x802E6760; // type:function size:0xE0
create__Q23m3d11anmTexPat_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexPatP12mAllocator_cPUll = .text:0x802E6840; // type:function size:0x23C
__dt__Q23m3d11anmTexPat_cFv = .text:0x802E6A80; // type:function size:0x6C
fn_802E6AF0 = .text:0x802E6AF0; // type:function size:0x8
getType__Q23m3d11anmTexPat_cCFv = .text:0x802E6AF0; // type:function size:0x8
remove__Q23m3d11anmTexPat_cFv = .text:0x802E6B00; // type:function size:0xEC
setAnm__Q23m3d11anmTexPat_cFRQ23m3d6bmdl_cQ34nw4r3g3d12ResAnmTexPatlQ23m3d10playMode_e = .text:0x802E6BF0; // type:function size:0x140
play__Q23m3d11anmTexPat_cFv = .text:0x802E6D30; // type:function size:0xAC
Expand All @@ -17513,8 +17513,8 @@ setFrame__Q23m3d11anmTexPat_cFfl = .text:0x802E6E50; // type:function size:0x10
setRate__Q23m3d11anmTexPat_cFfl = .text:0x802E6E60; // type:function size:0x10
isStop__Q23m3d11anmTexPat_cCFl = .text:0x802E6E70; // type:function size:0x10
getFrameMax__Q23m3d11anmTexPat_cCFl = .text:0x802E6E80; // type:function size:0x14
fn_802E6EA0 = .text:0x802E6EA0; // type:function size:0x14
getType__Q33m3d11anmTexSrt_c7child_cFv = .text:0x802E6EC0; // type:function size:0x8
setFrameStart__Q23m3d11anmTexPat_cFfl = .text:0x802E6EA0; // type:function size:0x14
getType__Q33m3d11anmTexSrt_c7child_cCFv = .text:0x802E6EC0; // type:function size:0x8
__dt__Q33m3d11anmTexSrt_c7child_cFv = .text:0x802E6ED0; // type:function size:0x58
heapCost__Q33m3d11anmTexSrt_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexSrtb = .text:0x802E6F30; // type:function size:0x7C
create__Q33m3d11anmTexSrt_c7child_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexSrtP12mAllocator_cPUl = .text:0x802E6FB0; // type:function size:0x12C
Expand All @@ -17524,7 +17524,7 @@ setFrmCtrlDefault__Q33m3d11anmTexSrt_c7child_cFRQ34nw4r3g3d12ResAnmTexSrtQ23m3d1
heapCost__Q23m3d11anmTexSrt_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexSrtlb = .text:0x802E7270; // type:function size:0xE0
create__Q23m3d11anmTexSrt_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d12ResAnmTexSrtP12mAllocator_cPUll = .text:0x802E7350; // type:function size:0x27C
__dt__Q23m3d11anmTexSrt_cFv = .text:0x802E75D0; // type:function size:0x6C
getType__Q23m3d11anmTexSrt_cFv = .text:0x802E7640; // type:function size:0x8
getType__Q23m3d11anmTexSrt_cCFv = .text:0x802E7640; // type:function size:0x8
remove__Q23m3d11anmTexSrt_cFv = .text:0x802E7650; // type:function size:0xEC
setAnm__Q23m3d11anmTexSrt_cFRQ23m3d6bmdl_cQ34nw4r3g3d12ResAnmTexSrtlQ23m3d10playMode_e = .text:0x802E7740; // type:function size:0x140
play__Q23m3d11anmTexSrt_cFv = .text:0x802E7880; // type:function size:0xAC
Expand All @@ -17539,7 +17539,7 @@ getFrameMax__Q23m3d11anmTexSrt_cCFl = .text:0x802E7A00; // type:function size:0x
setFrameStart__Q23m3d11anmTexSrt_cFfl = .text:0x802E7A20; // type:function size:0x14
getFrameStart__Q23m3d11anmTexSrt_cCFl = .text:0x802E7A40; // type:function size:0x14
__dt__Q23m3d8anmVis_cFv = .text:0x802E7A60; // type:function size:0x58
getType__Q23m3d8anmVis_cFv = .text:0x802E7AC0; // type:function size:0x8
getType__Q23m3d8anmVis_cCFv = .text:0x802E7AC0; // type:function size:0x8
create__Q23m3d8anmVis_cFQ34nw4r3g3d6ResMdlQ34nw4r3g3d9ResAnmVisP12mAllocator_cPUl = .text:0x802E7AD0; // type:function size:0x118
setAnm__Q23m3d8anmVis_cFRQ23m3d6bmdl_cQ34nw4r3g3d9ResAnmVisQ23m3d10playMode_e = .text:0x802E7BF0; // type:function size:0xE8
setFrmCtrlDefault__Q23m3d8anmVis_cFRQ34nw4r3g3d9ResAnmVisQ23m3d10playMode_e = .text:0x802E7CE0; // type:function size:0x68
Expand Down Expand Up @@ -24517,9 +24517,9 @@ fn_80445310 = .text:0x80445310; // type:function size:0x54
fn_80445370 = .text:0x80445370; // type:function size:0xF4
fn_80445470 = .text:0x80445470; // type:function size:0xB8
fn_80445530 = .text:0x80445530; // type:function size:0x7C
fn_804455B0 = .text:0x804455B0; // type:function size:0x134
Construct__Q34nw4r3g3d20AnmObjTexPatOverrideFP12MEMAllocatorPUlQ34nw4r3g3d6ResMdli = .text:0x804455B0; // type:function size:0x134
fn_804456F0 = .text:0x804456F0; // type:function size:0xC0
fn_804457B0 = .text:0x804457B0; // type:function size:0x1F0
Construct__Q34nw4r3g3d15AnmObjTexPatResFP12MEMAllocatorPUlQ34nw4r3g3d12ResAnmTexPatQ34nw4r3g3d6ResMdlb = .text:0x804457B0; // type:function size:0x1F0
fn_804459A0 = .text:0x804459A0; // type:function size:0xC0
fn_80445A60 = .text:0x80445A60; // type:function size:0x8
fn_80445A70 = .text:0x80445A70; // type:function size:0xB4
Expand Down Expand Up @@ -29095,8 +29095,8 @@ TYPE_NAME__Q34nw4r3g3d20AnmObjMatClrOverride = .rodata:0x804F70C8; // type:objec
TYPE_NAME__Q34nw4r3g3d15AnmObjMatClrRes = .rodata:0x804F70E8; // type:object size:0x18
lbl_804F7100 = .rodata:0x804F7100; // type:object size:0x18
lbl_804F7118 = .rodata:0x804F7118; // type:object size:0x18
lbl_804F7130 = .rodata:0x804F7130; // type:object size:0x20
lbl_804F7150 = .rodata:0x804F7150; // type:object size:0x18
TYPE_NAME__Q34nw4r3g3d20AnmObjTexPatOverride = .rodata:0x804F7130; // type:object size:0x20
TYPE_NAME__Q34nw4r3g3d15AnmObjTexPatRes = .rodata:0x804F7150; // type:object size:0x18
lbl_804F7168 = .rodata:0x804F7168; // type:object size:0x18
lbl_804F7180 = .rodata:0x804F7180; // type:object size:0x18
TYPE_NAME__Q34nw4r3g3d20AnmObjTexSrtOverride = .rodata:0x804F7198; // type:object size:0x20
Expand Down Expand Up @@ -35688,8 +35688,8 @@ __vt__Q23m3d11anmMatClr_c = .data:0x80542500; // type:object size:0x18
__vt__Q33m3d11anmMatClr_c7child_c = .data:0x80542518; // type:object size:0x18
lbl_80542530 = .data:0x80542530; // type:object size:0x20
lbl_80542550 = .data:0x80542550; // type:object size:0x18
lbl_80542568 = .data:0x80542568; // type:object size:0x18
lbl_80542580 = .data:0x80542580; // type:object size:0x18
__vt__Q23m3d11anmTexPat_c = .data:0x80542568; // type:object size:0x18
__vt__Q33m3d11anmTexPat_c7child_c = .data:0x80542580; // type:object size:0x18
__vt__Q23m3d11anmTexSrt_c = .data:0x80542598; // type:object size:0x18
__vt__Q33m3d11anmTexSrt_c7child_c = .data:0x805425B0; // type:object size:0x18
__vt__Q23m3d8anmVis_c = .data:0x805425C8; // type:object size:0x18
Expand Down
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,10 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
Object(Matching, "f/f_list.cpp"),
Object(Matching, "f/f_manager.cpp"),
Object(NonMatching, "m/m3d/m3d.cpp"),
Object(NonMatching, "m/m3d/m_proc.cpp"),
Object(Matching, "m/m3d/m_anmchr.cpp"),
Object(Matching, "m/m3d/m_anmchrblend.cpp"),
Object(Matching, "m/m3d/m_anmtexpat.cpp"),
Object(Matching, "m/m3d/m_anmtexsrt.cpp"),
Object(Matching, "m/m3d/m_anmmatclr.cpp"),
Object(Matching, "m/m3d/m_anmvis.cpp"),
Expand Down
2 changes: 1 addition & 1 deletion include/m/m3d/m_anmchr.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class anmChr_c : public fanm_c {
public:
virtual ~anmChr_c();

virtual int getType() override;
virtual int getType() const override;

bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmChr, mAllocator_c*, u32*);
void setAnm(bmdl_c &, nw4r::g3d::ResAnmChr, playMode_e);
Expand Down
2 changes: 1 addition & 1 deletion include/m/m3d/m_anmchrblend.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class anmChrBlend_c : public banm_c {
public:
virtual ~anmChrBlend_c();

virtual int getType() override;
virtual int getType() const override;

bool create(nw4r::g3d::ResMdl, int, mAllocator_c *, u32 *);
bool attach(int, nw4r::g3d::AnmObjChrRes *, f32);
Expand Down
4 changes: 2 additions & 2 deletions include/m/m3d/m_anmmatclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class anmMatClr_c : public banm_c {
public:
child_c() {}
virtual ~child_c();
virtual int getType() override;
virtual int getType() const override;

static u32 heapCost(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmClr, bool);
bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmClr, mAllocator_c *, u32 *);
Expand All @@ -25,7 +25,7 @@ class anmMatClr_c : public banm_c {
anmMatClr_c() : mpChildren(nullptr) {}
virtual ~anmMatClr_c();

virtual int getType() override;
virtual int getType() const override;
virtual void remove() override;
virtual void play() override;

Expand Down
52 changes: 52 additions & 0 deletions include/m/m3d/m_anmtexpat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#ifndef M3D_M_ANMTEXPAT_H
#define M3D_M_ANMTEXPAT_H

#include <m/m3d/m_bmdl.h>
#include <m/m3d/m_fanm.h>
#include <nw4r/g3d/g3d_anmtexpat.h>

namespace m3d {

class anmTexPat_c : public banm_c {
class child_c : public fanm_c {
public:
child_c() {}
virtual ~child_c();
virtual int getType() const override;

static u32 heapCost(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexPat, bool);
bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexPat, mAllocator_c*, u32*);
void setAnm(m3d::bmdl_c&, nw4r::g3d::ResAnmTexPat, m3d::playMode_e);
void releaseAnm();
void setFrmCtrlDefault(nw4r::g3d::ResAnmTexPat&, playMode_e);
};

public:
anmTexPat_c(): mpChildren(nullptr) {}
virtual ~anmTexPat_c();

virtual int getType() const override;
virtual void remove() override;
virtual void play() override;

bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexPat, mAllocator_c*, u32*, s32);
static u32 heapCost(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexPat, s32, bool);

void setAnm(bmdl_c&, nw4r::g3d::ResAnmTexPat, s32, playMode_e);

void play(s32);
f32 getFrame(s32) const;
void setFrame(f32, s32);
void setRate(f32, s32);
bool isStop(s32) const;

f32 getFrameMax(s32) const;
void setFrameStart(f32, s32);

private:
child_c *mpChildren;
};

} // namespace m3d

#endif
4 changes: 2 additions & 2 deletions include/m/m3d/m_anmtexsrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class anmTexSrt_c : public banm_c {
public:
child_c() {}
virtual ~child_c();
virtual int getType() override;
virtual int getType() const override;

static u32 heapCost(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexSrt, bool);
bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmTexSrt, mAllocator_c*, u32*);
Expand All @@ -25,7 +25,7 @@ class anmTexSrt_c : public banm_c {
anmTexSrt_c(): mpChildren(nullptr) {}
virtual ~anmTexSrt_c();

virtual int getType() override;
virtual int getType() const override;
virtual void remove() override;
virtual void play() override;

Expand Down
2 changes: 1 addition & 1 deletion include/m/m3d/m_anmvis.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class anmVis_c : public fanm_c {
public:
virtual ~anmVis_c();

virtual int getType() override;
virtual int getType() const override;

bool create(nw4r::g3d::ResMdl, nw4r::g3d::ResAnmVis, mAllocator_c *, u32 *);
void setAnm(m3d::bmdl_c &, nw4r::g3d::ResAnmVis, m3d::playMode_e);
Expand Down
2 changes: 1 addition & 1 deletion include/m/m3d/m_banm.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class banm_c {
banm_c() : mpAnmObj(nullptr), mpFrameHeap(nullptr) {}
virtual ~banm_c();

virtual int getType() = 0;
virtual int getType() const = 0;
virtual void remove();
virtual void play();

Expand Down
2 changes: 1 addition & 1 deletion include/m/m3d/m_fanm.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class fanm_c : public banm_c {
fanm_c();
virtual ~fanm_c();

virtual int getType() = 0;
virtual int getType() const = 0;
virtual void play();

void set(f32, playMode_e, f32, f32);
Expand Down
70 changes: 70 additions & 0 deletions include/nw4r/g3d/g3d_anmtexpat.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef NW4R_G3D_ANMTEXPAT_H
#define NW4R_G3D_ANMTEXPAT_H
#include "nw4r/g3d/g3d_anmobj.h"
#include "nw4r/g3d/g3d_restex.h"
#include "nw4r/g3d/g3d_resanmtexpat.h"

namespace nw4r
{
Expand All @@ -18,6 +20,74 @@ namespace nw4r
ResTex mTexs[ANM_COUNT]; // at 0x4
ResPltt mPltts[ANM_COUNT]; // at 0x24
};

class AnmObjTexPatRes;

class AnmObjTexPat : public AnmObj {
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}

virtual TexPatAnmResult *GetResult(); // at 0x38
virtual void Attach(s32, AnmObjTexPatRes *res); // at 0x3C
virtual void Detach(s32); // at 0x40

private:
int mChildrenArraySize;
u16 *mpChildrenArray;

NW4R_G3D_TYPE_OBJ_DECL(AnmObjTexPat);
};

class AnmObjTexPatNode : public AnmObjTexPat {
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}


inline int Size() {
return mNodeArraySize;
}

AnmObjTexPatRes *GetNode(int i) {
return mpNodes[i];
}

private:
int mNodeArraySize;
AnmObjTexPatRes **mpNodes;

NW4R_G3D_TYPE_OBJ_DECL(AnmObjTexPatNode);
};

class AnmObjTexPatRes : public AnmObjTexPat, public FrameCtrl {
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}


static AnmObjTexPatRes *Construct(MEMAllocator*, u32*, ResAnmTexPat, ResMdl, bool);
private:
ResAnmTexPat mRes;
TexPatAnmResult *mpResultCache;

NW4R_G3D_TYPE_OBJ_DECL(AnmObjTexPatRes);
};

class AnmObjTexPatOverride : public AnmObjTexPatNode {
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}

static AnmObjTexPatOverride *Construct(MEMAllocator*, u32*, ResMdl, int);

NW4R_G3D_TYPE_OBJ_DECL(AnmObjTexPatOverride);
};

}
}

Expand Down
12 changes: 12 additions & 0 deletions include/nw4r/g3d/g3d_resanmtexpat.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ namespace nw4r
char UNK_0x24[0xC];
u16 mTexCount; // at 0x30
u16 mPlttCount; // at 0x32
char UNK_0x34[0x4];
AnmPolicy mAnmPolicy; // at 0x38
};

struct ResAnmTexPat
Expand Down Expand Up @@ -79,6 +81,16 @@ namespace nw4r
{
return static_cast<const ResAnmTexPatMatData *>(mAnmTexPat.ofs_to_obj<ResDic>(ref().mMatDictOffset)[i]);
}

AnmPolicy GetAnmPolicy() const
{
return ref().mAnmPolicy;
}

int GetNumFrame() const
{
return ref().mTexCount;
}

void GetAnmResult(TexPatAnmResult *, u32, float) const;

Expand Down
Loading

0 comments on commit ae9477d

Please sign in to comment.