DEADSOFTWARE

Reserved key range for virtual keyboard + alternative virtkbd layout
[d2df-sdl.git] / src / game / g_game.pas
index 3e4e0221fb917c86e9261bb23b13f50d64ed7f6a..80fb0531df35051f2b53f7eef73719392ca9460d 100644 (file)
@@ -22,7 +22,8 @@ uses
   SysUtils, Classes,
   MAPDEF,
   g_basic, g_player, e_graphics, g_res_downloader,
-  g_sound, g_gui, utils, md5, mempool, xprofiler;
+  g_sound, g_gui, utils, md5, mempool, xprofiler,
+  g_touch;
 
 type
   TGameSettings = record
@@ -1595,7 +1596,10 @@ begin
         if (not g_Game_IsClient) and
         (
           (
-            (e_KeyPressed(IK_RETURN) or e_KeyPressed(IK_KPRETURN) or e_KeyPressed(IK_SPACE))
+            (
+              e_KeyPressed(IK_RETURN) or e_KeyPressed(IK_KPRETURN) or e_KeyPressed(IK_SPACE) or
+              e_KeyPressed(VK_FIRE) or e_KeyPressed(VK_OPEN)
+            )
             and (not gJustChatted) and (not gConsoleShow) and (not gChatShow)
             and (g_ActiveWindow = nil)
           )
@@ -2300,7 +2304,7 @@ begin
 
   g_ProcessMessages();
 
-  if e_KeyPressed(IK_TAB) then
+  if e_KeyPressed(IK_TAB) or e_KeyPressed(VK_STATUS) then
   begin
     if not gStatsPressed then
     begin
@@ -3007,11 +3011,7 @@ begin
    *     glBlendFunc(GL_DST_ALPHA, GL_ONE);
    *     draw all geometry up to and including walls (with alpha-testing, probably) -- this does lighting
    *)
-{$IFDEF USE_NANOGL} // FIXIT: nanoGL doesn't support glIsEnabled
-  wassc := false;
-{$ELSE}
   wassc := (glIsEnabled(GL_SCISSOR_TEST) <> 0);
-{$ENDIF}
   if wassc then glGetIntegerv(GL_SCISSOR_BOX, @scxywh[0]) else glGetIntegerv(GL_VIEWPORT, @scxywh[0]);
 
   // setup OpenGL parameters
@@ -3763,6 +3763,8 @@ begin
   if gGameOn then drawProfilers();
 
   g_Holmes_DrawUI();
+
+  g_Touch_Draw;
 end;
 
 procedure g_Game_Quit();
@@ -4401,7 +4403,7 @@ begin
 
     ProcessLoading(true);
 
-    if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then
+    if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) or e_KeyPressed(VK_ESCAPE) then
     begin
       State := 0;
       break;