mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-07-15 05:05:51 +00:00
More CCubeRenderer
This commit is contained in:
parent
d39bfb5d2c
commit
23c5d67207
@ -11959,20 +11959,20 @@ SetModelMatrix__13CCubeRendererFRC12CTransform4f = .text:0x802BDE74; // type:fun
|
|||||||
RemoveStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDE98; // type:function size:0x50 scope:global
|
RemoveStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDE98; // type:function size:0x50 scope:global
|
||||||
FindStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDEE8; // type:function size:0x34 scope:global
|
FindStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDEE8; // type:function size:0x34 scope:global
|
||||||
AddStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreei = .text:0x802BDF1C; // type:function size:0x274 scope:global
|
AddStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreei = .text:0x802BDF1C; // type:function size:0x274 scope:global
|
||||||
fn_802BE190 = .text:0x802BE190; // type:function size:0x28
|
push_back__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>FRCQ213CCubeRenderer13CAreaListItem = .text:0x802BE190; // type:function size:0x28
|
||||||
fn_802BE1B8 = .text:0x802BE1B8; // type:function size:0x70
|
fn_802BE1B8 = .text:0x802BE1B8; // type:function size:0x70
|
||||||
fn_802BE228 = .text:0x802BE228; // type:function size:0x84
|
fn_802BE228 = .text:0x802BE228; // type:function size:0x84
|
||||||
fn_802BE2AC = .text:0x802BE2AC; // type:function size:0x10C
|
fn_802BE2AC = .text:0x802BE2AC; // type:function size:0x10C
|
||||||
fn_802BE3B8 = .text:0x802BE3B8; // type:function size:0xAC
|
__dt__Q213CCubeRenderer13CAreaListItemFv = .text:0x802BE3B8; // type:function size:0xAC
|
||||||
fn_802BE464 = .text:0x802BE464; // type:function size:0x64
|
fn_802BE464 = .text:0x802BE464; // type:function size:0x64
|
||||||
fn_802BE4C8 = .text:0x802BE4C8; // type:function size:0xB4
|
fn_802BE4C8 = .text:0x802BE4C8; // type:function size:0xB4
|
||||||
fn_802BE57C = .text:0x802BE57C; // type:function size:0x64
|
fn_802BE57C = .text:0x802BE57C; // type:function size:0x64
|
||||||
fn_802BE5E0 = .text:0x802BE5E0; // type:function size:0xB8
|
fn_802BE5E0 = .text:0x802BE5E0; // type:function size:0xB8
|
||||||
__dt__13CCubeRendererFv = .text:0x802BE698; // type:function size:0x270 scope:global
|
__dt__13CCubeRendererFv = .text:0x802BE698; // type:function size:0x270 scope:global
|
||||||
fn_802BE908 = .text:0x802BE908; // type:function size:0x1D0
|
LoadThermoPalette__13CCubeRendererFv = .text:0x802BE908; // type:function size:0x1D0
|
||||||
fn_802BEAD8 = .text:0x802BEAD8; // type:function size:0x17C
|
GenerateSphereRampTex__13CCubeRendererFv = .text:0x802BEAD8; // type:function size:0x17C
|
||||||
fn_802BEC54 = .text:0x802BEC54; // type:function size:0x1FC
|
GenerateFogVolumeRampTex__13CCubeRendererFv = .text:0x802BEC54; // type:function size:0x1FC
|
||||||
fn_802BEE50 = .text:0x802BEE50; // type:function size:0x210
|
GenerateReflectionTex__13CCubeRendererFv = .text:0x802BEE50; // type:function size:0x210
|
||||||
__ct__13CCubeRendererFR12IObjectStoreR10COsContextR10CMemorySysR11CResFactory = .text:0x802BF060; // type:function size:0x304 scope:global
|
__ct__13CCubeRendererFR12IObjectStoreR10COsContextR10CMemorySysR11CResFactory = .text:0x802BF060; // type:function size:0x304 scope:global
|
||||||
__ct__Q213CCubeRenderer13CAreaListItemFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreeRCQ24rstl79auto_ptr<Q24rstl60vector<23TCachedToken<8CTexture>,Q24rstl17rmemory_allocator>>RCQ24rstl85auto_ptr<Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>>i = .text:0x802BF364; // type:function size:0x48 scope:global
|
__ct__Q213CCubeRenderer13CAreaListItemFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreeRCQ24rstl79auto_ptr<Q24rstl60vector<23TCachedToken<8CTexture>,Q24rstl17rmemory_allocator>>RCQ24rstl85auto_ptr<Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>>i = .text:0x802BF364; // type:function size:0x48 scope:global
|
||||||
Clear__7BucketsFv = .text:0x802BF3AC; // type:function size:0x1F8 scope:global
|
Clear__7BucketsFv = .text:0x802BF3AC; // type:function size:0x1F8 scope:global
|
||||||
@ -11986,18 +11986,18 @@ Insert__7BucketsFRC9CVector3fRC6CAABox13EDrawableTypePCvRC6CPlaneUs = .text:0x80
|
|||||||
Shutdown__7BucketsFv = .text:0x802BFE5C; // type:function size:0x18 scope:global
|
Shutdown__7BucketsFv = .text:0x802BFE5C; // type:function size:0x18 scope:global
|
||||||
Init__7BucketsFv = .text:0x802BFE74; // type:function size:0x164 scope:global
|
Init__7BucketsFv = .text:0x802BFE74; // type:function size:0x164 scope:global
|
||||||
__nw__27TOneStatic<13CCubeRenderer>FUlPCcPCc = .text:0x802BFFD8; // type:function size:0x30 scope:global
|
__nw__27TOneStatic<13CCubeRenderer>FUlPCcPCc = .text:0x802BFFD8; // type:function size:0x30 scope:global
|
||||||
fn_802C0008 = .text:0x802C0008; // type:function size:0x2C
|
__dl__27TOneStatic<13CCubeRenderer>FPv = .text:0x802C0008; // type:function size:0x2C
|
||||||
fn_802C0034 = .text:0x802C0034; // type:function size:0xC
|
GetAllocSpace__27TOneStatic<13CCubeRenderer>Fv = .text:0x802C0034; // type:function size:0xC
|
||||||
fn_802C0040 = .text:0x802C0040; // type:function size:0x24
|
ReferenceCount__27TOneStatic<13CCubeRenderer>Fv = .text:0x802C0040; // type:function size:0x24
|
||||||
fn_802C0064 = .text:0x802C0064; // type:function size:0x144
|
fn_802C0064 = .text:0x802C0064; // type:function size:0x144
|
||||||
fn_802C01A8 = .text:0x802C01A8; // type:function size:0x16C
|
fn_802C01A8 = .text:0x802C01A8; // type:function size:0x16C
|
||||||
fn_802C0314 = .text:0x802C0314; // type:function size:0x94
|
do_erase__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>FPQ34rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>4node = .text:0x802C0314; // type:function size:0x94
|
||||||
fn_802C03A8 = .text:0x802C03A8; // type:function size:0x94
|
__dt__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>Fv = .text:0x802C03A8; // type:function size:0x94
|
||||||
fn_802C043C = .text:0x802C043C; // type:function size:0xCC
|
fn_802C043C = .text:0x802C043C; // type:function size:0xCC
|
||||||
fn_802C0508 = .text:0x802C0508; // type:function size:0xAC
|
__dt__Q24rstl70list<Q213CCubeRenderer18CFogVolumeListItem,Q24rstl17rmemory_allocator>Fv = .text:0x802C0508; // type:function size:0xAC
|
||||||
fn_802C05B4 = .text:0x802C05B4; // type:function size:0x7C
|
fn_802C05B4 = .text:0x802C05B4; // type:function size:0x7C
|
||||||
fn_802C0630 = .text:0x802C0630; // type:function size:0x78
|
__dt__Q24rstl60list<Q24rstl18pair<9CVector3f,f>,Q24rstl17rmemory_allocator>Fv = .text:0x802C0630; // type:function size:0x78
|
||||||
fn_802C06A8 = .text:0x802C06A8; // type:function size:0x108
|
reserve__Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>Fi = .text:0x802C06A8; // type:function size:0x108
|
||||||
fn_802C07B0 = .text:0x802C07B0; // type:function size:0x7C
|
fn_802C07B0 = .text:0x802C07B0; // type:function size:0x7C
|
||||||
fn_802C082C = .text:0x802C082C; // type:function size:0x8C
|
fn_802C082C = .text:0x802C082C; // type:function size:0x8C
|
||||||
fn_802C08B8 = .text:0x802C08B8; // type:function size:0xDC
|
fn_802C08B8 = .text:0x802C08B8; // type:function size:0xDC
|
||||||
@ -14823,7 +14823,7 @@ GetMemInfoFromBlockPtr__14CGameAllocatorCFPCv = .text:0x80352660; // type:functi
|
|||||||
fn_80352668 = .text:0x80352668; // type:function size:0xA0
|
fn_80352668 = .text:0x80352668; // type:function size:0xA0
|
||||||
ClearPointGeneratorFunc__13CSkinnedModelFv = .text:0x80352708; // type:function size:0xC scope:global
|
ClearPointGeneratorFunc__13CSkinnedModelFv = .text:0x80352708; // type:function size:0xC scope:global
|
||||||
SetPointGeneratorFunc__13CSkinnedModelFPvPFPvPC9CVector3fPC9CVector3fi_v = .text:0x80352714; // type:function size:0xC scope:global
|
SetPointGeneratorFunc__13CSkinnedModelFPvPFPvPC9CVector3fPC9CVector3fi_v = .text:0x80352714; // type:function size:0xC scope:global
|
||||||
fn_80352720 = .text:0x80352720; // type:function size:0x20
|
RemoveDummySkinnedModelRef__13CSkinnedModelFv = .text:0x80352720; // type:function size:0x20
|
||||||
fn_80352740 = .text:0x80352740; // type:function size:0x20
|
fn_80352740 = .text:0x80352740; // type:function size:0x20
|
||||||
fn_80352760 = .text:0x80352760; // type:function size:0x10C
|
fn_80352760 = .text:0x80352760; // type:function size:0x10C
|
||||||
AllocateStorage__13CSkinnedModelFv = .text:0x8035286C; // type:function size:0x180 scope:global
|
AllocateStorage__13CSkinnedModelFv = .text:0x8035286C; // type:function size:0x180 scope:global
|
||||||
@ -17730,7 +17730,7 @@ lbl_803D67B4 = .rodata:0x803D67B4; // type:object size:0x40 data:4byte
|
|||||||
lbl_803D67F4 = .rodata:0x803D67F4; // type:object size:0x20 data:4byte
|
lbl_803D67F4 = .rodata:0x803D67F4; // type:object size:0x20 data:4byte
|
||||||
lbl_803D6814 = .rodata:0x803D6814; // type:object size:0x18 data:4byte
|
lbl_803D6814 = .rodata:0x803D6814; // type:object size:0x18 data:4byte
|
||||||
lbl_803D682C = .rodata:0x803D682C; // type:object size:0x30
|
lbl_803D682C = .rodata:0x803D682C; // type:object size:0x30
|
||||||
lbl_803D685C = .rodata:0x803D685C; // type:object size:0x1C
|
@stringBase0 = .rodata:0x803D685C; // type:object size:0x1C scope:local data:string_table
|
||||||
lbl_803D6878 = .rodata:0x803D6878; // type:object size:0x8
|
lbl_803D6878 = .rodata:0x803D6878; // type:object size:0x8
|
||||||
lbl_803D6880 = .rodata:0x803D6880; // type:object size:0x8
|
lbl_803D6880 = .rodata:0x803D6880; // type:object size:0x8
|
||||||
lbl_803D6888 = .rodata:0x803D6888; // type:object size:0x8
|
lbl_803D6888 = .rodata:0x803D6888; // type:object size:0x8
|
||||||
@ -17940,7 +17940,7 @@ lbl_803D8D60 = .data:0x803D8D60; // type:object size:0xC
|
|||||||
__vt__4IObj = .data:0x803D8D6C; // type:object size:0xC scope:global
|
__vt__4IObj = .data:0x803D8D6C; // type:object size:0xC scope:global
|
||||||
__vt__31CObjOwnerDerivedFromIObjUntyped = .data:0x803D8D78; // type:object size:0xC scope:global
|
__vt__31CObjOwnerDerivedFromIObjUntyped = .data:0x803D8D78; // type:object size:0xC scope:global
|
||||||
__vt__35TObjOwnerDerivedFromIObj<8CTexture> = .data:0x803D8D84; // type:object size:0xC scope:global
|
__vt__35TObjOwnerDerivedFromIObj<8CTexture> = .data:0x803D8D84; // type:object size:0xC scope:global
|
||||||
lbl_803D8D90 = .data:0x803D8D90; // type:object size:0x10C
|
__vt__9IRenderer = .data:0x803D8D90; // type:object size:0x10C
|
||||||
__vt__24IArchitectureMessageParm = .data:0x803D8E9C; // type:object size:0xC scope:global
|
__vt__24IArchitectureMessageParm = .data:0x803D8E9C; // type:object size:0xC scope:global
|
||||||
__vt__22CCameraShakerComponent = .data:0x803D8EA8; // type:object size:0x10 scope:global
|
__vt__22CCameraShakerComponent = .data:0x803D8EA8; // type:object size:0x10 scope:global
|
||||||
@28 = .data:0x803D8EB8; // type:object size:0xC scope:local data:4byte
|
@28 = .data:0x803D8EB8; // type:object size:0xC scope:local data:4byte
|
||||||
@ -19240,7 +19240,7 @@ sBucketsHolder$4375 = .bss:0x80472A7C; // type:object size:0x64D0 scope:local da
|
|||||||
sPlaneObjectDataHolder$4376 = .bss:0x80478F4C; // type:object size:0x208 scope:local data:4byte
|
sPlaneObjectDataHolder$4376 = .bss:0x80478F4C; // type:object size:0x208 scope:local data:4byte
|
||||||
sPlaneObjectBucketHolder$4377 = .bss:0x80479154; // type:object size:0x18 scope:local data:4byte
|
sPlaneObjectBucketHolder$4377 = .bss:0x80479154; // type:object size:0x18 scope:local data:4byte
|
||||||
sOptimalPlane$6479 = .bss:0x8047916C; // type:object size:0xC scope:local align:4 data:float
|
sOptimalPlane$6479 = .bss:0x8047916C; // type:object size:0xC scope:local align:4 data:float
|
||||||
sAllocSpace$9000 = .bss:0x80479178; // type:object size:0x320 scope:local
|
sAllocSpace$9000 = .bss:0x80479178; // type:object size:0x31C scope:local
|
||||||
normalTable = .bss:0x80479498; // type:object size:0x48 scope:local align:4 data:float
|
normalTable = .bss:0x80479498; // type:object size:0x48 scope:local align:4 data:float
|
||||||
...bss.0 = .bss:0x804794E0; // type:label scope:local
|
...bss.0 = .bss:0x804794E0; // type:label scope:local
|
||||||
@2493 = .bss:0x804794E0; // type:object size:0xC scope:local
|
@2493 = .bss:0x804794E0; // type:object size:0xC scope:local
|
||||||
|
@ -11959,20 +11959,20 @@ SetModelMatrix__13CCubeRendererFRC12CTransform4f = .text:0x802BDF20; // type:fun
|
|||||||
RemoveStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDF44; // type:function size:0x50 scope:global
|
RemoveStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDF44; // type:function size:0x50 scope:global
|
||||||
FindStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDF94; // type:function size:0x34 scope:global
|
FindStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator> = .text:0x802BDF94; // type:function size:0x34 scope:global
|
||||||
AddStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreei = .text:0x802BDFC8; // type:function size:0x274 scope:global
|
AddStaticGeometry__13CCubeRendererFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreei = .text:0x802BDFC8; // type:function size:0x274 scope:global
|
||||||
fn_802BE190 = .text:0x802BE23C; // type:function size:0x28 scope:global
|
push_back__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>FRCQ213CCubeRenderer13CAreaListItem = .text:0x802BE23C; // type:function size:0x28 scope:global
|
||||||
fn_802BE1B8 = .text:0x802BE264; // type:function size:0x70 scope:global
|
fn_802BE1B8 = .text:0x802BE264; // type:function size:0x70 scope:global
|
||||||
fn_802BE228 = .text:0x802BE2D4; // type:function size:0x84 scope:global
|
fn_802BE228 = .text:0x802BE2D4; // type:function size:0x84 scope:global
|
||||||
fn_802BE2AC = .text:0x802BE358; // type:function size:0x10C scope:global
|
fn_802BE2AC = .text:0x802BE358; // type:function size:0x10C scope:global
|
||||||
fn_802BE3B8 = .text:0x802BE464; // type:function size:0xAC scope:global
|
__dt__Q213CCubeRenderer13CAreaListItemFv = .text:0x802BE464; // type:function size:0xAC scope:global
|
||||||
fn_802BE464 = .text:0x802BE510; // type:function size:0x64 scope:global
|
fn_802BE464 = .text:0x802BE510; // type:function size:0x64 scope:global
|
||||||
fn_802BE4C8 = .text:0x802BE574; // type:function size:0xB4 scope:global
|
fn_802BE4C8 = .text:0x802BE574; // type:function size:0xB4 scope:global
|
||||||
fn_802BE57C = .text:0x802BE628; // type:function size:0x64 scope:global
|
fn_802BE57C = .text:0x802BE628; // type:function size:0x64 scope:global
|
||||||
fn_802BE5E0 = .text:0x802BE68C; // type:function size:0xB8 scope:global
|
fn_802BE5E0 = .text:0x802BE68C; // type:function size:0xB8 scope:global
|
||||||
__dt__13CCubeRendererFv = .text:0x802BE744; // type:function size:0x270 scope:global
|
__dt__13CCubeRendererFv = .text:0x802BE744; // type:function size:0x270 scope:global
|
||||||
fn_802BE908 = .text:0x802BE9B4; // type:function size:0x1D0 scope:global
|
LoadThermoPalette__13CCubeRendererFv = .text:0x802BE9B4; // type:function size:0x1D0 scope:global
|
||||||
fn_802BEAD8 = .text:0x802BEB84; // type:function size:0x17C scope:global
|
GenerateSphereRampTex__13CCubeRendererFv = .text:0x802BEB84; // type:function size:0x17C scope:global
|
||||||
fn_802BEC54 = .text:0x802BED00; // type:function size:0x1FC scope:global
|
GenerateFogVolumeRampTex__13CCubeRendererFv = .text:0x802BED00; // type:function size:0x1FC scope:global
|
||||||
fn_802BEE50 = .text:0x802BEEFC; // type:function size:0x210 scope:global
|
GenerateReflectionTex__13CCubeRendererFv = .text:0x802BEEFC; // type:function size:0x210 scope:global
|
||||||
__ct__13CCubeRendererFR12IObjectStoreR10COsContextR10CMemorySysR11CResFactory = .text:0x802BF10C; // type:function size:0x304 scope:global
|
__ct__13CCubeRendererFR12IObjectStoreR10COsContextR10CMemorySysR11CResFactory = .text:0x802BF10C; // type:function size:0x304 scope:global
|
||||||
__ct__Q213CCubeRenderer13CAreaListItemFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreeRCQ24rstl79auto_ptr<Q24rstl60vector<23TCachedToken<8CTexture>,Q24rstl17rmemory_allocator>>RCQ24rstl85auto_ptr<Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>>i = .text:0x802BF410; // type:function size:0x48 scope:global
|
__ct__Q213CCubeRenderer13CAreaListItemFPCQ24rstl58vector<21CMetroidModelInstance,Q24rstl17rmemory_allocator>PC12CAreaOctTreeRCQ24rstl79auto_ptr<Q24rstl60vector<23TCachedToken<8CTexture>,Q24rstl17rmemory_allocator>>RCQ24rstl85auto_ptr<Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>>i = .text:0x802BF410; // type:function size:0x48 scope:global
|
||||||
Clear__7BucketsFv = .text:0x802BF458; // type:function size:0x1F8 scope:global
|
Clear__7BucketsFv = .text:0x802BF458; // type:function size:0x1F8 scope:global
|
||||||
@ -11986,18 +11986,18 @@ Insert__7BucketsFRC9CVector3fRC6CAABox13EDrawableTypePCvRC6CPlaneUs = .text:0x80
|
|||||||
Shutdown__7BucketsFv = .text:0x802BFF08; // type:function size:0x18 scope:global
|
Shutdown__7BucketsFv = .text:0x802BFF08; // type:function size:0x18 scope:global
|
||||||
Init__7BucketsFv = .text:0x802BFF20; // type:function size:0x164 scope:global
|
Init__7BucketsFv = .text:0x802BFF20; // type:function size:0x164 scope:global
|
||||||
__nw__27TOneStatic<13CCubeRenderer>FUlPCcPCc = .text:0x802C0084; // type:function size:0x30 scope:global
|
__nw__27TOneStatic<13CCubeRenderer>FUlPCcPCc = .text:0x802C0084; // type:function size:0x30 scope:global
|
||||||
fn_802C0008 = .text:0x802C00B4; // type:function size:0x2C scope:global
|
__dl__27TOneStatic<13CCubeRenderer>FPv = .text:0x802C00B4; // type:function size:0x2C scope:global
|
||||||
fn_802C0034 = .text:0x802C00E0; // type:function size:0xC scope:global
|
GetAllocSpace__27TOneStatic<13CCubeRenderer>Fv = .text:0x802C00E0; // type:function size:0xC scope:global
|
||||||
fn_802C0040 = .text:0x802C00EC; // type:function size:0x24 scope:global
|
ReferenceCount__27TOneStatic<13CCubeRenderer>Fv = .text:0x802C00EC; // type:function size:0x24 scope:global
|
||||||
fn_802C0064 = .text:0x802C0110; // type:function size:0x144 scope:global
|
fn_802C0064 = .text:0x802C0110; // type:function size:0x144 scope:global
|
||||||
fn_802C01A8 = .text:0x802C0254; // type:function size:0x16C scope:global
|
fn_802C01A8 = .text:0x802C0254; // type:function size:0x16C scope:global
|
||||||
fn_802C0314 = .text:0x802C03C0; // type:function size:0x94 scope:global
|
do_erase__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>FPQ34rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>4node = .text:0x802C03C0; // type:function size:0x94 scope:global
|
||||||
fn_802C03A8 = .text:0x802C0454; // type:function size:0x94 scope:global
|
__dt__Q24rstl65list<Q213CCubeRenderer13CAreaListItem,Q24rstl17rmemory_allocator>Fv = .text:0x802C0454; // type:function size:0x94 scope:global
|
||||||
fn_802C043C = .text:0x802C04E8; // type:function size:0xCC scope:global
|
fn_802C043C = .text:0x802C04E8; // type:function size:0xCC scope:global
|
||||||
fn_802C0508 = .text:0x802C05B4; // type:function size:0xAC scope:global
|
__dt__Q24rstl70list<Q213CCubeRenderer18CFogVolumeListItem,Q24rstl17rmemory_allocator>Fv = .text:0x802C05B4; // type:function size:0xAC scope:global
|
||||||
fn_802C05B4 = .text:0x802C0660; // type:function size:0x7C scope:global
|
fn_802C05B4 = .text:0x802C0660; // type:function size:0x7C scope:global
|
||||||
fn_802C0630 = .text:0x802C06DC; // type:function size:0x78 scope:global
|
__dt__Q24rstl60list<Q24rstl18pair<9CVector3f,f>,Q24rstl17rmemory_allocator>Fv = .text:0x802C06DC; // type:function size:0x78 scope:global
|
||||||
fn_802C06A8 = .text:0x802C0754; // type:function size:0x108 scope:global
|
reserve__Q24rstl66vector<Q24rstl22auto_ptr<10CCubeModel>,Q24rstl17rmemory_allocator>Fi = .text:0x802C0754; // type:function size:0x108 scope:global
|
||||||
fn_802C07B0 = .text:0x802C085C; // type:function size:0x7C scope:global
|
fn_802C07B0 = .text:0x802C085C; // type:function size:0x7C scope:global
|
||||||
fn_802C082C = .text:0x802C08D8; // type:function size:0x8C scope:global
|
fn_802C082C = .text:0x802C08D8; // type:function size:0x8C scope:global
|
||||||
fn_802C08B8 = .text:0x802C0964; // type:function size:0xDC scope:global
|
fn_802C08B8 = .text:0x802C0964; // type:function size:0xDC scope:global
|
||||||
@ -14823,7 +14823,7 @@ GetMemInfoFromBlockPtr__14CGameAllocatorCFPCv = .text:0x80352764; // type:functi
|
|||||||
fn_80352668 = .text:0x8035276C; // type:function size:0xA0 scope:global
|
fn_80352668 = .text:0x8035276C; // type:function size:0xA0 scope:global
|
||||||
ClearPointGeneratorFunc__13CSkinnedModelFv = .text:0x8035280C; // type:function size:0xC scope:global
|
ClearPointGeneratorFunc__13CSkinnedModelFv = .text:0x8035280C; // type:function size:0xC scope:global
|
||||||
SetPointGeneratorFunc__13CSkinnedModelFPvPFPvPC9CVector3fPC9CVector3fi_v = .text:0x80352818; // type:function size:0xC scope:global
|
SetPointGeneratorFunc__13CSkinnedModelFPvPFPvPC9CVector3fPC9CVector3fi_v = .text:0x80352818; // type:function size:0xC scope:global
|
||||||
fn_80352720 = .text:0x80352824; // type:function size:0x20 scope:global
|
RemoveDummySkinnedModelRef__13CSkinnedModelFv = .text:0x80352824; // type:function size:0x20 scope:global
|
||||||
fn_80352740 = .text:0x80352844; // type:function size:0x20 scope:global
|
fn_80352740 = .text:0x80352844; // type:function size:0x20 scope:global
|
||||||
fn_80352760 = .text:0x80352864; // type:function size:0x10C scope:global
|
fn_80352760 = .text:0x80352864; // type:function size:0x10C scope:global
|
||||||
AllocateStorage__13CSkinnedModelFv = .text:0x80352970; // type:function size:0x180 scope:global
|
AllocateStorage__13CSkinnedModelFv = .text:0x80352970; // type:function size:0x180 scope:global
|
||||||
|
@ -15,12 +15,12 @@ class CSkinnedModel {
|
|||||||
public:
|
public:
|
||||||
virtual ~CSkinnedModel();
|
virtual ~CSkinnedModel();
|
||||||
|
|
||||||
static void ClearPointGeneratorFunc();
|
|
||||||
|
|
||||||
TLockedToken< CModel >& Model() { return x4_model; }
|
TLockedToken< CModel >& Model() { return x4_model; }
|
||||||
const TLockedToken< CModel >& GetModel() const { return x4_model; }
|
const TLockedToken< CModel >& GetModel() const { return x4_model; }
|
||||||
|
|
||||||
static void SetPointGeneratorFunc(void*, void (*)(void*, const CVector3f*, const CVector3f*, int));
|
static void SetPointGeneratorFunc(void*, void (*)(void*, const CVector3f*, const CVector3f*, int));
|
||||||
|
static void ClearPointGeneratorFunc();
|
||||||
|
static void RemoveDummySkinnedModelRef();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TLockedToken< CModel > x4_model;
|
TLockedToken< CModel > x4_model;
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
rstl::vector<u8>& SaveBuffer() { return xf4_saveBuffer; }
|
rstl::vector<u8>& SaveBuffer() { return xf4_saveBuffer; }
|
||||||
|
|
||||||
inline CMemoryStreamOut BeginMemoryOut(uint sz) {
|
inline CMemoryStreamOut BeginMemoryOut(uint sz) {
|
||||||
xf4_saveBuffer.resize(sz, '\x00');
|
xf4_saveBuffer.resize(sz);
|
||||||
return CMemoryStreamOut(xf4_saveBuffer.data(), sz);
|
return CMemoryStreamOut(xf4_saveBuffer.data(), sz);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,14 +12,16 @@ class CCubeSurface;
|
|||||||
|
|
||||||
class CCubeModel {
|
class CCubeModel {
|
||||||
public:
|
public:
|
||||||
CCubeModel(rstl::vector< CCubeSurface* >* surfaces, rstl::vector< TCachedToken< CTexture > >* textures,
|
CCubeModel(rstl::vector< void* >* surfaces, rstl::vector< TCachedToken< CTexture > >* textures,
|
||||||
void* materialData, void* positions, void* normals, void* vtxColors, void* floatUvs,
|
const void* materialData, const void* positions, const void* normals,
|
||||||
void* shortUvs, const CAABox& aabox, uint visorFlags, bool texturesLoaded, uint idx);
|
const void* vtxColors, const void* floatUvs, const void* shortUvs, const CAABox& aabox,
|
||||||
|
uchar visorFlags, bool texturesLoaded, uint idx);
|
||||||
static void SetRenderModelBlack(bool v);
|
static void SetRenderModelBlack(bool v);
|
||||||
static void DisableShadowMaps();
|
static void DisableShadowMaps();
|
||||||
static void EnableShadowMaps(const CTexture*, const CTransform4f&, unsigned char, unsigned char);
|
static void EnableShadowMaps(const CTexture*, const CTransform4f&, unsigned char, unsigned char);
|
||||||
static void SetDrawingOccluders(bool);
|
static void SetDrawingOccluders(bool);
|
||||||
static void MakeTexturesFromMats(uchar* data, rstl::vector< TCachedToken< CTexture > >& textures,
|
static void MakeTexturesFromMats(const void* data,
|
||||||
|
rstl::vector< TCachedToken< CTexture > >& textures,
|
||||||
IObjectStore& store, bool cache);
|
IObjectStore& store, bool cache);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ enum EDrawableType {
|
|||||||
|
|
||||||
class CDrawable {
|
class CDrawable {
|
||||||
public:
|
public:
|
||||||
CDrawable(EDrawableType dtype, ushort extraSort, float planeDot, const CAABox& aabb, void* data)
|
CDrawable(ushort dtype, ushort extraSort, float planeDot, const CAABox& aabb, void* data)
|
||||||
: x0_type(dtype), x2_extraSort(extraSort), x4_data(data), x8_aabb(aabb), x20_viewDist(planeDot) {}
|
: x0_type(dtype), x2_extraSort(extraSort), x4_data(data), x8_aabb(aabb), x20_viewDist(planeDot) {}
|
||||||
// CDrawable(const CDrawable& other)
|
// CDrawable(const CDrawable& other)
|
||||||
// : x0_type(other.x0_type)
|
// : x0_type(other.x0_type)
|
||||||
|
@ -221,6 +221,7 @@ public:
|
|||||||
bool x0_persp;
|
bool x0_persp;
|
||||||
float x4_left;
|
float x4_left;
|
||||||
float x8_right;
|
float x8_right;
|
||||||
|
// TODO: I think top/bottom are flipped
|
||||||
float xc_top;
|
float xc_top;
|
||||||
float x10_bottom;
|
float x10_bottom;
|
||||||
float x14_near;
|
float x14_near;
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
rstl::auto_ptr< uchar > x0_data;
|
rstl::auto_ptr< uchar > x0_data;
|
||||||
uint x4_dataLen;
|
uint x4_dataLen;
|
||||||
rstl::vector< CCubeSurface* > x8_surfaces;
|
rstl::vector< void* > x8_surfaces;
|
||||||
rstl::vector<SShader> x18_matSets;
|
rstl::vector<SShader> x18_matSets;
|
||||||
rstl::single_ptr<CCubeModel> x28_modelInstance;
|
rstl::single_ptr<CCubeModel> x28_modelInstance;
|
||||||
ushort x2c_currentMatxIdx;
|
ushort x2c_currentMatxIdx;
|
||||||
|
@ -16,8 +16,12 @@ public:
|
|||||||
Normalize();
|
Normalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CUnitVector3f(
|
CUnitVector3f(const CVector3f& vec, ENormalize normalize) : CVector3f(vec) {
|
||||||
const CVector3f& vec);//: CVector3f(vec.IsNonZero() ? vec.AsNormalized() : Zero()) {}
|
if (normalize == kN_Yes) {
|
||||||
|
Normalize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CUnitVector3f(const CVector3f& vec); // real? see CPlane::CPlane
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
static CUnitVector3f Forward() {
|
static CUnitVector3f Forward() {
|
||||||
|
@ -20,7 +20,7 @@ template < typename T >
|
|||||||
class TAverage : rstl::vector< T > {
|
class TAverage : rstl::vector< T > {
|
||||||
public:
|
public:
|
||||||
TAverage() {}
|
TAverage() {}
|
||||||
TAverage(int capacity, const T& value);
|
TAverage(int capacity, const T& value = T());
|
||||||
|
|
||||||
void AddValue(const T& value);
|
void AddValue(const T& value);
|
||||||
rstl::optional_object< T > GetAverage() const {
|
rstl::optional_object< T > GetAverage() const {
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "Kyoto/CResFactory.hpp"
|
#include "Kyoto/CResFactory.hpp"
|
||||||
#include "Kyoto/Graphics/CColor.hpp"
|
#include "Kyoto/Graphics/CColor.hpp"
|
||||||
#include "Kyoto/Graphics/CGraphicsPalette.hpp"
|
#include "Kyoto/Graphics/CGraphicsPalette.hpp"
|
||||||
#include "Kyoto/Graphics/CLight.hpp"
|
|
||||||
#include "Kyoto/Graphics/CTexture.hpp"
|
#include "Kyoto/Graphics/CTexture.hpp"
|
||||||
#include "Kyoto/IObjectStore.hpp"
|
#include "Kyoto/IObjectStore.hpp"
|
||||||
#include "Kyoto/Math/CAABox.hpp"
|
#include "Kyoto/Math/CAABox.hpp"
|
||||||
@ -20,6 +19,7 @@
|
|||||||
#include "Kyoto/Math/CVector2f.hpp"
|
#include "Kyoto/Math/CVector2f.hpp"
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
#include "Kyoto/PVS/CPVSVisSet.hpp"
|
#include "Kyoto/PVS/CPVSVisSet.hpp"
|
||||||
|
#include "Kyoto/TOneStatic.hpp"
|
||||||
#include "Kyoto/TToken.hpp"
|
#include "Kyoto/TToken.hpp"
|
||||||
#include "Kyoto/Text/CFont.hpp"
|
#include "Kyoto/Text/CFont.hpp"
|
||||||
|
|
||||||
@ -38,29 +38,29 @@ class CCubeModel;
|
|||||||
class CMetroidModelInstance;
|
class CMetroidModelInstance;
|
||||||
class CModel;
|
class CModel;
|
||||||
class CSkinnedModel;
|
class CSkinnedModel;
|
||||||
|
class CCubeSurface;
|
||||||
|
class CLight;
|
||||||
|
|
||||||
class CCubeRenderer : public IRenderer, public IWeaponRenderer {
|
class CCubeRenderer : public IRenderer, public IWeaponRenderer, public TOneStatic< CCubeRenderer > {
|
||||||
private:
|
private:
|
||||||
class CAreaListItem {
|
class CAreaListItem {
|
||||||
CAreaListItem(
|
public:
|
||||||
const rstl::vector< CMetroidModelInstance, rstl::rmemory_allocator >* geometry,
|
CAreaListItem(const rstl::vector< CMetroidModelInstance >* geometry,
|
||||||
const CAreaOctTree* octTree,
|
const CAreaOctTree* octTree,
|
||||||
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture >, rstl::rmemory_allocator > >&
|
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture > > >& textures,
|
||||||
textures,
|
const rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel > > >& models,
|
||||||
const rstl::auto_ptr<
|
|
||||||
rstl::vector< rstl::auto_ptr< CCubeModel >, rstl::rmemory_allocator > >& models,
|
|
||||||
int areaIdx);
|
int areaIdx);
|
||||||
|
~CAreaListItem() {}
|
||||||
|
|
||||||
private:
|
// private:
|
||||||
const rstl::vector< CMetroidModelInstance, rstl::rmemory_allocator >* x0_geometry;
|
const rstl::vector< CMetroidModelInstance >* x0_geometry;
|
||||||
const CAreaOctTree* x4_octTree;
|
const CAreaOctTree* x4_octTree;
|
||||||
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture >, rstl::rmemory_allocator > >
|
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture > > > x8_textures;
|
||||||
x8_textures;
|
const rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel > > > xc_models;
|
||||||
const rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel >, rstl::rmemory_allocator > >
|
|
||||||
xc_models;
|
|
||||||
int x18_areaIdx;
|
int x18_areaIdx;
|
||||||
rstl::vector< uint > x1c_lightOctreeWords;
|
rstl::vector< uint > x1c_lightOctreeWords;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CFogVolumeListItem {
|
class CFogVolumeListItem {
|
||||||
CTransform4f x0_xf;
|
CTransform4f x0_xf;
|
||||||
CColor x30_color;
|
CColor x30_color;
|
||||||
@ -72,11 +72,11 @@ private:
|
|||||||
public:
|
public:
|
||||||
CCubeRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
CCubeRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
||||||
~CCubeRenderer() override;
|
~CCubeRenderer() override;
|
||||||
// TODO types
|
void AddStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry,
|
||||||
void AddStaticGeometry() override;
|
const CAreaOctTree* octTree, int areaIdx) override;
|
||||||
void EnablePVS(const CPVSVisSet& set, int areaIdx) override;
|
void EnablePVS(const CPVSVisSet& set, int areaIdx) override;
|
||||||
void DisablePVS() override;
|
void DisablePVS() override;
|
||||||
void RemoveStaticGeometry() override;
|
void RemoveStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry) override;
|
||||||
void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask) override;
|
void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask) override;
|
||||||
void DrawSortedGeometry(int areaIdx, int mask, int targetMask) override;
|
void DrawSortedGeometry(int areaIdx, int mask, int targetMask) override;
|
||||||
void DrawStaticGeometry(int areaIdx, int mask, int targetMask) override;
|
void DrawStaticGeometry(int areaIdx, int mask, int targetMask) override;
|
||||||
@ -88,10 +88,10 @@ public:
|
|||||||
void AddPlaneObject() override;
|
void AddPlaneObject() override;
|
||||||
void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
||||||
IRenderer::EDrawableSorting sorting) override;
|
IRenderer::EDrawableSorting sorting) override;
|
||||||
void SetDrawableCallback(TDrawableCallback cb, void* ctx) override;
|
void SetDrawableCallback(TDrawableCallback cb, const void* ctx) override;
|
||||||
void SetWorldViewpoint() override;
|
void SetWorldViewpoint(const CTransform4f& xf) override;
|
||||||
void SetPerspective1(float, float, float, float, float) override;
|
void SetPerspective(float, float, float, float, float) override;
|
||||||
void SetPerspective2() override;
|
void SetPerspective(float, float, float, float) override;
|
||||||
rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
||||||
float zfar) override;
|
float zfar) override;
|
||||||
void SetClippingPlanes(const CFrustumPlanes&) override;
|
void SetClippingPlanes(const CFrustumPlanes&) override;
|
||||||
@ -105,10 +105,10 @@ public:
|
|||||||
void SetBlendMode_InvertSrc() override;
|
void SetBlendMode_InvertSrc() override;
|
||||||
void SetBlendMode_Replace() override;
|
void SetBlendMode_Replace() override;
|
||||||
void SetBlendMode_AdditiveDestColor() override;
|
void SetBlendMode_AdditiveDestColor() override;
|
||||||
void SetDebugOption() override;
|
void SetDebugOption(IRenderer::EDebugOption option, int value) override;
|
||||||
void BeginScene() override;
|
void BeginScene() override;
|
||||||
void EndScene() override;
|
void EndScene() override;
|
||||||
void BeginPrimitive(GXPrimitive prim, int count) override;
|
void BeginPrimitive(IRenderer::EPrimitiveType prim, int count) override;
|
||||||
void BeginLines(int nverts) override;
|
void BeginLines(int nverts) override;
|
||||||
void BeginLineStrip(int nverts) override;
|
void BeginLineStrip(int nverts) override;
|
||||||
void BeginTriangles(int nverts) override;
|
void BeginTriangles(int nverts) override;
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
void EndPrimitive() override;
|
void EndPrimitive() override;
|
||||||
void SetAmbientColor(const CColor& color) override;
|
void SetAmbientColor(const CColor& color) override;
|
||||||
void DrawString() override;
|
void DrawString() override;
|
||||||
void GetFPS() override;
|
float GetFPS() override;
|
||||||
void CacheReflection() override;
|
void CacheReflection() override;
|
||||||
void DrawSpaceWarp() override;
|
void DrawSpaceWarp() override;
|
||||||
void DrawThermalModel() override;
|
void DrawThermalModel() override;
|
||||||
@ -144,6 +144,7 @@ public:
|
|||||||
void AllocatePhazonSuitMaskTexture();
|
void AllocatePhazonSuitMaskTexture();
|
||||||
|
|
||||||
void SetRequestRGBA6(bool req) { x318_26_requestRGBA6 = req; }
|
void SetRequestRGBA6(bool req) { x318_26_requestRGBA6 = req; }
|
||||||
|
CTexture* GetRealReflection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CResFactory& x8_factory;
|
CResFactory& x8_factory;
|
||||||
@ -151,16 +152,13 @@ private:
|
|||||||
CFont x10_font;
|
CFont x10_font;
|
||||||
int x18_primVertCount;
|
int x18_primVertCount;
|
||||||
rstl::list< CAreaListItem > x1c_areaListItems;
|
rstl::list< CAreaListItem > x1c_areaListItems;
|
||||||
int x34_unk1;
|
rstl::vector< CCubeSurface > x34_surfaces;
|
||||||
int x38_unk2;
|
|
||||||
int x3c_unk3;
|
|
||||||
int x40_unk4;
|
|
||||||
CFrustumPlanes x44_frustumPlanes;
|
CFrustumPlanes x44_frustumPlanes;
|
||||||
TDrawableCallback xa8_drawableCallback;
|
TDrawableCallback xa8_drawableCallback;
|
||||||
void* xac_drawableCallbackUserData;
|
const void* xac_drawableCallbackUserData;
|
||||||
CPlane xb0_viewPlane;
|
CPlane xb0_viewPlane;
|
||||||
uchar xc0_pvsMode;
|
uchar xc0_pvsMode; // bool?
|
||||||
int xc4_unk5;
|
int xc4_pvsState;
|
||||||
rstl::optional_object< CPVSVisSet > xc8_pvsVisSet;
|
rstl::optional_object< CPVSVisSet > xc8_pvsVisSet;
|
||||||
int xe0_pvsAreaIdx;
|
int xe0_pvsAreaIdx;
|
||||||
CTexture xe4_blackTex;
|
CTexture xe4_blackTex;
|
||||||
@ -196,6 +194,9 @@ private:
|
|||||||
void GenerateSphereRampTex();
|
void GenerateSphereRampTex();
|
||||||
void LoadThermoPalette();
|
void LoadThermoPalette();
|
||||||
|
|
||||||
|
rstl::list< CCubeRenderer::CAreaListItem >::iterator
|
||||||
|
FindStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry);
|
||||||
|
|
||||||
static CCubeRenderer* sRenderer;
|
static CCubeRenderer* sRenderer;
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CCubeRenderer, 0x31C);
|
CHECK_SIZEOF(CCubeRenderer, 0x31C);
|
||||||
|
@ -2,27 +2,31 @@
|
|||||||
#define _IRENDERER
|
#define _IRENDERER
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include <dolphin/gx/GXEnum.h>
|
#include <dolphin/gx/GXEnum.h>
|
||||||
|
|
||||||
#include "rstl/pair.hpp"
|
#include "rstl/pair.hpp"
|
||||||
#include "rstl/vector.hpp"
|
#include "rstl/vector.hpp"
|
||||||
|
|
||||||
#include "Kyoto/TToken.hpp"
|
#include "Kyoto/TToken.hpp"
|
||||||
|
|
||||||
class CTransform4f;
|
|
||||||
class CParticleGen;
|
|
||||||
class IObjectStore;
|
|
||||||
class COsContext;
|
|
||||||
class CMemorySys;
|
|
||||||
class CResFactory;
|
|
||||||
class CAABox;
|
class CAABox;
|
||||||
|
class CAreaOctTree;
|
||||||
|
class CColor;
|
||||||
|
class CFrustumPlanes;
|
||||||
|
class CLight;
|
||||||
|
class CMemorySys;
|
||||||
|
class CMetroidModelInstance;
|
||||||
|
class CModel;
|
||||||
|
class COsContext;
|
||||||
|
class CParticleGen;
|
||||||
|
class CPVSVisSet;
|
||||||
|
class CResFactory;
|
||||||
|
class CSkinnedModel;
|
||||||
|
class CTransform4f;
|
||||||
class CVector2f;
|
class CVector2f;
|
||||||
class CVector3f;
|
class CVector3f;
|
||||||
class CModel;
|
class IObjectStore;
|
||||||
class CFrustumPlanes;
|
|
||||||
class CSkinnedModel;
|
|
||||||
class CColor;
|
|
||||||
class CLight;
|
|
||||||
class CPVSVisSet;
|
|
||||||
|
|
||||||
class IRenderer {
|
class IRenderer {
|
||||||
public:
|
public:
|
||||||
@ -33,13 +37,31 @@ public:
|
|||||||
kDS_UnsortedCallback,
|
kDS_UnsortedCallback,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum EPrimitiveType {
|
||||||
|
kPT_Quads = GX_QUADS,
|
||||||
|
kPT_Triangles = GX_TRIANGLES,
|
||||||
|
kPT_TriangleStrip = GX_TRIANGLESTRIP,
|
||||||
|
kPT_TriangleFan = GX_TRIANGLEFAN,
|
||||||
|
kPT_Lines = GX_LINES,
|
||||||
|
kPT_LineStrip = GX_LINESTRIP,
|
||||||
|
kPT_Points = GX_POINTS,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EDebugOption {
|
||||||
|
kDO_Invalid = -1,
|
||||||
|
kDO_PVSMode,
|
||||||
|
kDO_PVSState,
|
||||||
|
kDO_FogDisabled,
|
||||||
|
};
|
||||||
|
|
||||||
virtual ~IRenderer();
|
virtual ~IRenderer();
|
||||||
// TODO vtable
|
// TODO vtable
|
||||||
|
|
||||||
virtual void AddStaticGeometry();
|
virtual void AddStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry,
|
||||||
|
const CAreaOctTree* octTree, int areaIdx);
|
||||||
virtual void EnablePVS(const CPVSVisSet& set, int areaIdx);
|
virtual void EnablePVS(const CPVSVisSet& set, int areaIdx);
|
||||||
virtual void DisablePVS();
|
virtual void DisablePVS();
|
||||||
virtual void RemoveStaticGeometry();
|
virtual void RemoveStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry);
|
||||||
virtual void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask);
|
virtual void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask);
|
||||||
virtual void DrawSortedGeometry(int areaIdx, int mask, int targetMask);
|
virtual void DrawSortedGeometry(int areaIdx, int mask, int targetMask);
|
||||||
virtual void DrawStaticGeometry(int areaIdx, int mask, int targetMask);
|
virtual void DrawStaticGeometry(int areaIdx, int mask, int targetMask);
|
||||||
@ -51,10 +73,10 @@ public:
|
|||||||
virtual void AddPlaneObject();
|
virtual void AddPlaneObject();
|
||||||
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
||||||
IRenderer::EDrawableSorting sorting);
|
IRenderer::EDrawableSorting sorting);
|
||||||
virtual void SetDrawableCallback(TDrawableCallback cb, void* ctx);
|
virtual void SetDrawableCallback(TDrawableCallback cb, const void* ctx);
|
||||||
virtual void SetWorldViewpoint();
|
virtual void SetWorldViewpoint(const CTransform4f& xf);
|
||||||
virtual void SetPerspective1(float, float, float, float, float);
|
virtual void SetPerspective(float, float, float, float, float);
|
||||||
virtual void SetPerspective2();
|
virtual void SetPerspective(float, float, float, float);
|
||||||
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
||||||
float zfar);
|
float zfar);
|
||||||
virtual void SetClippingPlanes(const CFrustumPlanes&);
|
virtual void SetClippingPlanes(const CFrustumPlanes&);
|
||||||
@ -69,10 +91,10 @@ public:
|
|||||||
virtual void SetBlendMode_Replace();
|
virtual void SetBlendMode_Replace();
|
||||||
virtual void SetBlendMode_AdditiveDestColor();
|
virtual void SetBlendMode_AdditiveDestColor();
|
||||||
|
|
||||||
virtual void SetDebugOption();
|
virtual void SetDebugOption(IRenderer::EDebugOption option, int value);
|
||||||
virtual void BeginScene();
|
virtual void BeginScene();
|
||||||
virtual void EndScene();
|
virtual void EndScene();
|
||||||
virtual void BeginPrimitive(GXPrimitive prim, int count);
|
virtual void BeginPrimitive(IRenderer::EPrimitiveType prim, int count);
|
||||||
virtual void BeginLines(int nverts);
|
virtual void BeginLines(int nverts);
|
||||||
virtual void BeginLineStrip(int nverts);
|
virtual void BeginLineStrip(int nverts);
|
||||||
virtual void BeginTriangles(int nverts);
|
virtual void BeginTriangles(int nverts);
|
||||||
@ -85,7 +107,7 @@ public:
|
|||||||
virtual void EndPrimitive();
|
virtual void EndPrimitive();
|
||||||
virtual void SetAmbientColor(const CColor& color);
|
virtual void SetAmbientColor(const CColor& color);
|
||||||
virtual void DrawString();
|
virtual void DrawString();
|
||||||
virtual void GetFPS();
|
virtual float GetFPS();
|
||||||
virtual void CacheReflection();
|
virtual void CacheReflection();
|
||||||
virtual void DrawSpaceWarp();
|
virtual void DrawSpaceWarp();
|
||||||
virtual void DrawThermalModel();
|
virtual void DrawThermalModel();
|
||||||
@ -103,9 +125,11 @@ public:
|
|||||||
virtual void SetGXRegister1Color();
|
virtual void SetGXRegister1Color();
|
||||||
virtual void SetWorldLightFadeLevel();
|
virtual void SetWorldLightFadeLevel();
|
||||||
virtual void Something();
|
virtual void Something();
|
||||||
virtual void PrepareDynamicLights(const rstl::vector<CLight>& lights);
|
virtual void PrepareDynamicLights(const rstl::vector< CLight >& lights);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline IRenderer::~IRenderer() {}
|
||||||
|
|
||||||
namespace Renderer {
|
namespace Renderer {
|
||||||
IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
||||||
}; // namespace Renderer
|
}; // namespace Renderer
|
||||||
|
@ -20,7 +20,7 @@ enum ESteeringBlendMode {
|
|||||||
class CBodyStateCmd {
|
class CBodyStateCmd {
|
||||||
public:
|
public:
|
||||||
CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
|
CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
|
||||||
virtual ~CBodyStateCmd(){};
|
virtual ~CBodyStateCmd() {};
|
||||||
|
|
||||||
EBodyStateCmd GetCommandId() const { return x4_cmd; }
|
EBodyStateCmd GetCommandId() const { return x4_cmd; }
|
||||||
|
|
||||||
@ -342,7 +342,10 @@ private:
|
|||||||
class CBCCoverCmd : public CBodyStateCmd {
|
class CBCCoverCmd : public CBodyStateCmd {
|
||||||
public:
|
public:
|
||||||
CBCCoverCmd(pas::ECoverDirection dir, const CVector3f& v1, const CVector3f& v2)
|
CBCCoverCmd(pas::ECoverDirection dir, const CVector3f& v1, const CVector3f& v2)
|
||||||
: CBodyStateCmd(kBSC_Cover), x8_dir(dir), xc_targetPos(v1), x18_alignDir(v2) {}
|
: CBodyStateCmd(kBSC_Cover)
|
||||||
|
, x8_dir(dir)
|
||||||
|
, xc_targetPos(v1)
|
||||||
|
, x18_alignDir(v2, CUnitVector3f::kN_No /* ? */) {}
|
||||||
|
|
||||||
pas::ECoverDirection GetDirection() const { return x8_dir; }
|
pas::ECoverDirection GetDirection() const { return x8_dir; }
|
||||||
const CVector3f& GetTarget() const { return xc_targetPos; }
|
const CVector3f& GetTarget() const { return xc_targetPos; }
|
||||||
|
@ -22,7 +22,8 @@ class CRipple {
|
|||||||
uint x3c_;
|
uint x3c_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CRipple(TUniqueId id, const CVector3f& center, float intensity);
|
CRipple(TUniqueId id = kInvalidUniqueId, const CVector3f& center = CVector3f::Zero(),
|
||||||
|
float intensity = 0.f);
|
||||||
|
|
||||||
TUniqueId GetUniqueId() const { return x0_id; }
|
TUniqueId GetUniqueId() const { return x0_id; }
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ class IWeaponRenderer {
|
|||||||
public:
|
public:
|
||||||
virtual ~IWeaponRenderer() = 0;
|
virtual ~IWeaponRenderer() = 0;
|
||||||
virtual void AddParticleGen(const CParticleGen& gen) = 0;
|
virtual void AddParticleGen(const CParticleGen& gen) = 0;
|
||||||
|
|
||||||
static void SetRenderer(IWeaponRenderer* renderer) { sWeaponRenderer = renderer; }
|
static void SetRenderer(IWeaponRenderer* renderer) { sWeaponRenderer = renderer; }
|
||||||
static IWeaponRenderer* GetRenderer() { return sWeaponRenderer; }
|
static IWeaponRenderer* GetRenderer() { return sWeaponRenderer; }
|
||||||
|
|
||||||
|
@ -11,13 +11,24 @@ public:
|
|||||||
CMetroidModelInstance(const void* header, const void* firstGeom, const void* positions,
|
CMetroidModelInstance(const void* header, const void* firstGeom, const void* positions,
|
||||||
const void* normals, const void* colors, const void* texCoords,
|
const void* normals, const void* colors, const void* texCoords,
|
||||||
const void* packedTexCoords, const rstl::vector< void* >& surfaces);
|
const void* packedTexCoords, const rstl::vector< void* >& surfaces);
|
||||||
|
~CMetroidModelInstance() {}
|
||||||
|
|
||||||
|
int GetFlags() const { return x0_visorFlags; }
|
||||||
|
const CAABox& GetBoundingBox() const { return x34_worldAABB; }
|
||||||
|
const void* GetMaterialPointer() const { return x4c_materialData; }
|
||||||
|
const rstl::vector< void* >& GetSurfaces() const { return x50_surfaces; }
|
||||||
|
const void* GetVertexPointer() const { return x60_positions; }
|
||||||
|
const void* GetNormalPointer() const { return x64_normals; }
|
||||||
|
const void* GetColorPointer() const { return x68_colors; }
|
||||||
|
const void* GetTCPointer() const { return x6c_texCoords; }
|
||||||
|
const void* GetPackedTCPointer() const { return x70_packedTexCoords; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u32 x0_visorFlags;
|
int x0_visorFlags;
|
||||||
CTransform4f x4_worldXf;
|
CTransform4f x4_worldXf;
|
||||||
CAABox x34_worldAABB;
|
CAABox x34_worldAABB;
|
||||||
const void* x4c_materialData;
|
const void* x4c_materialData;
|
||||||
rstl::vector<void*> x50_surfaces;
|
rstl::vector< void* > x50_surfaces;
|
||||||
const void* x60_positions;
|
const void* x60_positions;
|
||||||
const void* x64_normals;
|
const void* x64_normals;
|
||||||
const void* x68_colors;
|
const void* x68_colors;
|
||||||
|
@ -159,7 +159,7 @@ list< T, Alloc >::~list() {
|
|||||||
node* it = cur;
|
node* it = cur;
|
||||||
node* next = cur->get_next();
|
node* next = cur->get_next();
|
||||||
cur = next;
|
cur = next;
|
||||||
destroy(it);
|
destroy(it->get_value());
|
||||||
x0_allocator.deallocate(it);
|
x0_allocator.deallocate(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
~reserved_vector() { clear(); }
|
~reserved_vector() { clear(); }
|
||||||
|
|
||||||
void push_back(const T& in) {
|
void push_back(const T& in) {
|
||||||
construct(&data()[x0_count], in);
|
construct(data() + x0_count, in);
|
||||||
++x0_count;
|
++x0_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,10 +69,12 @@ public:
|
|||||||
inline int capacity() const { return N; }
|
inline int capacity() const { return N; }
|
||||||
inline T& front() { return data()[0]; }
|
inline T& front() { return data()[0]; }
|
||||||
inline const T& front() const { return data()[0]; }
|
inline const T& front() const { return data()[0]; }
|
||||||
inline T& back() { return data()[x0_count - 1]; }
|
inline T& back() { return at(x0_count - 1); }
|
||||||
inline const T& back() const { return data()[x0_count - 1]; }
|
inline const T& back() const { return at(x0_count - 1); }
|
||||||
inline T& operator[](int idx) { return data()[idx]; }
|
inline T& operator[](int idx) { return data()[idx]; }
|
||||||
inline const T& operator[](int idx) const { return data()[idx]; }
|
inline const T& operator[](int idx) const { return data()[idx]; }
|
||||||
|
inline T& at(int idx) { return data()[idx]; }
|
||||||
|
inline const T& at(int idx) const { return data()[idx]; }
|
||||||
iterator erase(iterator it) {
|
iterator erase(iterator it) {
|
||||||
if (it >= begin() && it < end()) {
|
if (it >= begin() && it < end()) {
|
||||||
for (iterator j = it; j < end() - 1; ++j) {
|
for (iterator j = it; j < end() - 1; ++j) {
|
||||||
@ -84,7 +86,7 @@ public:
|
|||||||
return end();
|
return end();
|
||||||
}
|
}
|
||||||
|
|
||||||
void resize(int count, const T& item) {
|
void resize(int count, const T& item = T()) {
|
||||||
if (size() < count) {
|
if (size() < count) {
|
||||||
uninitialized_fill_n(end(), count - size(), item);
|
uninitialized_fill_n(end(), count - size(), item);
|
||||||
x0_count = count;
|
x0_count = count;
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reserve(int size);
|
void reserve(int size);
|
||||||
void resize(int size, const T& in);
|
void resize(int size, const T& in = T());
|
||||||
iterator insert(iterator it, const T& value);
|
iterator insert(iterator it, const T& value);
|
||||||
|
|
||||||
template < typename from_iterator >
|
template < typename from_iterator >
|
||||||
|
@ -67,8 +67,7 @@ CModel::CModel(const rstl::auto_ptr< uchar >& data, int length, IObjectStore& st
|
|||||||
x8_surfaces.reserve(surfaceCount);
|
x8_surfaces.reserve(surfaceCount);
|
||||||
|
|
||||||
for (int i = 0; i < surfaceCount; ++i) {
|
for (int i = 0; i < surfaceCount; ++i) {
|
||||||
x8_surfaces.push_back(
|
x8_surfaces.push_back(MemoryFromPartData(&dataCur, &secSizeCur));
|
||||||
reinterpret_cast< CCubeSurface* >(MemoryFromPartData(&dataCur, &secSizeCur)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SShader& shader = x18_matSets.front();
|
SShader& shader = x18_matSets.front();
|
||||||
|
@ -1,14 +1,32 @@
|
|||||||
#include "MetaRender/CCubeRenderer.hpp"
|
#include "MetaRender/CCubeRenderer.hpp"
|
||||||
|
|
||||||
|
#include "Kyoto/Animation/CSkinnedModel.hpp"
|
||||||
|
#include "Kyoto/Graphics/CColor.hpp"
|
||||||
|
#include "Kyoto/Graphics/CCubeModel.hpp"
|
||||||
|
#include "Kyoto/Graphics/CCubeSurface.hpp"
|
||||||
#include "Kyoto/Graphics/CDrawable.hpp"
|
#include "Kyoto/Graphics/CDrawable.hpp"
|
||||||
#include "Kyoto/Graphics/CDrawablePlaneObject.hpp"
|
#include "Kyoto/Graphics/CDrawablePlaneObject.hpp"
|
||||||
|
#include "Kyoto/Graphics/CGX.hpp"
|
||||||
|
#include "Kyoto/Graphics/CGraphics.hpp"
|
||||||
#include "Kyoto/Graphics/CGraphicsPalette.hpp"
|
#include "Kyoto/Graphics/CGraphicsPalette.hpp"
|
||||||
|
#include "Kyoto/Graphics/CLight.hpp" // IWYU pragma: keep
|
||||||
#include "Kyoto/Graphics/CModelFlags.hpp"
|
#include "Kyoto/Graphics/CModelFlags.hpp"
|
||||||
#include "Kyoto/Graphics/CTexture.hpp"
|
#include "Kyoto/Graphics/CTexture.hpp"
|
||||||
|
#include "Kyoto/IObjectStore.hpp"
|
||||||
|
#include "Kyoto/Math/CFrustumPlanes.hpp"
|
||||||
|
#include "Kyoto/Math/CPlane.hpp"
|
||||||
#include "Kyoto/Math/CTransform4f.hpp"
|
#include "Kyoto/Math/CTransform4f.hpp"
|
||||||
#include "Kyoto/Math/CUnitVector3f.hpp"
|
#include "Kyoto/Math/CUnitVector3f.hpp"
|
||||||
|
#include "Kyoto/Math/CVector2f.hpp"
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
#include "MetaRender/IRenderer.hpp"
|
||||||
|
#include "Weapons/IWeaponRenderer.hpp"
|
||||||
|
#include "WorldFormat/CMetroidModelInstance.hpp"
|
||||||
|
#include "dolphin/gx/GXEnum.h"
|
||||||
|
#include "dolphin/gx/GXGeometry.h"
|
||||||
|
#include "dolphin/gx/GXVert.h"
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
#include "rstl/auto_ptr.hpp"
|
||||||
#include "rstl/math.hpp"
|
#include "rstl/math.hpp"
|
||||||
#include "rstl/pair.hpp"
|
#include "rstl/pair.hpp"
|
||||||
#include "rstl/reserved_vector.hpp"
|
#include "rstl/reserved_vector.hpp"
|
||||||
@ -34,7 +52,7 @@ static rstl::reserved_vector< ushort, 8 >* sPlaneObjectBucket;
|
|||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
#define HOLDER(var) \
|
#define HOLDER(var) \
|
||||||
static uchar var##Holder[sizeof(__typeof__(*var))]; \
|
static uchar var##Holder[sizeof(__typeof__(*var)) + 4]; \
|
||||||
var = new (var##Holder) std::type_identity< __typeof__(*var) >::type();
|
var = new (var##Holder) std::type_identity< __typeof__(*var) >::type();
|
||||||
|
|
||||||
HOLDER(sData);
|
HOLDER(sData);
|
||||||
@ -42,7 +60,7 @@ void Init() {
|
|||||||
HOLDER(sPlaneObjectData);
|
HOLDER(sPlaneObjectData);
|
||||||
HOLDER(sPlaneObjectBucket);
|
HOLDER(sPlaneObjectBucket);
|
||||||
|
|
||||||
sBuckets->resize(50, BucketHolderType());
|
sBuckets->resize(50);
|
||||||
sMinMaxDistance = skWorstMinMaxDistance;
|
sMinMaxDistance = skWorstMinMaxDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,13 +72,14 @@ void Shutdown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO non-matching
|
// TODO non-matching
|
||||||
void Insert(const CVector3f& pos, const CAABox& aabb, EDrawableType dtype, const void* data,
|
void Insert(const CVector3f& pos, const CAABox& aabb, ushort dtype, const void* data,
|
||||||
const CPlane& plane, ushort extraSort) {
|
const CPlane& plane, ushort extraSort) {
|
||||||
if (sData->size() == sData->capacity()) {
|
if (sData->size() == sData->capacity()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float dist = plane.GetHeight(pos);
|
float dist = plane.GetHeight(pos);
|
||||||
sData->push_back(CDrawable(dtype, extraSort, dist, aabb, const_cast< void* >(data)));
|
const CDrawable& drawable = CDrawable(dtype, extraSort, dist, aabb, const_cast< void* >(data));
|
||||||
|
sData->push_back(drawable);
|
||||||
sMinMaxDistance.first = rstl::min_val(dist, sMinMaxDistance.first);
|
sMinMaxDistance.first = rstl::min_val(dist, sMinMaxDistance.first);
|
||||||
sMinMaxDistance.second = rstl::max_val(dist, sMinMaxDistance.second);
|
sMinMaxDistance.second = rstl::max_val(dist, sMinMaxDistance.second);
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
@ -90,13 +109,9 @@ void Clear() {
|
|||||||
} // namespace Buckets
|
} // namespace Buckets
|
||||||
|
|
||||||
CCubeRenderer::CAreaListItem::CAreaListItem(
|
CCubeRenderer::CAreaListItem::CAreaListItem(
|
||||||
const rstl::vector< CMetroidModelInstance, rstl::rmemory_allocator >* geometry,
|
const rstl::vector< CMetroidModelInstance >* geometry, const CAreaOctTree* octTree,
|
||||||
const CAreaOctTree* octTree,
|
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture > > >& textures,
|
||||||
const rstl::auto_ptr< rstl::vector< TCachedToken< CTexture >, rstl::rmemory_allocator > >&
|
const rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel > > >& models, int areaIdx)
|
||||||
textures,
|
|
||||||
const rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel >, rstl::rmemory_allocator > >&
|
|
||||||
models,
|
|
||||||
int areaIdx)
|
|
||||||
: x0_geometry(geometry)
|
: x0_geometry(geometry)
|
||||||
, x4_octTree(octTree)
|
, x4_octTree(octTree)
|
||||||
, x8_textures(textures)
|
, x8_textures(textures)
|
||||||
@ -114,12 +129,7 @@ CCubeRenderer::CCubeRenderer(IObjectStore& objStore, COsContext& osContext, CMem
|
|||||||
, x10_font(1.f)
|
, x10_font(1.f)
|
||||||
, x18_primVertCount(0)
|
, x18_primVertCount(0)
|
||||||
, x1c_areaListItems()
|
, x1c_areaListItems()
|
||||||
#if NONMATCHING
|
, x34_surfaces()
|
||||||
, x34_unk1(0)
|
|
||||||
#endif
|
|
||||||
, x38_unk2(0)
|
|
||||||
, x3c_unk3(0)
|
|
||||||
, x40_unk4(0)
|
|
||||||
, x44_frustumPlanes(CTransform4f::Identity(), 1.5707964f, 1.f, 1.f, false, 100.f)
|
, x44_frustumPlanes(CTransform4f::Identity(), 1.5707964f, 1.f, 1.f, false, 100.f)
|
||||||
, xa8_drawableCallback(nullptr)
|
, xa8_drawableCallback(nullptr)
|
||||||
#if NONMATCHING
|
#if NONMATCHING
|
||||||
@ -170,3 +180,305 @@ CCubeRenderer::CCubeRenderer(IObjectStore& objStore, COsContext& osContext, CMem
|
|||||||
Buckets::Init();
|
Buckets::Init();
|
||||||
fn_80352740();
|
fn_80352740();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::GenerateReflectionTex() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::GenerateFogVolumeRampTex() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::GenerateSphereRampTex() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::LoadThermoPalette() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
CCubeRenderer::~CCubeRenderer() {
|
||||||
|
sRenderer = nullptr;
|
||||||
|
Buckets::Shutdown();
|
||||||
|
CSkinnedModel::RemoveDummySkinnedModelRef();
|
||||||
|
if (!x314_phazonSuitMask.null()) {
|
||||||
|
x314_phazonSuitMask->fn_8030E10C();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::AddStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry,
|
||||||
|
const CAreaOctTree* octTree, int areaIdx) {
|
||||||
|
if (FindStaticGeometry(geometry) == x1c_areaListItems.end()) {
|
||||||
|
rstl::auto_ptr< rstl::vector< rstl::auto_ptr< CCubeModel > > > models =
|
||||||
|
rs_new rstl::vector< rstl::auto_ptr< CCubeModel > >();
|
||||||
|
rstl::auto_ptr< rstl::vector< TCachedToken< CTexture > > > textures =
|
||||||
|
rs_new rstl::vector< TCachedToken< CTexture > >();
|
||||||
|
if (!geometry->empty()) {
|
||||||
|
CCubeModel::MakeTexturesFromMats(geometry->front().GetMaterialPointer(), *textures,
|
||||||
|
xc_objStore, false);
|
||||||
|
models->reserve(geometry->size());
|
||||||
|
for (int i = 0; i < geometry->size(); ++i) {
|
||||||
|
const CMetroidModelInstance* it = &geometry->at(i);
|
||||||
|
models->push_back(rs_new CCubeModel(
|
||||||
|
const_cast< rstl::vector< void* >* >(&it->GetSurfaces()), textures.get(),
|
||||||
|
it->GetMaterialPointer(), it->GetVertexPointer(), it->GetColorPointer(),
|
||||||
|
it->GetNormalPointer(), it->GetTCPointer(), it->GetPackedTCPointer(),
|
||||||
|
it->GetBoundingBox(), it->GetFlags(), false, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x1c_areaListItems.push_back(CAreaListItem(geometry, octTree, textures, models, areaIdx));
|
||||||
|
GXInvalidateVtxCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rstl::list< CCubeRenderer::CAreaListItem >::iterator
|
||||||
|
CCubeRenderer::FindStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry) {
|
||||||
|
for (AUTO(it, x1c_areaListItems.begin()); it != x1c_areaListItems.end(); ++it) {
|
||||||
|
if (it->x0_geometry == geometry) {
|
||||||
|
return it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return x1c_areaListItems.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::RemoveStaticGeometry(const rstl::vector< CMetroidModelInstance >* geometry) {
|
||||||
|
AUTO(search, FindStaticGeometry(geometry));
|
||||||
|
if (search != x1c_areaListItems.end()) {
|
||||||
|
x1c_areaListItems.erase(search);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetModelMatrix(const CTransform4f& xf) { CGraphics::SetModelMatrix(xf); }
|
||||||
|
|
||||||
|
// TODO non-matching
|
||||||
|
void CCubeRenderer::SetWorldViewpoint(const CTransform4f& xf) {
|
||||||
|
CGraphics::SetViewPointMatrix(xf);
|
||||||
|
const CUnitVector3f forward(xf.GetColumn(kDY), CUnitVector3f::kN_No);
|
||||||
|
xb0_viewPlane = CPlane(CVector3f::Dot(forward, xf.GetTranslation()), forward);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginScene() {
|
||||||
|
int width = CGraphics::GetViewport().mWidth;
|
||||||
|
int height = CGraphics::GetViewport().mHeight;
|
||||||
|
CGraphics::SetUseVideoFilter(true);
|
||||||
|
CGraphics::SetViewport(0, 0, width, height);
|
||||||
|
CGraphics::SetClearColor(CColor(static_cast< uchar >(0), static_cast< uchar >(0),
|
||||||
|
static_cast< uchar >(0), static_cast< uchar >(0)));
|
||||||
|
CGraphics::SetCullMode(kCM_Front);
|
||||||
|
CGraphics::SetDepthWriteMode(true, kE_LEqual, true);
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcAlpha, kBF_InvSrcAlpha, kLO_Clear);
|
||||||
|
#if NONMATCHING
|
||||||
|
float aspect = static_cast< float >(width) / static_cast< float >(height);
|
||||||
|
#else
|
||||||
|
float aspect = 1.3333334f;
|
||||||
|
#endif
|
||||||
|
CGraphics::SetPerspective(75.f, aspect, 1.f, 4096.f);
|
||||||
|
CGraphics::SetModelMatrix(CTransform4f::Identity());
|
||||||
|
CGraphics::TickRenderTimings();
|
||||||
|
if (x310_phazonSuitMaskCountdown != 0) {
|
||||||
|
--x310_phazonSuitMaskCountdown;
|
||||||
|
if (x310_phazonSuitMaskCountdown == 0) {
|
||||||
|
x314_phazonSuitMask->fn_8030E10C();
|
||||||
|
x314_phazonSuitMask = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x318_27_currentRGBA6 = x318_26_requestRGBA6;
|
||||||
|
if (!x318_31_persistRGBA6) {
|
||||||
|
x318_26_requestRGBA6 = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
GXSetPixelFmt(x318_27_currentRGBA6 ? GX_PF_RGBA6_Z24 : GX_PF_RGB8_Z24, GX_ZC_LINEAR);
|
||||||
|
GXSetAlphaUpdate(GX_TRUE);
|
||||||
|
GXSetDstAlpha(GX_TRUE, 0);
|
||||||
|
CGraphics::BeginScene();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::EndScene() {
|
||||||
|
x318_31_persistRGBA6 = !CGraphics::IsBeginSceneClearFb();
|
||||||
|
CGraphics::EndScene();
|
||||||
|
if (x2dc_reflectionAge >= 2) {
|
||||||
|
x14c_reflectionTex = nullptr;
|
||||||
|
} else {
|
||||||
|
++x2dc_reflectionAge;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::AddParticleGen(const CParticleGen& gen) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Renderer {
|
||||||
|
IRenderer* AllocateRenderer(IObjectStore& objStore, COsContext& osContext, CMemorySys& memorySys,
|
||||||
|
CResFactory& resFactory) {
|
||||||
|
CCubeRenderer* renderer = rs_new CCubeRenderer(objStore, osContext, memorySys, resFactory);
|
||||||
|
IWeaponRenderer::SetRenderer(renderer);
|
||||||
|
return renderer;
|
||||||
|
}
|
||||||
|
} // namespace Renderer
|
||||||
|
|
||||||
|
void CCubeRenderer::PrimColor(float r, float g, float b, float a) {
|
||||||
|
x2e0_primColor.Set(r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::PrimColor(const CColor& color) { x2e0_primColor = color; }
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginPrimitive(IRenderer::EPrimitiveType type, int nverts) {
|
||||||
|
const GXVtxDescList vtxDescList[4] = {
|
||||||
|
{GX_VA_POS, GX_DIRECT},
|
||||||
|
{GX_VA_NRM, GX_DIRECT},
|
||||||
|
{GX_VA_CLR0, GX_DIRECT},
|
||||||
|
{GX_VA_NULL, GX_NONE},
|
||||||
|
};
|
||||||
|
CGX::SetChanCtrl(CGX::Channel0, false, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE,
|
||||||
|
GX_AF_NONE);
|
||||||
|
CGX::SetNumChans(1);
|
||||||
|
CGX::SetNumTexGens(0);
|
||||||
|
CGX::SetNumTevStages(1);
|
||||||
|
CGX::SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||||
|
CGX::SetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_RASC);
|
||||||
|
CGX::SetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_RASA);
|
||||||
|
CGX::SetStandardTevColorAlphaOp(GX_TEVSTAGE0);
|
||||||
|
x18_primVertCount = nverts;
|
||||||
|
CGX::SetVtxDescv(vtxDescList);
|
||||||
|
CGX::Begin(GXPrimitive(type), GX_VTXFMT0, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginLines(int nverts) {
|
||||||
|
CCubeRenderer::BeginPrimitive(IRenderer::kPT_Lines, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginLineStrip(int nverts) {
|
||||||
|
CCubeRenderer::BeginPrimitive(IRenderer::kPT_LineStrip, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginTriangles(int nverts) {
|
||||||
|
CCubeRenderer::BeginPrimitive(IRenderer::kPT_Triangles, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginTriangleStrip(int nverts) {
|
||||||
|
CCubeRenderer::BeginPrimitive(IRenderer::kPT_TriangleStrip, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::BeginTriangleFan(int nverts) {
|
||||||
|
CCubeRenderer::BeginPrimitive(IRenderer::kPT_TriangleFan, nverts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::PrimVertex(const CVector3f& vtx) {
|
||||||
|
--x18_primVertCount;
|
||||||
|
GXPosition3f32(vtx.GetX(), vtx.GetY(), vtx.GetZ());
|
||||||
|
GXNormal3f32(x2e4_primNormal.GetX(), x2e4_primNormal.GetY(), x2e4_primNormal.GetZ());
|
||||||
|
GXColor1u32(x2e0_primColor.GetColor_u32());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::PrimNormal(const CVector3f& nrm) { x2e4_primNormal = nrm; }
|
||||||
|
|
||||||
|
void CCubeRenderer::EndPrimitive() {
|
||||||
|
while (x18_primVertCount != 0) {
|
||||||
|
PrimVertex(CVector3f::Zero());
|
||||||
|
}
|
||||||
|
CGX::End();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetAmbientColor(const CColor& color) { CGraphics::SetAmbientColor(color); }
|
||||||
|
|
||||||
|
void CCubeRenderer::SetPerspective(float fovy, float aspect, float znear, float zfar) {
|
||||||
|
CGraphics::SetPerspective(fovy, aspect, znear, zfar);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetPerspective(float fovy, float width, float height, float znear, float zfar) {
|
||||||
|
CGraphics::SetPerspective(fovy, width / height, znear, zfar);
|
||||||
|
}
|
||||||
|
|
||||||
|
rstl::pair< CVector2f, CVector2f > CCubeRenderer::SetViewportOrtho(bool centered, float znear,
|
||||||
|
float zfar) {
|
||||||
|
const CViewport& vp = CGraphics::GetViewport();
|
||||||
|
int vpLeft = vp.mLeft;
|
||||||
|
int vpTop = vp.mTop;
|
||||||
|
int vpWidth = vp.mWidth;
|
||||||
|
int vpHeight = vp.mHeight;
|
||||||
|
float left = static_cast< float >(centered ? vpLeft - vpWidth / 2 : vpLeft);
|
||||||
|
float top = static_cast< float >(centered ? vpTop - vpHeight / 2 : vpTop);
|
||||||
|
float right = static_cast< float >(centered ? vpLeft + vpWidth / 2 : vpLeft + vpWidth);
|
||||||
|
float bottom = static_cast< float >(centered ? vpTop + vpHeight / 2 : vpTop + vpHeight);
|
||||||
|
CGraphics::SetOrtho(left, right, bottom, top, znear, zfar);
|
||||||
|
CGraphics::SetViewPointMatrix(CTransform4f::Identity());
|
||||||
|
CGraphics::SetModelMatrix(CTransform4f::Identity());
|
||||||
|
return rstl::pair< CVector2f, CVector2f >(CVector2f(left, top), CVector2f(right, bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetViewport(int left, int bottom, int width, int height) {
|
||||||
|
CGraphics::SetViewport(left, bottom, width, height);
|
||||||
|
CGraphics::SetScissor(left, bottom, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetDepthReadWrite(bool read, bool update) {
|
||||||
|
CGraphics::SetDepthWriteMode(read, kE_LEqual, update);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_AdditiveAlpha() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcAlpha, kBF_One, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_AlphaBlended() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcAlpha, kBF_InvSrcAlpha, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_NoColorWrite() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_Zero, kBF_One, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_ColorMultiply() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_Zero, kBF_SrcColor, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_InvertDst() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_InvSrcColor, kBF_Zero, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_InvertSrc() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Logic, kBF_One, kBF_Zero, kLO_InvCopy);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_Replace() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_One, kBF_Zero, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetBlendMode_AdditiveDestColor() {
|
||||||
|
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcColor, kBF_One, kLO_Clear);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetClippingPlanes(const CFrustumPlanes& frustum) {
|
||||||
|
x44_frustumPlanes = frustum;
|
||||||
|
}
|
||||||
|
|
||||||
|
float CCubeRenderer::GetFPS() { return CGraphics::GetFPS(); }
|
||||||
|
|
||||||
|
void CCubeRenderer::SetDrawableCallback(IRenderer::TDrawableCallback cb, const void* ctx) {
|
||||||
|
xa8_drawableCallback = cb;
|
||||||
|
xac_drawableCallbackUserData = ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCubeRenderer::SetDebugOption(IRenderer::EDebugOption option, int value) {
|
||||||
|
switch (option) {
|
||||||
|
case IRenderer::kDO_PVSMode:
|
||||||
|
xc0_pvsMode = value != 0 ? 1 : 0;
|
||||||
|
break;
|
||||||
|
case IRenderer::kDO_PVSState:
|
||||||
|
xc4_pvsState = value;
|
||||||
|
break;
|
||||||
|
case IRenderer::kDO_FogDisabled:
|
||||||
|
x318_28_disableFog = value != 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CTexture* CCubeRenderer::GetRealReflection() {
|
||||||
|
x2dc_reflectionAge = 0;
|
||||||
|
if (!x14c_reflectionTex.null()) {
|
||||||
|
return x14c_reflectionTex.get();
|
||||||
|
}
|
||||||
|
return &xe4_blackTex;
|
||||||
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
CFluidUVMotion::CFluidUVMotion(float timeToWrap, float orientation)
|
CFluidUVMotion::CFluidUVMotion(float timeToWrap, float orientation)
|
||||||
: x0_fluidLayers(), x4c_ooTimeToWrap(1.f / timeToWrap), x50_orientation(orientation) {
|
: x0_fluidLayers(), x4c_ooTimeToWrap(1.f / timeToWrap), x50_orientation(orientation) {
|
||||||
x0_fluidLayers.resize(kFM_NumLayers, SFluidLayerMotion());
|
x0_fluidLayers.resize(kFM_NumLayers);
|
||||||
x0_fluidLayers[0] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 1000.f);
|
x0_fluidLayers[0] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 1000.f);
|
||||||
x0_fluidLayers[1] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 3.f);
|
x0_fluidLayers[1] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 3.f);
|
||||||
x0_fluidLayers[2] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 5.f, CMath::Deg2Rad(45.f));
|
x0_fluidLayers[2] = SFluidLayerMotion(CFluidUVMotion::kFM_Linear, 5.f, CMath::Deg2Rad(45.f));
|
||||||
@ -15,7 +15,7 @@ CFluidUVMotion::CFluidUVMotion(float timeToWrap, float orientation,
|
|||||||
const SFluidLayerMotion& pattern1Layer,
|
const SFluidLayerMotion& pattern1Layer,
|
||||||
const SFluidLayerMotion& pattern2Layer)
|
const SFluidLayerMotion& pattern2Layer)
|
||||||
: x0_fluidLayers(), x4c_ooTimeToWrap(1.f / timeToWrap), x50_orientation(orientation) {
|
: x0_fluidLayers(), x4c_ooTimeToWrap(1.f / timeToWrap), x50_orientation(orientation) {
|
||||||
x0_fluidLayers.resize(kFM_NumLayers, SFluidLayerMotion());
|
x0_fluidLayers.resize(kFM_NumLayers);
|
||||||
x0_fluidLayers[0] = colorLayer;
|
x0_fluidLayers[0] = colorLayer;
|
||||||
x0_fluidLayers[1] = pattern1Layer;
|
x0_fluidLayers[1] = pattern1Layer;
|
||||||
x0_fluidLayers[2] = pattern2Layer;
|
x0_fluidLayers[2] = pattern2Layer;
|
||||||
|
@ -12,11 +12,13 @@
|
|||||||
|
|
||||||
#include "rstl/math.hpp"
|
#include "rstl/math.hpp"
|
||||||
|
|
||||||
|
|
||||||
CGameCubeDoll::CGameCubeDoll()
|
CGameCubeDoll::CGameCubeDoll()
|
||||||
: x0_model(gpSimplePool->GetObj("CMDL_GameCube"))
|
: x0_model(gpSimplePool->GetObj("CMDL_GameCube"))
|
||||||
, x8_lights(1, CLight::BuildDirectional(CVector3f::Forward(), CColor(0xFFFFFFFF)), rstl::rmemory_allocator())
|
, x8_lights(1, CLight::BuildDirectional(CVector3f::Forward(), CColor(0xFFFFFFFF)),
|
||||||
, x18_actorLights(rs_new CActorLights(8, CVector3f::Zero(), 4, 4, CActorLights::kDefaultPositionUpdateThreshold, false, false, false))
|
rstl::rmemory_allocator())
|
||||||
|
, x18_actorLights(rs_new CActorLights(8, CVector3f::Zero(), 4, 4,
|
||||||
|
CActorLights::kDefaultPositionUpdateThreshold, false, false,
|
||||||
|
false))
|
||||||
, x1c_fader(0.0f)
|
, x1c_fader(0.0f)
|
||||||
, x20_24_loaded(false) {
|
, x20_24_loaded(false) {
|
||||||
x0_model.Lock();
|
x0_model.Lock();
|
||||||
@ -68,7 +70,7 @@ void CGameCubeDoll::Draw(float alpha) {
|
|||||||
|
|
||||||
float alphaFader = alpha * x1c_fader;
|
float alphaFader = alpha * x1c_fader;
|
||||||
|
|
||||||
gpRender->SetPerspective1(55.f, CGraphics::GetViewport().mWidth, CGraphics::GetViewport().mHeight,
|
gpRender->SetPerspective(55.f, CGraphics::GetViewport().mWidth, CGraphics::GetViewport().mHeight,
|
||||||
0.2f, 4096.f);
|
0.2f, 4096.f);
|
||||||
|
|
||||||
CGraphics::SetViewPointMatrix(CTransform4f::Translate(0.f, -2.f, 0.f));
|
CGraphics::SetViewPointMatrix(CTransform4f::Translate(0.f, -2.f, 0.f));
|
||||||
|
@ -671,7 +671,7 @@ void CMemoryCardDriver::InitializeFileInfo() {
|
|||||||
// CMemoryStreamOut w(fileInfo.BeginMemoryOut(3004));
|
// CMemoryStreamOut w(fileInfo.BeginMemoryOut(3004));
|
||||||
|
|
||||||
rstl::vector< u8 >& saveBuffer = fileInfo.SaveBuffer();
|
rstl::vector< u8 >& saveBuffer = fileInfo.SaveBuffer();
|
||||||
saveBuffer.resize(3004, '\x00');
|
saveBuffer.resize(3004);
|
||||||
CMemoryStreamOut w(saveBuffer.data(), 3004);
|
CMemoryStreamOut w(saveBuffer.data(), 3004);
|
||||||
|
|
||||||
SSaveHeader header(0);
|
SSaveHeader header(0);
|
||||||
|
@ -10,14 +10,14 @@ CRippleManager::CRippleManager(int maxRipples, float alpha)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CRippleManager::Init(int maxRipples) {
|
void CRippleManager::Init(int maxRipples) {
|
||||||
x4_ripples.resize(maxRipples, CRipple(kInvalidUniqueId, CVector3f::Zero(), 0.f));
|
x4_ripples.resize(maxRipples);
|
||||||
for (rstl::vector< CRipple >::iterator it = x4_ripples.begin(); it != x4_ripples.end(); ++it) {
|
for (AUTO(it, x4_ripples.begin()); it != x4_ripples.end(); ++it) {
|
||||||
it->SetTime(9999.f);
|
it->SetTime(9999.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRippleManager::Update(float dt) {
|
void CRippleManager::Update(float dt) {
|
||||||
for (rstl::vector< CRipple >::iterator it = x4_ripples.begin(); it != x4_ripples.end(); ++it) {
|
for (AUTO(it, x4_ripples.begin()); it != x4_ripples.end(); ++it) {
|
||||||
it->SetTime(it->GetTime() + dt);
|
it->SetTime(it->GetTime() + dt);
|
||||||
if (it->GetTime() < 9999.f) {
|
if (it->GetTime() < 9999.f) {
|
||||||
it->SetTime(9999.f);
|
it->SetTime(9999.f);
|
||||||
@ -28,8 +28,7 @@ void CRippleManager::Update(float dt) {
|
|||||||
float CRippleManager::GetLastRippleDeltaTime(TUniqueId rippler) const {
|
float CRippleManager::GetLastRippleDeltaTime(TUniqueId rippler) const {
|
||||||
float res = 9999.f;
|
float res = 9999.f;
|
||||||
|
|
||||||
for (rstl::vector< CRipple >::const_iterator it = x4_ripples.begin(); it != x4_ripples.end();
|
for (AUTO(it, x4_ripples.begin()); it != x4_ripples.end(); ++it) {
|
||||||
++it) {
|
|
||||||
if (rippler == it->GetUniqueId()) {
|
if (rippler == it->GetUniqueId()) {
|
||||||
if (res > it->GetTime()) {
|
if (res > it->GetTime()) {
|
||||||
res = it->GetTime();
|
res = it->GetTime();
|
||||||
@ -44,7 +43,7 @@ void CRippleManager::AddRipple(const CRipple& ripple) {
|
|||||||
float maxTime = 0.f;
|
float maxTime = 0.f;
|
||||||
rstl::vector< CRipple >::iterator oldestRipple = x4_ripples.end();
|
rstl::vector< CRipple >::iterator oldestRipple = x4_ripples.end();
|
||||||
|
|
||||||
for (rstl::vector< CRipple >::iterator it = x4_ripples.begin(); it != x4_ripples.end(); ++it) {
|
for (AUTO(it, x4_ripples.begin()); it != x4_ripples.end(); ++it) {
|
||||||
if (it->GetTime() == 9999.0f) {
|
if (it->GetTime() == 9999.0f) {
|
||||||
oldestRipple = it;
|
oldestRipple = it;
|
||||||
break;
|
break;
|
||||||
|
@ -172,7 +172,7 @@ CStateManager::CStateManager(const rstl::ncrc_ptr< CScriptMailbox >& mailbox,
|
|||||||
gpRender->SetDrawableCallback(RendererDrawCallback, this);
|
gpRender->SetDrawableCallback(RendererDrawCallback, this);
|
||||||
CMemory::SetOutOfMemoryCallback(MemoryAllocatorAllocationFailedCallback, this);
|
CMemory::SetOutOfMemoryCallback(MemoryAllocatorAllocationFailedCallback, this);
|
||||||
|
|
||||||
x90c_loaderFuncs.resize(x90c_loaderFuncs.capacity(), nullptr);
|
x90c_loaderFuncs.resize(x90c_loaderFuncs.capacity());
|
||||||
x90c_loaderFuncs[kST_Trigger] = ScriptLoader::LoadTrigger;
|
x90c_loaderFuncs[kST_Trigger] = ScriptLoader::LoadTrigger;
|
||||||
x90c_loaderFuncs[kST_DamageableTrigger] = ScriptLoader::LoadDamageableTrigger;
|
x90c_loaderFuncs[kST_DamageableTrigger] = ScriptLoader::LoadDamageableTrigger;
|
||||||
x90c_loaderFuncs[kST_Actor] = ScriptLoader::LoadActor;
|
x90c_loaderFuncs[kST_Actor] = ScriptLoader::LoadActor;
|
||||||
|
@ -64,16 +64,10 @@ void CWorldShadow::BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid
|
|||||||
x68_objPos = centerPoint;
|
x68_objPos = centerPoint;
|
||||||
x74_lightPos = light.GetPosition();
|
x74_lightPos = light.GetPosition();
|
||||||
CGraphics::SetViewPointMatrix(x4_view);
|
CGraphics::SetViewPointMatrix(x4_view);
|
||||||
CFrustumPlanes frumtum(
|
CFrustumPlanes frumtum(x4_view, fov * 0.01745329238474369, 1.0f, 0.1f, true,
|
||||||
x4_view,
|
distance + x64_objHalfExtent);
|
||||||
fov * 0.01745329238474369,
|
|
||||||
1.0f,
|
|
||||||
0.1f,
|
|
||||||
true,
|
|
||||||
distance + x64_objHalfExtent
|
|
||||||
);
|
|
||||||
gpRender->SetClippingPlanes(frumtum);
|
gpRender->SetClippingPlanes(frumtum);
|
||||||
gpRender->SetPerspective1(fov, x0_texture->GetWidth(), x0_texture->GetHeight(), 0.1f,
|
gpRender->SetPerspective(fov, x0_texture->GetWidth(), x0_texture->GetHeight(), 0.1f,
|
||||||
1000.f);
|
1000.f);
|
||||||
float backupDepthNear = CGraphics::GetDepthNear();
|
float backupDepthNear = CGraphics::GetDepthNear();
|
||||||
float backupDepthFar = CGraphics::GetDepthFar();
|
float backupDepthFar = CGraphics::GetDepthFar();
|
||||||
@ -130,10 +124,8 @@ void CWorldShadow::BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid
|
|||||||
|
|
||||||
if (motionBlur && x88_blurReset != true) {
|
if (motionBlur && x88_blurReset != true) {
|
||||||
CGraphics::SetDepthWriteMode(false, kE_LEqual, false);
|
CGraphics::SetDepthWriteMode(false, kE_LEqual, false);
|
||||||
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcAlpha,
|
CGraphics::SetBlendMode(kBM_Blend, kBF_SrcAlpha, kBF_InvSrcAlpha, kLO_Clear);
|
||||||
kBF_InvSrcAlpha, kLO_Clear);
|
CGraphics::SetAlphaCompare(kAF_Always, 0, kAO_And, kAF_Always, 0);
|
||||||
CGraphics::SetAlphaCompare(kAF_Always, 0, kAO_And,
|
|
||||||
kAF_Always, 0);
|
|
||||||
CGraphics::SetTevOp(kTS_Stage0, CGraphics::kEnvModulate);
|
CGraphics::SetTevOp(kTS_Stage0, CGraphics::kEnvModulate);
|
||||||
CGraphics::SetTevOp(kTS_Stage1, CGraphics::kEnvPassthru);
|
CGraphics::SetTevOp(kTS_Stage1, CGraphics::kEnvPassthru);
|
||||||
CGraphics::Render2D(*x0_texture, 0, x0_texture->GetWidth() * 2,
|
CGraphics::Render2D(*x0_texture, 0, x0_texture->GetWidth() * 2,
|
||||||
@ -144,14 +136,15 @@ void CWorldShadow::BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid
|
|||||||
|
|
||||||
x88_blurReset = false;
|
x88_blurReset = false;
|
||||||
|
|
||||||
GXSetTexCopySrc(0, 448 - x0_texture->GetHeight() * 2, x0_texture->GetWidth() * 2, x0_texture->GetHeight() * 2);
|
GXSetTexCopySrc(0, 448 - x0_texture->GetHeight() * 2, x0_texture->GetWidth() * 2,
|
||||||
|
x0_texture->GetHeight() * 2);
|
||||||
GXTexFmt fmt = GX_TF_RGBA8;
|
GXTexFmt fmt = GX_TF_RGBA8;
|
||||||
if (x0_texture->GetTexelFormat() == 0x7) {
|
if (x0_texture->GetTexelFormat() == 0x7) {
|
||||||
fmt = GX_TF_RGB565;
|
fmt = GX_TF_RGB565;
|
||||||
}
|
}
|
||||||
GXSetTexCopyDst(x0_texture->GetWidth(), x0_texture->GetHeight(), fmt, true);
|
GXSetTexCopyDst(x0_texture->GetWidth(), x0_texture->GetHeight(), fmt, true);
|
||||||
static int unkInt = 0;
|
static int unkInt = 0;
|
||||||
void * dest = x0_texture->Lock();
|
void* dest = x0_texture->Lock();
|
||||||
GXCopyTex(dest, true);
|
GXCopyTex(dest, true);
|
||||||
x0_texture->UnLock();
|
x0_texture->UnLock();
|
||||||
|
|
||||||
|
@ -105,6 +105,9 @@ _LITERAL_REPLACEMENTS = [
|
|||||||
("EPhazonType::", "kPT_"),
|
("EPhazonType::", "kPT_"),
|
||||||
("EChain::", "kC_"),
|
("EChain::", "kC_"),
|
||||||
("EPhase::", "kP_"),
|
("EPhase::", "kP_"),
|
||||||
|
("ERglBlendMode::", "kBM_"),
|
||||||
|
("ERglBlendFactor::", "kBF_"),
|
||||||
|
("ERglLogicOp::", "kLO_"),
|
||||||
|
|
||||||
# CActor
|
# CActor
|
||||||
("x34_transform.origin", "GetTranslation()"),
|
("x34_transform.origin", "GetTranslation()"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user