DEADSOFTWARE

added common file with compiler flags; cosmetic fix in g_monsters.pas
[d2df-sdl.git] / src / engine / e_input.pas
index d4081ee5615075eaa89c26fb80962c47e82e1dda..deded67e211fbcfeeaf961aad76d4160ce3a928e 100644 (file)
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *)
-{$MODE DELPHI}
+{$INCLUDE e_amodes.inc}
 unit e_input;
 
 interface
@@ -192,14 +192,14 @@ function PollKeyboard(): Boolean;
 var
   Keys: PByte;
   NKeys: Integer;
-  i: Cardinal;
+  i: NativeUInt;
 begin
   Result := False;
   Keys := SDL_GetKeyboardState(@NKeys);
   if (Keys = nil) or (NKeys < 1) then
     Exit;
   for i := 0 to NKeys do
-    KeyBuffer[i] := ((PByte(Cardinal(Keys) + i)^) <> 0);
+    KeyBuffer[i] := ((PByte(NativeUInt(Keys) + i)^) <> 0);
   for i := NKeys to High(KeyBuffer) do
     KeyBuffer[i] := False;
 end;