From 7458e07af4a35681eaf937eb7484a64121951b71 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 1 May 2020 21:51:24 +0200 Subject: [PATCH 1/6] Add opengl build and push artifacts to bintray --- .appveyor.yml | 41 ++++++++++++++++++++++++++++++++++++----- README.md | 6 ++++-- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 278d6812..ed06b30a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,19 +5,50 @@ configuration: - Release platform: - win-x86-librw_d3d9-mss +- win-x86-librw_gl3_glfw-mss environment: APPVEYOR_SAVE_CACHE_ON_ERROR: true + GLEW_VER: "2.1.0" + GLFW_VER: "3.3.2" + GLEW_BASE: glew-%GLEW_VER% + GLFW_BASE: glfw-%GLFW_VER%.bin.WIN32 + GLEW_FILE: "%GLEW_BASE%-win32.zip" + GLFW_FILE: "%GLFW_BASE%.zip" + GLEW_URL: https://github.com/nigels-com/glew/releases/download/%GLEW_BASE%/%GLEW_FILE% + GLFW_URL: https://github.com/glfw/glfw/releases/download/%GLFW_VER%/%GLFW_FILE% install: +- IF [%PLATFORM%] == [win-x86-librw_gl3_glfw-mss] IF NOT EXIST %GLEW_FILE% appveyor DownloadFile %GLEW_URL% -FileName "%APPVEYOR_BUILD_FOLDER%/%GLEW_FILE%" +- IF [%PLATFORM%] == [win-x86-librw_gl3_glfw-mss] 7z x "%APPVEYOR_BUILD_FOLDER%/%GLEW_FILE%" +- IF [%PLATFORM%] == [win-x86-librw_gl3_glfw-mss] IF NOT EXIST %GLFW_FILE% appveyor DownloadFile %GLFW_URL% -FileName "%APPVEYOR_BUILD_FOLDER%/%GLFW_FILE%" +- IF [%PLATFORM%] == [win-x86-librw_gl3_glfw-mss] 7z x "%APPVEYOR_BUILD_FOLDER%/%GLFW_FILE%" - cmd: >- git submodule update --init --recursive - premake5 vs2019 --with-librw + premake5 vs2019 --with-librw --glewdir=%APPVEYOR_BUILD_FOLDER%/%GLEW_BASE% --glfwdir=%APPVEYOR_BUILD_FOLDER%/%GLFW_BASE% build: project: build/re3.sln verbosity: minimal +after_build: +- 7z a "re3_%APPVEYOR_BUILD_VERSION%.zip" bin/%PLATFORM%/%CONFIGURATION%/re3.exe bin/%PLATFORM%/%CONFIGURATION%/re3.pdb artifacts: -- path: bin/%PLATFORM%/%CONFIGURATION%/re3.exe - name: re3.exe -- path: bin/%PLATFORM%/%CONFIGURATION%/re3.pdb - name: re3.pdb +- path: "re3_%APPVEYOR_BUILD_VERSION%.zip" + name: re3 +deploy: +- provider: BinTray + username: shfil119 + api_key: + secure: gDoU7c1rRjVVQsYNjsXrQX2PBM3GgF7Ky9Qn1RFN+HL4yZ1XE1RBYZoRNxr/PWJc + subject: shfil119 + repo: re3 + package: "%configuration%_%platform%" + version: "%APPVEYOR_BUILD_VERSION%" + artifact: re3 + publish: true + on: + branch: master + APPVEYOR_REPO_TAG: false + +cache: +- "%GLEW_FILE%" +- "%GLFW_FILE%" diff --git a/README.md b/README.md index 11bfe6fc..c162addf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # re3 [![Build status](https://ci.appveyor.com/api/projects/status/hyiwgegks122h8jg?svg=true)](https://ci.appveyor.com/project/aap/re3/branch/master) - - + + + + ## Intro From 8ec481527eac47ade42aed8c018c63366557ef3d Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 1 May 2020 23:09:55 +0200 Subject: [PATCH 2/6] Refactor badges --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c162addf..2affcc96 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # re3 [![Build status](https://ci.appveyor.com/api/projects/status/hyiwgegks122h8jg?svg=true)](https://ci.appveyor.com/project/aap/re3/branch/master) - - - - +| Platform | Debug | Release | +|------------------|-------------|-------------| +| Windows Direct3D9 | [![Download](https://api.bintray.com/packages/gtamodding/re3/Debug_win-x86-librw_d3d9-mss/images/download.svg)](https://bintray.com/gtamodding/re3/Debug_win-x86-librw_d3d9-mss/_latestVersion) | [![Download](https://api.bintray.com/packages/gtamodding/re3/Release_win-x86-librw_d3d9-mss/images/download.svg)](https://bintray.com/gtamodding/re3/Release_win-x86-librw_d3d9-mss/_latestVersion) | +| Windows OpenGL3.3 | [![Download](https://api.bintray.com/packages/gtamodding/re3/Debug_win-x86-librw_gl3_glfw-mss/images/download.svg)](https://bintray.com/gtamodding/re3/Debug_win-x86-librw_gl3_glfw-mss/_latestVersion) | [![Download](https://api.bintray.com/packages/gtamodding/re3/Release_win-x86-librw_gl3_glfw-mss/images/download.svg)](https://bintray.com/gtamodding/re3/Release_win-x86-librw_gl3_glfw-mss/_latestVersion) | ## Intro From d7e3aff8bf54e9cb6dfa7c4070adfa752d616a89 Mon Sep 17 00:00:00 2001 From: shfil Date: Fri, 1 May 2020 23:57:25 +0200 Subject: [PATCH 3/6] Try to fix deployment --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index ed06b30a..05692b52 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ deploy: username: shfil119 api_key: secure: gDoU7c1rRjVVQsYNjsXrQX2PBM3GgF7Ky9Qn1RFN+HL4yZ1XE1RBYZoRNxr/PWJc - subject: shfil119 + subject: gtamodding repo: re3 package: "%configuration%_%platform%" version: "%APPVEYOR_BUILD_VERSION%" From 4246feabac3bed090dbe1f7617e19762d4f643a2 Mon Sep 17 00:00:00 2001 From: shfil Date: Sat, 2 May 2020 00:30:18 +0200 Subject: [PATCH 4/6] Fix api key --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 05692b52..049647a7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,7 +38,7 @@ deploy: - provider: BinTray username: shfil119 api_key: - secure: gDoU7c1rRjVVQsYNjsXrQX2PBM3GgF7Ky9Qn1RFN+HL4yZ1XE1RBYZoRNxr/PWJc + secure: xWnYDfNWM87iPoBFbz6L1XAduxijJRWSpQLhMDOjznmzbMCsORtdx2tmWmFLTwf6 subject: gtamodding repo: re3 package: "%configuration%_%platform%" From 226d0296ad66b2a2e5919e9305eaa24fa637ce4e Mon Sep 17 00:00:00 2001 From: shfil Date: Sat, 2 May 2020 00:39:48 +0200 Subject: [PATCH 5/6] Create unique names for artifacs --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 049647a7..20adee80 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -30,9 +30,9 @@ build: project: build/re3.sln verbosity: minimal after_build: -- 7z a "re3_%APPVEYOR_BUILD_VERSION%.zip" bin/%PLATFORM%/%CONFIGURATION%/re3.exe bin/%PLATFORM%/%CONFIGURATION%/re3.pdb +- 7z a "re3_%configuration%_%platform%_%APPVEYOR_BUILD_VERSION%.zip" bin/%PLATFORM%/%CONFIGURATION%/re3.exe bin/%PLATFORM%/%CONFIGURATION%/re3.pdb artifacts: -- path: "re3_%APPVEYOR_BUILD_VERSION%.zip" +- path: "re3_%configuration%_%platform%_%APPVEYOR_BUILD_VERSION%.zip" name: re3 deploy: - provider: BinTray From 339365806a80802d237f535807652ad496f488b3 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 2 May 2020 10:08:58 +0200 Subject: [PATCH 6/6] update librw (vsynch) --- librw | 2 +- src/core/re3.cpp | 4 ++++ src/fakerw/fake.cpp | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/librw b/librw index dfedaee3..b3ad490d 160000 --- a/librw +++ b/librw @@ -1 +1 @@ -Subproject commit dfedaee353ccbf4dcfcfd3eb4024e0dd8e9b4b69 +Subproject commit b3ad490d1be3c1f41b416d3ceeaff3453bd2d28d diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 7bb18688..5ef3c036 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -26,6 +26,7 @@ #include "PlayerPed.h" #include "Radar.h" #include "debugmenu.h" +#include "Frontend.h" #include @@ -325,6 +326,9 @@ DebugMenuPopulate(void) #ifdef LIBRW DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil); #endif + DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil); + DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil); + DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil); DebugMenuAddVarBool8("Debug", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil); DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil); diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index d2547815..9cee41c7 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -126,8 +126,8 @@ rwFrameList *rwFrameListStreamRead(RwStream *stream, rwFrameList *fl) { return f RwCamera *RwCameraBeginUpdate(RwCamera * camera) { camera->beginUpdate(); return camera; } RwCamera *RwCameraEndUpdate(RwCamera * camera) { camera->endUpdate(); return camera; } RwCamera *RwCameraClear(RwCamera * camera, RwRGBA * colour, RwInt32 clearMode) { camera->clear(colour, clearMode); return camera; } -// WARNING: ignored arguments -RwCamera *RwCameraShowRaster(RwCamera * camera, void *pDev, RwUInt32 flags) { camera->showRaster(); return camera; } +// WARNING: ignored argument +RwCamera *RwCameraShowRaster(RwCamera * camera, void *pDev, RwUInt32 flags) { camera->showRaster(flags); return camera; } RwBool RwCameraDestroy(RwCamera * camera) { camera->destroy(); return true; } RwCamera *RwCameraCreate(void) { return rw::Camera::create(); } RwCamera *RwCameraClone(RwCamera * camera) { return camera->clone(); }