games/sdlpop: Added (Prince of Persia rewrite).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2016-08-14 08:29:02 +07:00 committed by Willy Sudiarto Raharjo
parent eb3c68f8be
commit 2aea708a44
10 changed files with 721 additions and 0 deletions

5
games/sdlpop/README Normal file
View file

@ -0,0 +1,5 @@
sdlpop (Prince of Persia rewrite)
SDLPoP is an open-source port of Prince of Persia 1, that runs natively
under Windows and Linux. It is based on the DOS version of the game,
and uses SDL 2. All data files needed to play the game are included.

3
games/sdlpop/doinst.sh Normal file
View file

@ -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

291
games/sdlpop/sdlpop.6 Normal file
View file

@ -0,0 +1,291 @@
.\" Man page generated from reStructuredText.
.
.TH SDLPOP 6 "2016-08-13" "1.16" "SlackBuilds.org"
.SH NAME
sdlpop \- open source port of Prince of Persia 1
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" RST source for sdlpop(6) man page. Convert with:
.
.\" rst2man.py sdlpop.rst > sdlpop.6
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
sdlpop [megahit [\fIlevel\fP]] [draw] [full] [demo] [record] [replay | \fIfilename\fP\&.PIR]
.SH DESCRIPTION
.sp
SDLPoP is an open\-source port of Prince of Persia 1, that runs natively under Windows and Linux. It is based on the DOS version of the game, and uses SDL 2. All data files needed to play the game are included.
.sp
This manual page just describes the command\-line options and keyboard controls.
Full documentation can be found in:
.INDENT 0.0
.INDENT 3.5
/usr/doc/sdlpop\-1.16/Readme.txt
.UNINDENT
.UNINDENT
.SH OPTIONS
.sp
\fBNote\fP: options are NOT preceded by \fB\-\fP\&.
.\" notice the **-opt** *param* stuff? rst's option recognition
.
.\" can't handle non-GNU-style options like -option (it thinks the
.
.\" option is -o, and the ption is the parameter). So we have to help
.
.\" it out a little.
.
.sp
\fImegahit\fP Enable cheats.
.INDENT 0.0
.TP
.B \fI1\fP through \fI14\fP
Start the given level. Requires \fImegahit\fP\&.
.UNINDENT
.sp
\fIdraw\fP Draw directly to the screen, skipping the offscreen buffer.
.sp
\fIfull\fP Run in full screen mode.
.sp
\fIdemo\fP Run in demo mode. Only the first two levels will be playable, and quotes from magazine reviews will be displayed.
.sp
\fIrecord\fP Start recording immediately (see the Replays section in Readme.txt).
.INDENT 0.0
.TP
.B \fIreplay\fP or a .PIR filename
Start replaying immediately (see the Replays section in Readme.txt).
Filenames not beginning with \fB/\fP are interpreted as relative paths
from the \fI~/.sdlpop\fP directory, not the current directory.
.UNINDENT
.SH KEYBOARD
.SS Controlling the kid
.INDENT 0.0
.TP
.B \fIleft\fP
turn or run left
.TP
.B \fIright\fP
turn or run right
.TP
.B \fIup\fP
jump or climb up
.TP
.B \fIdown\fP
crouch or climb down
.TP
.B \fIshift\fP
pick up things
.TP
.B \fIshift+left/right\fP
careful step
.TP
.B \fIhome or up+left\fP
jump left
.TP
.B \fIpage up or up+right\fP
jump right
.UNINDENT
.sp
You can also use the numeric keypad.
.SS Gamepad equivalents
.INDENT 0.0
.TP
.B \fIleft/right\fP
left/right
.TP
.B \fIA\fP
down
.TP
.B \fIB\fP
quit
.TP
.B \fIX\fP
shift
.TP
.B \fIY\fP
up
.UNINDENT
.SS Controlling the game
.INDENT 0.0
.TP
.B \fIEsc\fP
pause game
.TP
.B \fIspace\fP
show time left
.TP
.B \fICtrl\-A\fP
restart level
.TP
.B \fICtrl\-G\fP
save game (on levels 3..13)
.TP
.B \fICtrl\-J\fP
joystick/gamepad mode (implemented by segrax)
.TP
.B \fICtrl\-K\fP
keyboard mode
.TP
.B \fICtrl\-R\fP
return to intro
.TP
.B \fICtrl\-S\fP
sound on/off
.TP
.B \fICtrl\-V\fP
show version
.TP
.B \fICtrl\-Q\fP
quit game
.TP
.B \fICtrl\-L\fP
load game (when in the intro)
.TP
.B \fIAlt\-Enter\fP
toggle fullscreen
.TP
.B \fIF6\fP
quicksave
.TP
.B \fIF9\fP
quickload
.UNINDENT
.SS Viewing or recording replays
.INDENT 0.0
.TP
.B \fICtrl+Tab (in game)\fP
start or stop recording
.TP
.B \fITab (on title screen)\fP
view/cycle through the saved replays in the SDLPoP directory
.UNINDENT
.SS Cheats
.INDENT 0.0
.TP
.B \fIShift\-L\fP
go to next level
.TP
.B \fIc\fP
show numbers of current and adjacent rooms
.TP
.B \fIShift\-C\fP
show numbers of diagonally adjacent rooms
.TP
.B \fI\-\fP
less remaining time
.TP
.B \fI+\fP
more remaining time
.TP
.B \fIr\fP
resurrect kid
.TP
.B \fIk\fP
kill guard
.TP
.B \fIShift\-I\fP
flip screen upside\-down
.TP
.B \fIShift\-W\fP
slow falling
.TP
.B \fIh\fP
look at room to the left
.TP
.B \fIj\fP
look at room to the right
.TP
.B \fIu\fP
look at room above
.TP
.B \fIn\fP
look at room below
.TP
.B \fIShift\-B\fP
toggle hiding of non\-animated objects
.TP
.B \fIShift\-S\fP
Restore lost hit\-point. (Like a small red potion.)
.TP
.B \fIShift\-T\fP
Give more hit\-points. (Like a big red potion.)
.UNINDENT
.\" other sections we might want, uncomment as needed.
.
.SH FILES
.INDENT 0.0
.TP
.B \fI/usr/share/games/sdlpop/\fP
Game data files, including graphics, levels, and music.
.TP
.B \fI~/.sdlpop/\fP
Per\-user game directory, created the first time \fBsdlpop\fP is run.
The game changes directory here before running.
Contains symlinks to the data files, and:
.TP
.B \fI~/.sdlpop/SDLPoP.ini\fP
Config file for sdlpop. Copied (not symlinked) from the data directory,
so it can be edited as desired. See the comments in \fBSDLPoP.ini\fP itself
for a description.
.UNINDENT
.\" ENVIRONMENT
.
.\" ===========
.
.\" EXIT STATUS
.
.\" ===========
.
.\" BUGS
.
.\" ====
.
.\" EXAMPLES
.
.\" ========
.
.SH COPYRIGHT
.sp
See the file /usr/doc/sdlpop\-1.16/gpl\-3.0.txt for license information.
.SH AUTHORS
.sp
sdlpop was written by David from forum.princed.org, with contributions
from other forum members.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
Homepage: \fI\%http://www.popot.org/get_the_games.php?game=SDLPoP\fP
.sp
Topic in forum: \fI\%http://forum.princed.org/viewtopic.php?f=69&t=3512\fP
.sp
GitHub: \fI\%https://github.com/NagyD/SDLPoP\fP
.\" Generated by docutils manpage writer.
.

