Merge remote-tracking branch 'origin/miami' into lcs

# Conflicts:
#	src/animation/CutsceneMgr.cpp
#	src/control/CarCtrl.cpp
#	src/control/Script.cpp
#	src/control/Script2.cpp
#	src/core/Frontend.cpp
#	src/core/main.cpp
#	src/entities/Physical.cpp
#	src/peds/Ped.cpp
#	src/peds/PedAI.cpp
#	src/text/Messages.cpp
#	src/vehicles/Cranes.cpp
#	src/vehicles/Transmission.cpp
This commit is contained in:
Sergeanur
2021-01-22 15:04:09 +02:00
130 changed files with 92 additions and 669 deletions

View File

@ -6,8 +6,6 @@
#include "Pools.h"
#include "World.h"
// --MIAMI: File done
CAccidentManager gAccidentManager;
CAccident*

View File

@ -30,8 +30,6 @@
#include "Bike.h"
#include "Pickups.h"
//--MIAMI: file done
bool PrintDebugCode = false;
int16 DebugCamMode;

View File

@ -2955,7 +2955,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
if (CReplay::IsPlayingBack())
return false;
#endif
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1)
if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
return false;
if(FindPlayerVehicle() == nil)
return false;
@ -2983,7 +2983,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
if (CReplay::IsPlayingBack())
return false;
#endif
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1)
if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
return false;
if(FindPlayerVehicle() == nil)
return false;

View File

@ -6,8 +6,6 @@
#include "Stats.h"
#include "VarConsole.h"
// --MIAMI: File done
_TODO("gbFastTime");
bool gbFastTime;

View File

@ -21,8 +21,6 @@
#include "Camera.h"
#include "GenericGameStorage.h"
// --MIAMI: file done
CControllerConfigManager ControlsManager;
CControllerConfigManager::CControllerConfigManager()

View File

