import clonekeen. A commander keen clone.

OK phessler@
This commit is contained in:
edd 2010-10-25 12:12:05 +00:00
parent 1a3c41be16
commit a3fea098fb
11 changed files with 846 additions and 0 deletions

45
games/clonekeen/Makefile Normal file
View File

@ -0,0 +1,45 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
COMMENT = commander keen clone
DISTNAME = clonekeen-src-84
PKGNAME = clonekeen-8.4
CATEGORIES = games
WRKDIST = ${WRKDIR}/keen
WRKBUILD = ${WRKDIST}/src
HOMEPAGE = http://clonekeen.sourceforge.net/
MAINTAINER = Edd Barrett <edd@openbsd.org>
# GPLv3
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
LIB_DEPENDS = ::devel/sdl
WANTLIB = SDL c m pthread stdc++
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=clonekeen/}
USE_X11 = Yes
NO_REGRESS = Yes
# LDFLAGS only used at link time
CPPFLAGS = -I${LOCALBASE}/include
LDFLAGS = -L${LOCALBASE}/lib -pthread
MAKE_ENV = CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}"
do-install:
cp -r ${WRKSRC}/bin ${PREFIX}/share/clonekeen
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/clonekeen
${INSTALL_PROGRAM} ${WRKBUILD}/keen ${PREFIX}/share/clonekeen
${SUBST_CMD} -c -o root -g bin ${FILESDIR}/keen ${PREFIX}/bin/keen
chmod 755 ${PREFIX}/bin/keen
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/clonekeen
${SUBST_CMD} -c -o root -g bin ${FILESDIR}/README.OpenBSD \
${PREFIX}/share/doc/clonekeen/README.OpenBSD
chmod 444 ${PREFIX}/share/doc/clonekeen/README.OpenBSD
.include <bsd.port.mk>

5
games/clonekeen/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (clonekeen-src-84.tar.gz) = AXnDRyfQRPB6HADfNAE0vQ==
RMD160 (clonekeen-src-84.tar.gz) = LU68LeLUrPhj996h/XfUaFD9hJk=
SHA1 (clonekeen-src-84.tar.gz) = 2x93mH/Z+iKaerng/a8+8O8W03Y=
SHA256 (clonekeen-src-84.tar.gz) = notbbY1HoZ0kkkhghAgYjhE11BLjKDQxc7OcqOCmuPU=
SIZE (clonekeen-src-84.tar.gz) = 756931

View File