View file

@ -0,0 +1,88 @@
#!/bin/sh
# Slackware build script for sdlpop
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=sdlpop
VERSION=${VERSION:-1.16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -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
ZIPNAME=SDLPoP
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ZIPNAME-$VERSION
unzip -a $CWD/$ZIPNAME-$VERSION.zip -x '*.dll' '*.exe' $ZIPNAME-$VERSION/prince
cd $ZIPNAME-$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 {} \;
sed -i "/^CFLAGS/s,\$, $SLKCFLAGS," Makefile
make
mkdir -p $PKG/usr/libexec/$PRGNAM $PKG/usr/games
install -s -m0755 prince $PKG/usr/libexec/$PRGNAM
install -m0755 $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/games/$PRGNAM
cp -a *.ini *.DAT data $PKG/usr/share/games/$PRGNAM
# man page written for this build
mkdir -p $PKG/usr/man/man6
gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# icon downloaded from:
# http://www.veryicon.com/icons/game/mega-games-pack-26/prince-persia-2008-2.html
# .desktop written for this build
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README.md doc/* $PKG/usr/doc/$PRGNAM-$VERSION
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}

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=sdlpop
Comment=Prince of Persia I
Exec=sdlpop
Icon=sdlpop
Terminal=false
Type=Application
Categories=Game;ActionGame;

10
games/sdlpop/sdlpop.info Normal file
View file

@ -0,0 +1,10 @@
PRGNAM="sdlpop"
VERSION="1.16"
HOMEPAGE="http://www.popot.org/get_the_games.php?game=SDLPoP"
DOWNLOAD="http://www.popot.org/get_the_games/software/SDLPoP/SDLPoP-1.16.zip"
MD5SUM="5b4388383663f7d46287b755da16d4c5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SDL2_mixer SDL2_image"
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

BIN
games/sdlpop/sdlpop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

276
games/sdlpop/sdlpop.rst Normal file
View file

@ -0,0 +1,276 @@
.. RST source for sdlpop(6) man page. Convert with:
.. rst2man.py sdlpop.rst > sdlpop.6
.. rst2man.py comes from the SBo development/docutils package.
.. |version| replace:: 1.16
.. |date| date::
======
sdlpop
======
--------------------------------------
open source port of Prince of Persia 1
--------------------------------------
:Manual section: 6
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
SYNOPSIS
========
sdlpop [megahit [*level*]] [draw] [full] [demo] [record] [replay | *filename*.PIR]
DESCRIPTION
===========
SDLPoP is an open-source port of Prince of Persia 1, that runs natively under Windows and Linux. It is based on the DOS version of the game, and uses SDL 2. All data files needed to play the game are included.
This manual page just describes the command-line options and keyboard controls.
Full documentation can be found in\:
/usr/doc/sdlpop-|version|/Readme.txt
OPTIONS
=======
**Note**: options are NOT preceded by **-**.
.. notice the **-opt** *param* stuff? rst's option recognition
.. can't handle non-GNU-style options like -option (it thinks the
.. option is -o, and the ption is the parameter). So we have to help
.. it out a little.
*megahit* Enable cheats.
*1* through *14*
Start the given level. Requires *megahit*.
*draw* Draw directly to the screen, skipping the offscreen buffer.
*full* Run in full screen mode.
*demo* Run in demo mode. Only the first two levels will be playable, and quotes from magazine reviews will be displayed.
*record* Start recording immediately (see the Replays section in Readme.txt).
*replay* or a .PIR filename
Start replaying immediately (see the Replays section in Readme.txt).
Filenames not beginning with **/** are interpreted as relative paths
from the *~/.sdlpop* directory, not the current directory.
KEYBOARD
========
Controlling the kid
-------------------
*left*
turn or run left
*right*
turn or run right
*up*
jump or climb up
*down*
crouch or climb down
*shift*
pick up things
*shift+left/right*
careful step
*home or up+left*
jump left
*page up or up+right*
jump right
You can also use the numeric keypad.
Gamepad equivalents
-------------------
*left/right*
left/right
*A*
down
*B*
quit
*X*
shift
*Y*
up
Controlling the game
--------------------
*Esc*
pause game
*space*
show time left
*Ctrl-A*
restart level
*Ctrl-G*
save game (on levels 3..13)
*Ctrl-J*
joystick/gamepad mode (implemented by segrax)
*Ctrl-K*
keyboard mode
*Ctrl-R*
return to intro
*Ctrl-S*
sound on/off
*Ctrl-V*
show version
*Ctrl-Q*
quit game
*Ctrl-L*
load game (when in the intro)
*Alt-Enter*
toggle fullscreen
*F6*
quicksave
*F9*
quickload
Viewing or recording replays
----------------------------
*Ctrl+Tab (in game)*
start or stop recording
*Tab (on title screen)*
view/cycle through the saved replays in the SDLPoP directory
Cheats
------
*Shift-L*
go to next level
*c*
show numbers of current and adjacent rooms
*Shift-C*
show numbers of diagonally adjacent rooms
*-*
less remaining time
*+*
more remaining time
*r*
resurrect kid
*k*
kill guard
*Shift-I*
flip screen upside-down
*Shift-W*
slow falling
*h*
look at room to the left
*j*
look at room to the right
*u*
look at room above
*n*
look at room below
*Shift-B*
toggle hiding of non-animated objects
*Shift-S*
Restore lost hit-point. (Like a small red potion.)
*Shift-T*
Give more hit-points. (Like a big red potion.)
.. other sections we might want, uncomment as needed.
FILES
=====
*/usr/share/games/sdlpop/*
Game data files, including graphics, levels, and music.
*~/.sdlpop/*
Per-user game directory, created the first time **sdlpop** is run.
The game changes directory here before running.
Contains symlinks to the data files, and\:
*~/.sdlpop/SDLPoP.ini*
Config file for sdlpop. Copied (not symlinked) from the data directory,
so it can be edited as desired. See the comments in **SDLPoP.ini** itself
for a description.
.. ENVIRONMENT
.. ===========
.. EXIT STATUS
.. ===========
.. BUGS
.. ====
.. EXAMPLES
.. ========
COPYRIGHT
=========
See the file /usr/doc/sdlpop-|version|/gpl-3.0.txt for license information.
AUTHORS
=======
sdlpop was written by David from forum.princed.org, with contributions
from other forum members.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
Homepage: http://www.popot.org/get_the_games.php?game=SDLPoP
Topic in forum: http://forum.princed.org/viewtopic.php?f=69&t=3512
GitHub: https://github.com/NagyD/SDLPoP

21
games/sdlpop/sdlpop.sh Normal file
View file

@ -0,0 +1,21 @@
#!/bin/sh
# 20160812 bkw:
# wrapper script for sdlpop, for slackbuilds.org
EXE=/usr/libexec/sdlpop/prince
USERDIR=$HOME/.sdlpop
SHAREDIR=/usr/share/games/sdlpop
INI=SDLPoP.ini
[ ! -e $USERDIR ] && mkdir -p $USERDIR
cd $USERDIR || exit 1
for file in $SHAREDIR/*; do
base="$( basename "$file" )"
[ -e "$base" ] || ln -s "$file" "$base"
done
[ -L $INI ] && ( rm -f $INI ; cp $SHAREDIR/$INI . )
exec $EXE "$@"

19
games/sdlpop/slack-desc Normal file
View file

@ -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------------------------------------------------------|
sdlpop: sdlpop (Prince of Persia rewrite)
sdlpop:
sdlpop: SDLPoP is an open-source port of Prince of Persia 1, that runs
sdlpop: natively under Windows and Linux. It is based on the DOS version
sdlpop: of the game, and uses SDL 2. All data files needed to play the game
sdlpop: are included.
sdlpop:
sdlpop:
sdlpop:
sdlpop:
sdlpop: