From 55c4be043dff48e8b2845942e558cde87f4cce9b Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 24 Mar 2022 16:12:20 +0100 Subject: [PATCH 01/14] Redundant SDL call removed --- android/app/src/main/cpp/code/sdl/sdl_glimp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/cpp/code/sdl/sdl_glimp.c b/android/app/src/main/cpp/code/sdl/sdl_glimp.c index a78efbaf..3cf74ffd 100644 --- a/android/app/src/main/cpp/code/sdl/sdl_glimp.c +++ b/android/app/src/main/cpp/code/sdl/sdl_glimp.c @@ -1105,10 +1105,10 @@ Responsible for doing a swapbuffers */ void GLimp_EndFrame( void ) { - // don't flip if drawing to front buffer + //swap window is implemented in VR API, no need to do it here if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 ) { - SDL_GL_SwapWindow( SDL_window ); + //SDL_GL_SwapWindow( SDL_window ); } if( r_fullscreen->modified ) From ad5ea81eeb5933c973d1f8323208eaf55aea09f1 Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 24 Mar 2022 16:39:03 +0100 Subject: [PATCH 02/14] Replace LOD computation to better fit VR needs --- android/app/src/main/cpp/code/renderergl2/tr_mesh.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/app/src/main/cpp/code/renderergl2/tr_mesh.c b/android/app/src/main/cpp/code/renderergl2/tr_mesh.c index 160be73d..7ae71f3c 100644 --- a/android/app/src/main/cpp/code/renderergl2/tr_mesh.c +++ b/android/app/src/main/cpp/code/renderergl2/tr_mesh.c @@ -164,6 +164,17 @@ R_ComputeLOD ================= */ int R_ComputeLOD( trRefEntity_t *ent ) { + + //HACK: force specific LOD (for VR it fits better) + if (1) + { + //high -> 0, medium -> 2, low -> 4 + int lod = r_lodbias->integer + r_lodbias->integer; + if (lod >= tr.currentModel->numLods) + lod = tr.currentModel->numLods - 1; + return lod; + } + float radius; float flod, lodscale; float projectedRadius; From 0a22991ff3fd36b65bd0bd4950ccd2d5d189f764 Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 24 Mar 2022 16:39:26 +0100 Subject: [PATCH 03/14] Modify the low geometry detail settings --- android/app/src/main/cpp/code/q3_ui/ui_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/cpp/code/q3_ui/ui_video.c b/android/app/src/main/cpp/code/q3_ui/ui_video.c index 5091782e..f2deb4fe 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_video.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_video.c @@ -741,8 +741,8 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) } else { - trap_Cvar_SetValue( "r_lodBias", 1 ); - trap_Cvar_SetValue( "r_subdivisions", 20 ); + trap_Cvar_SetValue( "r_lodBias", 2 ); + trap_Cvar_SetValue( "r_subdivisions", 80 ); } if ( s_graphicsoptions.filter.curvalue ) From 95951c27f9ba8fba1cb02a6a47fbfebdb795435d Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Thu, 24 Mar 2022 17:59:42 +0100 Subject: [PATCH 04/14] Fix team arena cursor; prevent crashes caused by invalid pointer when switching to TA and back --- .../app/src/main/cpp/code/q3_ui/ui_atoms.c | 3 --- android/app/src/main/cpp/code/q3_ui/ui_main.c | 10 +++++--- android/app/src/main/cpp/code/ui/ui_main.c | 24 ++++++++++--------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/android/app/src/main/cpp/code/q3_ui/ui_atoms.c b/android/app/src/main/cpp/code/q3_ui/ui_atoms.c index 9d634484..18f98b1a 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_atoms.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_atoms.c @@ -933,9 +933,6 @@ void UI_MouseEvent( int dx, int dy ) else if (uis.cursory > SCREEN_HEIGHT+16) uis.cursory = SCREEN_HEIGHT+16; - vr->menuCursorX = &uis.cursorx; - vr->menuCursorY = &uis.cursory; - // region test the active menu items for (i=0; initems; i++) { diff --git a/android/app/src/main/cpp/code/q3_ui/ui_main.c b/android/app/src/main/cpp/code/q3_ui/ui_main.c index d1726307..15244664 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_main.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_main.c @@ -50,13 +50,17 @@ Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, i case UI_INIT: { int ptr[2] = {arg1, arg2}; vr = (vr_clientinfo_t *) (*(long *) (ptr)); - UI_Init(); + vr->menuCursorX = &uis.cursorx; + vr->menuCursorY = &uis.cursory; } return 0; - case UI_SHUTDOWN: - UI_Shutdown(); + case UI_SHUTDOWN: { + vr->menuCursorX = NULL; + vr->menuCursorY = NULL; + UI_Shutdown(); + } return 0; case UI_KEY_EVENT: diff --git a/android/app/src/main/cpp/code/ui/ui_main.c b/android/app/src/main/cpp/code/ui/ui_main.c index 75d3d065..ff8edb7a 100644 --- a/android/app/src/main/cpp/code/ui/ui_main.c +++ b/android/app/src/main/cpp/code/ui/ui_main.c @@ -163,15 +163,20 @@ Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, i return UI_API_VERSION; case UI_INIT: { - int ptr[2] = {arg1, arg2}; - vr = (vr_clientinfo_t *) (*(long *) (ptr)); - _UI_Init(arg0); - } - return 0; + int ptr[2] = {arg1, arg2}; + vr = (vr_clientinfo_t *) (*(long *) (ptr)); + _UI_Init(arg0); + vr->menuCursorX = &uiInfo.uiDC.cursorx; + vr->menuCursorY = &uiInfo.uiDC.cursory; + } + return 0; - case UI_SHUTDOWN: - _UI_Shutdown(); - return 0; + case UI_SHUTDOWN: { + vr->menuCursorX = NULL; + vr->menuCursorY = NULL; + _UI_Shutdown(); + } + return 0; case UI_KEY_EVENT: _UI_KeyEvent( arg0, arg1 ); @@ -5272,9 +5277,6 @@ void _UI_MouseEvent( int dx, int dy ) else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT+16) uiInfo.uiDC.cursory = SCREEN_HEIGHT+16; - vr->menuCursorX = &uiInfo.uiDC.cursorx; - vr->menuCursorY = &uiInfo.uiDC.cursory; - if (Menu_Count() > 0) { //menuDef_t *menu = Menu_GetFocused(); //Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory); From 0c52a61cf69361be434a711f636ebcbfcd60c5c8 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 24 Mar 2022 18:51:43 +0000 Subject: [PATCH 05/14] Revert "Speedup VBO" This reverts commit 22890e13a6cf2ad68faf596290ecd4ef5ad4d4bc. --- .../src/main/cpp/code/renderergl2/tr_vbo.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/android/app/src/main/cpp/code/renderergl2/tr_vbo.c b/android/app/src/main/cpp/code/renderergl2/tr_vbo.c index 97433e2a..df64f8bc 100644 --- a/android/app/src/main/cpp/code/renderergl2/tr_vbo.c +++ b/android/app/src/main/cpp/code/renderergl2/tr_vbo.c @@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // tr_vbo.c #include "tr_local.h" -//#define GL_BUFFER_RECYCLING - void R_VaoPackTangent(int16_t *out, vec4_t v) { @@ -393,17 +391,18 @@ void R_BindNullVao(void) if(glState.currentVao) { -#ifdef GL_BUFFER_RECYCLING if (glRefConfig.vertexArrayObject) { qglBindVertexArray(0); + + // why you no save GL_ELEMENT_ARRAY_BUFFER binding, Intel? + if (1) qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } else { qglBindBuffer(GL_ARRAY_BUFFER, 0); qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } -#endif glState.currentVao = NULL; } @@ -606,6 +605,9 @@ void RB_UpdateTessVao(unsigned int attribBits) R_BindVao(tess.vao); + // orphan old vertex buffer so we don't stall on it + qglBufferData(GL_ARRAY_BUFFER, tess.vao->vertexesSize, NULL, GL_DYNAMIC_DRAW); + // if nothing to set, set everything if(!(attribBits & ATTR_BITS)) attribBits = ATTR_BITS; @@ -651,8 +653,10 @@ void RB_UpdateTessVao(unsigned int attribBits) } } -#define VAOCACHE_QUEUE_MAX_SURFACES MAX_POLYS -#define VAOCACHE_QUEUE_MAX_VERTEXES MAX_POLYVERTS +// FIXME: This sets a limit of 65536 verts/262144 indexes per static surface +// This is higher than the old vq3 limits but is worth noting +#define VAOCACHE_QUEUE_MAX_SURFACES (1 << 10) +#define VAOCACHE_QUEUE_MAX_VERTEXES (1 << 16) #define VAOCACHE_QUEUE_MAX_INDEXES (VAOCACHE_QUEUE_MAX_VERTEXES * 4) typedef struct queuedSurface_s @@ -929,19 +933,15 @@ void VaoCache_CheckAdd(qboolean *endSurface, qboolean *recycleVertexBuffer, qboo void VaoCache_RecycleVertexBuffer(void) { -#ifdef GL_BUFFER_RECYCLING qglBindBuffer(GL_ARRAY_BUFFER, vc.vao->vertexesVBO); qglBufferData(GL_ARRAY_BUFFER, vc.vao->vertexesSize, NULL, GL_DYNAMIC_DRAW); -#endif vc.vertexOffset = 0; } void VaoCache_RecycleIndexBuffer(void) { -#ifdef GL_BUFFER_RECYCLING qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vc.vao->indexesIBO); qglBufferData(GL_ELEMENT_ARRAY_BUFFER, vc.vao->indexesSize, NULL, GL_DYNAMIC_DRAW); -#endif vc.indexOffset = 0; vc.numSurfaces = 0; vc.numBatches = 0; From 364c4d66feb0126813fe7dc365dd6d6a793407c6 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Thu, 24 Mar 2022 22:13:59 +0100 Subject: [PATCH 06/14] Add note about editing player name; add body scale to team arena menus --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 317959 -> 321932 bytes .../src/main/cpp/code/q3_ui/ui_playermodel.c | 4 +- .../main/cpp/code/q3_ui/ui_playersettings.c | 48 +- .../app/src/main/pakQ3Q/ui/ingame_player.menu | 295 ++++++++ android/app/src/main/pakQ3Q/ui/player.menu | 644 ++++++++++++++++++ 5 files changed, 968 insertions(+), 23 deletions(-) create mode 100644 android/app/src/main/pakQ3Q/ui/ingame_player.menu create mode 100644 android/app/src/main/pakQ3Q/ui/player.menu diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index c48b7ec790ad25ce822a2c0e65534072865cf67c..a4e0684cb0718f80e4bc2f12119098007b6f5ac2 100644 GIT binary patch delta 4014 zcmZXXWmFUl+JhA*6EyB!mh(}O_!hkR=7Zt6{te1=CC{=*tKoV<@p$r)3@fr{cU6PEAkncW)b~9>+EDv?SC-~X} zp&jH)bC_xe6C;}YW2^-W9VuG=nx=K&oov-)!o|UA_s!kiO1iK+!Z|71j8;bOv)GO~ zN&dkj`QCJ49HqnbAVPeC%Q767_t78a1JN59Li9U*AmQWvAmY+%`8QV~=*Vn5%kqNc z_9q#aE)vh)W`9oho#@Pqu%>#}!y11Y44rt^)`j02w)2vLY+9s? zkFCZ0M?x32;G_8Hnh98;R;!-T1mWqJ5%wX7Ve4t!X#6DKyH zr>dlA#or#IlkQZa#)l)r{DJTP%7YGEXU~*4f%=m!Jw^{qGu~*-7Uc$;$jm>JdaLa7 z_%9L4`hTF7Q=p*cU_6eIQzdoU;Fg-=(zb8S9~! z>y?VG`D67CT5F)SjA{aQp5D(_Ti^bweF{W87huixT&F<)CZpY6RTebYO??Y}u0s2) zV>>kpDbuVO2y07YLyfM=lIfCq7m4Io7A{S6KNR_J(H^NO#wEJB96$TX)Rv24KQ{S8 z;m`C4#cFAI*Fh*)`?*UpX9$o?QnQ@0&2|R+xXo+Q9w@%)SVJso`3`d z@APVj?n2>A?ae#&eGs*l!KD*acmQ@2N#A~q8y9H)bX-I&TQFZ|@li+T(Rl0%d!6fo zV&Uk!VsyOxw0I;#zR5-_b* zjdm$>0(rX|2JZ8%3FM*bmf_5;^cd42c)DJ4FGnAI-+=+vI@1 zYyKDDS!wG$P;LoU;Am;|D2!1SzfcS+$ zi$?}UjpF7B<{+{nT0i5tJ76G+r7y|h9ojTb#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DrawString( 320, 460, "To change player name use the companion app.", UI_CENTER|UI_SMALLFONT, text_color_normal ); } /* @@ -606,7 +608,7 @@ static void PlayerModel_MenuInit( void ) s_playermodel.playername.generic.type = MTYPE_PTEXT; s_playermodel.playername.generic.flags = QMF_CENTER_JUSTIFY|QMF_INACTIVE; s_playermodel.playername.generic.x = 320; - s_playermodel.playername.generic.y = 440; + s_playermodel.playername.generic.y = 430; s_playermodel.playername.string = playername; s_playermodel.playername.style = UI_CENTER; s_playermodel.playername.color = text_color_normal; diff --git a/android/app/src/main/cpp/code/q3_ui/ui_playersettings.c b/android/app/src/main/cpp/code/q3_ui/ui_playersettings.c index 35c31f7b..b2e9eca5 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_playersettings.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_playersettings.c @@ -108,7 +108,7 @@ PlayerSettings_DrawName */ static void PlayerSettings_DrawName( void *self ) { menufield_s *f; - qboolean focus; + //qboolean focus; int style; char *txt; char c; @@ -120,14 +120,14 @@ static void PlayerSettings_DrawName( void *self ) { f = (menufield_s*)self; basex = f->generic.x; y = f->generic.y; - focus = (f->generic.parent->cursor == f->generic.menuPosition); + //focus = (f->generic.parent->cursor == f->generic.menuPosition); style = UI_LEFT|UI_SMALLFONT; color = text_color_normal; - if( focus ) { - style |= UI_PULSE; - color = text_color_highlight; - } + //if( focus ) { + // style |= UI_PULSE; + // color = text_color_highlight; + //} UI_DrawProportionalString( basex, y, "Name", style, color ); @@ -138,7 +138,8 @@ static void PlayerSettings_DrawName( void *self ) { color = g_color_table[ColorIndex(COLOR_WHITE)]; x = basex; while ( (c = *txt) != 0 ) { - if ( !focus && Q_IsColorString( txt ) ) { + //if ( !focus && Q_IsColorString( txt ) ) { + if ( Q_IsColorString( txt ) ) { n = ColorIndex( *(txt+1) ); if( n == 0 ) { n = 7; @@ -153,23 +154,24 @@ static void PlayerSettings_DrawName( void *self ) { } // draw cursor if we have focus - if( focus ) { - if ( trap_Key_GetOverstrikeMode() ) { - c = 11; - } else { - c = 10; - } - - style &= ~UI_PULSE; - style |= UI_BLINK; - - UI_DrawChar( basex + f->field.cursor * SMALLCHAR_WIDTH, y, c, style, color_white ); - } + //if( focus ) { + // if ( trap_Key_GetOverstrikeMode() ) { + // c = 11; + // } else { + // c = 10; + // } + // + // style &= ~UI_PULSE; + // style |= UI_BLINK; + // + // UI_DrawChar( basex + f->field.cursor * SMALLCHAR_WIDTH, y, c, style, color_white ); + //} // draw at bottom also using proportional font Q_strncpyz( name, f->field.buffer, sizeof(name) ); Q_CleanStr( name ); - UI_DrawProportionalString( 320, 440, name, UI_CENTER|UI_BIGFONT, text_color_normal ); + UI_DrawProportionalString( 320, 430, name, UI_CENTER|UI_BIGFONT, text_color_normal ); + UI_DrawString( 320, 460, "To change player name use the companion app.", UI_CENTER|UI_SMALLFONT, text_color_normal ); } @@ -397,8 +399,10 @@ static void PlayerSettings_MenuInit( void ) { s_playersettings.framer.height = 334; y = 112; - s_playersettings.name.generic.type = MTYPE_FIELD; - s_playersettings.name.generic.flags = QMF_NODEFAULTINIT; + //s_playersettings.name.generic.type = MTYPE_FIELD; + //s_playersettings.name.generic.flags = QMF_NODEFAULTINIT; + s_playersettings.name.generic.type = MTYPE_BTEXT; + s_playersettings.name.generic.flags = QMF_INACTIVE; s_playersettings.name.generic.ownerdraw = PlayerSettings_DrawName; s_playersettings.name.field.widthInChars = MAX_NAMELENGTH; s_playersettings.name.field.maxchars = MAX_NAMELENGTH; diff --git a/android/app/src/main/pakQ3Q/ui/ingame_player.menu b/android/app/src/main/pakQ3Q/ui/ingame_player.menu new file mode 100644 index 00000000..7dcaa55d --- /dev/null +++ b/android/app/src/main/pakQ3Q/ui/ingame_player.menu @@ -0,0 +1,295 @@ +#include "ui/menudef.h" + +{ +\\ SETUP MENU \\ + +menuDef { + name "ingame_player" + visible 0 + fullscreen 0 + outOfBoundsClick // this closes the window if it gets a click out of the rectangle + rect 125 30 290 170 + focusColor 1 .75 0 1 + style 1 + border 1 + onOpen { uiScript update "ui_GetName" } + onClose { uiScript update "ui_SetName" } + + +itemDef { + name window + rect 10 15 270 155 + style 1 + backcolor 0 .1 0 1 + visible 1 + decoration + } + + +// FRAME // + + +itemDef { + name window + rect 0 10 64 64 + style 3 + background "ui/assets/ingameleftcorner.tga" + visible 1 + decoration + } +itemDef { + name window + rect 64 10 64 8 + style 3 + background "ui/assets/ingametop.tga" + visible 1 + decoration + } +itemDef { + name window + rect 168 10 64 8 + style 3 + background "ui/assets/ingametop.tga" + visible 1 + decoration + } +itemDef { + name window + rect 226 10 64 64 + style 3 + background "ui/assets/ingamerightcorner.tga" + visible 1 + decoration + } +itemDef { + name window + rect 104 0 64 16 + style 3 + background "ui/assets/ingameconnection.tga" + visible 1 + decoration + } +itemDef { + name window + rect 0 108 64 64 + style 3 + background "ui/assets/ingameleftcornerb.tga" + visible 1 + decoration + } +itemDef { + name window + rect 226 108 64 64 + style 3 + background "ui/assets/ingamerightcornerb.tga" + visible 1 + decoration + } + +itemDef { + name window + rect 0 64 16 64 + style 3 + background "ui/assets/ingameleft.tga" + visible 1 + decoration + } + +itemDef { + name window + rect 274 64 16 64 + style 3 + background "ui/assets/ingameright.tga" + visible 1 + decoration + } + + + +itemDef { + name window + rect 64 164 64 8 + style 3 + background "ui/assets/ingamebottom.tga" + visible 1 + decoration + } +itemDef { + name window + rect 128 164 98 8 + style 3 + background "ui/assets/ingamebottom.tga" + visible 1 + decoration + } + + + +itemDef { + name namefield + group "playersettinggroup" + type ITEM_TYPE_EDITFIELD + style 0 + text "Name:" + cvar "ui_Name" + maxchars 26 + rect 20 10 256 20 + textalign ITEM_ALIGN_LEFT + textalignx 10 + textaligny 18 + textscale .23 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 +} + + +itemDef { + name other + group "playersettinggroup" + style 1 + text "To change player name use the companion app." + rect 20 20 215 32 + textalign ITEM_ALIGN_LEFT + textalignx 10 + textaligny 21 + textscale .2 + forecolor .4 .4 .65 1 + visible 1 + decoration +} + +itemDef { + name handicapfield + group "playersettinggroup" + style 0 + text "Handicap:" + ownerdraw UI_HANDICAP + rect 20 40 256 20 + textalign ITEM_ALIGN_LEFT + textalignx 10 + textaligny 18 + textscale .23 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 + } + +itemDef { + name effectentry + group "playersettinggroup" + text "Effect:" + type 1 + style 0 + rect 20 58 256 20 + textalign ITEM_ALIGN_LEFT + textalignx 10 + textaligny 18 + textscale .23 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 + decoration + mouseEnterText { setitemcolor effectentry forecolor 1 .75 0 1 ; setfocus effectfield ; show message_effect } + mouseExitText { setitemcolor playersettinggroup forecolor 1 1 1 1 ; hide message_effect } + } + +itemDef { + name effectfield + group "playersettinggroup" + style 0 + ownerdraw UI_EFFECTS + rect 20 58 256 20 + textalign ITEM_ALIGN_LEFT + textalignx 50 + textaligny 25 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 + } + +itemDef { + name effectfield + group "playersettinggroup" + type ITEM_TYPE_SLIDER + text "1st-Person Body Scale:" + cvarfloat "cg_firstPersonBodyScale" 0.2 0 1 + rect 20 80 256 20 + textstyle 6 + textalign ITEM_ALIGN_LEFT + textalignx 10 + textaligny 16 + textscale .23 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 +} + +itemDef { + name headlist + rect 15 100 260 50 + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_FILLED + elementwidth 32 + elementheight 32 + elementtype LISTBOX_IMAGE + feeder FEEDER_HEADS + horizontalscroll + backcolor 0 0 0 1 + border 1 + bordercolor .5 .5 .5 1 + forecolor 1 1 1 1 + visible 1 + cvarTest "g_gametype" + showCvar { "3" ; "4" ; "5" ; "6" ; "7" ; "8" } + mouseenter { setitemcolor headlist bordercolor 1 0 0 1 } + mouseexit { setitemcolor headlist bordercolor .5 .5 .5 1 } + } + +itemDef { + name headlist + rect 15 100 260 50 + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_FILLED + elementwidth 32 + elementheight 32 + elementtype LISTBOX_IMAGE + feeder FEEDER_Q3HEADS + horizontalscroll + backcolor 0 0 0 1 + border 1 + bordercolor .5 .5 .5 1 + forecolor 1 1 1 1 + visible 1 + cvarTest "g_gametype" + showCvar { "0" ; "1" } + mouseenter { setitemcolor headlist bordercolor 1 0 0 1 } + mouseexit { setitemcolor headlist bordercolor .5 .5 .5 1 } + } + + + + + + + + +} + + +} diff --git a/android/app/src/main/pakQ3Q/ui/player.menu b/android/app/src/main/pakQ3Q/ui/player.menu new file mode 100644 index 00000000..8e0e8051 --- /dev/null +++ b/android/app/src/main/pakQ3Q/ui/player.menu @@ -0,0 +1,644 @@ +#include "ui/menudef.h" + +{ +\\ PLATER SELECTION MENU \\ + +menuDef { + name "player_menu" + visible 0 + fullscreen 1 + rect 0 0 640 480 + background "menuback_a" + style 1 + focusColor 1 .75 0 1 + + onOpen { play "sound/misc/kcswish.wav" ; + playlooped "music/fla_mp03.wav" ; + setitemcolor fadebox backcolor 0 0 0 1 ; + fadeout fadebox ; + uiScript update "ui_GetName" ; + transition menuback_g 0 0 640 480 195 120 255 202 20 10 ; + transition clancinematic 107 82 426 316 238 153 170 133 20 10 ; + hide back_alt ; + show back ; + hide grpmessage } + onClose { uiScript update "ui_SetName" } + onEsc { close player_menu ; open main } + + + + + + +itemDef { + name gametypebar + style 2 + rect 0 5 640 40 + textscale 0.4 + textalign 0 // center + textalignx 60 // x alignment point for text + // use it to offset left/right text from the edge + // or to center the text on a different point + textaligny 21 + style 2 + border 4 + bordercolor 0.5 0.5 0.5 0.5 + bordersize 2 + backcolor 0 0 .75 .5 + visible 1 + decoration + mouseEnter { setcolor backcolor .75 0 0 .5 } + mouseExit { setcolor backcolor 0 0 .75 .5 } +} + + +itemDef { + name arenatype + type ITEM_TYPE_MULTI + cvar "ui_q3model" + cvarFloatList { "Team Arena" 0 "Quake III" 1 } + text "Model Type:" + textstyle 6 + rect 0 10 320 31 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 26 + textscale .35 + forecolor 1 1 1 1 + visible 1 + mouseEnter { show message_type } + mouseExit { hide message_type } + action { play "sound/misc/kcaction.wav" } + } + +itemDef { + name quakeimage + style WINDOW_STYLE_SHADER + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + background "ui/assets/playerpatriot.tga" + rect 60 24 128 256 + forecolor .25 .25 .25 1 + decoration + } + +itemDef { + name quakeimage + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + style WINDOW_STYLE_SHADER + background "ui/assets/playerpi.tga" + rect 100 24 128 256 + visible 1 + decoration + } +itemDef { + name quakeimage + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + style WINDOW_STYLE_SHADER + background "ui/assets/playerklesk.tga" + rect 440 24 128 256 + forecolor .5 .5 .5 1 + visible 1 + decoration + } + + +itemDef { + name quakeimage + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + style WINDOW_STYLE_SHADER + background "ui/assets/playerbiker.tga" + rect 384 24 128 256 + visible 1 + decoration + } + + + +itemDef { + name clanlogo1 + style WINDOW_STYLE_SHADER + group grparenatype + cvarTest "ui_q3model" + showCVar { "0" } + background "ui/assets/pagans.tga" + rect 0 150 128 128 + forecolor .5 .5 .5 .25 + visible 1 + decoration + } + +itemDef { + name clanlogo1 + group grparenatype + cvarTest "ui_q3model" + showCVar { "0" } + style WINDOW_STYLE_SHADER + background "ui/assets/crusaders.tga" + rect 128 150 128 128 + forecolor .5 .5 .5 .25 + visible 1 + decoration + } + + +itemDef { + name clanlogo1 + group grparenatype + cvarTest "ui_q3model" + showCVar { "0" } + style WINDOW_STYLE_SHADER + background "ui/assets/stroggs.tga" + rect 384 150 128 128 + forecolor .5 .5 .5 .25 + visible 1 + decoration + } + + +itemDef { + name clanlogo1 + group grparenatype + cvarTest "ui_q3model" + showCVar { "0" } + style WINDOW_STYLE_SHADER + background "ui/assets/intruders.tga" + rect 512 150 128 128 + forecolor .5 .5 .5 .25 + visible 1 + decoration + } + +itemDef { + name window + style WINDOW_STYLE_FILLED + rect 238 153 170 133 + forecolor 0 0 0 1 + backcolor 0 0 0 1 + visible 1 + decoration + } + + + +itemDef { + name playerbar + style 2 + rect 0 130 640 170 + backcolor 0 0 .75 0 + forecolor 1 1 1 1 + border 4 + bordercolor 0.5 0.5 0.5 .75 + bordersize 2 + visible 1 + decoration + } + +itemDef { + name window + rect 10 50 620 60 + style WINDOW_STYLE_EMPTY + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 0 + visible 1 + decoration + } + +itemDef { + name window + rect 10 112 205 216 + style WINDOW_STYLE_EMPTY + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 0 + visible 1 + decoration + } +itemDef { + name window + rect 217 112 205 216 + style WINDOW_STYLE_EMPTY + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 0 + visible 1 + decoration + } + +itemDef { + name window + rect 424 112 206 216 + style WINDOW_STYLE_EMPTY + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 0 + visible 1 + decoration + } + +itemDef { + name modelselection + ownerdraw UI_PLAYERMODEL + rect 424 80 260 260 + style 1 + decoration + visible 1 + } + +itemDef { + name namefield + group "playersettinggroup" + type ITEM_TYPE_EDITFIELD + style 0 + text "Name:" + cvar "ui_Name" + textstyle 6 + maxChars 32 + rect 0 60 215 32 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 21 + textscale .333 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 +// mouseEnter { show message_name } +// mouseExit { hide message_name } + } + +itemDef { + name other + group grpSystem + style 1 + text "To change player name use the companion app." + rect 0 80 215 32 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 21 + textscale .25 + forecolor .4 .4 .65 1 + visible 1 + decoration +} + +itemDef { + name handicapfield + group "playersettinggroup" + style 0 + text "Handicap:" + ownerdraw UI_HANDICAP + textstyle 6 + rect 0 175 215 32 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 21 + textscale .333 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 + mouseEnter { show message_handicap } + mouseExit { hide message_handicap } + } + +itemDef { + name effectfield + group "playersettinggroup" + style 0 + text "Effect:" + ownerdraw UI_EFFECTS + rect 0 205 215 32 + textstyle 6 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 21 + textscale .333 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 + mouseEnter { show message_effect } + mouseExit { hide message_effect } + } + +itemDef { + name clanfield + group grparenatype + ownerdraw UI_CLANNAME + text "Clan:" + textstyle 6 + rect 20 235 215 31 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 21 + textscale .333 + forecolor 1 1 1 1 + cvarTest "ui_q3model" + showCVar { "0" } + visible 1 + action { play "sound/misc/nomenu.wav" } + mouseEnter { show message_clan } + mouseExit { hide message_clan } + } + +itemDef { + name effectfield + group "playersettinggroup" + type ITEM_TYPE_SLIDER + text "1st-Person Body Scale:" + cvarfloat "cg_firstPersonBodyScale" 0.2 0 1 + rect 0 310 250 20 + textstyle 6 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 16 + textscale .333 + outlinecolor 1 .5 .5 .5 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + border 0 + bordercolor 0 0 0 0 + visible 1 +} + +itemDef { + name headlist + rect 10 340 620 80 + group grparenatype + cvarTest "ui_q3model" + hideCvar { "1" } + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_FILLED + elementwidth 61.75 + elementheight 61.75 + elementtype LISTBOX_IMAGE + feeder FEEDER_HEADS + horizontalscroll + border 1 + bordersize 1 + backcolor 0 0 0 .25 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + visible 1 + mouseenter { setitemcolor headlist bordercolor .7 0 0 1 ; show message_model } + mouseexit { setitemcolor headlist bordercolor .5 .5 .5 .5 ; hide message_model } + } +itemDef { + name headlist + rect 10 330 620 80 + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_FILLED + elementwidth 61.75 + elementheight 61.75 + elementtype LISTBOX_IMAGE + feeder FEEDER_Q3HEADS + horizontalscroll + border 1 + bordersize 1 + backcolor 0 0 0 .25 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + visible 1 + mouseenter { setitemcolor headlist bordercolor .7 0 0 1 ; show message_model } + mouseexit { setitemcolor headlist bordercolor .5 .5 .5 .5 ; hide message_model} + } + + + +// BACK BAR // + +itemDef { + name gotobar + style 2 + rect 0 430 640 30 + textscale 0.4 + textalign 0 // center + textalignx 60 // x alignment point for text + // use it to offset left/right text from the edge + // or to center the text on a different point + textaligny 21 + style 2 + border 4 + bordercolor 0.5 0.5 0.5 0.5 + bordersize 2 + backcolor 0 0 .75 0.5 + visible 1 + mouseEnter { setcolor backcolor .75 0 0 .5 } + mouseExit { setcolor backcolor 0 0 .75 .5 } + decoration + } + +itemDef { + name back + style 3 + background "ui/assets/backarrow.tga" + rect 16 424 50 50 + visible 1 + action { close player_menu ; open main } + mouseEnter { hide back ; show back_alt ; show message_back } + } + +itemDef { + name back_alt + style WINDOW_STYLE_SHADER + background "ui/assets/backarrow_alt.tga" + rect 14 422 54 54 + backcolor 0 0 0 0 + forecolor 1 1 1 1 + visible 0 + type ITEM_TYPE_BUTTON + mouseExit { hide back_alt ; show back ; hide message_back } + action { close player_menu ; open main } + } + +// MESSAGES // +itemDef { + name message_back + group grpmessage + style 0 + rect 320 430 128 30 + textstyle 1 + textalign 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Return to Main Menu" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name message_name + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Enter Player Name" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name message_handicap + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Click to Change Handicap" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name message_effect + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Select Bar to Change Effect Color" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name message_clan + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Click to Cycle Clan Selection" + forecolor 1 1 1 1 + decoration + visible 0 + } +itemDef { + name message_type + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Click to View Team Arena or Quake III Models" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name message_model + group grpmessage + style 0 + rect 320 430 128 30 + textalign 1 + textstyle 1 + textalignx 0 + textaligny 25 + textscale .416 + text "Click to Change Player Model" + forecolor 1 1 1 1 + decoration + visible 0 + } + +itemDef { + name clancinematic + rect 238 157 170 133 + group grparenatype + cvarTest "ui_q3model" + showCVar { "0" } + ownerdraw UI_CLANCINEMATIC + visible 1 + decoration + } +itemDef { + name clancinematic + group grpquaketype + cvarTest "ui_q3model" + showCVar { "1" } + style 3 + background "ui/assets/q3imagepage.tga" + rect 238 157 170 133 + visible 1 + decoration + } + +itemDef { + name clancinematic + style 3 + background "menuscreen" + rect 238 153 170 133 + visible 1 + decoration + } + +itemDef { + name menuback_g + style WINDOW_STYLE_SHADER + rect 195 120 255 202 + background "menuback_g" + visible 1 + decoration + } + +itemDef { + name fadebox + style WINDOW_STYLE_FILLED + background "ui/assets/fadebox.tga" + forecolor 0 0 0 1 + backcolor 0 0 0 1 + rect 0 0 640 480 + visible 1 + decoration + } + + +} + + +} + From 7be97313477d58b1ebb295f8832f84cf0a2c072d Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 25 Mar 2022 15:56:05 +0100 Subject: [PATCH 07/14] Fast math flag replacement --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5ebef3c0..76b823d2 100644 --- a/Makefile +++ b/Makefile @@ -442,8 +442,11 @@ ifeq ($(PLATFORM),android) -fno-builtin-cos -fno-builtin-sin -fPIC -DARCH_STRING=\\\"$(ARCH)\\\" CLIENT_CFLAGS += $(SDL_CFLAGS) -DSDL_DISABLE_IMMINTRIN_H -fno-builtin-cos -fno-builtin-sin + # Flag -ffast-math replacement: https://pspdfkit.com/blog/2021/understanding-fast-math/ + # Flags -ffp-contract=fast -fno-trapping-math are unused because they are causing lightmap issues + OPTIMIZEFASTMATH = -ffinite-math-only -fno-math-errno -fassociative-math -freciprocal-math -fno-signed-zeros OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer - OPTIMIZE = $(OPTIMIZEVM) + OPTIMIZE = $(OPTIMIZEVM) $(OPTIMIZEFASTMATH) HAVE_VM_COMPILED = false From 0441ba1ab068d239a4360c20a55be284d9a9e4f5 Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 29 Mar 2022 12:58:09 +0200 Subject: [PATCH 08/14] Do not crash on undefined LOD --- android/app/src/main/cpp/code/renderergl2/tr_mesh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/src/main/cpp/code/renderergl2/tr_mesh.c b/android/app/src/main/cpp/code/renderergl2/tr_mesh.c index 7ae71f3c..967199d0 100644 --- a/android/app/src/main/cpp/code/renderergl2/tr_mesh.c +++ b/android/app/src/main/cpp/code/renderergl2/tr_mesh.c @@ -172,6 +172,8 @@ int R_ComputeLOD( trRefEntity_t *ent ) { int lod = r_lodbias->integer + r_lodbias->integer; if (lod >= tr.currentModel->numLods) lod = tr.currentModel->numLods - 1; + if (lod < 0) + lod = 0; return lod; } From 8ab1439347455d8d34b2fefd5f6f2c416ade3f03 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 29 Mar 2022 18:33:10 +0200 Subject: [PATCH 09/14] Add shadow detail setting --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 321932 -> 321994 bytes .../app/src/main/cpp/code/q3_ui/ui_video.c | 54 +++++++++++++++++- .../app/src/main/pakQ3Q/ui/ingame_system.menu | 29 +++++++--- android/app/src/main/pakQ3Q/ui/system.menu | 26 +++++++-- 4 files changed, 95 insertions(+), 14 deletions(-) diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index a4e0684cb0718f80e4bc2f12119098007b6f5ac2..2bcd0fe316d8821e275e03d77e0532d9f39a19c5 100644 GIT binary patch delta 4406 zcmZXYRa6uTxP=E8a_AOmk&x~j>F(|j>4u?{7$ip-LVBdT5g1Y!N@+cm!q6oQAtBw| zbMD(+_u>1W_WEDHy*7M?YHWroDi$jiI~Jz}$WaeXOO7zH$J|)Q5C8xtLI40MfDsVn zE(m!833T=r@OJhIGBqIt;HdB_JN`#dC&NS-95&yALR~_zaE6jMW!y`&XJ~`7oG+k~$lmAdQIYh^5$c}tDEaAWt2M}! zOo`Jg5d{0f(eeoDoS%GDyvi_GNA9~tG80EAF+J+Z}nQL?o#l2AqbY4 zx``v95dUqY5dEpNgRt&UEo3vEL7U zG%C&UEi=cv9&tYg;~_;Tj6FK6Q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YDC>j$jX(T)Hr%|C%BD5stX3-mnhefh%Z!Pi88{$+O>of|{sE|}gon~fG$nx?2Y zqWDS{2b12|07sUG-SNp;_w}%Ua^IUoYNlDf*8QIu#&Q!n{OLquR-x;R~LHBV*qX@d<-x15NHxuj>eN#Fi?6zd<>?gBzU#V4<6y?kR zx#*(#Uhk2iBv~@{?Gj`Q>{AEYJ93kDIX7{>DmO6;xe2)^KGGTnE+Yx|7&q!t61Cc4 zNl0Z*HSJJ8{{c`-0|XQR000QL#=QjNDGoM{aa2Zv12JU?006l!m$&BxCzp!m1S1>! z9=4`w2LJ%KD*yl$02lxO000010001_fyb8|=mZ^?isl3(mt5!s8UcTocjyFL1Gd5h pml4AR8kg_r1V90nmoVuBQv+7f1edYV1Q?f|=>#SQY}Nz-007WBNq+zU diff --git a/android/app/src/main/cpp/code/q3_ui/ui_video.c b/android/app/src/main/cpp/code/q3_ui/ui_video.c index 5091782e..28507bd1 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_video.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_video.c @@ -251,8 +251,10 @@ GRAPHICS OPTIONS MENU #define ID_REFRESHRATE 111 #define ID_DYNAMICLIGHTS 112 #define ID_SYNCEVERYFRAME 113 +#define ID_SHADOWS 114 #define NUM_REFRESHRATE 4 +#define NUM_SHADOWS 2 typedef struct { menuframework_s menu; @@ -282,6 +284,7 @@ typedef struct { menulist_s refreshrate; menuradiobutton_s dynamiclights; menuradiobutton_s synceveryframe; + menulist_s shadows; menubitmap_s apply; menubitmap_s back; @@ -302,6 +305,7 @@ typedef struct int refreshrate; qboolean dynamiclights; qboolean synceveryframe; + int shadows; } InitialVideoOptions_s; static InitialVideoOptions_s s_ivo; @@ -493,6 +497,7 @@ static void GraphicsOptions_GetInitialVideo( void ) s_ivo.refreshrate = s_graphicsoptions.refreshrate.curvalue; s_ivo.dynamiclights = s_graphicsoptions.dynamiclights.curvalue; s_ivo.synceveryframe = s_graphicsoptions.synceveryframe.curvalue; + s_ivo.shadows = s_graphicsoptions.refreshrate.curvalue; } /* @@ -816,6 +821,20 @@ static void GraphicsOptions_Event( void* ptr, int event ) { trap_Cvar_SetValue( "r_finish", s_graphicsoptions.synceveryframe.curvalue ); break; + case ID_SHADOWS: { + int shadows; + switch (s_graphicsoptions.shadows.curvalue) { + case 0: + shadows = 1; + break; + default: + shadows = 3; + break; + } + trap_Cvar_SetValue("cg_shadows", shadows); + } + break; + case ID_LIST: ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue]; @@ -1016,6 +1035,17 @@ static void GraphicsOptions_SetMenuItems( void ) s_graphicsoptions.refreshrate.curvalue = 3; break; } + + switch ( (int) trap_Cvar_VariableValue( "cg_shadows" ) ) + { + case 1: + s_graphicsoptions.shadows.curvalue = 0; + break; + default: + s_graphicsoptions.shadows.curvalue = 1; + break; + } + s_graphicsoptions.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0; s_graphicsoptions.synceveryframe.curvalue = trap_Cvar_VariableValue( "r_finish" ) != 0; } @@ -1087,7 +1117,8 @@ void GraphicsOptions_MenuInit( void ) "On", NULL }; -*/ static const char *s_refreshrate[] = +*/ + static const char *s_refreshrate[] = { "60", "72 (Recommended)", @@ -1095,6 +1126,12 @@ void GraphicsOptions_MenuInit( void ) "90", NULL }; + static const char *s_shadows[] = + { + "Low", + "High", + NULL + }; int y; @@ -1173,7 +1210,7 @@ void GraphicsOptions_MenuInit( void ) s_graphicsoptions.network.style = UI_RIGHT; s_graphicsoptions.network.color = color_red; - y = 272 - 7 * (BIGCHAR_HEIGHT + 2); + y = 254 - 7 * (BIGCHAR_HEIGHT + 2); s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.list.generic.name = "Graphics Settings:"; s_graphicsoptions.list.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; @@ -1282,6 +1319,18 @@ void GraphicsOptions_MenuInit( void ) s_graphicsoptions.dynamiclights.generic.id = ID_DYNAMICLIGHTS; y += BIGCHAR_HEIGHT+2; + // references "cg_shadows" + s_graphicsoptions.shadows.generic.type = MTYPE_SPINCONTROL; + s_graphicsoptions.shadows.generic.name = "Shadow Detail:"; + s_graphicsoptions.shadows.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; + s_graphicsoptions.shadows.generic.x = 400; + s_graphicsoptions.shadows.generic.y = y; + s_graphicsoptions.shadows.itemnames = s_shadows; + s_graphicsoptions.shadows.generic.callback = GraphicsOptions_Event; + s_graphicsoptions.shadows.generic.id = ID_SHADOWS; + s_graphicsoptions.shadows.numitems = NUM_SHADOWS; + y += BIGCHAR_HEIGHT+2; + // references/modifies "r_lodBias" & "subdivisions" s_graphicsoptions.geometry.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.geometry.generic.name = "Geometric Detail:"; @@ -1371,6 +1420,7 @@ void GraphicsOptions_MenuInit( void ) // Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.fs ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.lighting ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.dynamiclights ); + Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.shadows ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.geometry ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.tq ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.texturebits ); diff --git a/android/app/src/main/pakQ3Q/ui/ingame_system.menu b/android/app/src/main/pakQ3Q/ui/ingame_system.menu index e7d06a76..2c9a32f3 100644 --- a/android/app/src/main/pakQ3Q/ui/ingame_system.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_system.menu @@ -208,8 +208,7 @@ itemDef { textaligny 17 textscale .25 forecolor 1 1 1 1 - visible 0 - decoration + visible 0 } itemDef { @@ -277,6 +276,22 @@ itemDef { visible 0 } + itemDef { + name graphics + group grpSystem + type ITEM_TYPE_MULTI + text "Shadow Detail:" + cvar "cg_shadows" + cvarFloatList { "Low" 1 "High" 3 } + rect 0 170 306 20 + textalign ITEM_ALIGN_RIGHT + textalignx 133 + textaligny 17 + textscale .25 + forecolor 1 1 1 1 + visible 0 + } + itemDef { name graphics group grpSystem @@ -284,7 +299,7 @@ itemDef { text "Geometric Detail:" cvar "r_lodbias" cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } - rect 0 170 256 20 + rect 0 190 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -301,7 +316,7 @@ itemDef { text "Texture Detail:" cvar "r_picmip" cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } - rect 0 190 256 20 + rect 0 210 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -318,7 +333,7 @@ itemDef { text "Texture Quality:" cvar "r_texturebits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 0 210 256 20 + rect 0 230 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -334,7 +349,7 @@ itemDef { text "Texture Filter:" cvar "r_texturemode" cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 0 230 256 20 + rect 0 250 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -350,7 +365,7 @@ itemDef { type ITEM_TYPE_YESNO text "Compress Textures:" cvar "r_ext_compressed_textures" - rect 0 250 256 20 + rect 0 270 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 diff --git a/android/app/src/main/pakQ3Q/ui/system.menu b/android/app/src/main/pakQ3Q/ui/system.menu index d3286011..caf95a59 100755 --- a/android/app/src/main/pakQ3Q/ui/system.menu +++ b/android/app/src/main/pakQ3Q/ui/system.menu @@ -179,6 +179,22 @@ itemDef { visible 1 } + itemDef { + name graphics + group grpSystem + type ITEM_TYPE_MULTI + text "Shadow Detail:" + cvar "cg_shadows" + cvarFloatList { "Low" 1 "High" 3 } + rect 99 192 256 20 + textalign ITEM_ALIGN_RIGHT + textalignx 128 + textaligny 20 + textscale .333 + forecolor 1 1 1 1 + visible 0 + } + itemDef { name graphics group grpSystem @@ -186,7 +202,7 @@ itemDef { text "Geometric Detail:" cvar "r_lodbias" cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } - rect 99 192 256 20 + rect 99 217 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -203,7 +219,7 @@ itemDef { text "Texture Detail:" cvar "r_picmip" cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } - rect 99 217 256 20 + rect 99 242 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -220,7 +236,7 @@ itemDef { text "Texture Quality:" cvar "r_texturebits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 99 244 256 20 + rect 99 267 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -236,7 +252,7 @@ itemDef { text "Texture Filter:" cvar "r_texturemode" cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 99 269 256 20 + rect 99 292 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -251,7 +267,7 @@ itemDef { type ITEM_TYPE_YESNO text "Compress Textures:" cvar "r_ext_compressed_textures" - rect 99 294 256 20 + rect 99 317 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 From 1e7279b899179a3eb97f1166224034a9ec650c80 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 29 Mar 2022 19:22:02 +0200 Subject: [PATCH 10/14] Ensure high geometry details sets proper lodbias; Unify geometry detail setting between team arena and vanilla --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 321994 -> 321996 bytes .../app/src/main/cpp/code/q3_ui/ui_video.c | 23 ++++++------------ android/app/src/main/cpp/code/ui/ui_main.c | 2 +- .../app/src/main/pakQ3Q/ui/ingame_system.menu | 2 +- android/app/src/main/pakQ3Q/ui/system.menu | 2 +- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index 2bcd0fe316d8821e275e03d77e0532d9f39a19c5..161ed9f016ada33236e32731aadc57a4159fee35 100644 GIT binary patch delta 4360 zcmV+j5%=!O(-X|o6M%#PgaU*Ev;-ur4P}{qRI&-7RfPxu0P~kItppkdtvy3xtv#1f ztppQ)ZEu^(68;RoV#N8h4>_@uT5_D;*gZ#;Dj@=E8wDE#OB~-S|NYMH z0tSp7$92*~H%(jES(e#nW}ls%;Wu|_d$B`6iQW2wEb($$n=7*XL;n69#{J3HFL2c# zeTDDeWtqu)WC}lIz#nO8E%3Q$9Z|9{nM@IX?e}iv-g*R7aXXDYFS0{Ime?YN#HOHi zTA)IsVL(G~CB1w*j?R704?%-kyNPm5NFut%!IGO>KXeFoktKh59pI2ZAR^R74Q&4G z)N;tJ{{Xj^eJ5H}{zrp9xXh1f*5?nHyEyY%7>xNGupyfJD{QcWxob!8$llVAYL0oz76~4#b7w>_v9QB;!4c6*35oo#1w~2Amx9sZwZ&0j{Q=Dq1?d- zLW{bn51WB3*Xtk&H6^KD-=33ALo)?`OqM8lprBkP_X;+w13oSjM7D)5sTn%~*f(3$ zn?1F3xTjhX!XDMdgC-N!=*&_Q44W-5x=qkj1hXaHZF%l&nJU6>9-yh_Zr7lzPasw^ z+ECNjuLcFsESmv_UJ`iL8dn5Uv%YX6yMAX2S#4$AE9f7x^t8(@{5T^0B}L0u7 zd7P@UR8&@|nyM+`k1UnfJGKaaqWDjYYmcsf=ekIOEC!SQl{xwLrEgw+9Zm-9ar@p1 z*-XrtcOFO7UnoiAh38vz=tj(=mCraoNJdnU+LVzWE-X($^_2@Nq6#uAzaZ?|03{g< z8f?`G7`j~~UeM9QbT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 z;{+TZ9g}@jrv+M-i3b1x_ACGZ6#y6j000000RR91q=Ds^9_R!e1KBb|m+|8SAeUa~ z1R4Xqy#$xsy#yJT-sS`%m$v8x9s%^1)#wCV0o0c==>$^&l$VC-1V9F=)&u|m09Gk! A^#A|> diff --git a/android/app/src/main/cpp/code/q3_ui/ui_video.c b/android/app/src/main/cpp/code/q3_ui/ui_video.c index 28507bd1..e1afd747 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_video.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_video.c @@ -736,7 +736,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) if ( s_graphicsoptions.geometry.curvalue == 2 ) { - trap_Cvar_SetValue( "r_lodBias", 0 ); + trap_Cvar_SetValue( "r_lodBias", -1 ); trap_Cvar_SetValue( "r_subdivisions", 4 ); } else if ( s_graphicsoptions.geometry.curvalue == 1 ) @@ -746,7 +746,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) } else { - trap_Cvar_SetValue( "r_lodBias", 1 ); + trap_Cvar_SetValue( "r_lodBias", 2 ); trap_Cvar_SetValue( "r_subdivisions", 20 ); } @@ -981,20 +981,13 @@ static void GraphicsOptions_SetMenuItems( void ) s_graphicsoptions.filter.curvalue = 1; } - if ( trap_Cvar_VariableValue( "r_lodBias" ) > 0 ) - { - if ( trap_Cvar_VariableValue( "r_subdivisions" ) >= 20 ) - { - s_graphicsoptions.geometry.curvalue = 0; - } - else - { - s_graphicsoptions.geometry.curvalue = 1; - } - } - else - { + int lodbias = trap_Cvar_VariableValue( "r_lodBias" ); + if (lodbias == -1) { s_graphicsoptions.geometry.curvalue = 2; + } else if (lodbias == 1) { + s_graphicsoptions.geometry.curvalue = 1; + } else { + s_graphicsoptions.geometry.curvalue = 0; } switch ( ( int ) trap_Cvar_VariableValue( "r_colorbits" ) ) diff --git a/android/app/src/main/cpp/code/ui/ui_main.c b/android/app/src/main/cpp/code/ui/ui_main.c index 75d3d065..5a304156 100644 --- a/android/app/src/main/cpp/code/ui/ui_main.c +++ b/android/app/src/main/cpp/code/ui/ui_main.c @@ -3070,7 +3070,7 @@ static void UI_Update(const char *name) { } } else if (Q_stricmp(name, "r_lodbias") == 0) { switch (val) { - case 0: + case -1: trap_Cvar_SetValue( "r_subdivisions", 4 ); break; case 1: diff --git a/android/app/src/main/pakQ3Q/ui/ingame_system.menu b/android/app/src/main/pakQ3Q/ui/ingame_system.menu index 2c9a32f3..0b07ceed 100644 --- a/android/app/src/main/pakQ3Q/ui/ingame_system.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_system.menu @@ -298,7 +298,7 @@ itemDef { type ITEM_TYPE_MULTI text "Geometric Detail:" cvar "r_lodbias" - cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } + cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } rect 0 190 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 diff --git a/android/app/src/main/pakQ3Q/ui/system.menu b/android/app/src/main/pakQ3Q/ui/system.menu index caf95a59..b6b775c0 100755 --- a/android/app/src/main/pakQ3Q/ui/system.menu +++ b/android/app/src/main/pakQ3Q/ui/system.menu @@ -201,7 +201,7 @@ itemDef { type ITEM_TYPE_MULTI text "Geometric Detail:" cvar "r_lodbias" - cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } + cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } rect 99 217 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 From 90fa0bcf42a519e5b3217a88d3f53f229b9e6b49 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 29 Mar 2022 21:52:14 +0200 Subject: [PATCH 11/14] Remove graphic presets from menu --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 321996 -> 322046 bytes .../app/src/main/cpp/code/q3_ui/ui_video.c | 585 +++++++++--------- .../app/src/main/pakQ3Q/ui/ingame_system.menu | 54 +- android/app/src/main/pakQ3Q/ui/system.menu | 54 +- 4 files changed, 348 insertions(+), 345 deletions(-) diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index 161ed9f016ada33236e32731aadc57a4159fee35..14b632f26950647bb40c37a6db0745a2edba4158 100644 GIT binary patch delta 4432 zcmV-W5wGsd(-Z#F6M%#PgaU*Ev;-urEd;H7RLX!_T$l&|01`0(01f~g0Cj0Eb9r-g zWo<5PWo~s)S zyFFE^gb1u{6l@SIar{*I-=EoCz<{yi_?%p#OVbv1mSyHQv%lS);Xm%u_F{*C61(*U zS>oliHdkc%r~KmwjQf+XU*M`g`U*dO$TE}n$P|9cfIrgGTHtfhI-+D@GMOTO+V9=S zz4ZvF;&vK)USx-aEU`rjiA_Q4v_OSM!+?g~N_zQr9G&}~AA$z8b`#~AkVJHigC#e& ze&`VFB1``AI=~@+LPV&G8rb~VspXJc{{e0-`%bi|{Er5|ahV^}tj}*SchT}$7>v0M z*bvSA6*gGG+_fWkWN+z5HonAv_WX!I&Q|Q4v=JHyX_L=XT3GH9pOs~%mcUD3wQ`q^ zzmla{=*Pk4y|*!?{xX3^1w92uk`vqi8jO0^f0^US_hH|>7z~H~o}5EMTnTGy&Foi3 zOmWBrQvL_~mT;-**e`V$${lKvT`#u0dCyK&)o8p{B844GN%HHUkW!B=D>?&IqPvec?uS{mvG$+RD0D zFg|4I>5yCaaYXt{iq8FiDWnS$Mb?aDIJ2knL7(?QF7lbKLS+peAszU^r8q8EZ}B7MZ%KsuKRNUgcST&)WoH{2AjMr0ZW5 zF@Pj!V=(DonUn8d`sUTw;bb5NvG1*rS!K?=^EjgZLdlvhJl~>2H)8Rvd`4>_8COA~ zQ$~Kcusj8gQ7){AD#)|^g0O1?lw>q$;2dNla#*@uBx2Ap;*cFu-7-4i3Z4xImm~9L zaQS(%)#Cv)y#rf+&1*55RA5EJfb=JQV4IB+LAJsIA133U*d5!U8&HS?$D*W&ldub2 zCgsCRDmqKvcGFIW$f^5o$TTF;9B%NP=)=@W_n{dI2?h>H+Y4T5sS32vIc*(2+@P%s zT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> zPu)a{HhY+VK7EkkiU?&yh*GrAfB5;g1JEl%=Y%t~zY32P6p7 zxx`oET=vq>{=hugOXsK@?;Lh;Gsgc@Mm90C2>p4u*lz1~DN0vdm7+fTMW3E0I308F ztN9Xhxsp8*&=dn1C9aYUJg)R0AIAcZA&y8I!=zM`mX#yF8 z--k3BWuu$C-moC#95~E zjBet86hOQ0;j(_m+`?6-sNBKnQ1W-#1Cx`uA#PQOI^a0Uqt{JwM@JuG!UEQ%$ufPUd^vbN8qFy*tgEnbVtPqf0;bGi?f$m}*k)$JG? ztjtg~!HUf&=YZ8X`XGQx^9wi$%Bd&90v(TgU%znM`kL*(zuT=^>&_4vBBuBC zdaZ$#x+yA-D87}&-l#J)z>(#Cdw6z#(SFzOo;`L(ks4{1FUkL9jgQ;o0x^%ggg=-X$=Dwmyv{f zj2oL$5;falNl0Z(HSJLU{tvhDy#(wj4rQ5rRI&-7RfPxu0P`@H>*oX~1Fbznm%-)) z93NzveN^-h%H>*2kA+=>$>%mY2Bc1V9F?)&u|m0Ab2& AiU0rr diff --git a/android/app/src/main/cpp/code/q3_ui/ui_video.c b/android/app/src/main/cpp/code/q3_ui/ui_video.c index e1afd747..43393caf 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_video.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_video.c @@ -383,99 +383,99 @@ static qboolean resolutionsDetected = qfalse; GraphicsOptions_FindBuiltinResolution ================= */ -static int GraphicsOptions_FindBuiltinResolution( int mode ) -{ - int i; - - if( !resolutionsDetected ) - return mode; - - if( mode < 0 ) - return -1; - - for( i = 0; builtinResolutions[ i ]; i++ ) - { - if( !Q_stricmp( builtinResolutions[ i ], detectedResolutions[ mode ] ) ) - return i; - } - - return -1; -} +// static int GraphicsOptions_FindBuiltinResolution( int mode ) +// { +// int i; +// +// if( !resolutionsDetected ) +// return mode; +// +// if( mode < 0 ) +// return -1; +// +// for( i = 0; builtinResolutions[ i ]; i++ ) +// { +// if( !Q_stricmp( builtinResolutions[ i ], detectedResolutions[ mode ] ) ) +// return i; +// } +// +// return -1; +// } /* ================= GraphicsOptions_FindDetectedResolution ================= */ -static int GraphicsOptions_FindDetectedResolution( int mode ) -{ - int i; - - if( !resolutionsDetected ) - return mode; - - if( mode < 0 ) - return -1; - - for( i = 0; detectedResolutions[ i ]; i++ ) - { - if( !Q_stricmp( builtinResolutions[ mode ], detectedResolutions[ i ] ) ) - return i; - } - - return -1; -} +// static int GraphicsOptions_FindDetectedResolution( int mode ) +// { +// int i; +// +// if( !resolutionsDetected ) +// return mode; +// +// if( mode < 0 ) +// return -1; +// +// for( i = 0; detectedResolutions[ i ]; i++ ) +// { +// if( !Q_stricmp( builtinResolutions[ mode ], detectedResolutions[ i ] ) ) +// return i; +// } +// +// return -1; +// } /* ================= GraphicsOptions_GetAspectRatios ================= */ -static void GraphicsOptions_GetAspectRatios( void ) -{ - int i, r; - - // build ratio list from resolutions - for( r = 0; resolutions[r]; r++ ) - { - int w, h; - char *x; - char str[ sizeof(ratioBuf[0]) ]; - - // calculate resolution's aspect ratio - x = strchr( resolutions[r], 'x' ) + 1; - Q_strncpyz( str, resolutions[r], x-resolutions[r] ); - w = atoi( str ); - h = atoi( x ); - Com_sprintf( str, sizeof(str), "%.2f:1", (float)w / (float)h ); - - // rename common ratios ("1.33:1" -> "4:3") - for( i = 0; knownRatios[i][0]; i++ ) { - if( !Q_stricmp( str, knownRatios[i][0] ) ) { - Q_strncpyz( str, knownRatios[i][1], sizeof( str ) ); - break; - } - } - - // add ratio to list if it is new - // establish res/ratio relationship - for( i = 0; ratioBuf[i][0]; i++ ) - { - if( !Q_stricmp( str, ratioBuf[i] ) ) - break; - } - if( !ratioBuf[i][0] ) - { - Q_strncpyz( ratioBuf[i], str, sizeof(ratioBuf[i]) ); - ratioToRes[i] = r; - } - - ratios[r] = ratioBuf[r]; - resToRatio[r] = i; - } - - ratios[r] = NULL; -} +// static void GraphicsOptions_GetAspectRatios( void ) +// { +// int i, r; +// +// // build ratio list from resolutions +// for( r = 0; resolutions[r]; r++ ) +// { +// int w, h; +// char *x; +// char str[ sizeof(ratioBuf[0]) ]; +// +// // calculate resolution's aspect ratio +// x = strchr( resolutions[r], 'x' ) + 1; +// Q_strncpyz( str, resolutions[r], x-resolutions[r] ); +// w = atoi( str ); +// h = atoi( x ); +// Com_sprintf( str, sizeof(str), "%.2f:1", (float)w / (float)h ); +// +// // rename common ratios ("1.33:1" -> "4:3") +// for( i = 0; knownRatios[i][0]; i++ ) { +// if( !Q_stricmp( str, knownRatios[i][0] ) ) { +// Q_strncpyz( str, knownRatios[i][1], sizeof( str ) ); +// break; +// } +// } +// +// // add ratio to list if it is new +// // establish res/ratio relationship +// for( i = 0; ratioBuf[i][0]; i++ ) +// { +// if( !Q_stricmp( str, ratioBuf[i] ) ) +// break; +// } +// if( !ratioBuf[i][0] ) +// { +// Q_strncpyz( ratioBuf[i], str, sizeof(ratioBuf[i]) ); +// ratioToRes[i] = r; +// } +// +// ratios[r] = ratioBuf[r]; +// resToRatio[r] = i; +// } +// +// ratios[r] = NULL; +// } /* ================= @@ -485,10 +485,10 @@ GraphicsOptions_GetInitialVideo static void GraphicsOptions_GetInitialVideo( void ) { s_ivo.colordepth = s_graphicsoptions.colordepth.curvalue; - s_ivo.driver = s_graphicsoptions.driver.curvalue; - s_ivo.mode = s_graphicsoptions.mode.curvalue; - s_ivo.fullscreen = s_graphicsoptions.fs.curvalue; - s_ivo.extensions = s_graphicsoptions.allow_extensions.curvalue; + // s_ivo.driver = s_graphicsoptions.driver.curvalue; + // s_ivo.mode = s_graphicsoptions.mode.curvalue; + // s_ivo.fullscreen = s_graphicsoptions.fs.curvalue; + // s_ivo.extensions = s_graphicsoptions.allow_extensions.curvalue; s_ivo.tq = s_graphicsoptions.tq.curvalue; s_ivo.lighting = s_graphicsoptions.lighting.curvalue; s_ivo.geometry = s_graphicsoptions.geometry.curvalue; @@ -505,81 +505,81 @@ static void GraphicsOptions_GetInitialVideo( void ) GraphicsOptions_GetResolutions ================= */ -static void GraphicsOptions_GetResolutions( void ) -{ - trap_Cvar_VariableStringBuffer("r_availableModes", resbuf, sizeof(resbuf)); - if(*resbuf) - { - char* s = resbuf; - unsigned int i = 0; - while( s && i < ARRAY_LEN(detectedResolutions)-1 ) - { - detectedResolutions[i++] = s; - s = strchr(s, ' '); - if( s ) - *s++ = '\0'; - } - detectedResolutions[ i ] = NULL; - - // add custom resolution if not in mode list - if ( i < ARRAY_LEN(detectedResolutions)-1 ) - { - Com_sprintf( currentResolution, sizeof ( currentResolution ), "%dx%d", uis.glconfig.vidWidth, uis.glconfig.vidHeight ); - - for( i = 0; detectedResolutions[ i ]; i++ ) - { - if ( strcmp( detectedResolutions[ i ], currentResolution ) == 0 ) - break; - } - - if ( detectedResolutions[ i ] == NULL ) - { - detectedResolutions[ i++ ] = currentResolution; - detectedResolutions[ i ] = NULL; - } - } - - resolutions = detectedResolutions; - resolutionsDetected = qtrue; - } -} +// static void GraphicsOptions_GetResolutions( void ) +// { +// trap_Cvar_VariableStringBuffer("r_availableModes", resbuf, sizeof(resbuf)); +// if(*resbuf) +// { +// char* s = resbuf; +// unsigned int i = 0; +// while( s && i < ARRAY_LEN(detectedResolutions)-1 ) +// { +// detectedResolutions[i++] = s; +// s = strchr(s, ' '); +// if( s ) +// *s++ = '\0'; +// } +// detectedResolutions[ i ] = NULL; +// +// // add custom resolution if not in mode list +// if ( i < ARRAY_LEN(detectedResolutions)-1 ) +// { +// Com_sprintf( currentResolution, sizeof ( currentResolution ), "%dx%d", uis.glconfig.vidWidth, uis.glconfig.vidHeight ); +// +// for( i = 0; detectedResolutions[ i ]; i++ ) +// { +// if ( strcmp( detectedResolutions[ i ], currentResolution ) == 0 ) +// break; +// } +// +// if ( detectedResolutions[ i ] == NULL ) +// { +// detectedResolutions[ i++ ] = currentResolution; +// detectedResolutions[ i ] = NULL; +// } +// } +// +// resolutions = detectedResolutions; +// resolutionsDetected = qtrue; +// } +// } /* ================= GraphicsOptions_CheckConfig ================= */ -static void GraphicsOptions_CheckConfig( void ) -{ - int i; - - for ( i = 0; i < NUM_IVO_TEMPLATES-1; i++ ) - { - if ( s_ivo_templates[i].colordepth != s_graphicsoptions.colordepth.curvalue ) - continue; - if ( s_ivo_templates[i].driver != s_graphicsoptions.driver.curvalue ) - continue; - if ( GraphicsOptions_FindDetectedResolution(s_ivo_templates[i].mode) != s_graphicsoptions.mode.curvalue ) - continue; - if ( s_ivo_templates[i].fullscreen != s_graphicsoptions.fs.curvalue ) - continue; - if ( s_ivo_templates[i].tq != s_graphicsoptions.tq.curvalue ) - continue; - if ( s_ivo_templates[i].lighting != s_graphicsoptions.lighting.curvalue ) - continue; - if ( s_ivo_templates[i].geometry != s_graphicsoptions.geometry.curvalue ) - continue; - if ( s_ivo_templates[i].filter != s_graphicsoptions.filter.curvalue ) - continue; +// static void GraphicsOptions_CheckConfig( void ) +// { +// int i; +// +// for ( i = 0; i < NUM_IVO_TEMPLATES-1; i++ ) +// { +// if ( s_ivo_templates[i].colordepth != s_graphicsoptions.colordepth.curvalue ) +// continue; +// if ( s_ivo_templates[i].driver != s_graphicsoptions.driver.curvalue ) +// continue; +// if ( GraphicsOptions_FindDetectedResolution(s_ivo_templates[i].mode) != s_graphicsoptions.mode.curvalue ) +// continue; +// if ( s_ivo_templates[i].fullscreen != s_graphicsoptions.fs.curvalue ) +// continue; +// if ( s_ivo_templates[i].tq != s_graphicsoptions.tq.curvalue ) +// continue; +// if ( s_ivo_templates[i].lighting != s_graphicsoptions.lighting.curvalue ) +// continue; +// if ( s_ivo_templates[i].geometry != s_graphicsoptions.geometry.curvalue ) +// continue; +// if ( s_ivo_templates[i].filter != s_graphicsoptions.filter.curvalue ) +// continue; // if ( s_ivo_templates[i].texturebits != s_graphicsoptions.texturebits.curvalue ) // continue; - s_graphicsoptions.list.curvalue = i; - return; - } - - // return 'Custom' ivo template - s_graphicsoptions.list.curvalue = NUM_IVO_TEMPLATES - 1; -} +// s_graphicsoptions.list.curvalue = i; +// return; +// } +// +// // return 'Custom' ivo template +// s_graphicsoptions.list.curvalue = NUM_IVO_TEMPLATES - 1; +// } /* ================= @@ -588,49 +588,49 @@ GraphicsOptions_UpdateMenuItems */ static void GraphicsOptions_UpdateMenuItems( void ) { - if ( s_graphicsoptions.driver.curvalue == 1 ) - { - s_graphicsoptions.fs.curvalue = 1; - s_graphicsoptions.fs.generic.flags |= QMF_GRAYED; - s_graphicsoptions.colordepth.curvalue = 1; - } - else - { - s_graphicsoptions.fs.generic.flags &= ~QMF_GRAYED; - } + // if ( s_graphicsoptions.driver.curvalue == 1 ) + // { + // s_graphicsoptions.fs.curvalue = 1; + // s_graphicsoptions.fs.generic.flags |= QMF_GRAYED; + // s_graphicsoptions.colordepth.curvalue = 1; + // } + // else + // { + // s_graphicsoptions.fs.generic.flags &= ~QMF_GRAYED; + // } - if ( s_graphicsoptions.fs.curvalue == 0 || s_graphicsoptions.driver.curvalue == 1 ) - { - s_graphicsoptions.colordepth.curvalue = 0; - s_graphicsoptions.colordepth.generic.flags |= QMF_GRAYED; - } - else - { - s_graphicsoptions.colordepth.generic.flags &= ~QMF_GRAYED; - } + // if ( s_graphicsoptions.fs.curvalue == 0 || s_graphicsoptions.driver.curvalue == 1 ) + // { + // s_graphicsoptions.colordepth.curvalue = 0; + // s_graphicsoptions.colordepth.generic.flags |= QMF_GRAYED; + // } + // else + // { + // s_graphicsoptions.colordepth.generic.flags &= ~QMF_GRAYED; + // } - if ( s_graphicsoptions.allow_extensions.curvalue == 0 ) - { - if ( s_graphicsoptions.texturebits.curvalue == 0 ) - { - s_graphicsoptions.texturebits.curvalue = 1; - } - } + // if ( s_graphicsoptions.allow_extensions.curvalue == 0 ) + // { + // if ( s_graphicsoptions.texturebits.curvalue == 0 ) + // { + // s_graphicsoptions.texturebits.curvalue = 1; + // } + // } s_graphicsoptions.apply.generic.flags |= QMF_HIDDEN|QMF_INACTIVE; - if ( s_ivo.mode != s_graphicsoptions.mode.curvalue ) - { - s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); - } - if ( s_ivo.fullscreen != s_graphicsoptions.fs.curvalue ) - { - s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); - } - if ( s_ivo.extensions != s_graphicsoptions.allow_extensions.curvalue ) - { - s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); - } + // if ( s_ivo.mode != s_graphicsoptions.mode.curvalue ) + // { + // s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); + // } + // if ( s_ivo.fullscreen != s_graphicsoptions.fs.curvalue ) + // { + // s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); + // } + // if ( s_ivo.extensions != s_graphicsoptions.allow_extensions.curvalue ) + // { + // s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); + // } if ( s_ivo.tq != s_graphicsoptions.tq.curvalue ) { s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); @@ -643,10 +643,10 @@ static void GraphicsOptions_UpdateMenuItems( void ) { s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); } - if ( s_ivo.driver != s_graphicsoptions.driver.curvalue ) - { - s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); - } + // if ( s_ivo.driver != s_graphicsoptions.driver.curvalue ) + // { + // s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); + // } if ( s_ivo.texturebits != s_graphicsoptions.texturebits.curvalue ) { s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); @@ -660,8 +660,8 @@ static void GraphicsOptions_UpdateMenuItems( void ) s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); } - GraphicsOptions_CheckConfig(); -} + // GraphicsOptions_CheckConfig(); +} /* ================= @@ -686,34 +686,36 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) break; } trap_Cvar_SetValue( "r_picmip", 3 - s_graphicsoptions.tq.curvalue ); - trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue ); - if( resolutionsDetected ) - { - // search for builtin mode that matches the detected mode - int mode; - if ( s_graphicsoptions.mode.curvalue == -1 - || s_graphicsoptions.mode.curvalue >= ARRAY_LEN( detectedResolutions ) ) - s_graphicsoptions.mode.curvalue = 0; + // trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue ); - mode = GraphicsOptions_FindBuiltinResolution( s_graphicsoptions.mode.curvalue ); - if( mode == -1 ) - { - char w[ 16 ], h[ 16 ]; - Q_strncpyz( w, detectedResolutions[ s_graphicsoptions.mode.curvalue ], sizeof( w ) ); - *strchr( w, 'x' ) = 0; - Q_strncpyz( h, - strchr( detectedResolutions[ s_graphicsoptions.mode.curvalue ], 'x' ) + 1, sizeof( h ) ); - trap_Cvar_Set( "r_customwidth", w ); - trap_Cvar_Set( "r_customheight", h ); - } + // if( resolutionsDetected ) + // { + // // search for builtin mode that matches the detected mode + // int mode; + // if ( s_graphicsoptions.mode.curvalue == -1 + // || s_graphicsoptions.mode.curvalue >= ARRAY_LEN( detectedResolutions ) ) + // s_graphicsoptions.mode.curvalue = 0; + // + // mode = GraphicsOptions_FindBuiltinResolution( s_graphicsoptions.mode.curvalue ); + // if( mode == -1 ) + // { + // char w[ 16 ], h[ 16 ]; + // Q_strncpyz( w, detectedResolutions[ s_graphicsoptions.mode.curvalue ], sizeof( w ) ); + // *strchr( w, 'x' ) = 0; + // Q_strncpyz( h, + // strchr( detectedResolutions[ s_graphicsoptions.mode.curvalue ], 'x' ) + 1, sizeof( h ) ); + // trap_Cvar_Set( "r_customwidth", w ); + // trap_Cvar_Set( "r_customheight", h ); + // } + // + // trap_Cvar_SetValue( "r_mode", mode ); + // } + // else + // trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue ); - trap_Cvar_SetValue( "r_mode", mode ); - } - else - trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue ); + // trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue ); - trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue ); switch ( s_graphicsoptions.colordepth.curvalue ) { case 0: @@ -732,6 +734,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) trap_Cvar_SetValue( "r_stencilbits", 8 ); break; } + trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue ); if ( s_graphicsoptions.geometry.curvalue == 2 ) @@ -748,7 +751,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) { trap_Cvar_SetValue( "r_lodBias", 2 ); trap_Cvar_SetValue( "r_subdivisions", 20 ); - } + } if ( s_graphicsoptions.filter.curvalue ) { @@ -835,21 +838,21 @@ static void GraphicsOptions_Event( void* ptr, int event ) { } break; - case ID_LIST: - ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue]; - - s_graphicsoptions.mode.curvalue = GraphicsOptions_FindDetectedResolution(ivo->mode); - s_graphicsoptions.ratio.curvalue = - resToRatio[ s_graphicsoptions.mode.curvalue ]; - s_graphicsoptions.tq.curvalue = ivo->tq; - s_graphicsoptions.lighting.curvalue = ivo->lighting; - s_graphicsoptions.colordepth.curvalue = ivo->colordepth; - s_graphicsoptions.texturebits.curvalue = ivo->texturebits; - s_graphicsoptions.geometry.curvalue = ivo->geometry; - s_graphicsoptions.filter.curvalue = ivo->filter; - s_graphicsoptions.fs.curvalue = ivo->fullscreen; - s_graphicsoptions.refreshrate.curvalue = ivo->refreshrate; - break; +// case ID_LIST: +// ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue]; +// +// s_graphicsoptions.mode.curvalue = GraphicsOptions_FindDetectedResolution(ivo->mode); +// s_graphicsoptions.ratio.curvalue = +// resToRatio[ s_graphicsoptions.mode.curvalue ]; +// s_graphicsoptions.tq.curvalue = ivo->tq; +// s_graphicsoptions.lighting.curvalue = ivo->lighting; +// s_graphicsoptions.colordepth.curvalue = ivo->colordepth; +// s_graphicsoptions.texturebits.curvalue = ivo->texturebits; +// s_graphicsoptions.geometry.curvalue = ivo->geometry; +// s_graphicsoptions.filter.curvalue = ivo->filter; +// s_graphicsoptions.fs.curvalue = ivo->fullscreen; +// s_graphicsoptions.refreshrate.curvalue = ivo->refreshrate; +// break; case ID_DRIVERINFO: UI_DriverInfo_Menu(); @@ -913,40 +916,40 @@ GraphicsOptions_SetMenuItems */ static void GraphicsOptions_SetMenuItems( void ) { - s_graphicsoptions.mode.curvalue = - GraphicsOptions_FindDetectedResolution( trap_Cvar_VariableValue( "r_mode" ) ); - - if ( s_graphicsoptions.mode.curvalue < 0 ) - { - if( resolutionsDetected ) - { - int i; - char buf[MAX_STRING_CHARS]; - trap_Cvar_VariableStringBuffer("r_customwidth", buf, sizeof(buf)-2); - buf[strlen(buf)+1] = 0; - buf[strlen(buf)] = 'x'; - trap_Cvar_VariableStringBuffer("r_customheight", buf+strlen(buf), sizeof(buf)-strlen(buf)); - - for(i = 0; detectedResolutions[i]; ++i) - { - if(!Q_stricmp(buf, detectedResolutions[i])) - { - s_graphicsoptions.mode.curvalue = i; - break; - } - } - if ( s_graphicsoptions.mode.curvalue < 0 ) - s_graphicsoptions.mode.curvalue = 0; - } - else - { - s_graphicsoptions.mode.curvalue = 3; - } - } - s_graphicsoptions.ratio.curvalue = - resToRatio[ s_graphicsoptions.mode.curvalue ]; - s_graphicsoptions.fs.curvalue = trap_Cvar_VariableValue("r_fullscreen"); - s_graphicsoptions.allow_extensions.curvalue = trap_Cvar_VariableValue("r_allowExtensions"); + // s_graphicsoptions.mode.curvalue = + // GraphicsOptions_FindDetectedResolution( trap_Cvar_VariableValue( "r_mode" ) ); + // + // if ( s_graphicsoptions.mode.curvalue < 0 ) + // { + // if( resolutionsDetected ) + // { + // int i; + // char buf[MAX_STRING_CHARS]; + // trap_Cvar_VariableStringBuffer("r_customwidth", buf, sizeof(buf)-2); + // buf[strlen(buf)+1] = 0; + // buf[strlen(buf)] = 'x'; + // trap_Cvar_VariableStringBuffer("r_customheight", buf+strlen(buf), sizeof(buf)-strlen(buf)); + // + // for(i = 0; detectedResolutions[i]; ++i) + // { + // if(!Q_stricmp(buf, detectedResolutions[i])) + // { + // s_graphicsoptions.mode.curvalue = i; + // break; + // } + // } + // if ( s_graphicsoptions.mode.curvalue < 0 ) + // s_graphicsoptions.mode.curvalue = 0; + // } + // else + // { + // s_graphicsoptions.mode.curvalue = 3; + // } + // } + // s_graphicsoptions.ratio.curvalue = + // resToRatio[ s_graphicsoptions.mode.curvalue ]; + // s_graphicsoptions.fs.curvalue = trap_Cvar_VariableValue("r_fullscreen"); + // s_graphicsoptions.allow_extensions.curvalue = trap_Cvar_VariableValue("r_allowExtensions"); s_graphicsoptions.tq.curvalue = 3-trap_Cvar_VariableValue( "r_picmip"); if ( s_graphicsoptions.tq.curvalue < 0 ) { @@ -1004,14 +1007,14 @@ static void GraphicsOptions_SetMenuItems( void ) break; } - if ( s_graphicsoptions.fs.curvalue == 0 ) - { - s_graphicsoptions.colordepth.curvalue = 0; - } - if ( s_graphicsoptions.driver.curvalue == 1 ) - { - s_graphicsoptions.colordepth.curvalue = 1; - } + // if ( s_graphicsoptions.fs.curvalue == 0 ) + // { + // s_graphicsoptions.colordepth.curvalue = 0; + //} + //if ( s_graphicsoptions.driver.curvalue == 1 ) + //{ + // s_graphicsoptions.colordepth.curvalue = 1; + // } switch ( (int) trap_Cvar_VariableValue( "vr_refreshrate" ) ) { @@ -1131,8 +1134,8 @@ void GraphicsOptions_MenuInit( void ) // zero set all our globals memset( &s_graphicsoptions, 0 ,sizeof(graphicsoptions_t) ); - GraphicsOptions_GetResolutions(); - GraphicsOptions_GetAspectRatios(); + //GraphicsOptions_GetResolutions(); + //GraphicsOptions_GetAspectRatios(); GraphicsOptions_Cache(); @@ -1203,16 +1206,16 @@ void GraphicsOptions_MenuInit( void ) s_graphicsoptions.network.style = UI_RIGHT; s_graphicsoptions.network.color = color_red; - y = 254 - 7 * (BIGCHAR_HEIGHT + 2); - s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL; - s_graphicsoptions.list.generic.name = "Graphics Settings:"; - s_graphicsoptions.list.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; - s_graphicsoptions.list.generic.x = 400; - s_graphicsoptions.list.generic.y = y; - s_graphicsoptions.list.generic.callback = GraphicsOptions_Event; - s_graphicsoptions.list.generic.id = ID_LIST; - s_graphicsoptions.list.itemnames = s_graphics_options_names; - y += 2 * ( BIGCHAR_HEIGHT + 2 ); + y = 254 - 6 * (BIGCHAR_HEIGHT + 2); +// s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL; +// s_graphicsoptions.list.generic.name = "Graphics Settings:"; +// s_graphicsoptions.list.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; +// s_graphicsoptions.list.generic.x = 400; +// s_graphicsoptions.list.generic.y = y; +// s_graphicsoptions.list.generic.callback = GraphicsOptions_Event; +// s_graphicsoptions.list.generic.id = ID_LIST; +// s_graphicsoptions.list.itemnames = s_graphics_options_names; +// y += 2 * ( BIGCHAR_HEIGHT + 2 ); // s_graphicsoptions.driver.generic.type = MTYPE_SPINCONTROL; // s_graphicsoptions.driver.generic.name = "GL Driver:"; @@ -1402,7 +1405,7 @@ void GraphicsOptions_MenuInit( void ) Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.sound ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.network ); - Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.list ); +// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.list ); // Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driver ); // Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.allow_extensions ); // Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.ratio ); diff --git a/android/app/src/main/pakQ3Q/ui/ingame_system.menu b/android/app/src/main/pakQ3Q/ui/ingame_system.menu index 0b07ceed..400aeaef 100644 --- a/android/app/src/main/pakQ3Q/ui/ingame_system.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_system.menu @@ -178,22 +178,22 @@ itemDef { mouseExit { setitemcolor ctr_graphics backcolor .37 .1 .1 1 } } - itemDef { - name graphics - group grpSystem - type ITEM_TYPE_MULTI - text "Quality:" - cvar "ui_glCustom" - cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - rect 0 50 256 20 - textalign ITEM_ALIGN_RIGHT - textalignx 133 - textaligny 17 - textscale .25 - forecolor 1 1 1 1 - visible 0 - action { uiScript update "ui_glCustom" } - } +// itemDef { +// name graphics +// group grpSystem +// type ITEM_TYPE_MULTI +// text "Quality:" +// cvar "ui_glCustom" +// cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } +// rect 0 50 256 20 +// textalign ITEM_ALIGN_RIGHT +// textalignx 133 +// textaligny 17 +// textscale .25 +// forecolor 1 1 1 1 +// visible 0 +// action { uiScript update "ui_glCustom" } +// } itemDef { name graphics @@ -202,7 +202,7 @@ itemDef { text "Refresh Rate:" cvar "vr_refreshrate" cvarFloatList { "60" 60 "72 (Recommended)" 72 "80" 80 "90" 90 } - rect 0 70 306 20 + rect 0 50 306 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -217,7 +217,7 @@ itemDef { type ITEM_TYPE_YESNO text "Sync Every Frame:" cvar "r_finish" - rect 0 90 256 20 + rect 0 70 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -234,7 +234,7 @@ itemDef { text "Color Depth:" cvar "r_colorbits" cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 } - rect 0 110 256 20 + rect 0 90 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -251,7 +251,7 @@ itemDef { text "Lighting:" cvar "r_vertexlight" cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } - rect 0 130 256 20 + rect 0 110 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -267,7 +267,7 @@ itemDef { type ITEM_TYPE_YESNO text "Dynamic Lights:" cvar "r_dynamiclight" - rect 0 150 256 20 + rect 0 130 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -283,7 +283,7 @@ itemDef { text "Shadow Detail:" cvar "cg_shadows" cvarFloatList { "Low" 1 "High" 3 } - rect 0 170 306 20 + rect 0 150 306 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -299,7 +299,7 @@ itemDef { text "Geometric Detail:" cvar "r_lodbias" cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } - rect 0 190 256 20 + rect 0 170 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -316,7 +316,7 @@ itemDef { text "Texture Detail:" cvar "r_picmip" cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } - rect 0 210 256 20 + rect 0 190 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -333,7 +333,7 @@ itemDef { text "Texture Quality:" cvar "r_texturebits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 0 230 256 20 + rect 0 210 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -349,7 +349,7 @@ itemDef { text "Texture Filter:" cvar "r_texturemode" cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 0 250 256 20 + rect 0 230 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 @@ -365,7 +365,7 @@ itemDef { type ITEM_TYPE_YESNO text "Compress Textures:" cvar "r_ext_compressed_textures" - rect 0 270 256 20 + rect 0 250 256 20 textalign ITEM_ALIGN_RIGHT textalignx 133 textaligny 17 diff --git a/android/app/src/main/pakQ3Q/ui/system.menu b/android/app/src/main/pakQ3Q/ui/system.menu index b6b775c0..fd8491f5 100755 --- a/android/app/src/main/pakQ3Q/ui/system.menu +++ b/android/app/src/main/pakQ3Q/ui/system.menu @@ -82,22 +82,22 @@ itemDef { } - itemDef { - name graphics - group grpSystem - text "Quality:" - type ITEM_TYPE_MULTI - cvar "ui_glCustom" - cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - rect 99 42 256 20 - textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 20 - textscale .333 - forecolor 1 1 1 1 - visible 0 - action { uiScript update "ui_glCustom" } - } +// itemDef { +// name graphics +// group grpSystem +// text "Quality:" +// type ITEM_TYPE_MULTI +// cvar "ui_glCustom" +// cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } +// rect 99 42 256 20 +// textalign ITEM_ALIGN_RIGHT +// textalignx 128 +// textaligny 20 +// textscale .333 +// forecolor 1 1 1 1 +// visible 0 +// action { uiScript update "ui_glCustom" } +// } itemDef { name graphics @@ -106,7 +106,7 @@ itemDef { text "Refresh Rate:" cvar "vr_refreshrate" cvarFloatList { "60" 60 "72 (Recommended)" 72 "80" 80 "90" 90 } - rect 99 67 256 20 + rect 99 42 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -121,7 +121,7 @@ itemDef { type ITEM_TYPE_YESNO text "Sync Every Frame:" cvar "r_finish" - rect 99 92 256 20 + rect 99 67 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -137,7 +137,7 @@ itemDef { text "Color Depth:" cvar "r_colorbits" cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 } - rect 99 117 256 20 + rect 99 92 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -154,7 +154,7 @@ itemDef { text "Lighting:" cvar "r_vertexlight" cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } - rect 99 142 256 20 + rect 99 117 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -170,7 +170,7 @@ itemDef { type ITEM_TYPE_YESNO text "Dynamic Lights:" cvar "r_dynamiclight" - rect 99 167 256 20 + rect 99 142 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -186,7 +186,7 @@ itemDef { text "Shadow Detail:" cvar "cg_shadows" cvarFloatList { "Low" 1 "High" 3 } - rect 99 192 256 20 + rect 99 167 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -202,7 +202,7 @@ itemDef { text "Geometric Detail:" cvar "r_lodbias" cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } - rect 99 217 256 20 + rect 99 192 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -219,7 +219,7 @@ itemDef { text "Texture Detail:" cvar "r_picmip" cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } - rect 99 242 256 20 + rect 99 217 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -236,7 +236,7 @@ itemDef { text "Texture Quality:" cvar "r_texturebits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 99 267 256 20 + rect 99 242 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -252,7 +252,7 @@ itemDef { text "Texture Filter:" cvar "r_texturemode" cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 99 292 256 20 + rect 99 267 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -267,7 +267,7 @@ itemDef { type ITEM_TYPE_YESNO text "Compress Textures:" cvar "r_ext_compressed_textures" - rect 99 317 256 20 + rect 99 292 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 From 24ce45a3c5779ec57a3ec30cb0c6bd7b50328d6b Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 29 Mar 2022 22:46:31 +0200 Subject: [PATCH 12/14] Add support for setting control schema in team arena --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 322046 -> 322259 bytes android/app/src/main/cpp/code/ui/ui_main.c | 69 +++++++++++++++++ android/app/src/main/pakQ3Q/ui/controls3.menu | 52 ++++++++++--- .../src/main/pakQ3Q/ui/ingame_controls.menu | 70 +++++++++++++----- 4 files changed, 163 insertions(+), 28 deletions(-) diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index 14b632f26950647bb40c37a6db0745a2edba4158..f6e5f10be137d27f97821c1cb8f8207edf3bc57d 100644 GIT binary patch delta 2526 zcmZ9OS5%XU7KIb?3(}=X4-h~Q=|O1<2uhSDRiq9bfzT1cNC_Zy1nK@k+8|AOlNO}+ zp?9egYKYQN7(jEGd7FFI+UIGnbDs9M_OD5n$!V6*2xtUF1neW=AJ0Nv7i=trXvX4T z5J)T&1i}R2dAkX)VyPjp8jlBd377Hz<##!&OpZSkMopDr1VPaxs7U_wHSL{=|I7$r%^J$Gq*>^OX>lk>|_R-3dpb z;c2yNH+1)3jK_*k2FdX8+K^s0%u0Jpc@hX6x6`mH`LqEtP)0$7HqX}4L#KOeE$PV; z63WPqO_?he){=(`Y#}I@a0wJDn0jfFr7HK!p4t~h(Liri_AdcLvPAW*HOTi0lZYUc z{YFpbb7+rbVMj_St8Q!PpUIl|n_vX)4^cG4cErlXnYGQue!{Xc|Xl1f^*d9YVC1Gz0zpGy5>MT zWs!glt{?@IH%ORXaw9DzEX|#a2Yh1~jv74EX`bes!mH0x>_wDN(?_rohZLU zs2m<5gR<+28SU4oSfg{7iqrYq-NCAAEJ-ZKh(>TUYv|KC8soqBM5@v&B43ZWOsZ+! zt|y)G7 zpwwux+^(gakrEg^h!7}&I2y1sL%Z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gt=?PW0!{YMC2SuCfY6k7azxR z=;wTj>JqMJDz&f1a+W-tR-Q!u*+lj^s+W8|W6z0{q+(=yy2-KyI$W);KQ^w`GXKGe z`7@9`qB1UjocVvHLRL_WGP^ccB0P`)xyQ*2Ml}^38T6=pHk(0{vY=sY34I_TZ38j` zw_Q9BXV}z(K9htADi>AGmo+I`RQX@yKxWhL%yKI72)$kCUM>I6Rq-qr*F0001ZI2r%| diff --git a/android/app/src/main/cpp/code/ui/ui_main.c b/android/app/src/main/cpp/code/ui/ui_main.c index 5a304156..88d3677c 100644 --- a/android/app/src/main/cpp/code/ui/ui_main.c +++ b/android/app/src/main/cpp/code/ui/ui_main.c @@ -3161,6 +3161,75 @@ static void UI_Update(const char *name) { } else { trap_Cvar_SetValue( "m_pitch", -0.022f ); } + } else if (Q_stricmp(name, "vr_controlSchema") == 0) { + qboolean uturn = trap_Cvar_VariableValue( "vr_uturn" ) != 0; + switch (val) + { + case 0: // Default schema + trap_Cvar_Set("vr_button_map_RTHUMBLEFT", "turnleft"); // turn left + trap_Cvar_Set("vr_button_map_RTHUMBRIGHT", "turnright"); // turn right + trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", "weapnext"); // next weapon + if (uturn) { + trap_Cvar_Set("vr_button_map_RTHUMBBACK", "uturn"); // u-turn + } else { + trap_Cvar_Set("vr_button_map_RTHUMBBACK", "weapprev"); // previous weapon + } + trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+weapon_select"); // weapon selector + trap_Cvar_Set("vr_button_map_PRIMARYTHUMBSTICK", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDRIGHT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDRIGHT_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBRIGHT_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKRIGHT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKRIGHT_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKLEFT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKLEFT_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBLEFT_ALT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDLEFT", ""); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDLEFT_ALT", ""); // unmapped + break; + default: // Now we have only two schemas + // All directions as weapon select (useful for HMD wheel) + trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDRIGHT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBRIGHT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBBACKRIGHT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBBACK", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBBACKLEFT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBLEFT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDLEFT", "+weapon_select"); + trap_Cvar_Set("vr_button_map_PRIMARYTHUMBSTICK", "+weapon_select"); + trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+alt"); // switch to alt layout + trap_Cvar_Set("vr_button_map_RTHUMBLEFT_ALT", "turnleft"); // turn left + trap_Cvar_Set("vr_button_map_RTHUMBRIGHT_ALT", "turnright"); // turn right + trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", "weapnext"); + if (uturn) { + trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "uturn"); + } else { + trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "weapprev"); + } + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDRIGHT_ALT", "blank"); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKRIGHT_ALT", "blank"); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBBACKLEFT_ALT", "blank"); // unmapped + trap_Cvar_Set("vr_button_map_RTHUMBFORWARDLEFT_ALT", "blank"); // unmapped + break; + } + } else if (Q_stricmp(name, "vr_uturn") == 0) { + int controlSchema = (int)trap_Cvar_VariableValue( "vr_controlSchema" ) % 2; + if (val) { + if (controlSchema == 0) { + trap_Cvar_Set("vr_button_map_RTHUMBBACK", "uturn"); + } else { + trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "uturn"); + } + } else { + if (controlSchema == 0) { + trap_Cvar_Set("vr_button_map_RTHUMBBACK", ""); + } else { + trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", ""); + } + } } } diff --git a/android/app/src/main/pakQ3Q/ui/controls3.menu b/android/app/src/main/pakQ3Q/ui/controls3.menu index 329a4c44..d711c2bf 100755 --- a/android/app/src/main/pakQ3Q/ui/controls3.menu +++ b/android/app/src/main/pakQ3Q/ui/controls3.menu @@ -42,7 +42,7 @@ itemDef { type ITEM_TYPE_YESNO text "Autoswitch Weapons:" cvar "cg_autoswitch" - rect 99 125 256 20 + rect 99 75 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -57,7 +57,7 @@ itemDef { type ITEM_TYPE_YESNO text "Railgun Scope:" cvar "vr_weaponScope" - rect 99 150 256 20 + rect 99 100 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -72,7 +72,7 @@ itemDef { type ITEM_TYPE_YESNO text "Two-Handed Weapons:" cvar "vr_twoHandedWeapons" - rect 99 175 256 20 + rect 99 125 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -88,13 +88,29 @@ itemDef { text "Direction Mode:" cvar "vr_directionMode" cvarFloatList { "HMD (Default)" 0 "Off-hand Controller" 1 } - rect 99 200 256 20 + rect 99 150 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 textscale .333 forecolor 1 1 1 1 - visible 1 + visible 1 + } + + itemDef { + name controls3 + group grpControls3 + type ITEM_TYPE_YESNO + text "Quick U-Turn:" + cvar "vr_uturn" + rect 99 175 256 20 + textalign ITEM_ALIGN_RIGHT + textalignx 128 + textaligny 20 + textscale .333 + forecolor 1 1 1 1 + visible 1 + action { uiScript update "vr_uturn" } } itemDef { @@ -104,7 +120,7 @@ itemDef { text "Turning Mode:" cvar "vr_snapturn" cvarFloatList { "Smooth Turning" 0 "45 Degrees" 45 "90 Degrees" 90 } - rect 99 225 256 20 + rect 99 200 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -119,7 +135,7 @@ itemDef { type ITEM_TYPE_YESNO text "Right-Handed:" cvar "vr_righthanded" - rect 99 250 256 20 + rect 99 225 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -134,7 +150,7 @@ itemDef { type ITEM_TYPE_YESNO text "Switch Thumbsticks:" cvar "vr_switchThumbsticks" - rect 99 275 256 20 + rect 99 250 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -149,7 +165,7 @@ itemDef { type ITEM_TYPE_SLIDER text "Weapon Pitch:" cvarfloat "vr_weaponPitch" 5 -25 5 - rect 99 300 256 20 + rect 99 275 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -165,7 +181,7 @@ itemDef { text "Weapon Wheel Mode:" cvar "vr_weaponSelectorMode" cvarFloatList { "Controller Based" 0 "HMD/Thumbstick Based" 1 } - rect 99 325 256 20 + rect 99 300 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 textaligny 20 @@ -174,6 +190,22 @@ itemDef { visible 1 } + itemDef { + name controls3 + group grpControls3 + type ITEM_TYPE_MULTI + text "Control Schema:" + cvar "vr_controlSchema" + cvarFloatList { "Weapon Wheel on Grip" 0 "Weapon Wheel on Thumbstick" 1 } + rect 99 325 256 20 + textalign ITEM_ALIGN_RIGHT + textalignx 100 + textaligny 20 + textscale .333 + forecolor 1 1 1 1 + visible 1 + action { uiScript update "vr_controlSchema" } + } itemDef { name fadebox diff --git a/android/app/src/main/pakQ3Q/ui/ingame_controls.menu b/android/app/src/main/pakQ3Q/ui/ingame_controls.menu index 95698d8e..93d0a414 100755 --- a/android/app/src/main/pakQ3Q/ui/ingame_controls.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_controls.menu @@ -180,7 +180,7 @@ itemDef { type ITEM_TYPE_YESNO text "Railgun Scope:" cvar "vr_weaponScope" - rect 30 40 200 20 + rect 30 38 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -194,7 +194,7 @@ itemDef { type ITEM_TYPE_YESNO text "Two-Handed Weapons:" cvar "vr_twoHandedWeapons" - rect 30 60 200 20 + rect 30 56 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -210,7 +210,7 @@ itemDef { text "Direction Mode:" cvar "vr_directionMode" cvarFloatList { "HMD (Default)" 0 "Off-hand Controller" 1 } - rect 30 80 200 20 + rect 30 74 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -222,16 +222,33 @@ itemDef { itemDef { name controls group grpControls + type ITEM_TYPE_MULTI text "Turning Mode:" cvar "vr_snapturn" cvarFloatList { "Smooth Turning" 0 "45 Degrees" 45 "90 Degrees" 90 } - rect 30 100 200 20 + rect 30 92 200 20 + textalign ITEM_ALIGN_RIGHT + textalignx 143 + textaligny 17 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef { + name controls + group grpControls + type ITEM_TYPE_YESNO + text "Quick U-Turn:" + cvar "vr_uturn" + rect 30 110 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 textscale .25 forecolor 1 1 1 1 - visible 1 + visible 1 + action { uiScript update "vr_uturn" } } itemDef { @@ -240,7 +257,7 @@ itemDef { type ITEM_TYPE_YESNO text "Right-Handed:" cvar "vr_righthanded" - rect 30 120 200 20 + rect 30 128 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -255,7 +272,7 @@ itemDef { type ITEM_TYPE_YESNO text "Switch Thumbsticks:" cvar "vr_switchThumbsticks" - rect 30 140 200 20 + rect 30 146 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -270,7 +287,7 @@ itemDef { type ITEM_TYPE_SLIDER text "Weapon Pitch:" cvarfloat "vr_weaponPitch" 5 -25 5 - rect 30 160 200 20 + rect 30 164 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -286,21 +303,38 @@ itemDef { text "Weapon Wheel Mode:" cvar "vr_weaponSelectorMode" cvarFloatList { "Controller Based" 0 "HMD/Thumbstick Based" 1 } - rect 30 180 200 20 + rect 30 182 200 20 + textalign ITEM_ALIGN_RIGHT + textalignx 143 + textaligny 17 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef { + name controls + group grpControls + type ITEM_TYPE_MULTI + text "Control Schema:" + cvar "vr_controlSchema" + cvarFloatList { "Weapon Wheel on Grip" 0 "Weapon Wheel on Thumbstick" 1 } + rect 30 200 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 textscale .25 forecolor 1 1 1 1 - visible 1 + visible 1 + action { uiScript update "vr_controlSchema" } } - + itemDef { name controls group grpControls style 1 text "Comfort Options" - rect 100 215 100 20 + rect 100 231 100 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -315,7 +349,7 @@ itemDef { type ITEM_TYPE_SLIDER text "Comfort Vignette:" cvarfloat "vr_comfortVignette" 0.2 0 1 - rect 30 240 200 20 + rect 30 251 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -329,7 +363,7 @@ itemDef { type ITEM_TYPE_SLIDER text "Height Adjust:" cvarfloat "vr_heightAdjust" 0.2 0 1 - rect 30 260 200 20 + rect 30 271 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -343,7 +377,7 @@ itemDef { type ITEM_TYPE_YESNO text "Roll When Hit:" cvar "vr_rollWhenHit" - rect 30 280 200 20 + rect 30 291 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -357,7 +391,7 @@ itemDef { type ITEM_TYPE_SLIDER text "Haptic Intensity:" cvarfloat "vr_hapticIntensity" 0.2 0 1 - rect 30 300 200 20 + rect 30 311 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -372,7 +406,7 @@ itemDef { text "HUD Depth:" cvar "vr_hudDepth" cvarFloatList { "Very Close" 0 "Close" 1 "Middle" 2 "Further" 3 "Far" 4 "Distant" 5 } - rect 30 320 200 20 + rect 30 331 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 @@ -386,7 +420,7 @@ itemDef { type ITEM_TYPE_SLIDER text "HUD Y Offset:" cvarfloat "vr_hudYOffset" 20 -200 200 - rect 30 340 200 20 + rect 30 351 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 textaligny 17 From 4b0bfe599dcc6f60aee26cc1c9148784e8870f23 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 29 Mar 2022 23:26:46 +0200 Subject: [PATCH 13/14] Fix default value of gore level; Add proper gore settings to team arena --- android/app/src/main/assets/pakQ3Q.pk3 | Bin 322259 -> 322320 bytes .../src/main/cpp/code/q3_ui/ui_preferences.c | 9 +-- android/app/src/main/cpp/code/ui/ui_main.c | 23 ++++++++ android/app/src/main/cpp/code/vr/vr_base.c | 2 + .../src/main/pakQ3Q/ui/ingame_options.menu | 53 ++++-------------- android/app/src/main/pakQ3Q/ui/options.menu | 49 ++++------------ 6 files changed, 47 insertions(+), 89 deletions(-) diff --git a/android/app/src/main/assets/pakQ3Q.pk3 b/android/app/src/main/assets/pakQ3Q.pk3 index f6e5f10be137d27f97821c1cb8f8207edf3bc57d..55667353504a1cd3d4520230072604cc3427c41a 100644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/14] Updated ready for v28 build --- android/app/src/main/AndroidManifest.xml | 4 ++-- android/app/src/main/cpp/code/ui/ui_main.c | 2 +- android/run.bat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index bd02dc80..c6065f7f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="40" + android:versionName="0.28.0"> diff --git a/android/app/src/main/cpp/code/ui/ui_main.c b/android/app/src/main/cpp/code/ui/ui_main.c index 2d267293..112183c1 100644 --- a/android/app/src/main/cpp/code/ui/ui_main.c +++ b/android/app/src/main/cpp/code/ui/ui_main.c @@ -3082,7 +3082,7 @@ static void UI_Update(const char *name) { trap_Cvar_SetValue( "r_subdivisions", 12 ); break; case 2: - trap_Cvar_SetValue( "r_subdivisions", 20 ); + trap_Cvar_SetValue( "r_subdivisions", 80 ); break; } } else if (Q_stricmp(name, "ui_glCustom") == 0) { diff --git a/android/run.bat b/android/run.bat index 3e7e32e3..42075296 100644 --- a/android/run.bat +++ b/android/run.bat @@ -3,7 +3,7 @@ setlocal set BUILD_TYPE=release -set VERSION=0.27.1 +set VERSION=0.28.0 @REM Define the following environment variables to sign a release build @REM set KEYSTORE=