aboutsummaryrefslogtreecommitdiffstats
path: root/games/xinvaders/files
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2013-12-26 01:10:20 +0800
committerpawel <pawel@FreeBSD.org>2013-12-26 01:10:20 +0800
commitd203da6a1636fe199a64cc6eff517216d9093856 (patch)
tree150453b8b38b584351cb6eb51e816b081095096b /games/xinvaders/files
parent00569761069c01b8edf4b79cbf8d60e8693c14c5 (diff)
downloadfreebsd-ports-gnome-d203da6a1636fe199a64cc6eff517216d9093856.tar.gz
freebsd-ports-gnome-d203da6a1636fe199a64cc6eff517216d9093856.tar.zst
freebsd-ports-gnome-d203da6a1636fe199a64cc6eff517216d9093856.zip
- Fix build with clang [1]
- Add desktop entry file [1] - Support staging [1] - Save highscores in /var/games PR: ports/184876 [1] Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'games/xinvaders/files')
-rw-r--r--games/xinvaders/files/patch-aa26
-rw-r--r--games/xinvaders/files/patch-main.c122
2 files changed, 122 insertions, 26 deletions
diff --git a/games/xinvaders/files/patch-aa b/games/xinvaders/files/patch-aa
deleted file mode 100644
index af50edce9f96..000000000000
--- a/games/xinvaders/files/patch-aa
+++ /dev/null
@@ -1,26 +0,0 @@
---- Makefile.am.orig Sat Sep 16 16:31:29 2000
-+++ Makefile.am Sat Feb 3 11:18:31 2001
-@@ -3,8 +3,7 @@
- SUBDIRS=intl po
- EXTRA_DIST=debian Vaders xinvaders.6 icon.xpm xinvaders.lsm
-
--execgamesdir=$(prefix)/games
--execgames_PROGRAMS = xinvaders
-+bin_PROGRAMS = xinvaders
-
- xinvaders_SOURCES = base.c main.c score.c shot.c spacers.c vaders.c \
- widget.c me.h patchlevel.h vaders.h base1.bit base2.bit explode1.bit \
-@@ -14,13 +13,3 @@
- vader3b1.bit vader3b2.bit vexplod1.bit vexplod2.bit
-
- man_MANS = xinvaders.6
--
--install-data-local:
-- mkdir -p $(shell dirname $(DESTDIR)$(SCOREFILE) )
-- echo 0 > $(DESTDIR)$(SCOREFILE)
-- chgrp games $(DESTDIR)$(SCOREFILE)
-- chmod 0660 $(DESTDIR)$(SCOREFILE)
--
--install-exec-local:
-- chgrp games $(DESTDIR)$(execgamesdir)/xinvaders
-- chmod g+s $(DESTDIR)$(execgamesdir)/xinvaders
diff --git a/games/xinvaders/files/patch-main.c b/games/xinvaders/files/patch-main.c
new file mode 100644
index 000000000000..25cf858aaf9e
--- /dev/null
+++ b/games/xinvaders/files/patch-main.c
@@ -0,0 +1,122 @@
+--- main.c.orig
++++ main.c
+@@ -38,55 +38,6 @@
+ {"-debug", "*debug", XrmoptionNoArg, NULL},
+ };
+
+-static XtResource resources[] = {
+- {XtNwidth, XtCWidth, XtRInt, sizeof(int),
+- (Cardinal)&width, XtRImmediate, (caddr_t) VWIDTH},
+- {XtNheight, XtCHeight, XtRInt, sizeof(int),
+- (Cardinal)&height, XtRImmediate, (caddr_t) VHEIGHT},
+- {"debug", "Debug", XtRBoolean, sizeof(Boolean),
+- (Cardinal)&debug, XtRString, "off"},
+- {"font", "Font", XtRString, sizeof(String),
+- (Cardinal)&vaderfont, XtRString, (String)"9x15"},
+- {"scale", "Scale", XtRInt, sizeof(int),
+- (Cardinal)&scale, XtRImmediate, (caddr_t) 2},
+- {"basewait", "BaseWait", XtRInt, sizeof(int),
+- (Cardinal)&basewait, XtRImmediate, (caddr_t) 10},
+- {"vaderwait", "VaderWait", XtRInt, sizeof(int),
+- (Cardinal)&vaderwait, XtRImmediate, (caddr_t) 300},
+- {"spacerwait", "SpacerWait", XtRInt, sizeof(int),
+- (Cardinal)&spacerwait, XtRImmediate, (caddr_t) 50},
+- {"shotwait", "ShotWait", XtRInt, sizeof(int),
+- (Cardinal)&shotwait, XtRImmediate, (caddr_t) 10},
+- {"vshotwait", "VshotWait", XtRInt, sizeof(int),
+- (Cardinal)&vshotwait, XtRImmediate, (caddr_t) 30},
+- {"basecolor", "BaseColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&basepixel, XtRString, "cyan"},
+- {"spacercolor", "SpacerColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&spacerpixel, XtRString, "gray"},
+- {"buildingcolor", "BuildingColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&buildingpixel, XtRString, "yellow"},
+- {"vader1color", "Vader1Color", XtRPixel, sizeof(Pixel),
+- (Cardinal)&vader1pixel, XtRString, "blue"},
+- {"vader2color", "Vader2Color", XtRPixel, sizeof(Pixel),
+- (Cardinal)&vader2pixel, XtRString, "green"},
+- {"vader3color", "Vader3Color", XtRPixel, sizeof(Pixel),
+- (Cardinal)&vader3pixel, XtRString, "red"},
+- {"shotcolor", "ShotColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&shotpixel, XtRString, "lavender"},
+- {"vshotcolor", "VshotColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&vshotpixel, XtRString, "orange"},
+- {"scorecolor", "ScoreColor", XtRPixel, sizeof(Pixel),
+- (Cardinal)&scorepixel, XtRString, "white"},
+- {"maxshots", "MaxShots", XtRInt, sizeof(int),
+- (Cardinal) &maxshots, XtRImmediate, (caddr_t) 1},
+- {"maxvshots", "MaxVshots", XtRInt, sizeof(int),
+- (Cardinal) &maxvshots, XtRImmediate, (caddr_t) 6},
+- {"defaultfore", "DefaultFore", XtRPixel, sizeof(Pixel),
+- (Cardinal) &defaultfore, XtRString, "white"},
+- {"defaultback", "DefaultBack", XtRPixel, sizeof(Pixel),
+- (Cardinal) &defaultback, XtRString, "black"},
+-};
+-
+
+ /*ARGSUSED*/
+ static void CvtStringToFloat(args, num_args, fromVal, toVal)
+@@ -141,13 +92,62 @@
+ return w;
+ }
+
+-int main(Cardinal argc, char **argv)
++int main(int argc, char **argv)
+ {
+ static Arg args[10];
+ int n;
+ Widget form, button;
+ /* extern WidgetClass labelwidgetclass; */
+
++ XtResource resources[] = {
++ {XtNwidth, XtCWidth, XtRInt, sizeof(int),
++ (Cardinal)&width, XtRImmediate, (caddr_t) VWIDTH},
++ {XtNheight, XtCHeight, XtRInt, sizeof(int),
++ (Cardinal)&height, XtRImmediate, (caddr_t) VHEIGHT},
++ {"debug", "Debug", XtRBoolean, sizeof(Boolean),
++ (Cardinal)&debug, XtRString, "off"},
++ {"font", "Font", XtRString, sizeof(String),
++ (Cardinal)&vaderfont, XtRString, (String)"9x15"},
++ {"scale", "Scale", XtRInt, sizeof(int),
++ (Cardinal)&scale, XtRImmediate, (caddr_t) 2},
++ {"basewait", "BaseWait", XtRInt, sizeof(int),
++ (Cardinal)&basewait, XtRImmediate, (caddr_t) 10},
++ {"vaderwait", "VaderWait", XtRInt, sizeof(int),
++ (Cardinal)&vaderwait, XtRImmediate, (caddr_t) 300},
++ {"spacerwait", "SpacerWait", XtRInt, sizeof(int),
++ (Cardinal)&spacerwait, XtRImmediate, (caddr_t) 50},
++ {"shotwait", "ShotWait", XtRInt, sizeof(int),
++ (Cardinal)&shotwait, XtRImmediate, (caddr_t) 10},
++ {"vshotwait", "VshotWait", XtRInt, sizeof(int),
++ (Cardinal)&vshotwait, XtRImmediate, (caddr_t) 30},
++ {"basecolor", "BaseColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&basepixel, XtRString, "cyan"},
++ {"spacercolor", "SpacerColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&spacerpixel, XtRString, "gray"},
++ {"buildingcolor", "BuildingColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&buildingpixel, XtRString, "yellow"},
++ {"vader1color", "Vader1Color", XtRPixel, sizeof(Pixel),
++ (Cardinal)&vader1pixel, XtRString, "blue"},
++ {"vader2color", "Vader2Color", XtRPixel, sizeof(Pixel),
++ (Cardinal)&vader2pixel, XtRString, "green"},
++ {"vader3color", "Vader3Color", XtRPixel, sizeof(Pixel),
++ (Cardinal)&vader3pixel, XtRString, "red"},
++ {"shotcolor", "ShotColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&shotpixel, XtRString, "lavender"},
++ {"vshotcolor", "VshotColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&vshotpixel, XtRString, "orange"},
++ {"scorecolor", "ScoreColor", XtRPixel, sizeof(Pixel),
++ (Cardinal)&scorepixel, XtRString, "white"},
++ {"maxshots", "MaxShots", XtRInt, sizeof(int),
++ (Cardinal) &maxshots, XtRImmediate, (caddr_t) 1},
++ {"maxvshots", "MaxVshots", XtRInt, sizeof(int),
++ (Cardinal) &maxvshots, XtRImmediate, (caddr_t) 6},
++ {"defaultfore", "DefaultFore", XtRPixel, sizeof(Pixel),
++ (Cardinal) &defaultfore, XtRString, "white"},
++ {"defaultback", "DefaultBack", XtRPixel, sizeof(Pixel),
++ (Cardinal) &defaultback, XtRString, "black"},
++};
++
+ setlocale(LC_ALL, "");
+ textdomain(PACKAGE);
+