summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-18 15:41:09 +0200
committeraap <aap@papnet.eu>2019-07-18 15:41:09 +0200
commitfd01f9b25cdc3b527a886ee6b9237b01a5475295 (patch)
tree6db1dbfeb6feedcf79e870f417b82af29da7ca21 /src/core
parent82be4660134b6ec8947a5323676cf4795a3e90e8 (diff)
CAutomobile::ProcessControl done
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp8
-rw-r--r--src/core/Camera.h1
-rw-r--r--src/core/common.h3
3 files changed, 11 insertions, 1 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index e35198d8..a66d6ac9 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -95,6 +95,14 @@ CCamera::GetLookDirection(void)
return LOOKING_FORWARD;;
}
+bool
+CCamera::GetLookingForwardFirstPerson()
+{
+ return Cams[ActiveCam].Mode == CCam::MODE_FIRSTPERSON &&
+ Cams[ActiveCam].DirectionWasLooking == LOOKING_FORWARD;
+}
+
+
WRAPPER void CCamera::Fade(float timeout, int16 direction) { EAXJMP(0x46B3A0); }
WRAPPER void CCamera::ProcessFade(void) { EAXJMP(0x46F080); }
WRAPPER void CCamera::ProcessMusicFade(void) { EAXJMP(0x46F1E0); }
diff --git a/src/core/Camera.h b/src/core/Camera.h
index a88bf83a..b5c9103c 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -448,6 +448,7 @@ int m_iModeObbeCamIsInForCar;
bool IsSphereVisible(const CVector &center, float radius);
bool IsBoxVisible(RwV3d *box, const CMatrix *mat);
int GetLookDirection(void);
+ bool GetLookingForwardFirstPerson(void);
void Fade(float timeout, int16 direction);
int GetScreenFadeStatus(void);
diff --git a/src/core/common.h b/src/core/common.h
index fd961dd7..c241e1c6 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -139,7 +139,8 @@ inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))
#define PI M_PI
-#define TWOPI PI*2
+#define TWOPI (PI*2)
+#define HALFPI (PI/2)
#define DEGTORAD(x) ((x) * PI / 180.0f)
#define RADTODEG(x) ((x) * 180.0f / PI)