diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 10:50:45 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 10:50:45 +0200 |
commit | b1fc7bc533dc7d603daafbf8a158a92f710c1e60 (patch) | |
tree | 20ec3f4fd1aeaba1ab41078cfb49a248d9421885 /src/rw/VisibilityPlugins.cpp | |
parent | first fake RW implementation working (diff) | |
download | re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.gz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.bz2 re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.lz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.xz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.zst re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.zip |
Diffstat (limited to 'src/rw/VisibilityPlugins.cpp')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index f8b1f6b2..def3b23e 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -11,32 +11,24 @@ #define FADE_DISTANCE 20.0f -/* -CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList; -CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList; - -int32 CVisibilityPlugins::ms_atomicPluginOffset = -1; -int32 CVisibilityPlugins::ms_framePluginOffset = -1; -int32 CVisibilityPlugins::ms_clumpPluginOffset = -1; -*/ -CLinkList<CVisibilityPlugins::AlphaObjectInfo> &CVisibilityPlugins::m_alphaList = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x8F42E4; -CLinkList<CVisibilityPlugins::AlphaObjectInfo> &CVisibilityPlugins::m_alphaEntityList = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x943084; - -int32 &CVisibilityPlugins::ms_atomicPluginOffset = *(int32*)0x600124; -int32 &CVisibilityPlugins::ms_framePluginOffset = *(int32*)0x600128; -int32 &CVisibilityPlugins::ms_clumpPluginOffset = *(int32*)0x60012C; - -RwCamera *&CVisibilityPlugins::ms_pCamera = *(RwCamera**)0x8F2514; -RwV3d *&CVisibilityPlugins::ms_pCameraPosn = *(RwV3d**)0x8F6270; -float &CVisibilityPlugins::ms_cullCompsDist = *(float*)0x8F2BC4; -float &CVisibilityPlugins::ms_vehicleLod0Dist = *(float*)0x885B28; -float &CVisibilityPlugins::ms_vehicleLod1Dist = *(float*)0x885B30; -float &CVisibilityPlugins::ms_vehicleFadeDist = *(float*)0x8E28B4; -float &CVisibilityPlugins::ms_bigVehicleLod0Dist = *(float*)0x8E2A84; -float &CVisibilityPlugins::ms_bigVehicleLod1Dist = *(float*)0x8E2A8C; -float &CVisibilityPlugins::ms_pedLod0Dist = *(float*)0x8F2BD4; -float &CVisibilityPlugins::ms_pedLod1Dist = *(float*)0x8F2BD8; -float &CVisibilityPlugins::ms_pedFadeDist = *(float*)0x8E2C34; +CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList;// = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x8F42E4; +CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList;// = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x943084; + +int32 CVisibilityPlugins::ms_atomicPluginOffset = -1;// = *(int32*)0x600124; +int32 CVisibilityPlugins::ms_framePluginOffset = -1;// = *(int32*)0x600128; +int32 CVisibilityPlugins::ms_clumpPluginOffset = -1;// = *(int32*)0x60012C; + +RwCamera *CVisibilityPlugins::ms_pCamera;// = *(RwCamera**)0x8F2514; +RwV3d *CVisibilityPlugins::ms_pCameraPosn;// = *(RwV3d**)0x8F6270; +float CVisibilityPlugins::ms_cullCompsDist;// = *(float*)0x8F2BC4; +float CVisibilityPlugins::ms_vehicleLod0Dist;// = *(float*)0x885B28; +float CVisibilityPlugins::ms_vehicleLod1Dist;// = *(float*)0x885B30; +float CVisibilityPlugins::ms_vehicleFadeDist;// = *(float*)0x8E28B4; +float CVisibilityPlugins::ms_bigVehicleLod0Dist;// = *(float*)0x8E2A84; +float CVisibilityPlugins::ms_bigVehicleLod1Dist;// = *(float*)0x8E2A8C; +float CVisibilityPlugins::ms_pedLod0Dist;// = *(float*)0x8F2BD4; +float CVisibilityPlugins::ms_pedLod1Dist;// = *(float*)0x8F2BD8; +float CVisibilityPlugins::ms_pedFadeDist;// = *(float*)0x8E2C34; void CVisibilityPlugins::Initialise(void) @@ -603,6 +595,16 @@ CVisibilityPlugins::DefaultVisibilityCB(RpClump *clump) } bool +CVisibilityPlugins::MloVisibilityCB(RpClump *clump) +{ + RwFrame *frame = RpClumpGetFrame(clump); + CMloModelInfo *modelInfo = (CMloModelInfo*)GetFrameHierarchyId(frame); + if (sq(modelInfo->field_34) < GetDistanceSquaredFromCamera(frame)) + return false; + return CVisibilityPlugins::FrustumSphereCB(clump); +} + +bool CVisibilityPlugins::FrustumSphereCB(RpClump *clump) { RwSphere sphere; |