equal
deleted
inserted
replaced
33 procedure SetDefaultBinds; |
33 procedure SetDefaultBinds; |
34 |
34 |
35 var KbdKeyPressed: boolean; |
35 var KbdKeyPressed: boolean; |
36 |
36 |
37 implementation |
37 implementation |
38 uses SDLh, uTeams, uConsole, uMisc; |
38 uses SDLh, uTeams, uConsole, uMisc, uStore; |
39 const KeyNumber = 1024; |
39 const KeyNumber = 1024; |
40 type TKeyboardState = array[0..cKeyMaxIndex] of Byte; |
40 type TKeyboardState = array[0..cKeyMaxIndex] of Byte; |
41 |
41 |
42 var tkbd: TKeyboardState; |
42 var tkbd: TKeyboardState; |
43 KeyNames: array [0..cKeyMaxIndex] of string[15]; |
43 KeyNames: array [0..cKeyMaxIndex] of string[15]; |
108 pkbd:= PByteArray(SDL_GetKeyState(@i)); |
108 pkbd:= PByteArray(SDL_GetKeyState(@i)); |
109 {$ENDIF} |
109 {$ENDIF} |
110 TryDo(i < cKeyMaxIndex, 'SDL keys number is more than expected (' + inttostr(i) + ')', true); |
110 TryDo(i < cKeyMaxIndex, 'SDL keys number is more than expected (' + inttostr(i) + ')', true); |
111 |
111 |
112 for t:= 0 to Pred(i) do |
112 for t:= 0 to Pred(i) do |
113 tkbd[i]:= pkbd^[i] |
113 tkbd[i]:= pkbd^[i]; |
114 |
114 |
|
115 AddProgress; |
115 end; |
116 end; |
116 |
117 |
117 procedure InitKbdKeyTable; |
118 procedure InitKbdKeyTable; |
118 var i, t: LongInt; |
119 var i, t: LongInt; |
119 s: string[15]; |
120 s: string[15]; |