From 4242664fcd5d2c3e0fe24ffec038c3767276f3e5 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sat, 29 Nov 2025 17:32:25 +0100 Subject: Change mouse input to use mouse speed Instead of directly setting the object accordingly to the mouse's cursor orientation, use a 'speed' trick to move the object. X and Y coordinates are now incremented according to the speed instead of hard setting them to the current x*y hardware coordinates. Use al_set_mouse_xy() to always reset the real mouse position (not the object). This will avoid the mouse position to hit one of the limits preventing the object to be moved further. Signed-off-by: Carlos Maiolino --- src/include/rb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/rb.h b/src/include/rb.h index aba3488..abbeb0e 100644 --- a/src/include/rb.h +++ b/src/include/rb.h @@ -3,8 +3,8 @@ #include -#define RB_WIDTH 2240 -#define RB_HEIGHT 1400 +#define RB_WIDTH 640 +#define RB_HEIGHT 480 #define RB_FPS (1.0 / 80.0) /* 1 sec divided by 30 frames */ struct rb { -- cgit v1.2.3