diff options
author | aap <aap@papnet.eu> | 2021-01-05 11:12:48 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-05 11:12:48 +0100 |
commit | e6ef2f12dea9139c4fb303992c2d8f906e302a49 (patch) | |
tree | 951bd0b4534cf32cdb8c60b29e78898ee6efe2df /src/rw/VisibilityPlugins.cpp | |
parent | More audio fix (diff) | |
download | re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.gz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.bz2 re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.lz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.xz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.zst re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.zip |
Diffstat (limited to '')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 916696de..32461d1c 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -2,6 +2,7 @@ #include "RwHelper.h" #include "templates.h" +#include "main.h" #include "Entity.h" #include "ModelInfo.h" #include "Lights.h" @@ -14,6 +15,9 @@ CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList; CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList; +#ifdef NEW_RENDERER +CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaBuildingList; +#endif int32 CVisibilityPlugins::ms_atomicPluginOffset = -1; int32 CVisibilityPlugins::ms_framePluginOffset = -1; @@ -158,6 +162,12 @@ CVisibilityPlugins::Initialise(void) #endif // ASPECT_RATIO_SCALE m_alphaEntityList.head.item.sort = 0.0f; m_alphaEntityList.tail.item.sort = 100000000.0f; + +#ifdef NEW_RENDERER + m_alphaBuildingList.Init(NUMALPHAENTITYLIST); + m_alphaBuildingList.head.item.sort = 0.0f; + m_alphaBuildingList.tail.item.sort = 100000000.0f; +#endif } void @@ -165,12 +175,18 @@ CVisibilityPlugins::Shutdown(void) { m_alphaList.Shutdown(); m_alphaEntityList.Shutdown(); +#ifdef NEW_RENDERER + m_alphaBuildingList.Shutdown(); +#endif } void CVisibilityPlugins::InitAlphaEntityList(void) { m_alphaEntityList.Clear(); +#ifdef NEW_RENDERER + m_alphaBuildingList.Clear(); +#endif } bool @@ -179,6 +195,10 @@ CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist) AlphaObjectInfo item; item.entity = e; item.sort = dist; +#ifdef NEW_RENDERER + if(gbNewRenderer && e->IsBuilding()) + return !!m_alphaBuildingList.InsertSorted(item); +#endif bool ret = !!m_alphaEntityList.InsertSorted(item); // if(!ret) // printf("list full %d\n", m_alphaEntityList.Count()); |