Date: Sat, 29 Mar 2014 20:38:57 +0000 (UTC) From: Rusmir Dusko <nemysis@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349590 - in head/games/xbattle: . files Message-ID: <201403292038.s2TKcvKT071276@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nemysis Date: Sat Mar 29 20:38:57 2014 New Revision: 349590 URL: http://svnweb.freebsd.org/changeset/ports/349590 QAT: https://qat.redports.org/buildarchive/r349590/ Log: - Bump PORTREVISION for dependency and pkg-plist change - Change master sites, add icons - Take maintainership - Remove DEPRECATED, EXPIRATION_DATE - Add dependency for x11/xdialog - Add USE_CSTD=gnu89 - Support STAGEDIR - Remove tutorial* from DOCS, SH scripts which are used to learn how to use XBattle - Add Desktop entry file - Simplify installation handling - Fix MAN to install in man6 - Recreate patch with make makepatch, fix MAN to install in man6 - Add patches, use some Debian patches, fix bad C code and video (Pseudo Color), - Add files/xbattle-menu.in for Desktop with Xdialog - Change pkg-descr, add WWW - Change pkg-plist, remove DOCS Added: head/games/xbattle/files/patch-Imakefile (contents, props changed) head/games/xbattle/files/patch-command.c (contents, props changed) head/games/xbattle/files/patch-draw.c (contents, props changed) head/games/xbattle/files/patch-edit.c (contents, props changed) head/games/xbattle/files/patch-error.c (contents, props changed) head/games/xbattle/files/patch-init.c (contents, props changed) head/games/xbattle/files/patch-main.c (contents, props changed) head/games/xbattle/files/patch-parse.c (contents, props changed) head/games/xbattle/files/patch-replay.c (contents, props changed) head/games/xbattle/files/patch-shape.c (contents, props changed) head/games/xbattle/files/patch-shape_octagon.c (contents, props changed) head/games/xbattle/files/patch-utils.c (contents, props changed) head/games/xbattle/files/patch-window.c (contents, props changed) head/games/xbattle/files/patch-xbattle.man (contents, props changed) head/games/xbattle/files/xbattle-menu.in (contents, props changed) Deleted: head/games/xbattle/files/patch-aa Modified: head/games/xbattle/Makefile head/games/xbattle/distinfo head/games/xbattle/pkg-descr head/games/xbattle/pkg-plist Modified: head/games/xbattle/Makefile ============================================================================== --- head/games/xbattle/Makefile Sat Mar 29 20:35:48 2014 (r349589) +++ head/games/xbattle/Makefile Sat Mar 29 20:38:57 2014 (r349590) @@ -3,44 +3,55 @@ PORTNAME= xbattle PORTVERSION= 5.4.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_GENTOO} -MASTER_SITE_SUBDIR= distfiles +MASTER_SITES= GENTOO/distfiles \ + SF/nemysisfreebsdp/${CATEGORIES}/${PORTNAME}/:icons +DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \ + ${PORTNAME}_icons${EXTRACT_SUFX}:icons -MAINTAINER= ports@FreeBSD.org +MAINTAINER= nemysis@FreeBSD.org COMMENT= Concurrent multi-player battle strategy game -DEPRECATED= Unmaintained since 2001 -EXPIRATION_DATE= 2014-04-12 +RUN_DEPENDS= xdialog>0:${PORTSDIR}/x11/xdialog + USES= imake USE_XORG= x11 xext -MAN1= xbattle.1 - +USE_CSTD= gnu89 CFLAGS+= -Wno-return-type -NO_STAGE= yes - +PORTDOCS= README OPTIONS_DEFINE= DOCS -.include <bsd.port.options.mk> +INSTALLS_ICONS= yes +ICON_SIZES= 32x32 48x48 64x64 72x72 96x96 128x128 + +SUB_FILES= ${PORTNAME}-menu + +DESKTOP_ENTRIES="XBattle" "" "${PORTNAME}" \ + "${PORTNAME}-menu" "Game;ArcadeGame;" "" post-install: - $(MKDIR) $(PREFIX)/share/xbattle - $(CP) -R $(WRKSRC)/xbos $(PREFIX)/share/xbattle/ - $(CP) -R $(WRKSRC)/xbts $(PREFIX)/share/xbattle/ - $(CP) -R $(WRKSRC)/xbas $(PREFIX)/share/xbattle/ - @${CHMOD} 755 ${PREFIX}/share/xbattle - @${CHMOD} 755 ${PREFIX}/share/xbattle/xbas - @${CHMOD} 644 ${PREFIX}/share/xbattle/xbas/* - @${CHMOD} 755 ${PREFIX}/share/xbattle/xbos - @${CHMOD} 644 ${PREFIX}/share/xbattle/xbos/* - @${CHMOD} 755 ${PREFIX}/share/xbattle/xbts - @${CHMOD} 644 ${PREFIX}/share/xbattle/xbts/* -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/tutorial* ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} -.endif + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-menu ${STAGEDIR}${PREFIX}/bin/ +.for d in xbas xbos xbts + @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR}) + @${CHMOD} 755 ${STAGEDIR}${DATADIR}/${d} + @${CHMOD} 644 ${STAGEDIR}${DATADIR}/${d}/* +.endfor + @${CHMOD} 755 ${STAGEDIR}${DATADIR} +.for f in tutorial1 tutorial2 + ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-${f} +.endfor + +.for s in ${ICON_SIZES} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/ + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png +.endfor + ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \ + ${STAGEDIR}${PREFIX}/share/pixmaps/ + + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> Modified: head/games/xbattle/distinfo ============================================================================== --- head/games/xbattle/distinfo Sat Mar 29 20:35:48 2014 (r349589) +++ head/games/xbattle/distinfo Sat Mar 29 20:38:57 2014 (r349590) @@ -1,2 +1,4 @@ SHA256 (xbattle-5.4.1.tar.gz) = 9de38df361c87d0fdc65e13cf2fa3bb28dc22a8d04cc94f2f08e6cd9457ee180 SIZE (xbattle-5.4.1.tar.gz) = 128982 +SHA256 (xbattle_icons.tar.gz) = f3e8fca5a6eeaebcecec0019894fa2d80402d20a9eabd20c32bb58a1acadbf4f +SIZE (xbattle_icons.tar.gz) = 22326 Added: head/games/xbattle/files/patch-Imakefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-Imakefile Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,17 @@ +--- ./Imakefile.orig 1995-10-17 15:14:37.000000000 +0100 ++++ ./Imakefile 2014-03-29 18:29:01.369960166 +0100 +@@ -6,10 +6,11 @@ + CCOPTIONS = -Wf,-XNl4096 + #endif + #endif ++MANSUFFIX =6 + +- DEFINES = -DDEFAULT_XBO_DIR=\"/export/home/lesher/xbos\" \ +- -DDEFAULT_XBT_DIR=\"/export/home/lesher/xbts\" \ +- -DDEFAULT_XBA_DIR=\"/export/home/lesher/xbas\" ++ DEFINES = -DDEFAULT_XBO_DIR=\"$(PREFIX)/share/xbattle/xbos\" \ ++ -DDEFAULT_XBT_DIR=\"$(PREFIX)/share/xbattle/xbts\" \ ++ -DDEFAULT_XBA_DIR=\"$(PREFIX)/share/xbattle/xbas\" + LOCAL_LIBRARIES = $(XLIB) + SYS_LIBRARIES = -lm + SRCS = command.c \ Added: head/games/xbattle/files/patch-command.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-command.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,8 @@ +--- ./command.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./command.c 2014-03-29 18:28:41.989953350 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <string.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-draw.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-draw.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,17 @@ +--- ./draw.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./draw.c 2014-03-29 18:28:41.989953350 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <string.h> + + #include "constant.h" + +@@ -1267,7 +1268,7 @@ + ******************************************************************************/ + + draw_timer (running_time, player) +- unsigned long running_time; ++ unsigned int running_time; + int player; + { + char line[MAX_LINE]; Added: head/games/xbattle/files/patch-edit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-edit.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,8 @@ +--- ./edit.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./edit.c 2014-03-29 18:28:41.989953350 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-error.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-error.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,8 @@ +--- ./error.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./error.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-init.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-init.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,9 @@ +--- ./init.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./init.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1,5 +1,6 @@ + #include <stdio.h> + #include <math.h> ++#include <stdlib.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-main.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,9 @@ +--- ./main.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./main.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1,4 +1,6 @@ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + + /**** x include files ****/ + #include <X11/Xlib.h> Added: head/games/xbattle/files/patch-parse.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-parse.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,12 @@ +--- ./parse.c.orig 1995-12-19 23:26:39.000000000 +0100 ++++ ./parse.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1486,8 +1486,7 @@ + *filename; + { + int i; +- char *suffix, +- *strstr(); ++ char *suffix; + FILE *fp; + + strcpy (filename, &option[1]); Added: head/games/xbattle/files/patch-replay.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-replay.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,9 @@ +--- ./replay.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./replay.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1,4 +1,6 @@ + #include <stdio.h> ++#include <string.h> ++#include <stdlib.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-shape.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-shape.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,8 @@ +--- ./shape.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./shape.c 2014-03-29 18:28:41.999944284 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-shape_octagon.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-shape_octagon.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,11 @@ +--- ./shape_octagon.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./shape_octagon.c 2014-03-29 18:28:42.009953797 +0100 +@@ -91,7 +91,7 @@ + + shape->direction_count = 8; + shape->direction_factor = 24/shape->direction_count; +- shape->angle_offset = 67.5; ++ shape->angle_offset = 67; + shape->use_secondary = FALSE; + + /** Define polygon points **/ Added: head/games/xbattle/files/patch-utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-utils.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,8 @@ +--- ./utils.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./utils.c 2014-03-29 18:28:42.009953797 +0100 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <string.h> + + #include "constant.h" + Added: head/games/xbattle/files/patch-window.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-window.c Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,77 @@ +--- ./window.c.orig 1995-12-19 23:21:51.000000000 +0100 ++++ ./window.c 2014-03-29 18:28:42.009953797 +0100 +@@ -1,4 +1,6 @@ + #include <stdio.h> ++#include <string.h> ++#include <stdlib.h> + + #include "constant.h" + +@@ -708,8 +710,7 @@ + unsigned long valuemask; + XSetWindowAttributes attrib; + XVisualInfo vinfo; +- long event_mask, +- full_depth; ++ long event_mask; + Atom wm_delete_window; + + /** Open display and screen **/ +@@ -742,36 +743,11 @@ + /** Set bitplane depth to default **/ + + xwindow->depth = DefaultDepth (xwindow->display, xwindow->screen); +- full_depth = xwindow->depth; + + /** Get a visual **/ + + visual = DefaultVisual (xwindow->display, xwindow->screen); + +- /** Try to force the display to 8 planes **/ +- +- if (xwindow->depth != 8) +- { +- if (XMatchVisualInfo +- (xwindow->display, xwindow->screen, 8, PseudoColor, &vinfo)) +- { +- visual = vinfo.visual; +- xwindow->depth = 8; +- } +- } +- +- /** If couldn't find an 8 bit visual, try a 16 bit visual **/ +- +- if (xwindow->depth != 8) +- { +- if (XMatchVisualInfo +- (xwindow->display, xwindow->screen, 16, PseudoColor, &vinfo)) +- { +- visual = vinfo.visual; +- xwindow->depth = 16; +- } +- } +- + /** If have less than 8 planes, just use a single plane **/ + + if (xwindow->depth < 8) +@@ -790,19 +766,8 @@ + #else + /** Allocate existing colormap **/ + +- if (full_depth > 8) ++ if (xwindow->depth > 8) + { +- /** XBattle won't work for 24 bit displays with no optional **/ +- /** visuals with 8 or 16 bits. This may be the case on some PCs. **/ +- /** In these cases, it may be possible to reconfigure the display **/ +- /** to 8 or 16 bits. **/ +- +- if (xwindow->depth > 16) +- { +- throw_warning ("No PseudoColor visual available\n%s", +- " Try changing display to <= 16 bits"); +- throw_error ("Unable to continue without colormap", NULL); +- } + + /** If display is 24 bit, have to create a dedicated colormap **/ + Added: head/games/xbattle/files/patch-xbattle.man ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xbattle/files/patch-xbattle.man Sat Mar 29 20:38:57 2014 (r349590) @@ -0,0 +1,1070 @@ +--- ./xbattle.man.orig 1995-12-19 23:58:48.000000000 +0100 ++++ ./xbattle.man 2014-03-29 18:28:42.009953797 +0100 +@@ -2,12 +2,12 @@ + .SH NAME + xbattle \- a multi-user battle strategy game + .SH SYNOPSIS +- xbattle [-<color> <display>...] [-<option> <argument>...] +-.SH ++ xbattle [\-<color> <display>...] [\-<option> <argument>...] ++.SH DESCRIPTION + + Assign a team color and display to each player, and any number of + options with argument where required. <color> can be a monochrome +-tone, -black -white -dark -light, or a color, -red -green -blue ; ++tone, \-black \-white \-dark \-light, or a color, \-red \-green \-blue ; + <display> is the name of the x display for each player. Command line + arguments can be supplied in any order. For a quick introduction, go + straight to the EXAMPLES section below. Also, see the tutorials +@@ -17,96 +17,95 @@ + .SH OPTIONS + .nf + +-...........................................................| + USAGE: xbattle <args> +- -<c1> <str> color to display name <str> +- -<c1>_<c2> <str> colors to display name <str> +- -area troops proportional to area +- -attack allow use of attack key +- -armies <int> number of ordered armies +- -basemap use map scheme, bases visible +- -bases <int> number of ordered bases +- -board <int> size of board (in cells, x=y) +- -boardx <int> width of board (in cells) +- -boardy <int> height of board (in cells) +- -border <int> border around board +- -bound allow drag-bounded vector sets +- -build <int> build cities with <int> segments +- -build_cost <int> cost to build city segment +- -build_limit <int> limit cities each side can build +- -color <spec> set RGB values for color <str> +- -color_inverse <spec> set color <s1> inverse to <s2> +- -decay <int> make troops slowly die off +- -diamond use diamond tiling +- -dig [int] [int] step terrain lowering +- -dig_cost <int> cost of each dig step +- -digin <int> provide entrenchment +- -disrupt attacks break supply lines +- -draw <int> specify a troop drawing method +- -dump <file> dump configuration to <file> +- -edit [file] interactively edit xbattle board +- -erode make unused paths erode +- -erode_thresh <int> threshold for erosion +- -farms <int> troops slowly grow +- -fight <int> intensity of fighting +- -fill [int] [int] step terrain raising +- -fill_cost <int> cost of each fill step +- -forest <int> density of forest +- -forest_color <spec> RGB values for forest level +- -forest_tones <int> number of forest levels +- -grid show grid +- -guns <int> range of artillery +- -guns_cost <int> cost of each artillery shell +- -guns_damage <int> damage done by artillery shell +- -help print argument list +- -hex use hexagonal tiling +- -hidden invisible enemy vectors +- -hills <int> slope of hills +- -hill_color <spec> RGB values for hill level <int> +- -hill_tones <int> number of allowable hill levels +- -horizon [int] can't see enemy past [int] cells +- -load [file] load board from [file] +- -localmap mapping with invisible terrain +- -manage managed control of commands +- -manpos manual positioning of board +- -map use basic map scheme +- -march <int> number of delays between marches +- -maxval <int> maximum cell troop capacity +- -militia <int> randomly distributed troops +- -move <int> speed of troop flow +- -nospigot [int] cease attack if outnumbered +- -octagon use octagonal/square tiling +- -options <file> read xbattle options from <file> +- -opt_file.xbo shorthand -options opt_file.xbo +- -overwrite just use terrain from load file +- -para <int> range of paratroopers +- -para_cost <int> cost of each paratrooper +- -para_damage <int> invading strength of paratrooper +- -peaks <int> number of terrain peaks +- -peak_bias <float> peak distribution bias (0.0-2.0) +- -rbases <int> number of distributed bases +- -rbase_range <int> distance of rbase from enemy +- -repeat repeat of last mouse command +- -replay [file] replay stored game from [file] +- -reserve allow reserve of troops +- -scuttle [int] enable city scuttling +- -scuttle_cost <int> cost of scuttle +- -sea <int> pervasiveness (+ levels) of sea +- -sea_block use block-fills, not hue-fills +- -sea_color <spec> RGB values for sea level <int> +- -sea_tones <int> number of allowable sea levels +- -sea_value <float> darkness of seas for b/w games +- -seed <int> random number generator seed +- -speed <int> speed of updates +- -square <int> side length of cell +- -stipple <spec> set stipple (b/w) pattern +- -store [file] store game for later replay +- -towns <int> density of distributed towns +- -triangle use triangular tiling +- -trough_bias <float> trough setting bias (0.0-2.0) +- -xpos <int> x position of board on display +- -ypos <int> y position of board on display +- -wrap wrapping around edges of board ++ \-<c1> <str> color to display name <str> ++ \-<c1>_<c2> <str> colors to display name <str> ++ \-area troops proportional to area ++ \-attack allow use of attack key ++ \-armies <int> number of ordered armies ++ \-basemap use map scheme, bases visible ++ \-bases <int> number of ordered bases ++ \-board <int> size of board (in cells, x=y) ++ \-boardx <int> width of board (in cells) ++ \-boardy <int> height of board (in cells) ++ \-border <int> border around board ++ \-bound allow drag-bounded vector sets ++ \-build <int> build cities with <int> segments ++ \-build_cost <int> cost to build city segment ++ \-build_limit <int> limit cities each side can build ++ \-color <spec> set RGB values for color <str> ++ \-color_inverse <spec> set color <s1> inverse to <s2> ++ \-decay <int> make troops slowly die off ++ \-diamond use diamond tiling ++ \-dig [int] [int] step terrain lowering ++ \-dig_cost <int> cost of each dig step ++ \-digin <int> provide entrenchment ++ \-disrupt attacks break supply lines ++ \-draw <int> specify a troop drawing method ++ \-dump <file> dump configuration to <file> ++ \-edit [file] interactively edit xbattle board ++ \-erode make unused paths erode ++ \-erode_thresh <int> threshold for erosion ++ \-farms <int> troops slowly grow ++ \-fight <int> intensity of fighting ++ \-fill [int] [int] step terrain raising ++ \-fill_cost <int> cost of each fill step ++ \-forest <int> density of forest ++ \-forest_color <spec> RGB values for forest level ++ \-forest_tones <int> number of forest levels ++ \-grid show grid ++ \-guns <int> range of artillery ++ \-guns_cost <int> cost of each artillery shell ++ \-guns_damage <int> damage done by artillery shell ++ \-help print argument list ++ \-hex use hexagonal tiling ++ \-hidden invisible enemy vectors ++ \-hills <int> slope of hills ++ \-hill_color <spec> RGB values for hill level <int> ++ \-hill_tones <int> number of allowable hill levels ++ \-horizon [int] can't see enemy past [int] cells ++ \-load [file] load board from [file] ++ \-localmap mapping with invisible terrain ++ \-manage managed control of commands ++ \-manpos manual positioning of board ++ \-map use basic map scheme ++ \-march <int> number of delays between marches ++ \-maxval <int> maximum cell troop capacity ++ \-militia <int> randomly distributed troops ++ \-move <int> speed of troop flow ++ \-nospigot [int] cease attack if outnumbered ++ \-octagon use octagonal/square tiling ++ \-options <file> read xbattle options from <file> ++ \-opt_file.xbo shorthand -options opt_file.xbo ++ \-overwrite just use terrain from load file ++ \-para <int> range of paratroopers ++ \-para_cost <int> cost of each paratrooper ++ \-para_damage <int> invading strength of paratrooper ++ \-peaks <int> number of terrain peaks ++ \-peak_bias <float> peak distribution bias (0.0-2.0) ++ \-rbases <int> number of distributed bases ++ \-rbase_range <int> distance of rbase from enemy ++ \-repeat repeat of last mouse command ++ \-replay [file] replay stored game from [file] ++ \-reserve allow reserve of troops ++ \-scuttle [int] enable city scuttling ++ \-scuttle_cost <int> cost of scuttle ++ \-sea <int> pervasiveness (+ levels) of sea ++ \-sea_block use block-fills, not hue-fills ++ \-sea_color <spec> RGB values for sea level <int> ++ \-sea_tones <int> number of allowable sea levels ++ \-sea_value <float> darkness of seas for b/w games ++ \-seed <int> random number generator seed ++ \-speed <int> speed of updates ++ \-square <int> side length of cell ++ \-stipple <spec> set stipple (b/w) pattern ++ \-store [file] store game for later replay ++ \-towns <int> density of distributed towns ++ \-triangle use triangular tiling ++ \-trough_bias <float> trough setting bias (0.0-2.0) ++ \-xpos <int> x position of board on display ++ \-ypos <int> y position of board on display ++ \-wrap wrapping around edges of board + + .fi + .SH RUN-TIME COMMAND SUMMARY +@@ -114,29 +113,29 @@ + .SH COMMANDS IN GAMEBOARD + LFT MOUSE: toggle command vector + MID MOUSE: clear and set new command vector +- RGT MOUSE: repeat previous command (-repeat) +- SHIFT-LFT MOUSE: march (-march) fork move (else) +- SHIFT-MID MOUSE: force march (-march) fork move (else) +- SHIFT-RGT MOUSE: paratroops (-para) +- CTRL-RGT MOUSE: artillery (-guns) ++ RGT MOUSE: repeat previous command (\-repeat) ++ SHIFT-LFT MOUSE: march (\-march) fork move (else) ++ SHIFT-MID MOUSE: force march (\-march) fork move (else) ++ SHIFT-RGT MOUSE: paratroops (\-para) ++ CTRL-RGT MOUSE: artillery (\-guns) + CRTL-'s': pause game + CRTL-'q': resume game + CRTL-'p': save game state to map file +- 'a': attack enemy square (-attack) +- 'b': build base (-build) +- 'B': build full base (-build & -manage) +- 's': scuttle base (-scuttle) +- 'f': fill terrain (-fill) +- 'F': fill full terrain (-fill & -manage) +- 'd': dig terrain (-dig) +- 'D': dig full terrain (-dig & -manage) ++ 'a': attack enemy square (\-attack) ++ 'b': build base (\-build) ++ 'B': build full base (\-build & \-manage) ++ 's': scuttle base (\-scuttle) ++ 'f': fill terrain (\-fill) ++ 'F': fill full terrain (\-fill & \-manage) ++ 'd': dig terrain (\-dig) ++ 'D': dig full terrain (\-dig & \-manage) + 'p': paratroops (-para) +- 'P': paratroops - on (-para & -manage) +- 'g': artillery (-guns) +- 'G': artillery - on (-guns & -manage) ++ 'P': paratroops \- on (\-para & \-manage) ++ 'g': artillery (\-guns) ++ 'G': artillery \- on (\-guns & \-manage) + 'z': cancel all movement +- 'c': cancel managed operation (-manage) +- '0'-'9': reserve (-reserve) ++ 'c': cancel managed operation (\-manage) ++ '0'-'9': reserve (\-reserve) + + .SH COMMANDS IN TEXT AREA + CONTROL-c: quit the game +@@ -169,17 +168,17 @@ + without waiting for turns. + + .SH TEAM SIDES AND PLAYERS +- -<color>, -color, -color_inverse, -stipple ++ \-<color>, \-color, \-color_inverse, \-stipple + + The game is started from one display, and each player must play from a + separate display, players being assigned to a color team by the +-command line option "-<color> <display>". The parameter <color> ++command line option "\-<color> <display>". The parameter <color> + determines the color of the troops of that team, which can be either a + monochrome tone like black, white, dark, light, or a true color like + red, green, blue, although the true colors will appear on a monochrome + monitor as either black or white with an identifying character in each + troop marker which is the first letter of the color name. For +-instance, the team color "-red" would appear on a monochrome monitor ++instance, the team color "\-red" would appear on a monochrome monitor + as black with a letter "R" in the middle of each troop marker. The + legal team color names can be selected from any color defined in the + file /usr/lib/X11/rgb.txt which includes such bizarre entries as +@@ -187,11 +186,11 @@ + "red", "green", "blue" and "black" and "white" etc. Alternatively, + colors can be defined individually in the default file (.xbattle), + an option file (see OPTIONS section below), or in the command +-line itself using the "-color <str> <r> <g> <b>" option. With this ++line itself using the "\-color <str> <r> <g> <b>" option. With this + option, the color is given by <str>, and the red green and blue + components by <r>, <g>, and <b> respectively, in the range (0-255). A + black and white pattern can be assigned to correspond to color name +-<str> via the "-stipple <str> 8 x <hex>" option, where the binary ++<str> via the "\-stipple <str> 8 x <hex>" option, where the binary + breakdown of each of eight hex numbers (in form like "0xa4") specifies + one of the eight rows of the pattern. + +@@ -200,7 +199,7 @@ + bitmap textures on monochrome monitors, allowing monochrome players to + have six distinguishable team colors. A number of people can be + assigned to the same team by repeating the color for different +-displays, for example "-red display1 -red display2", and each member ++displays, for example "\-red display1 \-red display2", and each member + of the team will be able to command any troops of that team. The + <display> argument designates the name of the display on which the + team of that color is playing, so each player must be given a color +@@ -215,7 +214,7 @@ + which means the display from which the program is started. When + playing between color and monochrome displays the colors can be + specified more exactly by concatenating a color name with a monochrome +-name, for example "-red_white" (color first), which would display that ++name, for example "\-red_white" (color first), which would display that + team as red on color monitors and white on monochrome monitors. All + command line flags and arguments for the game can be given in any + order as long as the argument directly follows its flag, and most +@@ -225,7 +224,7 @@ + experienced player (see BIASED GAMES below). + + .SH OPTIONS +- -options ++ \-options + + A large number of command line options are available to define the parameters + of the game. In essence, xbattle is many thousands of games rolled +@@ -237,8 +236,8 @@ + each option (plus argument, where applicable) is placed on a separate + line. So, for example, the game... + +- xbattle -black me -white cnsxk:0.0 -armies 4 -farms 5 +- -attack ++ xbattle \-black me \-white cnsxk:0.0 \-armies 4 -farms 5 ++ \-attack + + could also be played with the command... + +@@ -246,13 +245,13 @@ + + or alternatively with the shorthand version... + +- xbattle -black me -white cnsxk:0.0 -myoptions.xbo ++ xbattle \-black me \-white cnsxk:0.0 \-myoptions.xbo + + where the file myoptions.xbo consists of the lines... + +- -armies 4 +- -farms 5 +- -attack ++ \-armies 4 ++ \-farms 5 ++ \-attack + + If the specified options file cannot be found in the current directory, + xbattle will search the default xbo directory DEFAULT_XBO_DIR, which +@@ -270,35 +269,35 @@ + resolved in favor of the options file. + + .SH TROOPS +- -bases, -rbases, -rbase_range, -armies, -militia ++ \-bases, \-rbases, \-rbase_range, \-armies, \-militia + + Initial troop allocation is controlled by several command options, +-including -bases <n>, -rbases <n>, -armies <n> and -militia <n>. ++including \-bases <n>, \-rbases <n>, \-armies <n> and \-militia <n>. + Armies and militia are troops on the gameboard, whereas bases which + are indicated by circles on the gameboard, provide a steady supply of +-troops. The -bases option allocates <n> bases to each team, +-symmetrically arranged on the game board, whereas -rbases <n> arranges +-them randomly (which works well with the -horizon option). The ++troops. The \-bases option allocates <n> bases to each team, ++symmetrically arranged on the game board, whereas \-rbases <n> arranges ++them randomly (which works well with the \-horizon option). The + minimum distance between enemy bases (in cells) can optionally be set + using the -rbase_range <n> command. Note that large values of <n> may + not allow any valid rbase allocation, in which case xbattle will exit + with an error message. The +--armies option allocates <n> armies (full troop cells) symmetrically ++\-armies option allocates <n> armies (full troop cells) symmetrically + arrayed, whereas -militia <n> scatters militia of random strengths to + random locations, with a probabilistic density of <n>. At least one + of these four options is required to provide initial troops for the + game, and they may be used in arbitrary combinations. + + .SH RESUPPLY +- -towns, -farms, -decay, -erode, -erode_thresh ++ \-towns, \-farms, \-decay, \-erode, \-erode_thresh + +-The bases created by the -bases or -rbases produce a steady supply of ++The bases created by the -bases or \-rbases produce a steady supply of + fresh troops. The bases can be occupied by an opposing team, with the + troops produced by such bases are always the color of the occupying + force. The capture of all bases thus becomes the strategic objective + of the game. This arrangement simulates desert warfare, as long and + tenuous supply lines develop between the base and the battle areas. +-Another form of resupply is provided by the command option "-towns ++Another form of resupply is provided by the command option "\-towns + <n>". This produces a number of smaller unoccupied supply sources + scattered randomly over the game board at a density determined by the + argument <n>, and with random rates of troop production, indicated by +@@ -306,14 +305,14 @@ + a team to begin producing troops. This option simulates yet a larger + scale of operation as the combatants battle to occupy the towns. A + more distributed form of resupply is evoked by the command option +-"-farms <n>" whereby every cell of the game board will produce ++"\-farms <n>" whereby every cell of the game board will produce + troops as soon as it is occupied, at a rate proportional to the + argument <n>, and the strategic objective becomes the occupation of + the largest areas of the gameboard. This option simulates a yet + larger scale of operation and requires complex management of resources + to concentrate the distributed resources and deliver them to the + battle front. In large scale scenarios additional realism may be +-added by using the "-decay <n>" option whereby the troop strength in all ++added by using the "\-decay <n>" option whereby the troop strength in all + troop cells decays constantly in proportion to the value of the + decay argument. This reflects the fact that armies constantly consume + resources even while they are idle, and an army without constant +@@ -323,18 +322,18 @@ + this number includes the troops that make up the supply line, the + fighting power of an army diminishes with the length of the supply + line. The default decay value is zero, i.e. no decay. All the +-resupply options can be used in any combination. The "-erode <n>" ++resupply options can be used in any combination. The "\-erode <n>" + command doesn't affect resuply, per se, but it does effect the movement + vectors through which troops flow by causing them to erode away as + they grow older. All movement vectors in a cell will be unset at a + random time not to be less than <n> update cycles, with probability of +-erosion for each subsequent cycle determined by the "-erode_thresh <m>" ++erosion for each subsequent cycle determined by the "\-erode_thresh <m>" + argument, where <m> is the percentage chance of erosion. + + .SH ENHANCED MOVEMENT COMMANDS +- -repeat, -bound, -attack, -march, -reserve ++ \-repeat, \-bound, \-attack, \-march, \-reserve + +-With the option "-repeat" you can repeat the last command using the ++With the option "\-repeat" you can repeat the last command using the + right mouse. If for example your last command to a cell consisted + of a "move up" command by clicking near the top edge of the cell, + you can now command other cells to also move up by clicking in those +@@ -343,7 +342,7 @@ + right mouse anywhere in that cell, which saves time. This command + is supported in biased games - i.e. it can be set for one team but not + another. Commands can be made to apply to more than one cell with +-the option "-bound". This is achieved by defining a bounding rectangle ++the option "\-bound". This is achieved by defining a bounding rectangle + within which the command is valid. For instance, to command a block + of cells to all move up simultaneously, you place your mouse near + the top edge of a cell (may be unoccupied, or enemy occupied) and +@@ -351,11 +350,11 @@ + to another game cell where you release the button. The start and + end cells of the mouse drag define the opposite corners of a + rectangle within which all the game cells occupied by your troops +-receive the command "go up". The "-attack" option makes quick, ++receive the command "go up". The "\-attack" option makes quick, + multiple front attacks possible. By issuing an "a" command in an + enemy cell, all adjacent friendly troops will automatically alter their + movement vectors so as to attack the enemy cell, and only that cell. +-The "-reserve" option allows a player to define a level of reserves ++The "\-reserve" option allows a player to define a level of reserves + to remain in the cell despite any movement vectors. + For instance a reserve level of 5 would ensure that the + cell will maintain a reserve of 50% capacity, and movement out of +@@ -367,7 +366,7 @@ + for 10% reserves, "2"for 20% reserves, and so forth up to "9" for 90% + reserves. + +-With the option "-march <n>", troops may ++With the option "\-march <n>", troops may + be commanded to march in a particular direction and to continue in + that direction without further commands. March commands are activated + with shift left or shift middle mouse button. For example, if you +@@ -380,7 +379,7 @@ + traveling much faster than manually commanded troops, the march + argument <n> defines the number of game update cycles that the troops + must wait in each new cell before marching on to the next cell, so +-that "-march 1" will result in a fast march, whereas "-march 10" will ++that "\-march 1" will result in a fast march, whereas "\-march 10" will + be slow. The "march command" is indicated on the game board by a + double command vector (looks like an "=" sign) in the appropriate + direction, and the march command is always passed on to the head of +@@ -407,8 +406,8 @@ + that sets them. + + .SH GAME PLAY +- -fight, -speed, -move, -seed, +- -digin, -nospigot, -disrupt, -maxval ++ \-fight, \-speed, \-move, \-seed, ++ \-digin, \-nospigot, \-disrupt, \-maxval + + Whenever troops of different colors occupy the same game cell, a + battle ensues, indicated by concentric markers of the two colors, and +@@ -416,19 +415,19 @@ + incur losses according to a random nonlinear function that + disproportionately favors the more numerous troops. The steepness of + the nonlinearity, i.e. the advantage given to the more numerous side, +-is controlled by the -fight parameter. A small value will produce ++is controlled by the \-fight parameter. A small value will produce + lengthy drawn out battles which favor a defensive strategy, whereas a + large value produces quick decisive battles where the random element + is more significant, favoring an offensive strategy even against + superior odds. In the absence of the -fight option, the default value +-of 5 is used. The -fight parameter is also automatically modulated by +-the game speed parameter (-speed) in order to slow down battles in ++of 5 is used. The \-fight parameter is also automatically modulated by ++the game speed parameter (\-speed) in order to slow down battles in + fast games and vice versa. Since only 1/3 of the troops can enter a +-cell in each update cycle (with the default -move 5), attackers of a ++cell in each update cycle (with the default \-move 5), attackers of a + full cell are always outnumbered initially, unless a coordinated +-attack is launched from three sides simultaneously. The -move ++attack is launched from three sides simultaneously. The \-move + argument thus has a significant influence on the efficacy of an +-attack. The -disrupt option dictates that when a game cell comes ++attack. The \-disrupt option dictates that when a game cell comes + under attack, all its command vectors are immediately canceled, + breaking supply lines which must be repaired by hand after the attack. + In other words, there can be no movement under fire, and even small +@@ -443,7 +442,7 @@ + renew the command vector in order to press home the attack under + opposition. This simulates the tactical situation where a commander + must personally intervene to ensure the maximal effort is applied at +-the most critical points of the battle. The "-seed <n>" option ++the most critical points of the battle. The "\-seed <n>" option + simply sets the seed of the random number generator to <n>, which is + useful for recreating scenarios. By default the random number + generator is seeded with a combination of the system time and process +@@ -453,8 +452,8 @@ + to adjacent cells indicated by the command vectors. The default + fraction is 1/3, so that in each successive cycle, 1/3 of the + remaining troops move out of the cell until it is empty. That +-fraction is adjusted with the -move argument, 1 for less movement, and +-10 for more movement. The option -digin <n> simulates the time ++fraction is adjusted with the \-move argument, 1 for less movement, and ++10 for more movement. The option \-digin <n> simulates the time + and effort + required for troops to dig in and build fortifications. This is + achieved by reducing the rate of flow of troops into a cell as it +@@ -462,10 +461,10 @@ + the men must dig in and settle down to accommodate the last arrivals. + The argument <n> modulates the strength of this effect, from 1 to + 10 for small to large. The maximum number of troops which can occupy +-a single cell is set via -maxval <n>. Note that for octagonal tiling ++a single cell is set via \-maxval <n>. Note that for octagonal tiling + only, the some cells (the square ones) will have different maxvals. + +-The -nospigot [n] option causes troops to automatically cease attacks ++The \-nospigot [n] option causes troops to automatically cease attacks + when they are highly outnumbered, preventing the "spigoting" (perhaps + "siphoning" would be more appropriate) which can empty whole supply lines + into needless slaughter. Neighboring supply lines are shut off whenever +@@ -473,46 +472,46 @@ + to the nospigot command. + + .SH BOARD CONFIGURATION +- -cell, -board, -boardx, -boardy, -border, -manpos, +- -xpos, -ypos, -area, -wrap, -grid ++ \-cell, \-board, \-boardx, \-boardy, \-border, \-manpos, ++ \-xpos, \-ypos, \-area, \-wrap, \-grid + + The dimensions of the game board can be tailored via the +--boardx <n> and -boardy <n> options which set the horizontal and +-vertical board dimensions, in terms of cells. The -board <n> option ++\-boardx <n> and -boardy <n> options which set the horizontal and ++vertical board dimensions, in terms of cells. The \-board <n> option + creates a square board. The dimension of each cell, in pixels, is +-set by the -cell <n> option. The xbattle window border can be set ++set by the \-cell <n> option. The xbattle window border can be set + with -border <n>, while the initial x and y position of the game +-board can be set with -xpos <n> and -ypos <n> respectively. The ++board can be set with \-xpos <n> and \-ypos <n> respectively. The + -manpos option allows each player to position his or her window + interactively (does not work with all window managers). A grid +-indicating the borders of each cell is established via the -grid ++indicating the borders of each cell is established via the \-grid + command (the default), and can be eliminated via the negative +-command -no_grid. Game play wraps around the edged of the board +-if the -wrap option is invoked, although certain tiling schemes ++command \-no_grid. Game play wraps around the edged of the board ++if the \-wrap option is invoked, although certain tiling schemes + require even or odd board dimensions for wrap to work properly + in both the horizontal and vertical directions. Troop markers are + scaled by area (proportional to number), rather than diameter, if +-the -area option is used. ++the \-area option is used. + + .SH TILING METHODS +- -diamond, -square, -hex, -octagon, -triangle ++ \-diamond, \-square, \-hex, \-octagon, \-triangle + + A number of different tiling methods are available in xbattle, each of + which employs cells of a different shape. Square cells in a rectangular +-grid are used for the -square option (the default). Hexagonal cells +-are used with the -hex option. The -diamond option results in a square ++grid are used for the \-square option (the default). Hexagonal cells ++are used with the \-hex option. The \-diamond option results in a square + tiling, tilted by 45 degrees. A tiling consisting of two orientations +-of equilateral triangles is invoked with the -triangle option. The +--octagon option results in a tiling consisting of a combination of ++of equilateral triangles is invoked with the \-triangle option. The ++\-octagon option results in a tiling consisting of a combination of + regular octagons and small squares. Since different cell shapes have + different neighborhoods, troop movement in the different tilings can + have a very different feel, and may take some getting used to. + + .SH DRAWING METHODS +- -draw ++ \-draw + + The method of drawing and erasing troops and terrain is defined via the +--draw <n> option, where the argument indicates one of five distinct techniques, ++\-draw <n> option, where the argument indicates one of five distinct techniques, + of varying speed and flicker. They are: + Method 0: Erase the cell by drawing a circle the color of + the terrain, then redraw the cell contents. This is the method employed +@@ -547,32 +546,32 @@ + before the cell redraw. + + .SH GUNS AND PARATROOPS +- -guns, -guns_damage, -guns_cost, +- -para, -para_damage, -para_cost, +- -manage ++ \-guns, \-guns_damage, \-guns_cost, ++ \-para, \-para_damage, \-para_cost, ++ \-manage + +-The command option -guns <n> enables the key 'g' to be used to control ++The command option \-guns <n> enables the key 'g' to be used to control + artillery, which can be shot from any occupied game cell. The range + and direction of the shot are determined by the position of the cursor + in the game cell relative to the center of the cell --- near center + for short range and near the edge for + long range, as modulated by the argument <n>. Every shell costs a + number of troops from the source cell equal to the argument of +--guns_cost <n> (default: 2), and destroys a number of troops at +-the destination cell equal to the argument of -guns_damage <n> (default: 1). ++\-guns_cost <n> (default: 2), and destroys a number of troops at ++the destination cell equal to the argument of \-guns_damage <n> (default: 1). + The fall of shot is indicated by the brief appearance of a + little dot of the attacker's color. +-With the -horizon option the fall of shot may not be ++With the \-horizon option the fall of shot may not be + visible for long range shots, although invisible enemy troops will be + destroyed where the shell falls. Artillery can damage both friend and + foe, so it must be used with caution. Paratroops are enabled by the +-option -para <n>, and are launched similarly to artillery using the ++option \-para <n>, and are launched similarly to artillery using the + 'p' key. The cost of dropping a number of troops equal to the argument +-of -para_damage <n> (default: 1) at the destination cell is +-equal to the argument of -para_cost <n> (default: 3). ++of \-para_damage <n> (default: 1) at the destination cell is ++equal to the argument of \-para_cost <n> (default: 3). + The drop zone is indicated by the brief appearance of a parachute + symbol. When used with the +--manage option, artillery and paratroops can be deployed continuously ++\-manage option, artillery and paratroops can be deployed continuously + with the 'G' and 'P' keys instead of the 'g' and 'p' keys. This will + initiate a continuous barrage that will only stop when the source + cell is exhausted, but will recommence when it is resupplied. The +@@ -581,23 +580,23 @@ + giving the source cell a movement command. + + .SH TERRAIN +- -hills, -hill_tones, -hill_color, +- -peaks, -peak_bias, -trough_bias, +- -forest, -forest_tones, -forest_color, +- -sea, -sea_block, -sea_tones, -sea_color, -sea_value ++ \-hills, \-hill_tones, \-hill_color, ++ \-peaks, \-peak_bias, \-trough_bias, ++ \-forest, \-forest_tones, \-forest_color, ++ \-sea, \-sea_block, \-sea_tones, \-sea_color, \-sea_value + +-The command option -hills <n> initializes random hills which restrict ++The command option \-hills <n> initializes random hills which restrict + movement when going from low to high elevation, and enhance movement + from high to low, but do not affect movement on the level. The + elevation is indicated by the shade of gray, light for high and dark + for low on monochrome, and brownish for high and greenish for low on *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403292038.s2TKcvKT071276>