summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-14 13:49:27 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-14 13:49:27 +0200
commitb77a9ce9550d0326c8bd69fdc1474af4f3a1d268 (patch)
treebe1eba74734de4b37a0795627e3129fd1ed93f92 /src/core
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.gz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.bz2
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.lz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.xz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.zst
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp9
-rw-r--r--src/core/Camera.h1
-rw-r--r--src/core/Messages.cpp5
-rw-r--r--src/core/Messages.h5
4 files changed, 19 insertions, 1 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index c06ee48b..166928c1 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -41,6 +41,13 @@ CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat
}
bool
+CCamera::IsSphereVisible(const CVector &center, float radius)
+{
+ CMatrix mat = m_cameraMatrix;
+ return IsSphereVisible(center, radius, &mat);
+}
+
+bool
CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
{
RwV3d c;
@@ -1290,7 +1297,7 @@ CCam::GetWeaponFirstPersonOn()
}
STARTPATCHES
- InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
+ InjectHook(0x42C760, (bool (CCamera::*)(const CVector &center, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
InjectHook(0x46FD40, &CCamera::SetMotionBlur, PATCH_JUMP);
diff --git a/src/core/Camera.h b/src/core/Camera.h
index c0309b5f..10554601 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -445,6 +445,7 @@ int m_iModeObbeCamIsInForCar;
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
bool IsPointVisible(const CVector &center, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, const CMatrix *mat);
+ bool IsSphereVisible(const CVector &center, float radius);
bool IsBoxVisible(RwV3d *box, const CMatrix *mat);
int GetLookDirection(void);
diff --git a/src/core/Messages.cpp b/src/core/Messages.cpp
index 7fc23593..c6f3bc1b 100644
--- a/src/core/Messages.cpp
+++ b/src/core/Messages.cpp
@@ -9,6 +9,11 @@ WRAPPER char CMessages::WideStringCompare(wchar* str1, wchar* str2, unsigned sho
WRAPPER void CMessages::InsertNumberInString(wchar* src, int n1, int n2, int n3, int n4, int n5, int n6, wchar* dst) { EAXJMP(0x52A1A0); }
WRAPPER void CMessages::InsertPlayerControlKeysInString(wchar* src) { EAXJMP(0x52A490); }
WRAPPER int CMessages::GetWideStringLength(wchar* src) { EAXJMP(0x529490); }
+WRAPPER void CMessages::AddBigMessage(wchar* key, uint32 time, uint16 pos) { EAXJMP(0x529EB0); }
+WRAPPER void CMessages::AddMessage(wchar* key, uint32 time, uint16 pos) { EAXJMP(0x529900); }
+WRAPPER void CMessages::AddMessageJumpQ(wchar* key, uint32 time, uint16 pos) { EAXJMP(0x529A10); }
+WRAPPER void CMessages::AddMessageSoon(wchar* key, uint32 time, uint16 pos) { EAXJMP(0x529AF0); }
+WRAPPER void CMessages::ClearMessages() { EAXJMP(0x529CE0); }
tPreviousBrief *CMessages::PreviousBriefs = (tPreviousBrief *)0x713C08;
tMessage *CMessages::BriefMessages = (tMessage *)0x8786E0;
diff --git a/src/core/Messages.h b/src/core/Messages.h
index 69cf117c..51c36212 100644
--- a/src/core/Messages.h
+++ b/src/core/Messages.h
@@ -41,4 +41,9 @@ public:
static void InsertNumberInString(wchar* src, int n1, int n2, int n3, int n4, int n5, int n6, wchar* dst);
static void InsertPlayerControlKeysInString(wchar* src);
static int GetWideStringLength(wchar *src);
+ static void AddBigMessage(wchar* key, uint32 time, uint16 pos);
+ static void AddMessage(wchar* key, uint32 time, uint16 pos);
+ static void AddMessageJumpQ(wchar* key, uint32 time, uint16 pos);
+ static void AddMessageSoon(wchar* key, uint32 time, uint16 pos);
+ static void ClearMessages();
};