mirror of
https://github.com/halpz/re3.git
synced 2025-07-05 03:30:44 +00:00
sync with upstream
This commit is contained in:
@ -18,6 +18,7 @@ const float DefaultFOV = 70.0f; // beta: 80.0f
|
||||
CCamera &TheCamera = *(CCamera*)0x6FACF8;
|
||||
bool &CCamera::m_bUseMouse3rdPerson = *(bool *)0x5F03D8;
|
||||
|
||||
WRAPPER void CCamera::CamShake(float strength, float x, float y, float z) { EAXJMP(0x46B200); }
|
||||
WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); }
|
||||
WRAPPER void CCamera::CalculateDerivedValues(void) { EAXJMP(0x46EEA0); }
|
||||
WRAPPER void CCamera::Restore(void) { EAXJMP(0x46F990); }
|
||||
@ -679,9 +680,13 @@ CCam::Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, fl
|
||||
else if(TargetZOffSet == m_fUnknownZOffSet && TargetZOffSet > m_fCamBufferedHeight){
|
||||
// TODO: figure this out
|
||||
bool foo = false;
|
||||
switch(((CPhysical*)CamTargetEntity)->m_nLastCollType)
|
||||
case 2: case 3: case 5:
|
||||
case 11: case 23: case 26:
|
||||
switch(((CPhysical*)CamTargetEntity)->m_nSurfaceTouched)
|
||||
case SURFACE_GRASS:
|
||||
case SURFACE_DIRT:
|
||||
case SURFACE_PAVEMENT:
|
||||
case SURFACE_STEEL:
|
||||
case SURFACE_TIRE:
|
||||
case SURFACE_STONE:
|
||||
foo = true;
|
||||
if(foo)
|
||||
WellBufferMe(TargetHeight, &m_fCamBufferedHeight, &m_fCamBufferedHeightSpeed, 0.4f, 0.05f, false);
|
||||
|
@ -454,6 +454,8 @@ int m_iModeObbeCamIsInForCar;
|
||||
void ProcessMusicFade(void);
|
||||
void SetFadeColour(uint8 r, uint8 g, uint8 b);
|
||||
|
||||
void CamShake(float strength, float x, float y, float z);
|
||||
|
||||
void SetMotionBlur(int r, int g, int b, int a, int type);
|
||||
void SetMotionBlurAlpha(int a);
|
||||
void RenderMotionBlur(void);
|
||||
|
@ -1173,7 +1173,7 @@ enum {
|
||||
// This checks model A's spheres and lines against model B's spheres, boxes and triangles.
|
||||
// Returns the number of A's spheres that collide.
|
||||
// Returned ColPoints are in world space.
|
||||
// NB: lines do not seem to be supported very well, use with caution
|
||||
// NB: only vehicles can have col models with lines, exactly 4, one for each wheel
|
||||
int32
|
||||
CCollision::ProcessColModels(const CMatrix &matrixA, CColModel &modelA,
|
||||
const CMatrix &matrixB, CColModel &modelB,
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
static bool ProcessSphereTriangle(const CColSphere &sph, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindistsq);
|
||||
static bool ProcessLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough);
|
||||
static bool ProcessVerticalLine(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, CStoredCollPoly *poly);
|
||||
static int32 ProcessColModels(const CMatrix &matrix1, CColModel &model1, const CMatrix &matrix2, CColModel &model2, CColPoint *point1, CColPoint *point2, float *linedists);
|
||||
static int32 ProcessColModels(const CMatrix &matrixA, CColModel &modelA, const CMatrix &matrixB, CColModel &modelB, CColPoint *spherepoints, CColPoint *linepoints, float *linedists);
|
||||
|
||||
// TODO:
|
||||
// CCollision::IsStoredPolyStillValidVerticalLine
|
||||
|
5
src/core/Explosion.cpp
Normal file
5
src/core/Explosion.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "patcher.h"
|
||||
#include "Explosion.h"
|
||||
|
||||
WRAPPER void CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32) { EAXJMP(0x5591C0); }
|
15
src/core/Explosion.h
Normal file
15
src/core/Explosion.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
class CEntity;
|
||||
|
||||
enum eExplosionType
|
||||
{
|
||||
EXPLOSION_3 = 3,
|
||||
EXPLOSION_4
|
||||
};
|
||||
|
||||
class CExplosion
|
||||
{
|
||||
public:
|
||||
static void AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32);
|
||||
};
|
@ -813,6 +813,7 @@ CFileLoader::LoadPedObject(const char *line)
|
||||
if(strcmp(animGroup, CAnimManager::GetAnimGroupName((AssocGroupId)animGroupId)) == 0)
|
||||
break;
|
||||
mi->m_animGroup = animGroupId;
|
||||
mi->m_carsCanDrive = carsCanDrive;
|
||||
|
||||
// ???
|
||||
CModelInfo::GetModelInfo(MI_LOPOLYGUY)->SetColModel(&CTempColModels::ms_colModelPed1);
|
||||
|
@ -2,4 +2,8 @@
|
||||
#include "patcher.h"
|
||||
#include "Fire.h"
|
||||
|
||||
WRAPPER void CFire::Extinguish(void) { EAXJMP(0x479D40); }
|
||||
CFireManager &gFireManager = *(CFireManager*)0x8F31D0;
|
||||
|
||||
WRAPPER void CFire::Extinguish(void) { EAXJMP(0x479D40); }
|
||||
|
||||
WRAPPER void CFireManager::StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32) { EAXJMP(0x479590); }
|
||||
|
@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "Entity.h"
|
||||
|
||||
class CEntity;
|
||||
|
||||
class CFire
|
||||
{
|
||||
char m_bIsOngoing;
|
||||
char m_bExists;
|
||||
char m_bPropogationFlag;
|
||||
char m_bAudioSet;
|
||||
bool m_bIsOngoing;
|
||||
bool m_bExists;
|
||||
bool m_bPropogationFlag;
|
||||
bool m_bAudioSet;
|
||||
CVector m_vecPos;
|
||||
CEntity *m_pEntity;
|
||||
CEntity *m_pSource;
|
||||
@ -20,4 +20,11 @@ class CFire
|
||||
|
||||
public:
|
||||
void Extinguish(void);
|
||||
};
|
||||
};
|
||||
|
||||
class CFireManager
|
||||
{
|
||||
public:
|
||||
void StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32);
|
||||
};
|
||||
extern CFireManager &gFireManager;
|
||||
|
@ -2261,7 +2261,7 @@ bool GetPadMoveUp()
|
||||
return
|
||||
(CPad::GetPad(0)->NewState.DPadUp && !CPad::GetPad(0)->OldState.DPadUp) ||
|
||||
(CPad::GetPad(0)->NewKeyState.UP && !CPad::GetPad(0)->OldKeyState.UP) ||
|
||||
(CPad::GetPad(0)->NewState.LeftStickY < 0 && !CPad::GetPad(0)->OldState.LeftStickY < 0);
|
||||
(CPad::GetPad(0)->NewState.LeftStickY < 0 && !(CPad::GetPad(0)->OldState.LeftStickY < 0));
|
||||
}
|
||||
|
||||
bool GetPadMoveDown()
|
||||
@ -2269,7 +2269,7 @@ bool GetPadMoveDown()
|
||||
return
|
||||
(CPad::GetPad(0)->NewState.DPadDown && !CPad::GetPad(0)->OldState.DPadDown) ||
|
||||
(CPad::GetPad(0)->NewKeyState.DOWN && !CPad::GetPad(0)->OldKeyState.DOWN) ||
|
||||
(CPad::GetPad(0)->NewState.LeftStickY > 0 && !CPad::GetPad(0)->OldState.LeftStickY > 0);
|
||||
(CPad::GetPad(0)->NewState.LeftStickY > 0 && !(CPad::GetPad(0)->OldState.LeftStickY > 0));
|
||||
}
|
||||
|
||||
bool GetPadMoveLeft()
|
||||
@ -2277,7 +2277,7 @@ bool GetPadMoveLeft()
|
||||
return
|
||||
(CPad::GetPad(0)->NewState.DPadLeft && !CPad::GetPad(0)->OldState.DPadLeft) ||
|
||||
(CPad::GetPad(0)->NewKeyState.LEFT && !CPad::GetPad(0)->OldKeyState.LEFT) ||
|
||||
(CPad::GetPad(0)->NewState.LeftStickX < 0 && !CPad::GetPad(0)->OldState.LeftStickX < 0);
|
||||
(CPad::GetPad(0)->NewState.LeftStickX < 0 && !(CPad::GetPad(0)->OldState.LeftStickX < 0));
|
||||
}
|
||||
|
||||
bool GetPadMoveRight()
|
||||
@ -2285,7 +2285,7 @@ bool GetPadMoveRight()
|
||||
return
|
||||
(CPad::GetPad(0)->NewState.DPadRight && !CPad::GetPad(0)->OldState.DPadRight) ||
|
||||
(CPad::GetPad(0)->NewKeyState.RIGHT && !CPad::GetPad(0)->OldKeyState.RIGHT) ||
|
||||
(CPad::GetPad(0)->NewState.LeftStickX > 0 && !CPad::GetPad(0)->OldState.LeftStickX > 0);
|
||||
(CPad::GetPad(0)->NewState.LeftStickX > 0 && !(CPad::GetPad(0)->OldState.LeftStickX > 0));
|
||||
}
|
||||
|
||||
bool GetMouseForward()
|
||||
|
@ -17,6 +17,11 @@ public:
|
||||
CMatrix &GetMatrix(void) { return m_matrix; }
|
||||
void SetTransform(RwMatrix *m) { m_matrix = CMatrix(m, false); }
|
||||
void SetHeading(float angle);
|
||||
void SetOrientation(float x, float y, float z){
|
||||
CVector pos = m_matrix.GetPosition();
|
||||
m_matrix.SetRotate(x, y, z);
|
||||
m_matrix.Translate(pos);
|
||||
}
|
||||
bool IsWithinArea(float x1, float y1, float x2, float y2);
|
||||
bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ int CWanted::NumOfHelisRequired()
|
||||
return 2;
|
||||
default:
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void CWanted::SetWantedLevel(int32 level)
|
||||
@ -70,11 +70,17 @@ void CWanted::SetWantedLevel(int32 level)
|
||||
UpdateWantedLevel();
|
||||
}
|
||||
|
||||
void CWanted::SetWantedLevelNoDrop(int32 level)
|
||||
{
|
||||
if (level > m_nWantedLevel)
|
||||
SetWantedLevel(level);
|
||||
}
|
||||
|
||||
void CWanted::ClearQdCrimes()
|
||||
{
|
||||
for (int i = 0; i < 16; i++) {
|
||||
m_sCrimes[i].m_eCrimeType = CRIME_NONE;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void CWanted::UpdateWantedLevel()
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
bool AreArmyRequired();
|
||||
int NumOfHelisRequired();
|
||||
void SetWantedLevel(int32);
|
||||
void SetWantedLevelNoDrop(int32 level);
|
||||
void ClearQdCrimes();
|
||||
void UpdateWantedLevel();
|
||||
};
|
||||
|
@ -30,6 +30,8 @@ enum Config {
|
||||
NUMDUMMIES = 2802, // 2368 on PS2
|
||||
NUMAUDIOSCRIPTOBJECTS = 256,
|
||||
|
||||
NUMTEMPOBJECTS = 30,
|
||||
|
||||
// Link list lengths
|
||||
// TODO: alpha list
|
||||
NUMCOLCACHELINKS = 200,
|
||||
|
@ -154,6 +154,15 @@ spawnCar(int id)
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
FixCar(void)
|
||||
{
|
||||
CVehicle *veh = FindPlayerVehicle();
|
||||
if(veh == nil || !veh->IsCar())
|
||||
return;
|
||||
((CAutomobile*)veh)->Fix();
|
||||
}
|
||||
|
||||
void
|
||||
DebugMenuPopulate(void)
|
||||
{
|
||||
@ -198,6 +207,7 @@ DebugMenuPopulate(void)
|
||||
DebugMenuAddCmd("Cheats", "Strong grip", StrongGripCheat);
|
||||
DebugMenuAddCmd("Cheats", "Nasty limbs", NastyLimbsCheat);
|
||||
|
||||
DebugMenuAddCmd("Debug", "Fix Car", FixCar);
|
||||
DebugMenuAddVarBool8("Debug", "Show Ped Road Groups", (int8*)&gbShowPedRoadGroups, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Show Car Road Groups", (int8*)&gbShowCarRoadGroups, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Show Collision Polys", (int8*)&gbShowCollisionPolys, nil);
|
||||
|
Reference in New Issue
Block a user