@ -0,0 +1,20 @@
CloneKeen Game Data Install Instructions
========================================
1) Go and download/buy commander keen for DOS and unzip it somewhere.
In this example we unzip in /tmp/dos.
2) Install dosbox and boot it.
3) At the dosbox prompt type:
MOUNT D /tmp/dos
D:
INSTALL.EXE
4) Follow the installer and choose to install in D:\KEEN
5) When the installer is complete, exit dosbox.
6) (as root) cp /tmp/dos/KEEN/* ${TRUEPREFIX}/share/clonekeen/data
7) type 'keen' and enjoy!

2
games/clonekeen/files/keen Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
cd ${TRUEPREFIX}/share/clonekeen && ./keen

View File

@ -0,0 +1,570 @@
$OpenBSD: patch-src_Makefile,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
--- src/Makefile.orig Tue May 25 03:11:52 2010
+++ src/Makefile Sun Oct 24 20:57:53 2010
@@ -1,4 +1,3 @@
-
all: keen
keen: main.o sanity.o game.o gamedo.o \
@@ -18,7 +17,7 @@ keen: main.o sanity.o game.o gamedo.o \
ai/autoray.o ai/gotpoints.o sdl/keydrv.o sdl/snddrv.o sdl/timedrv.o \
sdl/viddrv.o scale2x/scalebit.o scale2x/scale2x.o scale2x/scale3x.o scale2x/pixel.o \
platform.o
- gcc -o keen \
+ ${CC} -o keen \
main.o sanity.o game.o gamedo.o \
gamepdo.o gamepdo_wm.o editor/editor.o editor/autolight.o console.o \
fileio.o maploader.o map.o graphics.o palette.o \
@@ -36,471 +35,471 @@ keen: main.o sanity.o game.o gamedo.o \
ai/autoray.o ai/gotpoints.o sdl/keydrv.o sdl/snddrv.o sdl/timedrv.o \
sdl/viddrv.o scale2x/scalebit.o scale2x/scale2x.o scale2x/scale3x.o scale2x/pixel.o \
platform.o \
- -lSDL -lSDLmain -lstdc++
+ ${LDFLAGS} -lSDL -lSDLmain -lstdc++
main.o: main.c main.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c main.c -o main.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c main.c -o main.o
sanity.o: sanity.c sanity.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c sanity.c -o sanity.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sanity.c -o sanity.o
game.o: game.c game.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c game.c -o game.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c game.c -o game.o
gamedo.o: gamedo.c gamedo.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c gamedo.c -o gamedo.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c gamedo.c -o gamedo.o
gamepdo.o: gamepdo.c gamepdo.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c gamepdo.c -o gamepdo.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c gamepdo.c -o gamepdo.o
gamepdo_wm.o: gamepdo_wm.c gamepdo_wm.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c gamepdo_wm.c -o gamepdo_wm.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c gamepdo_wm.c -o gamepdo_wm.o
editor/editor.o: editor/editor.c editor/editor.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h editor/buttons.c editor/ghosting.c \
editor/autoblock.c
- gcc -O2 -c editor/editor.c -o editor/editor.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c editor/editor.c -o editor/editor.o
editor/autolight.o: editor/autolight.c editor/autolight.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c editor/autolight.c -o editor/autolight.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c editor/autolight.c -o editor/autolight.o
console.o: console.c console.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c console.c -o console.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c console.c -o console.o
fileio.o: fileio.c fileio.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c fileio.c -o fileio.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c fileio.c -o fileio.o
maploader.o: maploader.c maploader.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c maploader.c -o maploader.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c maploader.c -o maploader.o
map.o: map.c map.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c map.c -o map.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c map.c -o map.o
graphics.o: graphics.c graphics.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c graphics.c -o graphics.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c graphics.c -o graphics.o
palette.o: palette.c palette.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c palette.c -o palette.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c palette.c -o palette.o
fonts.o: fonts.c fonts.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c fonts.c -o fonts.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c fonts.c -o fonts.o
misc.o: misc.c misc.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c misc.c -o misc.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c misc.c -o misc.o
misc_ui.o: misc_ui.c misc_ui.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c misc_ui.c -o misc_ui.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c misc_ui.c -o misc_ui.o
graphicmaker.o: graphicmaker.c graphicmaker.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/vort.h
- gcc -O2 -c graphicmaker.c -o graphicmaker.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c graphicmaker.c -o graphicmaker.o
ini.o: ini.c ini.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ini.c -o ini.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ini.c -o ini.o
intro.o: intro.c intro.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h pressf10.h
- gcc -O2 -c intro.c -o intro.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c intro.c -o intro.o
menumanager.o: menumanager.c menumanager.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c menumanager.c -o menumanager.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c menumanager.c -o menumanager.o
menu_options.o: menu_options.c menu_options.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c menu_options.c -o menu_options.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c menu_options.c -o menu_options.o
menu_keysetup.o: menu_keysetup.c menu_keysetup.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c menu_keysetup.c -o menu_keysetup.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c menu_keysetup.c -o menu_keysetup.o
menu_savegames.o: menu_savegames.c menu_savegames.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c menu_savegames.c -o menu_savegames.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c menu_savegames.c -o menu_savegames.o
menu_custommap.o: menu_custommap.c menu_custommap.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c menu_custommap.c -o menu_custommap.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c menu_custommap.c -o menu_custommap.o
editor/menu_editor.o: editor/menu_editor.c editor/menu_editor.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h menu.h
- gcc -O2 -c editor/menu_editor.c -o editor/menu_editor.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c editor/menu_editor.c -o editor/menu_editor.o
customepisode.o: customepisode.c customepisode.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c customepisode.c -o customepisode.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c customepisode.c -o customepisode.o
savegame.o: savegame.c savegame.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c savegame.c -o savegame.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c savegame.c -o savegame.o
twirly.o: twirly.c twirly.fdh
- gcc -O2 -c twirly.c -o twirly.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c twirly.c -o twirly.o
sgrle.o: sgrle.c sgrle.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c sgrle.c -o sgrle.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sgrle.c -o sgrle.o
lprintf.o: lprintf.c lprintf.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c lprintf.c -o lprintf.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c lprintf.c -o lprintf.o
vgatiles.o: vgatiles.c vgatiles.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h tga.c tga.h
- gcc -O2 -c vgatiles.c -o vgatiles.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c vgatiles.c -o vgatiles.o
latch.o: latch.c latch.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c latch.c -o latch.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c latch.c -o latch.o
lz.o: lz.c lz.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c lz.c -o lz.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c lz.c -o lz.o
message.o: message.c message.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c message.c -o message.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c message.c -o message.o
cinematics/seqcommon.o: cinematics/seqcommon.c cinematics/seqcommon.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/seqcommon.c -o cinematics/seqcommon.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/seqcommon.c -o cinematics/seqcommon.o
cinematics/e1ending.o: cinematics/e1ending.c cinematics/e1ending.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/e1ending.c -o cinematics/e1ending.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/e1ending.c -o cinematics/e1ending.o
cinematics/e3ending.o: cinematics/e3ending.c cinematics/e3ending.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/e3ending.c -o cinematics/e3ending.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/e3ending.c -o cinematics/e3ending.o
cinematics/blowupworld.o: cinematics/blowupworld.c cinematics/blowupworld.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/blowupworld.c -o cinematics/blowupworld.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/blowupworld.c -o cinematics/blowupworld.o
cinematics/mortimer.o: cinematics/mortimer.c cinematics/mortimer.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/mortimer.c -o cinematics/mortimer.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/mortimer.c -o cinematics/mortimer.o
cinematics/TBC.o: cinematics/TBC.c cinematics/TBC.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c cinematics/TBC.c -o cinematics/TBC.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c cinematics/TBC.c -o cinematics/TBC.o
FinaleScreenLoader.o: FinaleScreenLoader.c FinaleScreenLoader.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c FinaleScreenLoader.c -o FinaleScreenLoader.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c FinaleScreenLoader.c -o FinaleScreenLoader.o
globals.o: globals.c globals.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c globals.c -o globals.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c globals.c -o globals.o
ai/yorp.o: ai/yorp.c ai/yorp.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/yorp.c -o ai/yorp.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/yorp.c -o ai/yorp.o
ai/garg.o: ai/garg.c ai/garg.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/garg.c -o ai/garg.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/garg.c -o ai/garg.o
ai/vort.o: ai/vort.c ai/vort.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/vort.h
- gcc -O2 -c ai/vort.c -o ai/vort.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/vort.c -o ai/vort.o
ai/butler.o: ai/butler.c ai/butler.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/butler.c -o ai/butler.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/butler.c -o ai/butler.o
ai/tank.o: ai/tank.c ai/tank.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/tank.c -o ai/tank.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/tank.c -o ai/tank.o
ai/door.o: ai/door.c ai/door.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/door.c -o ai/door.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/door.c -o ai/door.o
ai/ray.o: ai/ray.c ai/ray.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/ray.h
- gcc -O2 -c ai/ray.c -o ai/ray.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/ray.c -o ai/ray.o
ai/icecannon.o: ai/icecannon.c ai/icecannon.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/icecannon.c -o ai/icecannon.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/icecannon.c -o ai/icecannon.o
ai/teleport.o: ai/teleport.c ai/teleport.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/teleport.c -o ai/teleport.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/teleport.c -o ai/teleport.o
ai/rope.o: ai/rope.c ai/rope.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/vort.h
- gcc -O2 -c ai/rope.c -o ai/rope.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/rope.c -o ai/rope.o
ai/walker.o: ai/walker.c ai/walker.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/walker.c -o ai/walker.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/walker.c -o ai/walker.o
ai/tankep2.o: ai/tankep2.c ai/tankep2.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/tankep2.c -o ai/tankep2.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/tankep2.c -o ai/tankep2.o
ai/platform.o: ai/platform.c ai/platform.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/platform.c -o ai/platform.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/platform.c -o ai/platform.o
ai/platvert.o: ai/platvert.c ai/platvert.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/platvert.c -o ai/platvert.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/platvert.c -o ai/platvert.o
ai/vortelite.o: ai/vortelite.c ai/vortelite.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/vortelite.c -o ai/vortelite.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/vortelite.c -o ai/vortelite.o
ai/se.o: ai/se.c ai/se.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/ray.h
- gcc -O2 -c ai/se.c -o ai/se.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/se.c -o ai/se.o
ai/baby.o: ai/baby.c ai/baby.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/baby.c -o ai/baby.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/baby.c -o ai/baby.o
ai/earth.o: ai/earth.c ai/earth.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/earth.c -o ai/earth.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/earth.c -o ai/earth.o
ai/foob.o: ai/foob.c ai/foob.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/foob.c -o ai/foob.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/foob.c -o ai/foob.o
ai/ninja.o: ai/ninja.c ai/ninja.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/ninja.c -o ai/ninja.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/ninja.c -o ai/ninja.o
ai/meep.o: ai/meep.c ai/meep.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/meep.c -o ai/meep.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/meep.c -o ai/meep.o
ai/sndwave.o: ai/sndwave.c ai/sndwave.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/sndwave.c -o ai/sndwave.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/sndwave.c -o ai/sndwave.o
ai/mother.o: ai/mother.c ai/mother.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/mother.c -o ai/mother.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/mother.c -o ai/mother.o
ai/fireball.o: ai/fireball.c ai/fireball.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h ai/ray.h
- gcc -O2 -c ai/fireball.c -o ai/fireball.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/fireball.c -o ai/fireball.o
ai/balljack.o: ai/balljack.c ai/balljack.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/balljack.c -o ai/balljack.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/balljack.c -o ai/balljack.o
ai/nessie.o: ai/nessie.c ai/nessie.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/nessie.c -o ai/nessie.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/nessie.c -o ai/nessie.o
ai/autoray.o: ai/autoray.c ai/autoray.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/autoray.c -o ai/autoray.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/autoray.c -o ai/autoray.o
ai/gotpoints.o: ai/gotpoints.c ai/gotpoints.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c ai/gotpoints.c -o ai/gotpoints.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ai/gotpoints.c -o ai/gotpoints.o
sdl/keydrv.o: sdl/keydrv.c sdl/keydrv.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c sdl/keydrv.c -o sdl/keydrv.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sdl/keydrv.c -o sdl/keydrv.o
sdl/snddrv.o: sdl/snddrv.c sdl/snddrv.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h sdl/snddrv.h
- gcc -O2 -c sdl/snddrv.c -o sdl/snddrv.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sdl/snddrv.c -o sdl/snddrv.o
sdl/timedrv.o: sdl/timedrv.c sdl/timedrv.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c sdl/timedrv.c -o sdl/timedrv.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sdl/timedrv.c -o sdl/timedrv.o
sdl/viddrv.o: sdl/viddrv.c sdl/viddrv.fdh keen.h osparam.h \
sounds.h latch.h game.h \
keys.h macros.h ai/enemydata.h \
globals.h
- gcc -O2 -c sdl/viddrv.c -o sdl/viddrv.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c sdl/viddrv.c -o sdl/viddrv.o
scale2x/scalebit.o: scale2x/scalebit.c scale2x/scalebit.fdh scale2x/scale2x.h scale2x/scale3x.h
- gcc -O2 -c scale2x/scalebit.c -o scale2x/scalebit.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c scale2x/scalebit.c -o scale2x/scalebit.o
scale2x/scale2x.o: scale2x/scale2x.c scale2x/scale2x.fdh scale2x/scale2x.h
- gcc -O2 -c scale2x/scale2x.c -o scale2x/scale2x.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c scale2x/scale2x.c -o scale2x/scale2x.o
scale2x/scale3x.o: scale2x/scale3x.c scale2x/scale3x.fdh scale2x/scale3x.h
- gcc -O2 -c scale2x/scale3x.c -o scale2x/scale3x.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c scale2x/scale3x.c -o scale2x/scale3x.o
scale2x/pixel.o: scale2x/pixel.c scale2x/pixel.fdh scale2x/pixel.h
- gcc -O2 -c scale2x/pixel.c -o scale2x/pixel.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c scale2x/pixel.c -o scale2x/pixel.o
platform.o: platform.cpp platform.fdh platform/haiku.cpp platform/win32.cpp \
platform/stub.cpp
- gcc -O2 -c platform.cpp -o platform.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c platform.cpp -o platform.o
clean:

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_keen_h,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
--- src/keen.h.orig Sun Oct 24 22:28:25 2010
+++ src/keen.h Sun Oct 24 22:28:50 2010
@@ -765,5 +765,8 @@ typedef struct stPlayer
#define ENEMY_STOPPOINT 1000
#define BALL_NOPASSPOINT 1001
+#define KEEN_SAVE_DIR ".clonekeen"
+#define KEEN_MAX_SAVENAME 64
+
#include "globals.h"

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_menu_savegames_c,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
--- src/menu_savegames.c.orig Sun Oct 24 23:00:24 2010
+++ src/menu_savegames.c Sun Oct 24 23:01:32 2010
@@ -59,10 +59,19 @@ void loadsavegamenames(void)
FILE *fp;
int i;
char fname[40];
+char *userhome;
+
+ userhome = getenv("HOME");
+ if (userhome == NULL) {
+ fprintf(stderr, "can't get $HOME\n");
+ return;
+ }
+
justsaved = -1;
for(i=1;i<10;i++)
{
- sprintf(fname, "savegame%d.dat", i);
+ snprintf(fname, KEEN_MAX_SAVENAME,
+ "%s/" KEEN_SAVE_DIR "/savegame%d.dat", userhome, i);
savegames[i].exists = 0;
if (IsValidSaveGame(fname))
{

View File

@ -0,0 +1,104 @@
$OpenBSD: patch-src_savegame_c,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
Make sure the saves are in the user's home dir where they have write access
--- src/savegame.c.orig Tue May 25 03:11:52 2010
+++ src/savegame.c Sun Oct 24 23:11:23 2010
@@ -1,26 +1,50 @@
// routines for handling save&load of savegames
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
#include "keen.h"
#include "savegame.fdh"
#define SG_HEADERSIZE 8
-
char game_save(int slot)
{
FILE *fp;
-char fname[20];
+char fname[KEEN_MAX_SAVENAME];
int i;
+char *userhome;
+struct stat st;
// can't save game under certain circumstances
if (fade_in_progress()) return 1;
-
- sprintf(fname, "savegame%d.dat", slot);
-
+ userhome = getenv("HOME");
+ if (userhome == NULL) {
+ fprintf(stderr, "can't get $HOME\n");
+ return 1;
+ }
+
+ snprintf(fname, KEEN_MAX_SAVENAME, "%s/" KEEN_SAVE_DIR, userhome);
+ if (mkdir(fname, 0755) != 0) {
+ /* ok to fail so long as a dir */
+ stat(fname, &st);
+ if (! (st.st_mode & S_IFDIR)) {
+ perror(fname);
+ return 1;
+ }
+ }
+
+ snprintf(fname, KEEN_MAX_SAVENAME,
+ "%s/" KEEN_SAVE_DIR "/savegame%d.dat", userhome, slot);
+
lprintf("Saving game to %s\n", fname);
fp = fileopen(fname, "wb");
- if (!fp) return 1;
+ if (!fp) {
+ perror(fname);
+ return 1;
+ }
fprintf(fp, "CKSAVE%c", SAVEGAMEVERSION);
fputc(IsBigEndian(), fp);
@@ -127,12 +151,19 @@ char custom = 0;
char game_load(int slot)
{
FILE *fp;
-char fname[20];
+char fname[KEEN_MAX_SAVENAME];
uchar episode, level, lives, iscustom;
int i;
+char *userhome;
+ userhome = getenv("HOME");
+ if (userhome == NULL) {
+ fprintf(stderr, "can't get $HOME\n");
+ return 1;
+ }
- sprintf(fname, "savegame%d.dat", slot);
+ snprintf(fname, KEEN_MAX_SAVENAME,
+ "%s/" KEEN_SAVE_DIR "/savegame%d.dat", userhome, slot);
if (!IsValidSaveGame(fname))
{
@@ -210,8 +241,16 @@ int i;
void DeleteSaveGame(int slot)
{
-char fname[20];
+char fname[KEEN_MAX_SAVENAME];
+char *userhome;
- sprintf(fname, "savegame%d.dat", slot);
+ userhome = getenv("HOME");
+ if (userhome == NULL) {
+ fprintf(stderr, "can't get $HOME\n");
+ return;
+ }
+
+ snprintf(fname, KEEN_MAX_SAVENAME,
+ "%s/" KEEN_SAVE_DIR "/savegame%d.dat", userhome, slot);
remove(fname);
}

View File

@ -0,0 +1,4 @@
This is a very nearly complete clone of one of my favorite classic DOS
games, Commander Keen: Invasion of the Vorticons by ID. The game is
written in pure C, uses SDL, and is generally very easy to compile on
most platforms.

View File

@ -0,0 +1,2 @@
Please see ${TRUEPREFIX}/share/doc/clonekeen/README.OpenBSD for
instructions on how to set up clonekeen.

58
games/clonekeen/pkg/PLIST Normal file
View File

@ -0,0 +1,58 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/10/25 12:12:05 edd Exp $
bin/keen
share/clonekeen/
share/clonekeen/custom/
share/clonekeen/custom/ANY_OTHERS.ck2
share/clonekeen/custom/AUTOLIGHT.ck2
share/clonekeen/custom/CK PINK.ck3
share/clonekeen/custom/Colorful.ck1
share/clonekeen/custom/CuteMini.ck2
share/clonekeen/custom/EXTPLAT.ck2
share/clonekeen/custom/GOOPERS.ck2
share/clonekeen/custom/MYMAP.ck2
share/clonekeen/custom/PLATFORMS.ck2
share/clonekeen/custom/ROPE.ck1
share/clonekeen/custom/SILLYMAP.ck1
share/clonekeen/custom/TEST.ck1
share/clonekeen/custom/TEST.ck2
share/clonekeen/custom/ZIGGY.ck1
share/clonekeen/custom/gunraid.ck3
share/clonekeen/custom/tubes.ck2
share/clonekeen/data/
share/clonekeen/data/sounds.ck2
share/clonekeen/data/sounds.ck3
share/clonekeen/demolvl.ck1
share/clonekeen/ep1attr.dat
share/clonekeen/ep1demo1.dat
share/clonekeen/ep1demo2.dat
share/clonekeen/ep1demo3.dat
share/clonekeen/ep2attr.dat
share/clonekeen/ep3attr.dat
share/clonekeen/flags.ini
share/clonekeen/gfx/
share/clonekeen/gfx/100.tga
share/clonekeen/gfx/1000.tga
share/clonekeen/gfx/200.tga
share/clonekeen/gfx/500.tga
share/clonekeen/gfx/5000.tga
share/clonekeen/gfx/arrowd.tga
share/clonekeen/gfx/arrowlr.tga
share/clonekeen/gfx/arrowu.tga
share/clonekeen/gfx/arrowud.tga
share/clonekeen/gfx/arrowul.tga
share/clonekeen/gfx/arrowur.tga
share/clonekeen/gfx/cklogo1.tga
share/clonekeen/gfx/cklogo2.tga
share/clonekeen/gfx/demobox.tga
share/clonekeen/gfx/gunup.tga
share/clonekeen/gfx/shotup.tga
share/clonekeen/gfx/tile185.tga
share/clonekeen/gfx/tile190.tga
share/clonekeen/gfx/version.tga
share/clonekeen/gfx/yorpshield.tga
@bin share/clonekeen/keen
share/clonekeen/keen.conf
share/clonekeen/palette.ini
share/clonekeen/strings.dat
share/doc/clonekeen/
share/doc/clonekeen/README.OpenBSD