@ -10,8 +10,6 @@
#include "main.h"
#include "Accident.h"
// --MIAMI: file done
int32 CEventList::ms_nFirstFreeSlotIndex;
CEvent gaEvent[NUMEVENTS];
@ -220,7 +218,7 @@ CEventList::ReportCrimeForEvent(eEventType type, intptr crimeId, bool copsDontCa
default: crime = CRIME_NONE; break;
}
if (crime == CRIME_HIT_PED && IsPedPointerValid((CPed*)crimeId) && FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
if (crime == CRIME_HIT_PED && IsPedPointerValid((CPed*)crimeId) && FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
if (!((CPed*)crimeId)->DyingOrDead()) {
CMessages::AddBigMessage(TheText.Get("GOODBOY"), 5000, 0);
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 50;

View File

@ -30,8 +30,6 @@
#include "ColStore.h"
#include "Occlusion.h"
//--MIAMI: file done
char CFileLoader::ms_line[256];
const char*
@ -1312,7 +1310,7 @@ CFileLoader::LoadOcclusionVolume(const char *line)
}
//--MIAMI: unused
// unused
void
CFileLoader::ReloadPaths(const char *filename)
{

View File

@ -18,8 +18,6 @@
#include "GameLogic.h"
#include "CarAI.h"
// --MIAMI: file done
CFireManager gFireManager;
CFire::CFire()

View File

@ -41,7 +41,6 @@
#include "sampman.h"
// --LCS: changed a bit to have lcs feel, needs more work
// Similar story to Hud.cpp:
// Game has colors inlined in code.
// For easier modification we collect them here:

View File

@ -125,8 +125,6 @@ int gameTxdSlot;
uint8 gameProcessPirateCheck = 0;
#endif
// --MIAMI: File done
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
#ifdef PS2_MENU

View File

@ -2,8 +2,6 @@
#include <ctype.h>
// --MIAMI: file done
class CGeneral
{
public:

View File

@ -7,8 +7,6 @@
#include "main.h"
#include "Population.h"
// --MIAMI: file done
float CIniFile::PedNumberMultiplier = 0.6f;
float CIniFile::CarNumberMultiplier = 0.8f;

View File

@ -54,8 +54,6 @@
#include "libpad.h"
#endif
// --MIAMI: file done except Mobile(see TODOs) and PS2 stuff
CPad Pads[MAX_PADS];
#ifdef GTA_PS2
u_long128 pad_dma_buf[scePadDmaBufferMax] __attribute__((aligned(64)));
@ -70,7 +68,7 @@ bool CPad::bOldDisplayNoControllerMessage;
bool CPad::m_bMapPadOneToPadTwo;
bool CPad::m_bDebugCamPCOn;
bool CPad::bHasPlayerCheated;
bool CPad::bInvertLook4Pad;
bool CPad::bInvertLook4Pad = true;
#ifdef GTA_PS2
unsigned char act_direct[6];
unsigned char act_align[6];
@ -459,7 +457,7 @@ void ArmourCheat()
void WantedLevelUpCheat()
{
CHud::SetHelpMessage(TheText.Get("CHEAT5"), true);
FindPlayerPed()->m_pWanted->CheatWantedLevel(Min(FindPlayerPed()->m_pWanted->m_nWantedLevel + 2, 6));
FindPlayerPed()->m_pWanted->CheatWantedLevel(Min(FindPlayerPed()->m_pWanted->GetWantedLevel() + 2, 6));
}
void WantedLevelDownCheat()

View File

@ -35,8 +35,6 @@
#include "Automobile.h"
#include "GameLogic.h"
// --MIAMI: File done
CVector lastPlayerPos;
void
@ -483,7 +481,7 @@ CPlayerInfo::Process(void)
CStats::DistanceTravelledOnFoot += FindPlayerPed()->m_fDistanceTravelled;
}
if (m_pPed->m_pWanted->m_nWantedLevel && !CTheScripts::IsPlayerOnAMission()) {
if (m_pPed->m_pWanted->GetWantedLevel() && !CTheScripts::IsPlayerOnAMission()) {
float maxDelta = 0.0f;
static bool movedSignificantly = true;
static bool thereIsACarPathNear = true;
@ -495,7 +493,7 @@ CPlayerInfo::Process(void)
lastPlayerPos = FindPlayerCoors();
thereIsACarPathNear = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 60.0f, true, false, false, false) != 0;
}
switch (m_pPed->m_pWanted->m_nWantedLevel) {
switch (m_pPed->m_pWanted->GetWantedLevel()) {
case 1:
maxDelta = 31.f;
break;

View File

@ -15,8 +15,6 @@
#include "World.h"
#include "MemoryHeap.h"
//--MIAMI: file done
CCPtrNodePool *CPools::ms_pPtrNodePool;
CEntryInfoNodePool *CPools::ms_pEntryInfoNodePool;
CPedPool *CPools::ms_pPedPool;

View File

@ -17,8 +17,6 @@
#include "SpecialFX.h"
#include "Font.h"
// --MIAMI: file done
float CRadar::m_radarRange;
sRadarTrace CRadar::ms_RadarTrace[NUMRADARBLIPS];
CVector2D vec2DRadarOrigin;

View File

@ -115,8 +115,6 @@ float CStats::LongestWheelieDist;
float CStats::LongestStoppieDist;
float CStats::Longest2WheelDist;
// --MIAMI: functions below are done, but there are some to be moved from Frontend
void CStats::Init()
{
PeopleKilledByOthers = 0;

View File

@ -39,8 +39,6 @@
#include "VarConsole.h"
#include "KeyGen.h"
//--MIAMI: file done (possibly bugs)
bool CStreaming::ms_disableStreaming;
bool CStreaming::ms_bLoadingBigModel;
int32 CStreaming::ms_numModelsRequested;

View File

@ -6,8 +6,6 @@
#include "Collision.h"
#include "SurfaceTable.h"
//--MIAMI: file done
float CSurfaceTable::ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
void

View File

@ -7,8 +7,6 @@
#include "Timer.h"
#include "SpecialFX.h"
// --MIAMI: file done
uint32 CTimer::m_snTimeInMilliseconds;
PauseModeTime CTimer::m_snTimeInMillisecondsPauseMode = 1;

View File

@ -10,8 +10,6 @@
#include "World.h"
#include "Zones.h"
// --MIAMI: file done
CPlaceName CUserDisplay::PlaceName;
COnscreenTimer CUserDisplay::OnscnTimer;
CPager CUserDisplay::Pager;

View File

@ -15,8 +15,6 @@
int32 CWanted::MaximumWantedLevel = 6;
int32 CWanted::nMaximumWantedLevel = 9600;
// --MIAMI: File done except stats
void
CWanted::Initialise()
{

View File

@ -29,8 +29,6 @@
#include "WaterLevel.h"
#include "World.h"
// --MIAMI: file done
#define OBJECT_REPOSITION_OFFSET_Z 2.0f
CColPoint gaTempSphereColPoints[MAX_COLLISION_POINTS];

View File

@ -11,8 +11,6 @@
#include "ZoneCull.h"
#include "Zones.h"
//--MIAMI: done
int32 CCullZones::NumAttributeZones;
CAttributeZone CCullZones::aAttributeZones[NUMATTRIBZONES];

View File

@ -9,8 +9,6 @@
#include "World.h"
#include "Timer.h"
//--MIAMI: file done
eLevelName CTheZones::m_CurrLevel;
int16 CTheZones::FindIndex;
@ -544,7 +542,7 @@ CTheZones::SetZonePedInfo(uint16 zoneid, uint8 day, int16 pedDensity,
info->gangPedThreshold[8] += info->gangPedThreshold[7];
}
//--MIAMI: unused
// unused
void
CTheZones::SetCarDensity(uint16 zoneid, uint8 day, uint16 cardensity)
{
@ -553,7 +551,7 @@ CTheZones::SetCarDensity(uint16 zoneid, uint8 day, uint16 cardensity)
ZoneInfoArray[day ? zone->zoneinfoDay : zone->zoneinfoNight].carDensity = cardensity;
}
//--MIAMI: unused
// unused
void
CTheZones::SetPedDensity(uint16 zoneid, uint8 day, uint16 peddensity)
{

View File

@ -157,7 +157,7 @@ enum Config {
// This is enabled for all released games.
// any debug stuff that isn't left in any game is not in FINAL
//#define FINAL
#define FINAL
// This is enabled for all released games except mobile
// any debug stuff that is only left in mobile, is not in MASTER
@ -190,7 +190,7 @@ enum Config {
#define NO_CDCHECK
// those infamous texts
#define DRAW_GAME_VERSION_TEXT
//#define DRAW_GAME_VERSION_TEXT
// Memory allocation and compression
// #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet
@ -226,7 +226,7 @@ enum Config {
#undef DRAW_GAME_VERSION_TEXT
#else
// not in master builds
#define VALIDATE_SAVE_SIZE
// #define VALIDATE_SAVE_SIZE
#define NO_MOVIES // disable intro videos
#define DEBUGMENU
@ -234,7 +234,7 @@ enum Config {
#ifdef FINAL
// in all games
# define USE_MY_DOCUMENTS // use my documents directory for user files
//# define USE_MY_DOCUMENTS // use my documents directory for user files
#else
// not in any game
# define CHATTYSPLASH // print what the game is loading
@ -243,7 +243,7 @@ enum Config {
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
//#define MORE_LANGUAGES // Add more translations to the game
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
//#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
#define FIX_HIGH_FPS_BUGS_ON_FRONTEND
@ -314,8 +314,8 @@ enum Config {
//# define PS2_MENU_USEALLPAGEICONS
#else
# define MAP_ENHANCEMENTS // Adding waypoint and better mouse support
# define TRIANGLE_BACK_BUTTON
//# define CIRCLE_BACK_BUTTON
//# define TRIANGLE_BACK_BUTTON
# define CIRCLE_BACK_BUTTON
#define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync)
#define MUCH_SHORTER_OUTRO_SCREEN
// #define XBOX_MESSAGE_SCREEN // Blue background, no "saved successfully press OK" screen etc.
@ -344,11 +344,11 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
//#define MISSION_REPLAY // mobile feature
#endif
//#define SIMPLIER_MISSIONS // apply simplifications from mobile
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
// #define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define SCRIPT_LOG_FILE_LEVEL 0 // 0 == no log, 1 == overwrite every frame, 2 == full log
#ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define USE_BASIC_SCRIPT_DEBUG_OUTPUT
// #define USE_BASIC_SCRIPT_DEBUG_OUTPUT
#endif
#ifdef MASTER
@ -369,7 +369,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
#define CAMERA_PICKUP
// Peds
#define CANCELLABLE_CAR_ENTER
//#define CANCELLABLE_CAR_ENTER
// Camera
#define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future

View File

@ -517,7 +517,6 @@ Terminate3D(void)
CSprite2d splash;
int splashTxdId = -1;
//--MIAMI: done
CSprite2d*
LoadSplash(const char *name)
{
@ -563,7 +562,6 @@ DestroySplashScreen(void)
splashTxdId = -1;
}
//--MIAMI: done
Const char*
GetRandomSplashScreen(void)
{