From 9d4197b066ddb65ca1caf0ca2363f9909895d608 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 18 Mar 2005 20:11:50 +0000 Subject: KP1,3,7,9 support for diagonal walking --- src/game.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 3ef47400..2c0b4f72 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -401,6 +401,26 @@ void do_input() { xDirection = 1; } + if (keys[SDLK_KP1]) // Bottom Left + { + xDirection = -1; + yDirection = 1; + } + if (keys[SDLK_KP3]) // Bottom Right + { + xDirection = 1; + yDirection = 1; + } + if (keys[SDLK_KP7]) // Top Left + { + xDirection = -1; + yDirection = -1; + } + if (keys[SDLK_KP9]) // Top Right + { + xDirection = 1; + yDirection = -1; + } if ( xDirection == 1 && yDirection == 0 ) // Right { -- cgit v1.2.3-70-g09d2