diff options
author | aap <aap@papnet.eu> | 2021-01-24 23:25:12 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-24 23:25:12 +0100 |
commit | 453a16c97803c829cab3d6a144a735ec8fc96914 (patch) | |
tree | 9dde0876428ef823c25cfc7a428628e5e26d0110 /src/rw | |
parent | Add cmake option for sanitizers (diff) | |
download | re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar.gz re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar.bz2 re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar.lz re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar.xz re3-453a16c97803c829cab3d6a144a735ec8fc96914.tar.zst re3-453a16c97803c829cab3d6a144a735ec8fc96914.zip |
Diffstat (limited to 'src/rw')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 19 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.h | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 871ef287..bdde5e33 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -454,7 +454,7 @@ CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_BigVehicle(RpAtomic *atomic) RpAtomic* CVisibilityPlugins::RenderVehicleHiDetailCB_Boat(RpAtomic *atomic) { - if(DistToCameraSq < ms_bigVehicleLod1Dist) + if(DistToCameraSq < ms_vehicleLod0Dist) RENDERCALLBACK(atomic); return atomic; } @@ -473,6 +473,23 @@ CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_Boat(RpAtomic *atomic) } RpAtomic* +CVisibilityPlugins::RenderVehicleLoDetailCB_Boat(RpAtomic *atomic) +{ + RpClump *clump; + int32 alpha; + + clump = RpAtomicGetClump(atomic); + if(DistToCameraSq >= ms_vehicleLod0Dist){ + alpha = GetClumpAlpha(clump); + if(alpha == 255) + RENDERCALLBACK(atomic); + else + RenderAlphaAtomic(atomic, alpha); + } + return atomic; +} + +RpAtomic* CVisibilityPlugins::RenderVehicleLowDetailCB_BigVehicle(RpAtomic *atomic) { RwFrame *clumpframe; diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index 13365c7a..9cdbc0c7 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -61,6 +61,7 @@ public: static RpAtomic *RenderVehicleHiDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailCB_Boat(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailAlphaCB_Boat(RpAtomic *atomic); + static RpAtomic *RenderVehicleLoDetailCB_Boat(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleReallyLowDetailCB(RpAtomic *atomic); |