Merge pull request #39 from elijah-thomas774/nw4r-lyt

nw4r lyt
This commit is contained in:
Elijah Thomas
2024-06-09 23:49:18 -04:00
committed by GitHub
183 changed files with 10796 additions and 6143 deletions
+3 -1
View File
@@ -27,6 +27,8 @@
"xtr1common": "cpp",
"limits": "cpp",
"utility": "cpp",
"initializer_list": "cpp"
"initializer_list": "cpp",
"new": "cpp",
"cstdlib": "cpp"
}
}
+12 -1
View File
@@ -10,8 +10,19 @@ force_active: [
"ProcessTab__Q34nw4r2ut19TagProcessorBase<c>FPQ34nw4r2ut15PrintContext<c>",
"ProcessLinefeed__Q34nw4r2ut19TagProcessorBase<w>FPQ34nw4r2ut15PrintContext<w>",
"ProcessTab__Q34nw4r2ut19TagProcessorBase<w>FPQ34nw4r2ut15PrintContext<w>",
# "RemoveResourceBuffer__Q44nw4r2ut6detail11ResFontBaseFv",
"RemoveResource__Q34nw4r2ut7ResFontFv",
"Set__Q34nw4r3lyt15ArcResourceLinkFPvPCc",
"__ct__Q34nw4r3lyt24MultiArcResourceAccessorFv",
"__dt__Q34nw4r3lyt24MultiArcResourceAccessorFv",
"Attach__Q34nw4r3lyt24MultiArcResourceAccessorFPQ34nw4r3lyt15ArcResourceLink",
"GetResource__Q34nw4r3lyt24MultiArcResourceAccessorFUlPCcPUl",
"RegistFont__Q34nw4r3lyt24MultiArcResourceAccessorFPQ34nw4r3lyt11FontRefLink",
"GetFont__Q34nw4r3lyt24MultiArcResourceAccessorFPCc",
"GetPaneRect__Q34nw4r3lyt4PaneCFRCQ34nw4r3lyt8DrawInfo",
"SetFont__Q34nw4r3lyt7TextBoxFPCQ34nw4r2ut4Font",
"GetTexMapAry__Q34nw4r3lyt8MaterialCFv",
"Set__Q34nw4r3lyt6TexMapFRC9_GXTexObj",
"ModuleProlog",
"ModuleEpilog",
"ModuleUnresolved",
+89
View File
@@ -420,6 +420,95 @@ nw4r/db/db_assert.cpp:
.text start:0x804373C0 end:0x804373D0
.sbss start:0x80576610 end:0x80576618
nw4r/lyt/lyt_init.cpp:
.text start:0x80486A70 end:0x80486AC4
.data start:0x8056E3E8 end:0x8056E430
.sdata start:0x80574EB0 end:0x80574EB8
nw4r/lyt/lyt_pane.cpp:
.text start:0x80486AD0 end:0x80487EAC
.ctors start:0x804DB974 end:0x804DB978
.data start:0x8056E430 end:0x8056E4A8
.sbss start:0x805766F0 end:0x805766F8
.sdata2 start:0x8057F220 end:0x8057F240
nw4r/lyt/lyt_group.cpp:
.text start:0x80487EB0 end:0x8048820C
.data start:0x8056E4A8 end:0x8056E4B4
nw4r/lyt/lyt_layout.cpp:
.text start:0x80488210 end:0x80489268
.data start:0x8056E4B8 end:0x8056E4F8
.sbss start:0x805766F8 end:0x805766FC
.sdata2 start:0x8057F240 end:0x8057F248
nw4r/lyt/lyt_picture.cpp:
.text start:0x80489270 end:0x804897FC
.ctors start:0x804DB978 end:0x804DB97C
.data start:0x8056E4F8 end:0x8056E570
.sbss start:0x80576700 end:0x80576704
.sdata2 start:0x8057F248 end:0x8057F250
nw4r/lyt/lyt_textBox.cpp:
.text start:0x80489800 end:0x8048B16C
.ctors start:0x804DB97C end:0x804DB980
.data start:0x8056E570 end:0x8056E5F4
.sdata start:0x80574EB8 end:0x80574EBC
.sbss start:0x80576708 end:0x8057670C
.sdata2 start:0x8057F250 end:0x8057F268
nw4r/lyt/lyt_window.cpp:
.text start:0x8048B170 end:0x8048D6FC
.ctors start:0x804DB980 end:0x804DB984
.data start:0x8056E5F8 end:0x8056E6C0
.sbss start:0x80576710 end:0x80576714
.sdata2 start:0x8057F268 end:0x8057F280
nw4r/lyt/lyt_bounding.cpp:
.text start:0x8048D700 end:0x8048D7CC
.ctors start:0x804DB984 end:0x804DB988
.data start:0x8056E6C0 end:0x8056E734
.sbss start:0x80576718 end:0x8057671C
nw4r/lyt/lyt_material.cpp:
.text start:0x8048D7D0 end:0x804905D0
.data start:0x8056E738 end:0x8056E7A8
.sdata2 start:0x8057F280 end:0x8057F2A0
.sbss2 start:0x8057FFB8 end:0x8057FFC0
nw4r/lyt/lyt_texMap.cpp:
.text start:0x804905D0 end:0x80490980
.sdata2 start:0x8057F2A0 end:0x8057F2B4
nw4r/lyt/lyt_drawInfo.cpp:
.text start:0x80490980 end:0x80490A40
.data start:0x8056E7A8 end:0x8056E7B4
.sdata2 start:0x8057F2B8 end:0x8057F2C0
nw4r/lyt/lyt_animation.cpp:
.text start:0x80490A40 end:0x80491FF4
.data start:0x8056E7B8 end:0x8056E7DC
.sdata2 start:0x8057F2C0 end:0x8057F2E0
nw4r/lyt/lyt_resourceAccessor.cpp:
.text start:0x80492000 end:0x80492058
.data start:0x8056E7E0 end:0x8056E7F8
nw4r/lyt/lyt_arcResourceAccessor.cpp:
.text start:0x80492060 end:0x80492780
.data start:0x8056E7F8 end:0x8056E820
.sdata start:0x80574EC0 end:0x80574EC8
nw4r/lyt/lyt_common.cpp:
.text start:0x80492780 end:0x804932E0
.sbss start:0x80576720 end:0x80576728
.sdata2 start:0x8057F2E0 end:0x8057F2E8
.bss start:0x80673AA8 end:0x80673AC8
nw4r/lyt/lyt_util.cpp:
.text start:0x804932E0 end:0x8049350C
.sdata2 start:0x8057F2E8 end:0x8057F2EC
egg/core/eggArchive.cpp:
.text start:0x80493510 end:0x80494254
.data start:0x8056E820 end:0x8056E830
+102 -104
View File
@@ -163,7 +163,7 @@ fn_80007660 = .text:0x80007660; // type:function size:0x94
fn_80007700 = .text:0x80007700; // type:function size:0xDC
fn_800077E0 = .text:0x800077E0; // type:function size:0xA0
fn_80007880 = .text:0x80007880; // type:function size:0x33C
fn_80007BC0 = .text:0x80007BC0; // type:function size:0x40
__dt__Q34nw4r2ut5ColorFv = .text:0x80007BC0; // type:function size:0x40
fn_80007C00 = .text:0x80007C00; // type:function size:0x40
fn_80007C40 = .text:0x80007C40; // type:function size:0x30
fn_80007C70 = .text:0x80007C70; // type:function size:0x1C
@@ -2880,7 +2880,7 @@ fn_80065E70 = .text:0x80065E70; // type:function size:0xC4
fn_80065F40 = .text:0x80065F40; // type:function size:0x28
fn_80065F70 = .text:0x80065F70; // type:function size:0x328
fn_800662A0 = .text:0x800662A0; // type:function size:0xD4
fn_80066380 = .text:0x80066380; // type:function size:0x8
GetRuntimeTypeInfo__Q34nw4r3lyt4PaneCFv = .text:0x80066380; // type:function size:0x8 scope:weak
fn_80066390 = .text:0x80066390; // type:function size:0xE8
fn_80066480 = .text:0x80066480; // type:function size:0xC
fn_80066490 = .text:0x80066490; // type:function size:0x40
@@ -3860,13 +3860,13 @@ fn_800B0F40 = .text:0x800B0F40; // type:function size:0x240
fn_800B1180 = .text:0x800B1180; // type:function size:0x3F0
fn_800B1570 = .text:0x800B1570; // type:function size:0x14
fn_800B1590 = .text:0x800B1590; // type:function size:0x14
fn_800B15B0 = .text:0x800B15B0; // type:function size:0x8
GetRuntimeTypeInfo__Q34nw4r3lyt7TextBoxCFv = .text:0x800B15B0; // type:function size:0x8 scope:weak
fn_800B15C0 = .text:0x800B15C0; // type:function size:0x68
fn_800B1630 = .text:0x800B1630; // type:function size:0x3C
fn_800B1670 = .text:0x800B1670; // type:function size:0x134
fn_800B17B0 = .text:0x800B17B0; // type:function size:0x8
GetRuntimeTypeInfo__Q34nw4r3lyt6WindowCFv = .text:0x800B17B0; // type:function size:0x8 scope:weak
fn_800B17C0 = .text:0x800B17C0; // type:function size:0x58
fn_800B1820 = .text:0x800B1820; // type:function size:0x6C
__dt__Q34nw4r3lyt19ArcResourceAccessorFv = .text:0x800B1820; // type:function size:0x6C scope:weak
fn_800B1890 = .text:0x800B1890; // type:function size:0x40
fn_800B18D0 = .text:0x800B18D0; // type:function size:0x4D4
fn_800B1DB0 = .text:0x800B1DB0; // type:function size:0x15C
@@ -17361,7 +17361,7 @@ searchBaseByGroupType__10fManager_cFUcPC7fBase_c = .text:0x802E2980; // type:fun
mainLoop__10fManager_cFv = .text:0x802E29E0; // type:function size:0xC0
__sinit_\f_manager_cpp = .text:0x802E2AA0; // type:function size:0x138 scope:local
__ct__9fLiMgBa_cFv = .text:0x802E2BE0; // type:function size:0x10
__arraydtor$4132 = .text:0x802E2BF0; // type:function size:0x1C scope:local
__arraydtor = .text:0x802E2BF0; // type:function size:0x1C scope:local
walkPack__11fTrMgPTMF_cFv = .text:0x802E2C10; // type:function size:0x84
searchNodeByProfName__9fTrMgBa_cCFUsPC9fTrNdBa_c = .text:0x802E2CA0; // type:function size:0x68
searchNodeByGroupType__9fTrMgBa_cCFUcPC9fTrNdBa_c = .text:0x802E2D10; // type:function size:0x68
@@ -21678,21 +21678,21 @@ fn_8039B0E0 = .text:0x8039B0E0; // type:function size:0x14
fn_8039B100 = .text:0x8039B100; // type:function size:0x180
fn_8039B280 = .text:0x8039B280; // type:function size:0xA8
fn_8039B330 = .text:0x8039B330; // type:function size:0x64
fn_8039B3A0 = .text:0x8039B3A0; // type:function size:0x1CC
fn_8039B570 = .text:0x8039B570; // type:function size:0xA0
fn_8039B610 = .text:0x8039B610; // type:function size:0x2AC
fn_8039B8C0 = .text:0x8039B8C0; // type:function size:0x50
fn_8039B910 = .text:0x8039B910; // type:function size:0x27C
fn_8039BB90 = .text:0x8039BB90; // type:function size:0x1D0
fn_8039BD60 = .text:0x8039BD60; // type:function size:0x14
fn_8039BD80 = .text:0x8039BD80; // type:function size:0x8
fn_8039BD90 = .text:0x8039BD90; // type:function size:0x8
fn_8039BDA0 = .text:0x8039BDA0; // type:function size:0x8
fn_8039BDB0 = .text:0x8039BDB0; // type:function size:0x58
fn_8039BE10 = .text:0x8039BE10; // type:function size:0x7C
fn_8039BE90 = .text:0x8039BE90; // type:function size:0xBC
fn_8039BF50 = .text:0x8039BF50; // type:function size:0x8
fn_8039BF60 = .text:0x8039BF60; // type:function size:0x54
__AI_SRC_INIT = .text:0x8039B3A0; // type:function size:0x1CC
ARCInitHandle = .text:0x8039B570; // type:function size:0xA0
ARCOpen = .text:0x8039B610; // type:function size:0x2AC
ARCFastOpen = .text:0x8039B8C0; // type:function size:0x50
ARCConvertPathToEntrynum = .text:0x8039B910; // type:function size:0x27C
entryToPath = .text:0x8039BB90; // type:function size:0x1D0 scope:local
ARCGetStartAddrInMem = .text:0x8039BD60; // type:function size:0x14
ARCGetStartOffset = .text:0x8039BD80; // type:function size:0x8
ARCGetLength = .text:0x8039BD90; // type:function size:0x8
ARCClose = .text:0x8039BDA0; // type:function size:0x8
ARCChangeDir = .text:0x8039BDB0; // type:function size:0x58
ARCOpenDir = .text:0x8039BE10; // type:function size:0x7C
ARCReadDir = .text:0x8039BE90; // type:function size:0xBC
ARCCloseDir = .text:0x8039BF50; // type:function size:0x8
AXInit = .text:0x8039BF60; // type:function size:0x54
fn_8039BFC0 = .text:0x8039BFC0; // type:function size:0x8
fn_8039BFD0 = .text:0x8039BFD0; // type:function size:0x14
fn_8039BFF0 = .text:0x8039BFF0; // type:function size:0xAC
@@ -22438,7 +22438,7 @@ DVDConvertPathToEntrynum = .text:0x803C3090; // type:function size:0x308
DVDFastOpen = .text:0x803C33A0; // type:function size:0x68
DVDOpen = .text:0x803C3410; // type:function size:0x120
DVDClose = .text:0x803C3530; // type:function size:0x24
entryToPath = .text:0x803C3560; // type:function size:0x114
entryToPath = .text:0x803C3560; // type:function size:0x114 scope:local
DVDReadAsyncPrio = .text:0x803C3680; // type:function size:0xD0
cbForReadAsync = .text:0x803C3750; // type:function size:0x18
DVDReadPrio = .text:0x803C3770; // type:function size:0x128
@@ -22589,7 +22589,7 @@ fn_803CDAD0 = .text:0x803CDAD0; // type:function size:0xD0
fn_803CDBA0 = .text:0x803CDBA0; // type:function size:0x10
fn_803CDBB0 = .text:0x803CDBB0; // type:function size:0x8
MEMAllocFromAllocator = .text:0x803CDBC0; // type:function size:0x10
fn_803CDBD0 = .text:0x803CDBD0; // type:function size:0x10
MEMFreeToAllocator = .text:0x803CDBD0; // type:function size:0x10
fn_803CDBE0 = .text:0x803CDBE0; // type:function size:0x1C
fn_803CDC00 = .text:0x803CDC00; // type:function size:0x18
fn_803CDC20 = .text:0x803CDC20; // type:function size:0x70
@@ -23909,8 +23909,8 @@ fn_804292D0 = .text:0x804292D0; // type:function size:0xFC
fn_804293D0 = .text:0x804293D0; // type:function size:0x48
fn_80429420 = .text:0x80429420; // type:function size:0x230
fn_80429650 = .text:0x80429650; // type:function size:0x2D8
fn_80429930 = .text:0x80429930; // type:function size:0x118
fn_80429A50 = .text:0x80429A50; // type:function size:0x20
TPLBind = .text:0x80429930; // type:function size:0x118
TPLGet = .text:0x80429A50; // type:function size:0x20
fn_80429A70 = .text:0x80429A70; // type:function size:0x24
fn_80429A94 = .text:0x80429A94; // type:function size:0x24
fn_80429AB8 = .text:0x80429AB8; // type:function size:0x5C
@@ -25162,7 +25162,7 @@ DetachGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A2B0; // typ
DetachTempGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A2C0; // type:function size:0x8
SetId__Q44nw4r3snd6detail10BasicSoundFUl = .text:0x8046A2D0; // type:function size:0x40
__dt__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A310; // type:function size:0x40
GetRuntimeTypeInfo__Q44nw4r3snd6detail10BasicSoundCFv = .text:0x8046A350; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail10BasicSoundCFv = .text:0x8046A350; // type:function size:0x8 scope:weak
__sinit_\snd_BasicSound_cpp = .text:0x8046A360; // type:function size:0xC scope:local
GetCoef__Q44nw4r3snd6detail15BiquadFilterLpfCFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A370; // type:function size:0x88
GetCoef__Q44nw4r3snd6detail15BiquadFilterHpfCFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A400; // type:function size:0x88
@@ -25411,7 +25411,7 @@ OnCancel__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x804730F0; // type
GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80473120; // type:function size:0x8
GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473130; // type:function size:0x8
IsPrepared__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473140; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473150; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473150; // type:function size:0x8 scope:weak
__sinit_snd_SeqSound_cpp = .text:0x80473160; // type:function size:0xC
__ct__Q34nw4r3snd14SeqSoundHandleFPQ34nw4r3snd11SoundHandle = .text:0x80473170; // type:function size:0xF4
DetachSound__Q34nw4r3snd14SeqSoundHandleFv = .text:0x80473270; // type:function size:0x38
@@ -25711,7 +25711,7 @@ DetachTempSpecialHandle__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D30; // t
GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D40; // type:function size:0x8
GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D50; // type:function size:0x8
IsPrepared__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D60; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D70; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D70; // type:function size:0x8 scope:weak
__sinit_snd_StrmSound_cpp = .text:0x80480D80; // type:function size:0xC
__ct__Q34nw4r3snd15StrmSoundHandleFPQ34nw4r3snd11SoundHandle = .text:0x80480D90; // type:function size:0xF4
DetachSound__Q34nw4r3snd15StrmSoundHandleFv = .text:0x80480E90; // type:function size:0x38
@@ -25814,7 +25814,7 @@ DetachTempSpecialHandle__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852C0; // t
GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852D0; // type:function size:0x8
GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852E0; // type:function size:0x8
IsPrepared__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852F0; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x80485300; // type:function size:0x8
GetRuntimeTypeInfo__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x80485300; // type:function size:0x8 scope:weak
__sinit_snd_WaveSound_cpp = .text:0x80485310; // type:function size:0xC
detail_AttachSoundAsTempHandle__Q34nw4r3snd15WaveSoundHandleFPQ44nw4r3snd6detail9WaveSound = .text:0x80485320; // type:function size:0xF4
DetachSound__Q34nw4r3snd15WaveSoundHandleFv = .text:0x80485420; // type:function size:0x38
@@ -25854,15 +25854,13 @@ LytInit__Q24nw4r3lytFv = .text:0x80486A70; // type:function size:0x54
__ct__Q34nw4r3lyt4PaneFPCQ44nw4r3lyt3res4Pane = .text:0x80486AD0; // type:function size:0x128
__dt__Q34nw4r3lyt4PaneFv = .text:0x80486C00; // type:function size:0x13C
AppendChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4Pane = .text:0x80486D40; // type:function size:0x50
RemoveChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4P = .text:0x80486D90; // type:function size:0x3C
FUN_80486dd0 = .text:0x80486DD0; // type:function size:0x110
FUN_80486ee0 = .text:0x80486EE0; // type:function size:0x110
RemoveChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4Pane = .text:0x80486D90; // type:function size:0x3C
GetPaneRect__Q34nw4r3lyt4PaneCFv = .text:0x80486DD0; // type:function size:0x110
GetPaneRect__Q34nw4r3lyt4PaneCFRCQ34nw4r3lyt8DrawInfo = .text:0x80486EE0; // type:function size:0x110
GetVtxColor__Q34nw4r3lyt4PaneCFUl = .text:0x80486FF0; // type:function size:0xC
SetVtxColor__Q34nw4r3lyt4PaneFUlQ34nw4r2ut5Color = .text:0x80487000; // type:function size:0x4
GetColorElement__Q34nw4r3lyt4PaneCFUl = .text:0x80487010; // type:function size:0x20
fn_80487030 = .text:0x80487030; // type:function size:0x4
SetColorElement__Q34nw4r3lyt4PaneFUlUc = .text:0x80487040; // type:function size:0x20
fn_80487060 = .text:0x80487060; // type:function size:0x4
GetColorElement__Q34nw4r3lyt4PaneCFUl = .text:0x80487010; // type:function size:0x24
SetColorElement__Q34nw4r3lyt4PaneFUlUc = .text:0x80487040; // type:function size:0x24
GetVtxColorElement__Q34nw4r3lyt4PaneCFUl = .text:0x80487070; // type:function size:0x8
SetVtxColorElement__Q34nw4r3lyt4PaneFUlUc = .text:0x80487080; // type:function size:0x4
FindPaneByName__Q34nw4r3lyt4PaneFPCcb = .text:0x80487090; // type:function size:0xA8
@@ -25886,10 +25884,10 @@ GetVtxPos__Q34nw4r3lyt4PaneCFv = .text:0x80487C80; // type:function size:0xC8
GetMaterialNum__Q34nw4r3lyt4PaneCFv = .text:0x80487D50; // type:function size:0x14
GetMaterial__Q34nw4r3lyt4PaneCFv = .text:0x80487D70; // type:function size:0x8
GetMaterial__Q34nw4r3lyt4PaneCFUl = .text:0x80487D80; // type:function size:0x20
GetExtUserData__Q34nw4r3lyt4PaneCFv = .text:0x80487DA0; // type:function size:0x1C
GetExtUserDataNum__Q34nw4r3lyt4PaneCFv = .text:0x80487DC0; // type:function size:0x1C
GetExtUserDataNum__Q34nw4r3lyt4PaneCFv = .text:0x80487DA0; // type:function size:0x1C
GetExtUserData__Q34nw4r3lyt4PaneCFv = .text:0x80487DC0; // type:function size:0x1C
FindExtUserDataByName__Q34nw4r3lyt4PaneFPCc = .text:0x80487DE0; // type:function size:0xBC
__sinit_lyt_pane_cpp = .text:0x80487EA0; // type:function size:0xC
__sinit_\lyt_pane_cpp = .text:0x80487EA0; // type:function size:0xC scope:local
__ct__Q34nw4r3lyt5GroupFPCQ44nw4r3lyt3res5GroupPQ34nw4r3lyt4Pane = .text:0x80487EB0; // type:function size:0x114
__dt__Q34nw4r3lyt5GroupFv = .text:0x80487FD0; // type:function size:0xAC
__dt__Q34nw4r3lyt14GroupContainerFv = .text:0x80488080; // type:function size:0xCC
@@ -25923,8 +25921,8 @@ SetVtxColor__Q34nw4r3lyt7PictureFUlQ34nw4r2ut5Color = .text:0x80489690; // type:
GetVtxColorElement__Q34nw4r3lyt7PictureCFUl = .text:0x804896C0; // type:function size:0x18
SetVtxColorElement__Q34nw4r3lyt7PictureFUlUc = .text:0x804896E0; // type:function size:0x18
DrawSelf__Q34nw4r3lyt7PictureFRCQ34nw4r3lyt8DrawInfo = .text:0x80489700; // type:function size:0xDC
GetRuntimeTypeInfo__Q34nw4r3lyt7PictureCFv = .text:0x804897E0; // type:function size:0x8
__sinit_lyt_picture_cpp = .text:0x804897F0; // type:function size:0xC
GetRuntimeTypeInfo__Q34nw4r3lyt7PictureCFv = .text:0x804897E0; // type:function size:0x8 scope:weak
__sinit_\lyt_picture_cpp = .text:0x804897F0; // type:function size:0xC scope:local
__ct__Q34nw4r3lyt7TextBoxFPCQ44nw4r3lyt3res7TextBoxRCQ34nw4r3lyt11ResBlockSet = .text:0x80489800; // type:function size:0x2EC
__dt__Q34nw4r3lyt7TextBoxFv = .text:0x80489AF0; // type:function size:0x1A0
GetVtxColor__Q34nw4r3lyt7TextBoxCFUl = .text:0x80489C90; // type:function size:0x14
@@ -25943,10 +25941,10 @@ SetFont__Q34nw4r3lyt7TextBoxFPCQ34nw4r2ut4Font = .text:0x8048A9E0; // type:funct
LoadMtx__Q34nw4r3lyt7TextBoxFRCQ34nw4r3lyt8DrawInfo = .text:0x8048AB10; // type:function size:0x84
GetTextDrawRect__Q34nw4r3lyt7TextBoxCFPQ34nw4r2ut17TextWriterBase<w> = .text:0x8048ABA0; // type:function size:0x2A4
CalcStringRectImpl<w>__Q34nw4r3lyt25@unnamed@lyt_textBox_cpp@FPQ34nw4r2ut4RectPQ34nw4r2ut17TextWriterBase<w>PCwif_v = .text:0x8048AE50; // type:function size:0x1D4
FUN_8048b030 = .text:0x8048B030; // type:function size:0x4C
FUN_8048b080 = .text:0x8048B080; // type:function size:0x44
FUN_8048b0d0 = .text:0x8048B0D0; // type:function size:0x84
__sinit_lyt_textBox_cpp = .text:0x8048B160; // type:function size:0xC
GetTextMagH__Q34nw4r3lyt7TextBoxCFv = .text:0x8048B030; // type:function size:0x4C
GetTextMagV__Q34nw4r3lyt7TextBoxCFv = .text:0x8048B080; // type:function size:0x44
GetTextAlignMag__Q34nw4r3lyt7TextBoxCFv = .text:0x8048B0D0; // type:function size:0x84
__sinit_\lyt_textBox_cpp = .text:0x8048B160; // type:function size:0xC scope:local
__ct__Q34nw4r3lyt6WindowFPCQ44nw4r3lyt3res6WindowRCQ34nw4r3lyt11ResBlockSet = .text:0x8048B170; // type:function size:0x284
__dt__Q34nw4r3lyt6WindowFv = .text:0x8048B400; // type:function size:0x144
FindMaterialByName__Q34nw4r3lyt6WindowFPCcb = .text:0x8048B550; // type:function size:0xFC
@@ -25965,12 +25963,12 @@ GetMaterialNum__Q34nw4r3lyt6WindowCFv = .text:0x8048D670; // type:function size:
GetMaterial__Q34nw4r3lyt6WindowCFUl = .text:0x8048D680; // type:function size:0x2C
GetFrameMaterial__Q34nw4r3lyt6WindowCFUl = .text:0x8048D6B0; // type:function size:0x28
GetContentMaterial__Q34nw4r3lyt6WindowCFv = .text:0x8048D6E0; // type:function size:0x10
__sinit_lyt_window_cpp = .text:0x8048D6F0; // type:function size:0xC
__sinit_\lyt_window_cpp = .text:0x8048D6F0; // type:function size:0xC scope:local
__ct__Q34nw4r3lyt8BoundingFPCQ44nw4r3lyt3res8BoundingRCQ34nw4r3lyt11ResBlockSet = .text:0x8048D700; // type:function size:0x3C
__dt__Q34nw4r3lyt8BoundingFv = .text:0x8048D740; // type:function size:0x58
DrawSelf__Q34nw4r3lyt8BoundingFRCQ34nw4r3lyt8DrawInfo = .text:0x8048D7A0; // type:function size:0x4
GetRuntimeTypeInfo__Q34nw4r3lyt8BoundingCFv = .text:0x8048D7B0; // type:function size:0x8
__sinit_lyt_bounding_cpp = .text:0x8048D7C0; // type:function size:0xC
GetRuntimeTypeInfo__Q34nw4r3lyt8BoundingCFv = .text:0x8048D7B0; // type:function size:0x8 scope:weak
__sinit_\lyt_bounding_cpp = .text:0x8048D7C0; // type:function size:0xC scope:local
CalcTextureMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FPQ34nw4r4math5MTX34RCQ34nw4r3lyt6TexSRT = .text:0x8048D7D0; // type:function size:0x108
SetIndTexMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@F14_GXIndTexMtxIDPA3_Cf = .text:0x8048D8E0; // type:function size:0x200
__as__Q34nw4r4math4VEC2FRCQ34nw4r4math4VEC2 = .text:0x8048DAE0; // type:function size:0x14
@@ -25999,7 +25997,7 @@ __as__Q34nw4r3lyt11TexCoordGenFRCQ34nw4r3lyt11TexCoordGen = .text:0x8048E320; //
__as__Q34nw4r3lyt8ChanCtrlFRCQ34nw4r3lyt8ChanCtrl = .text:0x8048E350; // type:function size:0x24
__as__Q34nw4r2ut5ColorFRCQ34nw4r2ut5Color = .text:0x8048E380; // type:function size:0x24
__as__Q34nw4r3lyt11TevSwapModeFRCQ34nw4r3lyt11TevSwapMode = .text:0x8048E3B0; // type:function size:0xC
__as__Q34nw4r3lyt6TexSRTFRCQ34nw4r3lyt6TexSR = .text:0x8048E3C0; // type:function size:0x2C
__as__Q34nw4r3lyt6TexSRTFRCQ34nw4r3lyt6TexSRT = .text:0x8048E3C0; // type:function size:0x2C
__as__Q34nw4r3lyt13IndirectStageFRCQ34nw4r3lyt13IndirectStage = .text:0x8048E3F0; // type:function size:0x24
__as__Q34nw4r3lyt8TevStageFRCQ34nw4r3lyt8TevStage = .text:0x8048E420; // type:function size:0x64
__as__Q34nw4r3lyt12AlphaCompareFRCQ34nw4r3lyt12AlphaCompare = .text:0x8048E490; // type:function size:0x24
@@ -26051,9 +26049,9 @@ SetAnimationEnable__Q34nw4r3lyt8MaterialFRCQ34nw4r3lyt12AnimResourceb = .text:0x
GetTextureSize__Q34nw4r3lyt6detailFPQ34nw4r3lyt8MaterialUc = .text:0x80490560; // type:function size:0x70
Get__Q34nw4r3lyt6TexMapCFP9_GXTexObj = .text:0x804905D0; // type:function size:0xEC
Get__Q34nw4r3lyt6TexMapCFP10_GXTlutObj = .text:0x804906C0; // type:function size:0x1C
Set__Q34nw4r3lyt6TexMapFPCQ34nw4r3lyt6TexMap = .text:0x804906E0; // type:function size:0x14C
Set__Q34nw4r3lyt6TexMapFPC13TPLDescriptor = .text:0x80490830; // type:function size:0x74
ReplaceImage__Q34nw4r3lyt6TexMapFP10TPLPaletteUlPCc = .text:0x804908B0; // type:function size:0xD0
Set__Q34nw4r3lyt6TexMapFRC9_GXTexObj = .text:0x804906E0; // type:function size:0x14C
ReplaceImage__Q34nw4r3lyt6TexMapFRC9_GXTexObj = .text:0x80490830; // type:function size:0x74
ReplaceImage__Q34nw4r3lyt6TexMapFP10TPLPaletteUl = .text:0x804908B0; // type:function size:0xD0
__ct__Q34nw4r3lyt8DrawInfoFv = .text:0x80490980; // type:function size:0x74
__dt__Q34nw4r3lyt8DrawInfoFv = .text:0x80490A00; // type:function size:0x40
GetStepCurveValue__Q34nw4r3lyt27@unnamed@lyt_animation_cpp@FfPCQ44nw4r3lyt3res7StepKeyUl = .text:0x80490A40; // type:function size:0xE8
@@ -26088,22 +26086,22 @@ __ct__Q34nw4r3lyt16ResourceAccessorFv = .text:0x80492040; // type:function size:
GetFont__Q34nw4r3lyt16ResourceAccessorFPCc = .text:0x80492050; // type:function size:0x8
FindNameResource__37@unnamed@lyt_arcResourceAccessor_cpp@FP9ARCHandlePCc = .text:0x80492060; // type:function size:0xCC
GetResourceSub__37@unnamed@lyt_arcResourceAccessor_cpp@FP9ARCHandlePCcUlPCcPUl = .text:0x80492130; // type:function size:0x140
FUN_80492270 = .text:0x80492270; // type:function size:0x14
FUN_80492290 = .text:0x80492290; // type:function size:0x40
__ct__Q34nw4r3lyt11FontRefLinkFv = .text:0x80492270; // type:function size:0x14
Set__Q34nw4r3lyt11FontRefLinkFPCcPQ34nw4r2ut4Font = .text:0x80492290; // type:function size:0x40
__ct__Q34nw4r3lyt19ArcResourceAccessorFv = .text:0x804922D0; // type:function size:0x54
Attach__Q34nw4r3lyt19ArcResourceAccessorFPvPCc = .text:0x80492330; // type:function size:0x7C
Detach__Q34nw4r3lyt19ArcResourceAccessorFv = .text:0x804923B0; // type:function size:0x14
GetResource__Q34nw4r3lyt19ArcResourceAccessorFUlPCcPUl = .text:0x804923D0; // type:function size:0x20
FUN_804923f0 = .text:0x804923F0; // type:function size:0x6C
FUN_80492460 = .text:0x80492460; // type:function size:0x34
FUN_804924a0 = .text:0x804924A0; // type:function size:0x8
Set__Q34nw4r3lyt15ArcResourceLinkFPvPCc = .text:0x804923F0; // type:function size:0x6C
RegistFont__Q34nw4r3lyt19ArcResourceAccessorFPQ34nw4r3lyt11FontRefLink = .text:0x80492460; // type:function size:0x34
UnregistFont__Q34nw4r3lyt19ArcResourceAccessorFPQ34nw4r3lyt11FontRefLink = .text:0x804924A0; // type:function size:0x8
GetFont__Q34nw4r3lyt19ArcResourceAccessorFPCc = .text:0x804924B0; // type:function size:0x70
__ct__Q34nw4r3lyt19MultiArcResourceAccessorFv = .text:0x80492520; // type:function size:0x60
__dt__Q34nw4r3lyt19MultiArcResourceAccessorFv = .text:0x80492580; // type:function size:0x90
Attach__Q34nw4r3lyt19MultiArcResourceAccessorFPQ34nw4r3lyt16ArcResourceLink_PCc = .text:0x80492610; // type:function size:0x34
GetResource__Q34nw4r3lyt19MultiArcResourceAccessorFUlPCcPUl = .text:0x80492650; // type:function size:0x78
RegistFont__Q34nw4r3lyt19MultiArcResourceAccessorFPQ34nw4r3lyt12FontRefLink_ = .text:0x804926D0; // type:function size:0x34
GetFont__Q34nw4r3lyt19MultiArcResourceAccessorFPCc = .text:0x80492710; // type:function size:0x70
__ct__Q34nw4r3lyt24MultiArcResourceAccessorFv = .text:0x80492520; // type:function size:0x60
__dt__Q34nw4r3lyt24MultiArcResourceAccessorFv = .text:0x80492580; // type:function size:0x90
Attach__Q34nw4r3lyt24MultiArcResourceAccessorFPQ34nw4r3lyt15ArcResourceLink = .text:0x80492610; // type:function size:0x34
GetResource__Q34nw4r3lyt24MultiArcResourceAccessorFUlPCcPUl = .text:0x80492650; // type:function size:0x78
RegistFont__Q34nw4r3lyt24MultiArcResourceAccessorFPQ34nw4r3lyt11FontRefLink = .text:0x804926D0; // type:function size:0x34
GetFont__Q34nw4r3lyt24MultiArcResourceAccessorFPCc = .text:0x80492710; // type:function size:0x70
EqualsResName__Q34nw4r3lyt6detailFPCcPCc = .text:0x80492780; // type:function size:0x2C
EqualsMaterialName__Q34nw4r3lyt6detailFPCcPCc = .text:0x804927B0; // type:function size:0x2C
TestFileHeader__Q34nw4r3lyt6detailFRCQ44nw4r3lyt3res16BinaryFileHeaderUl = .text:0x804927E0; // type:function size:0x28
@@ -26117,10 +26115,10 @@ MultipleAlpha__Q34nw4r3lyt6detailFQ34nw4r2ut5ColorUc = .text:0x80492B20; // type
SetVertexFormat__Q34nw4r3lyt6detailFbUc = .text:0x80492B60; // type:function size:0xE4
DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5Color = .text:0x80492C50; // type:function size:0x560
DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5ColorUc = .text:0x804931B0; // type:function size:0x130
FUN_804932e0 = .text:0x804932E0; // type:function size:0x70
FUN_80493350 = .text:0x80493350; // type:function size:0x78
FUN_804933d0 = .text:0x804933D0; // type:function size:0x70
FUN_80493440 = .text:0x80493440; // type:function size:0xCC
BindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb = .text:0x804932E0; // type:function size:0x70
UnbindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformb = .text:0x80493350; // type:function size:0x78
SetAnimationEnable__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb = .text:0x804933D0; // type:function size:0x70
IsContain__Q24nw4r3lytFPQ34nw4r3lyt4PaneRCQ34nw4r4math4VEC2 = .text:0x80493440; // type:function size:0xCC
readNand__Q23EGG7ArchiveFP12NANDFileInfoPvUll = .text:0x80493510; // type:function size:0x70
__ct__Q23EGG7ArchiveFv = .text:0x80493580; // type:function size:0x70
__dt__Q23EGG7ArchiveFv = .text:0x804935F0; // type:function size:0x6C
@@ -37118,23 +37116,23 @@ lbl_8056E32C = .data:0x8056E32C; // type:object size:0x14
lbl_8056E340 = .data:0x8056E340; // type:object size:0x10
lbl_8056E350 = .data:0x8056E350; // type:object size:0x38
lbl_8056E388 = .data:0x8056E388; // type:object size:0x60
lbl_8056E3E8 = .data:0x8056E3E8; // type:object size:0x48
lbl_8056E430 = .data:0x8056E430; // type:object size:0x78
lbl_8056E4A8 = .data:0x8056E4A8; // type:object size:0x10
lbl_8056E4B8 = .data:0x8056E4B8; // type:object size:0x40
lbl_8056E4F8 = .data:0x8056E4F8; // type:object size:0x78
lbl_8056E570 = .data:0x8056E570; // type:object size:0x88
lbl_8056E5F8 = .data:0x8056E5F8; // type:object size:0x3C
lbl_8056E634 = .data:0x8056E634; // type:object size:0x8C
lbl_8056E6C0 = .data:0x8056E6C0; // type:object size:0x78
lbl_8056E738 = .data:0x8056E738; // type:object size:0x20 data:4byte
lbl_8056E758 = .data:0x8056E758; // type:object size:0x20 data:4byte
lbl_8056E778 = .data:0x8056E778; // type:object size:0x30
lbl_8056E7A8 = .data:0x8056E7A8; // type:object size:0x10
lbl_8056E7B8 = .data:0x8056E7B8; // type:object size:0x28
lbl_8056E7E0 = .data:0x8056E7E0; // type:object size:0x18
lbl_8056E7F8 = .data:0x8056E7F8; // type:object size:0x14
lbl_8056E80C = .data:0x8056E80C; // type:object size:0x14
lbl_8056E3E8 = .data:0x8056E3E8; // type:object size:0x46 scope:local data:string
__vt__Q34nw4r3lyt4Pane = .data:0x8056E430; // type:object size:0x74
__vt__Q34nw4r3lyt5Group = .data:0x8056E4A8; // type:object size:0xC
__vt__Q34nw4r3lyt6Layout = .data:0x8056E4B8; // type:object size:0x40
__vt__Q34nw4r3lyt7Picture = .data:0x8056E4F8; // type:object size:0x78
__vt__Q34nw4r3lyt7TextBox = .data:0x8056E570; // type:object size:0x84
@LOCAL@GetTextureFlipInfo__Q34nw4r3lyt24@unnamed@lyt_window_cpp@FUc@flipInfos = .data:0x8056E5F8; // type:object size:0x3C
__vt__Q34nw4r3lyt6Window = .data:0x8056E634; // type:object size:0x8C
__vt__Q34nw4r3lyt8Bounding = .data:0x8056E6C0; // type:object size:0x74
@LOCAL@SetupGX__Q34nw4r3lyt8MaterialFbUc@kColSels = .data:0x8056E738; // type:object size:0x20 data:4byte
@LOCAL@SetupGX__Q34nw4r3lyt8MaterialFbUc@kAlpSels = .data:0x8056E758; // type:object size:0x20 data:4byte
__vt__Q34nw4r3lyt8Material = .data:0x8056E778; // type:object size:0x30
__vt__Q34nw4r3lyt8DrawInfo = .data:0x8056E7A8; // type:object size:0xC
__vt__Q34nw4r3lyt18AnimTransformBasic = .data:0x8056E7B8; // type:object size:0x24
__vt__Q34nw4r3lyt16ResourceAccessor = .data:0x8056E7E0; // type:object size:0x14
__vt__Q34nw4r3lyt24MultiArcResourceAccessor = .data:0x8056E7F8; // type:object size:0x14
__vt__Q34nw4r3lyt19ArcResourceAccessor = .data:0x8056E80C; // type:object size:0x14
lbl_8056E820 = .data:0x8056E820; // type:object size:0x10
lbl_8056E830 = .data:0x8056E830; // type:object size:0x28
__vt__Q23EGG15StreamDecompSZS = .data:0x8056E858; // type:object size:0x18
@@ -39631,10 +39629,10 @@ lbl_80574E94 = .sdata:0x80574E94; // type:object size:0x4
lbl_80574E98 = .sdata:0x80574E98; // type:object size:0x8
lbl_80574EA0 = .sdata:0x80574EA0; // type:object size:0x8 data:4byte
lbl_80574EA8 = .sdata:0x80574EA8; // type:object size:0x8 data:4byte
lbl_80574EB0 = .sdata:0x80574EB0; // type:object size:0x8 data:4byte
lbl_80574EB8 = .sdata:0x80574EB8; // type:object size:0x8
lbl_80574EC0 = .sdata:0x80574EC0; // type:object size:0x4
lbl_80574EC4 = .sdata:0x80574EC4; // type:object size:0x4
NW4R_LYT_Version___22@unnamed@lyt_init_cpp@ = .sdata:0x80574EB0; // type:object size:0x4 scope:local data:4byte
lbl_80574EB8 = .sdata:0x80574EB8; // type:object size:0x4 data:string
lbl_80574EC0 = .sdata:0x80574EC0; // type:object size:0x2 data:string
lbl_80574EC4 = .sdata:0x80574EC4; // type:object size:0x3 data:string
lbl_80574EC8 = .sdata:0x80574EC8; // type:object size:0x8
lbl_80574ED0 = .sdata:0x80574ED0; // type:object size:0x8 data:byte
lbl_80574ED8 = .sdata:0x80574ED8; // type:object size:0x8
@@ -40922,13 +40920,13 @@ lbl_805766D0 = .sbss:0x805766D0; // type:object size:0x8 data:4byte
lbl_805766D8 = .sbss:0x805766D8; // type:object size:0x8 data:byte
lbl_805766E0 = .sbss:0x805766E0; // type:object size:0x8 data:byte
lbl_805766E8 = .sbss:0x805766E8; // type:object size:0x8 data:4byte
lbl_805766F0 = .sbss:0x805766F0; // type:object size:0x8 data:4byte
lbl_805766F8 = .sbss:0x805766F8; // type:object size:0x8 data:4byte
lbl_80576700 = .sbss:0x80576700; // type:object size:0x8 data:4byte
lbl_80576708 = .sbss:0x80576708; // type:object size:0x8 data:4byte
lbl_80576710 = .sbss:0x80576710; // type:object size:0x8 data:4byte
lbl_80576718 = .sbss:0x80576718; // type:object size:0x8 data:4byte
lbl_80576720 = .sbss:0x80576720; // type:object size:0x8 data:byte
typeInfo__Q34nw4r3lyt4Pane = .sbss:0x805766F0; // type:object size:0x4 data:4byte
mspAllocator__Q34nw4r3lyt6Layout = .sbss:0x805766F8; // type:object size:0x4 data:4byte
typeInfo__Q34nw4r3lyt7Picture = .sbss:0x80576700; // type:object size:0x4 data:4byte
typeInfo__Q34nw4r3lyt7TextBox = .sbss:0x80576708; // type:object size:0x4 data:4byte
typeInfo__Q34nw4r3lyt6Window = .sbss:0x80576710; // type:object size:0x4 data:4byte
typeInfo__Q34nw4r3lyt8Bounding = .sbss:0x80576718; // type:object size:0x4 data:4byte
@GUARD@SetSize__Q44nw4r3lyt6detail11TexCoordAryFUc@texCoords = .sbss:0x80576720; // type:object size:0x1 data:byte
lbl_80576728 = .sbss:0x80576728; // type:object size:0x8 data:byte
lbl_80576730 = .sbss:0x80576730; // type:object size:0x8 data:byte
lbl_80576738 = .sbss:0x80576738; // type:object size:0x8 data:4byte
@@ -47613,11 +47611,11 @@ lbl_8057F230 = .sdata2:0x8057F230; // type:object size:0x4 data:float
lbl_8057F238 = .sdata2:0x8057F238; // type:object size:0x8 data:double
lbl_8057F240 = .sdata2:0x8057F240; // type:object size:0x4 data:float
lbl_8057F244 = .sdata2:0x8057F244; // type:object size:0x4 data:float
lbl_8057F248 = .sdata2:0x8057F248; // type:object size:0x8 data:float
lbl_8057F250 = .sdata2:0x8057F250; // type:object size:0x4 data:float
lbl_8057F258 = .sdata2:0x8057F258; // type:object size:0x8 data:double
lbl_8057F260 = .sdata2:0x8057F260; // type:object size:0x4 data:float
lbl_8057F264 = .sdata2:0x8057F264; // type:object size:0x4 data:float
lbl_8057F248 = .sdata2:0x8057F248; // type:object size:0x4 data:float
lbl_8057F250 = .sdata2:0x8057F250; // type:object size:0x4 scope:local data:float
lbl_8057F258 = .sdata2:0x8057F258; // type:object size:0x8 scope:local data:double
lbl_8057F260 = .sdata2:0x8057F260; // type:object size:0x4 scope:local data:float
lbl_8057F264 = .sdata2:0x8057F264; // type:object size:0x4 scope:local data:float
lbl_8057F268 = .sdata2:0x8057F268; // type:object size:0x4 data:float
lbl_8057F270 = .sdata2:0x8057F270; // type:object size:0x8 data:double
lbl_8057F278 = .sdata2:0x8057F278; // type:object size:0x8 data:double
@@ -47629,7 +47627,7 @@ lbl_8057F290 = .sdata2:0x8057F290; // type:object size:0x4 data:float
lbl_8057F298 = .sdata2:0x8057F298; // type:object size:0x8 data:double
lbl_8057F2A0 = .sdata2:0x8057F2A0; // type:object size:0x4 data:float
lbl_8057F2A8 = .sdata2:0x8057F2A8; // type:object size:0x8 data:double
lbl_8057F2B0 = .sdata2:0x8057F2B0; // type:object size:0x8 data:float
lbl_8057F2B0 = .sdata2:0x8057F2B0; // type:object size:0x4 data:float
lbl_8057F2B8 = .sdata2:0x8057F2B8; // type:object size:0x4 data:float
lbl_8057F2BC = .sdata2:0x8057F2BC; // type:object size:0x4 data:float
lbl_8057F2C0 = .sdata2:0x8057F2C0; // type:object size:0x4 data:float
@@ -47642,7 +47640,7 @@ lbl_8057F2D8 = .sdata2:0x8057F2D8; // type:object size:0x4 data:float
lbl_8057F2DC = .sdata2:0x8057F2DC; // type:object size:0x4 data:float
lbl_8057F2E0 = .sdata2:0x8057F2E0; // type:object size:0x4 data:float
lbl_8057F2E4 = .sdata2:0x8057F2E4; // type:object size:0x4 data:float
lbl_8057F2E8 = .sdata2:0x8057F2E8; // type:object size:0x8 data:float
lbl_8057F2E8 = .sdata2:0x8057F2E8; // type:object size:0x4 data:float
eggAllocatorFuncs = .sdata2:0x8057F2F0; // type:object size:0x8 scope:local
lbl_8057F2F8 = .sdata2:0x8057F2F8; // type:object size:0x4 data:float
lbl_8057F300 = .sdata2:0x8057F300; // type:object size:0x8 data:double
@@ -48132,7 +48130,7 @@ lbl_8057FF90 = .sdata2:0x8057FF90; // type:object size:0x4
lbl_8057FFA0 = .sbss2:0x8057FFA0; // type:object size:0x8 data:4byte
lbl_8057FFA8 = .sbss2:0x8057FFA8; // type:object size:0x8
lbl_8057FFB0 = .sbss2:0x8057FFB0; // type:object size:0x8
lbl_8057FFB8 = .sbss2:0x8057FFB8; // type:object size:0x8 data:2byte
DefaultBlackColor = .sbss2:0x8057FFB8; // type:object size:0x8 scope:local data:2byte
lbl_8057FFC0 = .sbss2:0x8057FFC0; // type:object size:0x8 data:byte
lbl_8057FFC8 = .sbss2:0x8057FFC8; // type:object size:0x4
lbl_80580000 = .bss:0x80580000; // type:object size:0x14 data:4byte
@@ -49399,7 +49397,7 @@ lbl_80673A38 = .bss:0x80673A38; // type:object size:0xC
lbl_80673A44 = .bss:0x80673A44; // type:object size:0x3C
lbl_80673A80 = .bss:0x80673A80; // type:object size:0xC
lbl_80673A8C = .bss:0x80673A8C; // type:object size:0x1C data:byte
lbl_80673AA8 = .bss:0x80673AA8; // type:object size:0x20 data:float
@LOCAL@SetSize__Q44nw4r3lyt6detail11TexCoordAryFUc@texCoords = .bss:0x80673AA8; // type:object size:0x20 scope:local data:float
lbl_80673AC8 = .bss:0x80673AC8; // type:object size:0x10
lbl_80673AD8 = .bss:0x80673AD8; // type:object size:0x10
sHeapList__Q23EGG4Heap = .bss:0x80673AE8; // type:object size:0xC
+26 -3
View File
@@ -155,6 +155,7 @@ cflags_base = [
"-str reuse",
"-enc SJIS",
"-i include",
"-i include/MSL_C",
f"-i build/{config.version}/include",
f"-DVERSION={version_num}",
]
@@ -204,6 +205,7 @@ cflags_nw4r = [
*cflags_base,
"-ipa file",
"-fp_contract off",
""
]
# REL flags
@@ -249,11 +251,11 @@ def EGGLib(lib_name, objects):
}
def nw4rLib(lib_name, objects):
def nw4rLib(lib_name, objects, extra_cflags=[]):
return {
"lib": lib_name,
"mw_version": "Wii/1.1", # most seem to be around 1.2, snd is 1.6
"cflags": cflags_nw4r,
"mw_version": "Wii/1.3", # most seem to be around 1.2, snd is 1.6
"cflags": cflags_nw4r + extra_cflags,
"host": False,
"objects": objects,
}
@@ -371,6 +373,27 @@ config.libs = [
Object(Matching, "nw4r/ut/ut_TextWriterBase.cpp"),
],
),
nw4rLib(
"lyt",
[
Object(Matching, "nw4r/lyt/lyt_init.cpp"),
Object(Matching, "nw4r/lyt/lyt_pane.cpp"),
Object(Matching, "nw4r/lyt/lyt_group.cpp"),
Object(Matching, "nw4r/lyt/lyt_layout.cpp"),
Object(Matching, "nw4r/lyt/lyt_picture.cpp"),
Object(Matching, "nw4r/lyt/lyt_textBox.cpp"),
Object(Matching, "nw4r/lyt/lyt_window.cpp"),
Object(Matching, "nw4r/lyt/lyt_bounding.cpp"),
Object(Matching, "nw4r/lyt/lyt_material.cpp"),
Object(Matching, "nw4r/lyt/lyt_texMap.cpp"),
Object(Matching, "nw4r/lyt/lyt_drawInfo.cpp"),
Object(Matching, "nw4r/lyt/lyt_animation.cpp"),
Object(Matching, "nw4r/lyt/lyt_resourceAccessor.cpp"),
Object(Matching, "nw4r/lyt/lyt_arcResourceAccessor.cpp"),
Object(Matching, "nw4r/lyt/lyt_common.cpp"),
Object(Matching, "nw4r/lyt/lyt_util.cpp"),
], [""]
),
# EGG
EGGLib(
"core",
-13
View File
@@ -1,13 +0,0 @@
#ifndef NW4R_EF_ANIMCURVE_H
#define NW4R_EF_ANIMCURVE_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
UNKTYPE AnimCurveExecuteF32(u8 *, float *, u32, u16, u32);
}
}
#endif
-46
View File
@@ -1,46 +0,0 @@
#ifndef NW4R_EF_CREATIONQUEUE
#define NW4R_EF_CREATIONQUEUE
#include "ef_emitter.h"
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
enum CreationType
{
CreationType_Particle,
CreationType_Emitter
};
//sizeof(UNK_CREATIONQUEUE) = 0x14
struct Creation
{
u8 mType; // at 0x0
u16 SHORT_0x2;
EmitterInheritSetting mInheritSetting; // at 0x4
Particle * mParticle; // at 0x8
EmitterResource * mResource; // at 0xc
};
struct CreationQueue
{
CreationQueue();
void AddParticleCreation(const EmitterInheritSetting *, Particle *, EmitterResource *, u16);
void AddEmitterCreation(const EmitterInheritSetting *, Particle *, EmitterResource *, u16);
int mSize;
Creation mCreations[0x400];
inline bool IsEmpty()
{
return mSize == 0;
}
void Execute();
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_CUBE_H
#define NW4R_EF_CUBE_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormCube : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_CYLINDER_H
#define NW4R_EF_CYLINDER_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormCylinder : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_DISC_H
#define NW4R_EF_DISC_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormDisc : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_DRAW_BILLBOARD_STRATEGY_H
#define NW4R_EF_DRAW_BILLBOARD_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawBillboardStrategy : public DrawStrategyImpl
{
public:
DrawBillboardStrategy();
virtual ~DrawBillboardStrategy() {} // at 0x8
virtual UNKTYPE GetCalcAheadFunc(ParticleManager *); // at 0x18
void Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_DRAW_DIRECTIONAL_STRATEGY_H
#define NW4R_EF_DRAW_DIRECTIONAL_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawDirectionalStrategy : public DrawStrategyImpl
{
public:
DrawDirectionalStrategy();
virtual ~DrawDirectionalStrategy() {} // at 0x8
virtual UNKTYPE GetCalcAheadFunc(ParticleManager *); // at 0x18
void Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
-21
View File
@@ -1,21 +0,0 @@
#ifndef NW4R_EF_DRAW_FREE_STRATEGY_H
#define NW4R_EF_DRAW_FREE_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawFreeStrategy : public DrawStrategyImpl
{
public:
DrawFreeStrategy();
virtual ~DrawFreeStrategy() {} // at 0x8
UNKTYPE Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_DRAWINFO
#define NW4R_EF_DRAWINFO
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct DrawInfo
{
};
}
}
#endif
-21
View File
@@ -1,21 +0,0 @@
#ifndef NW4R_EF_DRAW_LINE_STRATEGY_H
#define NW4R_EF_DRAW_LINE_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawLineStrategy : public DrawStrategyImpl
{
public:
DrawLineStrategy();
virtual ~DrawLineStrategy() {} // at 0x8
UNKTYPE Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
-20
View File
@@ -1,20 +0,0 @@
#ifndef NW4R_EF_DRAWORDER
#define NW4R_EF_DRAWORDER
#include "types_nw4r.h"
#include "ef_particlemanager.h"
#include "ef_draworderbase.h"
namespace nw4r
{
namespace ef
{
struct DrawOrder : DrawOrderBase
{
void Draw(Effect *, const DrawInfo &);
void Add(Effect *, ParticleManager *);
void Remove(Effect *, ParticleManager *);
};
}
}
#endif
-18
View File
@@ -1,18 +0,0 @@
#ifndef NW4R_EF_DRAWORDERBASE
#define NW4R_EF_DRAWORDERBASE
#include "ef_particlemanager.h"
#include "ut_list.h"
#include <common.h>
namespace nw4r {
namespace ef {
struct DrawOrderBase {
virtual void Add(Effect *, ParticleManager *) = 0;
virtual void Remove(Effect *, ParticleManager *) = 0;
virtual void Draw(Effect *, const DrawInfo &) = 0;
};
} // namespace ef
} // namespace nw4r
#endif
-22
View File
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_DRAW_POINT_STRATEGY_H
#define NW4R_EF_DRAW_POINT_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawPointStrategy : public DrawStrategyImpl
{
public:
DrawPointStrategy();
virtual ~DrawPointStrategy() {} // at 0x8
void Draw(const DrawInfo&, ParticleManager *);
void InitGraphics(const DrawInfo&, ParticleManager *);
};
}
}
#endif
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_DRAW_SMOOTH_STRIPE_STRATEGY_H
#define NW4R_EF_DRAW_SMOOTH_STRIPE_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawSmoothStripeStrategy : public DrawStrategyImpl
{
public:
DrawSmoothStripeStrategy();
virtual ~DrawSmoothStripeStrategy() {} // at 0x8
virtual UNKTYPE GetCalcAheadFunc(ParticleManager *); // at 0x18
UNKTYPE Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
-17
View File
@@ -1,17 +0,0 @@
#ifndef NW4R_EF_DRAWSTRATEGY_H
#define NW4R_EF_DRAWSTRATEGY_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct DrawStrategy
{
inline virtual ~DrawStrategy() {}
virtual UNKTYPE Draw(const DrawInfo &, ParticleManager *) = 0;
};
}
}
#endif
-27
View File
@@ -1,27 +0,0 @@
#ifndef NW4R_EF_DRAWSTRATEGYBUILDER_H
#define NW4R_EF_DRAWSTRATEGYBUILDER_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
enum DrawStrategyType
{
DrawStratType_Point,
DrawStratType_Line,
DrawStratType_Free,
DrawStratType_Billboard,
DrawStratType_Directional,
DrawStratType_Stripe,
DrawStratType_SmoothStripe
};
struct DrawStrategyBuilder
{
virtual DrawStrategy * Create(u32);
};
}
}
#endif
-44
View File
@@ -1,44 +0,0 @@
#ifndef NW4R_EF_DRAW_STRATEGY_IMPL_H
#define NW4R_EF_DRAW_STRATEGY_IMPL_H
#include "types_nw4r.h"
#include "ef_drawstrategy.h"
#include "math_types.h"
namespace nw4r
{
namespace ef
{
class DrawStrategyImpl : public DrawStrategy
{
public:
struct PrevTexture
{
UNKWORD WORD_0x0;
f32 FLOAT_0x4;
f32 FLOAT_0x8;
f32 FLOAT_0xC;
f32 FLOAT_0x10;
UNKWORD WORD_0x14;
UNKWORD WORD_0x18;
math::VEC2 VEC2_0x1C;
f32 FLOAT_0x24;
math::VEC2 VEC2_0x28;
};
public:
DrawStrategyImpl();
virtual UNKTYPE GetGetFirstDrawParticleFunc(int);
virtual UNKTYPE GetGetNextDrawParticleFunc(int);
void InitTexture(const EmitterDrawSetting &);
void InitTev(const EmitterDrawSetting &, const DrawInfo &);
void InitColor(ParticleManager *, const EmitterDrawSetting &, const DrawInfo &);
private:
PrevTexture mPrevTextures[3]; // at 0x4
char UNK_0x94[0xBC - 0x94];
};
}
}
#endif
-22
View File
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_DRAW_STRIPE_STRATEGY_H
#define NW4R_EF_DRAW_STRIPE_STRATEGY_H
#include "types_nw4r.h"
#include "ef_drawstrategyimpl.h"
namespace nw4r
{
namespace ef
{
class DrawStripeStrategy : public DrawStrategyImpl
{
public:
DrawStripeStrategy();
virtual ~DrawStripeStrategy() {} // at 0x8
virtual UNKTYPE GetCalcAheadFunc(ParticleManager *); // at 0x18
UNKTYPE Draw(const DrawInfo &, ParticleManager *);
};
}
}
#endif
-59
View File
@@ -1,59 +0,0 @@
#ifndef NW4R_EF_EFFECT
#define NW4R_EF_EFFECT
#include "types_nw4r.h"
#include "math_types.h"
#include "ef_ref.h"
#include "ut_list.h"
#include "ef_list.h"
#include "ef_util.h"
namespace nw4r
{
namespace ef
{
struct Effect : ReferencedObject
{
EffectSystem * mSystem; // at 0x20
ActivityList mEmitters; // at 0x24
u32 INDEX_0x40;
void (* mEmissionPrologue)(Emitter *, ParticleManager *, int *, u32 *, float *, u16 *, float *, math::MTX34 *); // at 0x44
UNKWORD WORD_0x48;
UNKWORD WORD_0x4C;
u32 mFlags; // at 0x50
math::MTX34 mRootMtx; // at 0x54
math::VEC3 VEC_0x84;
ut::List UTLIST_0x90;
DrawOrder * mDrawOrder; // at 0x9c
Effect();
~Effect();
virtual bool Initialize(EffectSystem *, EmitterResource *, u16);
virtual Emitter * CreateEmitter(ResEmitter, u8, u16);
virtual void Calc(bool);
virtual void Draw(const DrawInfo &);
bool SendClosing();
UNKTYPE DestroyFunc();
bool Closing(Emitter *);
Emitter * CreateEmitter(EmitterResource *, u8, u16);
bool RetireEmitter(Emitter *);
u16 RetireEmitterAll();
u16 RetireParticleAll();
u16 GetNumEmitter() const;
Emitter * GetEmitter(u16);
u16 ForeachParticleManager(Action, u32, bool);
u16 ForeachEmitterFrom(Action, u32, bool, Emitter *);
UNKTYPE SetRootMtx(const math::MTX34 &);
inline bool GetFlagDisableDraw()
{
return mFlags & 2;
}
};
}
}
#endif
-57
View File
@@ -1,57 +0,0 @@
#ifndef NW4R_EF_EFFECTSYSTEM
#define NW4R_EF_EFFECTSYSTEM
#include "types_nw4r.h"
#include "ef_creationqueue.h"
#include "ef_ref.h"
#include "ef_rand.h"
#include "ef_list.h"
namespace nw4r
{
namespace ef
{
struct EffectSystem
{
static bool mDisplayVersion;
static EffectSystem instance;
MemoryManager * mMemoryManager; // at 0x0
DrawOrder * mDrawOrder; // at 0x4
DrawStrategyBuilder * mDrawStrategyBuilder; // at 0x8
EmitFormBuilder * mEmitFormBuilder; // at 0xc
CreationQueue mCreationQueue; // at 0x10
u32 mNumGroup;
ActivityList * ARR_0x5018;
Random mRandom; // at 0x501C
math::VEC3 VEC_0x5020;
math::MTX34 MTX_0x502C;
float FLOAT_0x505C;
float FLOAT_0x5060;
char BYTE_0x5064;
inline MemoryManager * GetMemoryManager() const
{
return mMemoryManager;
}
EffectSystem();
~EffectSystem();
static EffectSystem * GetInstance();
bool Initialize(u32);
bool Closing(Effect *);
Effect * CreateEffect(const char *, u32, u16);
bool RetireEffect(Effect *);
u16 RetireEffectAll(u32);
u16 RetireEmitterAll(u32);
u16 RetireParticleAll(u32);
void Calc(u32, bool);
void Draw(const DrawInfo &, u32);
};
}
}
#endif
-27
View File
@@ -1,27 +0,0 @@
#ifndef NW4R_EF_EMFORM_H
#define NW4R_EF_EMFORM_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
enum EmitFormType
{
EmitForm_Disc,
EmitForm_Line,
EmitForm_Cube = 5,
EmitForm_Cylinder = 7,
EmitForm_Sphere,
EmitForm_Point,
EmitForm_Torus
};
struct EmitFormBuilder
{
virtual EmitterForm * Create(EmitFormType);
};
}
}
#endif
-259
View File
@@ -1,259 +0,0 @@
#ifndef NW4R_EF_EMITTER
#define NW4R_EF_EMITTER
#include <math.h>
#include "types_nw4r.h"
#include "ef_ref.h"
#include "ut_list.h"
#include "ef_list.h"
#include "ef_rand.h"
#include "ef_util.h"
#include "ef_animcurve.h"
namespace nw4r
{
namespace ef
{
struct ResEmitter
{
EmitterResource * mPtr;
inline EmitterResource * ptr() { return mPtr; }
};
struct EmitterInheritSetting
{
s16 SHORT_0x0;
u8 BYTE_0x2;
u8 BYTE_0x3;
u8 BYTE_0x4;
u8 BYTE_0x5;
u8 BYTE_0x6;
u8 BYTE_0x7;
};
struct EmitterDesc
{
UNKWORD FLAGS_0x0; // at 0x0/0x8
UNKWORD EMFORMTYPE_0x4; // at 0x4/0xc
u16 SHORT_0x8; // at 0x8/0x10
u16 SHORT_0xA; // at 0xa/0x12
s8 SBYTE_0xC; // at 0xc/0x14
s8 SBYTE_0xD; // at 0xd/0x15
s8 SBYTE_0xE; // at 0xe/0x16
s8 SBYTE_0xF; // at 0xf/0x17
float FLOAT_0x10; // at 0x10/0x18
u16 SHORT_0x14; // at 0x14/0x1c
u16 SHORT_0x16; // at 0x16/0x1e
u16 SHORT_0x18; // at 0x18/0x20
s8 BYTE_0x1A; // at 0x1a/0x22
s8 BYTE_0x1B; // at 0x1b/0x23
float FLOAT_0x1C;
float FLOAT_0x20;
float FLOAT_0x24;
float FLOAT_0x28;
float FLOAT_0x2C;
float FLOAT_0x30;
u16 SHORT_0x34;
u8 BYTE_0x36;
u8 BYTE_0x37;
float FLOAT_0x38;
float FLOAT_0x3C;
float FLOAT_0x40;
float FLOAT_0x44;
float FLOAT_0x48;
float FLOAT_0x4C;
float FLOAT_0x50;
float FLOAT_0x54;
float FLOAT_0x58;
float FLOAT_0x5C;
float FLOAT_0x60;
float FLOAT_0x64;
float FLOAT_0x68;
float FLOAT_0x6C;
float FLOAT_0x70;
float FLOAT_0x74;
float FLOAT_0x78;
float FLOAT_0x7C;
float FLOAT_0x80;
u8 BYTE_0x84; // at 0x84/0x8c
u8 BYTE_0x85; // at 0x85/0x8d
u8 BYTE_0x86; // at 0x86/0x8e
UNKWORD WORD_0x88;
};
struct EmitTrack
{
u8 BYTE_0x0;
u8 BYTE_0x1;
u16 SHORT_0x2;
u8 BYTE_0x4;
};
struct EmitterResource
{
char UNK_0x0[0x4];
u32 OFFSET_0x4;
EmitterDesc STRUCT_0x8;
inline UNKTYPE * SkipEmitterDesc()
{
return (char *)&STRUCT_0x8 + OFFSET_0x4;
}
inline UNKTYPE * SkipParticleParameterDesc()
{
char * particleDesc = (char *)SkipEmitterDesc();
return particleDesc + *(int *)particleDesc;
}
inline u16 NumEmitInitTrack()
{
u16 * ptr = (u16 *)SkipParticleParameterDesc();
return ptr[(4**(ptr += 2))+3];
}
inline u16 NumEmitTrack()
{
u16 * ptr = (u16 *)SkipParticleParameterDesc();
return ptr[(4**(ptr += 2))+2];
}
inline EmitTrack * GetEmitTrack(u16 i)
{
u16 * ptr = (u16 *)SkipParticleParameterDesc();
return reinterpret_cast<EmitTrack **>(ptr)[(2**(ptr += 1))+1+i];
}
};
struct Emitter : ReferencedObject
{
virtual bool Initialize(Effect *, EmitterResource *, u8); // at 0x10
virtual Emitter * CreateEmitter(EmitterResource *, EmitterInheritSetting *, Particle *, u16); // at 0x14
virtual void CalcEmitter(); // at 0x18
virtual void CalcParticle(); // at 0x1c
virtual void CalcEmission(); // at 0x20
virtual void CalcBillboard(); // at 0x24
u32 mFlags;
UNKWORD WORD_0x24;
//char UNK_0x28[0x8C];
float FLOAT_0x28;
float FLOAT_0x2C;
short SHORT_0x30;
short SHORT_0x32;
float FLOAT_0x34;
float FLOAT_0x38;
short SHORT_0x3C;
float FLOAT_0x40;
float FLOAT_0x44;
float FLOAT_0x48;
float FLOAT_0x4C;
float FLOAT_0x50;
float FLOAT_0x54;
float FLOAT_0x58;
float FLOAT_0x5C;
float FLOAT_0x60;
u8 BYTE_0x64;
s8 BYTE_0x65;
u8 BYTE_0x66;
s8 BYTE_0x67;
float FLOAT_0x68;
float FLOAT_0x6C;
float FLOAT_0x70;
float FLOAT_0x74;
float FLOAT_0x78;
float FLOAT_0x7C;
float FLOAT_0x80;
float FLOAT_0x84;
float FLOAT_0x88;
float FLOAT_0x8C;
/*
float FLOAT_0x90;
float FLOAT_0x94;
float FLOAT_0x98;
*/
math::VEC3 VEC_0x90;
/*
float FLOAT_0x9C;
float FLOAT_0xA0;
float FLOAT_0xA4;
*/
math::VEC3 VEC_0x9C;
/*
float FLOAT_0xA8;
float FLOAT_0xAC;
float FLOAT_0xB0;
*/
math::VEC3 VEC_0xA8;
UNKWORD WORD_0xB4;
EmitterResource * mResource; // at 0xb8
Effect * mEffect; // at 0xbc
ActivityList mManagers; // at 0xc0
char UNK_0xDA[0x2];
u8 BYTE_0xDC;
u16 SHORT_0xDE;
u16 SHORT_0xE0;
UNKWORD WORD_0xE4;
u16 SHORT_0xE8;
u16 SHORT_0xEA;
Random mRandom; // at 0xec
EmitterForm * mForm; // at 0xf0
Emitter * mParent; // at 0xf4
Particle * REF_0xF8; // at 0xf8
EmitterInheritSetting mInheritSettings; // at 0xfc
bool mMtxDirtyFlag; // at 0x104
math::MTX34 mGlobalMtx; // at 0x108
Emitter();
~Emitter();
u16 RetireParticleAll();
bool SendClosing();
void DestroyFunc();
bool Closing(ParticleManager *);
bool RetireParticleManager(ParticleManager *);
u16 RetireParticleManagerAll();
bool InitializeDatas(EmitterResource *, Effect *);
ParticleManager * FindParticleManager(EmitterResource *, bool, bool, s8, u8);
UNKTYPE CreateEmitterTmp(EmitterResource *, EmitterInheritSetting *, Particle *, u16);
float GetLODratio(math::VEC3 &, math::VEC3 &, float, float, float, float);
u16 ForeachParticleManager(Action, u32, bool, bool);
UNKTYPE Emission(ParticleManager *, const math::MTX34 *);
math::MTX34 * CalcGlobalMtx(math::MTX34 *);
UNKTYPE SetMtxDirty();
static math::MTX34 * RestructMatrix(math::MTX34 *, math::MTX34 *, bool, bool, s8);
u16 GetNumParticleManager() const;
ParticleManager * GetParticleManager(u16);
inline bool GetFlagDisableCalc() const
{
return mFlags & 0x200;
}
};
}
}
#endif
-19
View File
@@ -1,19 +0,0 @@
#ifndef NW4R_EF_EMITTERFORM_H
#define NW4R_EF_EMITTERFORM_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *) = 0;
UNKTYPE CalcVelocity(math::VEC3 *, Emitter *, const math::VEC3 &, const math::VEC3 &, const math::VEC3 &, const math::VEC3 &) const;
u16 CalcLife(u16, float, Emitter *);
};
}
}
#endif
-29
View File
@@ -1,29 +0,0 @@
#ifndef NW4R_EF_HANDLE_H
#define NW4R_EF_HANDLE_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct LinkedObject
{
char UNK_0x0[8];
LinkedObject * PTR_0x8;
};
struct HandleBase
{
LinkedObject * PTR_0x0;
LinkedObject * mPtr;
HandleBase();
HandleBase & operator=(const HandleBase &);
HandleBase & operator=(LinkedObject *);
bool IsValid() const;
LinkedObject * GetPtr() const;
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_LINE_H
#define NW4R_EF_LINE_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormLine : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-67
View File
@@ -1,67 +0,0 @@
#ifndef NW4R_EF_LIST
#define NW4R_EF_LIST
#include "types_nw4r.h"
#include "ut_list.h"
namespace nw4r
{
namespace ef
{
//sizeof(ActivityList) = 0x1C
struct ActivityList
{
ut::List mActive;
ut::List mClosing;
u16 mNumActive;
inline void SetOffset(u16 offset)
{
ut::List_Init(&mActive, offset);
ut::List_Init(&mClosing, offset);
mNumActive = 0;
}
inline ActivityList(u16 offset)
{
SetOffset(offset);
}
inline ActivityList()
{
SetOffset(0);
}
inline void Initialize()
{
mActive.first = NULL;
mActive.size = 0;
mActive.last = NULL;
mClosing.first = NULL;
mClosing.size = 0;
mClosing.last = NULL;
mNumActive = 0;
}
inline void ToActive(void * pNode)
{
ut::List_Append(&mActive, pNode);
mNumActive++;
}
inline void ToClosing(void * pNode)
{
ut::List_Remove(&mActive, pNode);
ut::List_Append(&mClosing, pNode);
}
inline void ToWait(void * pNode)
{
mNumActive--;
}
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_MEMORYMANAGER
#define NW4R_EF_MEMORYMANAGER
#include "ef_memorymanagerbase.h"
namespace nw4r
{
namespace ef
{
struct MemoryManager : MemoryManagerBase
{
};
}
}
#endif
-43
View File
@@ -1,43 +0,0 @@
#ifndef NW4R_EF_MEMORYMANAGERBASE
#define NW4R_EF_MEMORYMANAGERBASE
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct MemoryManagerBase
{
virtual ~MemoryManagerBase(); // at 0x8
virtual UNKTYPE GarbageCollection() = 0; // at 0xc
virtual Effect * AllocEffect() = 0; // at 0x10
virtual UNKTYPE FreeEffect(void *) = 0; // at 0x14
virtual UNKWORD GetNumAllocEffect() const = 0; // at 0x18
virtual UNKWORD GetNumActiveEffect() const = 0; // at 0x1c
virtual UNKWORD GetNumFreeEffect() const = 0; // at 0x20
virtual Emitter * AllocEmitter() = 0; // at 0x24
virtual UNKTYPE FreeEmitter(void *) = 0; // at 0x28
virtual UNKWORD GetNumAllocEmitter() const = 0; // at 0x2c
virtual UNKWORD GetNumActiveEmitter() const = 0; // at 0x30
virtual UNKWORD GetNumFreeEmitter() const = 0; // at 0x34
virtual ParticleManager * AllocParticleManager() = 0; // at 0x38
virtual UNKTYPE FreeParticleManager(void *) = 0; // at 0x3c
virtual UNKWORD GetNumAllocParticleManager() const = 0; // at 0x40
virtual UNKWORD GetNumActiveParticleManager() const = 0; // at 0x44
virtual UNKWORD GetNumFreeParticleManager() const = 0; // at 0x48
virtual Particle * AllocParticle() = 0; // at 0x4c
virtual UNKTYPE FreeParticle(void *) = 0; // at 0x50
virtual UNKWORD GetNumAllocParticle() const = 0; // at 0x54
virtual UNKWORD GetNumActiveParticle() const = 0; // at 0x58
virtual UNKWORD GetNumFreeParticle() const = 0; // at 0x5c
virtual void * AllocHeap(u32) = 0; // at 0x60
};
}
}
#endif
-24
View File
@@ -1,24 +0,0 @@
#ifndef NW4R_EF_PARTICLE_H
#define NW4R_EF_PARTICLE_H
#include "types_nw4r.h"
#include "ef_ref.h"
namespace nw4r
{
namespace ef
{
struct Particle : ReferencedObject
{
char UNK_0x20[0x8C];
math::VEC3 VEC_0xAC;
math::VEC3 VEC_0xB8;
char UNK_0xC4[0x4];
ParticleManager * mManager; // at 0xc8
};
}
}
#endif
-91
View File
@@ -1,91 +0,0 @@
#ifndef NW4R_EF_PARTICLEMANAGER
#define NW4R_EF_PARTICLEMANAGER
#include "types_nw4r.h"
#include "math_types.h"
#include "ef_list.h"
#include "ef_ref.h"
#include "ut_Color.h"
namespace nw4r
{
namespace ef
{
struct ParticleManager : ReferencedObject
{
struct ParticleModifier
{
math::VEC2 mScale; // at 0x0
math::VEC3 mRotate; // at 0x8
struct SimpleLight
{
u8 mType; // at 0x0
ut::Color mAmbColor; // at 0x1
} mLight;
};
UNKTYPE BeginDraw();
UNKTYPE EndDraw();
UNKTYPE BeginCalc(bool);
UNKTYPE EndCalc();
bool SendClosing();
UNKTYPE DestroyFunc();
virtual bool Initialize(Emitter *, EmitterResource *);
virtual UNKTYPE CreateParticle(u16, math::VEC3, math::VEC3, const math::MTX34 *, float, const EmitterInheritSetting *, Particle *, u16);
virtual UNKTYPE Calc();
virtual UNKTYPE Draw(const DrawInfo &);
Emitter * mEmitter; // at 0x20
EmitterResource * mResource; // at 0x24
UNKWORD FLAGS_0x28;
char UNK_0x2C[0xC];
ActivityList EFLIST_0x38;
char UNK_0x54[0x4];
ParticleModifier mMod; // at 0x58
char UNK_0x74[0x14];
s8 BYTE_0x88;
u8 BYTE_0x89;
bool BOOL_0x8A;
UNKWORD FLAGS_0xB4;
u16 RetireParticleAll();
UNKTYPE CalcGlobalMtx(math::MTX34 *);
static void ModifierTravFunc_SetSimpleLightType(void *p, u32 payload)
{
ParticleManager *mgr = (ParticleManager *)p;
u8 type = (u8)payload;
mgr->mMod.mLight.mType = type;
}
static void ModifierTravFunc_SetSimpleLightAmbient(void *p, u32 payload)
{
ParticleManager *mgr = (ParticleManager *)p;
ut::Color *color = (ut::Color *)payload;
mgr->mMod.mLight.mAmbColor = *color;
}
static void ModifierTravFunc_SetScale(void *p, u32 payload)
{
ParticleManager *mgr = (ParticleManager *)p;
math::VEC2 *scale = (math::VEC2 *)payload;
mgr->mMod.mScale = *scale;
}
static void ModifierTravFunc_SetRotate(void *p, u32 payload)
{
ParticleManager *mgr = (ParticleManager *)p;
math::VEC3 *rot = (math::VEC3 *)payload;
mgr->mMod.mRotate = *rot;
}
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_POINT_H
#define NW4R_EF_POINT_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormPoint : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-38
View File
@@ -1,38 +0,0 @@
#ifndef NW4R_EF_RAND_H
#define NW4R_EF_RAND_H
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct Random
{
u32 mSeed; // at 0x0
inline u32 MixRandomSeed()
{
return mSeed = mSeed * 0x343fd + 0x269ec3;
}
inline void Srand(u32 seed)
{
mSeed = seed;
}
inline u32 Rand()
{
//WARNING: THIS INLINE FUNCTION MAY NOT BE ACCURATE
return MixRandomSeed() >> 0x10;
}
inline float RandFloat()
{
//WARNING: THIS INLINE FUNCTION MAY NOT BE ACCURATE
return (float)Rand() / 0xFFFF;
}
};
}
}
#endif
-48
View File
@@ -1,48 +0,0 @@
#ifndef NW4R_EF_REF
#define NW4R_EF_REF
#include "types_nw4r.h"
#include "math_types.h"
namespace nw4r
{
namespace ef
{
struct ReferencedObject
{
char UNK_0x0[0xC];
UNKWORD WORD_0xC;
u32 mRefCount; // at 0x10
char UNK_0x14[0x8];
virtual bool SendClosing();
virtual UNKTYPE DestroyFunc();
inline void Initialize()
{
mRefCount = 0;
WORD_0xC = 1;
}
inline void Ref()
{
mRefCount++;
}
inline void UnRef()
{
if (--mRefCount == 0 && WORD_0xC == 2) SendClosing();
}
inline void Destroy()
{
DestroyFunc();
WORD_0xC = 2;
if (mRefCount == 0) SendClosing();
}
};
typedef ReferencedObject UNKREF;
}
}
#endif
-18
View File
@@ -1,18 +0,0 @@
#ifndef NW4R_EF_RESOURCE
#define NW4R_EF_RESOURCE
#include "types_nw4r.h"
namespace nw4r
{
namespace ef
{
struct Resource
{
EmitterResource * _FindEmitter(const char *, EffectProject *) const;
static Resource * GetInstance();
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_SPHERE_H
#define NW4R_EF_SPHERE_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormSphere : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifndef NW4R_EF_TORUS_H
#define NW4R_EF_TORUS_H
#include "ef_emitterform.h"
namespace nw4r
{
namespace ef
{
struct EmitterFormTorus : EmitterForm
{
virtual UNKTYPE Emission(Emitter *, ParticleManager *, int, u32, float *, u16, float, const math::MTX34 *);
};
}
}
#endif
-22
View File
@@ -1,22 +0,0 @@
#ifndef NW4R_EF_UTIL
#define NW4R_EF_UTIL
#include "types_nw4r.h"
#include "ut_list.h"
namespace nw4r
{
namespace ef
{
typedef void (* Action)(void *, u32);
u16 UtlistToArray(const ut::List *, void **, int);
UNKTYPE GetDirMtxY(math::MTX34 *, const math::VEC3 &);
UNKTYPE MtxGetRotation(const math::MTX34 &, math::VEC3 *);
UNKTYPE MtxGetTranslate(const math::MTX34 &, math::VEC3 *);
UNKTYPE MtxGetRotationMtx(const math::MTX34 &, math::MTX34 *);
UNKTYPE MtxGetScale(const math::MTX34 &, math::VEC3 *);
}
}
#endif
+10 -14
View File
@@ -1,20 +1,16 @@
#ifndef NW4R_G3D_3DSMAX_H
#define NW4R_G3D_3DSMAX_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_anmtexsrt.h"
namespace nw4r
{
namespace g3d
{
namespace detail
{
namespace dcc
{
bool CalcTexMtx_3dsmax(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
}
}
namespace nw4r {
namespace g3d {
namespace detail {
namespace dcc {
bool CalcTexMtx_3dsmax(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef NW4R_G3D_ANMCAMERA_H
#define NW4R_G3D_ANMCAMERA_H
#include "common.h"
#include "math_types.h"
#include "types_nw4r.h"
#include <rvl/GX.h>
+16 -31
View File
@@ -1,40 +1,25 @@
#ifndef NW4R_G3D_ANMCHR_H
#define NW4R_G3D_ANMCHR_H
#include "types_nw4r.h"
#include "common.h"
#include "math_types.h"
namespace nw4r
{
namespace g3d
{
struct ChrAnmResult
{
u32 mFlags; // at 0x0
math::VEC3 VEC3_0x4;
math::VEC3 VEC3_0x10;
math::MTX34 mMtx; // at 0x1C
};
namespace nw4r {
namespace g3d {
struct ChrAnmResult {
u32 mFlags; // at 0x0
math::VEC3 VEC3_0x4;
math::VEC3 VEC3_0x10;
math::MTX34 mMtx; // at 0x1C
};
struct AnmObjChr
{
struct AnmObjChr {};
};
struct AnmObjChrNode
{
struct AnmObjChrNode {};
};
struct AnmObjChrBlend {};
struct AnmObjChrBlend
{
struct AnmObjChrRes {};
} // namespace g3d
} // namespace nw4r
};
struct AnmObjChrRes
{
};
}
}
#endif
#endif
+13 -19
View File
@@ -1,23 +1,17 @@
#ifndef NW4R_G3D_ANMCLR_H
#define NW4R_G3D_ANMCLR_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
struct ClrAnmResult
{
enum
{
ANM_COUNT = 11
};
u32 mFlags; // at 0x0
u32 COLORS_0x4[ANM_COUNT];
UNKWORD WORDS_0x30[ANM_COUNT];
};
}
}
namespace nw4r {
namespace g3d {
struct ClrAnmResult {
enum { ANM_COUNT = 11 };
#endif
u32 mFlags; // at 0x0
u32 COLORS_0x4[ANM_COUNT];
UNKWORD WORDS_0x30[ANM_COUNT];
};
} // namespace g3d
} // namespace nw4r
#endif
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef NW4R_G3D_ANMFOG_H
#define NW4R_G3D_ANMFOG_H
#include "types_nw4r.h"
#include "common.h"
#include "ut_Color.h"
#include <rvl/GX.h>
+94 -120
View File
@@ -1,129 +1,103 @@
#ifndef NW4R_G3D_ANMOBJ_H
#define NW4R_G3D_ANMOBJ_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_obj.h"
#include "g3d_rescommon.h"
#include "g3d_resmdl.h"
#include "g3d_obj.h"
namespace nw4r
{
namespace g3d
{
enum AnmPolicy
{
ANM_POLICY_ONETIME,
ANM_POLICY_LOOP,
ANM_POLICY_MAX
};
namespace nw4r {
namespace g3d {
enum AnmPolicy { ANM_POLICY_ONETIME, ANM_POLICY_LOOP, ANM_POLICY_MAX };
typedef f32 (* PlayPolicyFunc)(f32, f32, f32);
f32 PlayPolicy_Onetime(f32, f32, f32);
f32 PlayPolicy_Loop(f32, f32, f32);
typedef f32 (*PlayPolicyFunc)(f32, f32, f32);
f32 PlayPolicy_Onetime(f32, f32, f32);
f32 PlayPolicy_Loop(f32, f32, f32);
inline PlayPolicyFunc GetAnmPlayPolicy(AnmPolicy policy)
{
static PlayPolicyFunc policyTable[ANM_POLICY_MAX] = {
PlayPolicy_Onetime,
PlayPolicy_Loop
};
return policyTable[policy];
}
struct FrameCtrl
{
FrameCtrl(f32 f1, f32 f2, PlayPolicyFunc policy)
: mFrame(0.0f), mRate(1.0f), FLOAT_0x8(f1), mEndFrame(f2), mPolicy(policy) {}
f32 GetFrm() const
{
return mFrame;
}
f32 GetRate() const
{
return mRate;
}
void SetFrm(f32 frm)
{
f32 newFrm = mPolicy(FLOAT_0x8, mEndFrame, frm);
mFrame = newFrm;
}
void SetRate(f32 rate)
{
mRate = rate;
}
void SetPolicy(PlayPolicyFunc func)
{
mPolicy = func;
}
void UpdateFrm()
{
SetFrm(mFrame + mRate * smBaseUpdateRate);
}
f32 mFrame; // at 0x0
f32 mRate; // at 0x4
f32 FLOAT_0x8;
f32 mEndFrame;
PlayPolicyFunc mPolicy; // at 0x10
static f32 smBaseUpdateRate;
};
class AnmObj : public G3dObj
{
public:
enum AnmFlag
{
ANMFLAG_2 = 0x2,
ANMFLAG_ISBOUND = 0x4
};
public:
AnmObj(MEMAllocator *pAllocator, G3dObj *pParent)
: G3dObj(pAllocator, pParent), mFlags(0) {}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: G3dObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~AnmObj() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void UpdateFrame() = 0; // at 0x24
virtual void SetUpdateRate(f32) = 0; // at 0x28
virtual f32 GetUpdateRate() const = 0; // at 0x2C
virtual bool Bind(ResMdl) = 0; // at 0x30
virtual void Release(); // at 0x34
static const TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
void SetAnmFlag(AnmFlag, bool);
bool TestAnmFlag(AnmFlag) const;
private:
u32 mFlags; // at 0x4
NW4R_G3D_TYPE_OBJ_DECL(AnmObj);
};
}
inline PlayPolicyFunc GetAnmPlayPolicy(AnmPolicy policy) {
static PlayPolicyFunc policyTable[ANM_POLICY_MAX] = {PlayPolicy_Onetime, PlayPolicy_Loop};
return policyTable[policy];
}
#endif
struct FrameCtrl {
FrameCtrl(f32 f1, f32 f2, PlayPolicyFunc policy)
: mFrame(0.0f), mRate(1.0f), FLOAT_0x8(f1), mEndFrame(f2), mPolicy(policy) {}
f32 GetFrm() const {
return mFrame;
}
f32 GetRate() const {
return mRate;
}
void SetFrm(f32 frm) {
f32 newFrm = mPolicy(FLOAT_0x8, mEndFrame, frm);
mFrame = newFrm;
}
void SetRate(f32 rate) {
mRate = rate;
}
void SetPolicy(PlayPolicyFunc func) {
mPolicy = func;
}
void UpdateFrm() {
SetFrm(mFrame + mRate * smBaseUpdateRate);
}
f32 mFrame; // at 0x0
f32 mRate; // at 0x4
f32 FLOAT_0x8;
f32 mEndFrame;
PlayPolicyFunc mPolicy; // at 0x10
static f32 smBaseUpdateRate;
};
class AnmObj : public G3dObj {
public:
enum AnmFlag { ANMFLAG_2 = 0x2, ANMFLAG_ISBOUND = 0x4 };
public:
AnmObj(MEMAllocator *pAllocator, G3dObj *pParent) : G3dObj(pAllocator, pParent), mFlags(0) {}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : G3dObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~AnmObj() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void UpdateFrame() = 0; // at 0x24
virtual void SetUpdateRate(f32) = 0; // at 0x28
virtual f32 GetUpdateRate() const = 0; // at 0x2C
virtual bool Bind(ResMdl) = 0; // at 0x30
virtual void Release(); // at 0x34
static const TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
void SetAnmFlag(AnmFlag, bool);
bool TestAnmFlag(AnmFlag) const;
private:
u32 mFlags; // at 0x4
NW4R_G3D_TYPE_OBJ_DECL(AnmObj);
};
} // namespace g3d
} // namespace nw4r
#endif
+49 -53
View File
@@ -1,60 +1,56 @@
#ifndef NW4R_G3D_ANMSCN_H
#define NW4R_G3D_ANMSCN_H
#include "types_nw4r.h"
#include "g3d_obj.h"
#include "g3d_light.h"
#include "g3d_fog.h"
#include "common.h"
#include "g3d_camera.h"
#include "g3d_fog.h"
#include "g3d_light.h"
#include "g3d_obj.h"
namespace nw4r
{
namespace g3d
{
class AnmScnRes // : public AnmScn
{
};
namespace nw4r {
namespace g3d {
class AnmScnRes // : public AnmScn
{};
class AnmScn : G3dObj
{
public:
AnmScn(MEMAllocator *);
virtual bool IsDerivedFrom(TypeObj other) const; // at 0x8
virtual ~AnmScn(); // at 0x10
virtual const TypeObj GetTypeObj() const; // at 0x14
virtual const char * GetTypeName() const; // at 0x18
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void SetUpdateRate(f32) = 0; // at 0x24
virtual f32 GetUpdateRate() const = 0; // at 0x28
virtual void UpdateFrame() = 0; // at 0x2C
virtual void Attach(int, AnmScnRes); // at 0x30
virtual void Detach(); // at 0x34
virtual int GetNumLightSet() const = 0; // at 0x38
virtual int GetNumAmbLight() const = 0; // at 0x3C
virtual int GetNumDiffuseLight() const = 0; // at 0x40
virtual int GetNumSpecularLight() const = 0; // at 0x44
virtual int GetNumFog() const = 0; // at 0x48
virtual int GetNumCamera() const = 0; // at 0x4C
virtual int GetLightSetMaxRefNumber() const = 0; // at 0x50
virtual int GetAmbLightMaxRefNumber() const = 0; // at 0x54
virtual int GetDiffuseLightMaxRefNumber() const = 0; // at 0x58
virtual int GetFogMaxRefNumber() const = 0; // at 0x5C
virtual int GetCameraMaxRefNumber() const = 0; // at 0x60
virtual void GetLightSet(LightSet, u32) = 0; // at 0x64
virtual ut::Color GetAmbLightColor(u32) = 0; // at 0x68
virtual void GetLight(LightObj *, LightObj *, u32) = 0; // at 0x6C
virtual void GetFog(Fog, u32) = 0; // at 0x70
virtual void GetCamera(Camera, u32) = 0; // at 0x74
virtual int GetSpecularLightID(u32) const = 0; // at 0x78
virtual bool HasSpecularLight(u32) const = 0; // at 0x7C
virtual void GetAmbLightResult(AmbLightAnmResult *, u32) = 0; // at 0x80
virtual void GetLightResult(LightAnmResult *, u32) = 0; // at 0x84
virtual void GetFogResult(FogAnmResult *, u32) = 0; // at 0x88
virtual void GetFogResult(CameraAnmResult *, u32) = 0; // at 0x8C
class AnmScn : G3dObj {
public:
AnmScn(MEMAllocator *);
virtual bool IsDerivedFrom(TypeObj other) const; // at 0x8
virtual ~AnmScn(); // at 0x10
virtual const TypeObj GetTypeObj() const; // at 0x14
virtual const char *GetTypeName() const; // at 0x18
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void SetUpdateRate(f32) = 0; // at 0x24
virtual f32 GetUpdateRate() const = 0; // at 0x28
virtual void UpdateFrame() = 0; // at 0x2C
virtual void Attach(int, AnmScnRes); // at 0x30
virtual void Detach(); // at 0x34
virtual int GetNumLightSet() const = 0; // at 0x38
virtual int GetNumAmbLight() const = 0; // at 0x3C
virtual int GetNumDiffuseLight() const = 0; // at 0x40
virtual int GetNumSpecularLight() const = 0; // at 0x44
virtual int GetNumFog() const = 0; // at 0x48
virtual int GetNumCamera() const = 0; // at 0x4C
virtual int GetLightSetMaxRefNumber() const = 0; // at 0x50
virtual int GetAmbLightMaxRefNumber() const = 0; // at 0x54
virtual int GetDiffuseLightMaxRefNumber() const = 0; // at 0x58
virtual int GetFogMaxRefNumber() const = 0; // at 0x5C
virtual int GetCameraMaxRefNumber() const = 0; // at 0x60
virtual void GetLightSet(LightSet, u32) = 0; // at 0x64
virtual ut::Color GetAmbLightColor(u32) = 0; // at 0x68
virtual void GetLight(LightObj *, LightObj *, u32) = 0; // at 0x6C
virtual void GetFog(Fog, u32) = 0; // at 0x70
virtual void GetCamera(Camera, u32) = 0; // at 0x74
virtual int GetSpecularLightID(u32) const = 0; // at 0x78
virtual bool HasSpecularLight(u32) const = 0; // at 0x7C
virtual void GetAmbLightResult(AmbLightAnmResult *, u32) = 0; // at 0x80
virtual void GetLightResult(LightAnmResult *, u32) = 0; // at 0x84
virtual void GetFogResult(FogAnmResult *, u32) = 0; // at 0x88
virtual void GetFogResult(CameraAnmResult *, u32) = 0; // at 0x8C
void GetLightSetting(LightSetting *);
};
}
}
void GetLightSetting(LightSetting *);
};
} // namespace g3d
} // namespace nw4r
#endif
#endif
+162 -180
View File
@@ -1,188 +1,170 @@
#ifndef NW4R_G3D_ANMVIS_H
#define NW4R_G3D_ANMVIS_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_anmobj.h"
#include "g3d_resanmvis.h"
namespace nw4r
{
namespace g3d
namespace nw4r {
namespace g3d {
void ApplyVisAnmResult(ResMdl, AnmObjVis *);
void ApplyVisAnmResult(u8 *, ResMdl, AnmObjVis *);
class AnmObjVis : public AnmObj {
public:
AnmObjVis(MEMAllocator *, u16 *, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
void ApplyVisAnmResult(ResMdl, AnmObjVis *);
void ApplyVisAnmResult(u8 *, ResMdl, AnmObjVis *);
class AnmObjVis : public AnmObj
{
public:
AnmObjVis(MEMAllocator *, u16 *, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: AnmObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~AnmObjVis() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void UpdateFrame() = 0; // at 0x24
virtual void SetUpdateRate(f32) = 0; // at 0x28
virtual f32 GetUpdateRate() const = 0; // at 0x2C
virtual bool Bind(ResMdl) = 0; // at 0x30
virtual void Release(); // at 0x34
virtual bool GetResult(u32) = 0; // at 0x38
virtual AnmObjVisRes * Attach(int, AnmObjVisRes *); // at 0x3C
virtual AnmObjVisRes * Detach(int); // at 0x40
static const TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
bool TestDefined(u32 idx) const;
bool TestExistence(u32 idx) const;
void DetachAll();
protected:
static const int MAX_RESOURCES = 4;
int mNumBinds; // at 0x10
u16 *mBinds; // at 0x14
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVis);
};
class AnmObjVisNode : public AnmObjVis
{
public:
AnmObjVisNode(MEMAllocator *allocator, u16 *bindBuffer, int numBinds)
: AnmObjVis(allocator, bindBuffer, numBinds)
{
mResources[0] = NULL;
mResources[1] = NULL;
mResources[2] = NULL;
mResources[3] = NULL;
}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: AnmObjVis::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~AnmObjVisNode(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32); // at 0x1C
virtual f32 GetFrame() const; // at 0x20
virtual void UpdateFrame(); // at 0x24
virtual void SetUpdateRate(f32); // at 0x28
virtual f32 GetUpdateRate() const; // at 0x2C
virtual bool Bind(ResMdl); // at 0x30
virtual void Release(); // at 0x34
virtual bool GetResult(u32) = 0; // at 0x38
virtual AnmObjVisRes * Attach(int, AnmObjVisRes *); // at 0x3C
virtual AnmObjVisRes * Detach(int); // at 0x40
static const TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
protected:
AnmObjVisRes *mResources[MAX_RESOURCES]; // at 0x18
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisNode);
};
class AnmObjVisOR : public AnmObjVisNode
{
public:
AnmObjVisOR(MEMAllocator *allocator, u16 *bindBuffer, int numBinds)
: AnmObjVisNode(allocator, bindBuffer, numBinds)
{
}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: AnmObjVisNode::IsDerivedFrom(other);
}
virtual ~AnmObjVisOR() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual bool GetResult(u32); // at 0x38
static const TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
static AnmObjVisOR * Construct(MEMAllocator *, u32 *, ResMdl);
private:
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisOR);
};
class AnmObjVisRes : public AnmObjVis, public FrameCtrl
{
public:
AnmObjVisRes(MEMAllocator *, ResAnmVis, u16 *, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: AnmObjVis::IsDerivedFrom(other);
}
virtual ~AnmObjVisRes() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32); // at 0x1C
virtual f32 GetFrame() const; // at 0x20
virtual void UpdateFrame(); // at 0x24
virtual void SetUpdateRate(f32); // at 0x28
virtual f32 GetUpdateRate() const; // at 0x2C
virtual bool Bind(ResMdl); // at 0x30
virtual bool GetResult(u32); // at 0x38
static const TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
static AnmObjVisRes * Construct(MEMAllocator *, u32 *, ResAnmVis, ResMdl);
private:
ResAnmVis mResAnmVis; // at 0x2C
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisRes);
};
return (other == GetTypeObjStatic()) ? true : AnmObj::IsDerivedFrom(other);
}
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~AnmObjVis() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32) = 0; // at 0x1C
virtual f32 GetFrame() const = 0; // at 0x20
virtual void UpdateFrame() = 0; // at 0x24
virtual void SetUpdateRate(f32) = 0; // at 0x28
virtual f32 GetUpdateRate() const = 0; // at 0x2C
virtual bool Bind(ResMdl) = 0; // at 0x30
virtual void Release(); // at 0x34
virtual bool GetResult(u32) = 0; // at 0x38
virtual AnmObjVisRes *Attach(int, AnmObjVisRes *); // at 0x3C
virtual AnmObjVisRes *Detach(int); // at 0x40
#endif
static const TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
bool TestDefined(u32 idx) const;
bool TestExistence(u32 idx) const;
void DetachAll();
protected:
static const int MAX_RESOURCES = 4;
int mNumBinds; // at 0x10
u16 *mBinds; // at 0x14
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVis);
};
class AnmObjVisNode : public AnmObjVis {
public:
AnmObjVisNode(MEMAllocator *allocator, u16 *bindBuffer, int numBinds) : AnmObjVis(allocator, bindBuffer, numBinds) {
mResources[0] = NULL;
mResources[1] = NULL;
mResources[2] = NULL;
mResources[3] = NULL;
}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : AnmObjVis::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~AnmObjVisNode(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32); // at 0x1C
virtual f32 GetFrame() const; // at 0x20
virtual void UpdateFrame(); // at 0x24
virtual void SetUpdateRate(f32); // at 0x28
virtual f32 GetUpdateRate() const; // at 0x2C
virtual bool Bind(ResMdl); // at 0x30
virtual void Release(); // at 0x34
virtual bool GetResult(u32) = 0; // at 0x38
virtual AnmObjVisRes *Attach(int, AnmObjVisRes *); // at 0x3C
virtual AnmObjVisRes *Detach(int); // at 0x40
static const TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
protected:
AnmObjVisRes *mResources[MAX_RESOURCES]; // at 0x18
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisNode);
};
class AnmObjVisOR : public AnmObjVisNode {
public:
AnmObjVisOR(MEMAllocator *allocator, u16 *bindBuffer, int numBinds)
: AnmObjVisNode(allocator, bindBuffer, numBinds) {}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : AnmObjVisNode::IsDerivedFrom(other);
}
virtual ~AnmObjVisOR() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual bool GetResult(u32); // at 0x38
static const TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
static AnmObjVisOR *Construct(MEMAllocator *, u32 *, ResMdl);
private:
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisOR);
};
class AnmObjVisRes : public AnmObjVis, public FrameCtrl {
public:
AnmObjVisRes(MEMAllocator *, ResAnmVis, u16 *, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : AnmObjVis::IsDerivedFrom(other);
}
virtual ~AnmObjVisRes() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual void SetFrame(f32); // at 0x1C
virtual f32 GetFrame() const; // at 0x20
virtual void UpdateFrame(); // at 0x24
virtual void SetUpdateRate(f32); // at 0x28
virtual f32 GetUpdateRate() const; // at 0x2C
virtual bool Bind(ResMdl); // at 0x30
virtual bool GetResult(u32); // at 0x38
static const TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
static AnmObjVisRes *Construct(MEMAllocator *, u32 *, ResAnmVis, ResMdl);
private:
ResAnmVis mResAnmVis; // at 0x2C
NW4R_G3D_TYPE_OBJ_DECL(AnmObjVisRes);
};
} // namespace g3d
} // namespace nw4r
#endif
+7 -9
View File
@@ -1,14 +1,12 @@
#ifndef NW4R_G3D_CALC_VIEW_H
#define NW4R_G3D_CALC_VIEW_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
void CalcView(math::MTX34 *, math::MTX33 *, const math::MTX34 *, const u32 *,
u32, const math::MTX34 *, ResMdl, math::MTX34 *);
}
namespace nw4r {
namespace g3d {
void CalcView(math::MTX34 *, math::MTX33 *, const math::MTX34 *, const u32 *, u32, const math::MTX34 *, ResMdl,
math::MTX34 *);
}
} // namespace nw4r
#endif
#endif
+9 -13
View File
@@ -1,19 +1,15 @@
#ifndef NW4R_G3D_CALC_WORLD_H
#define NW4R_G3D_CALC_WORLD_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
void CalcWorld(math::MTX34 *, u32 *, const u8 *, const math::MTX34 *,
ResMdl, AnmObjChr *, FuncObjCalcWorld *, u32);
namespace nw4r {
namespace g3d {
void CalcWorld(math::MTX34 *, u32 *, const u8 *, const math::MTX34 *, ResMdl, AnmObjChr *, FuncObjCalcWorld *, u32);
void CalcWorld(math::MTX34 *, u32 *, const u8 *, const math::MTX34 *,
ResMdl, AnmObjChr *, FuncObjCalcWorld *);
void CalcWorld(math::MTX34 *, u32 *, const u8 *, const math::MTX34 *, ResMdl, AnmObjChr *, FuncObjCalcWorld *);
void CalcSkinning(math::MTX34 *, u32 *, ResMdl, const u8 *);
}
}
void CalcSkinning(math::MTX34 *, u32 *, ResMdl, const u8 *);
} // namespace g3d
} // namespace nw4r
#endif
#endif
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef NW4R_G3D_CAMERA_H
#define NW4R_G3D_CAMERA_H
#include "common.h"
#include "g3d_rescommon.h"
#include "math_types.h"
#include "types_nw4r.h"
#include <rvl/MTX.h>
+10 -13
View File
@@ -1,17 +1,14 @@
#ifndef NW4R_G3D_CPU_H
#define NW4R_G3D_CPU_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
namespace detail
{
void Copy32ByteBlocks(void *, const void *, u32);
void ZeroMemory32ByteBlocks(void *, u32);
}
}
}
namespace nw4r {
namespace g3d {
namespace detail {
void Copy32ByteBlocks(void *, const void *, u32);
void ZeroMemory32ByteBlocks(void *, u32);
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
#endif
+6 -9
View File
@@ -1,15 +1,12 @@
#ifndef NW4R_G3D_DCC_H
#define NW4R_G3D_DCC_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_anmtexsrt.h"
namespace nw4r
{
namespace g3d
{
void CalcTexMtx(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag,
TexSrtTypedef::TexMatrixMode);
}
namespace nw4r {
namespace g3d {
void CalcTexMtx(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag, TexSrtTypedef::TexMatrixMode);
}
} // namespace nw4r
#endif
#endif
+9 -13
View File
@@ -1,19 +1,15 @@
#ifndef NW4R_G3D_DRAW_H
#define NW4R_G3D_DRAW_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_resmdl.h"
namespace nw4r
{
namespace g3d
{
struct DrawResMdlReplacement
{
};
namespace nw4r {
namespace g3d {
struct DrawResMdlReplacement {};
void DrawResMdlDirectly(ResMdl, const math::MTX34 *, const math::MTX33 *,
const math::MTX34 *, const u8 *, const u8 *, DrawResMdlReplacement *, u32);
}
}
void DrawResMdlDirectly(ResMdl, const math::MTX34 *, const math::MTX33 *, const math::MTX34 *, const u8 *, const u8 *,
DrawResMdlReplacement *, u32);
} // namespace g3d
} // namespace nw4r
#endif
#endif
+9 -13
View File
@@ -1,20 +1,16 @@
#ifndef NW4R_G3D_DRAW1_MAT1_SHP_H
#define NW4R_G3D_DRAW1_MAT1_SHP_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_resmat.h"
#include "g3d_resshp.h"
namespace nw4r
{
namespace g3d
{
struct Draw1Mat1ShpSwap
{
};
namespace nw4r {
namespace g3d {
struct Draw1Mat1ShpSwap {};
void Draw1Mat1ShpDirectly(ResMat, ResShp, const math::MTX34 *,
const math::MTX34 *, u32, Draw1Mat1ShpSwap *, G3DState::IndMtxOp *);
}
}
void Draw1Mat1ShpDirectly(ResMat, ResShp, const math::MTX34 *, const math::MTX34 *, u32, Draw1Mat1ShpSwap *,
G3DState::IndMtxOp *);
} // namespace g3d
} // namespace nw4r
#endif
#endif
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef NW4R_G3D_FOG_H
#define NW4R_G3D_FOG_H
#include "common.h"
#include "g3d_rescommon.h"
#include "math_types.h"
#include "types_nw4r.h"
#include "ut_Color.h"
#include <rvl/GX.h>
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef NW4R_G3D_GPU_H
#define NW4R_G3D_GPU_H
#include "common.h"
#include "g3d_rescommon.h"
#include "math_types.h"
#include "types_nw4r.h"
#include <rvl/GX.h>
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef NW4R_G3D_INIT_H
#define NW4R_G3D_INIT_H
#include "types_nw4r.h"
#include "common.h"
#include <rvl/OS.h>
namespace nw4r {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef NW4R_G3D_LIGHT_H
#define NW4R_G3D_LIGHT_H
#include "common.h"
#include "g3d_rescommon.h"
#include "types_nw4r.h"
#include <rvl/GX.h>
+10 -14
View File
@@ -1,20 +1,16 @@
#ifndef NW4R_G3D_MAYA_H
#define NW4R_G3D_MAYA_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_anmtexsrt.h"
namespace nw4r
{
namespace g3d
{
namespace detail
{
namespace dcc
{
bool CalcTexMtx_Maya(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
}
}
namespace nw4r {
namespace g3d {
namespace detail {
namespace dcc {
bool CalcTexMtx_Maya(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
#endif
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef NW4R_G3D_G3DOBJ_H
#define NW4R_G3D_G3DOBJ_H
#include "types_nw4r.h"
#include "common.h"
#include <rvl/MEM/mem_allocator.h>
#define NW4R_G3D_TYPE_OBJ_DECL(VAL) static const nw4r::g3d::G3dObj::ResNameDataT<sizeof(#VAL)> TYPE_NAME
+78 -83
View File
@@ -1,88 +1,83 @@
#ifndef NW4R_G3D_RESANM_H
#define NW4R_G3D_RESANM_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
struct ResKeyFrameAnmFramesData
{
float mTime; // at 0x0
float mValue; // at 0x4
float mDerivative; // at 0x8
};
struct ResKeyFrameAnmData
{
u16 mCount; // at 0x0
float FLOAT_0x4;
ResKeyFrameAnmFramesData mFrames[]; // at 0x8
};
struct ResColorAnmFramesData
{
u32 mColor; // at 0x0
};
union ResColorAnmData
{
u32 mColor;
s32 mOffset;
};
struct ResBoolAnmFramesData
{
u32 mFlags; // at 0x0
};
union ResAnmData
{
float mValue;
s32 mOffset;
};
namespace detail
{
float GetResKeyFrameAnmResult(const ResKeyFrameAnmData *, float);
u32 GetResColorAnmResult(const ResColorAnmFramesData *, float);
inline u32 GetResColorAnmResult(const ResColorAnmData * pData, float time, bool b)
{
if (b) return pData->mColor;
return GetResColorAnmResult((const ResColorAnmFramesData *)((u8 *)pData + pData->mOffset), time);
}
inline bool GetResBoolAnmFramesResult(const ResBoolAnmFramesData * pData, int i)
{
u32 index = i;
u32 mask = 0x80000000 >> (index % 32);
u32 flags = pData[index / 32].mFlags;
return flags & mask;
}
template <typename T>
inline float ClipFrame(T & info, float time)
{
if (time <= 0.0f) return 0.0f;
if (info.mNumFrames <= time) return info.mNumFrames;
return time;
}
inline float GetResAnmResult(const ResAnmData * pData, float time, bool b)
{
if (b) return pData->mValue;
return GetResKeyFrameAnmResult((const ResKeyFrameAnmData *)((u8 *)pData + pData->mOffset), time);
}
}
}
namespace nw4r {
namespace g3d {
struct ResKeyFrameAnmFramesData {
float mTime; // at 0x0
float mValue; // at 0x4
float mDerivative; // at 0x8
};
struct ResKeyFrameAnmData {
u16 mCount; // at 0x0
float FLOAT_0x4;
ResKeyFrameAnmFramesData mFrames[]; // at 0x8
};
struct ResColorAnmFramesData {
u32 mColor; // at 0x0
};
union ResColorAnmData {
u32 mColor;
s32 mOffset;
};
struct ResBoolAnmFramesData {
u32 mFlags; // at 0x0
};
union ResAnmData {
float mValue;
s32 mOffset;
};
namespace detail {
float GetResKeyFrameAnmResult(const ResKeyFrameAnmData *, float);
u32 GetResColorAnmResult(const ResColorAnmFramesData *, float);
inline u32 GetResColorAnmResult(const ResColorAnmData *pData, float time, bool b) {
if (b) {
return pData->mColor;
}
return GetResColorAnmResult((const ResColorAnmFramesData *)((u8 *)pData + pData->mOffset), time);
}
#endif
inline bool GetResBoolAnmFramesResult(const ResBoolAnmFramesData *pData, int i) {
u32 index = i;
u32 mask = 0x80000000 >> (index % 32);
u32 flags = pData[index / 32].mFlags;
return flags & mask;
}
template <typename T>
inline float ClipFrame(T &info, float time) {
if (time <= 0.0f) {
return 0.0f;
}
if (info.mNumFrames <= time) {
return info.mNumFrames;
}
return time;
}
inline float GetResAnmResult(const ResAnmData *pData, float time, bool b) {
if (b) {
return pData->mValue;
}
return GetResKeyFrameAnmResult((const ResKeyFrameAnmData *)((u8 *)pData + pData->mOffset), time);
}
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
+19 -21
View File
@@ -1,30 +1,28 @@
#ifndef NW4R_G3D_RESANMCAMERA_H
#define NW4R_G3D_RESANMCAMERA_H
#include "types_nw4r.h"
#include "g3d_rescommon.h"
#include "common.h"
#include "g3d_anmcamera.h"
#include "g3d_rescommon.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmCameraData
{
char UNK_0x0[0xC];
u32 mID; // at 0xC
};
namespace nw4r {
namespace g3d {
struct ResAnmCameraData {
char UNK_0x0[0xC];
u32 mID; // at 0xC
};
struct ResAnmCamera
{
ResCommon<ResAnmCameraData> mAnmCamera;
inline ResAnmCamera(void * vptr) : mAnmCamera(vptr) {}
struct ResAnmCamera {
ResCommon<ResAnmCameraData> mAnmCamera;
bool IsValid() const { return mAnmCamera.IsValid(); }
inline ResAnmCamera(void *vptr) : mAnmCamera(vptr) {}
void GetAnmResult(CameraAnmResult *, f32) const;
};
bool IsValid() const {
return mAnmCamera.IsValid();
}
}
#endif
void GetAnmResult(CameraAnmResult *, f32) const;
};
} // namespace g3d
} // namespace nw4r
#endif
+21 -29
View File
@@ -1,35 +1,27 @@
#ifndef NW4R_G3D_RESANMCHR_H
#define NW4R_G3D_RESANMCHR_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_rescommon.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmChrData
{
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
};
namespace nw4r {
namespace g3d {
struct ResAnmChrData {
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
};
struct ResAnmChr
{
enum
{
REVISION = 4
};
ResCommon<ResAnmChrData> mAnmChr;
inline ResAnmChr(void * vptr) : mAnmChr(vptr) {}
inline bool CheckRevision() const
{
return mAnmChr.ref().mRevision == REVISION;
}
};
}
}
struct ResAnmChr {
enum { REVISION = 4 };
#endif
ResCommon<ResAnmChrData> mAnmChr;
inline ResAnmChr(void *vptr) : mAnmChr(vptr) {}
inline bool CheckRevision() const {
return mAnmChr.ref().mRevision == REVISION;
}
};
} // namespace g3d
} // namespace nw4r
#endif
+19 -21
View File
@@ -1,30 +1,28 @@
#ifndef NW4R_G3D_RESANMFOG_H
#define NW4R_G3D_RESANMFOG_H
#include "types_nw4r.h"
#include "g3d_rescommon.h"
#include "common.h"
#include "g3d_anmfog.h"
#include "g3d_rescommon.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmFogData
{
char UNK_0x0[0xC];
u32 mID; // at 0xC
};
namespace nw4r {
namespace g3d {
struct ResAnmFogData {
char UNK_0x0[0xC];
u32 mID; // at 0xC
};
struct ResAnmFog
{
ResCommon<ResAnmFogData> mAnmFog;
inline ResAnmFog(void * vptr) : mAnmFog(vptr) {}
struct ResAnmFog {
ResCommon<ResAnmFogData> mAnmFog;
void GetAnmResult(FogAnmResult *, f32) const;
inline ResAnmFog(void *vptr) : mAnmFog(vptr) {}
bool IsValid() const { return mAnmFog.IsValid(); }
};
void GetAnmResult(FogAnmResult *, f32) const;
bool IsValid() const {
return mAnmFog.IsValid();
}
}
};
} // namespace g3d
} // namespace nw4r
#endif
#endif
+32 -36
View File
@@ -1,45 +1,41 @@
#ifndef NW4R_G3D_RESANMSCN_H
#define NW4R_G3D_RESANMSCN_H
#include "types_nw4r.h"
#include "g3d_rescommon.h"
#include "g3d_resanmfog.h"
#include "common.h"
#include "g3d_resanmcamera.h"
#include "g3d_resanmfog.h"
#include "g3d_rescommon.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmScnData
{
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
char UNK_0xC[0x3E - 0xC];
u16 mFogMaxRefNum; // at 0x3E
};
namespace nw4r {
namespace g3d {
struct ResAnmScnData {
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
char UNK_0xC[0x3E - 0xC];
u16 mFogMaxRefNum; // at 0x3E
};
struct ResAnmScn
{
enum
{
REVISION = 4
};
ResCommon<ResAnmScnData> mAnmScn;
ResAnmFog GetResAnmFogByRefNumber(u32) const;
ResAnmCamera GetResAnmCameraByRefNumber(u32) const;
struct ResAnmScn {
enum { REVISION = 4 };
inline ResAnmScn(void * vptr) : mAnmScn(vptr) {}
ResCommon<ResAnmScnData> mAnmScn;
inline bool IsValid() const { return mAnmScn.IsValid(); }
inline bool CheckRevision() const
{
return mAnmScn.ref().mRevision == REVISION;
}
ResAnmFog GetResAnmFogByRefNumber(u32) const;
ResAnmCamera GetResAnmCameraByRefNumber(u32) const;
u16 GetResAnmFogMaxRefNumber() const { return mAnmScn.ref().mFogMaxRefNum; }
};
}
}
inline ResAnmScn(void *vptr) : mAnmScn(vptr) {}
#endif
inline bool IsValid() const {
return mAnmScn.IsValid();
}
inline bool CheckRevision() const {
return mAnmScn.ref().mRevision == REVISION;
}
u16 GetResAnmFogMaxRefNumber() const {
return mAnmScn.ref().mFogMaxRefNum;
}
};
} // namespace g3d
} // namespace nw4r
#endif
+21 -29
View File
@@ -1,35 +1,27 @@
#ifndef NW4R_G3D_RESANMSHP_H
#define NW4R_G3D_RESANMSHP_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_rescommon.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmShpData
{
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
};
namespace nw4r {
namespace g3d {
struct ResAnmShpData {
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
};
struct ResAnmShp
{
enum
{
REVISION = 3
};
ResCommon<ResAnmShpData> mAnmShp;
inline ResAnmShp(void * vptr) : mAnmShp(vptr) {}
inline bool CheckRevision() const
{
return mAnmShp.ref().mRevision == REVISION;
}
};
}
}
struct ResAnmShp {
enum { REVISION = 3 };
#endif
ResCommon<ResAnmShpData> mAnmShp;
inline ResAnmShp(void *vptr) : mAnmShp(vptr) {}
inline bool CheckRevision() const {
return mAnmShp.ref().mRevision == REVISION;
}
};
} // namespace g3d
} // namespace nw4r
#endif
+116 -123
View File
@@ -1,141 +1,134 @@
#ifndef NW4R_G3D_RESCOMMON_H
#define NW4R_G3D_RESCOMMON_H
#include "types_nw4r.h"
#include "common.h"
#define NW4R_G3D_CREATE_RES_NAME_DATA(VAR,VAL) ResNameData ResNameData_##VAR = { sizeof(VAL) - 1, VAL }
#define NW4R_G3D_CREATE_RES_NAME_DATA(VAR, VAL) ResNameData ResNameData_##VAR = {sizeof(VAL) - 1, VAL}
#define FIFO_ACCESS_BP 0x61
#define FIFO_ACCESS_CP 0x8
#define FIFO_ACCESS_XF 0x10
namespace nw4r
{
namespace g3d
{
template <typename T>
class ResCommon
{
T * mPtr;
public:
inline ResCommon(void * vptr) : mPtr(static_cast<T *>(vptr)) {}
inline ResCommon(const void * vptr) : mPtr(static_cast<T *>(vptr)) {}
inline T & ref() const { return *mPtr; }
inline T * ptr() const { return mPtr; }
inline bool IsValid() const { return mPtr != NULL; }
namespace nw4r {
namespace g3d {
template <typename T>
class ResCommon {
T *mPtr;
template <typename TPtr>
inline const TPtr * ofs_to_ptr_raw(s32 ofs) const
{
return (const TPtr *)((u8 *)mPtr + ofs);
}
template <typename TPtr>
inline TPtr * ofs_to_ptr(s32 ofs)
{
if (ofs) return (TPtr *)((u8 *)mPtr + ofs);
return NULL;
}
template <typename TPtr>
inline const TPtr * ofs_to_ptr(s32 ofs) const
{
if (ofs) return (const TPtr *)((u8 *)mPtr + ofs);
return NULL;
}
template <typename TObj>
inline TObj ofs_to_obj(s32 ofs) const
{
if (ofs) return (u8 *)mPtr + ofs;
return NULL;
}
};
struct ResNameData
{
u32 mLength;
char mName[0x1C];
};
public:
inline ResCommon(void *vptr) : mPtr(static_cast<T *>(vptr)) {}
inline ResCommon(const void *vptr) : mPtr(static_cast<T *>(vptr)) {}
struct ResName
{
ResCommon<const ResNameData> mRes;
inline ResName(const void *vptr) : mRes(vptr) {}
inline T &ref() const {
return *mPtr;
}
inline T *ptr() const {
return mPtr;
}
inline bool IsValid() const {
return mPtr != NULL;
}
inline u32 GetLength() const
{
return mRes.ref().mLength;
}
inline const char * GetName() const
{
return mRes.ref().mName;
}
bool operator==(ResName) const;
};
template <typename TPtr>
inline const TPtr *ofs_to_ptr_raw(s32 ofs) const {
return (const TPtr *)((u8 *)mPtr + ofs);
}
namespace detail
{
typedef u8 CPCmd[6];
typedef u8 BPCmd[5];
inline void ResWrite_u8(u8 *res, u8 arg)
{
*res = arg;
}
template <typename TPtr>
inline TPtr *ofs_to_ptr(s32 ofs) {
if (ofs) {
return (TPtr *)((u8 *)mPtr + ofs);
}
inline void ResWrite_u16(u8 *res, u16 arg)
{
ResWrite_u8(res + 0, arg >> 8);
ResWrite_u8(res + 1, arg >> 0);
}
return NULL;
}
inline void ResWrite_u32(u8 *res, u32 arg)
{
ResWrite_u8(res + 0, arg >> 24);
ResWrite_u8(res + 1, arg >> 16);
ResWrite_u8(res + 2, arg >> 8);
ResWrite_u8(res + 3, arg >> 0);
}
template <typename TPtr>
inline const TPtr *ofs_to_ptr(s32 ofs) const {
if (ofs) {
return (const TPtr *)((u8 *)mPtr + ofs);
}
inline u8 ResRead_u8(const u8 *res)
{
return *res;
}
return NULL;
}
inline u32 ResRead_u32(const u8 *res)
{
int ret = ResRead_u8(res) << 24;
ret |= ResRead_u8(res + 1) << 16;
ret |= ResRead_u8(res + 2) << 8;
ret |= ResRead_u8(res + 3);
return ret;
}
inline void ResReadBPCmd(const u8 *res, u32 *out)
{
*out = ResRead_u32(res + 1);
}
inline void ResReadCPCmd(const u8 *res, u32 *out)
{
*out = ResRead_u32(res + 2);
}
void ResWriteBPCmd(u8 *, u32);
void ResWriteBPCmd(u8 *, u32, u32);
void ResWriteCPCmd(u8 *, u8, u32);
void ResWriteXFCmd(u8 *, u16, u32);
void ResWriteSSMask(u8 *, u32);
}
}
template <typename TObj>
inline TObj ofs_to_obj(s32 ofs) const {
if (ofs) {
return (u8 *)mPtr + ofs;
}
return NULL;
}
};
struct ResNameData {
u32 mLength;
char mName[0x1C];
};
struct ResName {
ResCommon<const ResNameData> mRes;
inline ResName(const void *vptr) : mRes(vptr) {}
inline u32 GetLength() const {
return mRes.ref().mLength;
}
inline const char *GetName() const {
return mRes.ref().mName;
}
bool operator==(ResName) const;
};
namespace detail {
typedef u8 CPCmd[6];
typedef u8 BPCmd[5];
inline void ResWrite_u8(u8 *res, u8 arg) {
*res = arg;
}
#endif
inline void ResWrite_u16(u8 *res, u16 arg) {
ResWrite_u8(res + 0, arg >> 8);
ResWrite_u8(res + 1, arg >> 0);
}
inline void ResWrite_u32(u8 *res, u32 arg) {
ResWrite_u8(res + 0, arg >> 24);
ResWrite_u8(res + 1, arg >> 16);
ResWrite_u8(res + 2, arg >> 8);
ResWrite_u8(res + 3, arg >> 0);
}
inline u8 ResRead_u8(const u8 *res) {
return *res;
}
inline u32 ResRead_u32(const u8 *res) {
int ret = ResRead_u8(res) << 24;
ret |= ResRead_u8(res + 1) << 16;
ret |= ResRead_u8(res + 2) << 8;
ret |= ResRead_u8(res + 3);
return ret;
}
inline void ResReadBPCmd(const u8 *res, u32 *out) {
*out = ResRead_u32(res + 1);
}
inline void ResReadCPCmd(const u8 *res, u32 *out) {
*out = ResRead_u32(res + 2);
}
void ResWriteBPCmd(u8 *, u32);
void ResWriteBPCmd(u8 *, u32, u32);
void ResWriteCPCmd(u8 *, u8, u32);
void ResWriteXFCmd(u8 *, u16, u32);
void ResWriteSSMask(u8 *, u32);
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
+45 -48
View File
@@ -1,57 +1,54 @@
#ifndef NW4R_G3D_RESDICT_H
#define NW4R_G3D_RESDICT_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_rescommon.h"
#include <string.h>
namespace nw4r
{
namespace g3d
{
struct ResDicEntry
{
u16 INT_0x0; // at 0x0
u16 INT_0x2; // at 0x2
u16 unk_index; // at 0x4
u16 unk_index2; // at 0x6
u32 INT_0x8; // at 0x8
u32 INT_0xC; // at 0xC
};
namespace nw4r {
namespace g3d {
struct ResDicEntry {
u16 INT_0x0; // at 0x0
u16 INT_0x2; // at 0x2
u16 unk_index; // at 0x4
u16 unk_index2; // at 0x6
u32 INT_0x8; // at 0x8
u32 INT_0xC; // at 0xC
};
struct ResDicData
{
u32 mSize; // at 0x0
u32 mNumData; // at 0x4
ResDicEntry mEntries[]; // 0x8
};
struct ResDicData {
u32 mSize; // at 0x0
u32 mNumData; // at 0x4
ResDicEntry mEntries[]; // 0x8
};
struct ResDic
{
ResCommon<ResDicData> mDict;
struct ResDic {
ResCommon<ResDicData> mDict;
ResDicEntry * Get(ResName) const;
ResDicEntry * Get(const char *, u32) const;
void * operator[](const char *) const;
void * operator[](ResName) const;
s32 GetIndex(ResName) const;
inline ResDic(void * vptr) : mDict(vptr) {}
inline void * operator[](int i) const
{
if (mDict.IsValid()) return (void *)mDict.ofs_to_ptr<void>(mDict.ref().mEntries[i + 1].INT_0xC);
return NULL;
}
inline u32 GetNumData() const
{
if (mDict.IsValid()) return mDict.ref().mNumData;
return 0;
}
};
}
}
ResDicEntry *Get(ResName) const;
ResDicEntry *Get(const char *, u32) const;
void *operator[](const char *) const;
void *operator[](ResName) const;
s32 GetIndex(ResName) const;
#endif
inline ResDic(void *vptr) : mDict(vptr) {}
inline void *operator[](int i) const {
if (mDict.IsValid()) {
return (void *)mDict.ofs_to_ptr<void>(mDict.ref().mEntries[i + 1].INT_0xC);
}
return NULL;
}
inline u32 GetNumData() const {
if (mDict.IsValid()) {
return mDict.ref().mNumData;
}
return 0;
}
};
} // namespace g3d
} // namespace nw4r
#endif
+81 -86
View File
@@ -1,92 +1,87 @@
#ifndef NW4R_G3D_RESFILE_H
#define NW4R_G3D_RESFILE_H
#include "ut_binaryFileFormat.h"
#include "common.h"
#include "g3d_rescommon.h"
#include "g3d_resdict.h"
#include "types_nw4r.h"
#include "ut_binaryFileFormat.h"
namespace nw4r
{
namespace g3d
{
struct ResFileData
{
ut::BinaryFileHeader mHeader; // at 0x0
ut::BinaryBlockHeader mRootHeader; // at 0x10
ResDicData mRootData; // at 0x18
};
struct ResFile
{
ResCommon<ResFileData> mFile; // at 0x0
inline ResFileData & ref() const
{
return mFile.ref();
}
ResMdl GetResMdl(const char *) const;
ResMdl GetResMdl(int) const;
ResMdl GetResMdl(u32) const; //inlined
ResPltt GetResPltt(const char *) const;
ResPltt GetResPltt(ResName) const;
ResPltt GetResPltt(int) const;
ResPltt GetResPltt(u32) const; //inlined
ResTex GetResTex(const char *) const;
ResTex GetResTex(ResName) const;
ResTex GetResTex(int) const;
ResTex GetResTex(u32) const; //inlined
ResAnmChr GetResAnmChr(const char *) const;
ResAnmChr GetResAnmChr(int) const;
ResAnmChr GetResAnmChr(u32) const; //inlined
ResAnmVis GetResAnmVis(const char *) const;
ResAnmVis GetResAnmVis(int) const;
ResAnmVis GetResAnmVis(u32) const; //inlined
ResAnmClr GetResAnmClr(const char *) const;
ResAnmClr GetResAnmClr(int) const;
ResAnmClr GetResAnmClr(u32) const; //inlined
ResAnmTexPat GetResAnmTexPat(const char *) const;
ResAnmTexPat GetResAnmTexPat(int) const;
ResAnmTexPat GetResAnmTexPat(u32) const; //inlined
ResAnmTexSrt GetResAnmTexSrt(const char *) const;
ResAnmTexSrt GetResAnmTexSrt(int) const;
ResAnmTexSrt GetResAnmTexSrt(u32) const; //inlined
ResAnmShp GetResAnmShp(const char *) const;
ResAnmShp GetResAnmShp(int) const;
ResAnmShp GetResAnmShp(u32) const; //inlined
ResAnmScn GetResAnmScn(const char *) const;
ResAnmScn GetResAnmScn(int) const;
ResAnmScn GetResAnmScn(u32) const; //inlined
u32 GetResMdlNumEntries() const; //inlined
u32 GetResPlttNumEntries() const; //inlined
u32 GetResTexNumEntries() const; //inlined
u32 GetResAnmChrNumEntries() const; //inlined
u32 GetResAnmVisNumEntries() const; //inlined
u32 GetResAnmClrNumEntries() const; //inlined
u32 GetResAnmTexPatNumEntries() const; //inlined
u32 GetResAnmTexSrtNumEntries() const; //inlined
u32 GetResAnmShpNumEntries() const; //inlined
u32 GetResAnmScnNumEntries() const;
bool Bind(ResFile);
void Release();
void Init();
void Terminate();
bool CheckRevision() const;
};
}
}
namespace nw4r {
namespace g3d {
#endif
struct ResFileData {
ut::BinaryFileHeader mHeader; // at 0x0
ut::BinaryBlockHeader mRootHeader; // at 0x10
ResDicData mRootData; // at 0x18
};
struct ResFile {
ResCommon<ResFileData> mFile; // at 0x0
inline ResFileData &ref() const {
return mFile.ref();
}
ResMdl GetResMdl(const char *) const;
ResMdl GetResMdl(int) const;
ResMdl GetResMdl(u32) const; // inlined
ResPltt GetResPltt(const char *) const;
ResPltt GetResPltt(ResName) const;
ResPltt GetResPltt(int) const;
ResPltt GetResPltt(u32) const; // inlined
ResTex GetResTex(const char *) const;
ResTex GetResTex(ResName) const;
ResTex GetResTex(int) const;
ResTex GetResTex(u32) const; // inlined
ResAnmChr GetResAnmChr(const char *) const;
ResAnmChr GetResAnmChr(int) const;
ResAnmChr GetResAnmChr(u32) const; // inlined
ResAnmVis GetResAnmVis(const char *) const;
ResAnmVis GetResAnmVis(int) const;
ResAnmVis GetResAnmVis(u32) const; // inlined
ResAnmClr GetResAnmClr(const char *) const;
ResAnmClr GetResAnmClr(int) const;
ResAnmClr GetResAnmClr(u32) const; // inlined
ResAnmTexPat GetResAnmTexPat(const char *) const;
ResAnmTexPat GetResAnmTexPat(int) const;
ResAnmTexPat GetResAnmTexPat(u32) const; // inlined
ResAnmTexSrt GetResAnmTexSrt(const char *) const;
ResAnmTexSrt GetResAnmTexSrt(int) const;
ResAnmTexSrt GetResAnmTexSrt(u32) const; // inlined
ResAnmShp GetResAnmShp(const char *) const;
ResAnmShp GetResAnmShp(int) const;
ResAnmShp GetResAnmShp(u32) const; // inlined
ResAnmScn GetResAnmScn(const char *) const;
ResAnmScn GetResAnmScn(int) const;
ResAnmScn GetResAnmScn(u32) const; // inlined
u32 GetResMdlNumEntries() const; // inlined
u32 GetResPlttNumEntries() const; // inlined
u32 GetResTexNumEntries() const; // inlined
u32 GetResAnmChrNumEntries() const; // inlined
u32 GetResAnmVisNumEntries() const; // inlined
u32 GetResAnmClrNumEntries() const; // inlined
u32 GetResAnmTexPatNumEntries() const; // inlined
u32 GetResAnmTexSrtNumEntries() const; // inlined
u32 GetResAnmShpNumEntries() const; // inlined
u32 GetResAnmScnNumEntries() const;
bool Bind(ResFile);
void Release();
void Init();
void Terminate();
bool CheckRevision() const;
};
} // namespace g3d
} // namespace nw4r
#endif
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef NW4R_G3D_RESMAT_H
#define NW4R_G3D_RESMAT_H
#include "common.h"
#include "g3d_rescommon.h"
#include "math_types.h"
#include "types_nw4r.h"
#include <rvl/GX.h>
+76 -83
View File
@@ -1,100 +1,93 @@
#ifndef NW4R_G3D_RESMDL_H
#define NW4R_G3D_RESMDL_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_rescommon.h"
#include "g3d_resnode.h"
#include "g3d_resdict.h"
#include "g3d_resnode.h"
namespace nw4r
{
namespace g3d
{
struct ResMdlData
{
char mMagic[4]; // "MDL0"
u32 INT_0x4;
u32 mRevision; // at 0x8
s32 INT_0xC;
u32 mByteCodeDictOfs; // at 0x10
u32 mNodeDictOfs; // at 0x14
u32 mVtxPosDictOfs; // at 0x18
u32 mVtxNrmDictOfs; // at 0x1C
u32 mVtxClrDictOfs; // at 0x20
u32 mVtxTexCoordDictOfs; // at 0x24
u32 mMatDictOfs; // at 0x28
u32 mTevDictOfs; // at 0x2C
u32 mShpDictOfs; // at 0x30
u32 mPlttTexInfoOfs; // at 0x34
};
namespace nw4r {
namespace g3d {
struct ResMdlData {
char mMagic[4]; // "MDL0"
u32 INT_0x4;
u32 mRevision; // at 0x8
s32 INT_0xC;
u32 mByteCodeDictOfs; // at 0x10
u32 mNodeDictOfs; // at 0x14
u32 mVtxPosDictOfs; // at 0x18
u32 mVtxNrmDictOfs; // at 0x1C
u32 mVtxClrDictOfs; // at 0x20
u32 mVtxTexCoordDictOfs; // at 0x24
u32 mMatDictOfs; // at 0x28
u32 mTevDictOfs; // at 0x2C
u32 mShpDictOfs; // at 0x30
u32 mPlttTexInfoOfs; // at 0x34
};
struct ResMdl
{
enum
{
REVISION = 9
};
ResCommon<ResMdlData> mMdl;
inline ResMdl(void * vptr) : mMdl(vptr) {}
bool IsValid() const { return mMdl.IsValid(); }
u8 * GetResByteCode(const char *) const;
struct ResMdl {
enum { REVISION = 9 };
ResNode GetResNode(const char *) const;
ResNode GetResNode(ResName) const;
ResNode GetResNode(int) const;
ResNode GetResNode(u32) const;
u32 GetResNodeNumEntries() const;
ResCommon<ResMdlData> mMdl;
ResVtxPos GetResVtxPos(ResName) const;
ResVtxPos GetResVtxPos(int) const;
ResVtxPos GetResVtxPos(u32) const;
u32 GetResVtxPosNumEntries() const;
inline ResMdl(void *vptr) : mMdl(vptr) {}
bool IsValid() const {
return mMdl.IsValid();
}
ResVtxNrm GetResVtxNrm(ResName) const;
ResVtxNrm GetResVtxNrm(int) const;
ResVtxNrm GetResVtxNrm(u32) const;
u32 GetResVtxNrmNumEntries() const;
u8 *GetResByteCode(const char *) const;
ResVtxClr GetResVtxClr(ResName) const;
ResVtxClr GetResVtxClr(int) const;
ResVtxClr GetResVtxClr(u32) const;
u32 GetResVtxClrNumEntries() const;
ResNode GetResNode(const char *) const;
ResNode GetResNode(ResName) const;
ResNode GetResNode(int) const;
ResNode GetResNode(u32) const;
u32 GetResNodeNumEntries() const;
ResVtxTexCoord GetResVtxTexCoord(int) const;
ResVtxPos GetResVtxPos(ResName) const;
ResVtxPos GetResVtxPos(int) const;
ResVtxPos GetResVtxPos(u32) const;
u32 GetResVtxPosNumEntries() const;
ResMat GetResMat(const char *) const;
ResMat GetResMat(ResName) const;
ResMat GetResMat(int) const;
ResMat GetResMat(u32) const;
u32 GetResMatNumEntries() const;
ResVtxNrm GetResVtxNrm(ResName) const;
ResVtxNrm GetResVtxNrm(int) const;
ResVtxNrm GetResVtxNrm(u32) const;
u32 GetResVtxNrmNumEntries() const;
ResShp GetResShp(const char *) const;
ResShp GetResShp(int) const;
ResShp GetResShp(u32) const;
u32 GetResShpNumEntries() const;
ResVtxClr GetResVtxClr(ResName) const;
ResVtxClr GetResVtxClr(int) const;
ResVtxClr GetResVtxClr(u32) const;
u32 GetResVtxClrNumEntries() const;
ResTexPlttInfo GetResTexPlttInfoOffsetFromTexName(int) const;
u32 GetResTexPlttInfoOffsetFromTexNameNumEntries() const;
ResVtxTexCoord GetResVtxTexCoord(int) const;
bool Bind(ResFile);
void Release();
void Init();
void Terminate();
inline bool CheckRevision() const
{
return mMdl.ref().mRevision == REVISION;
}
ResMat GetResMat(const char *) const;
ResMat GetResMat(ResName) const;
ResMat GetResMat(int) const;
ResMat GetResMat(u32) const;
u32 GetResMatNumEntries() const;
inline u32 GetResVtxTexCoordNumEntries() const
{
ResMdlData& ref = mMdl.ref();
return mMdl.ofs_to_obj<ResDic>(ref.mVtxTexCoordDictOfs).GetNumData();
}
};
}
}
ResShp GetResShp(const char *) const;
ResShp GetResShp(int) const;
ResShp GetResShp(u32) const;
u32 GetResShpNumEntries() const;
#endif
ResTexPlttInfo GetResTexPlttInfoOffsetFromTexName(int) const;
u32 GetResTexPlttInfoOffsetFromTexNameNumEntries() const;
bool Bind(ResFile);
void Release();
void Init();
void Terminate();
inline bool CheckRevision() const {
return mMdl.ref().mRevision == REVISION;
}
inline u32 GetResVtxTexCoordNumEntries() const {
ResMdlData &ref = mMdl.ref();
return mMdl.ofs_to_obj<ResDic>(ref.mVtxTexCoordDictOfs).GetNumData();
}
};
} // namespace g3d
} // namespace nw4r
#endif
+51 -57
View File
@@ -1,68 +1,62 @@
#ifndef NW4R_G3D_RESNODE_H
#define NW4R_G3D_RESNODE_H
#include "types_nw4r.h"
#include "g3d_rescommon.h"
#include "common.h"
#include "g3d_anmchr.h"
#include "g3d_rescommon.h"
#include "math_types.h"
namespace nw4r
{
namespace g3d
{
struct ResNodeData
{
u32 INT_0x0;
s32 INT_0x4;
u16 SHORT_0x8;
u16 SHORT_0xA;
UNKWORD WORD_0xC;
UNKWORD WORD_0x10;
u32 mFlags; // at 0x14
UNKWORD WORD_0x18;
UNKWORD WORD_0x1C;
math::VEC3 VEC3_0x20;
math::VEC3 VEC3_0x2C;
f32 FLOAT_0x38;
f32 FLOAT_0x3C;
f32 FLOAT_0x40;
// . . .
};
namespace nw4r {
namespace g3d {
struct ResNodeData {
u32 INT_0x0;
s32 INT_0x4;
u16 SHORT_0x8;
u16 SHORT_0xA;
UNKWORD WORD_0xC;
UNKWORD WORD_0x10;
u32 mFlags; // at 0x14
UNKWORD WORD_0x18;
UNKWORD WORD_0x1C;
math::VEC3 VEC3_0x20;
math::VEC3 VEC3_0x2C;
f32 FLOAT_0x38;
f32 FLOAT_0x3C;
f32 FLOAT_0x40;
// . . .
};
struct ResNode
{
enum ResNodeFlags
{
NODE_IS_VISIBLE = 0x100
};
struct ResNode {
enum ResNodeFlags { NODE_IS_VISIBLE = 0x100 };
ResCommon<ResNodeData> mNode;
ResCommon<ResNodeData> mNode;
inline ResNode(void * vptr) : mNode(vptr) {}
bool IsValid() const { return mNode.IsValid(); }
inline ResNode(void *vptr) : mNode(vptr) {}
UNKWORD GetID() const
{
if (IsValid())
return mNode.ptr()->WORD_0xC;
return 0;
}
void SetVisibility(bool visible)
{
if (IsValid())
{
if (visible)
mNode.ptr()->mFlags |= NODE_IS_VISIBLE;
else
mNode.ptr()->mFlags &= ~NODE_IS_VISIBLE;
}
}
void PatchChrAnmResult(ChrAnmResult *) const;
void CalcChrAnmResult(ChrAnmResult *) const;
};
bool IsValid() const {
return mNode.IsValid();
}
}
#endif
UNKWORD GetID() const {
if (IsValid()) {
return mNode.ptr()->WORD_0xC;
}
return 0;
}
void SetVisibility(bool visible) {
if (IsValid()) {
if (visible) {
mNode.ptr()->mFlags |= NODE_IS_VISIBLE;
} else {
mNode.ptr()->mFlags &= ~NODE_IS_VISIBLE;
}
}
}
void PatchChrAnmResult(ChrAnmResult *) const;
void CalcChrAnmResult(ChrAnmResult *) const;
};
} // namespace g3d
} // namespace nw4r
#endif
+102 -114
View File
@@ -1,122 +1,110 @@
#ifndef NW4R_G3D_RESSHP_H
#define NW4R_G3D_RESSHP_H
#include <GXAttr.h>
#include "types_nw4r.h"
#include "g3d_rescommon.h"
#include "g3d_resmdl.h"
#include "g3d_resvtx.h"
#include <GXAttr.h>#include "common.h"
namespace nw4r
{
namespace g3d
{
struct ResTagDLData
{
u32 mBufSize; // at 0x0
u32 mCmdSize; // at 0x4
u32 mOffset; // at 0x8
};
struct ResPrePrimDL
{
char UNK_0x0[0xA];
detail::CPCmd CP_CMD_0xA;
detail::CPCmd CP_CMD_0x10;
char UNK_0x16[0xA];
detail::CPCmd CP_CMD_0x20;
detail::CPCmd CP_CMD_0x26;
detail::CPCmd CP_CMD_0x2C;
detail::CPCmd CP_CMD_PAIRS_0x32[GX_POS_MTX_ARRAY - GX_VA_POS][2];
char UNK_0xC2[0x1E];
};
struct ResShpData
{
char UNK_0x0[0x4];
u32 mParentOffset; // at 0x4
char UNK_0x8[0x10];
ResTagDLData mPrePrimDLTag; // at 0x18
ResTagDLData mPrimDLTag; // at 0x24
char UNK_0x30[0x18];
s16 mVtxPosIndex; // at 0x48
s16 mVtxNrmIndex; // at 0x4a
s16 mVtxClrIndices[GX_VA_TEX0 - GX_VA_CLR0]; // at 0x4c
s16 mVtxTexCoordIndices[GX_POS_MTX_ARRAY - GX_VA_TEX0]; // at 0x50
};
struct ResTagDL
{
ResCommon<ResTagDLData> mData;
inline ResTagDL(void * vptr) : mData(vptr) {}
inline u8 * GetDL() const
{
return const_cast<u8 *>(mData.ofs_to_ptr<u8>(mData.ref().mOffset));
}
inline u32 GetBufSize() const
{
return mData.ref().mBufSize;
}
inline u32 GetCmdSize() const
{
return mData.ref().mCmdSize;
}
};
struct ResShpPrePrim
{
ResCommon<ResPrePrimDL> mDL;
inline ResShpPrePrim(void * vptr) : mDL(vptr) {}
inline ResPrePrimDL & ref() const
{
return mDL.ref();
}
};
struct ResShp
{
ResCommon<ResShpData> mShp;
inline ResShp(void * vptr) : mShp(vptr) {}
bool IsValid() const { return mShp.IsValid(); }
inline ResShpData & ref() const
{
return mShp.ref();
}
inline ResShpPrePrim GetResShpPrePrim() const
{
return ResTagDL(&ref().mPrePrimDLTag).GetDL();
}
bool GXGetVtxDescv(GXVtxDescList*) const;
bool GXGetVtxAttrFmtv(GXVtxAttrFmtList*) const;
ResMdl GetParent() const; //inlined
ResVtxPos GetResVtxPos() const;
ResVtxNrm GetResVtxNrm() const;
ResVtxClr GetResVtxClr(u32) const;
ResVtxTexCoord GetResVtxTexCoord(u32) const; //inlined
void GXSetArray(GXAttr, const void *, u8); //inlined
void Init();
void DisableSetArray(GXAttr); //inlined
void Terminate();
void CallPrePrimitiveDisplayList(bool, bool) const;
void CallPrimitiveDisplayList(bool) const;
};
}
}
namespace nw4r {
namespace g3d {
struct ResTagDLData {
u32 mBufSize; // at 0x0
u32 mCmdSize; // at 0x4
u32 mOffset; // at 0x8
};
#endif
struct ResPrePrimDL {
char UNK_0x0[0xA];
detail::CPCmd CP_CMD_0xA;
detail::CPCmd CP_CMD_0x10;
char UNK_0x16[0xA];
detail::CPCmd CP_CMD_0x20;
detail::CPCmd CP_CMD_0x26;
detail::CPCmd CP_CMD_0x2C;
detail::CPCmd CP_CMD_PAIRS_0x32[GX_POS_MTX_ARRAY - GX_VA_POS][2];
char UNK_0xC2[0x1E];
};
struct ResShpData {
char UNK_0x0[0x4];
u32 mParentOffset; // at 0x4
char UNK_0x8[0x10];
ResTagDLData mPrePrimDLTag; // at 0x18
ResTagDLData mPrimDLTag; // at 0x24
char UNK_0x30[0x18];
s16 mVtxPosIndex; // at 0x48
s16 mVtxNrmIndex; // at 0x4a
s16 mVtxClrIndices[GX_VA_TEX0 - GX_VA_CLR0]; // at 0x4c
s16 mVtxTexCoordIndices[GX_POS_MTX_ARRAY - GX_VA_TEX0]; // at 0x50
};
struct ResTagDL {
ResCommon<ResTagDLData> mData;
inline ResTagDL(void *vptr) : mData(vptr) {}
inline u8 *GetDL() const {
return const_cast<u8 *>(mData.ofs_to_ptr<u8>(mData.ref().mOffset));
}
inline u32 GetBufSize() const {
return mData.ref().mBufSize;
}
inline u32 GetCmdSize() const {
return mData.ref().mCmdSize;
}
};
struct ResShpPrePrim {
ResCommon<ResPrePrimDL> mDL;
inline ResShpPrePrim(void *vptr) : mDL(vptr) {}
inline ResPrePrimDL &ref() const {
return mDL.ref();
}
};
struct ResShp {
ResCommon<ResShpData> mShp;
inline ResShp(void *vptr) : mShp(vptr) {}
bool IsValid() const {
return mShp.IsValid();
}
inline ResShpData &ref() const {
return mShp.ref();
}
inline ResShpPrePrim GetResShpPrePrim() const {
return ResTagDL(&ref().mPrePrimDLTag).GetDL();
}
bool GXGetVtxDescv(GXVtxDescList *) const;
bool GXGetVtxAttrFmtv(GXVtxAttrFmtList *) const;
ResMdl GetParent() const; // inlined
ResVtxPos GetResVtxPos() const;
ResVtxNrm GetResVtxNrm() const;
ResVtxClr GetResVtxClr(u32) const;
ResVtxTexCoord GetResVtxTexCoord(u32) const; // inlined
void GXSetArray(GXAttr, const void *, u8); // inlined
void Init();
void DisableSetArray(GXAttr); // inlined
void Terminate();
void CallPrePrimitiveDisplayList(bool, bool) const;
void CallPrimitiveDisplayList(bool) const;
};
} // namespace g3d
} // namespace nw4r
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef NW4R_G3D_RESTEX_H
#define NW4R_G3D_RESTEX_H
#include "common.h"
#include "g3d_rescommon.h"
#include "types_nw4r.h"
#include <rvl/GX.h>
+31 -34
View File
@@ -1,42 +1,39 @@
#ifndef NW4R_G3D_SCN_MDL_H
#define NW4R_G3D_SCN_MDL_H
#include "types_nw4r.h"
#include "g3d_scnmdlsmpl.h"
#include "g3d_resmat.h"
#include "common.h"
#include "g3d_draw.h"
#include "g3d_resmat.h"
#include "g3d_scnmdlsmpl.h"
namespace nw4r
{
namespace g3d
{
class ScnMdl : public ScnMdlSimple
{
public:
class CopiedMatAccess
{
public:
CopiedMatAccess(ScnMdl *, u32);
ResTexSrt GetResTexSrtEx();
namespace nw4r {
namespace g3d {
class ScnMdl : public ScnMdlSimple {
public:
class CopiedMatAccess {
public:
CopiedMatAccess(ScnMdl *, u32);
ResTexSrt GetResTexSrtEx();
private:
char UNK_0x0[0x2C];
};
private:
char UNK_0x0[0x2C];
};
public:
static const G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
DrawResMdlReplacement * GetDrawResMdlReplacement() { return &mDrawMdlReplace; }
private:
char UNK_0x118[0x144 - 0x118];
DrawResMdlReplacement mDrawMdlReplace; // at 0x144
NW4R_G3D_TYPE_OBJ_DECL(ScnMdl);
};
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
}
#endif
DrawResMdlReplacement *GetDrawResMdlReplacement() {
return &mDrawMdlReplace;
}
private:
char UNK_0x118[0x144 - 0x118];
DrawResMdlReplacement mDrawMdlReplace; // at 0x144
NW4R_G3D_TYPE_OBJ_DECL(ScnMdl);
};
} // namespace g3d
} // namespace nw4r
#endif
+25 -25
View File
@@ -1,32 +1,32 @@
#ifndef NW4R_G3D_SCN_MDL1_MAT1_SHP_H
#define NW4R_G3D_SCN_MDL1_MAT1_SHP_H
#include "types_nw4r.h"
#include "g3d_scnobj.h"
#include "common.h"
#include "g3d_resmat.h"
#include "g3d_resshp.h"
#include "g3d_scnobj.h"
namespace nw4r
{
namespace g3d
{
class ScnMdl1Mat1Shp : public ScnLeaf
{
public:
static const G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
ResMat GetResMat() { return mResMat; }
ResShp GetResShp() { return mResShp; }
private:
ResMat mResMat; // at 0xE8
ResShp mResShp; // at 0xEC
NW4R_G3D_TYPE_OBJ_DECL(ScnMdl1Mat1Shp);
};
namespace nw4r {
namespace g3d {
class ScnMdl1Mat1Shp : public ScnLeaf {
public:
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
}
#endif
ResMat GetResMat() {
return mResMat;
}
ResShp GetResShp() {
return mResShp;
}
private:
ResMat mResMat; // at 0xE8
ResShp mResShp; // at 0xEC
NW4R_G3D_TYPE_OBJ_DECL(ScnMdl1Mat1Shp);
};
} // namespace g3d
} // namespace nw4r
#endif
+70 -66
View File
@@ -1,73 +1,77 @@
#ifndef NW4R_G3D_SCN_MDL_SIMPLE_H
#define NW4R_G3D_SCN_MDL_SIMPLE_H
#include "types_nw4r.h"
#include "g3d_scnobj.h"
#include "common.h"
#include "g3d_resmdl.h"
#include "g3d_scnobj.h"
namespace nw4r
{
namespace g3d
namespace nw4r {
namespace g3d {
class ScnMdlSimple : public ScnLeaf {
public:
enum ByteCodeType {
BYTE_CODE_CALC,
BYTE_CODE_MIX,
BYTE_CODE_DRAW_OPA,
BYTE_CODE_DRAW_XLU,
};
public:
ScnMdlSimple(MEMAllocator *, ResMdl, math::MTX34 *, u32 *, math::MTX34 *, math::MTX33 *, math::MTX34 *, int, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
class ScnMdlSimple : public ScnLeaf
{
public:
enum ByteCodeType
{
BYTE_CODE_CALC,
BYTE_CODE_MIX,
BYTE_CODE_DRAW_OPA,
BYTE_CODE_DRAW_XLU,
};
public:
ScnMdlSimple(MEMAllocator *, ResMdl, math::MTX34 *, u32 *,
math::MTX34 *, math::MTX33 *, math::MTX34 *, int, int);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: ScnLeaf::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnMdlSimple(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
const u8 * GetByteCode(ByteCodeType) const;
const ResMdl GetResMdl() const { return mResMdl; }
ResMdl GetResMdl() { return mResMdl; }
math::MTX34 * GetWldMtxArray() { return mWldMatrixArray; }
u32 * GetWldMtxAttribArray() { return mWldMtxAttribArray; }
u16 GetNumViewMtx() const { return mNumViewMtx; }
private:
ResMdl mResMdl; // at 0xE8
math::MTX34 *mWldMatrixArray; // at 0xEC
u32 *mWldMtxAttribArray; // at 0xF0
math::MTX34 *PTR_0xF4;
math::MTX33 *PTR_0xF8;
math::MTX34 *PTR_0xFC;
u8 BYTE_0x100;
u8 BYTE_0x101;
u16 mNumViewMtx; // at 0x102
UNKWORD WORD_0x104;
void *mByteCodeCalc; // at 0x108
void *mByteCodeMix; // at 0x10C
void *mByteCodeDrawOpa; // at 0x110
void *mByteCodeDrawXlu; // at 0x114
NW4R_G3D_TYPE_OBJ_DECL(ScnMdlSimple);
};
return (other == GetTypeObjStatic()) ? true : ScnLeaf::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnMdlSimple(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
}
#endif
const u8 *GetByteCode(ByteCodeType) const;
const ResMdl GetResMdl() const {
return mResMdl;
}
ResMdl GetResMdl() {
return mResMdl;
}
math::MTX34 *GetWldMtxArray() {
return mWldMatrixArray;
}
u32 *GetWldMtxAttribArray() {
return mWldMtxAttribArray;
}
u16 GetNumViewMtx() const {
return mNumViewMtx;
}
private:
ResMdl mResMdl; // at 0xE8
math::MTX34 *mWldMatrixArray; // at 0xEC
u32 *mWldMtxAttribArray; // at 0xF0
math::MTX34 *PTR_0xF4;
math::MTX33 *PTR_0xF8;
math::MTX34 *PTR_0xFC;
u8 BYTE_0x100;
u8 BYTE_0x101;
u16 mNumViewMtx; // at 0x102
UNKWORD WORD_0x104;
void *mByteCodeCalc; // at 0x108
void *mByteCodeMix; // at 0x10C
void *mByteCodeDrawOpa; // at 0x110
void *mByteCodeDrawXlu; // at 0x114
NW4R_G3D_TYPE_OBJ_DECL(ScnMdlSimple);
};
} // namespace g3d
} // namespace nw4r
#endif
+264 -326
View File
@@ -1,340 +1,278 @@
#ifndef NW4R_G3D_SCNOBJ_H
#define NW4R_G3D_SCNOBJ_H
#include "types_nw4r.h"
#include "math_types.h"
#include "math_geometry.h"
#include "common.h"
#include "g3d_obj.h"
#include "math_geometry.h"
#include "math_types.h"
namespace nw4r
{
namespace g3d
namespace nw4r {
namespace g3d {
namespace {
static inline u32 align4(u32 x) {
return x + 3 & ~3;
}
} // namespace
struct IScnObjGather {
virtual ~IScnObjGather();
virtual UNKWORD Add(ScnObj *, bool, bool) = 0;
};
class ScnObj : public G3dObj {
public:
enum ForEachResult { FOREACH_RESULT_0, FOREACH_RESULT_1 };
enum ScnObjFlag {
FLAG_1 = 0x1,
FLAG_2 = 0x2,
FLAG_4 = 0x4,
FLAG_8 = 0x8,
FLAG_10 = 0x10,
FLAG_20 = 0x20,
FLAG_40 = 0x40,
FLAG_80 = 0x80,
FLAG_10000000 = 0x10000000,
FLAG_20000000 = 0x20000000,
FLAG_40000000 = 0x40000000,
FLAG_80000000 = 0x80000000,
FLAG_60 = FLAG_40 | FLAG_20
};
enum ScnObjMtxType { MTX_TYPE_0, MTX_TYPE_WORLD, MTX_TYPE_VIEW, MTX_TYPE_MAX };
enum Timing { TIMING_1 = 0x1, TIMING_2 = 0x2, TIMING_4 = 0x4 };
enum ExecOp { EXEC_OP_1 = 0x1, EXEC_OP_2 = 0x2, EXEC_OP_4 = 0x4 };
enum ScnObjBoundingVolumeType { BOUNDING_0, BOUNDING_1, BOUNDING_MAX };
enum ScnObjOption { OPTION_VISIBLE = (1 << 0) };
typedef ForEachResult (*ForEachAction)(ScnObj *, void *);
public:
ScnObj(MEMAllocator *);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
namespace
{
static inline u32 align4(u32 x) { return x + 3 & ~3; }
return (other == GetTypeObjStatic()) ? true : G3dObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~ScnObj(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool) = 0; // at 0x1C
virtual bool SetScnObjOption(u32, u32); // at 0x20
virtual bool GetScnObjOption(u32, u32 *) const; // at 0x24
virtual f32 GetValueForSortOpa() const; // at 0x28
virtual f32 GetValueForSortXlu() const; // at 0x2C
virtual void CalcWorldMtx(const math::MTX34 *, u32 *); // at 0x30
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
void CalcViewMtx(const math::MTX34 *);
bool SetMtx(ScnObjMtxType, const math::MTX34 *);
bool GetMtx(ScnObjMtxType, math::MTX34 *) const;
void SetPriorityDrawOpa(int);
void SetPriorityDrawXlu(int);
void EnableScnObjCallbackTiming(Timing);
void EnableScnObjCallbackExecOp(ExecOp);
bool SetBoundingVolume(ScnObjBoundingVolumeType, const math::AABB *);
bool GetBoundingVolume(ScnObjBoundingVolumeType, math::AABB *) const;
const math::MTX34 *GetMtxPtr(ScnObjMtxType type) const {
return &mMatrices[type];
}
void SetScnObjFlag(ScnObjFlag f, u32 set) {
if (set) {
mFlags |= f;
} else {
mFlags &= ~f;
}
}
bool TestScnObjFlag(ScnObjFlag f) const {
return mFlags & f;
}
struct IScnObjGather
{
virtual ~IScnObjGather();
virtual UNKWORD Add(ScnObj *, bool, bool) = 0;
};
inline void CheckCallback_CALC_VIEW(Timing timing, u32 r5, void *r6);
inline void CheckCallback_CALC_MAT(Timing timing, u32 r5, void *r6);
inline void CheckCallback_CALC_WORLD(Timing timing, u32 r5, void *r6);
class ScnObj : public G3dObj
{
public:
enum ForEachResult
{
FOREACH_RESULT_0,
FOREACH_RESULT_1
};
enum ScnObjFlag
{
FLAG_1 = 0x1,
FLAG_2 = 0x2,
FLAG_4 = 0x4,
FLAG_8 = 0x8,
FLAG_10 = 0x10,
FLAG_20 = 0x20,
FLAG_40 = 0x40,
FLAG_80 = 0x80,
FLAG_10000000 = 0x10000000,
FLAG_20000000 = 0x20000000,
FLAG_40000000 = 0x40000000,
FLAG_80000000 = 0x80000000,
FLAG_60 = FLAG_40 | FLAG_20
};
enum ScnObjMtxType
{
MTX_TYPE_0,
MTX_TYPE_WORLD,
MTX_TYPE_VIEW,
MTX_TYPE_MAX
};
enum Timing
{
TIMING_1 = 0x1,
TIMING_2 = 0x2,
TIMING_4 = 0x4
};
enum ExecOp
{
EXEC_OP_1 = 0x1,
EXEC_OP_2 = 0x2,
EXEC_OP_4 = 0x4
};
enum ScnObjBoundingVolumeType
{
BOUNDING_0,
BOUNDING_1,
BOUNDING_MAX
};
enum ScnObjOption
{
OPTION_VISIBLE = (1 << 0)
};
typedef ForEachResult (* ForEachAction)(ScnObj *, void *);
public:
ScnObj(MEMAllocator *);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: G3dObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~ScnObj(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool) = 0; // at 0x1C
virtual bool SetScnObjOption(u32, u32); // at 0x20
virtual bool GetScnObjOption(u32, u32 *) const; // at 0x24
virtual f32 GetValueForSortOpa() const; // at 0x28
virtual f32 GetValueForSortXlu() const; // at 0x2C
virtual void CalcWorldMtx(const math::MTX34 *, u32 *); // at 0x30
static const G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
void CalcViewMtx(const math::MTX34 *);
bool SetMtx(ScnObjMtxType, const math::MTX34 *);
bool GetMtx(ScnObjMtxType, math::MTX34 *) const;
void SetPriorityDrawOpa(int);
void SetPriorityDrawXlu(int);
void EnableScnObjCallbackTiming(Timing);
void EnableScnObjCallbackExecOp(ExecOp);
bool SetBoundingVolume(ScnObjBoundingVolumeType, const math::AABB *);
bool GetBoundingVolume(ScnObjBoundingVolumeType, math::AABB *) const;
const math::MTX34 * GetMtxPtr(ScnObjMtxType type) const
{
return &mMatrices[type];
}
void SetScnObjFlag(ScnObjFlag f, u32 set)
{
if (set)
{
mFlags |= f;
}
else
{
mFlags &= ~f;
}
}
bool TestScnObjFlag(ScnObjFlag f) const
{
return mFlags & f;
}
inline void CheckCallback_CALC_VIEW(Timing timing, u32 r5, void *r6);
inline void CheckCallback_CALC_MAT(Timing timing, u32 r5, void *r6);
inline void CheckCallback_CALC_WORLD(Timing timing, u32 r5, void *r6);
bool IsG3dProcDisabled(u32 task) const
{
if ((task < 9) && (1 << (task - 1) & mFlags)) return true;
return false;
}
protected:
math::MTX34 mMatrices[MTX_TYPE_MAX]; // at 0xC
math::AABB mBounds[BOUNDING_MAX]; // at 0x9C
u32 mFlags; // at 0xCC
u8 mPriorityDrawOpa; // at 0xD0
u8 mPriorityDrawXlu; // at 0xD1
u8 BYTE_0xD2;
u8 BYTE_0xD3;
IScnObjCallback *mCallback; // at 0xD4
u8 mTiming; // at 0xD8
u8 BYTE_0xD9;
u16 mExecOp; // at 0xDA
NW4R_G3D_TYPE_OBJ_DECL(ScnObj);
};
struct IScnObjCallback
{
virtual ~IScnObjCallback() {} // at 0x8
virtual void ExecCallback_CALC_WORLD(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0xC
virtual void ExecCallback_CALC_MAT(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0x10
virtual void ExecCallback_CALC_VIEW(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0x14
};
// Is there a better way of resolving this dependency?
void ScnObj::CheckCallback_CALC_VIEW(Timing timing, u32 r5, void *r6)
{
if (mCallback != NULL)
{
if ((mExecOp & EXEC_OP_4) && (mTiming & timing))
{
mCallback->ExecCallback_CALC_VIEW(timing, this, r5, r6);
}
}
bool IsG3dProcDisabled(u32 task) const {
if ((task < 9) && (1 << (task - 1) & mFlags)) {
return true;
}
return false;
}
void ScnObj::CheckCallback_CALC_MAT(Timing timing, u32 r5, void *r6)
{
if (mCallback != NULL)
{
if ((mExecOp & EXEC_OP_2) && (mTiming & timing))
{
mCallback->ExecCallback_CALC_MAT(timing, this, r5, r6);
}
}
protected:
math::MTX34 mMatrices[MTX_TYPE_MAX]; // at 0xC
math::AABB mBounds[BOUNDING_MAX]; // at 0x9C
u32 mFlags; // at 0xCC
u8 mPriorityDrawOpa; // at 0xD0
u8 mPriorityDrawXlu; // at 0xD1
u8 BYTE_0xD2;
u8 BYTE_0xD3;
IScnObjCallback *mCallback; // at 0xD4
u8 mTiming; // at 0xD8
u8 BYTE_0xD9;
u16 mExecOp; // at 0xDA
NW4R_G3D_TYPE_OBJ_DECL(ScnObj);
};
struct IScnObjCallback {
virtual ~IScnObjCallback() {} // at 0x8
virtual void ExecCallback_CALC_WORLD(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0xC
virtual void ExecCallback_CALC_MAT(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0x10
virtual void ExecCallback_CALC_VIEW(ScnObj::Timing, ScnObj *, u32, void *) {} // at 0x14
};
// Is there a better way of resolving this dependency?
void ScnObj::CheckCallback_CALC_VIEW(Timing timing, u32 r5, void *r6) {
if (mCallback != NULL) {
if ((mExecOp & EXEC_OP_4) && (mTiming & timing)) {
mCallback->ExecCallback_CALC_VIEW(timing, this, r5, r6);
}
void ScnObj::CheckCallback_CALC_WORLD(Timing timing, u32 r5, void *r6)
{
if (mCallback != NULL)
{
if ((mExecOp & EXEC_OP_1) && (mTiming & timing))
{
mCallback->ExecCallback_CALC_WORLD(timing, this, r5, r6);
}
}
}
class ScnLeaf : public ScnObj
{
public:
// Unofficial name, however GetScaleProperty needs to return an enum to match
enum ScaleProperty
{
SCALE_PROPERTY_0,
SCALE_PROPERTY_1,
SCALE_PROPERTY_2,
};
public:
ScnLeaf(MEMAllocator *allocator) : ScnObj(allocator), mScale(1.0f, 1.0f, 1.0f) {}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: ScnObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~ScnLeaf() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool); // at 0x1C
virtual bool SetScnObjOption(u32, u32); // at 0x20
virtual bool GetScnObjOption(u32, u32 *) const; // at 0x24
virtual void CalcWorldMtx(const math::MTX34 *, u32 *); // at 0x30
static const G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
ScaleProperty GetScaleProperty() const;
void DefG3dProcScnLeaf(u32, u32, void *);
private:
math::VEC3 mScale;
NW4R_G3D_TYPE_OBJ_DECL(ScnLeaf);
};
class ScnGroup : public ScnObj
{
public:
ScnGroup(MEMAllocator *, ScnObj **, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true
: ScnObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnGroup(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool); // at 0x1C
virtual bool Insert(u32, ScnObj *); // at 0x34
virtual ScnObj * Remove(u32); // at 0x38
virtual bool Remove(ScnObj *); // at 0x3C
static const G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
bool Empty() const
{
return mSize == 0;
}
u32 Size() const
{
return mSize;
}
ScnObj * PopBack()
{
if (!Empty())
{
return Remove(Size() - 1);
}
return NULL;
}
void Clear()
{
while (!Empty())
{
PopBack();
}
}
void ScnGroup_G3DPROC_GATHER_SCNOBJ(u32, IScnObjGather *);
void ScnGroup_G3DPROC_CALC_WORLD(u32, const math::MTX34 *);
void ScnGroup_G3DPROC_CALC_MAT(u32, void *);
void ScnGroup_G3DPROC_CALC_VIEW(u32, const math::MTX34 *);
void DefG3dProcScnGroup(u32, u32, void *);
bool PushBack(ScnObj *);
ScnObj **mObjects; // at 0xDC
u32 mCapacity; // at 0xE0
u32 mSize; // at 0xE4
private:
NW4R_G3D_TYPE_OBJ_DECL(ScnGroup);
};
}
}
#endif
void ScnObj::CheckCallback_CALC_MAT(Timing timing, u32 r5, void *r6) {
if (mCallback != NULL) {
if ((mExecOp & EXEC_OP_2) && (mTiming & timing)) {
mCallback->ExecCallback_CALC_MAT(timing, this, r5, r6);
}
}
}
void ScnObj::CheckCallback_CALC_WORLD(Timing timing, u32 r5, void *r6) {
if (mCallback != NULL) {
if ((mExecOp & EXEC_OP_1) && (mTiming & timing)) {
mCallback->ExecCallback_CALC_WORLD(timing, this, r5, r6);
}
}
}
class ScnLeaf : public ScnObj {
public:
// Unofficial name, however GetScaleProperty needs to return an enum to match
enum ScaleProperty {
SCALE_PROPERTY_0,
SCALE_PROPERTY_1,
SCALE_PROPERTY_2,
};
public:
ScnLeaf(MEMAllocator *allocator) : ScnObj(allocator), mScale(1.0f, 1.0f, 1.0f) {}
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : ScnObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *) = 0; // at 0xC
virtual ~ScnLeaf() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool); // at 0x1C
virtual bool SetScnObjOption(u32, u32); // at 0x20
virtual bool GetScnObjOption(u32, u32 *) const; // at 0x24
virtual void CalcWorldMtx(const math::MTX34 *, u32 *); // at 0x30
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
ScaleProperty GetScaleProperty() const;
void DefG3dProcScnLeaf(u32, u32, void *);
private:
math::VEC3 mScale;
NW4R_G3D_TYPE_OBJ_DECL(ScnLeaf);
};
class ScnGroup : public ScnObj {
public:
ScnGroup(MEMAllocator *, ScnObj **, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic()) ? true : ScnObj::IsDerivedFrom(other);
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnGroup(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
virtual ForEachResult ForEach(ForEachAction, void *, bool); // at 0x1C
virtual bool Insert(u32, ScnObj *); // at 0x34
virtual ScnObj *Remove(u32); // at 0x38
virtual bool Remove(ScnObj *); // at 0x3C
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
bool Empty() const {
return mSize == 0;
}
u32 Size() const {
return mSize;
}
ScnObj *PopBack() {
if (!Empty()) {
return Remove(Size() - 1);
}
return NULL;
}
void Clear() {
while (!Empty()) {
PopBack();
}
}
void ScnGroup_G3DPROC_GATHER_SCNOBJ(u32, IScnObjGather *);
void ScnGroup_G3DPROC_CALC_WORLD(u32, const math::MTX34 *);
void ScnGroup_G3DPROC_CALC_MAT(u32, void *);
void ScnGroup_G3DPROC_CALC_VIEW(u32, const math::MTX34 *);
void DefG3dProcScnGroup(u32, u32, void *);
bool PushBack(ScnObj *);
ScnObj **mObjects; // at 0xDC
u32 mCapacity; // at 0xE0
u32 mSize; // at 0xE4
private:
NW4R_G3D_TYPE_OBJ_DECL(ScnGroup);
};
} // namespace g3d
} // namespace nw4r
#endif
+69 -71
View File
@@ -1,78 +1,76 @@
#ifndef NW4R_G3D_SCNPROC_H
#define NW4R_G3D_SCNPROC_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_scnobj.h"
namespace nw4r
{
namespace g3d
{
class ScnProc : public ScnLeaf
{
public:
typedef void (* DrawProc)(ScnProc *, bool opa);
namespace nw4r {
namespace g3d {
class ScnProc : public ScnLeaf {
public:
typedef void (*DrawProc)(ScnProc *, bool opa);
ScnProc(MEMAllocator *allocator, DrawProc proc, void *userdata, bool set1, bool set2)
: ScnLeaf(allocator), mFlags(0), mDrawProc(proc), mUserData(userdata)
{
if (set1) mFlags |= 0x1;
if (set2) mFlags |= 0x2;
}
static ScnProc * Construct(MEMAllocator *, u32 *, DrawProc, bool, bool, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return other == GetTypeObjStatic() ? true
: ScnLeaf::IsDerivedFrom(other);
};
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnProc() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
static const G3dObj::TypeObj GetTypeObjStatic() { return TypeObj(TYPE_NAME); }
void * GetUserData() { return mUserData; }
void SetUserData(void *data) { mUserData = data; }
void SetDrawProc(DrawProc proc, bool r5, bool r6)
{
mDrawProc = proc;
if (r5)
{
mFlags |= 0x1;
}
else
{
mFlags &= ~0x1;
}
if (r6)
{
mFlags |= 0x2;
}
else
{
mFlags &= ~0x2;
}
}
private:
u32 mFlags; // at 0xE8
DrawProc mDrawProc; // at 0xEC
void *mUserData; // at 0xF0
NW4R_G3D_TYPE_OBJ_DECL(ScnProc);
};
ScnProc(MEMAllocator *allocator, DrawProc proc, void *userdata, bool set1, bool set2)
: ScnLeaf(allocator), mFlags(0), mDrawProc(proc), mUserData(userdata) {
if (set1) {
mFlags |= 0x1;
}
if (set2) {
mFlags |= 0x2;
}
}
}
#endif
static ScnProc *Construct(MEMAllocator *, u32 *, DrawProc, bool, bool, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return other == GetTypeObjStatic() ? true : ScnLeaf::IsDerivedFrom(other);
};
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnProc() {} // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
static const G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
void *GetUserData() {
return mUserData;
}
void SetUserData(void *data) {
mUserData = data;
}
void SetDrawProc(DrawProc proc, bool r5, bool r6) {
mDrawProc = proc;
if (r5) {
mFlags |= 0x1;
} else {
mFlags &= ~0x1;
}
if (r6) {
mFlags |= 0x2;
} else {
mFlags &= ~0x2;
}
}
private:
u32 mFlags; // at 0xE8
DrawProc mDrawProc; // at 0xEC
void *mUserData; // at 0xF0
NW4R_G3D_TYPE_OBJ_DECL(ScnProc);
};
} // namespace g3d
} // namespace nw4r
#endif
+43 -48
View File
@@ -1,56 +1,51 @@
#ifndef NW4R_G3D_SCNRFL_H
#define NW4R_G3D_SCNRFL_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_scnleaf.h"
#include <RFL/RFL_Model.h>
#include <RFL/RFL_MiddleDatabase.h>
#include <RFL/RFL_Model.h>
namespace nw4r
{
namespace g3d
namespace nw4r {
namespace g3d {
class ScnRfl : public ScnLeaf {
public:
struct RflData {
bool SetupCharModel(RFLDataSource, u16, RFLMiddleDB *);
};
public:
static ScnRfl *Construct(MEMAllocator *, u32 *, RFLResolution, u32, u32);
ScnRfl(MEMAllocator *, ScnRfl *, RflData *, void *, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
class ScnRfl : public ScnLeaf
{
public:
struct RflData
{
bool SetupCharModel(RFLDataSource, u16, RFLMiddleDB *);
};
public:
static ScnRfl * Construct(MEMAllocator *, u32 *, RFLResolution, u32, u32);
ScnRfl(MEMAllocator *, ScnRfl *, RflData *, void *, u32);
virtual bool IsDerivedFrom(TypeObj other) const // at 0x8
{
return (other == GetTypeObjStatic());
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnRfl(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char * GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
bool GetExpression(RFLExpression *);
bool SetExpression(RFLExpression);
void SetFogIdx(int);
void SetLightSetIdx(int);
static const nw4r::g3d::G3dObj::TypeObj GetTypeObjStatic()
{
return TypeObj(TYPE_NAME);
}
private:
NW4R_G3D_TYPE_OBJ_DECL(ScnRfl);
};
return (other == GetTypeObjStatic());
}
virtual void G3dProc(u32, u32, void *); // at 0xC
virtual ~ScnRfl(); // at 0x10
virtual const TypeObj GetTypeObj() const // at 0x14
{
return TypeObj(TYPE_NAME);
}
virtual const char *GetTypeName() const // at 0x18
{
return GetTypeObj().GetTypeName();
}
}
#endif
bool GetExpression(RFLExpression *);
bool SetExpression(RFLExpression);
void SetFogIdx(int);
void SetLightSetIdx(int);
static const nw4r::g3d::G3dObj::TypeObj GetTypeObjStatic() {
return TypeObj(TYPE_NAME);
}
private:
NW4R_G3D_TYPE_OBJ_DECL(ScnRfl);
};
} // namespace g3d
} // namespace nw4r
#endif
+31 -32
View File
@@ -1,41 +1,40 @@
#ifndef NW4R_G3D_SCNROOT_H
#define NW4R_G3D_SCNROOT_H
#include "types_nw4r.h"
#include "g3d_scnobj.h"
#include "common.h"
#include "g3d_camera.h"
#include "g3d_fog.h"
#include "g3d_scnobj.h"
namespace nw4r
{
namespace g3d
{
class ScnRoot : public ScnGroup
{
public:
Camera GetCamera(int);
Camera GetCurrentCamera();
void SetCurrentCamera(int);
Fog GetFog(int);
namespace nw4r {
namespace g3d {
class ScnRoot : public ScnGroup {
public:
Camera GetCamera(int);
Camera GetCurrentCamera();
void SetCurrentCamera(int);
Fog GetFog(int);
void UpdateFrame();
void CalcWorld();
void CalcMaterial();
void CalcVtx();
void CalcView();
void GatherDrawScnObj();
void ZSort();
void DrawOpa();
void DrawXlu();
void UpdateFrame();
void CalcWorld();
void CalcMaterial();
void CalcVtx();
void CalcView();
void GatherDrawScnObj();
void ZSort();
void DrawOpa();
void DrawXlu();
u8 GetCurrentCameraID() const { return mCameraId; }
private:
UNKWORD WORD_0xE8;
UNKWORD WORD_0xEC;
UNKWORD WORD_0xF0;
u8 mCameraId;
};
u8 GetCurrentCameraID() const {
return mCameraId;
}
}
#endif
private:
UNKWORD WORD_0xE8;
UNKWORD WORD_0xEC;
UNKWORD WORD_0xF0;
u8 mCameraId;
};
} // namespace g3d
} // namespace nw4r
#endif
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef NW4R_G3D_STATE_H
#define NW4R_G3D_STATE_H
#include "types_nw4r.h"
#include "common.h"
#include <rvl/GX.h>
namespace nw4r {
+10 -17
View File
@@ -1,22 +1,15 @@
#ifndef NW4R_G3D_TMEM_H
#define NW4R_G3D_TMEM_H
#include "types_nw4r.h"
#include "common.h"
namespace nw4r
{
namespace g3d
{
namespace tmem
{
enum TMemLayout
{
TMEM_LAYOUT_0,
TMEM_LAYOUT_1
};
namespace nw4r {
namespace g3d {
namespace tmem {
enum TMemLayout { TMEM_LAYOUT_0, TMEM_LAYOUT_1 };
void SetTMemLayout(TMemLayout);
}
}
}
void SetTMemLayout(TMemLayout);
} // namespace tmem
} // namespace g3d
} // namespace nw4r
#endif
#endif
+16 -20
View File
@@ -1,26 +1,22 @@
#ifndef NW4R_G3D_WORKMEM_H
#define NW4R_G3D_WORKMEM_H
#include "types_nw4r.h"
#include "common.h"
#define G3D_WORKMEM_SIZE 0x18000
namespace nw4r
{
namespace g3d
{
namespace detail
{
namespace workmem
{
void * GetScaleTemporary();
void * GetMtxIDTemporary();
void * GetMdlZTemporary();
void * GetSkinningMtxTemporary();
void * GetBillboardMtxTemporary();
void * GetShpAnmResultBufTemporary();
}
}
}
}
namespace nw4r {
namespace g3d {
namespace detail {
namespace workmem {
void *GetScaleTemporary();
void *GetMtxIDTemporary();
void *GetMdlZTemporary();
void *GetSkinningMtxTemporary();
void *GetBillboardMtxTemporary();
void *GetShpAnmResultBufTemporary();
} // namespace workmem
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
#endif
+10 -14
View File
@@ -1,20 +1,16 @@
#ifndef NW4R_G3D_XSI_H
#define NW4R_G3D_XSI_H
#include "types_nw4r.h"
#include "common.h"
#include "g3d_anmtexsrt.h"
namespace nw4r
{
namespace g3d
{
namespace detail
{
namespace dcc
{
bool CalcTexMtx_Xsi(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
}
}
namespace nw4r {
namespace g3d {
namespace detail {
namespace dcc {
bool CalcTexMtx_Xsi(math::MTX34 *, bool, const TexSrt &, TexSrt::Flag);
}
} // namespace detail
} // namespace g3d
} // namespace nw4r
#endif
#endif
+139 -75
View File
@@ -1,82 +1,146 @@
#ifndef NW4R_LYT_ANIMATION_H
#define NW4R_LYT_ANIMATION_H
#include "types_nw4r.h"
#include "ut_LinkList.h"
#include "lyt_resourceAccessor.h"
#include "lyt_common.h"
#include "common.h"
#include <nw4r/lyt/lyt_common.h>
#include <nw4r/lyt/lyt_material.h>
#include <nw4r/lyt/lyt_pane.h>
#include <nw4r/lyt/lyt_resourceAccessor.h>
#include <nw4r/lyt/lyt_types.h>
#include <nw4r/ut/ut_LinkList.h>
namespace nw4r
{
namespace lyt
{
namespace res
{
struct AnimationBlock
{
};
}
namespace nw4r {
namespace lyt {
class AnimTransform {
public:
AnimTransform();
struct AnimationBlock
{
res::DataBlockHeader header; // at 0x0
u16 frameSize; // at 0x8
bool loop; // at 0xA
// . . .
};
u16 GetFrameSize() const;
bool IsLoopData() const;
virtual ~AnimTransform() = 0; // at 0x08
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor) = 0; // at 0x0C
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor, //
u16 animNum) = 0; // at 0x10
virtual void Bind(Pane *pPane, bool bRecursive, bool bDisable) = 0; // at 0x14
virtual void Bind(Material *pMaterial, bool bDisable) = 0; // at 0x18
virtual void Animate(u32 idx, Pane *pPane) = 0; // at 0x1C
virtual void Animate(u32 idx, Material *pMaterial) = 0; // at 0x20
struct AnimTransform
{
inline AnimTransform() : mNode(), mResource(NULL), mFrame(0.0f) {}
u16 GetFrameSize() const;
bool IsLoopData() const;
ut::LinkListNode mNode; // at 0x0
AnimationBlock *mResource; // at 0xC
f32 mFrame; // at 0x10
};
struct AnimTransformBasic : AnimTransform
{
AnimTransformBasic();
virtual ~AnimTransformBasic();
virtual UNKTYPE SetResource(const res::AnimationBlock *, ResourceAccessor *);
virtual UNKTYPE Bind(Pane *, bool);
virtual UNKTYPE Bind(Material *);
virtual UNKTYPE Animate(u32, Pane *);
virtual UNKTYPE Animate(u32, Material *);
u32 INT_0x14;
u32 INT_0x18;
u16 INT_0x1C;
};
struct AnimationLink
{
inline AnimationLink() : mNode()
{
Reset();
}
inline void Reset()
{
Set(NULL, 0, false);
}
inline void Set(AnimTransform *pTransform, u16 us, bool b)
{
mTransform = pTransform;
SHORT_0xC = us;
BOOL_0xE = b;
}
ut::LinkListNode mNode; // at 0x0
AnimTransform *mTransform; // at 0x8
u16 SHORT_0xC;
bool BOOL_0xE;
};
f32 GetFrameMax() const {
return mFrame; // TOOD
}
}
#endif
const res::AnimationBlock *GetAnimResource() const {
return mpRes;
}
f32 GetFrame() const {
return mFrame;
}
void SetFrame(f32 frame) {
mFrame = frame;
}
ut::LinkListNode mLink; // at 0x4
protected:
const res::AnimationBlock *mpRes; // at 0xC
f32 mFrame; // at 0x10
};
class AnimResource {
public:
AnimResource();
AnimResource(const void *anmResBuf) {
Set(anmResBuf);
}
void Set(const void *anmResBuf);
void Init();
u16 GetGroupNum() const;
const AnimationGroupRef *GetGroupArray() const;
bool IsDescendingBind() const;
u16 GetAnimationShareInfoNum() const;
const AnimationShareInfo *GetAnimationShareInfoArray() const;
u16 CalcAnimationNum(Pane *pPane, bool bRecursive) const;
u16 CalcAnimationNum(Group *pGroup, bool bRecursive) const;
const res::AnimationBlock *GetResourceBlock() const {
return mpResBlock;
}
const res::AnimationTagBlock *GetTagBlock() const {
return mpTagBlock;
}
const res::AnimationShareBlock *GetShareBlock() const {
return mpShareBlock;
}
private:
const res::BinaryFileHeader *mpFileHeader; // at 0x00
const res::AnimationBlock *mpResBlock; // at 0x04
const res::AnimationTagBlock *mpTagBlock; // at 0x08
const res::AnimationShareBlock *mpShareBlock; // at 0x0C
};
class AnimTransformBasic : public AnimTransform {
public:
AnimTransformBasic();
AnimationLink *FindUnbindLink(AnimationLink *pLink) const;
virtual ~AnimTransformBasic(); // at 0x08
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor); // at 0x0C
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor, u16 animNum); // at 0x10
virtual void Bind(Pane *pPane, bool bRecursive, bool bDisable); // at 0x14
virtual void Bind(Material *pMaterial, bool bDisable); // at 0x18
virtual void Animate(u32 idx, Pane *pPane); // at 0x1C
virtual void Animate(u32 idx, Material *pMaterial); // at 0x20
template <typename T>
AnimationLink *Bind(T *pTarget, AnimationLink *pAnimLink, u16 idx, bool bDisable);
AnimationLink *GetAnimLinkAry() const {
return mAnimLinkAry;
}
protected:
void **mpFileResAry; // at 0x14
AnimationLink *mAnimLinkAry; // at 0x18
u16 mAnimLinkNum; // at 0x1C
};
namespace detail {
class AnimPaneTree {
public:
AnimPaneTree(Pane *pTargetPane, const AnimResource &animRes) : mAnimRes() {
Init();
Set(pTargetPane, animRes);
}
bool IsEnabled() const {
// TODO
return false;
}
static u16 FindAnimContent(const res::AnimationBlock *pAnimBlock, const char *animContName, u8 animContType);
void Init();
void Set(Pane *pTargetPane, const AnimResource &animRes);
AnimTransform *Bind(Layout *pLayout, Pane *pTargetPane, ResourceAccessor *pResAccessor) const;
// Inline Names Guess
u16 GetLinkNum() const {
return mLinkNum;
}
private:
AnimResource mAnimRes; // at 0x00
u16 mAnimPaneIdx; // at 0x10
u16 mLinkNum; // at 0x12
u16 mAnimMatIdx[9]; // at 0x14
u8 mAnimMatCnt; // at 0x26
};
AnimationLink *FindAnimationLink(ut::LinkList<AnimationLink, 0> *pAnimList, AnimTransform *pAnimTrans);
AnimationLink *FindAnimationLink(ut::LinkList<AnimationLink, 0> *pAnimList, const AnimResource &animRes);
void UnbindAnimationLink(ut::LinkList<AnimationLink, 0> *pAnimList, AnimTransform *pAnimTrans);
void UnbindAnimationLink(ut::LinkList<AnimationLink, 0> *pAnimList, const AnimResource &animRes);
} // namespace detail
} // namespace lyt
} // namespace nw4r
#endif
+58 -32
View File
@@ -1,14 +1,15 @@
#ifndef NW4R_LYT_ARC_RESOURCE_ACCESSOR_H
#define NW4R_LYT_ARC_RESOURCE_ACCESSOR_H
#include "lyt_resourceAccessor.h"
#include "types_nw4r.h"
#include "ut_Font.h"
#include "ut_LinkList.h"
#include <rvl/ARC/arc.h>
#include "common.h"
#include "nw4r/lyt/lyt_resourceAccessor.h"
#include "nw4r/ut/ut_Font.h"
#include "nw4r/ut/ut_LinkList.h"
#include <rvl/ARC.h>
#include <string.h>
#define FONTNAMEBUF_MAX 127
#define FONTNAMEBUF_MAX 128
#define ROOTPATH_MAX 128
namespace nw4r {
namespace lyt {
@@ -17,7 +18,7 @@ public:
FontRefLink();
~FontRefLink() {}
void Set(const char *, ut::Font *);
void Set(const char *name, ut::Font *pFont);
ut::Font *GetFont() const {
return mFont;
@@ -33,37 +34,61 @@ private:
ut::Font *mFont; // at 0x88
};
class ArcResourceAccessor : public ResourceAccessor {
class ArcResourceLink {
public:
ArcResourceAccessor();
virtual ~ArcResourceAccessor() {} // at 0x8
virtual UNKTYPE *GetResource(u32, const char *, u32 *); // at 0xC
virtual ut::Font *GetFont(const char *); // at 0x10
bool Set(void *pFile, const char *name);
bool Attach(void *, const char *);
void *Detach() {
void *old = mArchive;
mArchive = NULL;
return old;
const char *GetResRootDir() const {
return mResRootDir;
}
bool IsAttached() const {
return (mArchive != NULL);
}
void RegistFont(FontRefLink *pLink) {
mRefList.PushBack(pLink);
}
void UnregistFont(FontRefLink *pLink) {
mRefList.Erase(pLink);
ARCHandle *GetArcHandle() {
return &mArcHandle;
}
private:
ARCHandle mHandle; // at 0x4
void *mArchive; // at 0x8
ut::LinkList<FontRefLink, 0> mRefList; // at 0x24
char mRootDir[FONTNAMEBUF_MAX]; // at 0x30
ut::LinkListNode mLink; // at 0x00
ARCHandle mArcHandle; // at 0x08
char mResRootDir[ROOTPATH_MAX]; // at 0x24
};
class ArcResourceAccessor : public ResourceAccessor {
public:
ArcResourceAccessor();
virtual ~ArcResourceAccessor() {} // at 0x8
virtual void *GetResource(u32, const char *, u32 *); // at 0xC
virtual ut::Font *GetFont(const char *); // at 0x10
bool Attach(void *pFile, const char *name);
void *Detach();
bool IsAttached() const {
return (mArcBuf != NULL);
}
void RegistFont(FontRefLink *pLink);
void UnregistFont(FontRefLink *pLink);
private:
ARCHandle mArcHandle; // at 0x4
void *mArcBuf; // at 0x8
ut::LinkList<FontRefLink, 0> mFontList; // at 0x24
char mResRootDir[ROOTPATH_MAX]; // at 0x30
};
class MultiArcResourceAccessor : ResourceAccessor {
public:
MultiArcResourceAccessor();
virtual ~MultiArcResourceAccessor(); // at 0x8
virtual void *GetResource(u32 resType, const char *name, u32 *pSize); // at 0xC
virtual ut::Font *GetFont(const char *); // at 0x10
void Attach(ArcResourceLink *pArcResource);
void RegistFont(FontRefLink *pLink);
ut::LinkList<ArcResourceLink, 0x0> mArcList; // at 0x4
ut::LinkList<FontRefLink, 0x0> mFontList; // at 0x10
};
namespace detail {
@@ -77,6 +102,7 @@ static ut::Font *FindFont(ut::LinkList<FontRefLink, 0> *pList, const char *name)
return NULL;
}
} // namespace detail
} // namespace lyt
} // namespace nw4r
+16 -31
View File
@@ -1,36 +1,21 @@
#ifndef NW4R_LYT_BOUNDING_H
#define NW4R_LYT_BOUNDING_H
#include "types_nw4r.h"
#include "lyt_pane.h"
#include "lyt_drawInfo.h"
#include "common.h"
#include "nw4r/lyt/lyt_drawInfo.h"
#include "nw4r/lyt/lyt_material.h"
#include "nw4r/lyt/lyt_pane.h"
namespace nw4r
{
namespace lyt
{
namespace res
{
struct Bounding : Pane
{
namespace nw4r {
namespace lyt {
};
}
class Bounding : public Pane {
public:
Bounding(const res::Bounding *pBlock, const ResBlockSet &);
virtual ~Bounding();
NW4R_UT_RTTI_DECL(Bounding);
virtual void DrawSelf(const DrawInfo &drawInfo);
};
} // namespace lyt
} // namespace nw4r
struct ResBlockSet
{
};
struct Bounding : Pane
{
Bounding(const res::Bounding *, const ResBlockSet&);
virtual ~Bounding();
virtual const ut::detail::RuntimeTypeInfo * GetRuntimeTypeInfo() const;
virtual void DrawSelf(const DrawInfo&);
static ut::detail::RuntimeTypeInfo typeInfo;
};
}
}
#endif
#endif
+92 -53
View File
@@ -1,60 +1,99 @@
#ifndef NW4R_LYT_COMMON_H
#define NW4R_LYT_COMMON_H
#include "types_nw4r.h"
#include "math_types.h"
#include "ut_binaryFileFormat.h"
#include "common.h"
#include "nw4r/math/math_types.h"
#include <nw4r/lyt/lyt_resources.h>
#include <nw4r/lyt/lyt_types.h>
#define NW4R_RES_NAME_SIZE 16
#define NW4R_MAT_NAME_SIZE 20
namespace nw4r {
namespace lyt {
#define TEXCOORD_VTX_COUNT 4
namespace detail {
namespace nw4r
{
namespace lyt
{
namespace res
{
struct BinaryFileHeader : ut::BinaryFileHeader
{
};
struct DataBlockHeader {
u32 kind; // at 0x0
u32 size; // at 0x4
};
}
namespace detail
{
typedef math::VEC2 TexCoordData[TEXCOORD_VTX_COUNT];
struct TexCoordAry
{
TexCoordAry();
void Free();
void Reserve(u8);
void SetSize(u8);
void Copy(const void *, u8);
u8 mCap; // at 0x0
u8 mSize; // at 0x1
TexCoordData *mTexCoords; // at 0x4
};
bool EqualsResName(const char *, const char *);
bool EqualsMaterialName(const char *, const char *);
bool TestFileHeader(const res::BinaryFileHeader&);
bool TestFileHeader(const res::BinaryFileHeader&, u32);
bool IsModulateVertexColor(ut::Color *, u8);
void MultipleAlpha(ut::Color *, const ut::Color *, u8); // Inlined
ut::Color MultipleAlpha(ut::Color, u8);
void SetVertexFormat(bool, u8);
void DrawQuad(const math::VEC2&, const Size&, u8, const TexCoordData *, const ut::Color *);
void DrawQuad(const math::VEC2&, const Size&, u8, const TexCoordData *, const ut::Color *, u8);
}
}
inline s32 GetSignatureInt(const char *sig) {
return *((s32 *)sig);
}
inline bool TestFileVersion(const res::BinaryFileHeader &fileHeader) {
u32 majorVer = (fileHeader.version >> 8) & 0xFF;
u32 minorVer = fileHeader.version & 0xFF;
bool ret = majorVer == 0 && (minorVer > 7 && minorVer <= 10);
return ret;
}
#endif
inline u8 GetVtxColorElement(const ut::Color *cols, u32 idx) {
return ((u8 *)cols)[(idx & ~3) + (idx & 3)];
}
inline void SetVtxColElement(ut::Color *cols, u32 idx, u8 value) {
((u8 *)cols)[(idx & ~3) + (idx & 3)] = value;
}
inline u8 GetHorizontalPosition(u8 var) {
return var % 3;
}
inline u8 GetVerticalPosition(u8 var) {
return var / 3;
}
inline void SetHorizontalPosition(u8 *pVar, u8 newVal) {
*pVar = newVal + GetVerticalPosition(*pVar) * 3;
}
inline void SetVerticalPosition(u8 *pVar, u8 newVal) {
*pVar = newVal * 3 + GetHorizontalPosition(*pVar);
}
inline const char *GetStrTableStr(const void *pStrTable, int index) {
const u32 *offsets = (u32 *)pStrTable;
const char *stringPool = (char *)pStrTable;
return &stringPool[offsets[index]];
}
typedef math::VEC2 TexCoordData[TEXCOORD_VTX_COUNT];
class TexCoordAry {
public:
TexCoordAry();
void Free();
void Reserve(u8);
void SetSize(u8);
void Copy(const void *, u8);
bool IsEmpty() const {
return mCap == 0;
}
u8 GetSize() const {
return mNum;
}
TexCoordData *GetArray() const {
return mpData;
}
private:
u8 mCap; // at 0x0
u8 mNum; // at 0x1
TexCoordData *mpData; // at 0x4
};
bool EqualsResName(const char *, const char *);
bool EqualsMaterialName(const char *, const char *);
bool TestFileHeader(const res::BinaryFileHeader &);
bool TestFileHeader(const res::BinaryFileHeader &, u32);
bool IsModulateVertexColor(ut::Color *, u8);
void MultipleAlpha(ut::Color *, const ut::Color *, u8); // Inlined
ut::Color MultipleAlpha(ut::Color, u8);
void SetVertexFormat(bool, u8);
void DrawQuad(const math::VEC2 &, const Size &, u8, const TexCoordData *, const ut::Color *);
void DrawQuad(const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords,
const ut::Color *vtxColors, u8 alpha);
void DrawLine(const math::VEC2 &pos, const Size &size, ut::Color color);
} // namespace detail
struct ResBlockSet {
const res::TextureList *pTextureList; // at 0x00
const res::FontList *pFontList; // at 0x04
const res::MaterialList *pMaterialList; // at 0x08
ResourceAccessor *pResAccessor; // at 0x0C
};
} // namespace lyt
} // namespace nw4r
#endif
+93 -20
View File
@@ -1,25 +1,98 @@
#ifndef NW4R_LYT_DRAWINFO_H
#define NW4R_LYT_DRAWINFO_H
#include "types_nw4r.h"
#include "math_types.h"
#include "ut_Rect.h"
#include "common.h"
#include "nw4r/math/math_types.h"
#include "nw4r/ut/ut_Rect.h"
#include <nw4r/lyt/lyt_types.h>
namespace nw4r {
namespace lyt {
struct DrawInfo {
virtual ~DrawInfo();
DrawInfo();
namespace nw4r
{
namespace lyt
{
struct DrawInfo
{
virtual ~DrawInfo();
DrawInfo();
math::MTX34 mViewMtx; // at 0x0
ut::Rect mViewRect; // at 0x34
math::VEC2 mScale; // at 0x44
f32 mGlobalAlpha; // at 0x48
u8 mFlags; // at 0x50
};
bool isYAxisUp() const {
// NYI
return false;
}
// field accessors
const math::VEC2 &GetLocationAdjustScale() const {
return mScale;
}
void SetLocationAdjustScale(const math::VEC2 &scale) {
this->mScale = scale;
}
}
#endif
const math::MTX34 &GetViewMtx() const {
return mViewMtx;
}
void SetViewMtx(const math::MTX34 &value) {
this->mViewMtx = value;
}
f32 GetGlobalAlpha() const {
return mGlobalAlpha;
}
void SetGlobalAlpha(f32 alpha) {
this->mGlobalAlpha = alpha;
}
const ut::Rect &GetViewRect() const {
return this->mViewRect;
}
void SetViewRect(const ut::Rect &value) {
this->mViewRect = value;
}
// mFlags accessors
bool IsInvisiblePaneCalculateMtx() const {
return mFlags.invisiblePaneCalculateMtx;
}
void SetInvisiblePaneCalculateMtx(bool bEnable) {
this->mFlags.invisiblePaneCalculateMtx = bEnable;
}
bool IsLocationAdjust() const {
return mFlags.locationAdjust;
}
void SetLocationAdjust(bool bEnable) {
this->mFlags.locationAdjust = bEnable;
}
bool IsMultipleViewMtxOnDraw() const {
return mFlags.mulViewDraw;
}
void SetMultipleViewMtxOnDraw(bool bEnable) {
this->mFlags.mulViewDraw = bEnable;
}
bool IsInfluencedAlpha() const {
return mFlags.influencedAlpha;
}
void SetInfluencedAlpha(bool bEnable) {
this->mFlags.influencedAlpha = bEnable;
}
bool IsDebugDrawMode() const {
return mFlags.debugDrawMode;
}
void SetDebugDrawMode(bool bEnable) {
this->mFlags.debugDrawMode = bEnable;
}
private:
math::MTX34 mViewMtx; // at 0x0
ut::Rect mViewRect; // at 0x34
math::VEC2 mScale; // at 0x44
f32 mGlobalAlpha; // at 0x48
struct {
u8 mulViewDraw : 1;
u8 influencedAlpha : 1;
u8 locationAdjust : 1;
u8 invisiblePaneCalculateMtx : 1;
u8 debugDrawMode : 1;
} mFlags; // at 0x50
};
} // namespace lyt
} // namespace nw4r
#endif
+45 -46
View File
@@ -1,55 +1,54 @@
#ifndef NW4R_LYT_GROUP_H
#define NW4R_LYT_GROUP_H
#include "types_nw4r.h"
#include "lyt_pane.h"
#include "lyt_common.h"
#include "ut_LinkList.h"
#include "common.h"
#include "nw4r/lyt/lyt_common.h"
#include "nw4r/lyt/lyt_pane.h"
#include "nw4r/ut/ut_LinkList.h"
namespace nw4r
{
namespace lyt
{
namespace res
{
struct Group
{
char UNK_0x0[0x8];
char mName[NW4R_RES_NAME_SIZE]; // at 0x8
u16 SHORT_0x18;
};
}
namespace nw4r {
namespace lyt {
namespace detail
{
struct PaneLink
{
ut::LinkListNode mNode; // at 0x0
Pane *PANE_0x8;
};
}
namespace detail {
struct PaneLink {
ut::LinkListNode mLink; // at 0x0
Pane *mTarget; // at 0x08
};
} // namespace detail
struct Group
{
Group(const res::Group *, Pane *);
virtual ~Group();
void AppendPane(Pane *);
void Init();
class Group {
public:
Group(const res::Group *pResGroup, Pane *pRootPane);
ut::LinkListNode mNode; // at 0x4
ut::LinkList<detail::PaneLink, 0> mPaneList; // at 0xC
char mName[NW4R_RES_NAME_SIZE]; // at 0x18
bool mIsUserAllocated; // at 0x29
};
virtual ~Group();
void AppendPane(Pane *pPane);
void Init();
struct GroupContainer
{
~GroupContainer();
void AppendGroup(Group *);
Group * FindGroupByName(const char *);
ut::LinkList<Group, 4> mGroups; // at 0x4
};
ut::LinkList<detail::PaneLink, 0> *GetPaneList() {
return &mPaneListLink;
}
bool IsUserAllocated() const {
return mbUserAllocated;
}
const char *GetName() const {
return mName;
}
}
#endif
private:
ut::LinkListNode mLink; // at 0x04
ut::LinkList<detail::PaneLink, 0> mPaneListLink; // at 0x0C
char mName[NW4R_RES_NAME_SIZE + 1]; // at 0x18
bool mbUserAllocated; // at 0x29
u8 mPadding[2]; // at 0x2A
};
struct GroupContainer {
~GroupContainer();
void AppendGroup(Group *pGroup);
Group *FindGroupByName(const char *findName);
ut::LinkList<Group, 4> mGroupList; // at 0x4
};
} // namespace lyt
} // namespace nw4r
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef NW4R_LYT_INIT_H
#define NW4R_LYT_INIT_H
namespace nw4r {
namespace lyt {
void LytInit();
}
} // namespace nw4r
#endif
+92 -12
View File
@@ -1,14 +1,56 @@
#ifndef NW4R_LYT_LAYOUT_H
#define NW4R_LYT_LAYOUT_H
#include "types_nw4r.h"
#include <new>
#include "common.h"
#include <new.h>
#include <nw4r/lyt/lyt_animation.h>
#include <nw4r/lyt/lyt_material.h>
#include <nw4r/lyt/lyt_types.h>
#include <nw4r/ut/ut_ResFont.h>
#include <rvl/MEM/mem_allocator.h>
namespace nw4r {
namespace lyt {
struct Layout {
// TO-DO: Class members
namespace res {
struct Layout {
DataBlockHeader blockheader; // at 0x00
u8 originType; // at 0x08
u8 padding[3]; // at 0x09
Size layoutSize; // at 0x0C
};
} // namespace res
class Layout {
public:
ut::Rect GetLayoutRect() const;
static Pane *BuildPaneObj(s32 kind, const void *dataPtr, const ResBlockSet &ResBlockSet);
Layout();
virtual ~Layout(); // at 0x08
virtual bool Build(const void *lytResBuf, ResourceAccessor *pResAcsr); // at 0x0C
virtual AnimTransform *CreateAnimTransform(); // at 0x10
virtual AnimTransform *CreateAnimTransform(const void *animResBuf, ResourceAccessor *pResAcsr); // at 0x14
virtual AnimTransform *CreateAnimTransform(const AnimResource &animRes, ResourceAccessor *pResAcsr); // at 0x18
virtual void BindAnimation(AnimTransform *pAnimTrans); // at 0x1C
virtual void UnbindAnimation(AnimTransform *pAnimTrans); // at 0x20
virtual void UnbindAllAnimation(); // at 0x24
virtual bool BindAnimationAuto(const AnimResource &animRes, ResourceAccessor *pResAcsr); // at 0x28
virtual void SetAnimationEnable(AnimTransform *pAnimTrans, bool bEnable); // at 0x2C
virtual void CalculateMtx(const DrawInfo &drawInfo); // at 0x30
virtual void Draw(const DrawInfo &drawInfo); // at 0x34
virtual void Animate(u32 option); // at 0x38
virtual void SetTagProcessor(ut::TagProcessorBase<wchar_t> *pTagProcessor); // at 0x3C
private:
ut::LinkList<AnimTransform, 4> mAnimTransList; // at 0x04
Pane *mpRootPane; // at 0x10
GroupContainer *mpGroupContainer; // at 0x14
Size mLayoutSize; // at 0x18
public:
// STATICS
static void FreeMemory(void *p) {
MEMFreeToAllocator(mspAllocator, p);
}
@@ -19,16 +61,21 @@ struct Layout {
template <typename T>
static void DeleteArray(T *p, size_t n) {
for (size_t i = 0; i < n; i++) {
p[i].~T();
}
if (p) {
for (size_t i = 0; i < n; i++) {
p[i].~T();
}
FreeMemory(p);
FreeMemory(p);
}
}
template <typename T>
static T *NewArray(size_t n) {
T *array = (T *)AllocMemory(n * sizeof(T));
if (!array) {
return nullptr;
}
for (size_t i = 0; i < n; i++) {
new (&array[i]) T();
@@ -39,14 +86,47 @@ struct Layout {
template <typename T>
static void DeleteObj(T *t) {
t->~T();
FreeMemory(t);
if (t) {
t->~T();
FreeMemory(t);
}
}
template <typename T>
static void DeletePrimArray(T *objAry) {
if (objAry) {
FreeMemory(objAry);
}
}
template <typename T>
static T *NewObj() {
T *obj = (T *)AllocMemory(sizeof(T));
return new (obj) T();
T *pMem = (T *)AllocMemory(sizeof(T));
if (pMem) {
return new (pMem) T();
} else {
return nullptr;
}
}
template <typename T, typename P1>
static T *NewObj(P1 param1) {
T *pMem = (T *)AllocMemory(sizeof(T));
if (pMem) {
return new (pMem) T(param1);
} else {
return nullptr;
}
}
template <typename T, typename P1, typename P2>
static T *NewObj(P1 param1, P2 param2) {
T *pMem = (T *)AllocMemory(sizeof(T));
if (pMem) {
return new (pMem) T(param1, param2);
} else {
return nullptr;
}
}
static MEMAllocator *mspAllocator;
+206 -15
View File
@@ -1,25 +1,216 @@
#ifndef NW4R_LYT_MATERIAL_H
#define NW4R_LYT_MATERIAL_H
#include "lyt_animation.h"
#include "ut_LinkList.h"
#include "nw4r/lyt/lyt_animation.h"
#include "nw4r/ut/ut_LinkList.h"
#include <nw4r/lyt/lyt_resources.h>
#include <nw4r/lyt/lyt_texMap.h>
#include <nw4r/ut/ut_Color.h>
#include <rvl/GX.h>
namespace nw4r {
namespace lyt {
// TO-DO
struct Material {
ut::LinkList<AnimationLink, 0> mAnimLinks; // at 0x4
// . . .
GXColorS10 COLOR_0x10;
GXColorS10 COLOR_0x18;
GXColorS10 COLOR_0x20;
// . . .
UNKWORD WORD_0x40;
// . . .
u8 BYTE_0x59;
// . . .
class Material {
public:
Material();
Material(const res::Material *pRes, const ResBlockSet &resBlockSet);
void Init();
static void InitBitGXNums(detail::BitGXNums *ptr);
void ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, u8 indStageNum,
u8 indSRTNum, bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode);
const TexMap *GetTexMapAry() const;
TexMap *GetTexMapAry();
const TexSRT *GetTexSRTAry() const;
TexSRT *GetTexSRTAry();
const TexCoordGen *GetTexCoordGenAry() const;
TexCoordGen *GetTexCoordGenAry();
const ChanCtrl *GetChanCtrlAry() const;
ChanCtrl *GetChanCtrlAry();
const ut::Color *GetMatColAry() const;
ut::Color *GetMatColAry();
const TevSwapMode *GetTevSwapAry() const;
TevSwapMode *GetTevSwapAry();
const AlphaCompare *GetAlphaComparePtr() const;
AlphaCompare *GetAlphaComparePtr();
const BlendMode *GetBlendModePtr() const;
BlendMode *GetBlendModePtr();
const IndirectStage *GetIndirectStageAry() const;
IndirectStage *GetIndirectStageAry();
const TexSRT *GetIndTexSRTAry() const;
TexSRT *GetIndTexSRTAry();
const TevStage *GetTevStageAry() const;
TevStage *GetTevStageAry();
void SetName(const char *name);
void SetTextureNum(u8 val);
void SetTexCoordGenNum(u8 val);
void SetTevStageNum(u8 val);
void SetIndStageNum(u8 val);
s16 GetColorElement(u32 colorType);
void SetColorElement(u32 colorType, s16 value);
void AddAnimationLink(AnimationLink *pAnimationLink);
// IsBlendModeCap__Q34nw4r3lyt8MaterialCFv
bool IsBlendModeCap() const {
return mGXMemCap.blendMode;
}
// IsAlphaCompareCap__Q34nw4r3lyt8MaterialCFv
bool IsAlphaCompareCap() const {
return mGXMemCap.alpComp;
}
// IsTevSwapCap__Q34nw4r3lyt8MaterialCFv
bool IsTevSwapCap() const {
return mGXMemCap.tevSwap;
}
// IsMatColorCap__Q34nw4r3lyt8MaterialCFv
bool IsMatColorCap() const {
return mGXMemCap.matCol;
}
// IsChanCtrlCap__Q34nw4r3lyt8MaterialCFv
bool IsChanCtrlCap() const {
return mGXMemCap.chanCtrl;
}
// SetTexSRTElement__Q34nw4r3lyt8MaterialFUlUlf
void SetTexSRTElement(u32 texSRTIdx, u32 eleIdx, f32 value) {
f32 *srtAry = (f32 *)&(GetTexSRTAry()[texSRTIdx]);
srtAry[eleIdx] = value;
}
// GetTexturePtr__Q34nw4r3lyt8MaterialFUc
TexMap *GetTexturePtr(u8 idx) {
return &GetTexMapAry()[idx];
}
// GetTexSRTCap__Q34nw4r3lyt8MaterialCFv
u8 GetTexSRTCap() const {
return mGXMemCap.texSRT;
}
// GetIndTexSRTCap__Q34nw4r3lyt8MaterialCFv
u8 GetIndTexSRTCap() const {
return mGXMemCap.indSRT;
}
// SetIndTexSRTElement__Q34nw4r3lyt8MaterialFUlUlf
void SetIndTexSRTElement(u32 texSRTIdx, u32 eleIdx, f32 value) {
f32 *srtAry = (f32 *)&(GetIndTexSRTAry()[texSRTIdx]);
srtAry[eleIdx] = value;
}
ut::LinkList<AnimationLink, 0> *GetAnimationList() {
return &mAnimList;
}
bool IsUserAllocated() const {
return mbUserAllocated;
}
const char *GetName() const {
return mName;
}
u8 GetTexCoordGenCap() const {
return mGXMemCap.texCoordGen;
}
u8 GetTexCoordGenNum() const {
return mGXMemNum.texCoordGen;
}
u8 GetTextureCap() const {
return mGXMemCap.texMap;
}
u8 GetTextureNum() const {
return mGXMemNum.texMap;
}
GXColorS10 GetTevColor(u32 idx) const {
return mTevCols[idx];
}
ut::Color GetTevKColor(u32 idx) const {
return mTevKCols[idx];
}
void SetTexture(u32 texMapIdx, const TexMap &texMap) {
GetTexMapAry()[texMapIdx] = texMap;
}
void SetTexCoordGen(u32 idx, TexCoordGen value) {
GetTexCoordGenAry()[idx] = value;
}
// Begin Functions not found in DWARF, but assumed from BBA map and required for weak func ordering
void SetTevColor(u32 idx, const GXColorS10 &color) {
mTevCols[idx] = color;
}
void SetAlphaCompare(const AlphaCompare &alphaComp) {
*GetAlphaComparePtr() = alphaComp;
}
void SetChanControl(u32 idx, const ChanCtrl &chanCtrl) {
GetChanCtrlAry()[idx] = chanCtrl;
}
void SetTevKColor(u32 idx, const ut::Color &color) {
mTevKCols[idx] = color;
}
void SetTevSwapMode(u32 idx, const TevSwapMode &tevSwapMode) {
GetTevSwapAry()[idx] = tevSwapMode;
}
void SetTexSRT(u32 idx, const TexSRT &texSRT) {
GetTexSRTAry()[idx] = texSRT;
}
void SetIndirectStage(u32 idx, const IndirectStage &indStage) {
GetIndirectStageAry()[idx] = indStage;
}
void SetBlendMode(const BlendMode &blendMode) {
*GetBlendModePtr() = blendMode;
}
void SetTevStage(u32 idx, const TevStage &tevStage) {
GetTevStageAry()[idx] = tevStage;
}
// End Functions not found in DWARF, but assumed from BBA map and required for weak func ordering
virtual ~Material(); // at 0x08
virtual bool SetupGX(bool bModVtxCol, u8 alpha); // at 0x0C
virtual void BindAnimation(AnimTransform *pAnimTrans); // at 0x10
virtual void UnbindAnimation(AnimTransform *pAnimTrans); // at 0x14
virtual void UnbindAllAnimation(); // at 0x18
virtual void Animate(); // at 0x1C
virtual AnimationLink *FindAnimationLink(AnimTransform *pAnimTrans); // at 0x20
virtual AnimationLink *FindAnimationLink(const AnimResource &animRes); // at 0x24
virtual void SetAnimationEnable(AnimTransform *pAnimTrans, bool bEnable); // at 0x28
virtual void SetAnimationEnable(const AnimResource &animRes, bool bEnable); // at 0x2C
private:
ut::LinkList<AnimationLink, 0> mAnimList; // at 0x4
GXColorS10 mTevCols[3]; // at 0x10
ut::Color mTevKCols[4]; // at 0x28
detail::BitGXNums mGXMemCap; // at 0x38
detail::BitGXNums mGXMemNum; // at 0x3C
void *mpGXMem; // at 0x40
char mName[MATERIAL_NAME_SIZE + 1]; // at 0x44
bool mbUserAllocated; // at 0x59
u8 mPadding[2]; // at 0x5A
};
namespace detail {
Size GetTextureSize(Material *pMaterial, u8 texMapIdx);
} // namespace detail
} // namespace lyt
} // namespace nw4r
+158 -148
View File
@@ -1,157 +1,167 @@
#ifndef NW4R_LYT_PANE_H
#define NW4R_LYT_PANE_H
#include "types_nw4r.h"
#include "math_types.h"
#include "ut_LinkList.h"
#include "ut_RuntimeTypeInfo.h"
#include "ut_Color.h"
#include "ut_algorithm.h"
#include "lyt_animation.h"
#include "common.h"
#include "nw4r/lyt/lyt_animation.h"
#include "nw4r/math/math_types.h"
#include "nw4r/ut/ut_Color.h"
#include "nw4r/ut/ut_LinkList.h"
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
#include "nw4r/ut/ut_algorithm.h"
#include <nw4r/lyt/lyt_resources.h>
#include <nw4r/lyt/lyt_types.h>
#include <string.h>
#define PANE_NAME_SIZE 17
#define PANE_USERDATA_SIZE 9
#define ANIMTARGET_PANE_MAX 10
namespace nw4r {
namespace lyt {
namespace detail {
struct PaneBase {
PaneBase();
virtual ~PaneBase();
ut::LinkListNode mLink; // at 0x4
};
namespace nw4r
{
namespace lyt
{
void LytInit();
} // namespace detail
struct Size
{
inline Size() : x(), y() {}
class Pane : detail::PaneBase {
public:
// For use with TestBit<Uc>
enum PaneBits { VISIBLE, INFLUENCED_ALPHA, LOCATION_ADJUST };
inline Size& operator=(const Size& rhs)
{
x = rhs.x;
y = rhs.y;
return *this;
}
f32 x, y;
};
namespace detail
{
struct PaneBase
{
inline PaneBase() : mNode() {}
virtual ~PaneBase();
ut::LinkListNode mNode; // at 0x4
};
}
namespace res
{
struct Pane
{
u32 mMagic; // "pan1", at 0x0
u32 mLength; // at 0x4
u8 BYTE_0x8;
u8 BYTE_0x9;
u8 BYTE_0xA;
u8 BYTE_0xB; // NO REFERENCES
char mName[PANE_NAME_SIZE]; // at 0xC
char mUserData[PANE_USERDATA_SIZE]; // at 0x1C
math::VEC3 VEC3_0x24;
math::VEC3 VEC3_0x30;
math::VEC2 VEC2_0x3C;
Size mSize; // at 0x44
};
}
struct Pane : detail::PaneBase
{
// For use with TestBit<Uc>
enum PaneBits
{
VISIBLE,
INFLUENCED_ALPHA,
LOCATION_ADJUST
};
inline void Init()
{
mParent = NULL;
mMaterial = NULL;
BYTE_0xD6 = 0;
INT_0xB4 = 0;
}
inline void SetName(const char *pName)
{
strncpy(mName, pName, PANE_NAME_SIZE);
mName[PANE_NAME_SIZE - 1] = '\0';
}
inline void SetUserData(const char *pData)
{
strncpy(mUserData, pData, PANE_USERDATA_SIZE);
mUserData[PANE_USERDATA_SIZE - 1] = '\0';
}
inline void InsertChild(ut::LinkList<lyt::Pane, 4>::Iterator iter, lyt::Pane *pChild)
{
mChildren.Insert(iter, pChild);
pChild->mParent = this;
}
Pane(const res::Pane *);
virtual ~Pane(); // at 0x8
virtual const ut::detail::RuntimeTypeInfo * GetRuntimeTypeInfo() const; // at 0xC
virtual UNKTYPE CalculateMtx(const DrawInfo&); // at 0x10
virtual UNKTYPE Draw(const DrawInfo&); // at 0x14
virtual void DrawSelf(const DrawInfo&); // at 0x18
virtual UNKTYPE Animate(u32); // at 0x1C
virtual UNKTYPE AnimateSelf(u32); // at 0x20
virtual ut::Color GetVtxColor(u32) const; // at 0x24
virtual void SetVtxColor(u32, ut::Color); // at 0x28
virtual UNKTYPE GetColorElement(u32) const; // at 0x2C
virtual UNKTYPE SetColorElement(u32, u8); // at 0x30
virtual u8 GetVtxColorElement(u32) const; // at 0x34
virtual void SetVtxColorElement(u32, u8); // at 0x38
virtual Pane * FindPaneByName(const char *, bool); // at 0x3C
virtual UNKTYPE FindMaterialByName(const char *, bool); // at 0x40
virtual UNKTYPE BindAnimation(AnimTransform *, bool); // at 0x44
virtual UNKTYPE UnbindAnimation(AnimTransform *, bool); // at 0x48
virtual UNKTYPE UnbindAllAnimation(bool); // at 0x4C
virtual UNKTYPE UnbindAnimationSelf(AnimTransform *); // at 0x50
virtual UNKTYPE FindAnimationLink(AnimTransform *); // at 0x54
virtual UNKTYPE SetAnimationEnable(AnimTransform *, bool, bool); // at 0x58
virtual UNKTYPE GetMaterial() const; // at 0x5C
virtual UNKTYPE LoadMtx(const DrawInfo&); // at 0x60
void AppendChild(Pane *);
void RemoveChild(Pane *);
UNKTYPE GetPaneRect(const DrawInfo&) const;
UNKTYPE AddAnimationLink(AnimationLink *);
UNKTYPE GetVtxPos() const;
ut::LinkListNode mNode; // at 0x4
Pane *mParent; // at 0x8
ut::LinkList<Pane, 4> mChildren; // at 0x14
ut::LinkList<AnimationLink, 0> mAnims; // at 0x20;
Material *mMaterial; // at 0x2C
math::VEC3 mTranslate; // at 0x30
math::VEC3 VEC3_0x3C;
math::VEC2 mScale; // at 0x48
Size mSize; // at 0x50
math::MTX34 MTX34_0x58;
math::MTX34 mGlobalMtx; // at 0x84
int INT_0xB4;
u8 mAlpha; // at 0xB8
u8 BYTE_0xB9;
u8 BYTE_0xBA;
u8 mFlags; // at 0xBB
char mName[PANE_NAME_SIZE]; // at 0xBC
char mUserData[PANE_USERDATA_SIZE]; // at 0xCD
u8 BYTE_0xD6;
static ut::detail::RuntimeTypeInfo typeInfo;
};
bool IsVisible() const {
return detail::TestBit<u8>(mFlag, VISIBLE);
}
void SetVisible(bool bVisible) {
detail::SetBit(&mFlag, VISIBLE, bVisible);
}
bool IsInfluencedAlpha() const {
return detail::TestBit<u8>(mFlag, INFLUENCED_ALPHA);
}
bool IsLocationAdjust() const {
return detail::TestBit<u8>(mFlag, LOCATION_ADJUST);
}
bool IsUserAllocated() const {
return mbUserAllocated;
}
}
#endif
ut::LinkList<Pane, 4> *GetChildList() {
return &mChildList;
}
ut::LinkList<AnimationLink, 0> *GetAnimationList() {
return &mAnimList;
}
const math::MTX34 &GetGlobalMtx() const {
return mGlbMtx;
}
Pane *GetParent() const {
return mpParent;
}
const math::VEC2 *GetScale() const {
return &mScale;
}
void SetScale(const math::VEC2 &value) {
mScale = value;
}
u8 GetAlpha() const {
return mAlpha;
}
void SetAlpha(u8 value) {
mAlpha = value;
}
const Size *GetSize() const {
return &mSize;
}
void SetSize(const Size &value) {
mSize = value;
}
void SetSRTElement(u32 idx, f32 f) {
((f32 *)&mTranslate)[idx] = f;
}
const res::ExtUserDataList *GetExtUserDataList() const {
return mpExtUserDataList;
}
void SetExtUserDataList(const res::ExtUserDataList *pBlock) {
mpExtUserDataList = pBlock;
}
const char *GetName() const {
return mName;
}
Pane();
Pane(const res::Pane *pBlock);
void Init();
void SetName(const char *pName);
void SetUserData(const char *pData);
void AppendChild(Pane *pChild);
void PrependChild(Pane *pChild);
void InsertChild(Pane *at, Pane *pChild);
void InsertChild(ut::LinkList<Pane, 4>::Iterator next, Pane *pChild);
void RemoveChild(Pane *pChild);
ut::Rect GetPaneRect() const;
ut::Rect GetPaneRect(const DrawInfo &) const;
void AddAnimationLink(AnimationLink *pAnimationLink);
math::VEC2 GetVtxPos() const;
void CalculateMtxChild(const DrawInfo &drawInfo);
u16 GetExtUserDataNum() const;
const res::ExtUserData *GetExtUserData() const;
const res::ExtUserData *FindExtUserDataByName(const char *name);
virtual ~Pane(); // at 0x8
NW4R_UT_RTTI_DECL(Pane); // at 0x0C
virtual void CalculateMtx(const DrawInfo &drawInfo); // at 0x10
virtual void Draw(const DrawInfo &drawInfo); // at 0x14
virtual void DrawSelf(const DrawInfo &drawInfo); // at 0x18
virtual void Animate(u32); // at 0x1C
virtual void AnimateSelf(u32); // at 0x20
virtual ut::Color GetVtxColor(u32 idx) const; // at 0x24
virtual void SetVtxColor(u32, ut::Color); // at 0x28
virtual u8 GetColorElement(u32 idx) const; // at 0x2C
virtual void SetColorElement(u32 idx, u8 value); // at 0x30
virtual u8 GetVtxColorElement(u32 idx) const; // at 0x34
virtual void SetVtxColorElement(u32 idx, u8 value); // at 0x38
virtual Pane *FindPaneByName(const char *findName, bool bRecursive); // at 0x3C
virtual Material *FindMaterialByName(const char *findName, bool bRecursive); // at 0x40
virtual void BindAnimation(AnimTransform *pAnimTrans, bool bRecursive, bool bDisable); // at 0x44
virtual void UnbindAnimation(AnimTransform *pAnimTrans, bool bRecusive); // at 0x48
virtual void UnbindAllAnimation(bool bRecursive); // at 0x4C
virtual void UnbindAnimationSelf(AnimTransform *pAnimTrans); // at 0x50
virtual AnimationLink *FindAnimationLinkSelf(AnimTransform *pAnimTrans); // at 0x54
virtual AnimationLink *FindAnimationLinkSelf(const AnimResource &animRes); // at 0x58
virtual void SetAnimationEnable(AnimTransform *pAnimTrans, bool bEnable, bool bRecursive); // at 0x5C
virtual void SetAnimationEnable(const AnimResource &animRes, bool bEnable, bool bRecursive); // at 0x60
virtual u8 GetMaterialNum() const; // at 0x64
virtual Material *GetMaterial() const; // at 0x68
virtual Material *GetMaterial(u32 idx) const; // at 0x6C
virtual void LoadMtx(const DrawInfo &drawInfo); // at 0x70
protected:
Pane *mpParent; // at 0x0C
ut::LinkList<Pane, 4> mChildList; // at 0x10
ut::LinkList<AnimationLink, 0> mAnimList; // at 0x1C;
Material *mpMaterial; // at 0x28
math::VEC3 mTranslate; // at 0x2C
math::VEC3 mRotate; // at 0x38
math::VEC2 mScale; // at 0x44
Size mSize; // at 0x4C
math::MTX34 mMtx; // at 0x54
math::MTX34 mGlbMtx; // at 0x84
const res::ExtUserDataList *mpExtUserDataList; // at 0xB4
u8 mAlpha; // at 0xB8
u8 mGlbAlpha; // at 0xB9
u8 mBasePosition; // at 0xBA
u8 mFlag; // at 0xBB
char mName[PANE_NAME_SIZE + 1]; // at 0xBC
char mUserData[PANE_USERDATA_SIZE + 1]; // at 0xCD
bool mbUserAllocated; // at 0xD6
u8 mPadding; // at 0xD7
};
} // namespace lyt
} // namespace nw4r
#endif
+42
View File
@@ -0,0 +1,42 @@
#ifndef NW4R_LYT_PICTURE_H
#define NW4R_LYT_PICTURE_H
#include <nw4r/lyt/lyt_common.h>
#include <nw4r/lyt/lyt_pane.h>
#include <nw4r/lyt/lyt_resources.h>
namespace nw4r {
namespace lyt {
class Picture : public Pane {
public:
Picture(u8);
Picture(const TexMap &texMap);
Picture(const res::Picture *pResPic, const ResBlockSet &resDataSet);
virtual ~Picture(); // at 0x08
NW4R_UT_RTTI_DECL(Picture); // at 0x0C
virtual void DrawSelf(const DrawInfo &drawInfo); // at 0x18
virtual ut::Color GetVtxColor(u32 idx) const; // at 0x24
virtual void SetVtxColor(u32 idx, ut::Color value); // at 0x28
virtual u8 GetVtxColorElement(u32 idx) const; // at 0x34
virtual void SetVtxColorElement(u32 idx, u8 value); // at 0x38
virtual void Append(const TexMap &); // at 0x78
void Init(u8 texNum);
void ReserveTexCoord(u8 texNum);
void SetTexCoordNum(u8 texNum);
protected:
ut::Color mVtxColors[TEXCOORD_VTX_COUNT]; // at 0xD8
detail::TexCoordAry mTexCoordAry; // at 0xE8
};
} // namespace lyt
} // namespace nw4r
#endif
+14 -17
View File
@@ -1,21 +1,18 @@
#ifndef NW4R_LYT_RESOURCE_ACCESSOR_H
#define NW4R_LYT_RESOURCE_ACCESSOR_H
#include "types_nw4r.h"
#include "ut_Font.h"
#include "common.h"
#include "nw4r/ut/ut_Font.h"
namespace nw4r
{
namespace lyt
{
class ResourceAccessor
{
public:
ResourceAccessor();
virtual ~ResourceAccessor(); // at 0x8
virtual UNKTYPE * GetResource(u32, const char *, u32 *) = 0; // at 0xC
virtual ut::Font * GetFont(const char *); // at 0x10
};
}
}
namespace nw4r {
namespace lyt {
class ResourceAccessor {
public:
ResourceAccessor();
virtual ~ResourceAccessor(); // at 0x8
virtual UNKTYPE *GetResource(u32, const char *, u32 *) = 0; // at 0xC
virtual ut::Font *GetFont(const char *); // at 0x10
};
} // namespace lyt
} // namespace nw4r
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More