summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-28 08:39:36 +0200
committeraap <aap@papnet.eu>2019-05-28 08:39:36 +0200
commitcb8993f15e06fe2ea94decce77892c28b1b23d64 (patch)
tree617b6745f6ff26ab4551a4d192fab082ea17f46f /src/World.h
parentimplemented CFileMgr (barf) (diff)
downloadre3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar.gz
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar.bz2
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar.lz
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar.xz
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.tar.zst
re3-cb8993f15e06fe2ea94decce77892c28b1b23d64.zip
Diffstat (limited to '')
-rw-r--r--src/World.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/World.h b/src/World.h
index 309f407c..45287989 100644
--- a/src/World.h
+++ b/src/World.h
@@ -33,6 +33,9 @@ public:
static_assert(sizeof(CSector) == 0x28, "CSector: error");
class CEntity;
+struct CColPoint;
+struct CColLine;
+struct CStoredCollPoly;
class CWorld
{
@@ -43,6 +46,7 @@ class CWorld
public:
static CEntity *&pIgnoreEntity;
+ static bool &bIncludeDeadPeds;
static bool &bNoMoreCollisionTorque;
static bool &bSecondShift;
static bool &bForceProcessControl;
@@ -61,10 +65,28 @@ public:
}
static void ClearScanCodes(void);
+ static bool CameraToIgnoreThisObject(CEntity *ent);
+
+ static bool ProcessLineOfSight(const CVector &point1, const CVector &point2, CColPoint &point, CEntity *&entity, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+ static bool ProcessLineOfSightSector(CSector &sector, const CColLine &line, CColPoint &point, float &dist, CEntity *&entity, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+ static bool ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColPoint &point, float &dist, CEntity *&entity, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+ static bool ProcessVerticalLine(const CVector &point1, float z2, CColPoint &point, CEntity *&entity, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, CStoredCollPoly *poly);
+ static bool ProcessVerticalLineSector(CSector &sector, const CColLine &line, CColPoint &point, CEntity *&entity, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, CStoredCollPoly *poly);
+ static bool ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CColPoint &point, float &dist, CEntity *&entity, bool ignoreSeeThrough, CStoredCollPoly *poly);
+ static bool GetIsLineOfSightClear(const CVector &point1, const CVector &point2, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+ static bool GetIsLineOfSightSectorClear(CSector &sector, const CColLine &line, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+ static bool GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
+
+ static float FindGroundZForCoord(float x, float y);
+ static float FindGroundZFor3DCoord(float x, float y, float z, bool *found);
+ static float FindRoofZFor3DCoord(float x, float y, float z, bool *found);
+
static float GetSectorX(float f) { return ((f + 2000.0f)/40.0f); }
static float GetSectorY(float f) { return ((f + 2000.0f)/40.0f); }
static int GetSectorIndexX(float f) { return (int)GetSectorX(f); }
static int GetSectorIndexY(float f) { return (int)GetSectorY(f); }
+ static float GetWorldX(int x) { return x*40.0f - 2000.0f; }
+ static float GetWorldY(int y) { return y*40.0f - 2000.0f; }
};
CVector &FindPlayerCoors(CVector &v);