summaryrefslogtreecommitdiffstats
path: root/src/core/Streaming.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-16 20:17:15 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-08-27 21:18:47 +0200
commit2fabbc3b4cab40220986f402569af64673cb4cd9 (patch)
tree3278631a5e3dd19a0af92204e6bfb48702dd04f0 /src/core/Streaming.cpp
parentCleanup (diff)
downloadre3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.gz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.bz2
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.lz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.xz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.zst
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.zip
Diffstat (limited to '')
-rw-r--r--src/core/Streaming.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index a7bde91e..8158cd1d 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -1940,7 +1940,7 @@ CStreaming::ProcessEntitiesInSectorList(CPtrList &list, float x, float y, float
CTimeModelInfo *mi = (CTimeModelInfo*)CModelInfo::GetModelInfo(e->GetModelIndex());
if(mi->m_type != MITYPE_TIME || CClock::GetIsTimeInRange(mi->GetTimeOn(), mi->GetTimeOff())){
lodDistSq = sq(mi->GetLargestLodDistance());
- lodDistSq = min(lodDistSq, sq(STREAM_DIST));
+ lodDistSq = Min(lodDistSq, sq(STREAM_DIST));
pos = CVector2D(e->GetPosition());
if(xmin < pos.x && pos.x < xmax &&
ymin < pos.y && pos.y < ymax &&
@@ -2160,20 +2160,20 @@ CStreaming::DeleteRwObjectsBehindCamera(int32 mem)
if(Abs(TheCamera.GetForward().x) > Abs(TheCamera.GetForward().y)){
// looking west/east
- ymin = max(iy - 10, 0);
- ymax = min(iy + 10, NUMSECTORS_Y);
+ ymin = Max(iy - 10, 0);
+ ymax = Min(iy + 10, NUMSECTORS_Y);
assert(ymin <= ymax);
// Delete a block of sectors that we know is behind the camera
if(TheCamera.GetForward().x > 0){
// looking east
- xmax = max(ix - 2, 0);
- xmin = max(ix - 10, 0);
+ xmax = Max(ix - 2, 0);
+ xmin = Max(ix - 10, 0);
inc = 1;
}else{
// looking west
- xmax = min(ix + 2, NUMSECTORS_X);
- xmin = min(ix + 10, NUMSECTORS_X);
+ xmax = Min(ix + 2, NUMSECTORS_X);
+ xmin = Min(ix + 10, NUMSECTORS_X);
inc = -1;
}
for(y = ymin; y <= ymax; y++){
@@ -2189,13 +2189,13 @@ CStreaming::DeleteRwObjectsBehindCamera(int32 mem)
// Now a block that intersects with the camera's frustum
if(TheCamera.GetForward().x > 0){
// looking east
- xmax = max(ix + 10, 0);
- xmin = max(ix - 2, 0);
+ xmax = Max(ix + 10, 0);
+ xmin = Max(ix - 2, 0);
inc = 1;
}else{
// looking west
- xmax = min(ix - 10, NUMSECTORS_X);
- xmin = min(ix + 2, NUMSECTORS_X);
+ xmax = Min(ix - 10, NUMSECTORS_X);
+ xmin = Min(ix + 2, NUMSECTORS_X);
inc = -1;
}
for(y = ymin; y <= ymax; y++){
@@ -2224,20 +2224,20 @@ CStreaming::DeleteRwObjectsBehindCamera(int32 mem)
}else{
// looking north/south
- xmin = max(ix - 10, 0);
- xmax = min(ix + 10, NUMSECTORS_X);
+ xmin = Max(ix - 10, 0);
+ xmax = Min(ix + 10, NUMSECTORS_X);
assert(xmin <= xmax);
// Delete a block of sectors that we know is behind the camera
if(TheCamera.GetForward().y > 0){
// looking north
- ymax = max(iy - 2, 0);
- ymin = max(iy - 10, 0);
+ ymax = Max(iy - 2, 0);
+ ymin = Max(iy - 10, 0);
inc = 1;
}else{
// looking south
- ymax = min(iy + 2, NUMSECTORS_Y);
- ymin = min(iy + 10, NUMSECTORS_Y);
+ ymax = Min(iy + 2, NUMSECTORS_Y);
+ ymin = Min(iy + 10, NUMSECTORS_Y);
inc = -1;
}
for(x = xmin; x <= xmax; x++){
@@ -2253,13 +2253,13 @@ CStreaming::DeleteRwObjectsBehindCamera(int32 mem)
// Now a block that intersects with the camera's frustum
if(TheCamera.GetForward().y > 0){
// looking north
- ymax = max(iy + 10, 0);
- ymin = max(iy - 2, 0);
+ ymax = Max(iy + 10, 0);
+ ymin = Max(iy - 2, 0);
inc = 1;
}else{
// looking south
- ymax = min(iy - 10, NUMSECTORS_Y);
- ymin = min(iy + 2, NUMSECTORS_Y);
+ ymax = Min(iy - 10, NUMSECTORS_Y);
+ ymin = Min(iy + 2, NUMSECTORS_Y);
inc = -1;
}
for(x = xmin; x <= xmax; x++){