summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Accident.cpp4
-rw-r--r--src/core/Accident.h1
-rw-r--r--src/core/Collision.h2
-rw-r--r--src/core/EventList.cpp8
-rw-r--r--src/core/Game.cpp3
-rw-r--r--src/core/Pad.cpp2
-rw-r--r--src/core/World.cpp5
-rw-r--r--src/core/Zones.cpp5
-rw-r--r--src/core/config.h11
-rw-r--r--src/core/main.cpp2
10 files changed, 40 insertions, 3 deletions
diff --git a/src/core/Accident.cpp b/src/core/Accident.cpp
index 1fd6c123..c8611323 100644
--- a/src/core/Accident.cpp
+++ b/src/core/Accident.cpp
@@ -53,6 +53,10 @@ CAccidentManager::ReportAccident(CPed *ped)
void
CAccidentManager::Update()
{
+#ifdef SQUEEZE_PERFORMANCE
+ // Handled after injury registered.
+ return;
+#endif
int32 e;
if (CEventList::GetEvent(EVENT_INJURED_PED, &e)) {
CPed *ped = CPools::GetPed(gaEvent[e].entityRef);
diff --git a/src/core/Accident.h b/src/core/Accident.h
index 949d5fb9..568e1149 100644
--- a/src/core/Accident.h
+++ b/src/core/Accident.h
@@ -1,5 +1,4 @@
#pragma once
-#include "common.h"
#include "config.h"
class CPed;
diff --git a/src/core/Collision.h b/src/core/Collision.h
index ccc99244..d7498ac0 100644
--- a/src/core/Collision.h
+++ b/src/core/Collision.h
@@ -7,7 +7,7 @@
#endif
// If you spawn many tanks at once, you will see that collisions of two entity exceeds 32.
-#ifdef FIX_BUGS
+#if defined(FIX_BUGS) && !defined(SQUEEZE_PERFORMANCE)
#define MAX_COLLISION_POINTS 64
#else
#define MAX_COLLISION_POINTS 32
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index 675040ea..8d69ba78 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -8,6 +8,7 @@
#include "Messages.h"
#include "Text.h"
#include "main.h"
+#include "Accident.h"
int32 CEventList::ms_nFirstFreeSlotIndex;
CEvent gaEvent[NUMEVENTS];
@@ -63,6 +64,13 @@ CEventList::RegisterEvent(eEventType type, eEventEntity entityType, CEntity *ent
int ref;
bool copsDontCare;
+#ifdef SQUEEZE_PERFORMANCE
+ if (type == EVENT_INJURED_PED) {
+ gAccidentManager.ReportAccident((CPed*)ent);
+ return;
+ }
+#endif
+
copsDontCare = false;
switch(entityType){
case EVENT_ENTITY_PED:
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 82e6992d..08623c65 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -106,6 +106,7 @@ int gameTxdSlot;
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
+#ifdef PS2_MENU
void MessageScreen(char *msg)
{
//TODO: stretch_screen
@@ -139,6 +140,7 @@ void MessageScreen(char *msg)
DoRWStuffEndOfFrame();
}
+#endif
bool
CGame::InitialiseOnceBeforeRW(void)
@@ -431,6 +433,7 @@ bool CGame::Initialise(const char* datFile)
if ( !TheMemoryCard.m_bWantToLoad )
{
#endif
+ LoadingScreen("Loading the Game", "Start script", nil);
CTheScripts::StartTestScript();
CTheScripts::Process();
TheCamera.Process();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 7df548aa..d4ffc5ea 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -1104,7 +1104,9 @@ void CPad::UpdatePads(void)
if ( bUpdate )
{
GetPad(0)->Update(0);
+#ifndef SQUEEZE_PERFORMANCE
GetPad(1)->Update(0);
+#endif
}
#if defined(MASTER) && !defined(XINPUT)
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 9f384048..7f8d8994 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -1941,6 +1941,11 @@ CWorld::Process(void)
} else {
for(CPtrNode *node = ms_listMovingEntityPtrs.first; node; node = node->next) {
CEntity *movingEnt = (CEntity *)node->item;
+#ifdef SQUEEZE_PERFORMANCE
+ if (movingEnt->bRemoveFromWorld) {
+ RemoveEntityInsteadOfProcessingIt(movingEnt);
+ } else
+#endif
if(movingEnt->m_rwObject && RwObjectGetType(movingEnt->m_rwObject) == rpCLUMP &&
RpAnimBlendClumpGetFirstAssociation(movingEnt->GetClump())) {
RpAnimBlendClumpUpdateAnimations(movingEnt->GetClump(),
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 1556731b..2e3e0f6e 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -7,6 +7,7 @@
#include "Clock.h"
#include "Text.h"
#include "World.h"
+#include "Timer.h"
eLevelName CTheZones::m_CurrLevel;
CZone *CTheZones::m_pPlayersZone;
@@ -122,6 +123,10 @@ CTheZones::Init(void)
void
CTheZones::Update(void)
{
+#ifdef SQUEEZE_PERFORMANCE
+ if (CTimer::GetFrameCounter() % 5 != 0)
+ return;
+#endif
CVector pos;
pos = FindPlayerCoors();
m_pPlayersZone = FindSmallestZonePosition(&pos);
diff --git a/src/core/config.h b/src/core/config.h
index 92b9f2f9..43fc54fa 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -286,4 +286,13 @@ enum Config {
#ifndef AUDIO_OAL // is not working yet for openal
#define AUDIO_CACHE // cache sound lengths to speed up the cold boot
#endif
-//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS \ No newline at end of file
+//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS
+
+
+//#define SQUEEZE_PERFORMANCE
+#ifdef SQUEEZE_PERFORMANCE
+ #undef PS2_ALPHA_TEST
+ #undef NO_ISLAND_LOADING
+ #define PC_PARTICLE
+ #define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
+#endif \ No newline at end of file
diff --git a/src/core/main.cpp b/src/core/main.cpp
index a1c64a6d..b63688ec 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -816,7 +816,9 @@ RenderScene(void)
DefinedState();
CWaterLevel::RenderWater();
CRenderer::RenderFadingInEntities();
+#ifndef SQUEEZE_PERFORMANCE
CRenderer::RenderVehiclesButNotBoats();
+#endif
CWeather::RenderRainStreaks();
}