[Quake2world-dev] r380 - quake2world/branches/menu/src
mattn at jdolan.dyndns.org
mattn at jdolan.dyndns.org
Sun Apr 19 13:13:56 UTC 2009
Author: mattn
Date: 2009-04-19 13:13:55 +0000 (Sun, 19 Apr 2009)
New Revision: 380
Modified:
quake2world/branches/menu/src/cl_keys.c
quake2world/branches/menu/src/r_main.c
Log:
* call MN_KeyPressed in Cl_KeyEvent
* esc no longer opens the console - it's needed for menu navigation now
Modified: quake2world/branches/menu/src/cl_keys.c
===================================================================
--- quake2world/branches/menu/src/cl_keys.c 2009-04-19 13:12:11 UTC (rev 379)
+++ quake2world/branches/menu/src/cl_keys.c 2009-04-19 13:13:55 UTC (rev 380)
@@ -22,6 +22,7 @@
#include <ctype.h>
#include "client.h"
+#include "menu/m_input.h"
static char key_lines[KEY_HISTORYSIZE][KEY_LINESIZE];
int key_linepos;
@@ -667,12 +668,17 @@
}
}
+
// but usually escape and tilde are for toggling the console
- if((unicode == '`' || unicode == '~' || unicode == K_ESCAPE) && down){
+ if((unicode == '`' || unicode == '~') && down){
Con_ToggleConsole_f();
return;
}
+ if(cls.key_dest != key_console && down)
+ if(MN_KeyPressed(key, unicode))
+ return;
+
// little hack for slow motion or fast forward demo playback
if(down && cl.demoserver && Com_ServerState() &&
(key == K_LEFTARROW || key == K_RIGHTARROW)){
@@ -731,7 +737,7 @@
if(!down)
return; // other systems only care about key down events
-
+
switch(cls.key_dest){
case key_message:
Cl_KeyMessage(key, unicode);
Modified: quake2world/branches/menu/src/r_main.c
===================================================================
--- quake2world/branches/menu/src/r_main.c 2009-04-19 13:12:11 UTC (rev 379)
+++ quake2world/branches/menu/src/r_main.c 2009-04-19 13:13:55 UTC (rev 380)
@@ -344,7 +344,18 @@
}
}
+static inline void R_Clear(void){
+ // clear screen if desired
+ if(r_clear->value || r_showpolys->value || r_view.x || r_view.y || !r_view.ready)
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ else
+ glClear(GL_DEPTH_BUFFER_BIT);
+
+ glDepthFunc(GL_LEQUAL);
+ glDepthRange(0.0f, 1.0f);
+}
+
/*
* R_BeginFrame
*/
@@ -395,11 +406,7 @@
r_threads->modified = false;
}
- // clear screen if desired
- if(r_clear->value || r_showpolys->value || r_view.x || r_view.y || !r_view.ready)
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- else
- glClear(GL_DEPTH_BUFFER_BIT);
+ R_Clear();
}
More information about the Quake2World-dev
mailing list