From 04c9affe2e97697346c431b773230332e7bcebfb Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 12 Apr 2020 12:06:33 +0300 Subject: scene init --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index daac3ec5..fe747ac1 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -350,7 +350,7 @@ bool CGame::Initialise(const char* datFile) CAntennas::Init(); CGlass::Init(); gPhoneInfo.Initialise(); - CSceneEdit::Init(); + CSceneEdit::Initialise(); LoadingScreen("Loading the Game", "Load scripts", nil); CTheScripts::Init(); CGangs::Initialise(); -- cgit v1.2.3 From 4b602940eb79c637f70a22046d414a0b1358eea8 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 16 Apr 2020 10:26:16 +0200 Subject: first fake RW implementation working --- src/core/Game.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index fe747ac1..8699ffeb 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -307,6 +307,7 @@ bool CGame::Initialise(const char* datFile) CDraw::SetFOV(120.0f); CDraw::ms_fLODDistance = 500.0f; LoadingScreen("Loading the Game", "Setup streaming", nil); +#ifdef USE_TXD_CDIMAGE int txdHandle = CFileMgr::OpenFile("MODELS\\TXD.IMG", "r"); if (txdHandle) CFileMgr::CloseFile(txdHandle); @@ -321,6 +322,9 @@ bool CGame::Initialise(const char* datFile) CStreaming::Init(); } } +#else + CStreaming::Init(); +#endif CStreaming::LoadInitialVehicles(); CStreaming::LoadInitialPeds(); CStreaming::RequestBigBuildings(LEVEL_NONE); -- cgit v1.2.3 From a4922d5cb77e31657768d5da4b286a2e67ee0e6f Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Fri, 17 Apr 2020 08:54:14 +0300 Subject: rem refs --- src/core/Game.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 8699ffeb..f115d52f 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -89,19 +89,19 @@ -eLevelName &CGame::currLevel = *(eLevelName*)0x941514; -bool &CGame::bDemoMode = *(bool*)0x5F4DD0; -bool &CGame::nastyGame = *(bool*)0x5F4DD4; -bool &CGame::frenchGame = *(bool*)0x95CDCB; -bool &CGame::germanGame = *(bool*)0x95CD1E; -bool &CGame::noProstitutes = *(bool*)0x95CDCF; -bool &CGame::playingIntro = *(bool*)0x95CDC2; -char *CGame::aDatFile = (char*)0x773A48; +eLevelName CGame::currLevel; +bool CGame::bDemoMode = true; +bool CGame::nastyGame = true; +bool CGame::frenchGame; +bool CGame::germanGame; +bool CGame::noProstitutes; +bool CGame::playingIntro; +char CGame::aDatFile[32]; #ifdef MORE_LANGUAGES bool CGame::russianGame = false; #endif -int &gameTxdSlot = *(int*)0x628D88; +int gameTxdSlot; bool CGame::InitialiseOnceBeforeRW(void) @@ -115,7 +115,9 @@ CGame::InitialiseOnceBeforeRW(void) bool CGame::InitialiseRenderWare(void) { +#ifdef USE_TEXTURE_POOL _TexturePoolsInitialise(); +#endif CTxdStore::Initialise(); CVisibilityPlugins::Initialise(); @@ -188,7 +190,9 @@ void CGame::ShutdownRenderWare(void) CVisibilityPlugins::Shutdown(); +#ifdef USE_TEXTURE_POOL _TexturePoolsShutdown(); +#endif } bool CGame::InitialiseOnceAfterRW(void) -- cgit v1.2.3 From 599164006a9e7eb7328fc194c9bae1acbb2c887d Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 17 Apr 2020 16:31:11 +0300 Subject: Remove patches --- src/core/Game.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index f115d52f..7ccf78d0 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -5,7 +5,7 @@ #pragma warning( pop ) #include "common.h" #include "win.h" -#include "patcher.h" + #include "Game.h" #include "main.h" #include "RwHelper.h" @@ -710,20 +710,3 @@ void CGame::ProcessTidyUpMemory(void) // meow #endif } - -STARTPATCHES - InjectHook(0x48BB80, CGame::InitialiseOnceBeforeRW, PATCH_JUMP); - InjectHook(0x48BBA0, CGame::InitialiseRenderWare, PATCH_JUMP); - InjectHook(0x48BCB0, CGame::ShutdownRenderWare, PATCH_JUMP); - InjectHook(0x48BD50, CGame::InitialiseOnceAfterRW, PATCH_JUMP); - InjectHook(0x48BEC0, CGame::FinalShutdown, PATCH_JUMP); - InjectHook(0x48BED0, CGame::Initialise, PATCH_JUMP); - InjectHook(0x48C3A0, CGame::ShutDown, PATCH_JUMP); - InjectHook(0x48C4B0, CGame::ReInitGameObjectVariables, PATCH_JUMP); - InjectHook(0x48C620, CGame::ReloadIPLs, PATCH_JUMP); - InjectHook(0x48C6B0, CGame::ShutDownForRestart, PATCH_JUMP); - InjectHook(0x48C740, CGame::InitialiseWhenRestarting, PATCH_JUMP); - InjectHook(0x48C850, CGame::Process, PATCH_JUMP); - InjectHook(0x48CA10, CGame::DrasticTidyUpMemory, PATCH_JUMP); - InjectHook(0x48CA20, CGame::TidyUpMemory, PATCH_JUMP); -ENDPATCHES -- cgit v1.2.3 From 63951d9b957b30a110f42a03edb4833cbbaf380e Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 17 Apr 2020 19:30:57 +0200 Subject: Part one --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 7ccf78d0..8b2f8604 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -72,7 +72,7 @@ #include "Streaming.h" #include "SurfaceTable.h" #include "TempColModels.h" -#include "TimeCycle.h" +#include "Timecycle.h" #include "TrafficLights.h" #include "Train.h" #include "TxdStore.h" -- cgit v1.2.3 From d6314f9564912393134d832b8cc268dd3dbfcbaa Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sat, 18 Apr 2020 12:29:28 +0200 Subject: Revert "Part one" This reverts commit 63951d9b957b30a110f42a03edb4833cbbaf380e. --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 8b2f8604..7ccf78d0 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -72,7 +72,7 @@ #include "Streaming.h" #include "SurfaceTable.h" #include "TempColModels.h" -#include "Timecycle.h" +#include "TimeCycle.h" #include "TrafficLights.h" #include "Train.h" #include "TxdStore.h" -- cgit v1.2.3 From 2308321805b97105cf03e8a38d44c90d9f652cd1 Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Sun, 19 Apr 2020 22:32:59 +0300 Subject: Add polish lang support --- src/core/Game.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 7ccf78d0..b1d29161 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -98,6 +98,7 @@ bool CGame::noProstitutes; bool CGame::playingIntro; char CGame::aDatFile[32]; #ifdef MORE_LANGUAGES +bool CGame::polishGame = false; bool CGame::russianGame = false; #endif -- cgit v1.2.3 From 98fc8ecef09ba9c50a511c3bcfaca3cffe2fed0b Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 20 Apr 2020 16:05:39 +0200 Subject: update librw (matfx) --- src/core/Game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index b1d29161..94c775ae 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -156,6 +156,14 @@ CGame::InitialiseRenderWare(void) LightsCreate(Scene.world); CreateDebugFont(); + +#ifdef LIBRW +#ifdef PS2_MATFX + rw::MatFX::modulateEnvMap = true; +#else + rw::MatFX::modulateEnvMap = false; +#endif +#endif CFont::Initialise(); CHud::Initialise(); -- cgit v1.2.3 From 370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 19 Apr 2020 18:34:08 +0200 Subject: Try to build with mingw --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 7ccf78d0..8b2f8604 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -72,7 +72,7 @@ #include "Streaming.h" #include "SurfaceTable.h" #include "TempColModels.h" -#include "TimeCycle.h" +#include "Timecycle.h" #include "TrafficLights.h" #include "Train.h" #include "TxdStore.h" -- cgit v1.2.3 From c80403a2e0aa337968d77f5d4bcc33cdc91eeac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Tue, 21 Apr 2020 13:28:06 +0300 Subject: Crossplatform work continues --- src/core/Game.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 6f3eee29..bfe6eee3 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -1,7 +1,5 @@ #pragma warning( push ) #pragma warning( disable : 4005) -#define DIRECTINPUT_VERSION 0x0800 -#include #pragma warning( pop ) #include "common.h" #include "win.h" -- cgit v1.2.3 From 5bb4e9992679c9e8767d4eb6de54da1892ec13c6 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 24 Apr 2020 13:27:02 +0200 Subject: implemented debugmenu --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index bfe6eee3..f72d342f 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -84,6 +84,7 @@ #include "World.h" #include "ZoneCull.h" #include "Zones.h" +#include "debugmenu.h" @@ -618,7 +619,6 @@ void CGame::InitialiseWhenRestarting(void) DMAudio.ChangeMusicMode(MUSICMODE_GAME); } -extern void (*DebugMenuProcess)(void); void CGame::Process(void) { CPad::UpdatePads(); -- cgit v1.2.3 From 6c1a1f7cd20a2674f33b5318e6e07a3a28d016f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 26 Apr 2020 13:25:03 +0300 Subject: Initial GLFW support --- src/core/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Game.cpp') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index f72d342f..8633d222 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -2,7 +2,7 @@ #pragma warning( disable : 4005) #pragma warning( pop ) #include "common.h" -#include "win.h" +#include "crossplatform.h" #include "Game.h" #include "main.h" -- cgit v1.2.3