Skip to content

Commit

Permalink
compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Mar 11, 2022
1 parent 62e33ca commit 04be683
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.0.{build}
skip_tags: true
image: Visual Studio 2017
image: Visual Studio 2022
configuration: Release
init:
- ps: >-
Expand Down
2 changes: 1 addition & 1 deletion external/hooking
Submodule hooking updated 2 files
+237 −232 Hooking.Patterns.cpp
+257 −214 Hooking.Patterns.h
2 changes: 1 addition & 1 deletion premake5.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
premake5 vs2017
premake5 vs2022
Binary file modified premake5.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion source/IIILodLights/CSearchlights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void CSearchlights::RenderSearchLightsIII()
}
}

CLODLightManager::III::bRenderHeliSearchlights ? RenderHeliSearchLightsIII() : nullptr;
if (CLODLightManager::III::bRenderHeliSearchlights) RenderHeliSearchLightsIII();
CLODLightManager::III::RwRenderStateSetIII(rwRENDERSTATEZWRITEENABLE, (void*)1);
CLODLightManager::III::RwRenderStateSetIII(rwRENDERSTATEZTESTENABLE, (void*)1);
CLODLightManager::III::RwRenderStateSetIII(rwRENDERSTATESRCBLEND, (void*)5);
Expand Down
2 changes: 1 addition & 1 deletion source/IIILodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ void CLODLightManager::III::RegisterLODLights()
if (!it->nCoronaShowMode)
{
CLODLights::RegisterCorona(reinterpret_cast<unsigned int>(&*it), nullptr, it->colour.r, it->colour.g, it->colour.b, (bAlpha * (it->colour.a / 255.0f)), it->vecPos, (fRadius * it->fCustomSizeMult * fCoronaRadiusMultiplier), fCoronaFarClip, 1, 0, false, false, 0, 0.0f, false, 0.0f, 0xFF, 255.0f, false, false);
bRenderStaticShadowsForLODs ? CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), 2, *(RwTexture **)0x8F2A00, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, it->colour.r, it->colour.g, it->colour.b, 15.0f, 1.0f, fCoronaFarClip, false, 0.0f) : nullptr;
if (bRenderStaticShadowsForLODs) CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), 2, *(RwTexture **)0x8F2A00, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, it->colour.r, it->colour.g, it->colour.b, 15.0f, 1.0f, fCoronaFarClip, false, 0.0f);
}
else
{
Expand Down
8 changes: 6 additions & 2 deletions source/IVLodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,12 @@ void CLODLightManager::IV::RegisterLamppost(WplInstance* pObj)
dummyMatrix.matrix.pos.y = pObj->PositionY;
dummyMatrix.matrix.pos.z = pObj->PositionZ;

if (GetDistance((RwV3d*)&CVector(pObj->PositionX, pObj->PositionY, pObj->PositionZ), (RwV3d*)&CVector(-278.37f, -1377.48f, 90.98f)) <= 300.0f)
return;
{
auto v1 = CVector(pObj->PositionX, pObj->PositionY, pObj->PositionZ);
auto v2 = CVector(-278.37f, -1377.48f, 90.98f);
if (GetDistance((RwV3d*)&v1, (RwV3d*)&v2) <= 300.0f)
return;
}

auto itEnd = pFileContent->upper_bound(PackKey(nModelID, 0xFFFF));
for (auto it = pFileContent->lower_bound(PackKey(nModelID, 0)); it != itEnd; it++)
Expand Down
2 changes: 1 addition & 1 deletion source/SALodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void CLODLightManager::SA::RegisterLODLights()
if (!it->nCoronaShowMode)
{
CLODLights::RegisterCorona(reinterpret_cast<unsigned int>(&*it), nullptr, it->colour.r, it->colour.g, it->colour.b, (bAlpha * (it->colour.a / 255.0f)), it->vecPos, (fRadius * it->fCustomSizeMult * fCoronaRadiusMultiplier), fCoronaFarClip, 1, 0, false, false, 0, 0.0f, false, 0.0f, 0, 255.0f, false, false);
bRenderStaticShadowsForLODs ? CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), SSHADT_INTENSIVE, *(RwTexture **)0xC403F4, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, (it->colour.r / 3), (it->colour.g / 3), (it->colour.b / 3), 15.0f, 1.0f, fCoronaFarClip, false, 0.0f) : nullptr;
if (bRenderStaticShadowsForLODs) CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), SSHADT_INTENSIVE, *(RwTexture **)0xC403F4, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, (it->colour.r / 3), (it->colour.g / 3), (it->colour.b / 3), 15.0f, 1.0f, fCoronaFarClip, false, 0.0f);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion source/VCLodLights/CSearchlights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void CSearchlights::RenderSearchLightsVC()
}
}

CLODLightManager::VC::bRenderHeliSearchlights ? RenderHeliSearchLightsVC() : nullptr;
if (CLODLightManager::VC::bRenderHeliSearchlights) RenderHeliSearchLightsVC();
CLODLightManager::VC::RwRenderStateSetVC(rwRENDERSTATEZWRITEENABLE, (void*)1);
CLODLightManager::VC::RwRenderStateSetVC(rwRENDERSTATEZTESTENABLE, (void*)1);
CLODLightManager::VC::RwRenderStateSetVC(rwRENDERSTATESRCBLEND, (void*)5);
Expand Down
2 changes: 1 addition & 1 deletion source/VCLodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ void CLODLightManager::VC::RegisterLODLights()
if (!it->nCoronaShowMode)
{
CLODLights::RegisterCorona(reinterpret_cast<unsigned int>(&*it), nullptr, it->colour.r, it->colour.g, it->colour.b, (bAlpha * (it->colour.a / 255.0f)), it->vecPos, (fRadius * it->fCustomSizeMult * fCoronaRadiusMultiplier), fCoronaFarClip, 1, 0, false, false, 0, 0.0f, false, 0.0f, 0xFF, 255.0f, false, false);
bRenderStaticShadowsForLODs ? CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), 2, *(RwTexture **)0x978DB4, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, it->colour.r, it->colour.g, it->colour.b, 15.0f, 1.0f, fCoronaFarClip, false, 0.0f) : nullptr;
if (bRenderStaticShadowsForLODs) CShadowsStoreStaticShadow(reinterpret_cast<unsigned int>(&*it), 2, *(RwTexture **)0x978DB4, (CVector*)&it->vecPos, 8.0f, 0.0f, 0.0f, -8.0f, bAlpha, it->colour.r, it->colour.g, it->colour.b, 15.0f, 1.0f, fCoronaFarClip, false, 0.0f);
}
else
{
Expand Down

0 comments on commit 04be683

Please sign in to comment.