diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2013-10-12 04:16:59 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2013-10-12 04:16:59 +0000 |
commit | 90e197811bfa56a8f53ca92015bf750acc87e759 (patch) | |
tree | 6b88cf61cfa2737343aed35d8bbca0c22e1b04ad /games/xrobots | |
parent | c87082ca2ddf79c90531b5d11b1c323a0b5687b4 (diff) |
Notes
Diffstat (limited to 'games/xrobots')
-rw-r--r-- | games/xrobots/Makefile | 2 | ||||
-rw-r--r-- | games/xrobots/files/patch-actions.c | 51 | ||||
-rw-r--r-- | games/xrobots/files/patch-main.c | 21 |
3 files changed, 66 insertions, 8 deletions
diff --git a/games/xrobots/Makefile b/games/xrobots/Makefile index 58f6635965dd..fd5fdc5cad56 100644 --- a/games/xrobots/Makefile +++ b/games/xrobots/Makefile @@ -3,7 +3,7 @@ PORTNAME= xrobots PORTVERSION= 1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= games MASTER_SITES= http://www.mavetju.org/download/adopted/ DISTNAME= ${PORTNAME}-${PORTVERSION}-ss-10.20 diff --git a/games/xrobots/files/patch-actions.c b/games/xrobots/files/patch-actions.c new file mode 100644 index 000000000000..0b9bf78e407d --- /dev/null +++ b/games/xrobots/files/patch-actions.c @@ -0,0 +1,51 @@ +--- 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 @@ + Cardinal *num_params; + { + /* do nothing */ ++ return NULL; + } + + +@@ -169,11 +170,11 @@ + int diff_x, diff_y; + int num_wasted; + +- if(!game_active) return; ++ if(!game_active) return NULL; + + if(get_next_position(&diff_x, &diff_y, event->x, event->y, + params, *num_params)) +- return; ++ return NULL; + + last_human_x = human_x; + last_human_y = human_y; +@@ -210,14 +211,14 @@ + int diff_x, diff_y; + int num_wasted; + +- if(!game_active) return; ++ if(!game_active) return NULL; + + if(get_next_position(&diff_x, &diff_y, event->x, event->y, + params, *num_params)) +- return; ++ return NULL; + + if(! can_go(human_x+diff_x,human_y+diff_y) ) +- return; ++ return NULL; + + while( can_go(human_x+diff_x,human_y+diff_y) ) { + last_human_x = human_x; +@@ -261,7 +262,7 @@ + int tmp_human_x, tmp_human_y; + int num_wasted; + +- if(!game_active) return; ++ if(!game_active) return NULL; + + while(direction = determine_direction(event->x,event->y)) { + if(direction == STILL) break; diff --git a/games/xrobots/files/patch-main.c b/games/xrobots/files/patch-main.c index b42b233b62d9..9a49ee5710b5 100644 --- a/games/xrobots/files/patch-main.c +++ b/games/xrobots/files/patch-main.c @@ -1,6 +1,6 @@ ---- main.c.orig Thu Jan 22 06:34:05 1998 -+++ main.c Sat Feb 28 03:53:04 2004 -@@ -170,25 +170,25 @@ +--- main.c.orig 1998-01-23 01:34:05.000000000 +1100 ++++ main.c 2013-10-13 01:30:59.000000000 +1100 +@@ -170,31 +170,31 @@ {"-scorefile","scorefile",XrmoptionSepArg, NULL }, }; @@ -36,11 +36,17 @@ }; /*----------------------------------------------------------------------*/ -@@ -205,6 +205,16 @@ - new_game_command; + + main(argc, argv) +- unsigned int argc; ++ int argc; + char **argv; + { + Arg args[1]; +@@ -206,6 +206,16 @@ srandom(getpid()); -+ + + application_resources[0].resource_offset=(Cardinal)&fg; + application_resources[1].resource_offset=(Cardinal)&bg; + application_resources[2].resource_offset=(Cardinal)&spiffy; @@ -50,6 +56,7 @@ + application_resources[6].resource_offset=(Cardinal)&diewaiting; + application_resources[7].resource_offset=(Cardinal)&translations; + application_resources[8].resource_offset=(Cardinal)&score_filename; - ++ top_shell = XtInitialize(argv[0], "xrobots", options, XtNumber(options), (int *)&argc, argv); + XtSetValues(top_shell, arglisttop_shell, XtNumber(arglisttop_shell)); |