add digger game (#9559)

* add digger game

* Change version to date

* Change version to full date

* Minor fixes
This commit is contained in:
coolcoder613eb
2023-10-04 06:58:59 +00:00
committed by GitHub
parent 8da03240e3
commit 3230e049c3
3 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY;
resource app_version {
major = 1,
middle = 0,
minor = 0,
variety = B_APPV_FINAL,
internal = 0,
short_info = "Digger",
long_info = "An arcade-style game similar to dig dug."
};
resource app_signature "application/x-vnd.digger";
resource vector_icon {
$"6E6369660703FFAA0003010000020104021CFFF006FFFF06060200000100FFEA"
$"06640300FF0003FFD20004FF980902044030C34430BC3930304030BC3930C344"
$"4050BC3950C34450504050C34450BC390204403844383C383840383C38444048"
$"3C48444848404844483C0204402FC3442FBC392F2F402FBC392FC3444051BC39"
$"51C34451514051C34451BC39020840325032BC193228392E32B39DBFF3234324"
$"3FB3C4C2A3313E2D3EBC543E3D48BCC648C063484A40C134404F405445544B54"
$"C038543954BEF5543402033B334232BA45BB112C3C293CB9373C3A363337C160"
$"BB2F02085F3B5F3C5FBD8359395C39C8B839533E533753435843C851435A435E"
$"425EC17B5E405B405D40C9B340563E563F563D5A3CC9553C5D3C0606DF0C4126"
$"43263F263A2D3A263AB975333F33BE9B33C1233347472B472F472602033F27BF"
$"BAB5A93C283B2B3B293B2C3E293D2ABF95B5F302035A395B395639533D533A53"
$"3E563C553D573B100A010102023E3C3C0000000000003E3C3C48B3C348F3C30A"
$"010102023E3C3C0000000000003E3C3CC261E14893C30A000100023DC0000000"
$"000000003DC0004910004950000A000100023DC0000000000000003DC0003E00"
$"0048F0000A010101023E40000000000000003E400048B00048F0000A01010102"
$"3E40000000000000003E4000C280004890000A01010302400000000000000000"
$"4045D1C20000C2745D0A020103023FC1700000000000003FA2E83AD48D43A2E8"
$"0A030104023FA05B000000000000405E43C4F6BABFD1E50A0101050240950A00"
$"00000000004142C4C80D8AC829D80A04010502402AAA000000000000409388C4"
$"A000C598FE0A01010602404EC4000000000000402762C48000C0EC4E0A050106"
$"000A010106023E27620000000000003F13B147C00044313B0A060107000A0602"
$"070800"
};

View File

@@ -0,0 +1,61 @@
SUMMARY="An arcade-style game similar to dig dug"
DESCRIPTION="Digger was originally created by Windmill software in 1983 and \
released as a copy-protected, bootable 5.25 floppy disk for the IBM PC.
As it requires a genuine CGA card, it didn't work on modern PCs.
In 1998, I created Digger Remastered, which runs on all PCs with CGA \
or better and plays just like the original.
It also has many new features, including:
- Exit button
- Optional VGA graphics
- Recording and playback
- Real time speed control
- Keyboard redefinition
- Gauntlet mode
- Two player simultaneous mode"
HOMEPAGE="https://digger.org"
COPYRIGHT="1983 Windmill Software
1998 Andrew Jenner
2002 Maxim Sobolev"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://digger.org/digger-$portVersion.tar.gz"
CHECKSUM_SHA256="e45cb1c5b67fba2fa1b768d1ed75153a64f82e73544c3d98eaf2c37b1dbefdc7"
PATCHES="digger-$portVersion.patchset"
ADDITIONAL_FILES="digger.rdef"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
digger$secondaryArchSuffix = $portVersion
app:Digger = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libSDL_1.2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
make -f Makefile.sdl $jobArgs
}
INSTALL()
{
mkdir -p $appsDir
cp -a digger $appsDir/Digger
addAppDeskbarSymlink $appsDir/Digger
addResourcesToBinaries $portDir/additional-files/digger.rdef $appsDir/Digger
}

View File

@@ -0,0 +1,53 @@
From 0c2df1b57d6e655e5186508f852e19358450eca5 Mon Sep 17 00:00:00 2001
From: coolcoder613eb <96163908+coolcoder613eb@users.noreply.github.com>
Date: Tue, 3 Oct 2023 11:37:35 +1100
Subject: Patches for Haiku
diff --git a/Makefile.sdl b/Makefile.sdl
index 380bad9..e87814f 100644
--- a/Makefile.sdl
+++ b/Makefile.sdl
@@ -4,10 +4,10 @@ OBJS = main.o digger.o drawing.o sprite.o scores.o record.o sound.o \
newsnd.o ini.o input.o monster.o bags.o alpha.o vgagrafx.o \
title_gz.o icon.o sdl_kbd.o sdl_vid.o sdl_timer.o sdl_snd.o
-ARCH = "LINUX"
+#ARCH = "LINUX"
#ARCH = "MINGW"
#ARCH = "FREEBSD"
-#ARCH = "FooOS"
+ARCH = "HAIKU"
ifeq ($(ARCH),"MINGW")
CFLAGS += -mno-cygwin -DMINGW -Dmain=SDL_main -I../zlib -I../SDL-1.1.2/include/SDL
@@ -29,10 +29,10 @@ LIBS += `sdl-config --libs` -lz
ESUFFIX =
endif
-ifeq ($(ARCH),"FooOS")
+ifeq ($(ARCH),"HAIKU")
OBJS += # insert here the names of the files which contains various missing functions like strup() on Linux and FreeBSD
-CFLAGS += -DFooOS # insert here additional compiler flags which required to find include files, trigger os-specific compiler behaviour etc.
-LIBS += # insert here libs required to compile like zlib, SDL etc
+CFLAGS += -DHAIKU `sdl-config --cflags` # insert here additional compiler flags which required to find include files, trigger os-specific compiler behaviour etc.
+LIBS += `sdl-config --libs` -lz # insert here libs required to compile like zlib, SDL etc
ESUFFIX = # insert here suffix of the executable on your platform if any (like ".exe" on Win32)
endif
diff --git a/def.h b/def.h
index fd1fd6c..5894844 100644
--- a/def.h
+++ b/def.h
@@ -10,7 +10,7 @@
#endif
#endif
-#if defined FREEBSD || defined LINUX || defined YOUR_UNIX_LIKE_ARCH_GOING_HERE
+#if defined FREEBSD || defined LINUX || defined HAIKU
#define UNIX
#endif
--
2.37.3