Can only move down and right.

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: Can only move down and right.

Post by Zefz »

Wait for the next release. This problem has been fixed in the repository but the code is not completely stable for a release yet. We are working on it, but progress is slow. :)
Zommes
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Sun Jun 26, 2011 12:37 am

Re: Can only move down and right.

Post by Zommes »

Ok, I will wait. I'm happy to hear it will be fixed.
Pozzo
Acid Blob (New member)
Acid Blob (New member)
Posts: 1
Joined: Fri Mar 02, 2012 8:43 pm

Re: Can only move down and right.

Post by Pozzo »

Casting as integers works.
So instead of a patch, change the two lines 2055 and 2056 from game.c :

Code: Select all

joy_pos.x = ( control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_RIGHT ) - control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_LEFT ) );
joy_pos.y = ( control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_DOWN ) - control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_UP ) );
To this :

Code: Select all

joy_pos.x = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_RIGHT ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_LEFT ) );
joy_pos.y = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_DOWN ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_UP ) );
Post Reply