From 242f584567e4bcdb623b35ab078e95761548b2e4 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 13 Apr 2022 11:39:17 +0100 Subject: [PATCH] Some small tweaks including ensuring the HUD 3D icons are drawn by defualt --- android/app/src/main/cpp/code/cgame/cg_view.c | 6 ++++++ android/app/src/main/cpp/code/q3_ui/ui_menu.c | 8 ++++---- android/app/src/main/cpp/code/renderergles3/tr_glsl.c | 4 ++++ .../src/main/java/com/drbeef/ioq3quest/MainActivity.java | 3 +++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/cpp/code/cgame/cg_view.c b/android/app/src/main/cpp/code/cgame/cg_view.c index ac9cdd21..63e3b22c 100644 --- a/android/app/src/main/cpp/code/cgame/cg_view.c +++ b/android/app/src/main/cpp/code/cgame/cg_view.c @@ -768,6 +768,12 @@ static int CG_CalcViewValues( ) { CG_LaserSight(weaponorigin, trace.endpos, colour, 1.0f); } + if (cg.predictedPlayerState.pm_flags == PM_SPECTATOR) + { + //If spectating, just take the weapon angles directly + VectorCopy(weaponangles, vr->calculated_weaponangles); + } + else { VectorSubtract(trace.endpos, cg.refdef.vieworg, dir); vectoangles(dir, vr->calculated_weaponangles); diff --git a/android/app/src/main/cpp/code/q3_ui/ui_menu.c b/android/app/src/main/cpp/code/q3_ui/ui_menu.c index 5ebbc150..6c7a05c4 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_menu.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_menu.c @@ -228,18 +228,18 @@ static void Main_MenuDraw( void ) { int yPos = 410; if (uis.demoversion) { - UI_DrawProportionalString( 320, 372, "DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO", UI_CENTER|UI_SMALLFONT, color ); + UI_DrawProportionalString( 320, 372, "Demo: Play the 1st tier of SP or MP on our demo servers. Install full game for more!", UI_CENTER|UI_SMALLFONT, color ); UI_DrawString( 320, yPos, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color ); } else { UI_DrawString( 320, yPos, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color ); } yPos += SMALLCHAR_HEIGHT; - UI_DrawString( 320, yPos, "Quake3Quest " Q3QVERSION " - Visit quake3.quakevr.com for discord invite.", UI_CENTER|UI_SMALLFONT, color ); + UI_DrawString( 320, yPos, "Quake3Quest " Q3QVERSION " - Visit quake3.quakevr.com for discord invite.", UI_CENTER|UI_SMALLFONT, color_white ); yPos += SMALLCHAR_HEIGHT; - UI_DrawString( 320, yPos, "Join our discord for news, leaderboards and community!", UI_CENTER|UI_SMALLFONT, color ); + UI_DrawString( 320, yPos, "Join our discord for news, leaderboards and community!", UI_CENTER|UI_SMALLFONT, color_white ); yPos += SMALLCHAR_HEIGHT; - UI_DrawString( 320, yPos, "Get mods & mappacks via the companion app!", UI_CENTER|UI_SMALLFONT, color ); + UI_DrawString( 320, yPos, "Get mods & mappacks via the companion app!", UI_CENTER|UI_SMALLFONT, color_white ); } diff --git a/android/app/src/main/cpp/code/renderergles3/tr_glsl.c b/android/app/src/main/cpp/code/renderergles3/tr_glsl.c index 1906d4cf..8a368268 100644 --- a/android/app/src/main/cpp/code/renderergles3/tr_glsl.c +++ b/android/app/src/main/cpp/code/renderergles3/tr_glsl.c @@ -1510,6 +1510,10 @@ void GLSL_ShutdownGPUShaders(void) for ( i = 0; i < 4; i++) GLSL_DeleteGPUShader(&tr.depthBlurShader[i]); + + //Clean up buffers + qglDeleteBuffers(PROJECTION_COUNT, viewMatricesBuffer); + qglDeleteBuffers(PROJECTION_COUNT, projectionMatricesBuffer); } diff --git a/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java b/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java index 3ed36d50..d891f2dc 100644 --- a/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java +++ b/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java @@ -105,6 +105,9 @@ public class MainActivity extends SDLActivity // implements KeyEvent.Callback copy_asset("/sdcard/ioquake3Quest/baseq3", "pak66.pk3", true); copy_asset("/sdcard/ioquake3Quest/missionpack", "pakQ3Q.pk3", true); + //Copy omarlego's background image pak + copy_asset("/sdcard/ioquake3Quest/baseq3", "pak66.pk3", false); + //If open arena is installed then copy necessary stuff if (new File("/sdcard/ioquake3Quest/baseoa").exists()) { copy_asset("/sdcard/ioquake3Quest/baseoa", "autoexec_oa.cfg", "autoexec.cfg", false);