mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 15:26:19 +00:00
Merge remote-tracking branch 'upstream/master' into carctrl_dev
This commit is contained in:
@ -3,3 +3,4 @@
|
||||
#include "Cranes.h"
|
||||
|
||||
WRAPPER bool CCranes::IsThisCarBeingTargettedByAnyCrane(CVehicle*) { EAXJMP(0x5451E0); }
|
||||
WRAPPER bool CCranes::IsThisCarBeingCarriedByAnyCrane(CVehicle*) { EAXJMP(0x545190); }
|
@ -7,4 +7,5 @@ class CCranes
|
||||
{
|
||||
public:
|
||||
static bool IsThisCarBeingTargettedByAnyCrane(CVehicle*);
|
||||
static bool IsThisCarBeingCarriedByAnyCrane(CVehicle*);
|
||||
};
|
||||
|
@ -28,8 +28,8 @@ int8 &CDarkel::InterruptedWeapon = *(int8*)0x95CD60;
|
||||
int8 &CDarkel::bStandardSoundAndMessages = *(int8*)0x95CDB6;
|
||||
int8 &CDarkel::bNeedHeadShot = *(int8*)0x95CDCA;
|
||||
int8 &CDarkel::bProperKillFrenzy = *(int8*)0x95CD98;
|
||||
eKillFrenzyStatus &CDarkel::Status = *(eKillFrenzyStatus*)0x95CCB4;
|
||||
uint16 (&CDarkel::RegisteredKills)[NUMDEFAULTMODELS] = *(uint16(*)[NUMDEFAULTMODELS]) * (uintptr*)0x6EDBE0;
|
||||
uint16 &CDarkel::Status = *(uint16*)0x95CCB4;
|
||||
uint16 (&CDarkel::RegisteredKills)[NUM_DEFAULT_MODELS] = *(uint16(*)[NUM_DEFAULT_MODELS]) * (uintptr*)0x6EDBE0;
|
||||
int32 &CDarkel::ModelToKill = *(int32*)0x8F2C78;
|
||||
int32 &CDarkel::ModelToKill2 = *(int32*)0x885B40;
|
||||
int32 &CDarkel::ModelToKill3 = *(int32*)0x885B3C;
|
||||
@ -185,7 +185,7 @@ CDarkel::RegisterKillNotByPlayer(CPed* victim, eWeaponType weapontype)
|
||||
void
|
||||
CDarkel::ResetModelsKilledByPlayer()
|
||||
{
|
||||
for (int i = 0; i < NUMDEFAULTMODELS; i++)
|
||||
for (int i = 0; i < NUM_DEFAULT_MODELS; i++)
|
||||
RegisteredKills[i] = 0;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
#include "Weapon.h"
|
||||
#include "ModelIndices.h"
|
||||
|
||||
class CVehicle;
|
||||
class CPed;
|
||||
|
||||
enum eKillFrenzyStatus
|
||||
enum
|
||||
{
|
||||
KILLFRENZY_NONE,
|
||||
KILLFRENZY_ONGOING,
|
||||
@ -25,8 +26,8 @@ private:
|
||||
static int8 &bStandardSoundAndMessages;
|
||||
static int8 &bNeedHeadShot;
|
||||
static int8 &bProperKillFrenzy;
|
||||
static eKillFrenzyStatus &Status;
|
||||
static uint16 (&RegisteredKills)[NUMDEFAULTMODELS];
|
||||
static uint16 &Status;
|
||||
static uint16 (&RegisteredKills)[NUM_DEFAULT_MODELS];
|
||||
static int32 &ModelToKill;
|
||||
static int32 &ModelToKill2;
|
||||
static int32 &ModelToKill3;
|
||||
|
293
src/control/GameLogic.cpp
Normal file
293
src/control/GameLogic.cpp
Normal file
@ -0,0 +1,293 @@
|
||||
#include "common.h"
|
||||
#include "patcher.h"
|
||||
#include "GameLogic.h"
|
||||
#include "Clock.h"
|
||||
#include "Stats.h"
|
||||
#include "Pickups.h"
|
||||
#include "Timer.h"
|
||||
#include "Streaming.h"
|
||||
#include "CutsceneMgr.h"
|
||||
#include "World.h"
|
||||
#include "PlayerPed.h"
|
||||
#include "Camera.h"
|
||||
#include "Messages.h"
|
||||
#include "CarCtrl.h"
|
||||
#include "Restart.h"
|
||||
#include "Pad.h"
|
||||
#include "References.h"
|
||||
#include "Fire.h"
|
||||
#include "Script.h"
|
||||
#include "Garages.h"
|
||||
|
||||
uint8 CGameLogic::ActivePlayers; // 0x95CD5E
|
||||
|
||||
void
|
||||
CGameLogic::InitAtStartOfGame()
|
||||
{
|
||||
ActivePlayers = 1;
|
||||
}
|
||||
|
||||
void
|
||||
CGameLogic::PassTime(uint32 time)
|
||||
{
|
||||
uint8 minutes, hours, days;
|
||||
|
||||
minutes = time + CClock::GetMinutes();
|
||||
hours = CClock::GetHours();
|
||||
|
||||
for (; minutes >= 60; minutes -= 60)
|
||||
hours++;
|
||||
|
||||
if (hours > 23) {
|
||||
days = CStats::DaysPassed;
|
||||
for (; hours >= 24; hours -= 24)
|
||||
days++;
|
||||
CStats::DaysPassed = days;
|
||||
}
|
||||
|
||||
CClock::SetGameClock(hours, minutes);
|
||||
CPickups::PassTime(time * 1000);
|
||||
}
|
||||
|
||||
void
|
||||
CGameLogic::SortOutStreamingAndMemory(const CVector &pos)
|
||||
{
|
||||
CTimer::Stop();
|
||||
CStreaming::FlushRequestList();
|
||||
CStreaming::DeleteRwObjectsAfterDeath(pos);
|
||||
CStreaming::RemoveUnusedModelsInLoadedList();
|
||||
CGame::DrasticTidyUpMemory();
|
||||
CStreaming::LoadScene(pos);
|
||||
CTimer::Update();
|
||||
}
|
||||
|
||||
void
|
||||
CGameLogic::Update()
|
||||
{
|
||||
CVector vecRestartPos;
|
||||
float fRestartFloat;
|
||||
|
||||
if (CCutsceneMgr::ms_cutsceneProcessing) return;
|
||||
|
||||
CPlayerInfo &pPlayerInfo = CWorld::Players[CWorld::PlayerInFocus];
|
||||
switch (pPlayerInfo.m_WBState) {
|
||||
case WBSTATE_PLAYING:
|
||||
if (pPlayerInfo.m_pPed->m_nPedState == PED_DEAD) {
|
||||
pPlayerInfo.m_pPed->ClearAdrenaline();
|
||||
pPlayerInfo.KillPlayer();
|
||||
}
|
||||
if (pPlayerInfo.m_pPed->m_nPedState == PED_ARRESTED) {
|
||||
pPlayerInfo.m_pPed->ClearAdrenaline();
|
||||
pPlayerInfo.ArrestPlayer();
|
||||
}
|
||||
break;
|
||||
case WBSTATE_WASTED:
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) {
|
||||
TheCamera.SetFadeColour(200, 200, 200);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
if (pPlayerInfo.m_bGetOutOfHospitalFree) {
|
||||
pPlayerInfo.m_bGetOutOfHospitalFree = false;
|
||||
} else {
|
||||
pPlayerInfo.m_nMoney = max(0, pPlayerInfo.m_nMoney - 1000);
|
||||
pPlayerInfo.m_pPed->ClearWeapons();
|
||||
}
|
||||
|
||||
if (pPlayerInfo.m_pPed->bInVehicle) {
|
||||
CVehicle *pVehicle = pPlayerInfo.m_pPed->m_pMyVehicle;
|
||||
if (pVehicle != nil) {
|
||||
if (pVehicle->pDriver == pPlayerInfo.m_pPed) {
|
||||
pVehicle->pDriver = nil;
|
||||
if (pVehicle->m_status != STATUS_WRECKED)
|
||||
pVehicle->m_status = STATUS_ABANDONED;
|
||||
} else
|
||||
pVehicle->RemovePassenger(pPlayerInfo.m_pPed);
|
||||
}
|
||||
}
|
||||
CEventList::Initialise();
|
||||
CMessages::ClearMessages();
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
TheCamera.m_fCamShakeForce = 0.0f;
|
||||
TheCamera.SetMotionBlur(0, 0, 0, 0, MBLUR_NONE);
|
||||
CPad::GetPad(0)->StopShaking(0);
|
||||
CReferences::RemoveReferencesToPlayer();
|
||||
CCarCtrl::CountDownToCarsAtStart = 2;
|
||||
CPad::GetPad(CWorld::PlayerInFocus)->DisablePlayerControls = PLAYERCONTROL_ENABLED;
|
||||
if (CRestart::bFadeInAfterNextDeath) {
|
||||
TheCamera.SetFadeColour(200, 200, 200);
|
||||
TheCamera.Fade(4.0f, FADE_IN);
|
||||
} else CRestart::bFadeInAfterNextDeath = true;
|
||||
}
|
||||
break;
|
||||
case WBSTATE_BUSTED:
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) {
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
int takeMoney;
|
||||
|
||||
switch (pPlayerInfo.m_pPed->m_pWanted->m_nWantedLevel) {
|
||||
case 0:
|
||||
case 1:
|
||||
takeMoney = 100;
|
||||
break;
|
||||
case 2:
|
||||
takeMoney = 200;
|
||||
break;
|
||||
case 3:
|
||||
takeMoney = 400;
|
||||
break;
|
||||
case 4:
|
||||
takeMoney = 600;
|
||||
break;
|
||||
case 5:
|
||||
takeMoney = 900;
|
||||
break;
|
||||
case 6:
|
||||
takeMoney = 1500;
|
||||
break;
|
||||
}
|
||||
if (pPlayerInfo.m_bGetOutOfJailFree) {
|
||||
pPlayerInfo.m_bGetOutOfJailFree = false;
|
||||
} else {
|
||||
pPlayerInfo.m_nMoney = max(0, pPlayerInfo.m_nMoney - takeMoney);
|
||||
pPlayerInfo.m_pPed->ClearWeapons();
|
||||
}
|
||||
|
||||
if (pPlayerInfo.m_pPed->bInVehicle) {
|
||||
CVehicle *pVehicle = pPlayerInfo.m_pPed->m_pMyVehicle;
|
||||
if (pVehicle != nil) {
|
||||
if (pVehicle->pDriver == pPlayerInfo.m_pPed) {
|
||||
pVehicle->pDriver = nil;
|
||||
if (pVehicle->m_status != STATUS_WRECKED)
|
||||
pVehicle->m_status = STATUS_ABANDONED;
|
||||
}
|
||||
else
|
||||
pVehicle->RemovePassenger(pPlayerInfo.m_pPed);
|
||||
}
|
||||
}
|
||||
CEventList::Initialise();
|
||||
CMessages::ClearMessages();
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
pPlayerInfo.m_pPed->ClearWeapons();
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
TheCamera.m_fCamShakeForce = 0.0f;
|
||||
TheCamera.SetMotionBlur(0, 0, 0, 0, MBLUR_NONE);
|
||||
CPad::GetPad(0)->StopShaking(0);
|
||||
CReferences::RemoveReferencesToPlayer();
|
||||
CCarCtrl::CountDownToCarsAtStart = 2;
|
||||
CPad::GetPad(CWorld::PlayerInFocus)->DisablePlayerControls = PLAYERCONTROL_ENABLED;
|
||||
if (CRestart::bFadeInAfterNextArrest) {
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(4.0f, FADE_IN);
|
||||
} else CRestart::bFadeInAfterNextArrest = true;
|
||||
}
|
||||
break;
|
||||
case WBSTATE_FAILED_CRITICAL_MISSION:
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800 && CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800) {
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
if (pPlayerInfo.m_pPed->bInVehicle) {
|
||||
CVehicle *pVehicle = pPlayerInfo.m_pPed->m_pMyVehicle;
|
||||
if (pVehicle != nil) {
|
||||
if (pVehicle->pDriver == pPlayerInfo.m_pPed) {
|
||||
pVehicle->pDriver = nil;
|
||||
if (pVehicle->m_status != STATUS_WRECKED)
|
||||
pVehicle->m_status = STATUS_ABANDONED;
|
||||
} else
|
||||
pVehicle->RemovePassenger(pPlayerInfo.m_pPed);
|
||||
}
|
||||
}
|
||||
CEventList::Initialise();
|
||||
CMessages::ClearMessages();
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
TheCamera.m_fCamShakeForce = 0.0f;
|
||||
TheCamera.SetMotionBlur(0, 0, 0, 0, MBLUR_NONE);
|
||||
CPad::GetPad(0)->StopShaking(0);
|
||||
CReferences::RemoveReferencesToPlayer();
|
||||
CCarCtrl::CountDownToCarsAtStart = 2;
|
||||
CPad::GetPad(CWorld::PlayerInFocus)->DisablePlayerControls = PLAYERCONTROL_ENABLED;
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(4.0f, FADE_IN);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CGameLogic::RestorePlayerStuffDuringResurrection(CPlayerPed *pPlayerPed, CVector pos, float angle)
|
||||
{
|
||||
pPlayerPed->m_fHealth = 100.0f;
|
||||
pPlayerPed->m_fArmour = 0.0f;
|
||||
pPlayerPed->bIsVisible = true;
|
||||
pPlayerPed->m_bloodyFootprintCount = 0;
|
||||
pPlayerPed->bDoBloodyFootprints = false;
|
||||
pPlayerPed->ClearAdrenaline();
|
||||
pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina;
|
||||
if (pPlayerPed->m_pFire)
|
||||
pPlayerPed->m_pFire->Extinguish();
|
||||
pPlayerPed->bInVehicle = false;
|
||||
pPlayerPed->m_pMyVehicle = nil;
|
||||
pPlayerPed->m_pVehicleAnim = nil;
|
||||
pPlayerPed->m_pWanted->Reset();
|
||||
pPlayerPed->RestartNonPartialAnims();
|
||||
pPlayerPed->GetPlayerInfoForThisPlayerPed()->MakePlayerSafe(false);
|
||||
pPlayerPed->bRemoveFromWorld = false;
|
||||
pPlayerPed->ClearWeaponTarget();
|
||||
pPlayerPed->SetInitialState();
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
|
||||
pos.z += 1.0f;
|
||||
pPlayerPed->Teleport(pos);
|
||||
pPlayerPed->SetMoveSpeed(CVector(0.0f, 0.0f, 0.0f));
|
||||
|
||||
pPlayerPed->m_fRotationCur = DEGTORAD(angle);
|
||||
pPlayerPed->m_fRotationDest = pPlayerPed->m_fRotationCur;
|
||||
pPlayerPed->SetHeading(pPlayerPed->m_fRotationCur);
|
||||
CTheScripts::ClearSpaceForMissionEntity(pos, pPlayerPed);
|
||||
CWorld::ClearExcitingStuffFromArea(pos, 4000.0, 1);
|
||||
pPlayerPed->RestoreHeadingRate();
|
||||
TheCamera.SetCameraDirectlyInFrontForFollowPed_CamOnAString();
|
||||
CReferences::RemoveReferencesToPlayer();
|
||||
CGarages::PlayerArrestedOrDied();
|
||||
CStats::CheckPointReachedUnsuccessfully();
|
||||
CWorld::Remove(pPlayerPed);
|
||||
CWorld::Add(pPlayerPed);
|
||||
}
|
||||
|
||||
STARTPATCHES
|
||||
InjectHook(0x4213F0, &CGameLogic::InitAtStartOfGame, PATCH_JUMP);
|
||||
InjectHook(0x421C00, &CGameLogic::PassTime, PATCH_JUMP);
|
||||
InjectHook(0x421A20, &CGameLogic::SortOutStreamingAndMemory, PATCH_JUMP);
|
||||
InjectHook(0x421400, &CGameLogic::Update, PATCH_JUMP);
|
||||
InjectHook(0x421A60, &CGameLogic::RestorePlayerStuffDuringResurrection, PATCH_JUMP);
|
||||
ENDPATCHES
|
13
src/control/GameLogic.h
Normal file
13
src/control/GameLogic.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
class CGameLogic
|
||||
{
|
||||
public:
|
||||
static void InitAtStartOfGame();
|
||||
static void PassTime(uint32 time);
|
||||
static void SortOutStreamingAndMemory(const CVector &pos);
|
||||
static void Update();
|
||||
static void RestorePlayerStuffDuringResurrection(class CPlayerPed *pPlayerPed, CVector pos, float angle);
|
||||
|
||||
static uint8 ActivePlayers;
|
||||
};
|
@ -71,6 +71,7 @@ bool CGarages::HasCarBeenCrushed(int32 handle)
|
||||
WRAPPER void CGarages::TriggerMessage(const char *text, int16, uint16 time, int16) { EAXJMP(0x426B20); }
|
||||
WRAPPER bool CGarages::IsPointWithinHideOutGarage(CVector&) { EAXJMP(0x428260); }
|
||||
WRAPPER bool CGarages::IsPointWithinAnyGarage(CVector&) { EAXJMP(0x428320); }
|
||||
WRAPPER void CGarages::PlayerArrestedOrDied() { EAXJMP(0x427F60); }
|
||||
|
||||
#if 0
|
||||
WRAPPER void CGarages::PrintMessages(void) { EAXJMP(0x426310); }
|
||||
@ -78,40 +79,40 @@ WRAPPER void CGarages::PrintMessages(void) { EAXJMP(0x426310); }
|
||||
void CGarages::PrintMessages()
|
||||
{
|
||||
if (CTimer::GetTimeInMilliseconds() > MessageStartTime && CTimer::GetTimeInMilliseconds() < MessageEndTime) {
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f / 2), SCREEN_SCALE_Y(1.5f / 2)); // BUG: game doesn't use macro here.
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f)); // BUG: game doesn't use macro here.
|
||||
CFont::SetPropOn();
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
|
||||
float y_offset = SCREEN_HEIGHT / 3; // THIS is PS2 calculation
|
||||
// y_offset = SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(84.0f); // This is PC and results in text being written over some HUD elements
|
||||
|
||||
if (MessageNumberInString2 < 0) {
|
||||
if (MessageNumberInString < 0) {
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH/ 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f), TheText.Get(MessageIDString));
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(2.0f), TheText.Get(MessageIDString));
|
||||
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f), TheText.Get(MessageIDString));
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset, TheText.Get(MessageIDString));
|
||||
}
|
||||
else {
|
||||
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, -1, -1, -1, -1, -1, gUString);
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0f - 40.0f), gUString);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(40.0f) + SCREEN_SCALE_Y(2.0f), gUString);
|
||||
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - SCREEN_SCALE_Y(40.0f), gUString);
|
||||
}
|
||||
}
|
||||
else {
|
||||
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, MessageNumberInString2, -1, -1, -1, -1, gUString);
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0f - 40.0f), gUString);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(40.0f) + SCREEN_SCALE_Y(2.0f), gUString);
|
||||
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - SCREEN_SCALE_Y(40.0f), gUString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,5 @@ public:
|
||||
static bool HasCarBeenCrushed(int32);
|
||||
static bool IsPointWithinHideOutGarage(CVector&);
|
||||
static bool IsPointWithinAnyGarage(CVector&);
|
||||
static void PlayerArrestedOrDied();
|
||||
};
|
||||
|
@ -2,6 +2,13 @@
|
||||
#include "patcher.h"
|
||||
#include "Restart.h"
|
||||
|
||||
bool &CRestart::OverrideHospitalLevel = *(bool*)0x95CD4C;
|
||||
bool &CRestart::OverridePoliceStationLevel = *(bool*)0x95CD50;
|
||||
bool &CRestart::bFadeInAfterNextArrest = *(bool*)0x95CD69;
|
||||
bool &CRestart::bFadeInAfterNextDeath = *(bool*)0x95CD9D;
|
||||
|
||||
WRAPPER void CRestart::AddHospitalRestartPoint(const CVector&, float) { EAXJMP(0x436100); }
|
||||
WRAPPER void CRestart::AddPoliceRestartPoint(const CVector&, float) { EAXJMP(0x436150); }
|
||||
WRAPPER void CRestart::OverrideNextRestart(const CVector&, float) { EAXJMP(0x4366C0); }
|
||||
WRAPPER void CRestart::OverrideNextRestart(const CVector&, float) { EAXJMP(0x4366C0); }
|
||||
WRAPPER void CRestart::FindClosestHospitalRestartPoint(const CVector &, CVector *, float *) { EAXJMP(0x4361A0); }
|
||||
WRAPPER void CRestart::FindClosestPoliceRestartPoint(const CVector &, CVector *, float *) { EAXJMP(0x436450); }
|
@ -6,4 +6,12 @@ public:
|
||||
static void AddPoliceRestartPoint(const CVector&, float);
|
||||
static void AddHospitalRestartPoint(const CVector&, float);
|
||||
static void OverrideNextRestart(const CVector&, float);
|
||||
|
||||
static void FindClosestHospitalRestartPoint(const CVector &, CVector *, float *);
|
||||
static void FindClosestPoliceRestartPoint(const CVector &, CVector *, float *);
|
||||
|
||||
static bool &OverrideHospitalLevel;
|
||||
static bool &OverridePoliceStationLevel;
|
||||
static bool &bFadeInAfterNextArrest;
|
||||
static bool &bFadeInAfterNextDeath;
|
||||
};
|
||||
|
Reference in New Issue
Block a user