diff --git a/config/G2ME01/splits.txt b/config/G2ME01/splits.txt index c160e17fb..6242a73d4 100644 --- a/config/G2ME01/splits.txt +++ b/config/G2ME01/splits.txt @@ -77,6 +77,16 @@ MetroidPrime/CAnimData.cpp: .text start:0x80025D3C end:0x8002F7A8 .ctors start:0x803A54BC end:0x803A54C0 +MetroidPrime/Factories/CCharacterFactory.cpp: + .text start:0x8002F7A8 end:0x80031E60 + .rodata start:0x803A64A0 end:0x803A64A8 + .data start:0x803B1948 end:0x803B1A10 + +MetroidPrime/Factories/CAssetFactory.cpp: + .text start:0x80031E60 end:0x800324A4 + .rodata start:0x803A64A8 end:0x803A64B0 + .data start:0x803B1A10 end:0x803B1A40 + MetroidPrime/Weapons/CGameProjectile.cpp: .text start:0x80032C3C end:0x80036200 .data start:0x803B1A40 end:0x803B1ACC @@ -131,6 +141,16 @@ MetroidPrime/HUD/CSamusHud.cpp: .ctors start:0x803A54CC end:0x803A54D0 .data start:0x803B1F30 end:0x803B1F50 +MetroidPrime/CAnimationDatabaseGame.cpp: + .text start:0x8006CB00 end:0x8006D3D0 + .rodata start:0x803A70B8 end:0x803A70F0 + .data start:0x803B1F50 end:0x803B1F70 + +MetroidPrime/CTransitionDatabaseGame.cpp: + .text start:0x8006D3D0 end:0x8006EB98 + .data start:0x803B1F70 end:0x803B1F80 + .sbss start:0x80418FD0 end:0x80418FE0 + MetroidPrime/ScriptObjects/CScriptTrigger.cpp: .text start:0x8007105C end:0x80073474 .data start:0x803B2018 end:0x803B20B0 diff --git a/config/G2ME01/symbols.txt b/config/G2ME01/symbols.txt index fdea4cfb0..ca547a74c 100644 --- a/config/G2ME01/symbols.txt +++ b/config/G2ME01/symbols.txt @@ -742,7 +742,7 @@ IsAnimTimeRemaining__9CAnimDataCFfRCQ24rstl66basic_string,Q24rstl17rmemory_allocator> = .text:0x80029104; // type:function size:0x58 align:4 GetAnimationDuration__9CAnimDataCFi = .text:0x8002915C; // type:function size:0x268 GetAnimSysContext__9CAnimDataCFv = .text:0x800293C4; // type:function size:0x24 -fn_800293E8 = .text:0x800293E8; // type:function size:0x74 +__dt__Q24rstl72set<10CPrimitive,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>Fv = .text:0x800293E8; // type:function size:0x74 RecalcPoseBuilder__9CAnimDataCFPC13CCharAnimTime = .text:0x8002945C; // type:function size:0x160 fn_800295BC = .text:0x800295BC; // type:function size:0x24 align:4 Render__9CAnimDataCFRC13CSkinnedModelRC11CModelFlags = .text:0x800295E0; // type:function size:0x54 align:4 @@ -791,7 +791,7 @@ fn_8002C1B4 = .text:0x8002C1B4; // type:function size:0xC0 fn_8002C274 = .text:0x8002C274; // type:function size:0x94 fn_8002C308 = .text:0x8002C308; // type:function size:0x38 __dt__9CAnimDataFv = .text:0x8002C340; // type:function size:0x2F8 -fn_8002C638 = .text:0x8002C638; // type:function size:0xB0 +__dt__14CCharacterInfoFv = .text:0x8002C638; // type:function size:0xB0 fn_8002C6E8 = .text:0x8002C6E8; // type:function size:0x84 fn_8002C76C = .text:0x8002C76C; // type:function size:0x38 fn_8002C7A4 = .text:0x8002C7A4; // type:function size:0x60 @@ -837,7 +837,7 @@ fn_8002DD38 = .text:0x8002DD38; // type:function size:0x6C fn_8002DDA4 = .text:0x8002DDA4; // type:function size:0x20 fn_8002DDC4 = .text:0x8002DDC4; // type:function size:0x28 fn_8002DDEC = .text:0x8002DDEC; // type:function size:0x50 -fn_8002DE3C = .text:0x8002DE3C; // type:function size:0xE0 +__ct__14CCharacterInfoFRC14CCharacterInfo = .text:0x8002DE3C; // type:function size:0xE0 fn_8002DF1C = .text:0x8002DF1C; // type:function size:0x1D0 fn_8002E0EC = .text:0x8002E0EC; // type:function size:0x100 fn_8002E1EC = .text:0x8002E1EC; // type:function size:0x84 @@ -865,96 +865,96 @@ fn_8002ECE0 = .text:0x8002ECE0; // type:function size:0x208 fn_8002EEE8 = .text:0x8002EEE8; // type:function size:0x68 fn_8002EF50 = .text:0x8002EF50; // type:function size:0xAC fn_8002EFFC = .text:0x8002EFFC; // type:function size:0x64 -fn_8002F060 = .text:0x8002F060; // type:function size:0x64 align:4 -fn_8002F0C4 = .text:0x8002F0C4; // type:function size:0x50 +ReleaseData__Q24rstl18rc_ptr<9IMetaAnim>Fv = .text:0x8002F060; // type:function size:0x64 align:4 +ReleaseData__Q24rstl27rc_ptr<17CAnimationManager>Fv = .text:0x8002F0C4; // type:function size:0x50 fn_8002F114 = .text:0x8002F114; // type:function size:0x90 -fn_8002F1A4 = .text:0x8002F1A4; // type:function size:0x50 +ReleaseData__Q24rstl28rc_ptr<18CTransitionManager>Fv = .text:0x8002F1A4; // type:function size:0x50 fn_8002F1F4 = .text:0x8002F1F4; // type:function size:0x7C fn_8002F270 = .text:0x8002F270; // type:function size:0x50 -fn_8002F2C0 = .text:0x8002F2C0; // type:function size:0x8C +ReleaseData__Q24rstl25rc_ptr<15CAnimSysContext>Fv = .text:0x8002F2C0; // type:function size:0x8C fn_8002F34C = .text:0x8002F34C; // type:function size:0x84 fn_8002F3D0 = .text:0x8002F3D0; // type:function size:0x84 -fn_8002F454 = .text:0x8002F454; // type:function size:0x4C +ReleaseData__Q24rstl18rc_ptr<9CRandom16>Fv = .text:0x8002F454; // type:function size:0x4C fn_8002F4A0 = .text:0x8002F4A0; // type:function size:0xB8 align:4 fn_8002F558 = .text:0x8002F558; // type:function size:0x94 align:4 fn_8002F5EC = .text:0x8002F5EC; // type:function size:0x94 align:4 fn_8002F680 = .text:0x8002F680; // type:function size:0x94 align:4 fn_8002F714 = .text:0x8002F714; // type:function size:0x94 align:4 -fn_8002F7A8 = .text:0x8002F7A8; // type:function size:0x110 align:4 -fn_8002F8B8 = .text:0x8002F8B8; // type:function size:0x84 -fn_8002F93C = .text:0x8002F93C; // type:function size:0x38 -fn_8002F974 = .text:0x8002F974; // type:function size:0x50 -fn_8002F9C4 = .text:0x8002F9C4; // type:function size:0x20 -fn_8002F9E4 = .text:0x8002F9E4; // type:function size:0x24 -fn_8002FA08 = .text:0x8002FA08; // type:function size:0xA8 -fn_8002FAB0 = .text:0x8002FAB0; // type:function size:0x54 -fn_8002FB04 = .text:0x8002FB04; // type:function size:0x104 -fn_8002FC08 = .text:0x8002FC08; // type:function size:0xBC -fn_8002FCC4 = .text:0x8002FCC4; // type:function size:0x98 -fn_8002FD5C = .text:0x8002FD5C; // type:function size:0x84 -fn_8002FDE0 = .text:0x8002FDE0; // type:function size:0x68 -fn_8002FE48 = .text:0x8002FE48; // type:function size:0x20 -fn_8002FE68 = .text:0x8002FE68; // type:function size:0x28 -fn_8002FE90 = .text:0x8002FE90; // type:function size:0x38 -fn_8002FEC8 = .text:0x8002FEC8; // type:function size:0x10 -fn_8002FED8 = .text:0x8002FED8; // type:function size:0x3D4 -fn_800302AC = .text:0x800302AC; // type:function size:0x84 -fn_80030330 = .text:0x80030330; // type:function size:0x84 -fn_800303B4 = .text:0x800303B4; // type:function size:0x5C align:4 -fn_80030410 = .text:0x80030410; // type:function size:0x560 align:4 -fn_80030970 = .text:0x80030970; // type:function size:0x20 -fn_80030990 = .text:0x80030990; // type:function size:0x84 +__dt__17CCharacterFactoryFv = .text:0x8002F7A8; // type:function size:0x110 align:4 +__dt__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>Fv = .text:0x8002F8B8; // type:function size:0x84 +destroy,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x8002F93C; // type:function size:0x38 +destroy_impl,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x8002F974; // type:function size:0x50 +destroy<14CCharacterInfo>__4rstlFP14CCharacterInfo = .text:0x8002F9C4; // type:function size:0x20 +destroy_impl<14CCharacterInfo>__4rstlFP14CCharacterInfo = .text:0x8002F9E4; // type:function size:0x24 +__dt__Q24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator>Fv = .text:0x8002FA08; // type:function size:0xA8 +__dt__Q24rstl77vector,Q24rstl17rmemory_allocator>Fv = .text:0x8002FAB0; // type:function size:0x54 +GetCharLayoutInfoDB__17CCharacterFactoryFR11CSimplePoolRCQ24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator> = .text:0x8002FB04; // type:function size:0x104 +__ct__Q24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator>FRCQ24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator> = .text:0x8002FC08; // type:function size:0xBC +GetCharacterInfoDB__17CCharacterFactoryFRC17CAnimCharacterSet = .text:0x8002FCC4; // type:function size:0x98 +__ct__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>FRCQ24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator> = .text:0x8002FD5C; // type:function size:0x84 +uninitialized_copy_n__4rstlFP14CCharacterInfoiP14CCharacterInfo = .text:0x8002FDE0; // type:function size:0x68 +construct<14CCharacterInfo>__4rstlFPvRC14CCharacterInfo = .text:0x8002FE48; // type:function size:0x20 +construct_impl<14CCharacterInfo>__4rstlFPvRC14CCharacterInfo = .text:0x8002FE68; // type:function size:0x28 +push_back_unsafe__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>FRC14CCharacterInfo = .text:0x8002FE90; // type:function size:0x38 +GetCharInfo__17CCharacterFactoryCFi = .text:0x8002FEC8; // type:function size:0x10 +CreateCharacter__17CCharacterFactoryCFibRC33TLockedToken<17CCharacterFactory>i = .text:0x8002FED8; // type:function size:0x3D4 +__as__Q24rstl52optional_object<33TLockedToken<17CSpatialPrimitive>>FRC33TLockedToken<17CSpatialPrimitive> = .text:0x800302AC; // type:function size:0x84 +__as__Q24rstl62optional_object<43TLockedToken<27CSkinnedModelWithAvgNormals>>FRC43TLockedToken<27CSkinnedModelWithAvgNormals> = .text:0x80030330; // type:function size:0x84 +__dt__10IVParamObjFv = .text:0x800303B4; // type:function size:0x5C align:4 +__ct__17CCharacterFactoryFR11CSimplePoolRC33TLockedToken<17CAnimCharacterSet>Ui = .text:0x80030410; // type:function size:0x560 align:4 +NonConstCopy__32TToken<22CAnimationDatabaseGame>CFv = .text:0x80030970; // type:function size:0x20 +__dt__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>Fv = .text:0x80030990; // type:function size:0x84 fn_80030A14 = .text:0x80030A14; // type:function size:0x38 fn_80030A4C = .text:0x80030A4C; // type:function size:0x60 -fn_80030AAC = .text:0x80030AAC; // type:function size:0x84 -fn_80030B30 = .text:0x80030B30; // type:function size:0x74 -fn_80030BA4 = .text:0x80030BA4; // type:function size:0x90 align:4 -fn_80030C34 = .text:0x80030C34; // type:function size:0xB8 -fn_80030CEC = .text:0x80030CEC; // type:function size:0x84 +__ct__17CAnimationManagerF28TToken<18CAnimationDatabase>RC15CAnimSysContext = .text:0x80030AAC; // type:function size:0x84 +__ct__33TToken<23CTransitionDatabaseGame>FP23CTransitionDatabaseGame = .text:0x80030B30; // type:function size:0x74 +__dt__51TObjOwnerDerivedFromIObj<23CTransitionDatabaseGame>Fv = .text:0x80030BA4; // type:function size:0x90 align:4 +__dt__23CTransitionDatabaseGameFv = .text:0x80030C34; // type:function size:0xB8 +__dt__Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>Fv = .text:0x80030CEC; // type:function size:0x84 fn_80030D70 = .text:0x80030D70; // type:function size:0x38 fn_80030DA8 = .text:0x80030DA8; // type:function size:0x60 -fn_80030E08 = .text:0x80030E08; // type:function size:0x84 +__dt__Q24rstl82vector>,Q24rstl17rmemory_allocator>Fv = .text:0x80030E08; // type:function size:0x84 fn_80030E8C = .text:0x80030E8C; // type:function size:0x38 fn_80030EC4 = .text:0x80030EC4; // type:function size:0x60 -fn_80030F24 = .text:0x80030F24; // type:function size:0x90 -fn_80030FB4 = .text:0x80030FB4; // type:function size:0x74 -fn_80031028 = .text:0x80031028; // type:function size:0x90 align:4 -fn_800310B8 = .text:0x800310B8; // type:function size:0x9C -fn_80031154 = .text:0x80031154; // type:function size:0xA4 -fn_800311F8 = .text:0x800311F8; // type:function size:0x90 align:4 -fn_80031288 = .text:0x80031288; // type:function size:0x5C align:4 -fn_800312E4 = .text:0x800312E4; // type:function size:0x130 -fn_80031414 = .text:0x80031414; // type:function size:0x4 align:4 -fn_80031418 = .text:0x80031418; // type:function size:0x8C align:4 -fn_800314A4 = .text:0x800314A4; // type:function size:0x4AC align:4 -fn_80031950 = .text:0x80031950; // type:function size:0xB0 -fn_80031A00 = .text:0x80031A00; // type:function size:0x2C -fn_80031A2C = .text:0x80031A2C; // type:function size:0x9C -fn_80031AC8 = .text:0x80031AC8; // type:function size:0x8 align:4 -fn_80031AD0 = .text:0x80031AD0; // type:function size:0x8 align:4 -fn_80031AD8 = .text:0x80031AD8; // type:function size:0x6C align:4 -fn_80031B44 = .text:0x80031B44; // type:function size:0xAC -fn_80031BF0 = .text:0x80031BF0; // type:function size:0x20 -fn_80031C10 = .text:0x80031C10; // type:function size:0x4C -fn_80031C5C = .text:0x80031C5C; // type:function size:0x68 -fn_80031CC4 = .text:0x80031CC4; // type:function size:0xD4 +GetNewDerivedObject__51TObjOwnerDerivedFromIObj<23CTransitionDatabaseGame>FP23CTransitionDatabaseGame = .text:0x80030F24; // type:function size:0x90 +__ct__32TToken<22CAnimationDatabaseGame>FP22CAnimationDatabaseGame = .text:0x80030FB4; // type:function size:0x74 +__dt__50TObjOwnerDerivedFromIObj<22CAnimationDatabaseGame>Fv = .text:0x80031028; // type:function size:0x90 align:4 +__dt__22CAnimationDatabaseGameFv = .text:0x800310B8; // type:function size:0x9C +__dt__Q24rstl62vector,Q24rstl17rmemory_allocator>Fv = .text:0x80031154; // type:function size:0xA4 +GetNewDerivedObject__50TObjOwnerDerivedFromIObj<22CAnimationDatabaseGame>FP22CAnimationDatabaseGame = .text:0x800311F8; // type:function size:0x90 align:4 +__dt__Q217CCharacterFactory13CDummyFactoryFv = .text:0x80031288; // type:function size:0x5C align:4 +__ct__Q24rstl77vector,Q24rstl17rmemory_allocator>FRCQ24rstl77vector,Q24rstl17rmemory_allocator> = .text:0x800312E4; // type:function size:0x130 +CancelBuild__Q217CCharacterFactory13CDummyFactoryFRC10SObjectTag = .text:0x80031414; // type:function size:0x4 align:4 +BuildAsync__Q217CCharacterFactory13CDummyFactoryFRC10SObjectTagRC15CVParamTransferPP4IObj = .text:0x80031418; // type:function size:0x8C align:4 +Build__Q217CCharacterFactory13CDummyFactoryFRC10SObjectTagRC15CVParamTransfer = .text:0x800314A4; // type:function size:0x4AC align:4 +__ct<13CSkinnedModel>__16CFactoryFnReturnFP13CSkinnedModel = .text:0x80031950; // type:function size:0xB0 +GetIObjObjectFor__23TToken<13CSkinnedModel>FRCQ24rstl25auto_ptr<13CSkinnedModel> = .text:0x80031A00; // type:function size:0x2C +GetNewDerivedObject__41TObjOwnerDerivedFromIObj<13CSkinnedModel>FRCQ24rstl25auto_ptr<13CSkinnedModel> = .text:0x80031A2C; // type:function size:0x9C +CanBuild__Q217CCharacterFactory13CDummyFactoryFRC10SObjectTag = .text:0x80031AC8; // type:function size:0x8 align:4 +GetResourceIdByName__Q217CCharacterFactory13CDummyFactoryCFPCc = .text:0x80031AD0; // type:function size:0x8 align:4 +__dt__34TObjOwnerParamFv = .text:0x80031AD8; // type:function size:0x6C align:4 +reserve__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>Fi = .text:0x80031B44; // type:function size:0xAC +destroy__4rstlFP14CCharacterInfoP14CCharacterInfo = .text:0x80031BF0; // type:function size:0x20 +destroy_impl__4rstlFP14CCharacterInfoP14CCharacterInfo = .text:0x80031C10; // type:function size:0x4C +uninitialized_copy,Q24rstl17rmemory_allocator>,P14CCharacterInfo>__4rstlFQ24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl122pointer_iterator<14CCharacterInfo,Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>P14CCharacterInfo = .text:0x80031C5C; // type:function size:0x68 +reserve__Q24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator>Fi = .text:0x80031CC4; // type:function size:0xD4 ReleaseData__Q24rstl20rc_ptr<10IVParamObj>Fv = .text:0x80031D98; // type:function size:0x64 -fn_80031DFC = .text:0x80031DFC; // type:function size:0x64 -fn_80031E60 = .text:0x80031E60; // type:function size:0x8 align:4 -fn_80031E68 = .text:0x80031E68; // type:function size:0x8 align:4 -fn_80031E70 = .text:0x80031E70; // type:function size:0x5C align:4 -fn_80031ECC = .text:0x80031ECC; // type:function size:0x9C +ReleaseData__Q24rstl20rc_ptr<10IMetaTrans>Fv = .text:0x80031DFC; // type:function size:0x64 +CanBuild__Q224CCharacterFactoryBuilder13CDummyFactoryFRC10SObjectTag = .text:0x80031E60; // type:function size:0x8 align:4 +GetResourceIdByName__Q224CCharacterFactoryBuilder13CDummyFactoryCFPCc = .text:0x80031E68; // type:function size:0x8 align:4 +__dt__Q224CCharacterFactoryBuilder13CDummyFactoryFv = .text:0x80031E70; // type:function size:0x5C align:4 +GetFactory__24CCharacterFactoryBuilderFRC8CAnimRes = .text:0x80031ECC; // type:function size:0x9C Null__15CVParamTransferFv = .text:0x80031F68; // type:function size:0x24 -fn_80031F8C = .text:0x80031F8C; // type:function size:0x7C -fn_80032008 = .text:0x80032008; // type:function size:0x54 -fn_8003205C = .text:0x8003205C; // type:function size:0x4 align:4 -fn_80032060 = .text:0x80032060; // type:function size:0x8C align:4 -fn_800320EC = .text:0x800320EC; // type:function size:0x144 align:4 -fn_80032230 = .text:0x80032230; // type:function size:0xC4 -fn_800322F4 = .text:0x800322F4; // type:function size:0xA0 align:4 -fn_80032394 = .text:0x80032394; // type:function size:0x2C -fn_800323C0 = .text:0x800323C0; // type:function size:0x9C -fn_8003245C = .text:0x8003245C; // type:function size:0x48 align:4 +__dt__24CCharacterFactoryBuilderFv = .text:0x80031F8C; // type:function size:0x7C +__ct__24CCharacterFactoryBuilderFv = .text:0x80032008; // type:function size:0x54 +CancelBuild__Q224CCharacterFactoryBuilder13CDummyFactoryFRC10SObjectTag = .text:0x8003205C; // type:function size:0x4 align:4 +BuildAsync__Q224CCharacterFactoryBuilder13CDummyFactoryFRC10SObjectTagRC15CVParamTransferPP4IObj = .text:0x80032060; // type:function size:0x8C align:4 +Build__Q224CCharacterFactoryBuilder13CDummyFactoryFRC10SObjectTagRC15CVParamTransfer = .text:0x800320EC; // type:function size:0x144 align:4 +__ct<17CCharacterFactory>__16CFactoryFnReturnFP17CCharacterFactory = .text:0x80032230; // type:function size:0xC4 +__dt__45TObjOwnerDerivedFromIObj<17CCharacterFactory>Fv = .text:0x800322F4; // type:function size:0xA0 align:4 +GetIObjObjectFor__27TToken<17CCharacterFactory>FRCQ24rstl29auto_ptr<17CCharacterFactory> = .text:0x80032394; // type:function size:0x2C +GetNewDerivedObject__45TObjOwnerDerivedFromIObj<17CCharacterFactory>FRCQ24rstl29auto_ptr<17CCharacterFactory> = .text:0x800323C0; // type:function size:0x9C +__dt__11IObjFactoryFv = .text:0x8003245C; // type:function size:0x48 align:4 fn_800324A4 = .text:0x800324A4; // type:function size:0x1D0 align:4 fn_80032674 = .text:0x80032674; // type:function size:0x54 align:4 fn_800326C8 = .text:0x800326C8; // type:function size:0x54 align:4 @@ -2013,39 +2013,39 @@ BallEnergyCoordFunc__9CSamusHudFf = .text:0x8006C9FC; // type:function size:0x2C CombatEnergyCoordFunc__9CSamusHudFf = .text:0x8006CA28; // type:function size:0xA0 align:4 fn_8006CAC8 = .text:0x8006CAC8; // type:function size:0x14 fn_8006CADC = .text:0x8006CADC; // type:function size:0x24 align:4 -fn_8006CB00 = .text:0x8006CB00; // type:function size:0x4 align:4 -fn_8006CB04 = .text:0x8006CB04; // type:function size:0xFC align:4 -fn_8006CC00 = .text:0x8006CC00; // type:function size:0xA0 -fn_8006CCA0 = .text:0x8006CCA0; // type:function size:0x304 -fn_8006CFA4 = .text:0x8006CFA4; // type:function size:0x10 align:4 -fn_8006CFB4 = .text:0x8006CFB4; // type:function size:0x8 align:4 -fn_8006CFBC = .text:0x8006CFBC; // type:function size:0x34 align:4 -fn_8006CFF0 = .text:0x8006CFF0; // type:function size:0x114 -fn_8006D104 = .text:0x8006D104; // type:function size:0x88 align:4 -fn_8006D18C = .text:0x8006D18C; // type:function size:0xC0 align:4 -fn_8006D24C = .text:0x8006D24C; // type:function size:0x80 -fn_8006D2CC = .text:0x8006D2CC; // type:function size:0xB8 -fn_8006D384 = .text:0x8006D384; // type:function size:0x4C -fn_8006D3D0 = .text:0x8006D3D0; // type:function size:0xB8 align:4 -fn_8006D488 = .text:0x8006D488; // type:function size:0xC0 -fn_8006D548 = .text:0x8006D548; // type:function size:0xFC -fn_8006D644 = .text:0x8006D644; // type:function size:0x2B4 -fn_8006D8F8 = .text:0x8006D8F8; // type:function size:0x24C -fn_8006DB44 = .text:0x8006DB44; // type:function size:0x11C -fn_8006DC60 = .text:0x8006DC60; // type:function size:0x1E8 -fn_8006DE48 = .text:0x8006DE48; // type:function size:0x104 -fn_8006DF4C = .text:0x8006DF4C; // type:function size:0xB4 -fn_8006E000 = .text:0x8006E000; // type:function size:0x90 -fn_8006E090 = .text:0x8006E090; // type:function size:0xC0 -fn_8006E150 = .text:0x8006E150; // type:function size:0x5C -fn_8006E1AC = .text:0x8006E1AC; // type:function size:0xC0 -fn_8006E26C = .text:0x8006E26C; // type:function size:0x54 -fn_8006E2C0 = .text:0x8006E2C0; // type:function size:0x1AC -fn_8006E46C = .text:0x8006E46C; // type:function size:0xF4 -fn_8006E560 = .text:0x8006E560; // type:function size:0x280 -fn_8006E7E0 = .text:0x8006E7E0; // type:function size:0x10C -fn_8006E8EC = .text:0x8006E8EC; // type:function size:0x130 -fn_8006EA1C = .text:0x8006EA1C; // type:function size:0x17C +GetUniquePrimitivesFromMetaAnim__22CAnimationDatabaseGameCFRQ24rstl72set<10CPrimitive,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>RCQ24rstl66basic_string,Q24rstl17rmemory_allocator> = .text:0x8006CB00; // type:function size:0x4 align:4 +GetAllUniquePrimitives__22CAnimationDatabaseGameCFRQ24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator> = .text:0x8006CB04; // type:function size:0xFC align:4 +insert,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator>__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>FQ24rstl114pointer_iterator<10CPrimitive,Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iteratorQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator = .text:0x8006CC00; // type:function size:0xA0 +insert_into,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator>__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>FQ24rstl114pointer_iterator<10CPrimitive,Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>iQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator = .text:0x8006CCA0; // type:function size:0x304 +GetMetaAnim__22CAnimationDatabaseGameCFUi = .text:0x8006CFA4; // type:function size:0x10 align:4 +GetNumMetaAnims__22CAnimationDatabaseGameCFv = .text:0x8006CFB4; // type:function size:0x8 align:4 +GetMetaAnimName__22CAnimationDatabaseGameCFUi = .text:0x8006CFBC; // type:function size:0x34 align:4 +__ct__22CAnimationDatabaseGameFRCQ24rstl47vector<10CAnimation,Q24rstl17rmemory_allocator> = .text:0x8006CFF0; // type:function size:0x114 +__distance,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator>__4rstlFQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iteratorQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iteratorQ24rstl20forward_iterator_tag = .text:0x8006D104; // type:function size:0x88 align:4 +reserve__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>Fi = .text:0x8006D18C; // type:function size:0xC0 align:4 +uninitialized_copy,Q24rstl17rmemory_allocator>,P10CPrimitive>__4rstlFQ24rstl114pointer_iterator<10CPrimitive,Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl114pointer_iterator<10CPrimitive,Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>P10CPrimitive = .text:0x8006D24C; // type:function size:0x80 +reserve__Q24rstl62vector,Q24rstl17rmemory_allocator>Fi = .text:0x8006D2CC; // type:function size:0xB8 +uninitialized_copy,Q24rstl62vector,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,PQ24rstl18rc_ptr<9IMetaAnim>>__4rstlFQ24rstl144pointer_iterator,Q24rstl62vector,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl144pointer_iterator,Q24rstl62vector,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>PQ24rstl18rc_ptr<9IMetaAnim> = .text:0x8006D384; // type:function size:0x4C +GetMetaTrans__23CTransitionDatabaseGameCFUiUi = .text:0x8006D3D0; // type:function size:0xB8 align:4 +find_by_key>,Q24rstl17rmemory_allocator>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>__4rstlFRCQ24rstl82vector>,Q24rstl17rmemory_allocator>RCUiRCQ237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer = .text:0x8006D488; // type:function size:0xC0 +find_by_key,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>__4rstlFRCQ24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>RCQ24rstl11pairRCQ237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer = .text:0x8006D548; // type:function size:0xFC +__ct__23CTransitionDatabaseGameFRCQ24rstl48vector<11CTransition,Q24rstl17rmemory_allocator>RCQ24rstl52vector<15CHalfTransition,Q24rstl17rmemory_allocator>Q24rstl20rc_ptr<10IMetaTrans> = .text:0x8006D644; // type:function size:0x2B4 +sort,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006D8F8; // type:function size:0x24C +iter_swap,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x8006DB44; // type:function size:0x11C +sort>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006DC60; // type:function size:0x1E8 +iter_swap>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x8006DE48; // type:function size:0x104 +lower_bound,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl11pair,Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl227const_pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl227const_pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>RCQ24rstl11pairQ24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006DF4C; // type:function size:0xB4 +lower_bound>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Ui,Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl190const_pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl190const_pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>RCUiQ24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006E000; // type:function size:0x90 +reserve__Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>Fi = .text:0x8006E090; // type:function size:0xC0 +uninitialized_copy,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,PQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>PQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>> = .text:0x8006E150; // type:function size:0x5C +reserve__Q24rstl82vector>,Q24rstl17rmemory_allocator>Fi = .text:0x8006E1AC; // type:function size:0xC0 +uninitialized_copy>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,PQ24rstl38pair>>__4rstlFQ24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>PQ24rstl38pair> = .text:0x8006E26C; // type:function size:0x54 +__sort3>,Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFRQ24rstl38pair>RQ24rstl38pair>RQ24rstl38pair>Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006E2C0; // type:function size:0x1AC +swap>>__4rstlFRQ24rstl38pair>RQ24rstl38pair> = .text:0x8006E46C; // type:function size:0xF4 +__sort3,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFRQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>>RQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>>RQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>>Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006E560; // type:function size:0x280 +swap,Q24rstl20rc_ptr<10IMetaTrans>>>__4rstlFRQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>>RQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>> = .text:0x8006E7E0; // type:function size:0x10C +__insertion_sort>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl124pair_sorter_finder>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006E8EC; // type:function size:0x130 +__insertion_sort,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006EA1C; // type:function size:0x17C CheckActorRenderOnly__12CScriptActorCFv = .text:0x8006EB98; // type:function size:0x90 align:4 fn_8006EC28 = .text:0x8006EC28; // type:function size:0x8EC align:4 __ct__Q24rstl29optional_object<10CModelData>FRCQ24rstl29optional_object<10CModelData> = .text:0x8006F514; // type:function size:0x40 scope:weak @@ -17898,7 +17898,7 @@ lbl_803B16AC = .data:0x803B16AC; // type:object size:0x10 lbl_803B16BC = .data:0x803B16BC; // type:object size:0x20 __vt__4IObj = .data:0x803B16DC; // type:object size:0xC scope:weak __vt__31CObjOwnerDerivedFromIObjUntyped = .data:0x803B16E8; // type:object size:0xC scope:weak -lbl_803B16F4 = .data:0x803B16F4; // type:object size:0xC +__vt__41TObjOwnerDerivedFromIObj<13CSkinnedModel> = .data:0x803B16F4; // type:object size:0xC lbl_803B1700 = .data:0x803B1700; // type:object size:0xC lbl_803B170C = .data:0x803B170C; // type:object size:0xC __vt__19CCollisionPrimitive = .data:0x803B1718; // type:object size:0x20 @@ -17924,19 +17924,19 @@ lbl_803B1918 = .data:0x803B1918; // type:object size:0xC __vt__16CParticlePOINode = .data:0x803B1924; // type:object size:0xC __vt__8CPOINode = .data:0x803B1930; // type:object size:0xC __vt__13CInt32POINode = .data:0x803B193C; // type:object size:0xC -lbl_803B1948 = .data:0x803B1948; // type:object size:0xC -lbl_803B1954 = .data:0x803B1954; // type:object size:0x1C -lbl_803B1970 = .data:0x803B1970; // type:object size:0xC -lbl_803B197C = .data:0x803B197C; // type:object size:0xC -lbl_803B1988 = .data:0x803B1988; // type:object size:0xC -lbl_803B1994 = .data:0x803B1994; // type:object size:0xC -lbl_803B19A0 = .data:0x803B19A0; // type:object size:0xC -lbl_803B19AC = .data:0x803B19AC; // type:object size:0xC +__vt__17CCharacterFactory = .data:0x803B1948; // type:object size:0xC +__vt__18CAnimationDatabase = .data:0x803B1954; // type:object size:0x1C +__vt__50TObjOwnerDerivedFromIObj<22CAnimationDatabaseGame> = .data:0x803B1970; // type:object size:0xC +__vt__19CTransitionDatabase = .data:0x803B197C; // type:object size:0xC +__vt__51TObjOwnerDerivedFromIObj<23CTransitionDatabaseGame> = .data:0x803B1988; // type:object size:0xC +__vt__11IObjFactory = .data:0x803B1994; // type:object size:0xC +__vt__34TObjOwnerParam = .data:0x803B19A0; // type:object size:0xC +__vt__10IVParamObj = .data:0x803B19AC; // type:object size:0xC __vt__8IFactory = .data:0x803B19B8; // type:object size:0x20 -lbl_803B19D8 = .data:0x803B19D8; // type:object size:0x20 -lbl_803B19F8 = .data:0x803B19F8; // type:object size:0x18 -lbl_803B1A10 = .data:0x803B1A10; // type:object size:0x20 -lbl_803B1A30 = .data:0x803B1A30; // type:object size:0x10 +__vt__Q217CCharacterFactory13CDummyFactory = .data:0x803B19D8; // type:object size:0x20 +__vt__10IMetaTrans = .data:0x803B19F8; // type:object size:0x18 +__vt__Q224CCharacterFactoryBuilder13CDummyFactory = .data:0x803B1A10; // type:object size:0x20 +__vt__45TObjOwnerDerivedFromIObj<17CCharacterFactory> = .data:0x803B1A30; // type:object size:0x10 __vt__15CGameProjectile = .data:0x803B1A40; // type:object size:0x8C jumptable_803B1AD0 = .data:0x803B1AD0; // type:object size:0x54 scope:local __vt__44TObjOwnerDerivedFromIObj<16CDependencyGroup> = .data:0x803B1B24; // type:object size:0xC scope:weak @@ -17963,8 +17963,8 @@ __vt__Q29CGameArea15CAreaObjectList = .data:0x803B1EF8; // type:object size:0xC __vt__9IGameArea = .data:0x803B1F04; // type:object size:0x2C gpSamusHud = .data:0x803B1F30; // type:object size:0x10 data:4byte __vt__9CSamusHud = .data:0x803B1F40; // type:object size:0xC scope:global -lbl_803B1F50 = .data:0x803B1F50; // type:object size:0x20 -lbl_803B1F70 = .data:0x803B1F70; // type:object size:0x10 +__vt__22CAnimationDatabaseGame = .data:0x803B1F50; // type:object size:0x20 +__vt__23CTransitionDatabaseGame = .data:0x803B1F70; // type:object size:0x10 lbl_803B1F80 = .data:0x803B1F80; // type:object size:0x98 __vt__14CScriptTrigger = .data:0x803B2018; // type:object size:0x98 lbl_803B20B0 = .data:0x803B20B0; // type:object size:0x84 diff --git a/configure.py b/configure.py index a69bf31d6..fd5ff8d24 100644 --- a/configure.py +++ b/configure.py @@ -455,6 +455,10 @@ def MatchingFor(*versions): Object(NonMatching, "MetroidPrime/CParticleGenInfo.cpp"), Object(NonMatching, "MetroidPrime/CParticleDatabase.cpp"), Object(NonMatching, "MetroidPrime/CAnimData.cpp"), + Object(NonMatching, "MetroidPrime/Factories/CCharacterFactory.cpp"), + Object(MatchingFor("G2ME01"), "MetroidPrime/Factories/CAssetFactory.cpp"), + Object(MatchingFor("G2ME01"), "MetroidPrime/CAnimationDatabaseGame.cpp"), + Object(MatchingFor("G2ME01"), "MetroidPrime/CTransitionDatabaseGame.cpp"), Object(NonMatching, "MetroidPrime/CTargetReticles.cpp"), Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptHUDMemo.cpp"), Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptAreaProperties.cpp"), diff --git a/include/Kyoto/Animation/CAnimSysContext.hpp b/include/Kyoto/Animation/CAnimSysContext.hpp index cb1c91402..b0a7ec531 100644 --- a/include/Kyoto/Animation/CAnimSysContext.hpp +++ b/include/Kyoto/Animation/CAnimSysContext.hpp @@ -1,24 +1,28 @@ #ifndef _CANIMSYSCONTEXT #define _CANIMSYSCONTEXT +#include "Kyoto/Animation/CAnimationSet.hpp" #include "Kyoto/TToken.hpp" #include "rstl/rc_ptr.hpp" -class CTransitionDatabaseGame; +class CTransitionDatabase; class CRandom16; class CSimplePool; class CAnimSysContext { public: - CAnimSysContext(const TToken< CTransitionDatabaseGame >& transDb, - const rstl::ncrc_ptr< CRandom16 >& random, CSimplePool& store) - : mTransDb(transDb), mRandom(random), mStore(store) {} + CAnimSysContext(const TToken< CTransitionDatabase >& transDb, + const rstl::ncrc_ptr< CRandom16 >& random, CSimplePool& store, + const CAnimationSet::EventSetList& eventSets) + : mTransDb(transDb), mRandom(random), mStore(store), mEventSets(eventSets) {} private: - TToken< CTransitionDatabaseGame > mTransDb; - rstl::rc_ptr< CRandom16 > mRandom; + TToken< CTransitionDatabase > mTransDb; + rstl::ncrc_ptr< CRandom16 > mRandom; CSimplePool& mStore; + const CAnimationSet::EventSetList& mEventSets; // Guessed name. }; +CHECK_SIZEOF(CAnimSysContext, 0x18) #endif // _CANIMSYSCONTEXT diff --git a/include/Kyoto/Animation/CAnimationDatabase.hpp b/include/Kyoto/Animation/CAnimationDatabase.hpp new file mode 100644 index 000000000..1a24dcb04 --- /dev/null +++ b/include/Kyoto/Animation/CAnimationDatabase.hpp @@ -0,0 +1,34 @@ +#ifndef _CANIMATIONDATABASE +#define _CANIMATIONDATABASE + +#include "Kyoto/TToken.hpp" + +#include "rstl/optional_object.hpp" +#include "rstl/rc_ptr.hpp" +#include "rstl/set.hpp" +#include "rstl/string.hpp" +#include "rstl/vector.hpp" + +class CPrimitive; +class IMetaAnim; + +class CAnimationDatabase { +public: + virtual const rstl::rc_ptr< IMetaAnim >& GetMetaAnim(uint idx) const = 0; + virtual uint GetNumMetaAnims() const = 0; + virtual rstl::string GetMetaAnimName(uint idx) const = 0; + virtual void GetAllUniquePrimitives(rstl::vector< CPrimitive >& primsOut) const = 0; + virtual void GetUniquePrimitivesFromMetaAnim(rstl::set< CPrimitive >& primsOut, + const rstl::string& name) const = 0; + + explicit CAnimationDatabase(const rstl::optional_object< TToken< CAnimationDatabase > >& token = + rstl::optional_object_null()) + : x4_(token) {} + ~CAnimationDatabase() {} + +private: + rstl::optional_object< TToken< CAnimationDatabase > > x4_; +}; +CHECK_SIZEOF(CAnimationDatabase, 0x10) + +#endif // _CANIMATIONDATABASE diff --git a/include/Kyoto/Animation/CAnimationManager.hpp b/include/Kyoto/Animation/CAnimationManager.hpp index f07f11d53..22f450740 100644 --- a/include/Kyoto/Animation/CAnimationManager.hpp +++ b/include/Kyoto/Animation/CAnimationManager.hpp @@ -1,18 +1,21 @@ #ifndef _CANIMATIONMANAGER #define _CANIMATIONMANAGER +#include "Kyoto/Animation/CAnimSysContext.hpp" #include "Kyoto/TToken.hpp" +class CAnimationDatabase; class CAnimationManager { public: + CAnimationManager(TToken< CAnimationDatabase > animDB, const CAnimSysContext& sysCtx) + : mAnimDB(animDB), mSysCtx(sysCtx) {} ~CAnimationManager(); - //CAnimationManager(const TToken& animDB, const CAnimSysContext& sysCtx); private: - //TToken< CAnimationDatabase > x0_animDB; - //CAnimSysContext x8_sysCtx; + TToken< CAnimationDatabase > mAnimDB; + CAnimSysContext mSysCtx; }; - +CHECK_SIZEOF(CAnimationManager, 0x20) #endif // _CANIMATIONMANAGER diff --git a/include/Kyoto/Animation/CAnimationSet.hpp b/include/Kyoto/Animation/CAnimationSet.hpp index c45f6291a..645eaf224 100644 --- a/include/Kyoto/Animation/CAnimationSet.hpp +++ b/include/Kyoto/Animation/CAnimationSet.hpp @@ -9,6 +9,7 @@ #include "Kyoto/Animation/IMetaAnim.hpp" #include "Kyoto/Animation/IMetaTrans.hpp" +#include "rstl/construct.hpp" #include "rstl/pair.hpp" #include "rstl/vector.hpp" @@ -49,4 +50,8 @@ class CAnimationSet { }; CHECK_SIZEOF(CAnimationSet, 0x64) +namespace rstl { +RSTL_DECLARE_TRIVIALLY_CONSTRUCTIBLE(CAnimationSet::AdditiveAnimationList::value_type) +} + #endif // _CANIMATIONSET diff --git a/include/Kyoto/Animation/CCharacterInfo.hpp b/include/Kyoto/Animation/CCharacterInfo.hpp index 9688bfc08..ae5e680f8 100644 --- a/include/Kyoto/Animation/CCharacterInfo.hpp +++ b/include/Kyoto/Animation/CCharacterInfo.hpp @@ -31,6 +31,13 @@ class CCharacterInfo { explicit CCharacterInfo(CInputStream& in); + CAssetId GetModelId() const { return mCmdl; } + CAssetId GetSkinRulesId() const { return mCksr; } + CAssetId GetCharLayoutInfoId() const { return mCinf; } + CAssetId GetIceModelId() const { return mCmdlOverlay; } + CAssetId GetIceSkinRulesId() const { return mCksrOverlay; } + CAssetId GetSpatialPrimitiveId() const { return mSpatialPrimitiveId; } + bool GetAnimatedScale() const { return mAnimatedScale; } const CPASDatabase& GetPASDatabase() const { return mPasDatabase; } const CParticleResData& GetParticleResData() const { return mPartRes; } const TEffectList& GetEffects() const { return mEffects; } diff --git a/include/Kyoto/Animation/CHalfTransition.hpp b/include/Kyoto/Animation/CHalfTransition.hpp index d32b7b11f..e490f3884 100644 --- a/include/Kyoto/Animation/CHalfTransition.hpp +++ b/include/Kyoto/Animation/CHalfTransition.hpp @@ -8,10 +8,14 @@ class CInputStream; class CHalfTransition { public: explicit CHalfTransition(CInputStream& in); + uint GetPrimitiveIndex() const { return mId; } + const rstl::rc_ptr< IMetaTrans >& GetMetaTrans() const { return mTrans; } private: uint mId; - rstl::rc_ptr mTrans; + rstl::rc_ptr< IMetaTrans > mTrans; }; +CHECK_SIZEOF(CHalfTransition, 0xc) + #endif // _CHALFTRANSITION diff --git a/include/Kyoto/Animation/CPrimitive.hpp b/include/Kyoto/Animation/CPrimitive.hpp index 3979a7bea..bc14af0e3 100644 --- a/include/Kyoto/Animation/CPrimitive.hpp +++ b/include/Kyoto/Animation/CPrimitive.hpp @@ -3,6 +3,7 @@ #include "Kyoto/SObjectTag.hpp" +#include "rstl/StringExtras.hpp" #include "rstl/string.hpp" class CInputStream; @@ -12,6 +13,9 @@ class CPrimitive { CPrimitive(CInputStream& in); void PutTo(COutputStream& out) const; CAssetId GetAnimResId() const { return mAnimId; } + int Compare(const CPrimitive& other) const { + return CStringExtras::CompareCaseInsensitive(mAnimName, other.mAnimName); + } private: CAssetId mAnimId; @@ -19,4 +23,8 @@ class CPrimitive { rstl::string mAnimName; }; +CHECK_SIZEOF(CPrimitive, 0x18) + +inline bool operator<(const CPrimitive& a, const CPrimitive& b) { return a.Compare(b) < 0; } + #endif // _CPRIMITIVE diff --git a/include/Kyoto/Animation/CTransition.hpp b/include/Kyoto/Animation/CTransition.hpp index ba64d8119..c9796bada 100644 --- a/include/Kyoto/Animation/CTransition.hpp +++ b/include/Kyoto/Animation/CTransition.hpp @@ -1,9 +1,8 @@ #ifndef _CTRANSITION #define _CTRANSITION -#include "rstl/rc_ptr.hpp" #include "rstl/pair.hpp" - +#include "rstl/rc_ptr.hpp" class IMetaTrans; class CInputStream; @@ -11,14 +10,18 @@ class CTransition { uint mId; uint mAnimA; uint mAnimB; - rstl::rc_ptr mTrans; + rstl::rc_ptr< IMetaTrans > mTrans; public: explicit CTransition(CInputStream& in); + uint GetFromAnimIndex() const { return mAnimA; } + uint GetToAnimIndex() const { return mAnimB; } u32 GetAnimA() const { return mAnimA; } u32 GetAnimB() const { return mAnimB; } - rstl::pair GetAnimPair() const { return rstl::pair(mAnimA, mAnimB); } - const rstl::rc_ptr& GetMetaTrans() const { return mTrans; } + rstl::pair< uint, uint > GetAnimPair() const { return rstl::pair< uint, uint >(mAnimA, mAnimB); } + const rstl::rc_ptr< IMetaTrans >& GetMetaTrans() const { return mTrans; } }; +CHECK_SIZEOF(CTransition, 0x14) + #endif // _CTRANSITION diff --git a/include/Kyoto/Animation/CTransitionDatabase.hpp b/include/Kyoto/Animation/CTransitionDatabase.hpp new file mode 100644 index 000000000..0ba279e61 --- /dev/null +++ b/include/Kyoto/Animation/CTransitionDatabase.hpp @@ -0,0 +1,25 @@ +#ifndef _CTRANSITIONDATABASE +#define _CTRANSITIONDATABASE + +#include "Kyoto/TToken.hpp" + +#include "rstl/optional_object.hpp" +#include "rstl/rc_ptr.hpp" + +class IMetaTrans; + +class CTransitionDatabase { +public: + virtual const rstl::rc_ptr< IMetaTrans >& GetMetaTrans(uint from, uint to) const = 0; + + explicit CTransitionDatabase(const rstl::optional_object< TToken< CTransitionDatabase > >& token = + rstl::optional_object_null()) + : mToken(token) {} + ~CTransitionDatabase() {} + +private: + rstl::optional_object< TToken< CTransitionDatabase > > mToken; +}; +CHECK_SIZEOF(CTransitionDatabase, 0x10) + +#endif // _CTRANSITIONDATABASE diff --git a/include/Kyoto/Animation/CTransitionManager.hpp b/include/Kyoto/Animation/CTransitionManager.hpp index 9300d4a16..7a09565ad 100644 --- a/include/Kyoto/Animation/CTransitionManager.hpp +++ b/include/Kyoto/Animation/CTransitionManager.hpp @@ -6,6 +6,7 @@ class CAnimTreeNode; class CTransitionManager { public: + CTransitionManager(const CAnimSysContext& context); ~CTransitionManager(); rstl::rc_ptr< CAnimTreeNode > GetTransitionTree(const rstl::ncrc_ptr< CAnimTreeNode >& a, const rstl::ncrc_ptr< CAnimTreeNode >& b) const; diff --git a/include/Kyoto/CVParamTransfer.hpp b/include/Kyoto/CVParamTransfer.hpp index 80f6732f9..5772ad11f 100644 --- a/include/Kyoto/CVParamTransfer.hpp +++ b/include/Kyoto/CVParamTransfer.hpp @@ -22,7 +22,7 @@ class CVParamTransfer { CVParamTransfer() {} template < typename T > CVParamTransfer(TObjOwnerParam< T >* obj) : mObj(obj) {} - static CVParamTransfer Null(); + static CVParamTransfer Null() { return CVParamTransfer(); } const IVParamObj& operator*() const { return *mObj; } const rstl::rc_ptr< IVParamObj >& GetObj() const { return mObj; } diff --git a/include/Kyoto/IObjFactory.hpp b/include/Kyoto/IObjFactory.hpp new file mode 100644 index 000000000..5f896880e --- /dev/null +++ b/include/Kyoto/IObjFactory.hpp @@ -0,0 +1,9 @@ +#ifndef _IOBJFACTORY +#define _IOBJFACTORY + +class IObjFactory { +public: + virtual ~IObjFactory() = 0; +}; + +#endif // _IOBJFACTORY diff --git a/include/MetroidPrime/CAnimationDatabaseGame.hpp b/include/MetroidPrime/CAnimationDatabaseGame.hpp new file mode 100644 index 000000000..9d19db8bf --- /dev/null +++ b/include/MetroidPrime/CAnimationDatabaseGame.hpp @@ -0,0 +1,24 @@ +#ifndef _CANIMATIONDATABASEGAME +#define _CANIMATIONDATABASEGAME + +#include "Kyoto/Animation/CAnimationDatabase.hpp" + +class CAnimation; + +class CAnimationDatabaseGame : public CAnimationDatabase { +public: + explicit CAnimationDatabaseGame(const rstl::vector< CAnimation >& anims); + + const rstl::rc_ptr< IMetaAnim >& GetMetaAnim(uint idx) const override; + uint GetNumMetaAnims() const override; + rstl::string GetMetaAnimName(uint idx) const override; + void GetAllUniquePrimitives(rstl::vector< CPrimitive >& primsOut) const override; + void GetUniquePrimitivesFromMetaAnim(rstl::set< CPrimitive >& primsOut, + const rstl::string& name) const override; + +private: + rstl::vector< rstl::rc_ptr< IMetaAnim > > mAnims; +}; +CHECK_SIZEOF(CAnimationDatabaseGame, 0x20) + +#endif // _CANIMATIONDATABASEGAME diff --git a/include/MetroidPrime/CTransitionDatabaseGame.hpp b/include/MetroidPrime/CTransitionDatabaseGame.hpp new file mode 100644 index 000000000..21e17ea52 --- /dev/null +++ b/include/MetroidPrime/CTransitionDatabaseGame.hpp @@ -0,0 +1,29 @@ +#ifndef _CTRANSITIONDATABASEGAME +#define _CTRANSITIONDATABASEGAME + +#include "Kyoto/Animation/CTransitionDatabase.hpp" +#include "Kyoto/Animation/IMetaTrans.hpp" + +#include "rstl/pair.hpp" +#include "rstl/vector.hpp" + +class CTransition; +class CHalfTransition; + +class CTransitionDatabaseGame : public CTransitionDatabase { +public: + CTransitionDatabaseGame(const rstl::vector< CTransition >& transitions, + const rstl::vector< CHalfTransition >& halfTransitions, + rstl::rc_ptr< IMetaTrans > defaultTrans); + ~CTransitionDatabaseGame() {} + + const rstl::rc_ptr< IMetaTrans >& GetMetaTrans(uint from, uint to) const override; + +private: + rstl::rc_ptr< IMetaTrans > mDefaultTrans; + rstl::vector< rstl::pair< rstl::pair< uint, uint >, rstl::rc_ptr< IMetaTrans > > > mTransitions; + rstl::vector< rstl::pair< uint, rstl::rc_ptr< IMetaTrans > > > mHalfTransitions; +}; +CHECK_SIZEOF(CTransitionDatabaseGame, 0x38) + +#endif // _CTRANSITIONDATABASEGAME diff --git a/include/MetroidPrime/Factories/CCharacterFactory.hpp b/include/MetroidPrime/Factories/CCharacterFactory.hpp new file mode 100644 index 000000000..28bc51b94 --- /dev/null +++ b/include/MetroidPrime/Factories/CCharacterFactory.hpp @@ -0,0 +1,69 @@ +#ifndef _CCHARACTERFACTORY +#define _CCHARACTERFACTORY + +#include "types.h" + +#include "Kyoto/Animation/CAdditiveAnimationInfo.hpp" +#include "Kyoto/Animation/CAnimSysContext.hpp" +#include "Kyoto/Animation/CAnimationManager.hpp" +#include "Kyoto/Animation/CCharacterInfo.hpp" +#include "Kyoto/Animation/CTransitionManager.hpp" +#include "Kyoto/CResFactory.hpp" +#include "Kyoto/CSimplePool.hpp" +#include "Kyoto/IObjFactory.hpp" +#include "Kyoto/TToken.hpp" + +#include "rstl/pair.hpp" +#include "rstl/rc_ptr.hpp" +#include "rstl/vector.hpp" + +class CAnimCharacterSet; +class CAnimData; +class CCharLayoutInfo; + +class CCharacterFactory : public IObjFactory { +public: + class CDummyFactory : public IFactory { + public: + rstl::auto_ptr< IObj > Build(const SObjectTag& tag, const CVParamTransfer& params) override; + void BuildAsync(const SObjectTag& tag, const CVParamTransfer& params, IObj** out) override; + void CancelBuild(const SObjectTag& tag) override; + bool CanBuild(const SObjectTag&) override { return true; } + const SObjectTag* GetResourceIdByName(const char*) const override { return nullptr; } + }; + + CCharacterFactory(CSimplePool& store, const TLockedToken< CAnimCharacterSet >& ancs, + CAssetId selfId); + ~CCharacterFactory() override; + + rstl::auto_ptr< CAnimData > CreateCharacter(int charIdx, bool loop, + const TLockedToken< CCharacterFactory >& factory, + int defaultAnim) const; + const CCharacterInfo& GetCharInfo(int charIdx) const; + const rstl::vector< rstl::pair< uint, CAdditiveAnimationInfo > >& + GetAdditiveAnimInfoList() const { + return mAdditiveInfo; + } + const CAdditiveAnimationInfo& GetDefaultAdditiveAnimInfo() const { return mDefaultAdditiveInfo; } + + static rstl::vector< CCharacterInfo > GetCharacterInfoDB(const CAnimCharacterSet& ancs); + static rstl::vector< TToken< CCharLayoutInfo > > + GetCharLayoutInfoDB(CSimplePool& store, const rstl::vector< CCharacterInfo >& chars); + +private: + rstl::vector< CCharacterInfo > mCharInfoDB; + rstl::vector< TToken< CCharLayoutInfo > > mCharLayoutInfoDB; + rstl::ncrc_ptr< CAnimSysContext > mSysContext; + rstl::rc_ptr< CAnimationManager > mAnimMgr; + rstl::rc_ptr< CTransitionManager > mTransMgr; + rstl::vector< rstl::pair< uint, CAdditiveAnimationInfo > > mAdditiveInfo; + CAdditiveAnimationInfo mDefaultAdditiveInfo; + CAssetId mSelfId; + CDummyFactory mDummyFactory; + mutable CSimplePool mCacheResPool; + TLockedToken< CAnimCharacterSet > mAnimCharacterSet; // Guessed name. +}; +NESTED_CHECK_SIZEOF(CCharacterFactory, CDummyFactory, 0x4) +CHECK_SIZEOF(CCharacterFactory, 0x8c) + +#endif // _CCHARACTERFACTORY diff --git a/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp b/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp new file mode 100644 index 000000000..2fcafe05d --- /dev/null +++ b/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp @@ -0,0 +1,37 @@ +#ifndef _CCHARACTERFACTORYBUILDER +#define _CCHARACTERFACTORYBUILDER + +#include "types.h" + +#include "Kyoto/CResFactory.hpp" +#include "Kyoto/CSimplePool.hpp" +#include "Kyoto/TToken.hpp" + +class CAnimRes; +class CCharacterFactory; + +class CCharacterFactoryBuilder { +public: + class CDummyFactory : public IFactory { + public: + rstl::auto_ptr< IObj > Build(const SObjectTag& tag, const CVParamTransfer& params) override; + void BuildAsync(const SObjectTag& tag, const CVParamTransfer& params, IObj** out) override; + void CancelBuild(const SObjectTag& tag) override; + bool CanBuild(const SObjectTag&) override { return true; } + const SObjectTag* GetResourceIdByName(const char*) const override { return nullptr; } + }; + + CCharacterFactoryBuilder(); + ~CCharacterFactoryBuilder(); + TToken< CCharacterFactory > GetFactory(const CAnimRes& res); + +private: + CDummyFactory mDummyFactory; + CSimplePool mDummyStore; +}; +NESTED_CHECK_SIZEOF(CCharacterFactoryBuilder, CDummyFactory, 0x4) +CHECK_SIZEOF(CCharacterFactoryBuilder, 0x28) + +extern CCharacterFactoryBuilder* gpCharacterFactoryBuilder; + +#endif // _CCHARACTERFACTORYBUILDER diff --git a/include/rstl/algorithm.hpp b/include/rstl/algorithm.hpp index c5638fd27..18a3b2813 100644 --- a/include/rstl/algorithm.hpp +++ b/include/rstl/algorithm.hpp @@ -28,10 +28,7 @@ It find(It first, It last, const T& val) { } template < typename T > -#ifndef RSTL_DONT_INLINE_ALGORITHM -inline -#endif - void swap(T& a, T& b) { +inline void swap(T& a, T& b) { T tmp(a); a = b; b = tmp; diff --git a/include/rstl/rc_ptr.hpp b/include/rstl/rc_ptr.hpp index 62fe74143..605e3d761 100644 --- a/include/rstl/rc_ptr.hpp +++ b/include/rstl/rc_ptr.hpp @@ -26,7 +26,7 @@ class rc_ptr { } ~rc_ptr() { ReleaseData(); } rc_ptr& operator=(const rc_ptr& other) { - if (mRefCount != other.mRefCount) { + if (mPtr != other.mPtr) { ReleaseData(); mPtr = other.mPtr; mRefCount = other.mRefCount; diff --git a/include/rstl/red_black_tree.hpp b/include/rstl/red_black_tree.hpp index 39bac2cc0..d04eed46b 100644 --- a/include/rstl/red_black_tree.hpp +++ b/include/rstl/red_black_tree.hpp @@ -76,7 +76,7 @@ class red_black_tree { : mNode(node), mHeader(header) /*, x8_(b)*/ {} const P* operator->() const { return mNode->get_value(); } - const P* operator*() const { return mNode->get_value(); } + const P& operator*() const { return *mNode->get_value(); } bool operator==(const const_iterator& other) const { return mNode == other.mNode && mHeader == other.mHeader; } @@ -102,7 +102,7 @@ class red_black_tree { iterator(node* node, const header* header, bool b) : const_iterator(node, header, b) {} P* operator->() { return const_iterator::mNode->get_value(); } - P* operator*() { return const_iterator::mNode->get_value(); } + P& operator*() { return *const_iterator::mNode->get_value(); } node* get_node() { return const_iterator::mNode; } iterator& operator++() { diff --git a/include/rstl/vector.hpp b/include/rstl/vector.hpp index d6d58238f..7f989b8dd 100644 --- a/include/rstl/vector.hpp +++ b/include/rstl/vector.hpp @@ -189,8 +189,7 @@ void vector< T, Alloc >::insert_into(iterator at, int n, In in) { int i = moveCount - 1; for (; i >= 0; --i) { construct(oldData + atIdx + n + i, data()[atIdx + i]); - T* const item = oldData + atIdx + i; - destroy(item); + destroy(oldData + atIdx + i); } for (i = 0; i < n; ++input, ++i) { construct(oldData + atIdx + i, *input); diff --git a/src/MetroidPrime/CAnimationDatabaseGame.cpp b/src/MetroidPrime/CAnimationDatabaseGame.cpp new file mode 100644 index 000000000..edec9e0a9 --- /dev/null +++ b/src/MetroidPrime/CAnimationDatabaseGame.cpp @@ -0,0 +1,36 @@ +#include "MetroidPrime/CAnimationDatabaseGame.hpp" + +#include "Kyoto/Animation/CAnimation.hpp" +#include "Kyoto/Animation/CPrimitive.hpp" +#include "Kyoto/Animation/IMetaAnim.hpp" + +CAnimationDatabaseGame::CAnimationDatabaseGame(const rstl::vector< CAnimation >& anims) { + rstl::vector< CAnimation >::const_iterator it = anims.begin(), end = anims.end(); + mAnims.reserve(anims.size()); + for (; it != end; ++it) + mAnims.push_back_unsafe(it->GetMetaAnim()); +} + +rstl::string CAnimationDatabaseGame::GetMetaAnimName(uint idx) const { + return rstl::string_l("Meta-animation name unavailable in Release mode."); +} + +uint CAnimationDatabaseGame::GetNumMetaAnims() const { return mAnims.size(); } + +const rstl::rc_ptr< IMetaAnim >& CAnimationDatabaseGame::GetMetaAnim(uint idx) const { + return mAnims[idx]; +} + +void CAnimationDatabaseGame::GetAllUniquePrimitives(rstl::vector< CPrimitive >& primsOut) const { + rstl::set< CPrimitive > primitives; + uint animCount = mAnims.size(); + for (uint i = 0; i < animCount; ++i) { + mAnims[i]->GetUniquePrimitives(primitives); + } + + primsOut.reserve(primsOut.size() + primitives.size()); + primsOut.insert(primsOut.end(), primitives.begin(), primitives.end()); +} + +void CAnimationDatabaseGame::GetUniquePrimitivesFromMetaAnim(rstl::set< CPrimitive >& primsOut, + const rstl::string& name) const {} diff --git a/src/MetroidPrime/CTransitionDatabaseGame.cpp b/src/MetroidPrime/CTransitionDatabaseGame.cpp new file mode 100644 index 000000000..66045bb2b --- /dev/null +++ b/src/MetroidPrime/CTransitionDatabaseGame.cpp @@ -0,0 +1,61 @@ +#include "MetroidPrime/CTransitionDatabaseGame.hpp" + +#include "Kyoto/Animation/CHalfTransition.hpp" +#include "Kyoto/Animation/CTransition.hpp" + +#define RSTL_DONT_INLINE_ALGORITHM + +#include "rstl/algorithm.hpp" + +namespace { +struct uint_comparer { + bool operator()(uint a, uint b) const { return a < b; } + bool operator()(const rstl::pair< uint, uint >& a, const rstl::pair< uint, uint >& b) const { + const uint& aTo = a.second; + if (a.first == b.first) { + return aTo < b.second; + } + return a.first < b.first; + } +}; +} // namespace + +CTransitionDatabaseGame::CTransitionDatabaseGame( + const rstl::vector< CTransition >& transitions, + const rstl::vector< CHalfTransition >& halfTransitions, rstl::rc_ptr< IMetaTrans > defaultTrans) +: mDefaultTrans(defaultTrans) { + rstl::vector< CTransition >::const_iterator it = transitions.begin(), end = transitions.end(); + mTransitions.reserve(transitions.size()); + for (; it != end;) { + const rstl::pair< rstl::pair< uint, uint >, rstl::rc_ptr< IMetaTrans > > entry( + rstl::pair< uint, uint >(it->GetFromAnimIndex(), it->GetToAnimIndex()), it->GetMetaTrans()); + mTransitions.push_back_unsafe(entry); + ++it; + } + rstl::sort_by_key(mTransitions, uint_comparer()); + + rstl::vector< CHalfTransition >::const_iterator halfIt = halfTransitions.begin(), + halfEnd = halfTransitions.end(); + mHalfTransitions.reserve(halfTransitions.size()); + for (; halfIt != halfEnd;) { + const rstl::pair< uint, rstl::rc_ptr< IMetaTrans > > entry(halfIt->GetPrimitiveIndex(), + halfIt->GetMetaTrans()); + mHalfTransitions.push_back_unsafe(entry); + ++halfIt; + } + rstl::sort_by_key(mHalfTransitions, uint_comparer()); +} + +const rstl::rc_ptr< IMetaTrans >& CTransitionDatabaseGame::GetMetaTrans(uint from, uint to) const { + rstl::vector< rstl::pair< rstl::pair< uint, uint >, rstl::rc_ptr< IMetaTrans > > >::const_iterator + it = rstl::find_by_key(mTransitions, rstl::pair< uint, uint >(from, to), uint_comparer()); + if (it != mTransitions.end()) { + return it->second; + } + rstl::vector< rstl::pair< uint, rstl::rc_ptr< IMetaTrans > > >::const_iterator halfIt = + rstl::find_by_key(mHalfTransitions, to, uint_comparer()); + if (halfIt != mHalfTransitions.end()) { + return halfIt->second; + } + return mDefaultTrans; +} diff --git a/src/MetroidPrime/Factories/CAssetFactory.cpp b/src/MetroidPrime/Factories/CAssetFactory.cpp new file mode 100644 index 000000000..e3980379c --- /dev/null +++ b/src/MetroidPrime/Factories/CAssetFactory.cpp @@ -0,0 +1,33 @@ +#include "MetroidPrime/Factories/CCharacterFactoryBuilder.hpp" + +#include "MetroidPrime/CAnimRes.hpp" +#include "MetroidPrime/Factories/CCharacterFactory.hpp" + +#include "Kyoto/Animation/CAnimCharacterSet.hpp" +#include "Kyoto/CFactoryMgr.hpp" + +IObjFactory::~IObjFactory() {} + +rstl::auto_ptr< IObj > +CCharacterFactoryBuilder::CDummyFactory::Build(const SObjectTag& tag, + const CVParamTransfer& params) { + CAssetId id = tag.GetId(); + TToken< CAnimCharacterSet > ancs = gpSimplePool->GetObj(SObjectTag('ANCS', id)); + return CFactoryFnReturn(rs_new CCharacterFactory(*gpSimplePool, ancs, id)).GetObjForTransfer(); +} + +void CCharacterFactoryBuilder::CDummyFactory::BuildAsync(const SObjectTag& tag, + const CVParamTransfer& params, + IObj** out) { + *out = Build(tag, params).release(); +} + +void CCharacterFactoryBuilder::CDummyFactory::CancelBuild(const SObjectTag&) {} + +CCharacterFactoryBuilder::CCharacterFactoryBuilder() : mDummyStore(mDummyFactory) {} + +CCharacterFactoryBuilder::~CCharacterFactoryBuilder() {} + +TToken< CCharacterFactory > CCharacterFactoryBuilder::GetFactory(const CAnimRes& res) { + return mDummyStore.GetObj(SObjectTag('ANCS', res.GetId()), CVParamTransfer::Null()); +} diff --git a/src/MetroidPrime/Factories/CCharacterFactory.cpp b/src/MetroidPrime/Factories/CCharacterFactory.cpp new file mode 100644 index 000000000..ee2e66de6 --- /dev/null +++ b/src/MetroidPrime/Factories/CCharacterFactory.cpp @@ -0,0 +1,141 @@ +#include "MetroidPrime/Factories/CCharacterFactory.hpp" + +#include "MetroidPrime/CAnimData.hpp" +#include "MetroidPrime/CAnimationDatabaseGame.hpp" +#include "MetroidPrime/CTransitionDatabaseGame.hpp" + +#include "Kyoto/Animation/CAnimCharacterSet.hpp" +#include "Kyoto/Animation/CCharLayoutInfo.hpp" +#include "Kyoto/Animation/CPrimitive.hpp" +#include "Kyoto/Animation/CSkinnedModel.hpp" +#include "Kyoto/CFactoryMgr.hpp" +#include "Kyoto/CRandom16.hpp" +#include "Kyoto/CVParamTransfer.hpp" +#include "Kyoto/Graphics/CModel.hpp" + +inline CTransitionManager::CTransitionManager(const CAnimSysContext& context) : mContext(context) {} + +rstl::auto_ptr< IObj > CCharacterFactory::CDummyFactory::Build(const SObjectTag& tag, + const CVParamTransfer& params) { + const FourCC type = tag.GetType(); + const CVParamTransfer paramCopy(params); + const CCharacterInfo& charInfo = + *static_cast< const TObjOwnerParam< const CCharacterInfo* >& >(*paramCopy).GetData(); + switch (type) { + case 0: + return CFactoryFnReturn( + rs_new CSkinnedModel( + gpSimplePool->GetObj(SObjectTag('CMDL', charInfo.GetModelId())), + gpSimplePool->GetObj(SObjectTag('CSKR', charInfo.GetSkinRulesId())), + gpSimplePool->GetObj(SObjectTag('CINF', charInfo.GetCharLayoutInfoId())))) + .GetObjForTransfer(); + case 1: + return CFactoryFnReturn( + rs_new CSkinnedModel( + gpSimplePool->GetObj(SObjectTag('CMDL', charInfo.GetIceModelId())), + gpSimplePool->GetObj(SObjectTag('CSKR', charInfo.GetIceSkinRulesId())), + gpSimplePool->GetObj(SObjectTag('CINF', charInfo.GetCharLayoutInfoId())))) + .GetObjForTransfer(); + } + return rstl::auto_ptr< IObj >(); +} + +void CCharacterFactory::CDummyFactory::BuildAsync(const SObjectTag& tag, + const CVParamTransfer& params, IObj** out) { + *out = Build(tag, params).release(); +} + +void CCharacterFactory::CDummyFactory::CancelBuild(const SObjectTag&) {} + +CCharacterFactory::CCharacterFactory(CSimplePool& store, + const TLockedToken< CAnimCharacterSet >& ancs, CAssetId selfId) +: mCharInfoDB(GetCharacterInfoDB(**ancs)) +, mCharLayoutInfoDB(GetCharLayoutInfoDB(store, mCharInfoDB)) +, mAdditiveInfo(ancs->GetAnimationSet().GetAdditiveAnimInfoList()) +, mDefaultAdditiveInfo(ancs->GetAnimationSet().GetDefaultAdditiveAnimInfo()) +, mSelfId(selfId) +, mCacheResPool(mDummyFactory) +, mAnimCharacterSet(ancs) { + const CAnimationSet& animSet = ancs->GetAnimationSet(); + const CAnimationSet::AnimationList& animations = animSet.GetAnimations(); + const CAnimationSet::TransitionList& transitions = animSet.GetTransitions(); + const CAnimationSet::HalfTransitionList& halfTransitions = animSet.GetHalfTransitions(); + const rstl::rc_ptr< IMetaTrans > defaultTrans = animSet.GetDefaultTransition(); + const TToken< CAnimationDatabaseGame > animDB(rs_new CAnimationDatabaseGame(animations)); + const TToken< CTransitionDatabaseGame > transDB( + rs_new CTransitionDatabaseGame(transitions, halfTransitions, defaultTrans)); + const rstl::ncrc_ptr< CRandom16 > random(rs_new CRandom16(2334)); + mSysContext = rstl::ncrc_ptr< CAnimSysContext >( + rs_new CAnimSysContext(transDB, random, store, animSet.GetEventSets())); + mAnimMgr = rs_new CAnimationManager(animDB, *mSysContext); + mTransMgr = rs_new CTransitionManager(*mSysContext); + + rstl::vector< CPrimitive > primitives; + animDB.NonConstCopy()->GetAllUniquePrimitives(primitives); +} + +rstl::auto_ptr< CAnimData > +CCharacterFactory::CreateCharacter(int charIdx, bool loop, + const TLockedToken< CCharacterFactory >& factory, + int defaultAnim) const { + const CCharacterInfo& charInfo = mCharInfoDB[charIdx]; + const SObjectTag modelTag(0, charInfo.GetModelId()); + TToken< CSkinnedModel > skinnedModel = mCacheResPool.GetObj( + modelTag, CVParamTransfer(rs_new TObjOwnerParam< const CCharacterInfo* >(&charInfo))); + + const CAssetId iceModelId = charInfo.GetIceModelId(); + const CAssetId iceSkinId = charInfo.GetIceSkinRulesId(); + const SObjectTag iceTag(1, iceModelId); + rstl::optional_object< TLockedToken< CSkinnedModelWithAvgNormals > > iceModel; + if (iceModelId != kInvalidAssetId && iceSkinId != kInvalidAssetId && iceModelId != 0 && + iceSkinId != 0) { + iceModel = TLockedToken< CSkinnedModelWithAvgNormals >(mCacheResPool.GetObj( + iceTag, CVParamTransfer(rs_new TObjOwnerParam< const CCharacterInfo* >(&charInfo)))); + } + + const CAssetId spatialId = charInfo.GetSpatialPrimitiveId(); + const SObjectTag spatialTag('CSPP', spatialId); + rstl::optional_object< TLockedToken< CSpatialPrimitive > > spatial; + if (spatialId != kInvalidAssetId) { + spatial = TLockedToken< CSpatialPrimitive >(gpSimplePool->GetObj(spatialTag)); + } + + CAnimData* animData = rs_new CAnimData( + mSelfId, charInfo, defaultAnim, charIdx, loop, mCharLayoutInfoDB[charIdx], skinnedModel, + iceModel, spatial, mSysContext, mAnimMgr, mTransMgr, factory, charInfo.GetAnimatedScale()); + return animData; +} + +const CCharacterInfo& CCharacterFactory::GetCharInfo(int charIdx) const { + return mCharInfoDB[charIdx]; +} + +rstl::vector< CCharacterInfo > +CCharacterFactory::GetCharacterInfoDB(const CAnimCharacterSet& ancs) { + const rstl::vector< rstl::pair< int, CCharacterInfo > >& chars = + ancs.GetCharacterSet().GetCharacterList(); + rstl::vector< rstl::pair< int, CCharacterInfo > >::const_iterator it = chars.begin(); + rstl::vector< rstl::pair< int, CCharacterInfo > >::const_iterator end = chars.end(); + rstl::vector< CCharacterInfo > result; + result.reserve(chars.size()); + for (; it != end; ++it) { + result.push_back_unsafe(it->second); + } + return result; +} + +rstl::vector< TToken< CCharLayoutInfo > > +CCharacterFactory::GetCharLayoutInfoDB(CSimplePool& store, + const rstl::vector< CCharacterInfo >& chars) { + rstl::vector< TToken< CCharLayoutInfo > > result; + const uint count = chars.size(); + result.reserve(count); + for (uint i = 0; i < count; ++i) { + TToken< CCharLayoutInfo > layout = + store.GetObj(SObjectTag('CINF', chars[i].GetCharLayoutInfoId())); + result.push_back_unsafe(layout); + } + return result; +} + +CCharacterFactory::~CCharacterFactory() {}