DEADSOFTWARE

gl: force camera at map center when screen larger than map
[d2df-sdl.git] / src / engine / e_input_sdl2.inc
index d619c517456199c6232dc1a8ba50bb8ae5cfcd06..effe559e475ec78ed53bc6dfe9858e5ea9e1f79b 100644 (file)
@@ -120,12 +120,14 @@ const
   IK_S       = SDL_SCANCODE_S;
   IK_D       = SDL_SCANCODE_D;
   IK_Q       = SDL_SCANCODE_Q;
+  IK_R       = SDL_SCANCODE_R;
   IK_E       = SDL_SCANCODE_E;
   IK_H       = SDL_SCANCODE_H;
   IK_J       = SDL_SCANCODE_J;
   IK_T       = SDL_SCANCODE_T;
   IK_Z       = SDL_SCANCODE_Z;
   IK_MINUS   = SDL_SCANCODE_MINUS;
+  IK_NONUSBACKSLASH = SDL_SCANCODE_NONUSBACKSLASH;
   // TODO: think of something better than this shit
   IK_LASTKEY = SDL_NUM_SCANCODES-1;
 
@@ -213,8 +215,9 @@ const
   JOY2_DOWN = JOYH_BEG + 2*e_MaxJoyHats*4 + 0*4 + HAT_DOWN;
   JOY3_DOWN = JOYH_BEG + 3*e_MaxJoyHats*4 + 0*4 + HAT_DOWN;
 
-function  e_InitInput: Boolean;
-procedure e_ReleaseInput;
+procedure e_Input_Initialize;
+procedure e_Input_Finalize;
+
 procedure e_UnpressAllKeys;
 procedure e_KeyUpDown (key: Integer; down: Boolean);
 
@@ -338,6 +341,7 @@ begin
   e_KeyNames[IK_DOT] := '.';
   e_KeyNames[IK_MINUS] := '-';
   e_KeyNames[IK_EQUALS] := '=';
+  e_KeyNames[IK_NONUSBACKSLASH] := 'NONUSBACKSLASH';
 
   // joysticks
   for j := 0 to e_MaxJoys-1 do
@@ -377,16 +381,15 @@ begin
   result := i < e_MaxJoys
 end;
 
-function e_InitInput: Boolean;
+procedure e_Input_Initialize;
   var i: Integer;
 begin
   for i := 0 to e_MaxJoys - 1 do
     e_JoystickAvailable[i] := False;
-  GenerateKeyNames;
-  result := True
+  GenerateKeyNames
 end;
 
-procedure e_ReleaseInput;
+procedure e_Input_Finalize;
   var i: Integer;
 begin
   for i := 0 to e_MaxJoys - 1 do