summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-07-24 20:30:09 +0300
committerFire-Head <Fire-Head@users.noreply.github.com>2019-07-24 20:30:09 +0300
commit0c0e564019af4dac66150b1bfa5c13219b9eb752 (patch)
tree6cb58eae0085a0a5a4abf5535e1d452ed497dd21 /src/render
parentb4ecb3e3dad654e01d0ceb4c359721650dda425b (diff)
update
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Shadows.h11
-rw-r--r--src/render/WaterLevel.cpp12
2 files changed, 9 insertions, 14 deletions
diff --git a/src/render/Shadows.h b/src/render/Shadows.h
index ca6718b0..585518ee 100644
--- a/src/render/Shadows.h
+++ b/src/render/Shadows.h
@@ -9,17 +9,12 @@
struct RwTexture;
class CEntity;
-enum
-{
- SHADOWTYPE_2 = 2
-};
-
enum eShadowType
{
SHADOWTYPE_NONE = 0,
- SHADOWTYPE_DARK,
- SHADOWTYPE_ADDITIVE,
- SHADOWTYPE_INVCOLOR
+ SHADOWTYPE_DARK,
+ SHADOWTYPE_ADDITIVE,
+ SHADOWTYPE_INVCOLOR
};
enum eShadowTextureType
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index f77680b6..07c88d3e 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -323,7 +323,7 @@ _GetCamBounds(bool *bUseCamStartY, bool *bUseCamEndY, bool *bUseCamStartX, bool
}
}
-float
+inline float
SectorRadius(float fSize)
{
return Sqrt(Pow(fSize, 2) + Pow(fSize, 2));
@@ -424,7 +424,7 @@ CWaterLevel::RenderWater()
if ( fHugeSectorMaxRenderDistSqr > fHugeSectorDistToCamSqr )
{
if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE),
- &CMatrix(TheCamera.GetCameraMatrix())) )
+ &TheCamera.GetCameraMatrix()) )
{
if ( fHugeSectorDistToCamSqr >= SQR(500.0f) /*fHugeSectorNearDist*/ )
{
@@ -466,7 +466,7 @@ CWaterLevel::RenderWater()
if ( fLargeSectorDistToCamSqr < fHugeSectorMaxRenderDistSqr )
{
if ( TheCamera.IsSphereVisible(CVector(vecLargeSectorCentre.x, vecLargeSectorCentre.y, 0.0f), SectorRadius(LARGE_SECTOR_SIZE), //90.879997f,
- &CMatrix(TheCamera.GetCameraMatrix())) )
+ &TheCamera.GetCameraMatrix()) )
{
// Render four small(32x32) sectors, or one large(64x64).
@@ -629,7 +629,7 @@ CWaterLevel::RenderWater()
if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr )
{
if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE),
- &CMatrix(TheCamera.GetCameraMatrix())) )
+ &TheCamera.GetCameraMatrix()) )
{
RenderOneFlatExtraHugeWaterPoly(
vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2,
@@ -663,7 +663,7 @@ CWaterLevel::RenderWater()
if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr )
{
if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE),
- &CMatrix(TheCamera.GetCameraMatrix())) )
+ &TheCamera.GetCameraMatrix()) )
{
RenderOneFlatExtraHugeWaterPoly(
vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2,
@@ -687,7 +687,7 @@ CWaterLevel::RenderWater()
if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr )
{
if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE),
- &CMatrix(TheCamera.GetCameraMatrix())) )
+ &TheCamera.GetCameraMatrix()) )
{
RenderOneFlatExtraHugeWaterPoly(
vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2,