--- xtron-1.1a.orig/CHANGES +++ xtron-1.1a/CHANGES @@ -5,56 +5,58 @@ -------- Colour: xtron is now designed mainly for colour machines (but should still run -on monochrome systems). I'm using the Xpm libraries, so make sure that you -have them on your system...most people do. Thanks to Alex Brown +on monochrome systems). I'm using the Xpm libraries, so make sure that you +have them on your system... most people do. Thanks to Alex Brown (alex@rosella.canberra.edu.au> for the xpm2pixmap code. Score Resets: I received a few suggestions that you should be able to reset your score so I've made this possible by clicking on the appropriate player's score button. -Enhanced Buttons: well, it's more they look prettier :) Things like when you +Enhanced Buttons: Well, it's more they look prettier :) Things like when you click on the pause button, it stays down until you unpause the game. All -buttons should now be responsive (you click them and they move down etc. +buttons should now be responsive (you click them and they move down etc.). Computer Player: Ahh, not really a whole lot smarter, just processing is a -little more efficient behind the scenes. I will get around to making the -computer a competative opponent, but I haven't had the time of late. :( +little more efficient behind the scenes. I will get around to making the +computer a competitive opponent, but I haven't had the time of late. :( You can change the computer player's "look ahead" distance so that it can be short or long sighted :) If you have it too short then it will only -turn at walls, too long and it turns a little too often. The default -setting is 25 blocks ahead, but this can be changed in the xtronrc file. -Its a delicate balance, if anyone finds a more competative setting than 25, +turn at walls, too long and it turns a little too often. The default +setting is 25 blocks ahead, but this can be changed in the +/etc/X11/app-defaults/Xtron file. +It's a delicate balance, if anyone finds a more competitive setting than 25, let me know. -Screen Refresh: Problem before with the screen redrawing itself...should +Screen Refresh: Problem before with the screen redrawing itself... should work correctly now. Keyboard redefinitions: I seem to forget that not everyone uses US keyboards so I've made it so you can customise the keyboard controls. This is done -through the resource file xtronrc. Just change the appropriate keys and rerun -the program. The arrow keys will also always work for player 2 as well as -any player defined configuration. - -Misc: no longer use bitmaps, pixmaps instead. This means that they need to -be loaded whenever the program is run. The location of these files is -usually in the subdirectory pixmaps/ If you wish to change this, make sure -you update the xtronrc file to tell it where they are or it will not work. +through the resource file /etc/X11/app-defaults/Xtron. Just change the +appropriate keys and rerun the program. The arrow keys will also always work +for player 2 as well as any player defined configuration. + +Misc: No longer use bitmaps, use pixmaps instead. This means that they need to +be loaded whenever the program is run. The location of these files is +usually in the subdirectory pixmaps/. If you wish to change this, make sure +you update the /etc/X11/app-defaults/Xtron file to tell it where they are +or it will not work. Umm, Makefile is a little cleaner and compile errors removed. -1.1a: changed where the xtronrc file can be found. It can currently be found +1.1a: Changed where the Xtron file can be found. It can currently be found in the current directory where the xtron executable is kept, in the -/usr/X11/lib/X11/app-defaults/ and the home directory. The file can now also +/etc/X11/app-defaults/ and the home directory. The file can now also be called either xtronrc or .xtronrc for those who like to keep rc files hidden. -Thanks to all the responses...and yes I will get around to a network version +Thanks to all the responses... and yes I will get around to a network version as soon as I have the time. Anyway, have fun and feel free to mail me if you have any comments or suggestions. BTW: if there are any interested coders who would like to work on xtron, get -in touch...:) +in touch... :) Rhett. --- xtron-1.1a.orig/Makefile +++ xtron-1.1a/Makefile @@ -19,11 +19,15 @@ # Last Modified: 16/4/95 # CC= gcc -CFLAGS= -O4 -Wall -INCLUDES= -I/usr/X386/include/X11 -I/usr/include -LIBS= -L/usr/X386/lib +CFLAGS= -O2 -Wall + +# ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) +# CFLAGS+=-g +# endif + +INCLUDES= -I/usr/include/X11 -I/usr/include +LIBS= -L/usr/X11R6/lib LDLIBS= -lXpm -lX11 -DEPEND= makedepend OBJS= wintype.o xtron.o main.o xpm2pixmap.o resource.o SRCS= wintype.c xtron.c main.c xpm2pixmap.c resource.c HEADERS= wintype.h xtron.h main.h xpm2pixmap.h resource.h @@ -34,7 +38,7 @@ $(CC) $(OBJS) $(LIBS) $(LDLIBS) -o $@ clean: - -rm $(OBJS) *~ *flc xtron + -rm -f $(OBJS) *~ *flc xtron .c.o: $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c -o $*.o $*.c --- xtron-1.1a.orig/README +++ xtron-1.1a/README @@ -22,8 +22,8 @@ Xtron is a simple one or two player version of the old classic TRON. The game is simple: avoid running into walls, your own tail, and that of your opponent. -The game starts in demo mode (two computer players). To change to a human -player, simply click the human icon for either player 1/2 or both. The +The game starts in demo mode (two computer players). To change to a human +player, simply click the human icon for either player 1/2 or both. The standard controls are as follows: Player 1: Player 2: @@ -32,13 +32,9 @@ a - left 4 - left d - right 6 - right -Player 2 may also use the standard arrow keys for control. If you wish to -change the keys, edit the xtronrc file to make the appropriate changes. - -If you move xtron about, make sure that the xtronrc file is updated with -where the pixmaps are stored or the program will not run. - -See the CHANGES file as to how to change the computer player skill level... +Player 2 may also use the standard arrow keys for control. If you wish to +change the keys, edit the /etc/X11/app-defaults/Xtron file to make the +appropriate changes. Anyway, have fun and feel free to mail me if you have any comments or suggestions. --- xtron-1.1a.orig/debian/README.Debian +++ xtron-1.1a/debian/README.Debian @@ -0,0 +1,17 @@ +xtron for Debian +---------------- + +Here's a note from the previous maintainer Ole J. Tetlie: + +---snip--- +The original author seems to have disappeared, so I have +decided to temporarily take over maintainership of xtron. + +I have some ides about what I want to implement, but I'd +appreciate suggestions. All input is welcome. + +Ole J. Tetlie , Fri, 25 Sep 1998 21:20:41 +0200 +---snip--- + + + -- Uwe Hermann , Wed, 24 Oct 2001 23:22:21 +0200 --- xtron-1.1a.orig/debian/changelog +++ xtron-1.1a/debian/changelog @@ -0,0 +1,161 @@ +xtron (1.1a-14ubuntu1) groovy; urgency=medium + + * Apply patch from Debian bug 958004. + + -- Michael Hudson-Doyle Tue, 06 Oct 2020 09:28:03 +1300 + +xtron (1.1a-14build1) bionic; urgency=high + + * No change rebuild to pick up -fPIE compiler default + + -- Balint Reczey Tue, 03 Apr 2018 12:53:14 +0000 + +xtron (1.1a-14) unstable; urgency=low + + * Standards-Version: 3.8.0. + + debian/menu: Move to new section "Games/Action". + + debian/control: Add Homepage field. + * debian/control: Drop obsolete build-dependecy on x-dev. + * debian/copyright: Convert to machine-readable format. + * debian/watch: Add file. + + -- Uwe Hermann Fri, 25 Jul 2008 22:05:54 +0200 + +xtron (1.1a-13) unstable; urgency=low + + * Replace Build-Depends "xlibs-dev" with "libx11-dev, x-dev, libxpm-dev" + (Closes: #346842). + * Various small (cosmetic) packaging changes. + + -- Uwe Hermann Wed, 25 Jan 2006 14:07:05 +0100 + +xtron (1.1a-12) unstable; urgency=low + + * Fixed debian/copyright (Closes: #302919). + * Switched to cdbs. + * Standards-Version: 3.6.2.0. + * Removed Emacs cruft from debian/changelog. + + -- Uwe Hermann Tue, 2 Aug 2005 16:06:25 +0200 + +xtron (1.1a-11) unstable; urgency=low + + * Changed my email address to uwe@debian.org. + + -- Uwe Hermann Thu, 21 Feb 2002 17:13:34 +0100 + +xtron (1.1a-10) unstable; urgency=low + + * New maintainer (Closes: #116546). + * Repackaged from scratch. + * Standards-Version: 3.5.6.0. No changes necessary. + * main.c, main.h: Fixed two compiler warnings. + * CHANGES: + + Fixed typos. + + Replaced references to 'xtronrc' with '/etc/X11/app-defaults/Xtron'. + * Makefile: + + Honor DEB_BUILD_OPTIONS (previously in debian/rules). + + Change CFLAGS's '-O4' to the usual '-02'. + + Update INCLUDES and LIBS. + + clean target: Use 'rm -f' instead of 'rm'. + + Removed unused DEPEND. + * README: Fixed typos and other minor stuff. + * debian/copyright: Updated URL to upstream tarball. + * debian/rules: Comment out unused dh_* helper programs. + * debian/xtron.6: + + Fixed typos. + + Added FILES, BUGS, LICENSE and "SEE ALSO" sections. + + -- Uwe Hermann Sat, 15 Dec 2001 21:31:12 +0100 + +xtron (1.1a-9) unstable; urgency=low + + * Set maintainer address to packages@qa.debian.org. + + -- Colin Watson Tue, 20 Nov 2001 03:43:24 +0000 + +xtron (1.1a-8) unstable; urgency=low + + * debian/xtron.6: Cleaned up. Closes: #43832, #46327. + * Moved to debhelper 3. + * Conforms to Standards version 3.5.2: + * Install pixmaps into /usr/share/games/xtron rather than + /usr/lib/games/xtron/pixmaps. Closes: #30635. + * debian/rules: Support the `debug' build option. + * debian/copyright: Updated. + + -- Matej Vela Thu, 29 Mar 2001 17:19:00 +0200 + +xtron (1.1a-7) unstable; urgency=low + + * NMU to fix app-defaults file location (and update to current policy). + Closes: #86337 + * It should be noted that there have been 3 NMU's of this package, and + no maintainer uploads since 1998. Therefore, it is orphaned. Changed + maintainer appropriatly. + + -- Joey Hess Sat, 24 Mar 2001 15:28:15 -0800 + +xtron (1.1a-6.2) unstable; urgency=low + + * Non Maintainer Upload by Ralf Treinen + * Removed Build-Dependency from xpm4g-dev (bug #84657) + + -- Ralf Treinen Sat, 24 Feb 2001 22:52:05 +0100 + +xtron (1.1a-6.1) unstable; urgency=low + + * NMU by Branden Robinson . + * Recompile against modern xpm4g package to get proper shared library + dependency and permit this package to be installed with forthcoming + XFree86 4.x packages, which include libXpm. + * debian/control: added Build-Depends + + -- Branden Robinson Mon, 23 Oct 2000 15:11:48 -0500 + +xtron (1.1a-6) unstable; urgency=low + + * New maintainer + * Converted to debhelper + + -- Ole J. Tetlie Fri, 25 Sep 1998 21:49:42 +0200 + +xtron (1.1a-5) unstable; urgency=low + + * updated to latest standard + * recompiled with libc6 finally... + * installs now app-defaults file correctly #11039, #11239 + * menufile changed to new format + + -- Riku Voipio Mon, 9 Jun 1997 23:12:23 +0300 + +xtron (1.1a-4) unstable; urgency=low + + * New maintainer address + + -- Riku Voipio Sun, 4 May 1997 11:35:52 +0300 + +xtron (1.1a-3) unstable; urgency=low + + * New MAINTAINER + * New Source format using deb-make + * Removed obsolate reference to CHANGES + * Added a menu file + + -- Riku Voipio Wed, 5 Mar 1997 16:39:50 +0200 + +1.1a-2: + 960331 + * Removed Package_Revision from control file. + * Removed -m486 compiler option. + * Added Architecture field to control file. + * ELF binary. + +1.1a-1: + 950926 Andrew Howell + * Changed depends to X11R6 and recommended to xserver. + +1.1a-0: + * Added Debian GNU/Linux package maintenance system files + * Modified to look for xtronrc in /usr/lib/games/xtron/ + --- xtron-1.1a.orig/debian/compat +++ xtron-1.1a/debian/compat @@ -0,0 +1 @@ +5 --- xtron-1.1a.orig/debian/control +++ xtron-1.1a/debian/control @@ -0,0 +1,16 @@ +Source: xtron +Section: games +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Uwe Hermann +Build-Depends: cdbs, debhelper (>= 5), libx11-dev, libxpm-dev +Standards-Version: 3.8.0 +Homepage: ftp://ibiblio.org/pub/Linux/games/arcade/ + +Package: xtron +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Tron game for X11 + Xtron is a simple one or two player version of the old classic TRON. The game + is simple: avoid running into walls, your own tail, and that of your opponent. + --- xtron-1.1a.orig/debian/copyright +++ xtron-1.1a/debian/copyright @@ -0,0 +1,31 @@ +This package was debianized by Uwe Hermann on +Tue, 2 Aug 2005 15:16:10 +0200. + +This package was originally debianized by Andrew Howell . + +It was downloaded from: + + ftp://ibiblio.org/pub/Linux/games/arcade/xtron-1.1a.tgz + +Upstream Authors: + + Rhett D. Jacobs + +------------------------------------------------------------------------------- + +Files: * +Copyright: © 1995 Rhett D. Jacobs +License: GPL-1+ + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +------------------------------------------------------------------------------- + +Files: debian/* +Copyright: © 2005 - 2008 Uwe Hermann +License: PD + The packaging done by Uwe Hermann is hereby + released as public domain. The packaging was completely redone by me, + pretty much nothing left from the previous maintainers. + --- xtron-1.1a.orig/debian/dirs +++ xtron-1.1a/debian/dirs @@ -0,0 +1,3 @@ +usr/games +usr/share/games/xtron +etc/X11/app-defaults --- xtron-1.1a.orig/debian/docs +++ xtron-1.1a/debian/docs @@ -0,0 +1 @@ +README --- xtron-1.1a.orig/debian/menu +++ xtron-1.1a/debian/menu @@ -0,0 +1,2 @@ +?package(xtron):needs="X11" section="Games/Action" \ + title="Xtron" command="/usr/games/xtron" --- xtron-1.1a.orig/debian/rules +++ xtron-1.1a/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +DEB_INSTALL_MANPAGES_xtron := debian/xtron.6 + +# DEB_DH_INSTALL_CHANGELOGS := CHANGES + +binary-post-install/xtron:: + install xtron debian/xtron/usr/games + cp -p pixmaps/* debian/xtron/usr/share/games/xtron + cp -p xtronrc debian/xtron/etc/X11/app-defaults/Xtron + +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/debhelper.mk + --- xtron-1.1a.orig/debian/watch +++ xtron-1.1a/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://ibiblio.org/pub/Linux/games/arcade/xtron-(.*)\.tgz --- xtron-1.1a.orig/debian/xtron.6 +++ xtron-1.1a/debian/xtron.6 @@ -0,0 +1,60 @@ +'\" t +.TH XTRON 6 "March 29, 2001" +.SH NAME +xtron \- a simple version of the old classic TRON +.SH SYNOPSIS +.B xtron +.SH DESCRIPTION +This manual page was written for the Debian distribution because the +original program does not have a manual page. +.PP +.B xtron +is a simple implementation of the classic game TRON. The plot is easy: +avoid hitting anything, including walls, your own tail and your opponent. +You can play in one- or two-player mode or watch the demo. +.PP +The game starts in demo mode. To start playing, click on one of the +human buttons or both. Click on the button with "tron" on it to +reset the scores, and click on the bed to pause. +.PP +The standard controls are: +.PP +.BR "Player 1: Player 2:" +.br +.BR "w" " - up " "8" " - up" +.br +.BR "s" " - down " "2" " - down" +.br +.BR "a" " - left " "4" " - left" +.br +.BR "d" " - right " "6" " - right" +.PP +Player 2 can also use the arrow keys. Edit +.I /etc/X11/app-defaults/Xtron +to change the keys. +.PP +You can reset the score of a player by clicking on the player's score button. +.PP +You can also change the "look-ahead" of the AI opponent by changing +.B xtron.lookAHEAD +in the +.I /etc/X11/app-defaults/Xtron +file. +.SH FILES +.TP +.IP "/usr/X11/app-defaults/Xtron" +The xtron configfile. +.SH BUGS +Please report any bugs you find to Rhett D. Jacobs +. +.SH LICENSE +.B xtron +is covered by the GNU General Public License (GPL) version 1 or +(at your option) any later version. +.SH AUTHOR +Rhett D. Jacobs . +.PP +This manual page was written by Ole J. Tetlie , +for the Debian GNU/Linux system (but may be used by others). +.SH SEE ALSO +.BR gltron (7) --- xtron-1.1a.orig/main.c +++ xtron-1.1a/main.c @@ -128,6 +128,7 @@ /* pause button */ if(pEvent->subwindow == pause_win) + { if (p_state) { p_state = 0; XCopyArea(display, pauser_pic, pause_win, gc, 0, 0, @@ -137,6 +138,7 @@ XCopyArea(display, pause_pic, pause_win, gc, 0, 0, WBUTTON2, HBUTTON2, 0, 0); } + } /* quit */ if (pEvent->subwindow == quit_win) { --- xtron-1.1a.orig/main.h +++ xtron-1.1a/main.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "wintype.h" #include "xtron.h" --- xtron-1.1a.orig/resource.c +++ xtron-1.1a/resource.c @@ -101,8 +101,8 @@ if ((XTRONresources = XrmGetFileDatabase("./.xtronrc")) == NULL) { if ((XTRONresources = XrmGetFileDatabase("$HOME/xtronrc")) == NULL) { if ((XTRONresources = XrmGetFileDatabase("$HOME/.xtronrc")) == NULL) { - if ((XTRONresources = XrmGetFileDatabase("/usr/X11/lib/X11/app-defaults/xtronrc")) == NULL) { - if ((XTRONresources = XrmGetFileDatabase("/usr/X11/lib/X11/app-defaults/.xtronrc")) == NULL) { + if ((XTRONresources = XrmGetFileDatabase("/etc/X11/app-defaults/Xtron")) == NULL) { + if ((XTRONresources = XrmGetFileDatabase("/etc/X11/app-defaults/.xtronrc")) == NULL) { fprintf(stderr,"error: unable to open/read resource file xtronrc\n"); return(0); } --- xtron-1.1a.orig/xtron.c +++ xtron-1.1a/xtron.c @@ -21,6 +21,9 @@ #include "xtron.h" +struct Player p[2]; +struct Board b; + void plr_setup(void) { int i; --- xtron-1.1a.orig/xtron.h +++ xtron-1.1a/xtron.h @@ -40,11 +40,15 @@ int alive; enum directions plr_dir; enum play_types plr_type; -} p[2]; +}; + +extern struct Player p[2]; struct Board { short int contents[200][200]; -} b; +}; + +extern struct Board b; void plr_setup(void); int plr_checkmove(int p_num, int new_val, int axis_type, enum directions dir); --- xtron-1.1a.orig/xtronrc +++ xtron-1.1a/xtronrc @@ -1,9 +1,9 @@ # xtron control settings # this file can be kept in either the directory where the executable is run -# in the user's home directory or in /usr/X11/lib/X11/app-defaults. +# in the user's home directory or in /etc/X11/app-defaults. # you can also rename it .xtronrc if you prefer it to be hidden # make sure that the pixmaps directory has a trailing / at the end -xtron.PixmapsDIR: ./pixmaps/ +xtron.PixmapsDIR: /usr/share/games/xtron/ # change these key settings for player 1 [RED] xtron.player1UP: w