mirror of
https://github.com/halpz/re3.git
synced 2025-07-16 07:08:13 +00:00
Merge pull request #675 from erorcun/master
Squeeze performance option, minor fixes
This commit is contained in:
@ -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);
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
|
||||
class CPed;
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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(),
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
//#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
|
@ -816,7 +816,9 @@ RenderScene(void)
|
||||
DefinedState();
|
||||
CWaterLevel::RenderWater();
|
||||
CRenderer::RenderFadingInEntities();
|
||||
#ifndef SQUEEZE_PERFORMANCE
|
||||
CRenderer::RenderVehiclesButNotBoats();
|
||||
#endif
|
||||
CWeather::RenderRainStreaks();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user