diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2015-09-21 12:36:55 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2015-09-21 12:36:55 +0000 |
commit | 7537f9bef042a7e9f34f21a5b1ada7278513d37a (patch) | |
tree | e1c61f9540d534926550cefb52e1a45875a76347 /games/xrobots/files/patch-graphics.c | |
parent | deskutils/owncloudclient: update 1.8.4 -> 2.0.1 (diff) |
Properly fix the LP64 issue in the application resource handling rather
than praying that globals end up in the lower 32-bit address space.
Add a number of missing includes, etc.
Approved by: edwin
Diffstat (limited to 'games/xrobots/files/patch-graphics.c')
-rw-r--r-- | games/xrobots/files/patch-graphics.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/games/xrobots/files/patch-graphics.c b/games/xrobots/files/patch-graphics.c new file mode 100644 index 000000000000..bebd78e2d1d1 --- /dev/null +++ b/games/xrobots/files/patch-graphics.c @@ -0,0 +1,69 @@ +--- graphics.c.orig 1989-11-17 22:37:38 UTC ++++ graphics.c +@@ -79,8 +79,8 @@ init_pixmaps(top_shell) + + /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ + +- fgcolor.pixel = fg; +- bgcolor.pixel = bg; ++ fgcolor.pixel = app_data.fg; ++ bgcolor.pixel = app_data.bg; + fgcolor.flags = DoRed | DoGreen | DoBlue; + bgcolor.flags = DoRed | DoGreen | DoBlue; + XQueryColor(display,DefaultColormapOfScreen(XtScreen(playfield_widget)), &fgcolor); +@@ -156,11 +156,11 @@ auto_teleport() + { + if(!cant_move) + return; +- if(autoteleport && sonic_used) { ++ if(app_data.autoteleport && sonic_used) { + teleport(); + return; + } +- if(autoteleportalways) ++ if(app_data.autoteleportalways) + teleport(); + } + +@@ -171,12 +171,12 @@ display_ok_move(x,y) + + if(can_go(x,y)) { + cant_move = 0; +- if(!spiffy) return; ++ if(!app_data.spiffy) return; + /* show the icon for a good move */ + XDrawPoint(display, playfield, gc, + pos_to_coord(x)+CELLSIZE/2,pos_to_coord(y)+CELLSIZE/2); + } else { +- if(!spiffy) return; ++ if(!app_data.spiffy) return; + /* or erase any previous dross */ + if( INXRANGE(x) && INYRANGE(y) && (robot_array[x][y] == EMPTY)) + XClearArea(display, playfield, +@@ -370,7 +370,7 @@ void free_pixmaps() + XFreeCursor(display,stayC); + XFreeCursor(display,thumbsC); + XFreeCursor(display,cant_goC); +- for(i=0;i++;i<NUM_TMP_CURSOR_PIXMAPS) ++ for(i=0;i<NUM_TMP_CURSOR_PIXMAPS;i++) + XFreePixmap(display,tmp_pixmap[i]); + + XFreePixmap(display,playerP); +@@ -405,7 +405,7 @@ show_teleport() + */ + unsigned int i; + +- if(!spiffy) return; ++ if(!app_data.spiffy) return; + + for(i=100;i>0;i-=10) { + XDrawArc(display,playfield,gc, +@@ -430,7 +430,7 @@ int center_x = pos_to_coord(human_x)+(CE + center_y = pos_to_coord(human_y)+(CELLSIZE/2)-2; + int i; + +- if(!spiffy) return; ++ if(!app_data.spiffy) return; + + for(i=pos_to_coord(human_x-1);i<pos_to_coord(human_x+2);i+=SPACING) { + XDrawLine(display,playfield,agc,center_x,center_y,i,pos_to_coord(human_y-1)); |