Skip to content

Commit 65a0d69

Browse files
authored
Merge pull request #18 from cornishon/right_shift_also
Add support for running with right shift
2 parents 3cbc69d + 34f8aca commit 65a0d69

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

eepers.adb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ begin
14581458
if Game.Player.Dead then
14591459
Command_Queue.Size := 0;
14601460
else
1461-
if Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) and then Game.Turn_Animation <= 0.0 then
1461+
if (Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) or else Boolean(Is_Key_Down(KEY_RIGHT_SHIFT))) and then Game.Turn_Animation <= 0.0 then
14621462
if Is_Key_Down(KEY_A) or else Is_Key_Down(KEY_LEFT) then
14631463
Command_Queue.Size := 0;
14641464
Command_Enqueue(Command_Queue, (Kind => Command_Step, Dir => Left));
@@ -1493,7 +1493,7 @@ begin
14931493
Command_Enqueue(Command_Queue, (Kind => Command_Plant));
14941494
end if;
14951495
end if;
1496-
if Is_Key_Down(KEY_LEFT_SHIFT) then
1496+
if Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) or else Boolean(Is_Key_Down(KEY_RIGHT_SHIFT)) then
14971497
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS * 0.8;
14981498
else
14991499
if Command_Queue.Size /= 0 then

raylib.ads

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ package Raylib is
7979
KEY_ESCAPE: constant int := 256;
8080
KEY_ENTER: constant Int := 257;
8181
KEY_LEFT_SHIFT: constant Int := 340;
82+
KEY_RIGHT_SHIFT: constant Int := 344;
8283

8384
function Is_Key_Pressed(key: int) return C_bool
8485
with

0 commit comments

Comments
 (0)