From 2f7ae611edb389330d1022102aac4b7ce3e5709b Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 12 Jul 2021 04:13:42 +0200 Subject: Vanilla config for Windows and win-x86 only --- premake5.lua | 9 +++++---- src/core/config.h | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/premake5.lua b/premake5.lua index 69090d49..2535a53e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -68,7 +68,7 @@ end workspace "reVC" language "C++" - configurations { "Debug", "Release", "Vanilla" } + configurations { "Debug", "Release" } startproject "reVC" location "build" symbols "Full" @@ -80,6 +80,7 @@ workspace "reVC" end filter { "system:windows" } + configurations { "Vanilla" } platforms { "win-x86-RW34_d3d8-mss", "win-x86-librw_d3d9-mss", @@ -123,9 +124,6 @@ workspace "reVC" flags { "LinkTimeOptimization" } end - filter "configurations:Vanilla" - defines { "VANILLA_DEFINES" } - filter { "platforms:win*" } system "windows" @@ -305,6 +303,9 @@ project "reVC" includedirs { "src/weapons" } includedirs { "src/extras" } + filter "configurations:Vanilla" + defines { "VANILLA_DEFINES" } + if(not _OPTIONS["no-git-hash"]) then defines { "USE_OUR_VERSIONING" } end diff --git a/src/core/config.h b/src/core/config.h index caa6c3e4..bdc8d534 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -206,6 +206,10 @@ enum Config { #define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch) #ifdef VANILLA_DEFINES +#if !defined(_WIN32) || defined(__LP64__) || defined(_WIN64) +#error Vanilla can only be built for win-x86 +#endif + #define FINAL #define MASTER //#define USE_MY_DOCUMENTS -- cgit v1.2.3 From 6c097398d15979253633a0c36a4500321473d84b Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 12 Jul 2021 22:47:17 +0200 Subject: fix FixGarages --- src/save/GenericGameStorage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 12565e3f..d080512e 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -828,6 +828,13 @@ FixGarages(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) SkipBuf(buf2, sizeof(CStoredCar)); } + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = 7876; } static void -- cgit v1.2.3 From b69cee380141896494d18830994615b907ebb0da Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 12 Jul 2021 23:26:49 +0200 Subject: fix premake --- premake5.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/premake5.lua b/premake5.lua index 2535a53e..f1287011 100644 --- a/premake5.lua +++ b/premake5.lua @@ -303,9 +303,6 @@ project "reVC" includedirs { "src/weapons" } includedirs { "src/extras" } - filter "configurations:Vanilla" - defines { "VANILLA_DEFINES" } - if(not _OPTIONS["no-git-hash"]) then defines { "USE_OUR_VERSIONING" } end @@ -316,6 +313,9 @@ project "reVC" includedirs { "vendor/opusfile/include" } end + filter "configurations:Vanilla" + defines { "VANILLA_DEFINES" } + filter "platforms:*mss" defines { "AUDIO_MSS" } includedirs { "vendor/milessdk/include" } -- cgit v1.2.3