aboutsummaryrefslogtreecommitdiffstats
path: root/games/xrobots/files/patch-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/xrobots/files/patch-actions.c')
-rw-r--r--games/xrobots/files/patch-actions.c61
1 files changed, 55 insertions, 6 deletions
diff --git a/games/xrobots/files/patch-actions.c b/games/xrobots/files/patch-actions.c
index 0b9bf78e407d..1661b49ff49c 100644
--- a/games/xrobots/files/patch-actions.c
+++ b/games/xrobots/files/patch-actions.c
@@ -1,6 +1,14 @@
---- actions.c.orig 2013-10-13 01:20:18.000000000 +1100
-+++ actions.c 2013-10-13 01:26:21.000000000 +1100
-@@ -66,6 +66,7 @@
+--- actions.c.orig 1989-11-17 22:37:37 UTC
++++ actions.c
+@@ -37,6 +37,7 @@
+ #include <X11/Intrinsic.h>
+ #include <X11/StringDefs.h>
+ #include <math.h>
++#include <stdlib.h>
+ #include "xrobots.h"
+
+ extern Widget sonic_command;
+@@ -66,6 +67,7 @@ do_nothing_action(w,event,params,num_par
Cardinal *num_params;
{
/* do nothing */
@@ -8,7 +16,7 @@
}
-@@ -169,11 +170,11 @@
+@@ -169,11 +171,11 @@ move_action(w,event,params,num_params)
int diff_x, diff_y;
int num_wasted;
@@ -22,7 +30,7 @@
last_human_x = human_x;
last_human_y = human_y;
-@@ -210,14 +211,14 @@
+@@ -210,14 +212,14 @@ jump_action(w,event,params,num_params)
int diff_x, diff_y;
int num_wasted;
@@ -40,7 +48,25 @@
while( can_go(human_x+diff_x,human_y+diff_y) ) {
last_human_x = human_x;
-@@ -261,7 +262,7 @@
+@@ -225,7 +227,7 @@ jump_action(w,event,params,num_params)
+ human_x += diff_x;
+ human_y += diff_y;
+ num_wasted = chase(0);
+- if(showjumps)
++ if(app_data.showjumps)
+ show_movement();
+ add_score(num_wasted);
+ if(!num_robots)
+@@ -235,7 +237,7 @@ jump_action(w,event,params,num_params)
+ if(!num_robots)
+ new_level();
+ else
+- if(!showjumps)
++ if(!app_data.showjumps)
+ display_level();
+ display_possible_moves();
+ auto_teleport();
+@@ -261,7 +263,7 @@ go_here_action(w,event,params,num_params
int tmp_human_x, tmp_human_y;
int num_wasted;
@@ -49,3 +75,26 @@
while(direction = determine_direction(event->x,event->y)) {
if(direction == STILL) break;
+@@ -280,19 +282,19 @@ go_here_action(w,event,params,num_params
+ human_x = tmp_human_x;
+ human_y = tmp_human_y;
+ num_wasted = chase(0);
+- if(showjumps)
++ if(app_data.showjumps)
+ show_movement();
+ add_score(num_wasted);
+ if(!num_robots)
+ break;
+- if(spiffy)
++ if(app_data.spiffy)
+ pointer_moved((Widget)0,(caddr_t)0,event);
+ XFlush(display);
+ }
+ if(!num_robots)
+ new_level();
+ else
+- if(!showjumps)
++ if(!app_data.showjumps)
+ display_level();
+ display_possible_moves();
+ auto_teleport();