diff options
author | B. Watson <yalhcru@gmail.com> | 2017-03-17 07:36:03 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-03-18 06:58:59 +0700 |
commit | da8a24a7a3f4d844d49fc09aea39e43fe319d4f7 (patch) | |
tree | 6b145ea79e8bd261b43f8dd8a4b0a0b8d1862143 /games/sdlpop | |
parent | ff46e23a982ed602bf0d36eb617cb24777d0e2e4 (diff) |
games/sdlpop: Updated for version 1.17.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/sdlpop')
-rw-r--r-- | games/sdlpop/sdlpop.6 | 136 | ||||
-rw-r--r-- | games/sdlpop/sdlpop.SlackBuild | 28 | ||||
-rw-r--r-- | games/sdlpop/sdlpop.info | 6 | ||||
-rw-r--r-- | games/sdlpop/sdlpop.rst | 127 | ||||
-rw-r--r-- | games/sdlpop/sdlpop.sh | 13 |
5 files changed, 176 insertions, 134 deletions
diff --git a/games/sdlpop/sdlpop.6 b/games/sdlpop/sdlpop.6 index ce8b70f097111..95c66cf7276b0 100644 --- a/games/sdlpop/sdlpop.6 +++ b/games/sdlpop/sdlpop.6 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH SDLPOP 6 "2016-08-13" "1.16" "SlackBuilds.org" +.TH SDLPOP 6 "2017-03-17" "1.17" "SlackBuilds.org" .SH NAME sdlpop \- open source port of Prince of Persia 1 . @@ -38,7 +38,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] . .SH SYNOPSIS .sp -sdlpop [megahit [\fIlevel\fP]] [draw] [full] [demo] [record] [replay | \fIfilename\fP\&.PIR] +sdlpop [megahit [\fIlevel\fP]] [draw] [full] [demo] [record] [replay | \fIfilename.PIR\fP] [validate \fIfilename.PIR\fP] [mod \fImod_name\fP] [debug] [seed=number] .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. @@ -47,20 +47,12 @@ 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 +/usr/doc/sdlpop\-1.17/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. -. +\fBNote\fP: options are NOT preceded by \fB\-\fP, except for \fI\-\-help\fP and \fI\-\-version\fP\&. .sp \fImegahit\fP Enable cheats. .INDENT 0.0 @@ -82,6 +74,24 @@ Start the given level. Requires \fImegahit\fP\&. 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. +.TP +.B \fIvalidate\fP \fBreplays/filename.p1r\fP +Print out information about a replay file and quit. +.TP +.B \fImod\fP \fBmod_name\fP +Run with custom data files from \fB~/.sdlpop/mods/mod_name\fP\&. +.TP +.B \fIdebug\fP +Enable debug cheats. +.TP +.B \fIseed=number\fP +Set initial random seed, for testing. +.TP +.B \fI\-\-version\fP, \fI\-v\fP +Display SDLPoP version and quit. +.TP +.B \fI\-\-help\fP, \fI\-h\fP, \fI\-?\fP +Display help and quit. .UNINDENT .SH KEYBOARD .SS Controlling the kid @@ -135,109 +145,125 @@ up .INDENT 0.0 .TP .B \fIEsc\fP -pause game +Pause game. .TP .B \fIspace\fP -show time left +Show time left. .TP .B \fICtrl\-A\fP -restart level +Restart level. .TP .B \fICtrl\-G\fP -save game (on levels 3..13) +Save game (on levels 3..13). .TP .B \fICtrl\-J\fP -joystick/gamepad mode (implemented by segrax) +Joystick/gamepad mode (implemented by segrax). .TP .B \fICtrl\-K\fP -keyboard mode +Keyboard mode. .TP .B \fICtrl\-R\fP -return to intro +Return to intro. .TP .B \fICtrl\-S\fP -sound on/off +Sound on/off. .TP .B \fICtrl\-V\fP -show version +Show version. .TP .B \fICtrl\-Q\fP -quit game +Quit game. .TP .B \fICtrl\-L\fP -load game (when in the intro) +Load game (when in the intro). .TP .B \fIAlt\-Enter\fP -toggle fullscreen +Toggle fullscreen. .TP .B \fIF6\fP -quicksave +Quicksave. .TP .B \fIF9\fP -quickload +Quickload. .UNINDENT .SS Viewing or recording replays .INDENT 0.0 .TP .B \fICtrl+Tab (in game)\fP -start or stop recording +start or stop recording. .TP .B \fITab (on title screen)\fP -view/cycle through the saved replays in the SDLPoP directory +View/cycle through the saved replays in the \fB~/.sdlpop/replays\fP directory. +.TP +.B \fIF (while viewing a replay)\fP +Skip forward to the next room. +.TP +.B \fIShift\-F (while viewing a replay)\fP +Skip forward to the next level. .UNINDENT .SS Cheats .INDENT 0.0 .TP .B \fIShift\-L\fP -go to next level +Go to next level. .TP .B \fIc\fP -show numbers of current and adjacent rooms +Show numbers of current and adjacent rooms. .TP .B \fIShift\-C\fP -show numbers of diagonally adjacent rooms +Show numbers of diagonally adjacent rooms. .TP .B \fI\-\fP -less remaining time +Less remaining time. .TP .B \fI+\fP -more remaining time +More remaining time. .TP .B \fIr\fP -resurrect kid +Resurrect kid. .TP .B \fIk\fP -kill guard +Kill guard. .TP .B \fIShift\-I\fP -flip screen upside\-down +Flip screen upside\-down. .TP .B \fIShift\-W\fP -slow falling +Slow falling. .TP .B \fIh\fP -look at room to the left +Look at room to the left. .TP .B \fIj\fP -look at room to the right +Look at room to the right. .TP .B \fIu\fP -look at room above +Look at room above. .TP .B \fIn\fP -look at room below +Look at room below. .TP .B \fIShift\-B\fP -toggle hiding of non\-animated objects +Toggle hiding of non\-animated objects. .TP .B \fIShift\-S\fP -Restore lost hit\-point. (Like a small red potion.) +Restore lost hit\-point (like a small red potion). .TP .B \fIShift\-T\fP -Give more hit\-points. (Like a big red potion.) +Give more hit\-points (like a big red potion). +.UNINDENT +.SS Debug cheats +.INDENT 0.0 +.TP +.B \fI[\fP +Shift kid 1 pixel to the left. +.TP +.B \fI]\fP +Shift kid 1 pixel to the right. +.TP +.B \fIt\fP +Toggle timer. .UNINDENT -.\" other sections we might want, uncomment as needed. -. .SH FILES .INDENT 0.0 .TP @@ -254,25 +280,9 @@ 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. +See the file /usr/doc/sdlpop\-1.17/gpl\-3.0.txt for license information. .SH AUTHORS .sp sdlpop was written by David from forum.princed.org, with contributions diff --git a/games/sdlpop/sdlpop.SlackBuild b/games/sdlpop/sdlpop.SlackBuild index 71e9b00a3e679..f24ccdcb4fe55 100644 --- a/games/sdlpop/sdlpop.SlackBuild +++ b/games/sdlpop/sdlpop.SlackBuild @@ -6,8 +6,16 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170316 bkw: +# - updated for v1.17. +# - use github for download (saves bandwidth, the homepage's zip file has +# windows exes and dlls in it). +# - don't include README.md (it just says 'see Readme.txt'). +# - update man page (new 1.17 options). +# - update wrapper script to support both system-wide and per-user mods. + PRGNAM=sdlpop -VERSION=${VERSION:-1.16} +VERSION=${VERSION:-1.17} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -46,7 +54,7 @@ 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 +unzip -a $CWD/$ZIPNAME-$VERSION.zip cd $ZIPNAME-$VERSION chown -R root:root . find -L . \ @@ -55,29 +63,33 @@ find -L . \ \( -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 +sed -i "/^CFLAGS/s,\$, $SLKCFLAGS," src/Makefile +make -C src 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 +cp -a *.ini data mods $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 +mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps + # 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 +# 1.17 now has an icon.png, but it's 32x32 and not transparent, so I'll keep +# using the one I used for 1.16. cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +# .desktop written for this build 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 +cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/sdlpop/sdlpop.info b/games/sdlpop/sdlpop.info index 60c3151ab73eb..2257584d38fb4 100644 --- a/games/sdlpop/sdlpop.info +++ b/games/sdlpop/sdlpop.info @@ -1,8 +1,8 @@ PRGNAM="sdlpop" -VERSION="1.16" +VERSION="1.17" 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="https://github.com/NagyD/SDLPoP/archive/v1.17/SDLPoP-1.17.zip" +MD5SUM="802b57717498277721b19a5d3f26deb5" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="SDL2_mixer SDL2_image" diff --git a/games/sdlpop/sdlpop.rst b/games/sdlpop/sdlpop.rst index 5e12111fb8b63..79e6fc5cc99f3 100644 --- a/games/sdlpop/sdlpop.rst +++ b/games/sdlpop/sdlpop.rst @@ -2,7 +2,7 @@ .. rst2man.py sdlpop.rst > sdlpop.6 .. rst2man.py comes from the SBo development/docutils package. -.. |version| replace:: 1.16 +.. |version| replace:: 1.17 .. |date| date:: ====== @@ -21,7 +21,7 @@ open source port of Prince of Persia 1 SYNOPSIS ======== -sdlpop [megahit [*level*]] [draw] [full] [demo] [record] [replay | *filename*.PIR] +sdlpop [megahit [*level*]] [draw] [full] [demo] [record] [replay | *filename.PIR*] [validate *filename.PIR*] [mod *mod_name*] [debug] [seed=number] DESCRIPTION =========== @@ -36,12 +36,7 @@ Full documentation can be found in\: 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. +**Note**: options are NOT preceded by **-**, except for *--help* and *--version*. *megahit* Enable cheats. @@ -61,13 +56,30 @@ OPTIONS Filenames not beginning with **/** are interpreted as relative paths from the *~/.sdlpop* directory, not the current directory. +*validate* **replays/filename.p1r** + Print out information about a replay file and quit. + +*mod* **mod_name** + Run with custom data files from **~/.sdlpop/mods/mod_name**. + +*debug* + Enable debug cheats. + +*seed=number* + Set initial random seed, for testing. + +*--version*, *-v* + Display SDLPoP version and quit. + +*--help*, *-h*, *-?* + Display help and quit. + KEYBOARD ======== Controlling the kid ------------------- - *left* turn or run left @@ -97,7 +109,6 @@ You can also use the numeric keypad. Gamepad equivalents ------------------- - *left/right* left/right @@ -116,112 +127,126 @@ Gamepad equivalents Controlling the game -------------------- - *Esc* - pause game + Pause game. *space* - show time left + Show time left. *Ctrl-A* - restart level + Restart level. *Ctrl-G* - save game (on levels 3..13) + Save game (on levels 3..13). *Ctrl-J* - joystick/gamepad mode (implemented by segrax) + Joystick/gamepad mode (implemented by segrax). *Ctrl-K* - keyboard mode + Keyboard mode. *Ctrl-R* - return to intro + Return to intro. *Ctrl-S* - sound on/off + Sound on/off. *Ctrl-V* - show version + Show version. *Ctrl-Q* - quit game + Quit game. *Ctrl-L* - load game (when in the intro) + Load game (when in the intro). *Alt-Enter* - toggle fullscreen + Toggle fullscreen. *F6* - quicksave + Quicksave. *F9* - quickload + Quickload. Viewing or recording replays ---------------------------- - *Ctrl+Tab (in game)* - start or stop recording + start or stop recording. *Tab (on title screen)* - view/cycle through the saved replays in the SDLPoP directory + View/cycle through the saved replays in the **~/.sdlpop/replays** directory. + +*F (while viewing a replay)* + Skip forward to the next room. + +*Shift-F (while viewing a replay)* + Skip forward to the next level. Cheats ------ *Shift-L* - go to next level + Go to next level. *c* - show numbers of current and adjacent rooms + Show numbers of current and adjacent rooms. *Shift-C* - show numbers of diagonally adjacent rooms + Show numbers of diagonally adjacent rooms. *-* - less remaining time + Less remaining time. *+* - more remaining time + More remaining time. *r* - resurrect kid + Resurrect kid. *k* - kill guard + Kill guard. *Shift-I* - flip screen upside-down + Flip screen upside-down. *Shift-W* - slow falling + Slow falling. *h* - look at room to the left + Look at room to the left. *j* - look at room to the right + Look at room to the right. *u* - look at room above + Look at room above. *n* - look at room below + Look at room below. *Shift-B* - toggle hiding of non-animated objects + Toggle hiding of non-animated objects. *Shift-S* - Restore lost hit-point. (Like a small red potion.) + Restore lost hit-point (like a small red potion). *Shift-T* - Give more hit-points. (Like a big red potion.) + Give more hit-points (like a big red potion). + +Debug cheats +------------ + +*[* + Shift kid 1 pixel to the left. -.. other sections we might want, uncomment as needed. +*]* + Shift kid 1 pixel to the right. + +*t* + Toggle timer. FILES ===== @@ -239,18 +264,6 @@ FILES so it can be edited as desired. See the comments in **SDLPoP.ini** itself for a description. -.. ENVIRONMENT -.. =========== - -.. EXIT STATUS -.. =========== - -.. BUGS -.. ==== - -.. EXAMPLES -.. ======== - COPYRIGHT ========= diff --git a/games/sdlpop/sdlpop.sh b/games/sdlpop/sdlpop.sh index 84a03f6953587..e3d41f51d864d 100644 --- a/games/sdlpop/sdlpop.sh +++ b/games/sdlpop/sdlpop.sh @@ -3,6 +3,10 @@ # 20160812 bkw: # wrapper script for sdlpop, for slackbuilds.org +# 20170317 bkw: updated for v1.17, mods dir has to be writable by users, +# so we can't just symlink it from /usr/share. however, if any mods are +# in /usr/share, we copy them (again, need to be writable) + EXE=/usr/libexec/sdlpop/prince USERDIR=$HOME/.sdlpop SHAREDIR=/usr/share/games/sdlpop @@ -11,11 +15,14 @@ INI=SDLPoP.ini [ ! -e $USERDIR ] && mkdir -p $USERDIR cd $USERDIR || exit 1 -for file in $SHAREDIR/*; do +[ -e data ] || ln -s $SHAREDIR/data data + +mkdir -p mods +for file in $SHAREDIR/mods/*; do base="$( basename "$file" )" - [ -e "$base" ] || ln -s "$file" "$base" + [ -e mods/"$base" ] || cp -a "$file" mods/"$base" done -[ -L $INI ] && ( rm -f $INI ; cp $SHAREDIR/$INI . ) +[ -e $INI ] || cp $SHAREDIR/$INI . exec $EXE "$@" |