New package: kobodeluxe-0.5.1

This commit is contained in:
Jürgen Buchmüller 2015-10-11 17:59:17 +02:00
parent e7ed9be2e5
commit 4cf73fb4d1
6 changed files with 217 additions and 0 deletions

1
srcpkgs/kobodeluxe-data Symbolic link
View File

@ -0,0 +1 @@
kobodeluxe

View File

@ -0,0 +1,7 @@
case "$ACTION" in
post) if [ "$UPDATE" != "yes" ]; then
mkdir -p /var/games/kobo-deluxe/scores
chmod 777 /var/games/kobo-deluxe/scores
fi
;;
esac

View File

@ -0,0 +1,6 @@
case "$ACTION" in
post) if [ "$UPDATE" != "yes" ]; then
rm -r /var/games/kobo-deluxe
fi
;;
esac

View File

@ -0,0 +1,11 @@
--- graphics/window.cpp 2007-12-14 10:13:24.000000000 +0100
+++ graphics/window.cpp 2015-10-11 17:14:24.004560636 +0200
@@ -398,7 +398,7 @@
*/
if(token)
{
- char *tok = strchr(txt, token);
+ const char *tok = strchr(txt, token);
if(tok)
tokpos = tok-txt;
else

View File

@ -0,0 +1,156 @@
The name pipe2 clashes with unistd.h function pipe2(3),
thus rename pipe1 and pipe2 to kpipe1 and kpipe2.
--- enemies.h 2007-12-24 09:18:52.000000000 +0100
+++ enemies.h 2015-10-11 17:20:42.882531076 +0200
@@ -70,9 +70,9 @@
extern const enemy_kind bomb2;
extern const enemy_kind bombdeto;
extern const enemy_kind cannon;
-extern const enemy_kind pipe1;
+extern const enemy_kind kpipe1;
extern const enemy_kind core;
-extern const enemy_kind pipe2;
+extern const enemy_kind kpipe2;
extern const enemy_kind rock;
extern const enemy_kind ring;
extern const enemy_kind enemy_m1;
@@ -157,11 +157,11 @@
void move_core();
void kill_core();
- void make_pipe1();
- void move_pipe1();
+ void make_kpipe1();
+ void move_kpipe1();
- void make_pipe2();
- void move_pipe2();
+ void make_kpipe2();
+ void move_kpipe2();
void make_enemy1();
void move_enemy1();
@@ -430,7 +430,7 @@
inline int _enemy::is_pipe()
{
- return ((_state != notuse) && ((ek == &pipe1) || (ek == &pipe2)));
+ return ((_state != notuse) && ((ek == &kpipe1) || (ek == &kpipe2)));
}
--- enemy.cpp 2007-12-24 11:36:46.000000000 +0100
+++ enemy.cpp 2015-10-11 17:20:18.011533017 +0200
@@ -713,7 +713,7 @@
void _enemy::kill_cannon()
{
- enemies.make(&pipe1, CS2PIXEL(x), CS2PIXEL(y));
+ enemies.make(&kpipe1, CS2PIXEL(x), CS2PIXEL(y));
sound.g_base_node_explo(x, y);
release();
}
@@ -755,10 +755,10 @@
void _enemy::kill_core()
{
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
enemies.make(&explosion4, CS2PIXEL(x), CS2PIXEL(y));
sound.g_base_core_explo(x, y);
release();
@@ -777,10 +777,10 @@
/*
* ===========================================================================
- * pipe1
+ * kpipe1
* ===========================================================================
*/
-void _enemy::make_pipe1()
+void _enemy::make_kpipe1()
{
health = 1;
damage = 0;
@@ -790,7 +790,7 @@
b = 0;
}
-void _enemy::move_pipe1()
+void _enemy::move_kpipe1()
{
sound.g_pipe_rumble(x, y);
if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1))
@@ -851,10 +851,10 @@
screen.set_map(x1, y1, m ^ a);
release();
}
-const enemy_kind pipe1 = {
+const enemy_kind kpipe1 = {
0,
- &_enemy::make_pipe1,
- &_enemy::move_pipe1,
+ &_enemy::make_kpipe1,
+ &_enemy::move_kpipe1,
&_enemy::kill_default,
-1,
-1, 0,
@@ -863,10 +863,10 @@
/*
* ===========================================================================
- * pipe2
+ * kpipe2
* ===========================================================================
*/
-void _enemy::make_pipe2()
+void _enemy::make_kpipe2()
{
int x1 = (CS2PIXEL(x) & (WORLD_SIZEX - 1)) >> 4;
int y1 = (CS2PIXEL(y) & (WORLD_SIZEY - 1)) >> 4;
@@ -898,7 +898,7 @@
}
-void _enemy::move_pipe2()
+void _enemy::move_kpipe2()
{
if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1))
enemies.make(&explosion,
@@ -978,22 +978,22 @@
}
p ^= a;
if(p & U_MASK)
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
if(p & R_MASK)
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
if(p & D_MASK)
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
if(p & L_MASK)
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
manage.add_score(10);
release();
}
-const enemy_kind pipe2 = {
+const enemy_kind kpipe2 = {
0,
- &_enemy::make_pipe2,
- &_enemy::move_pipe2,
+ &_enemy::make_kpipe2,
+ &_enemy::move_kpipe2,
&_enemy::kill_default,
-1,
-1, 0,

View File

@ -0,0 +1,36 @@
# Template file for 'kobodeluxe'
pkgname=kobodeluxe
version=0.5.1
revision=1
wrksrc="KoboDeluxe-${version}"
build_style=gnu-configure
configure_args="--sharedstatedir=/var/games"
hostmakedepends="pkg-config"
makedepends="SDL_image-devel"
depends="${pkgname}-data"
short_desc="Space shooter in 2D"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2"
homepage="http://olofson.net/kobodl/"
distfiles="${homepage}/download/KoboDeluxe-${version}.tar.bz2"
checksum=0f7b910a399d985437564af8c5d81d6dcf22b96b26b01488d72baa6a6fdb5c2c
post_extract() {
tar xf icons.tar.gz
}
post_install() {
vinstall icons/KDE/kobo-deluxe.desktop 644 usr/share/applications kobodl.desktop
for _size in 16 22 32 48 64 128; do
vinstall icons/KDE/icons/${_size}x${_size}/kobodl.png 644 \
usr/share/icons/hicolor/${_size}x${_size}/apps
done
vinstall icons/KDE/icons/32x32/kobodl.png 644 usr/share/pixmaps
}
kobodeluxe-data_package() {
short_desc+=" - data files"
noarch=yes
pkg_install() {
vmove usr/share/kobo-deluxe
}
}