mirror of
https://github.com/halpz/re3.git
synced 2025-07-25 15:22:47 +00:00
CEntity and C(Vu)Vector fixes and cleanup
This commit is contained in:
@ -3675,16 +3675,18 @@ CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat
|
||||
bool
|
||||
CCamera::IsSphereVisible(const CVector ¢er, float radius)
|
||||
{
|
||||
CMatrix mat = m_cameraMatrix;
|
||||
#if GTA_VERSION < GTA3_PC_10 // not sure this condition is the right one
|
||||
// Maybe this was a copy of the other function with m_cameraMatrix
|
||||
return IsSphereVisible(center, radius, &m_cameraMatrix);
|
||||
#else
|
||||
// ...and on PC they decided to call the other one with a default matrix.
|
||||
CMatrix mat(m_cameraMatrix); // this matrix construction is stupid and gone in VC
|
||||
return IsSphereVisible(center, radius, &mat);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
#ifdef GTA_PS2
|
||||
CCamera::IsBoxVisible(CVuVector *box, const CMatrix *mat)
|
||||
#else
|
||||
CCamera::IsBoxVisible(CVector *box, const CMatrix *mat)
|
||||
#endif
|
||||
CCamera::IsBoxVisible(CVUVECTOR *box, const CMatrix *mat)
|
||||
{
|
||||
int i;
|
||||
int frustumTests[6] = { 0 };
|
||||
|
@ -641,11 +641,7 @@ public:
|
||||
bool IsPointVisible(const CVector ¢er, const CMatrix *mat);
|
||||
bool IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat);
|
||||
bool IsSphereVisible(const CVector ¢er, float radius);
|
||||
#ifdef GTA_PS2
|
||||
bool IsBoxVisible(CVuVector *box, const CMatrix *mat);
|
||||
#else
|
||||
bool IsBoxVisible(CVector *box, const CMatrix *mat);
|
||||
#endif
|
||||
bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CCamera, 0xE9D8);
|
||||
|
@ -39,9 +39,7 @@ CEntity::RegisterReference(CEntity **pent)
|
||||
ref->pentity = pent;
|
||||
ref->next = m_pFirstReference;
|
||||
m_pFirstReference = ref;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear all references to this entity
|
||||
|
@ -216,6 +216,12 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||
|
||||
#include "maths.h"
|
||||
#include "Vector.h"
|
||||
#ifdef GTA_PS2
|
||||
#include "VuVector.h"
|
||||
#define CVUVECTOR CVuVector
|
||||
#else
|
||||
#define CVUVECTOR CVector
|
||||
#endif
|
||||
#include "Vector2D.h"
|
||||
#include "Matrix.h"
|
||||
#include "Rect.h"
|
||||
|
Reference in New Issue
Block a user