mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-13 05:32:10 +00:00
Merge branch 'master' into feature/menu-update
This commit is contained in:
commit
00379ad62d
7 changed files with 41 additions and 22 deletions
5
Makefile
5
Makefile
|
@ -442,8 +442,11 @@ ifeq ($(PLATFORM),android)
|
||||||
-fno-builtin-cos -fno-builtin-sin -fPIC -DARCH_STRING=\\\"$(ARCH)\\\"
|
-fno-builtin-cos -fno-builtin-sin -fPIC -DARCH_STRING=\\\"$(ARCH)\\\"
|
||||||
CLIENT_CFLAGS += $(SDL_CFLAGS) -DSDL_DISABLE_IMMINTRIN_H -fno-builtin-cos -fno-builtin-sin
|
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
|
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
|
||||||
OPTIMIZE = $(OPTIMIZEVM)
|
OPTIMIZE = $(OPTIMIZEVM) $(OPTIMIZEFASTMATH)
|
||||||
|
|
||||||
HAVE_VM_COMPILED = false
|
HAVE_VM_COMPILED = false
|
||||||
|
|
||||||
|
|
|
@ -933,9 +933,6 @@ void UI_MouseEvent( int dx, int dy )
|
||||||
else if (uis.cursory > SCREEN_HEIGHT+16)
|
else if (uis.cursory > SCREEN_HEIGHT+16)
|
||||||
uis.cursory = SCREEN_HEIGHT+16;
|
uis.cursory = SCREEN_HEIGHT+16;
|
||||||
|
|
||||||
vr->menuCursorX = &uis.cursorx;
|
|
||||||
vr->menuCursorY = &uis.cursory;
|
|
||||||
|
|
||||||
// region test the active menu items
|
// region test the active menu items
|
||||||
for (i=0; i<uis.activemenu->nitems; i++)
|
for (i=0; i<uis.activemenu->nitems; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,13 +50,17 @@ Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, i
|
||||||
case UI_INIT: {
|
case UI_INIT: {
|
||||||
int ptr[2] = {arg1, arg2};
|
int ptr[2] = {arg1, arg2};
|
||||||
vr = (vr_clientinfo_t *) (*(long *) (ptr));
|
vr = (vr_clientinfo_t *) (*(long *) (ptr));
|
||||||
|
|
||||||
UI_Init();
|
UI_Init();
|
||||||
|
vr->menuCursorX = &uis.cursorx;
|
||||||
|
vr->menuCursorY = &uis.cursory;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case UI_SHUTDOWN:
|
case UI_SHUTDOWN: {
|
||||||
|
vr->menuCursorX = NULL;
|
||||||
|
vr->menuCursorY = NULL;
|
||||||
UI_Shutdown();
|
UI_Shutdown();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case UI_KEY_EVENT:
|
case UI_KEY_EVENT:
|
||||||
|
|
|
@ -750,7 +750,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trap_Cvar_SetValue( "r_lodBias", 2 );
|
trap_Cvar_SetValue( "r_lodBias", 2 );
|
||||||
trap_Cvar_SetValue( "r_subdivisions", 20 );
|
trap_Cvar_SetValue( "r_subdivisions", 80 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( s_graphicsoptions.filter.curvalue )
|
if ( s_graphicsoptions.filter.curvalue )
|
||||||
|
|
|
@ -164,6 +164,19 @@ R_ComputeLOD
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
int R_ComputeLOD( trRefEntity_t *ent ) {
|
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;
|
||||||
|
if (lod < 0)
|
||||||
|
lod = 0;
|
||||||
|
return lod;
|
||||||
|
}
|
||||||
|
|
||||||
float radius;
|
float radius;
|
||||||
float flod, lodscale;
|
float flod, lodscale;
|
||||||
float projectedRadius;
|
float projectedRadius;
|
||||||
|
|
|
@ -1105,10 +1105,10 @@ Responsible for doing a swapbuffers
|
||||||
*/
|
*/
|
||||||
void GLimp_EndFrame( void )
|
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 )
|
if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 )
|
||||||
{
|
{
|
||||||
SDL_GL_SwapWindow( SDL_window );
|
//SDL_GL_SwapWindow( SDL_window );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( r_fullscreen->modified )
|
if( r_fullscreen->modified )
|
||||||
|
|
|
@ -166,11 +166,16 @@ Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, i
|
||||||
int ptr[2] = {arg1, arg2};
|
int ptr[2] = {arg1, arg2};
|
||||||
vr = (vr_clientinfo_t *) (*(long *) (ptr));
|
vr = (vr_clientinfo_t *) (*(long *) (ptr));
|
||||||
_UI_Init(arg0);
|
_UI_Init(arg0);
|
||||||
|
vr->menuCursorX = &uiInfo.uiDC.cursorx;
|
||||||
|
vr->menuCursorY = &uiInfo.uiDC.cursory;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case UI_SHUTDOWN:
|
case UI_SHUTDOWN: {
|
||||||
|
vr->menuCursorX = NULL;
|
||||||
|
vr->menuCursorY = NULL;
|
||||||
_UI_Shutdown();
|
_UI_Shutdown();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case UI_KEY_EVENT:
|
case UI_KEY_EVENT:
|
||||||
|
@ -5364,9 +5369,6 @@ void _UI_MouseEvent( int dx, int dy )
|
||||||
else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT+16)
|
else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT+16)
|
||||||
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) {
|
if (Menu_Count() > 0) {
|
||||||
//menuDef_t *menu = Menu_GetFocused();
|
//menuDef_t *menu = Menu_GetFocused();
|
||||||
//Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
|
//Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
|
||||||
|
|
Loading…
Reference in a new issue