mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 04:00:00 +00:00
little cleanup and synch on templates and config
This commit is contained in:
parent
1af5065df7
commit
a7050458ae
|
@ -1,7 +1,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include "SceneEdit.h"
|
#include "SceneEdit.h"
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
#include "Automobile.h"
|
#include "Automobile.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
|
@ -1098,3 +1098,4 @@ bool CSceneEdit::SelectWeapon(void)
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -287,9 +287,11 @@ CCam::Process(void)
|
||||||
case MODE_FIGHT_CAM_RUNABOUT:
|
case MODE_FIGHT_CAM_RUNABOUT:
|
||||||
Process_1rstPersonPedOnPC(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
Process_1rstPersonPedOnPC(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||||
break;
|
break;
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
case MODE_EDITOR:
|
case MODE_EDITOR:
|
||||||
Process_Editor(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
Process_Editor(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
Source = CVector(0.0f, 0.0f, 0.0f);
|
Source = CVector(0.0f, 0.0f, 0.0f);
|
||||||
Front = CVector(0.0f, 1.0f, 0.0f);
|
Front = CVector(0.0f, 1.0f, 0.0f);
|
||||||
|
@ -4033,6 +4035,7 @@ CCam::Process_Debug(const CVector&, float, float, float)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
void
|
void
|
||||||
CCam::Process_Editor(const CVector&, float, float, float)
|
CCam::Process_Editor(const CVector&, float, float, float)
|
||||||
{
|
{
|
||||||
|
@ -4111,6 +4114,7 @@ CCam::Process_Editor(const CVector&, float, float, float)
|
||||||
sprintf(str, "Look@: %f, Look@: %f, Look@: %f ", Front.x + Source.x, Front.y + Source.y, Front.z + Source.z);
|
sprintf(str, "Look@: %f, Look@: %f, Look@: %f ", Front.x + Source.x, Front.y + Source.y, Front.z + Source.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
CCam::Process_ModelView(const CVector &CameraTarget, float, float, float)
|
CCam::Process_ModelView(const CVector &CameraTarget, float, float, float)
|
||||||
|
|
|
@ -1602,8 +1602,10 @@ CCamera::CamControl(void)
|
||||||
switchByJumpCut = true;
|
switchByJumpCut = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
if(CSceneEdit::m_bEditOn)
|
if(CSceneEdit::m_bEditOn)
|
||||||
ReqMode = CCam::MODE_EDITOR;
|
ReqMode = CCam::MODE_EDITOR;
|
||||||
|
#endif
|
||||||
|
|
||||||
if((m_uiTransitionState == 0 || switchByJumpCut) && ReqMode != Cams[ActiveCam].Mode){
|
if((m_uiTransitionState == 0 || switchByJumpCut) && ReqMode != Cams[ActiveCam].Mode){
|
||||||
if(switchByJumpCut){
|
if(switchByJumpCut){
|
||||||
|
|
|
@ -209,7 +209,9 @@ public:
|
||||||
void PrintMode(void);
|
void PrintMode(void);
|
||||||
|
|
||||||
void Process_Debug(const CVector&, float, float, float);
|
void Process_Debug(const CVector&, float, float, float);
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
void Process_Editor(const CVector&, float, float, float);
|
void Process_Editor(const CVector&, float, float, float);
|
||||||
|
#endif
|
||||||
void Process_ModelView(const CVector &CameraTarget, float, float, float);
|
void Process_ModelView(const CVector &CameraTarget, float, float, float);
|
||||||
void Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, float, float);
|
void Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||||
void Process_FollowPedWithMouse(const CVector &CameraTarget, float TargetOrientation, float, float);
|
void Process_FollowPedWithMouse(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||||
|
|
|
@ -994,7 +994,7 @@ CFileLoader::Load2dEffect(const char *line)
|
||||||
CTxdStore::SetCurrentTxd(CTxdStore::FindTxdSlot("particle"));
|
CTxdStore::SetCurrentTxd(CTxdStore::FindTxdSlot("particle"));
|
||||||
|
|
||||||
mi = CModelInfo::GetModelInfo(id);
|
mi = CModelInfo::GetModelInfo(id);
|
||||||
effect = CModelInfo::Get2dEffectStore().alloc();
|
effect = CModelInfo::Get2dEffectStore().Alloc();
|
||||||
mi->Add2dEffect(effect);
|
mi->Add2dEffect(effect);
|
||||||
effect->pos = CVector(x, y, z);
|
effect->pos = CVector(x, y, z);
|
||||||
effect->col = CRGBA(r, g, b, a);
|
effect->col = CRGBA(r, g, b, a);
|
||||||
|
|
|
@ -427,7 +427,9 @@ bool CGame::Initialise(const char* datFile)
|
||||||
CAntennas::Init();
|
CAntennas::Init();
|
||||||
CGlass::Init();
|
CGlass::Init();
|
||||||
gPhoneInfo.Initialise();
|
gPhoneInfo.Initialise();
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
CSceneEdit::Initialise();
|
CSceneEdit::Initialise();
|
||||||
|
#endif
|
||||||
LoadingScreen("Loading the Game", "Load scripts", nil);
|
LoadingScreen("Loading the Game", "Load scripts", nil);
|
||||||
CTheScripts::Init();
|
CTheScripts::Init();
|
||||||
CGangs::Initialise();
|
CGangs::Initialise();
|
||||||
|
@ -781,7 +783,9 @@ void CGame::Process(void)
|
||||||
CSkidmarks::Update();
|
CSkidmarks::Update();
|
||||||
CAntennas::Update();
|
CAntennas::Update();
|
||||||
CGlass::Update();
|
CGlass::Update();
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
CSceneEdit::Update();
|
CSceneEdit::Update();
|
||||||
|
#endif
|
||||||
CSetPieces::Update();
|
CSetPieces::Update();
|
||||||
CEventList::Update();
|
CEventList::Update();
|
||||||
CParticle::Update();
|
CParticle::Update();
|
||||||
|
|
|
@ -36,7 +36,7 @@ enum Config {
|
||||||
NUMDUMMIES = 2340,
|
NUMDUMMIES = 2340,
|
||||||
NUMAUDIOSCRIPTOBJECTS = 192,
|
NUMAUDIOSCRIPTOBJECTS = 192,
|
||||||
NUMCOLMODELS = 4400,
|
NUMCOLMODELS = 4400,
|
||||||
NUMCUTSCENEOBJECTS = 50, // does not exist in VC
|
NUMCUTSCENEOBJECTS = 50, // not a pool in VC
|
||||||
|
|
||||||
NUMANIMBLOCKS = 35,
|
NUMANIMBLOCKS = 35,
|
||||||
NUMANIMATIONS = 450,
|
NUMANIMATIONS = 450,
|
||||||
|
@ -146,10 +146,6 @@ enum Config {
|
||||||
NUM_SHORTCUT_START_POINTS = 16
|
NUM_SHORTCUT_START_POINTS = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
// We'll use this once we're ready to become independent of the game
|
|
||||||
// Use it to mark bugs in the code that will prevent the game from working then
|
|
||||||
//#define STANDALONE
|
|
||||||
|
|
||||||
// We don't expect to compile for PS2 or Xbox
|
// We don't expect to compile for PS2 or Xbox
|
||||||
// but it might be interesting for documentation purposes
|
// but it might be interesting for documentation purposes
|
||||||
#define GTA_PC
|
#define GTA_PC
|
||||||
|
@ -176,6 +172,19 @@ enum Config {
|
||||||
#define FINAL
|
#define FINAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Version defines
|
||||||
|
#define GTAVC_PS2 400
|
||||||
|
#define GTAVC_PC_10 410
|
||||||
|
#define GTAVC_PC_11 411
|
||||||
|
#define GTAVC_PC_JAP 412
|
||||||
|
// TODO? maybe something for xbox or android?
|
||||||
|
|
||||||
|
#define GTA_VERSION GTAVC_PC_11
|
||||||
|
|
||||||
|
// TODO(MIAMI): someone ought to find and check out uses of these defines:
|
||||||
|
//#define GTA3_STEAM_PATCH
|
||||||
|
//#define GTAVC_JP_PATCH
|
||||||
|
|
||||||
// quality of life fixes that should also be in FINAL
|
// quality of life fixes that should also be in FINAL
|
||||||
#define NASTY_GAME // nasty game for all languages
|
#define NASTY_GAME // nasty game for all languages
|
||||||
#define NO_CDCHECK
|
#define NO_CDCHECK
|
||||||
|
@ -188,14 +197,13 @@ enum Config {
|
||||||
# define RANDOMSPLASH
|
# define RANDOMSPLASH
|
||||||
# define VU_COLLISION
|
# define VU_COLLISION
|
||||||
#elif defined GTA_PC
|
#elif defined GTA_PC
|
||||||
//# define GTA3_STEAM_PATCH
|
|
||||||
//# define GTAVC_JP_PATCH
|
|
||||||
# ifdef GTA_PS2_STUFF
|
# ifdef GTA_PS2_STUFF
|
||||||
# define USE_PS2_RAND
|
# define USE_PS2_RAND
|
||||||
# define RANDOMSPLASH // use random splash as on PS2
|
# define RANDOMSPLASH // use random splash as on PS2
|
||||||
# define PS2_MATFX
|
# define PS2_MATFX
|
||||||
# endif
|
# endif
|
||||||
# define GTA_REPLAY
|
# define GTA_REPLAY
|
||||||
|
# define GTA_SCENE_EDIT
|
||||||
#elif defined GTA_XBOX
|
#elif defined GTA_XBOX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -259,8 +267,6 @@ enum Config {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Water & Particle
|
// Water & Particle
|
||||||
#define PC_PARTICLE
|
|
||||||
//#define PS2_ALTERNATIVE_CARSPLASH // unused on PS2
|
|
||||||
// #define PC_WATER
|
// #define PC_WATER
|
||||||
#define WATER_CHEATS
|
#define WATER_CHEATS
|
||||||
|
|
||||||
|
@ -283,7 +289,6 @@ enum Config {
|
||||||
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
||||||
|
|
||||||
// Hud, frontend and radar
|
// Hud, frontend and radar
|
||||||
//#define BETA_SLIDING_TEXT
|
|
||||||
#define PC_MENU
|
#define PC_MENU
|
||||||
|
|
||||||
#ifndef PC_MENU
|
#ifndef PC_MENU
|
||||||
|
@ -362,5 +367,4 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||||
#ifdef SQUEEZE_PERFORMANCE
|
#ifdef SQUEEZE_PERFORMANCE
|
||||||
#undef PS2_ALPHA_TEST
|
#undef PS2_ALPHA_TEST
|
||||||
#undef NO_ISLAND_LOADING
|
#undef NO_ISLAND_LOADING
|
||||||
#define PC_PARTICLE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1108,9 +1108,11 @@ Render2dStuff(void)
|
||||||
|
|
||||||
MusicManager.DisplayRadioStationName();
|
MusicManager.DisplayRadioStationName();
|
||||||
TheConsole.Display();
|
TheConsole.Display();
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
if(CSceneEdit::m_bEditOn)
|
if(CSceneEdit::m_bEditOn)
|
||||||
CSceneEdit::Draw();
|
CSceneEdit::Draw();
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
CHud::Draw();
|
CHud::Draw();
|
||||||
|
|
||||||
CSpecialFX::Render2DFXs();
|
CSpecialFX::Render2DFXs();
|
||||||
|
|
|
@ -649,7 +649,9 @@ extern bool gbRenderWorld2;
|
||||||
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil);
|
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil);
|
||||||
|
|
||||||
DebugMenuAddVarBool8("Debug", "pad 1 -> pad 2", &CPad::m_bMapPadOneToPadTwo, nil);
|
DebugMenuAddVarBool8("Debug", "pad 1 -> pad 2", &CPad::m_bMapPadOneToPadTwo, nil);
|
||||||
|
#ifdef GTA_SCENE_EDIT
|
||||||
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
|
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
|
||||||
|
#endif
|
||||||
#ifdef MAP_ENHANCEMENTS
|
#ifdef MAP_ENHANCEMENTS
|
||||||
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint);
|
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,28 +4,28 @@ template<typename T, int n>
|
||||||
class CStore
|
class CStore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int allocPtr;
|
int32 allocPtr;
|
||||||
T store[n];
|
T store[n];
|
||||||
|
|
||||||
T *alloc(void){
|
T *Alloc(void){
|
||||||
if(this->allocPtr >= n){
|
if(allocPtr >= n){
|
||||||
printf("Size of this thing:%d needs increasing\n", n);
|
printf("Size of this thing:%d needs increasing\n", n);
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
return &this->store[this->allocPtr++];
|
return &store[allocPtr++];
|
||||||
}
|
}
|
||||||
void clear(void){
|
void Clear(void){
|
||||||
this->allocPtr = 0;
|
allocPtr = 0;
|
||||||
}
|
}
|
||||||
int getIndex(T *item){
|
int32 GetIndex(T *item){
|
||||||
assert(item >= &this->store[0]);
|
assert(item >= &store[0]);
|
||||||
assert(item < &this->store[n]);
|
assert(item < &store[n]);
|
||||||
return item - this->store;
|
return item - store;
|
||||||
}
|
}
|
||||||
T *getItem(int index){
|
T *GetItem(int32 index){
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
assert(index < n);
|
assert(index < n);
|
||||||
return &this->store[index];
|
return &store[index];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,15 +40,13 @@ class CPool
|
||||||
};
|
};
|
||||||
uint8 u;
|
uint8 u;
|
||||||
} *m_flags;
|
} *m_flags;
|
||||||
int m_size;
|
int32 m_size;
|
||||||
int m_allocPtr;
|
int32 m_allocPtr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// TODO(MIAMI): remove ctor without name argument
|
CPool(int32 size, const char *name){
|
||||||
CPool(int size, const char *name){
|
m_entries = (U*)new uint8[sizeof(U)*size];
|
||||||
// TODO: use new here
|
m_flags = (Flags*)new uint8[sizeof(Flags)*size];
|
||||||
m_entries = (U*)malloc(sizeof(U)*size);
|
|
||||||
m_flags = (Flags*)malloc(sizeof(Flags)*size);
|
|
||||||
m_size = size;
|
m_size = size;
|
||||||
m_allocPtr = -1;
|
m_allocPtr = -1;
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
|
@ -61,15 +59,15 @@ public:
|
||||||
}
|
}
|
||||||
void Flush() {
|
void Flush() {
|
||||||
if (m_size > 0) {
|
if (m_size > 0) {
|
||||||
free(m_entries);
|
delete[] (uint8*)m_entries;
|
||||||
free(m_flags);
|
delete[] (uint8*)m_flags;
|
||||||
m_entries = nil;
|
m_entries = nil;
|
||||||
m_flags = nil;
|
m_flags = nil;
|
||||||
m_size = 0;
|
m_size = 0;
|
||||||
m_allocPtr = 0;
|
m_allocPtr = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int GetSize(void) const { return m_size; }
|
int32 GetSize(void) const { return m_size; }
|
||||||
T *New(void){
|
T *New(void){
|
||||||
bool wrapped = false;
|
bool wrapped = false;
|
||||||
do
|
do
|
||||||
|
@ -93,12 +91,12 @@ public:
|
||||||
m_flags[m_allocPtr].id++;
|
m_flags[m_allocPtr].id++;
|
||||||
return (T*)&m_entries[m_allocPtr];
|
return (T*)&m_entries[m_allocPtr];
|
||||||
}
|
}
|
||||||
T *New(int handle){
|
T *New(int32 handle){
|
||||||
T *entry = (T*)&m_entries[handle>>8];
|
T *entry = (T*)&m_entries[handle>>8];
|
||||||
SetNotFreeAt(handle);
|
SetNotFreeAt(handle);
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
void SetNotFreeAt(int handle){
|
void SetNotFreeAt(int32 handle){
|
||||||
int idx = handle>>8;
|
int idx = handle>>8;
|
||||||
m_flags[idx].free = 0;
|
m_flags[idx].free = 0;
|
||||||
m_flags[idx].id = handle & 0x7F;
|
m_flags[idx].id = handle & 0x7F;
|
||||||
|
@ -123,22 +121,22 @@ public:
|
||||||
return m_flags[handle>>8].u == (handle & 0xFF) ?
|
return m_flags[handle>>8].u == (handle & 0xFF) ?
|
||||||
(T*)&m_entries[handle >> 8] : nil;
|
(T*)&m_entries[handle >> 8] : nil;
|
||||||
}
|
}
|
||||||
int GetIndex(T* entry) {
|
int32 GetIndex(T* entry) {
|
||||||
int i = GetJustIndex_NoFreeAssert(entry);
|
int i = GetJustIndex_NoFreeAssert(entry);
|
||||||
return m_flags[i].u + (i << 8);
|
return m_flags[i].u + (i << 8);
|
||||||
}
|
}
|
||||||
int GetJustIndex(T* entry) {
|
int32 GetJustIndex(T* entry) {
|
||||||
int index = GetJustIndex_NoFreeAssert(entry);
|
int index = GetJustIndex_NoFreeAssert(entry);
|
||||||
assert((U*)entry == (U*)&m_entries[index]); // cast is unsafe - check required
|
assert((U*)entry == (U*)&m_entries[index]); // cast is unsafe - check required
|
||||||
assert(!IsFreeSlot(index));
|
assert(!IsFreeSlot(index));
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
int GetJustIndex_NoFreeAssert(T* entry) {
|
int32 GetJustIndex_NoFreeAssert(T* entry) {
|
||||||
int index = ((U*)entry - m_entries);
|
int index = ((U*)entry - m_entries);
|
||||||
// Please don't add unsafe assert here, because at least one func. use this to check if entity is ped or vehicle.
|
// Please don't add unsafe assert here, because at least one func. use this to check if entity is ped or vehicle.
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
int GetNoOfUsedSpaces(void) const {
|
int32 GetNoOfUsedSpaces(void) const {
|
||||||
int i;
|
int i;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for(i = 0; i < m_size; i++)
|
for(i = 0; i < m_size; i++)
|
||||||
|
@ -148,8 +146,8 @@ public:
|
||||||
}
|
}
|
||||||
bool IsFreeSlot(int i) { return !!m_flags[i].free; }
|
bool IsFreeSlot(int i) { return !!m_flags[i].free; }
|
||||||
void ClearStorage(uint8 *&flags, U *&entries){
|
void ClearStorage(uint8 *&flags, U *&entries){
|
||||||
free(flags);
|
delete[] (uint8*)flags;
|
||||||
free(entries);
|
delete[] (uint8*)entries;
|
||||||
flags = nil;
|
flags = nil;
|
||||||
entries = nil;
|
entries = nil;
|
||||||
}
|
}
|
||||||
|
@ -163,8 +161,8 @@ public:
|
||||||
debug("CopyBack:%d (/%d)\n", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
|
debug("CopyBack:%d (/%d)\n", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
|
||||||
}
|
}
|
||||||
void Store(uint8 *&flags, U *&entries){
|
void Store(uint8 *&flags, U *&entries){
|
||||||
flags = (uint8*)malloc(sizeof(uint8)*m_size);
|
flags = (uint8*)new uint8[sizeof(uint8)*m_size];
|
||||||
entries = (U*)malloc(sizeof(U)*m_size);
|
entries = (U*)new uint8[sizeof(U)*m_size];
|
||||||
memcpy(flags, m_flags, sizeof(uint8)*m_size);
|
memcpy(flags, m_flags, sizeof(uint8)*m_size);
|
||||||
memcpy(entries, m_entries, sizeof(U)*m_size);
|
memcpy(entries, m_entries, sizeof(U)*m_size);
|
||||||
debug("Stored:%d (/%d)\n", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
|
debug("Stored:%d (/%d)\n", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
|
||||||
|
@ -243,7 +241,7 @@ public:
|
||||||
link->Remove(); // remove from list
|
link->Remove(); // remove from list
|
||||||
freeHead.Insert(link); // insert into free list
|
freeHead.Insert(link); // insert into free list
|
||||||
}
|
}
|
||||||
int Count(void){
|
int32 Count(void){
|
||||||
int n = 0;
|
int n = 0;
|
||||||
CLink<T> *lnk;
|
CLink<T> *lnk;
|
||||||
for(lnk = head.next; lnk != &tail; lnk = lnk->next)
|
for(lnk = head.next; lnk != &tail; lnk = lnk->next)
|
||||||
|
|
|
@ -88,7 +88,7 @@ CBaseModelInfo::Add2dEffect(C2dEffect *fx)
|
||||||
if(m_2dEffectsID >= 0)
|
if(m_2dEffectsID >= 0)
|
||||||
m_num2dEffects++;
|
m_num2dEffects++;
|
||||||
else{
|
else{
|
||||||
m_2dEffectsID = CModelInfo::Get2dEffectStore().getIndex(fx);
|
m_2dEffectsID = CModelInfo::Get2dEffectStore().GetIndex(fx);
|
||||||
m_num2dEffects = 1;
|
m_num2dEffects = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ C2dEffect*
|
||||||
CBaseModelInfo::Get2dEffect(int n)
|
CBaseModelInfo::Get2dEffect(int n)
|
||||||
{
|
{
|
||||||
if(m_2dEffectsID >= 0)
|
if(m_2dEffectsID >= 0)
|
||||||
return CModelInfo::Get2dEffectStore().getItem(m_2dEffectsID+n);
|
return CModelInfo::Get2dEffectStore().GetItem(m_2dEffectsID+n);
|
||||||
else
|
else
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,13 +33,13 @@ CModelInfo::Initialise(void)
|
||||||
|
|
||||||
for(i = 0; i < MODELINFOSIZE; i++)
|
for(i = 0; i < MODELINFOSIZE; i++)
|
||||||
ms_modelInfoPtrs[i] = nil;
|
ms_modelInfoPtrs[i] = nil;
|
||||||
ms_2dEffectStore.clear();
|
ms_2dEffectStore.Clear();
|
||||||
ms_simpleModelStore.clear();
|
ms_simpleModelStore.Clear();
|
||||||
ms_timeModelStore.clear();
|
ms_timeModelStore.Clear();
|
||||||
ms_weaponModelStore.clear();
|
ms_weaponModelStore.Clear();
|
||||||
ms_clumpModelStore.clear();
|
ms_clumpModelStore.Clear();
|
||||||
ms_pedModelStore.clear();
|
ms_pedModelStore.Clear();
|
||||||
ms_vehicleModelStore.clear();
|
ms_vehicleModelStore.Clear();
|
||||||
|
|
||||||
m = AddSimpleModel(MI_CAR_DOOR);
|
m = AddSimpleModel(MI_CAR_DOOR);
|
||||||
m->SetColModel(&CTempColModels::ms_colModelDoor1);
|
m->SetColModel(&CTempColModels::ms_colModelDoor1);
|
||||||
|
@ -109,20 +109,20 @@ CModelInfo::ShutDown(void)
|
||||||
for(i = 0; i < ms_2dEffectStore.allocPtr; i++)
|
for(i = 0; i < ms_2dEffectStore.allocPtr; i++)
|
||||||
ms_2dEffectStore.store[i].Shutdown();
|
ms_2dEffectStore.store[i].Shutdown();
|
||||||
|
|
||||||
ms_2dEffectStore.clear();
|
ms_2dEffectStore.Clear();
|
||||||
ms_simpleModelStore.clear();
|
ms_simpleModelStore.Clear();
|
||||||
ms_timeModelStore.clear();
|
ms_timeModelStore.Clear();
|
||||||
ms_weaponModelStore.clear();
|
ms_weaponModelStore.Clear();
|
||||||
ms_pedModelStore.clear();
|
ms_pedModelStore.Clear();
|
||||||
ms_clumpModelStore.clear();
|
ms_clumpModelStore.Clear();
|
||||||
ms_vehicleModelStore.clear();
|
ms_vehicleModelStore.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimpleModelInfo*
|
CSimpleModelInfo*
|
||||||
CModelInfo::AddSimpleModel(int id)
|
CModelInfo::AddSimpleModel(int id)
|
||||||
{
|
{
|
||||||
CSimpleModelInfo *modelinfo;
|
CSimpleModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_simpleModelStore.alloc();
|
modelinfo = CModelInfo::ms_simpleModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->Init();
|
modelinfo->Init();
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -132,7 +132,7 @@ CTimeModelInfo*
|
||||||
CModelInfo::AddTimeModel(int id)
|
CModelInfo::AddTimeModel(int id)
|
||||||
{
|
{
|
||||||
CTimeModelInfo *modelinfo;
|
CTimeModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_timeModelStore.alloc();
|
modelinfo = CModelInfo::ms_timeModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->Init();
|
modelinfo->Init();
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -142,7 +142,7 @@ CWeaponModelInfo*
|
||||||
CModelInfo::AddWeaponModel(int id)
|
CModelInfo::AddWeaponModel(int id)
|
||||||
{
|
{
|
||||||
CWeaponModelInfo *modelinfo;
|
CWeaponModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_weaponModelStore.alloc();
|
modelinfo = CModelInfo::ms_weaponModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->Init();
|
modelinfo->Init();
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -152,7 +152,7 @@ CClumpModelInfo*
|
||||||
CModelInfo::AddClumpModel(int id)
|
CModelInfo::AddClumpModel(int id)
|
||||||
{
|
{
|
||||||
CClumpModelInfo *modelinfo;
|
CClumpModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_clumpModelStore.alloc();
|
modelinfo = CModelInfo::ms_clumpModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->m_clump = nil;
|
modelinfo->m_clump = nil;
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -162,7 +162,7 @@ CPedModelInfo*
|
||||||
CModelInfo::AddPedModel(int id)
|
CModelInfo::AddPedModel(int id)
|
||||||
{
|
{
|
||||||
CPedModelInfo *modelinfo;
|
CPedModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_pedModelStore.alloc();
|
modelinfo = CModelInfo::ms_pedModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->m_clump = nil;
|
modelinfo->m_clump = nil;
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -172,7 +172,7 @@ CVehicleModelInfo*
|
||||||
CModelInfo::AddVehicleModel(int id)
|
CModelInfo::AddVehicleModel(int id)
|
||||||
{
|
{
|
||||||
CVehicleModelInfo *modelinfo;
|
CVehicleModelInfo *modelinfo;
|
||||||
modelinfo = CModelInfo::ms_vehicleModelStore.alloc();
|
modelinfo = CModelInfo::ms_vehicleModelStore.Alloc();
|
||||||
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
|
||||||
modelinfo->m_clump = nil;
|
modelinfo->m_clump = nil;
|
||||||
modelinfo->m_vehicleType = -1;
|
modelinfo->m_vehicleType = -1;
|
||||||
|
@ -251,7 +251,7 @@ CModelInfo::IsPlaneModel(int32 id)
|
||||||
void
|
void
|
||||||
CModelInfo::ReInit2dEffects()
|
CModelInfo::ReInit2dEffects()
|
||||||
{
|
{
|
||||||
ms_2dEffectStore.clear();
|
ms_2dEffectStore.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < MODELINFOSIZE; i++) {
|
for (int i = 0; i < MODELINFOSIZE; i++) {
|
||||||
if (ms_modelInfoPtrs[i])
|
if (ms_modelInfoPtrs[i])
|
||||||
|
|
|
@ -1558,15 +1558,8 @@ void CHud::DrawAfterFade()
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||||
CFont::SetDropShadowPosition(2);
|
CFont::SetDropShadowPosition(2);
|
||||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||||
#ifdef BETA_SLIDING_TEXT
|
|
||||||
|
|
||||||
CFont::SetColor(ODDJOB2_COLOR);
|
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_SCALE_Y(217.0f), m_BigMessage[5]);
|
|
||||||
#else
|
|
||||||
|
|
||||||
CFont::SetColor(ODDJOB2_COLOR);
|
CFont::SetColor(ODDJOB2_COLOR);
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_Y(217.0f), m_BigMessage[5]);
|
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_Y(217.0f), m_BigMessage[5]);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1615,11 +1608,7 @@ void CHud::DrawAfterFade()
|
||||||
CFont::SetDropShadowPosition(2);
|
CFont::SetDropShadowPosition(2);
|
||||||
CFont::SetDropColor(CRGBA(0, 0, 0, BigMessageAlpha[1]));
|
CFont::SetDropColor(CRGBA(0, 0, 0, BigMessageAlpha[1]));
|
||||||
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
||||||
#ifdef BETA_SLIDING_TEXT
|
|
||||||
CFont::PrintString(BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(140.0f), m_BigMessage[1]);
|
CFont::PrintString(BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(140.0f), m_BigMessage[1]);
|
||||||
#else
|
|
||||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(140.0f), m_BigMessage[1]);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
m_ZoneFadeTimer = 0;
|
m_ZoneFadeTimer = 0;
|
||||||
BigMessageX[1] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f);
|
BigMessageX[1] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f);
|
||||||
|
|
2
vendor/ogg
vendored
2
vendor/ogg
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 31bd3f2707fb7dbae539a7093ba1fc4b2b37d84e
|
Subproject commit 684c73773e7e2683245ffd6aa75f04115b51123a
|
2
vendor/opus
vendored
2
vendor/opus
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit c2b542b6c02bafbe7a83b2eeec6cb5a0bfa3ed0d
|
Subproject commit 6bae366f9fef25191fc812c430e8abd40a13a233
|
2
vendor/opusfile
vendored
2
vendor/opusfile
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 4174c26e0aaab19d01afdea0a46f7f95fdc6b3e6
|
Subproject commit 6452e838e68e8f4fc0b3599523c760ac6276ce89
|
Loading…
Reference in a new issue