diff --git a/config/GM8E01_00/symbols.txt b/config/GM8E01_00/symbols.txt index 822b12a6..469cd2c6 100644 --- a/config/GM8E01_00/symbols.txt +++ b/config/GM8E01_00/symbols.txt @@ -1068,7 +1068,7 @@ DrawAdditionalFilters__13CStateManagerCFv = .text:0x80045D64; // type:function s ResetViewAfterDraw__13CStateManagerCFRCQ29CGraphics9CViewportRC12CTransform4f = .text:0x80045E1C; // type:function size:0x160 scope:global DrawWorld__13CStateManagerCFv = .text:0x80045F7C; // type:function size:0xD90 scope:global GetAliveAreasEnd__6CWorldFv = .text:0x80046D0C; // type:function size:0xC scope:global -fn_80046D18 = .text:0x80046D18; // type:function size:0x68 +SetupFogForArea3XRange__13CStateManagerCF7TAreaId = .text:0x80046D18; // type:function size:0x68 SetupFogForArea__13CStateManagerCF7TAreaId = .text:0x80046D80; // type:function size:0x68 scope:global fn_80046DE8 = .text:0x80046DE8; // type:function size:0x88 SetupFogForArea__13CStateManagerCFRC9CGameArea = .text:0x80046E70; // type:function size:0xAC scope:global @@ -6900,7 +6900,7 @@ reserve__Q24rstl64vectorFi = .text:0x8012CC4C; // type:function size:0x108 scope:global reserve__Q24rstl71vectorFi = .text:0x8012CD54; // type:function size:0x11C scope:global -erase__Q24rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ34rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>8iterator = .text:0x8012CE70; // type:function size:0x7C scope:global +do_erase__Q24rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>FPQ34rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>4node = .text:0x8012CE70; // type:function size:0x7C scope:global __sinit_CSpacePirate_cpp = .text:0x8012CEEC; // type:function size:0x41C scope:local __dt__17CScriptCoverPointFv = .text:0x8012D308; // type:function size:0x74 scope:weak GetTouchBounds__17CScriptCoverPointCFv = .text:0x8012D37C; // type:function size:0x50 scope:global @@ -6981,17 +6981,17 @@ NotifyNeighbors__11CFlickerBatFR13CStateManager = .text:0x801307A8; // type:func CanBeShot__11CFlickerBatFRC13CStateManageri = .text:0x801308C4; // type:function size:0x90 scope:global Touch__11CFlickerBatFR6CActorR13CStateManager = .text:0x80130954; // type:function size:0x114 scope:global Think__11CFlickerBatFfR13CStateManager = .text:0x80130A68; // type:function size:0x2C0 scope:global -Death__11CFlickerBatFRC9CVector3fR13CStateManager = .text:0x80130D28; // type:function size:0x78 scope:global -fn_80130DA0 = .text:0x80130DA0; // type:function size:0x154 +Death__11CFlickerBatFR13CStateManagerRC9CVector3f18EScriptObjectState = .text:0x80130D28; // type:function size:0x78 scope:global +CheckFadeEffect__11CFlickerBatFR13CStateManager = .text:0x80130DA0; // type:function size:0x154 FlickerBatStateChanged__11CFlickerBatFQ211CFlickerBat16EFlickerBatStateR13CStateManager = .text:0x80130EF4; // type:function size:0x120 scope:global GetFlickerBatState__11CFlickerBatCFv = .text:0x80131014; // type:function size:0x8 scope:global SetFlickerBatState__11CFlickerBatFQ211CFlickerBat16EFlickerBatStateR13CStateManager = .text:0x8013101C; // type:function size:0x48 scope:global -fn_80131064 = .text:0x80131064; // type:function size:0x88 -DoUserAnimEvent__11CFlickerBatFR13CStateManagerRC13CInt32POINode14EUserEventType = .text:0x801310EC; // type:function size:0x78 scope:global +ToggleVisible__11CFlickerBatFR13CStateManager = .text:0x80131064; // type:function size:0x88 +DoUserAnimEvent__11CFlickerBatFR13CStateManagerRC13CInt32POINode14EUserEventTypef = .text:0x801310EC; // type:function size:0x78 scope:global AcceptScriptMsg__11CFlickerBatF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x80131164; // type:function size:0x100 scope:global Accept__11CFlickerBatFR8IVisitor = .text:0x80131264; // type:function size:0x38 scope:global __dt__11CFlickerBatFv = .text:0x8013129C; // type:function size:0x60 scope:global -__ct__11CFlickerBatF9TUniqueIdRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>Q210CPatterned11EFlavorTypeRC11CEntityInfoRC12CTransform4fRC10CModelDataRC14CPatternedInfoQ210CPatterned13EColliderTypebRC16CActorParameters = .text:0x801312FC; // type:function size:0x13C scope:global +__ct__11CFlickerBatF9TUniqueIdRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>Q210CPatterned11EFlavorTypeRC11CEntityInfoRC12CTransform4fRC10CModelDataRC14CPatternedInfoQ210CPatterned13EColliderTypebRC16CActorParametersb = .text:0x801312FC; // type:function size:0x13C scope:global DeliverCmd__16CBodyStateCmdMgrF13EBodyStateCmd = .text:0x80131438; // type:function size:0x18 scope:global GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd = .text:0x80131450; // type:function size:0x2C scope:global GetCmd__16CBodyStateCmdMgrCF13EBodyStateCmd = .text:0x8013147C; // type:function size:0x2C scope:global @@ -17117,7 +17117,7 @@ lbl_803CFEC0 = .rodata:0x803CFEC0; // type:object size:0xB0 lbl_803CFF70 = .rodata:0x803CFF70; // type:object size:0xC8 lbl_803D0038 = .rodata:0x803D0038; // type:object size:0x10 @stringBase0 = .rodata:0x803D0048; // type:object size:0x7 scope:local data:string_table -lbl_803D0050 = .rodata:0x803D0050; // type:object size:0x8 +@stringBase0 = .rodata:0x803D0050; // type:object size:0x7 scope:local data:string_table lbl_803D0058 = .rodata:0x803D0058; // type:object size:0x8 lbl_803D0060 = .rodata:0x803D0060; // type:object size:0x10 lbl_803D0070 = .rodata:0x803D0070; // type:object size:0x8 @@ -18407,7 +18407,7 @@ __vt__11CPathCamera = .data:0x803E0C68; // type:object size:0x74 __vt__11CFluidPlane = .data:0x803E0CE0; // type:object size:0x20 __vt__19CScriptGrapplePoint = .data:0x803E0D00; // type:object size:0x6C scope:global __vt__19CHUDBillboardEffect = .data:0x803E0D70; // type:object size:0x6C scope:global -lbl_803E0DE0 = .data:0x803E0DE0; // type:object size:0x2D0 +__vt__11CFlickerBat = .data:0x803E0DE0; // type:object size:0x2D0 __vt__16CBCLoopAttackCmd = .data:0x803E10B0; // type:object size:0xC scope:global __vt__20CBCAdditiveFlinchCmd = .data:0x803E10BC; // type:object size:0xC scope:global __vt__22CBCAdditiveReactionCmd = .data:0x803E10C8; // type:object size:0x10 scope:global @@ -20377,7 +20377,7 @@ lbl_805A76DC = .sdata:0x805A76DC; // type:object size:0x4 data:4byte @244 = .sdata:0x805A76E0; // type:object size:0x4 scope:local data:4byte @461 = .sdata:0x805A76E8; // type:object size:0x4 scope:local align:4 data:float lbl_805A76F0 = .sdata:0x805A76F0; // type:object size:0x4 data:4byte -lbl_805A76F4 = .sdata:0x805A76F4; // type:object size:0x4 data:4byte +@464 = .sdata:0x805A76F4; // type:object size:0x4 data:4byte lbl_805A76F8 = .sdata:0x805A76F8; // type:object size:0x4 data:4byte lbl_805A76FC = .sdata:0x805A76FC; // type:object size:0x4 data:4byte lbl_805A7700 = .sdata:0x805A7700; // type:object size:0x4 data:4byte @@ -23998,16 +23998,16 @@ lbl_805AB648 = .sdata2:0x805AB648; // type:object size:0x8 align:4 data:float @845 = .sdata2:0x805AB66C; // type:object size:0x4 scope:local align:4 data:float @846 = .sdata2:0x805AB670; // type:object size:0x4 scope:local align:4 data:float @848 = .sdata2:0x805AB678; // type:object size:0x8 scope:local align:8 data:double -lbl_805AB680 = .sdata2:0x805AB680; // type:object size:0x4 align:4 data:float -lbl_805AB684 = .sdata2:0x805AB684; // type:object size:0x4 align:4 data:float +@593 = .sdata2:0x805AB680; // type:object size:0x4 align:4 data:float +@594 = .sdata2:0x805AB684; // type:object size:0x4 align:4 data:float lbl_805AB688 = .sdata2:0x805AB688; // type:object size:0x4 align:4 data:float lbl_805AB68C = .sdata2:0x805AB68C; // type:object size:0x4 align:4 data:float lbl_805AB690 = .sdata2:0x805AB690; // type:object size:0x4 align:4 data:float lbl_805AB694 = .sdata2:0x805AB694; // type:object size:0x4 align:4 data:float lbl_805AB698 = .sdata2:0x805AB698; // type:object size:0x4 align:4 data:float lbl_805AB69C = .sdata2:0x805AB69C; // type:object size:0x4 align:4 data:float -lbl_805AB6A0 = .sdata2:0x805AB6A0; // type:object size:0x4 align:4 data:float -lbl_805AB6A4 = .sdata2:0x805AB6A4; // type:object size:0x4 align:4 data:float +@595 = .sdata2:0x805AB6A0; // type:object size:0x4 align:4 data:float +@760 = .sdata2:0x805AB6A4; // type:object size:0x4 align:4 data:float lbl_805AB6A8 = .sdata2:0x805AB6A8; // type:object size:0x4 align:4 data:float lbl_805AB6AC = .sdata2:0x805AB6AC; // type:object size:0x4 align:4 data:float lbl_805AB6B0 = .sdata2:0x805AB6B0; // type:object size:0x4 align:4 data:float diff --git a/config/GM8E01_01/symbols.txt b/config/GM8E01_01/symbols.txt index 303d02fb..29ab6c3a 100644 --- a/config/GM8E01_01/symbols.txt +++ b/config/GM8E01_01/symbols.txt @@ -1068,7 +1068,7 @@ DrawAdditionalFilters__13CStateManagerCFv = .text:0x80045DE0; // type:function s ResetViewAfterDraw__13CStateManagerCFRCQ29CGraphics9CViewportRC12CTransform4f = .text:0x80045E98; // type:function size:0x160 scope:global DrawWorld__13CStateManagerCFv = .text:0x80045FF8; // type:function size:0xD90 scope:global GetAliveAreasEnd__6CWorldFv = .text:0x80046D88; // type:function size:0xC scope:global -fn_80046D18 = .text:0x80046D94; // type:function size:0x68 scope:global +SetupFogForArea3XRange__13CStateManagerCF7TAreaId = .text:0x80046D94; // type:function size:0x68 scope:global SetupFogForArea__13CStateManagerCF7TAreaId = .text:0x80046DFC; // type:function size:0x68 scope:global fn_80046DE8 = .text:0x80046E64; // type:function size:0x88 scope:global SetupFogForArea__13CStateManagerCFRC9CGameArea = .text:0x80046EEC; // type:function size:0xAC scope:global @@ -6900,7 +6900,7 @@ reserve__Q24rstl64vectorFi = .text:0x8012CCC8; // type:function size:0x108 scope:global reserve__Q24rstl71vectorFi = .text:0x8012CDD0; // type:function size:0x11C scope:global -erase__Q24rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ34rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>8iterator = .text:0x8012CEEC; // type:function size:0x7C scope:global +do_erase__Q24rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>FPQ34rstl43list<9TUniqueId,Q24rstl17rmemory_allocator>4node = .text:0x8012CEEC; // type:function size:0x7C scope:global __sinit_CSpacePirate_cpp = .text:0x8012CF68; // type:function size:0x41C scope:global __dt__17CScriptCoverPointFv = .text:0x8012D384; // type:function size:0x74 scope:weak GetTouchBounds__17CScriptCoverPointCFv = .text:0x8012D3F8; // type:function size:0x50 scope:global @@ -6981,17 +6981,17 @@ NotifyNeighbors__11CFlickerBatFR13CStateManager = .text:0x80130824; // type:func CanBeShot__11CFlickerBatFRC13CStateManageri = .text:0x80130940; // type:function size:0x90 scope:global Touch__11CFlickerBatFR6CActorR13CStateManager = .text:0x801309D0; // type:function size:0x114 scope:global Think__11CFlickerBatFfR13CStateManager = .text:0x80130AE4; // type:function size:0x2C0 scope:global -Death__11CFlickerBatFRC9CVector3fR13CStateManager = .text:0x80130DA4; // type:function size:0x78 scope:global -fn_80130DA0 = .text:0x80130E1C; // type:function size:0x154 scope:global +Death__11CFlickerBatFR13CStateManagerRC9CVector3f18EScriptObjectState = .text:0x80130DA4; // type:function size:0x78 scope:global +CheckFadeEffect__11CFlickerBatFR13CStateManager = .text:0x80130E1C; // type:function size:0x154 scope:global FlickerBatStateChanged__11CFlickerBatFQ211CFlickerBat16EFlickerBatStateR13CStateManager = .text:0x80130F70; // type:function size:0x120 scope:global GetFlickerBatState__11CFlickerBatCFv = .text:0x80131090; // type:function size:0x8 scope:global SetFlickerBatState__11CFlickerBatFQ211CFlickerBat16EFlickerBatStateR13CStateManager = .text:0x80131098; // type:function size:0x48 scope:global -fn_80131064 = .text:0x801310E0; // type:function size:0x88 scope:global -DoUserAnimEvent__11CFlickerBatFR13CStateManagerRC13CInt32POINode14EUserEventType = .text:0x80131168; // type:function size:0x78 scope:global +ToggleVisible__11CFlickerBatFR13CStateManager = .text:0x801310E0; // type:function size:0x88 scope:global +DoUserAnimEvent__11CFlickerBatFR13CStateManagerRC13CInt32POINode14EUserEventTypef = .text:0x80131168; // type:function size:0x78 scope:global AcceptScriptMsg__11CFlickerBatF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x801311E0; // type:function size:0x100 scope:global Accept__11CFlickerBatFR8IVisitor = .text:0x801312E0; // type:function size:0x38 scope:global __dt__11CFlickerBatFv = .text:0x80131318; // type:function size:0x60 scope:global -__ct__11CFlickerBatF9TUniqueIdRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>Q210CPatterned11EFlavorTypeRC11CEntityInfoRC12CTransform4fRC10CModelDataRC14CPatternedInfoQ210CPatterned13EColliderTypebRC16CActorParameters = .text:0x80131378; // type:function size:0x13C scope:global +__ct__11CFlickerBatF9TUniqueIdRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>Q210CPatterned11EFlavorTypeRC11CEntityInfoRC12CTransform4fRC10CModelDataRC14CPatternedInfoQ210CPatterned13EColliderTypebRC16CActorParametersb = .text:0x80131378; // type:function size:0x13C scope:global DeliverCmd__16CBodyStateCmdMgrF13EBodyStateCmd = .text:0x801314B4; // type:function size:0x18 scope:global GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd = .text:0x801314CC; // type:function size:0x2C scope:global GetCmd__16CBodyStateCmdMgrCF13EBodyStateCmd = .text:0x801314F8; // type:function size:0x2C scope:global @@ -17120,7 +17120,7 @@ lbl_803D00A0 = .rodata:0x803D00A0; // type:object size:0xB0 lbl_803D0150 = .rodata:0x803D0150; // type:object size:0xC8 lbl_803D0218 = .rodata:0x803D0218; // type:object size:0x10 @stringBase0 = .rodata:0x803D0228; // type:object size:0x7 scope:local data:string_table -lbl_803D0230 = .rodata:0x803D0230; // type:object size:0x8 +@stringBase0 = .rodata:0x803D0230; // type:object size:0x7 scope:local data:string_table lbl_803D0238 = .rodata:0x803D0238; // type:object size:0x8 lbl_803D0240 = .rodata:0x803D0240; // type:object size:0x10 lbl_803D0250 = .rodata:0x803D0250; // type:object size:0x8 @@ -18319,7 +18319,7 @@ lbl_803E0E48 = .data:0x803E0E48; // type:object size:0x78 __vt__11CFluidPlane = .data:0x803E0EC0; // type:object size:0x20 __vt__19CScriptGrapplePoint = .data:0x803E0EE0; // type:object size:0x6C __vt__19CHUDBillboardEffect = .data:0x803E0F50; // type:object size:0x6C -lbl_803E0FC0 = .data:0x803E0FC0; // type:object size:0x2D0 +__vt__11CFlickerBat = .data:0x803E0FC0; // type:object size:0x2D0 __vt__16CBCLoopAttackCmd = .data:0x803E1290; // type:object size:0xC __vt__20CBCAdditiveFlinchCmd = .data:0x803E129C; // type:object size:0xC __vt__22CBCAdditiveReactionCmd = .data:0x803E12A8; // type:object size:0x10 @@ -20277,8 +20277,8 @@ lbl_805A78B8 = .sdata:0x805A78B8; // type:object size:0x4 data:4byte lbl_805A78BC = .sdata:0x805A78BC; // type:object size:0x4 data:4byte @233 = .sdata:0x805A78C0; // type:object size:0x4 scope:local data:4byte @442 = .sdata:0x805A78C8; // type:object size:0x4 scope:local align:4 data:float -lbl_805A78D0 = .sdata:0x805A78D0; // type:object size:0x4 data:4byte -lbl_805A78D4 = .sdata:0x805A78D4; // type:object size:0x4 data:4byte +@505 = .sdata:0x805A78D0; // type:object size:0x4 data:4byte +@457 = .sdata:0x805A78D4; // type:object size:0x4 data:4byte lbl_805A78D8 = .sdata:0x805A78D8; // type:object size:0x4 data:4byte lbl_805A78DC = .sdata:0x805A78DC; // type:object size:0x4 data:4byte lbl_805A78E0 = .sdata:0x805A78E0; // type:object size:0x4 data:4byte @@ -23901,16 +23901,16 @@ lbl_805AB828 = .sdata2:0x805AB828; // type:object size:0x8 align:4 data:float @826 = .sdata2:0x805AB84C; // type:object size:0x4 scope:local align:4 data:float @827 = .sdata2:0x805AB850; // type:object size:0x4 scope:local align:4 data:float @829 = .sdata2:0x805AB858; // type:object size:0x8 scope:local align:8 data:double -lbl_805AB860 = .sdata2:0x805AB860; // type:object size:0x4 align:4 data:float -lbl_805AB864 = .sdata2:0x805AB864; // type:object size:0x4 align:4 data:float -lbl_805AB868 = .sdata2:0x805AB868; // type:object size:0x4 align:4 data:float -lbl_805AB86C = .sdata2:0x805AB86C; // type:object size:0x4 align:4 data:float -lbl_805AB870 = .sdata2:0x805AB870; // type:object size:0x4 align:4 data:float -lbl_805AB874 = .sdata2:0x805AB874; // type:object size:0x4 align:4 data:float -lbl_805AB878 = .sdata2:0x805AB878; // type:object size:0x4 align:4 data:float -lbl_805AB87C = .sdata2:0x805AB87C; // type:object size:0x4 align:4 data:float -lbl_805AB880 = .sdata2:0x805AB880; // type:object size:0x4 align:4 data:float -lbl_805AB884 = .sdata2:0x805AB884; // type:object size:0x4 align:4 data:float +@683 = .sdata2:0x805AB860; // type:object size:0x4 align:4 data:float +@684 = .sdata2:0x805AB864; // type:object size:0x4 align:4 data:float +@765 = .sdata2:0x805AB868; // type:object size:0x4 align:4 data:float +@766 = .sdata2:0x805AB86C; // type:object size:0x4 align:4 data:float +@767 = .sdata2:0x805AB870; // type:object size:0x4 align:4 data:float +@768 = .sdata2:0x805AB874; // type:object size:0x4 align:4 data:float +@841 = .sdata2:0x805AB878; // type:object size:0x4 align:4 data:float +@842 = .sdata2:0x805AB87C; // type:object size:0x4 align:4 data:float +@1050 = .sdata2:0x805AB880; // type:object size:0x4 align:4 data:float +@1215 = .sdata2:0x805AB884; // type:object size:0x4 align:4 data:float lbl_805AB888 = .sdata2:0x805AB888; // type:object size:0x4 align:4 data:float lbl_805AB88C = .sdata2:0x805AB88C; // type:object size:0x4 align:4 data:float lbl_805AB890 = .sdata2:0x805AB890; // type:object size:0x4 align:4 data:float diff --git a/config/GM8E01_48/symbols.txt b/config/GM8E01_48/symbols.txt index c3857e8c..58515e77 100644 --- a/config/GM8E01_48/symbols.txt +++ b/config/GM8E01_48/symbols.txt @@ -18246,7 +18246,7 @@ lbl_803E0C98 = .data:0x803E0C98; // type:object size:0x48 lbl_803E0CE0 = .data:0x803E0CE0; // type:object size:0x18 lbl_803E0CF8 = .data:0x803E0CF8; // type:object size:0x70 lbl_803E0D68 = .data:0x803E0D68; // type:object size:0x78 -lbl_803E0DE0 = .data:0x803E0DE0; // type:object size:0x20 +__vt__11CFlickerBat = .data:0x803E0DE0; // type:object size:0x20 lbl_803E0E00 = .data:0x803E0E00; // type:object size:0x70 lbl_803E0E70 = .data:0x803E0E70; // type:object size:0x70 lbl_803E0EE0 = .data:0x803E0EE0; // type:object size:0x2D0 diff --git a/configure.py b/configure.py index eabf8c87..be512e4c 100755 --- a/configure.py +++ b/configure.py @@ -353,6 +353,7 @@ def DolphinLib(lib_name, objects): "shift_jis": True, } + def TrkLib(lib_name, objects): return { "lib": lib_name + "D" if args.debug else "", @@ -376,6 +377,7 @@ def RetroLib(lib_name, progress_category, objects): "shift_jis": False, } + def KyotoLib(lib_name, progress_category, objects): return { "lib": lib_name + "CW" + "D" if args.debug else "", @@ -389,12 +391,12 @@ def KyotoLib(lib_name, progress_category, objects): def MusyX( - objects, - mw_version="GC/1.3.2", - debug=False, - major=2, - minor=0, - patch=3 if version_num == 7 else 0, + objects, + mw_version="GC/1.3.2", + debug=False, + major=2, + minor=0, + patch=3 if version_num == 7 else 0, ): cflags = cflags_musyx if not debug else cflags_musyx_debug return { @@ -739,7 +741,7 @@ config.libs = [ MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/ScriptObjects/CHUDBillboardEffect.cpp", ), - Object(NonMatching, "MetroidPrime/Enemies/CFlickerBat.cpp"), + Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Enemies/CFlickerBat.cpp"), Object( NonMatching, "MetroidPrime/BodyState/CBodyStateCmdMgr.cpp", @@ -2485,7 +2487,7 @@ for lib in config.libs: def link_order_callback( - module_id: int, units: List[str] + module_id: int, units: List[str] ) -> Sequence[Union[str, BuildConfigUnit]]: # if module_id == 0: # DOL # return units + [ diff --git a/include/Collision/CMaterialFilter.hpp b/include/Collision/CMaterialFilter.hpp index fea36a9f..95357597 100644 --- a/include/Collision/CMaterialFilter.hpp +++ b/include/Collision/CMaterialFilter.hpp @@ -29,7 +29,7 @@ public: return CMaterialFilter(include, CMaterialList(), kFT_Include); } static CMaterialFilter MakeExclude(const CMaterialList& exclude) { - return CMaterialFilter(CMaterialList(), exclude, kFT_Exclude); + return CMaterialFilter(CMaterialList(0x00000000FFFFFFFF), exclude, kFT_Exclude); } static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude) { diff --git a/include/Kyoto/CRandom16.hpp b/include/Kyoto/CRandom16.hpp index a61103e6..ef689c4a 100644 --- a/include/Kyoto/CRandom16.hpp +++ b/include/Kyoto/CRandom16.hpp @@ -28,7 +28,7 @@ public: int Range(int min, int max); float Range(float min, float max); int Next(); - float Float(); + const float Float(); static CRandom16* GetRandomNumber(); diff --git a/include/Kyoto/Math/CVector3f.hpp b/include/Kyoto/Math/CVector3f.hpp index c4bc0c7b..c29c2856 100644 --- a/include/Kyoto/Math/CVector3f.hpp +++ b/include/Kyoto/Math/CVector3f.hpp @@ -6,7 +6,6 @@ #include "Kyoto/Math/CVector2f.hpp" #include "float.h" -#include "rstl/algorithm.hpp" class CInputStream; class COutputStream; diff --git a/include/MetroidPrime/BodyState/CBodyController.hpp b/include/MetroidPrime/BodyState/CBodyController.hpp index b3a6a426..7162bf6b 100644 --- a/include/MetroidPrime/BodyState/CBodyController.hpp +++ b/include/MetroidPrime/BodyState/CBodyController.hpp @@ -43,6 +43,7 @@ public: void SetFallState(pas::EFallState state); // { x2f0_fallState = state; } pas::EFallState GetFallState() const; // { return x2f0_fallState; } const CBodyStateInfo& GetBodyStateInfo() const { return x2a4_bodyStateInfo; } + CBodyStateInfo& BodyStateInfo() { return x2a4_bodyStateInfo; } pas::ELocomotionType GetLocomotionType() const { return x2ec_locomotionType; } int GetCurrentAnimId() const { return x2f8_curAnim; } void SetTurnSpeed(float speed); diff --git a/include/MetroidPrime/CGameCollision.hpp b/include/MetroidPrime/CGameCollision.hpp index 354c5bae..8f8584ef 100644 --- a/include/MetroidPrime/CGameCollision.hpp +++ b/include/MetroidPrime/CGameCollision.hpp @@ -41,6 +41,8 @@ public: TUniqueId&, CCollisionInfo&, double&); static CRayCastResult RayStaticIntersection(const CStateManager&, const CVector3f&, const CVector3f&, float, const CMaterialFilter&); + static bool RayStaticIntersectionBool(const CStateManager&, const CVector3f&, const CVector3f&, + float, const CMaterialFilter&); static CRayCastResult RayDynamicIntersection(const CStateManager& mgr, TUniqueId& idOut, const CVector3f& pos, const CVector3f& dir, float mag, const CMaterialFilter& filter, diff --git a/include/MetroidPrime/CStateManager.hpp b/include/MetroidPrime/CStateManager.hpp index d7df35d0..8a63c66e 100644 --- a/include/MetroidPrime/CStateManager.hpp +++ b/include/MetroidPrime/CStateManager.hpp @@ -235,6 +235,7 @@ public: void InformListeners(const CVector3f&, EListenNoiseType); // Fog + void SetupFogForArea3XRange(TAreaId area) const; void SetupFogForArea(TAreaId area) const; // @@ -295,6 +296,13 @@ public: uint GetInputFrameIdx() const { return x8d4_inputFrameIdx; } CMapWorldInfo* MapWorldInfo() const { return x8c0_mapWorldInfo.GetPtr(); } + void AddActiveFlickerBat(const TUniqueId& uid) { xf3c_activeFlickerBats.push_back(uid); } + void RemoveActiveFlickerBat(const TUniqueId& uid) { xf3c_activeFlickerBats.remove(uid); } + + rstl::list< TUniqueId >& GetActiveFlickerBats() { return xf3c_activeFlickerBats; } + + void DrawSpaceWarp(const CVector3f& point, float strength) const; + private: enum EInitPhase { kIP_LoadWorld, kIP_LoadFirstArea, kIP_Done }; diff --git a/include/MetroidPrime/Enemies/CFlickerBat.hpp b/include/MetroidPrime/Enemies/CFlickerBat.hpp index 55e7ebd9..5e002876 100644 --- a/include/MetroidPrime/Enemies/CFlickerBat.hpp +++ b/include/MetroidPrime/Enemies/CFlickerBat.hpp @@ -3,6 +3,58 @@ #include "MetroidPrime/Enemies/CPatterned.hpp" -class CFlickerBat : public CPatterned {}; +class CFlickerBat : public CPatterned { +public: + enum EFlickerBatState { + kFBS_Visible, + kFBS_Hidden, + kFBS_FadeIn, + kFBS_FadeOut, + }; + + CFlickerBat(const TUniqueId uid, const rstl::string& name, const EFlavorType flavor, + const CEntityInfo& info, const CTransform4f& xf, const CModelData& mData, + const CPatternedInfo& pInfo, EColliderType colType, bool startsVisible, + const CActorParameters& actParms, const bool enableLineOfSight); + ~CFlickerBat() override; + + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, + float dt) override; + + void Death(CStateManager& mgr, const CVector3f& direction, EScriptObjectState state) override; + void Think(float dt, CStateManager& mgr) override; + void Touch(CActor&, CStateManager&) override; + + bool CanBeShot(const CStateManager&, int) override; + bool HearShot(CStateManager&, float) override; + void Taunt(CStateManager& mgr, EStateMsg msg, float arg) override; + void Shuffle(CStateManager& mgr, EStateMsg msg, float arg) override; + void Patrol(CStateManager& mgr, EStateMsg msg, float arg) override; + void Render(const CStateManager&) const override; + bool InPosition(CStateManager&, float) override; + void Attack(CStateManager& mgr, EStateMsg msg, float arg) override; + +private: + void ToggleVisible(CStateManager& mgr); + void SetFlickerBatState(EFlickerBatState state, CStateManager& mgr); + void FlickerBatStateChanged(EFlickerBatState state, CStateManager& mgr); + void SetHeardShot(bool heardShot); + void CheckFadeEffect(CStateManager& mgr); + void NotifyNeighbors(CStateManager& mgr); + bool IsVisible() const { return mState == kFBS_Visible; } + EFlickerBatState GetFlickerBatState() const; + float x568_; + float x56c_; + float x570_; + EFlickerBatState mState; + float mFadeRemTime; + float mFadeDuration; + bool mWasInXray : 1; + bool mHeardShot : 1; + bool mInLOS : 1; + bool mEnableLOSCheck : 1; +}; #endif // _CFLICKERBAT diff --git a/include/MetroidPrime/Enemies/CPatterned.hpp b/include/MetroidPrime/Enemies/CPatterned.hpp index b243e867..82fd2744 100644 --- a/include/MetroidPrime/Enemies/CPatterned.hpp +++ b/include/MetroidPrime/Enemies/CPatterned.hpp @@ -278,6 +278,10 @@ public: void TryLoopReaction(CStateManager& mgr, int arg); void TryCommand(CStateManager& mgr, int state, FTryCommandCallback cb, int arg); + void SetupPlayerCollision(const bool startsHidden); + + void ApproachDest(CStateManager& mgr); + void SetDestPos(const CVector3f& pos); protected: EPatrolState x2d8_patrolState; TUniqueId x2dc_destObj; diff --git a/include/MetroidPrime/TGameTypes.hpp b/include/MetroidPrime/TGameTypes.hpp index 17a766d9..96b0f2f5 100644 --- a/include/MetroidPrime/TGameTypes.hpp +++ b/include/MetroidPrime/TGameTypes.hpp @@ -45,6 +45,7 @@ CHECK_SIZEOF(TEditorId, 0x4) struct TUniqueId { ushort value; + TUniqueId() {} TUniqueId(const ushort version, const ushort id) : value(((version & 0x3F) << 10) | (id & 0x3FF)) {} diff --git a/include/rstl/list.hpp b/include/rstl/list.hpp index bc5cd475..504cf881 100644 --- a/include/rstl/list.hpp +++ b/include/rstl/list.hpp @@ -15,7 +15,9 @@ public: iterator erase(const iterator& item) { return do_erase(item.get_node()); } // private: +#pragma pack(push, 1) struct node; +#pragma pack(pop) node* do_erase(node* item); public: @@ -88,6 +90,8 @@ public: return nn; } + void remove(const T& val); + public: class const_iterator { public: diff --git a/src/Kyoto/CRandom16.cpp b/src/Kyoto/CRandom16.cpp index 1ba8f82a..8943a549 100644 --- a/src/Kyoto/CRandom16.cpp +++ b/src/Kyoto/CRandom16.cpp @@ -43,7 +43,7 @@ int CRandom16::Next() { return (mSeed >> 16) & 0xffff; } -float CRandom16::Float() { +const float CRandom16::Float() { float next = CCast::ToReal32(Next()); return 1.52590222E-5f * next; } diff --git a/src/MetroidPrime/Enemies/CBloodFlower.cpp b/src/MetroidPrime/Enemies/CBloodFlower.cpp index 7db48bb9..03562dbb 100644 --- a/src/MetroidPrime/Enemies/CBloodFlower.cpp +++ b/src/MetroidPrime/Enemies/CBloodFlower.cpp @@ -9,6 +9,7 @@ #include #include #include +#include static const char* const kMouthLctrName = "LCTR_FLOFLOWER"; static const char* sFireEffects[3] = {"Fire1", "Fire2", "Fire3"}; @@ -152,8 +153,9 @@ void CBloodFlower::PodAttack(CStateManager& mgr, const EStateMsg msg, const floa break; case kStateMsg_Update: if (TooClose(mgr, 0.f)) { - mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer()->GetUniqueId(), GetUniqueId(), - CDamageInfo(GetPodDamage(), arg), + mgr.ApplyDamage( + GetUniqueId(), mgr.GetPlayer()->GetUniqueId(), GetUniqueId(), + CDamageInfo(GetPodDamage(), arg), CMaterialFilter::MakeIncludeExclude(CMaterialList(kMT_Solid), CMaterialList())); } break;