summaryrefslogtreecommitdiff
path: root/games/supermariowar
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-04-10 12:12:00 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-10 12:12:00 +0700
commitad7c9ab70abae36fdf02632cae6dbc28bca57e22 (patch)
treeba830a29f36fc5ad614420d2a2d217fadbc337a8 /games/supermariowar
parent43f99ca5f1f282c292fa796189c15294fb70cdeb (diff)
downloadslackbuilds-ad7c9ab70abae36fdf02632cae6dbc28bca57e22.tar.gz
games/supermariowar: Added (Super Mario multiplayer game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/supermariowar')
-rw-r--r--games/supermariowar/README14
-rw-r--r--games/supermariowar/compilefixes.diff67
-rw-r--r--games/supermariowar/desktop/smw-leveledit.desktop7
-rw-r--r--games/supermariowar/desktop/smw-worldedit.desktop7
-rw-r--r--games/supermariowar/desktop/smw.desktop8
-rw-r--r--games/supermariowar/doinst.sh3
-rw-r--r--games/supermariowar/icons/smw-leveledit.pngbin0 -> 613 bytes
-rw-r--r--games/supermariowar/icons/smw-worldedit.pngbin0 -> 607 bytes
-rw-r--r--games/supermariowar/icons/smw.pngbin0 -> 678 bytes
-rw-r--r--games/supermariowar/slack-desc19
-rw-r--r--games/supermariowar/supermariowar.SlackBuild100
-rw-r--r--games/supermariowar/supermariowar.info10
12 files changed, 235 insertions, 0 deletions
diff --git a/games/supermariowar/README b/games/supermariowar/README
new file mode 100644
index 0000000000..93229cbe1f
--- /dev/null
+++ b/games/supermariowar/README
@@ -0,0 +1,14 @@
+supermariowar (Super Mario multiplayer game)
+
+Super Mario War is a fan-made multiplayer Super Mario Bros. style
+deathmatch game in which players try to beat one another in a variety of
+gameplay modes. You can play on teams, design your own levels, design your
+own worlds, and much more! The goal is to stomp as many other Marios as
+possible to win the game. It's a tribute to Nintendo and the game Mario
+War by Samuele Poletto.
+
+Notes:
+
+- The game executable is called "smw".
+- Single player games against bots are supported.
+- Only 640x480 windowed and fullscreen video modes are supported.
diff --git a/games/supermariowar/compilefixes.diff b/games/supermariowar/compilefixes.diff
new file mode 100644
index 0000000000..4a36c52c34
--- /dev/null
+++ b/games/supermariowar/compilefixes.diff
@@ -0,0 +1,67 @@
+diff -Naur supermariowar-r16/Makefile supermariowar-r16.patched/Makefile
+--- supermariowar-r16/Makefile 2014-04-08 14:07:20.000000000 -0400
++++ supermariowar-r16.patched/Makefile 2014-04-08 14:09:00.000000000 -0400
+@@ -8,9 +8,9 @@
+ build/savepng.o build/sfx.o
+ SMW_OBJS:= build/HashTable.o build/ai.o build/gamemodes.o build/main.o \
+ build/map.o build/menu.o build/object.o build/player.o \
+- build/splash.o build/uicontrol.o build/uimenu.o build/world.o
++ build/splash.o build/uicontrol.o build/uimenu.o build/world.o build/objecthazard.o build/objectgame.o build/modeoptionsmenu.o build/uicustomcontrol.o
+ LEVELEDIT_OBJS:=build/leveleditor.o
+-WORLDEDIT_OBJS:=build/sfx.o build/world.o build/worldeditor.o
++WORLDEDIT_OBJS:=build/dirlist.o build/eyecandy.o build/FileIO.o build/FileList.o build/global.o build/input.o build/map.o build/MapList.o build/modeoptionsmenu.o build/movingplatform.o build/object.o build/objecthazard.o build/path.o build/savepng.o build/TilesetManager.o build/uicontrol.o build/uimenu.o build/world.o build/worldeditor.o build/gfx.o build/SFont.o build/sfx.o build/linfunc.o
+
+ include configuration
+ #here because of one .c file among a .cpp project (o_O)
+@@ -24,7 +24,7 @@
+ leveledit : $(COMMON_OBJS) $(LEVELEDIT_OBJS)
+ $(CXX) $(CFLAGS) $^ $(LDFLAGS) -o $@
+
+-worldedit : $(COMMON_OBJS) $(WORLDEDIT_OBJS)
++worldedit : $(WORLDEDIT_OBJS)
+ $(CXX) $(CFLAGS) $^ $(LDFLAGS) -o $@
+
+ build/SFont.o : _src/SFont.c
+diff -Naur supermariowar-r16/_src/FileList.cpp supermariowar-r16.patched/_src/FileList.cpp
+--- supermariowar-r16/_src/FileList.cpp 2010-01-06 14:33:55.000000000 -0500
++++ supermariowar-r16.patched/_src/FileList.cpp 2014-03-27 15:06:03.000000000 -0400
+@@ -16,6 +16,7 @@
+ #include "dirlist.h"
+ #include <ctype.h>
+ #include <iostream>
++#include <algorithm>
+ using std::cout;
+ using std::endl;
+ using std::string;
+diff -Naur supermariowar-r16/_src/ai.cpp supermariowar-r16.patched/_src/ai.cpp
+--- supermariowar-r16/_src/ai.cpp 2010-01-06 14:33:55.000000000 -0500
++++ supermariowar-r16.patched/_src/ai.cpp 2014-03-27 15:43:02.000000000 -0400
+@@ -345,7 +345,8 @@
+ {
+ delete itr->second;
+
+- itr = attentionObjects.erase(itr);
++ attentionObjects.erase(itr);
++ itr = attentionObjects.begin();
+ lim = attentionObjects.end();
+ }
+ }
+diff -Naur supermariowar-r16/_src/path.cpp supermariowar-r16.patched/_src/path.cpp
+--- supermariowar-r16/_src/path.cpp 2010-01-06 14:33:55.000000000 -0500
++++ supermariowar-r16.patched/_src/path.cpp 2014-03-27 15:07:56.000000000 -0400
+@@ -1,3 +1,4 @@
++#include <string.h>
+ #include <string>
+ #include <iostream>
+ #include <sys/stat.h>
+diff -Naur supermariowar-r16/_src/uicontrol.cpp supermariowar-r16.patched/_src/uicontrol.cpp
+--- supermariowar-r16/_src/uicontrol.cpp 2010-01-06 14:33:55.000000000 -0500
++++ supermariowar-r16.patched/_src/uicontrol.cpp 2014-03-27 15:45:58.000000000 -0400
+@@ -2,6 +2,7 @@
+ #include <math.h>
+
+ extern void LoadCurrentMapBackground();
++extern void LoadMapHazards(bool fPreview);
+
+ UI_Control::UI_Control(short x, short y)
+ {
diff --git a/games/supermariowar/desktop/smw-leveledit.desktop b/games/supermariowar/desktop/smw-leveledit.desktop
new file mode 100644
index 0000000000..41a05d6c4b
--- /dev/null
+++ b/games/supermariowar/desktop/smw-leveledit.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Super Mario War Level Editor
+Exec=smw-leveleditor
+Icon=smw-leveleditor
+Terminal=false
+Type=Application
+Categories=Game;ActionGame;
diff --git a/games/supermariowar/desktop/smw-worldedit.desktop b/games/supermariowar/desktop/smw-worldedit.desktop
new file mode 100644
index 0000000000..8eee2981f4
--- /dev/null
+++ b/games/supermariowar/desktop/smw-worldedit.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Super Mario War World Editor
+Exec=smw-worldeditor
+Icon=smw-worldeditor
+Terminal=false
+Type=Application
+Categories=Game;ActionGame;
diff --git a/games/supermariowar/desktop/smw.desktop b/games/supermariowar/desktop/smw.desktop
new file mode 100644
index 0000000000..9577b053da
--- /dev/null
+++ b/games/supermariowar/desktop/smw.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Super Mario War
+Comment=Super Mario multiplayer game
+Exec=smw
+Icon=smw
+Terminal=false
+Type=Application
+Categories=Game;ActionGame;
diff --git a/games/supermariowar/doinst.sh b/games/supermariowar/doinst.sh
new file mode 100644
index 0000000000..5fb28930db
--- /dev/null
+++ b/games/supermariowar/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/games/supermariowar/icons/smw-leveledit.png b/games/supermariowar/icons/smw-leveledit.png
new file mode 100644
index 0000000000..6cee4b043c
--- /dev/null
+++ b/games/supermariowar/icons/smw-leveledit.png
Binary files differ
diff --git a/games/supermariowar/icons/smw-worldedit.png b/games/supermariowar/icons/smw-worldedit.png
new file mode 100644
index 0000000000..da8da40f54
--- /dev/null
+++ b/games/supermariowar/icons/smw-worldedit.png
Binary files differ
diff --git a/games/supermariowar/icons/smw.png b/games/supermariowar/icons/smw.png
new file mode 100644
index 0000000000..63cec07f11
--- /dev/null
+++ b/games/supermariowar/icons/smw.png
Binary files differ
diff --git a/games/supermariowar/slack-desc b/games/supermariowar/slack-desc
new file mode 100644
index 0000000000..5981a714f8
--- /dev/null
+++ b/games/supermariowar/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+supermariowar: supermariowar (Super Mario multiplayer game)
+supermariowar:
+supermariowar: Super Mario War is a fan-made multiplayer Super Mario Bros. style
+supermariowar: deathmatch game in which players try to beat one another in a variety
+supermariowar: of gameplay modes. You can play on teams, design your own levels,
+supermariowar: design your own worlds, and much more! The goal is to stomp as many
+supermariowar: other Marios as possible to win the game. It's a tribute to Nintendo
+supermariowar: and the game Mario War by Samuele Poletto.
+supermariowar:
+supermariowar:
+supermariowar:
diff --git a/games/supermariowar/supermariowar.SlackBuild b/games/supermariowar/supermariowar.SlackBuild
new file mode 100644
index 0000000000..c0c290fbd0
--- /dev/null
+++ b/games/supermariowar/supermariowar.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for supermariowar
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=supermariowar
+VERSION=${VERSION:-r16}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# C++ is a fast-moving target, code from 2009, compiler from 2014 or so.
+# Also, the code got refactored and the VC++ projects updated, but the
+# Makefile hadn't been (so I had to parse the VC++ project file, ugh).
+patch -p1 < $CWD/compilefixes.diff
+
+# the configure script isn't autoconf (yay), but it has CRLFs (boo)
+sed -i 's,\r,,g' configure
+sh configure
+sed -i "/^CFLAGS/s,$, $SLKCFLAGS -fpermissive," configuration
+
+make
+
+# 'make install' installs maps/worlds a+w, don't want. We use
+# setgid games executables instead.
+mkdir -p $PKG/usr/games $PKG/usr/share/games/smw/
+install -s -m0755 smw $PKG/usr/games
+install -s -m2755 -g games leveledit $PKG/usr/games/smw-leveledit
+install -s -m2755 -g games worldedit $PKG/usr/games/smw-worldedit
+cp -r gfx maps music sfx tours worlds $PKG/usr/share/games/smw
+chown -R root:games $PKG/usr/share/games/smw
+chmod -R 0775 $PKG/usr/share/games/smw
+
+# icons extracted from _src/icons/*.ico with icotool.
+# .desktop files written for this build.
+# No man pages, since none of the executables take any options.
+mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
+for i in $PKG/usr/games/*; do
+ exe=$(basename $i)
+ cat $CWD/icons/$exe.png > $PKG/usr/share/pixmaps/$exe.png
+ cat $CWD/desktop/$exe.desktop > $PKG/usr/share/applications/$exe.desktop
+done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+# get rid of the CRLFs in the docs
+for i in *.html *.html *.txt; do
+ sed 's,\r,,g' "$i" > $PKG/usr/doc/$PRGNAM-$VERSION/"$i"
+done
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/supermariowar/supermariowar.info b/games/supermariowar/supermariowar.info
new file mode 100644
index 0000000000..ba680b8c17
--- /dev/null
+++ b/games/supermariowar/supermariowar.info
@@ -0,0 +1,10 @@
+PRGNAM="supermariowar"
+VERSION="r16"
+HOMEPAGE="https://code.google.com/p/supermariowar/"
+DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/supermariowar-r16.tar.gz"
+MD5SUM="f64f5471b1d8811265ebbf799915ac76"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"