diff options
author | aap <aap@papnet.eu> | 2021-01-24 22:48:32 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-24 22:50:16 +0100 |
commit | ce7f166ba387c5368d500faffa676243bc9a3476 (patch) | |
tree | 438e06233fc4e02891b120733d84e8c9a93d95ac /src/rw | |
parent | CPedModelInfo and CTempColModels (diff) | |
download | re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar.gz re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar.bz2 re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar.lz re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar.xz re3-ce7f166ba387c5368d500faffa676243bc9a3476.tar.zst re3-ce7f166ba387c5368d500faffa676243bc9a3476.zip |
Diffstat (limited to 'src/rw')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 42 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.h | 3 |
2 files changed, 45 insertions, 0 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index c50531c6..754c8778 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -455,6 +455,14 @@ CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_BigVehicle(RpAtomic *atomic) RpAtomic* CVisibilityPlugins::RenderVehicleHiDetailCB_Boat(RpAtomic *atomic) { + if(DistToCameraSq < ms_vehicleLod0Dist) + RENDERCALLBACK(atomic); + return atomic; +} + +RpAtomic* +CVisibilityPlugins::RenderVehicleHiDetailCB_Boat_Far(RpAtomic *atomic) +{ if(DistToCameraSq < ms_bigVehicleLod1Dist) RENDERCALLBACK(atomic); return atomic; @@ -474,6 +482,40 @@ 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::RenderVehicleLoDetailCB_Boat_Far(RpAtomic *atomic) +{ + RpClump *clump; + int32 alpha; + + clump = RpAtomicGetClump(atomic); + if(DistToCameraSq >= ms_bigVehicleLod1Dist){ + 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..f188096c 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -61,6 +61,9 @@ public: static RpAtomic *RenderVehicleHiDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailCB_Boat(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailAlphaCB_Boat(RpAtomic *atomic); + static RpAtomic *RenderVehicleHiDetailCB_Boat_Far(RpAtomic *atomic); + static RpAtomic *RenderVehicleLoDetailCB_Boat(RpAtomic *atomic); + static RpAtomic *RenderVehicleLoDetailCB_Boat_Far(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleReallyLowDetailCB(RpAtomic *atomic); |