diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-23 14:14:15 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-23 14:14:15 +0100 |
commit | 904090cbb6cf7978e2e093da1ea1d7245dcb02c8 (patch) | |
tree | b48af2798ab8faea3fcfe16d1ed8629dc025b8ab /src/core | |
parent | Remove restrictions in CGame::Process (diff) | |
parent | added some missing functions (diff) | |
download | re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar.gz re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar.bz2 re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar.lz re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar.xz re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.tar.zst re3-904090cbb6cf7978e2e093da1ea1d7245dcb02c8.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ControllerConfig.cpp | 8 | ||||
-rw-r--r-- | src/core/Frontend.cpp | 6 | ||||
-rw-r--r-- | src/core/Game.cpp | 5 | ||||
-rw-r--r-- | src/core/Lists.h | 2 | ||||
-rw-r--r-- | src/core/Pad.cpp | 9 | ||||
-rw-r--r-- | src/core/PlayerInfo.h | 2 | ||||
-rw-r--r-- | src/core/World.cpp | 5 | ||||
-rw-r--r-- | src/core/World.h | 6 | ||||
-rw-r--r-- | src/core/Zones.h | 4 | ||||
-rw-r--r-- | src/core/common.h | 39 | ||||
-rw-r--r-- | src/core/re3.cpp | 5 |
11 files changed, 36 insertions, 55 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index eea1f6f0..585eac4e 100644 --- a/src/core/ControllerConfig.cpp +++ b/src/core/ControllerConfig.cpp @@ -1,11 +1,7 @@ -#if defined RW_D3D9 || defined RWLIBS -#define DIRECTINPUT_VERSION 0x0800 -#include <dinput.h> -#endif - +#define WITHDINPUT #include "common.h" #include "platform.h" -#include "crossplatform.h" // for Windows version +#include "crossplatform.h" #include "ControllerConfig.h" #include "Pad.h" #include "FileMgr.h" diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 36db8107..0697f6ab 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -1,10 +1,6 @@ -#if defined RW_D3D9 || defined RWLIBS -#define DIRECTINPUT_VERSION 0x0800 -#include <dinput.h> -#endif - #define FORCE_PC_SCALING #define WITHWINDOWS +#define WITHDINPUT #include "common.h" #ifndef PS2_MENU #include "crossplatform.h" diff --git a/src/core/Game.cpp b/src/core/Game.cpp index b18ab4e1..e0becc43 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -1,6 +1,3 @@ -#pragma warning( push ) -#pragma warning( disable : 4005) -#pragma warning( pop ) #include "common.h" #include "platform.h" @@ -10,7 +7,6 @@ #include "Accident.h" #include "Antennas.h" #include "Bridge.h" -#include "Camera.h" #include "CarCtrl.h" #include "CarGen.h" #include "CdStream.h" @@ -69,7 +65,6 @@ #include "Skidmarks.h" #include "SetPieces.h" #include "SpecialFX.h" -#include "Sprite2d.h" #include "Stats.h" #include "Streaming.h" #include "SurfaceTable.h" diff --git a/src/core/Lists.h b/src/core/Lists.h index ecf24740..7572e882 100644 --- a/src/core/Lists.h +++ b/src/core/Lists.h @@ -1,7 +1,5 @@ #pragma once -#include "common.h" - class CPtrNode { public: diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index d099a9d3..5a105671 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -1,11 +1,4 @@ -#pragma warning( push ) -#pragma warning( disable : 4005) -#if defined RW_D3D9 || defined RWLIBS -#define DIRECTINPUT_VERSION 0x0800 -#include <dinput.h> -#endif -#pragma warning( pop ) - +#define WITHDINPUT #include "common.h" #include "crossplatform.h" #include "platform.h" diff --git a/src/core/PlayerInfo.h b/src/core/PlayerInfo.h index a3896ebb..a24185f0 100644 --- a/src/core/PlayerInfo.h +++ b/src/core/PlayerInfo.h @@ -1,6 +1,6 @@ #pragma once -#include "Collision.h" +#include "ColModel.h" enum eWastedBustedState { diff --git a/src/core/World.cpp b/src/core/World.cpp index 14624f97..1364e58f 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -4,7 +4,6 @@ #include "CopPed.h" #include "CutsceneMgr.h" #include "DMAudio.h" -#include "Entity.h" #include "EventList.h" #include "Explosion.h" #include "Fire.h" @@ -12,11 +11,8 @@ #include "Glass.h" #include "Messages.h" #include "ModelIndices.h" -#include "Object.h" #include "ParticleObject.h" -#include "Ped.h" #include "Pickups.h" -#include "PlayerPed.h" #include "Population.h" #include "ProjectileInfo.h" #include "Record.h" @@ -25,7 +21,6 @@ #include "RpAnimBlend.h" #include "Shadows.h" #include "TempColModels.h" -#include "Vehicle.h" #include "WaterLevel.h" #include "World.h" diff --git a/src/core/World.h b/src/core/World.h index 4cc9398e..b75b6a6c 100644 --- a/src/core/World.h +++ b/src/core/World.h @@ -3,6 +3,7 @@ #include "Game.h" #include "Lists.h" #include "PlayerInfo.h" +#include "Collision.h" /* Sectors span from -2000 to 2000 in x and y. * With 100x100 sectors, each is 40x40 units. */ @@ -48,11 +49,6 @@ public: VALIDATE_SIZE(CSector, 0x28); -class CEntity; -struct CColPoint; -struct CColLine; -struct CStoredCollPoly; - class CWorld { static CPtrList ms_bigBuildingsList[NUM_LEVELS]; diff --git a/src/core/Zones.h b/src/core/Zones.h index 5306d9f1..b987f009 100644 --- a/src/core/Zones.h +++ b/src/core/Zones.h @@ -103,8 +103,8 @@ public: static void SetPedDensity(uint16 zoneid, uint8 day, uint16 peddensity); static void SetPedGroup(uint16 zoneid, uint8 day, uint16 pedgroup); static int16 FindAudioZone(CVector *pos); - static CZone *GetPointerForZoneIndex(int32 i) { return i == -1 ? nil : &NavigationZoneArray[i]; } - static int32 GetIndexForZonePointer(CZone *zone) { return zone == nil ? -1 : zone - NavigationZoneArray; } + static CZone *GetPointerForZoneIndex(ssize_t i) { return i == -1 ? nil : &NavigationZoneArray[i]; } + static ssize_t GetIndexForZonePointer(CZone *zone) { return zone == nil ? -1 : zone - NavigationZoneArray; } static void AddZoneToAudioZoneArray(CZone *zone); static void InitialiseAudioZoneArray(void); static void SaveAllZones(uint8 *buffer, uint32 *length); diff --git a/src/core/common.h b/src/core/common.h index ace15ee1..349392f4 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -11,17 +11,34 @@ #include <string.h> #include <math.h> -#if defined _WIN32 && defined WITHWINDOWS -#include <windows.h> +#if !defined RW_D3D9 && defined LIBRW +#undef WITHD3D +#undef WITHDINPUT +#endif + +#if (defined WITHD3D && !defined LIBRW) +#define WITHWINDOWS #endif -#if defined _WIN32 && defined WITHD3D +#if defined _WIN32 && defined WITHWINDOWS && !defined _INC_WINDOWS #include <windows.h> -#ifndef USE_D3D9 -#include <d3d8types.h> -#else -#include <d3d9types.h> #endif + +#ifdef WITHD3D + #ifdef LIBRW + #define WITH_D3D // librw includes d3d9 itself via this right now + #else + #ifndef USE_D3D9 + #include <d3d8types.h> + #else + #include <d3d9types.h> + #endif + #endif +#endif + +#ifdef WITHDINPUT +#define DIRECTINPUT_VERSION 0x0800 +#include <dinput.h> #endif #include <rwcore.h> @@ -52,14 +69,6 @@ #define rwVENDORID_ROCKSTAR 0x0253F2 -// Get rid of bullshit windows definitions, we're not running on an 8086 -#ifdef far -#undef far -#endif -#ifdef near -#undef near -#endif - #define Max(a,b) ((a) > (b) ? (a) : (b)) #define Min(a,b) ((a) < (b) ? (a) : (b)) diff --git a/src/core/re3.cpp b/src/core/re3.cpp index cc3e93cb..a3b4a6a5 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -1,7 +1,6 @@ #include <csignal> #define WITHWINDOWS #include "common.h" -#include "crossplatform.h" #include "Renderer.h" #include "Occlusion.h" #include "Credits.h" @@ -39,6 +38,10 @@ #include "ControllerConfig.h" #endif +#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#include "crossplatform.h" +#endif + #ifndef _WIN32 #include "assert.h" #include <stdarg.h> |