mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Add recipe for Kraptor.
An Allegro game that used to work on BeOS. Seems to have problems so far which appears to be in Allegro: - as usual on my machine fullscreen mode doesn't work (BDirectWindow problems) - the level data does not load. The correct arguments are passed to the Allegro functions so I don't know why
This commit is contained in:
50
games-arcade/kraptor/kraptor-4.4.14.recipe
Normal file
50
games-arcade/kraptor/kraptor-4.4.14.recipe
Normal file
@@ -0,0 +1,50 @@
|
||||
SUMMARY="Classic shoot 'em up scroller game"
|
||||
DESCRIPTION="A classic shoot 'em up scroller game, where you must fight \
|
||||
against tons of bad dudes. This is a full game with massive destruction, \
|
||||
powerful weapons, and high speed action in varied levels."
|
||||
HOMEPAGE="https://sourceforge.net/projects/kraptor/"
|
||||
COPYRIGHT="2002-2004 Kronoman"
|
||||
LICENSE="MIT"
|
||||
SOURCE_URI="https://sourceforge.net/projects/kraptor/files/kraptor_source_code/final_apr_03_2004/kraptor_final_apr_03_2004.tar.gz"
|
||||
CHECKSUM_SHA256="ce3d3b517bd081dc317eedc57b8e58a7c5cba50d1cf1f2d06fd3d885d31870a8"
|
||||
SOURCE_DIR="kraptor_final_apr_03_2004"
|
||||
PATCHES="kraptor-$portVersion"
|
||||
REVISION="1"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86"
|
||||
|
||||
PROVIDES="
|
||||
kraptor$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:liballeg$secondaryArchSuffix
|
||||
lib:libdumb$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:liballeg$secondaryArchSuffix
|
||||
devel:libdumb$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
sh fix.sh linux
|
||||
sh fix.sh test
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/Kraptor
|
||||
cp bin/*.dat bin/kraptor.cfg $appsDir/Kraptor
|
||||
cp bin/kraptor_linux.bin $appsDir/Kraptor/Kraptor
|
||||
|
||||
addAppDeskbarSymlink $appsDir/Kraptor/Kraptor
|
||||
}
|
||||
260
games-arcade/kraptor/patches/kraptor-4.4.14.patchset
Normal file
260
games-arcade/kraptor/patches/kraptor-4.4.14.patchset
Normal file
@@ -0,0 +1,260 @@
|
||||
From 6eb255fe2aa546d2f5e6996bdb3d4c06a5edd36d Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 13 Jul 2020 12:43:18 +0200
|
||||
Subject: Fix build with modern gcc
|
||||
|
||||
|
||||
diff --git a/src/enemigo.c b/src/enemigo.c
|
||||
index 80e9ead..5e3c497 100644
|
||||
--- a/src/enemigo.c
|
||||
+++ b/src/enemigo.c
|
||||
@@ -495,7 +495,7 @@ void agregar_disparo_ene(ENEMIGO *ene)
|
||||
nueva->dx = ftofix((float)rand_ex(-fixtof(arma_ene[ene->arma_actual].vx)*10.0, fixtof(arma_ene[ene->arma_actual].vx)*10.0) / 10.0);
|
||||
if (rand()%100 < 10) nueva->dx = 0;
|
||||
|
||||
- nueva->dy = fmul(arma_ene[ene->arma_actual].vy, itofix(rand_ex(1, 3)) );
|
||||
+ nueva->dy = fixmul(arma_ene[ene->arma_actual].vy, itofix(rand_ex(1, 3)) );
|
||||
break;
|
||||
|
||||
case 2: /* abanico triple */
|
||||
@@ -527,7 +527,7 @@ void agregar_disparo_ene(ENEMIGO *ene)
|
||||
if (rand()%100 < 15) // cada tanto, al azar
|
||||
{
|
||||
nueva->dx = ftofix((float)rand_ex(-150, 150) / 10.0);
|
||||
- nueva->dy = fmul(arma_ene[ene->arma_actual].vy, itofix(rand_ex(1, 3)) );
|
||||
+ nueva->dy = fixmul(arma_ene[ene->arma_actual].vy, itofix(rand_ex(1, 3)) );
|
||||
}
|
||||
|
||||
break;
|
||||
diff --git a/src/explos.c b/src/explos.c
|
||||
index 4f56055..5b4b4a3 100644
|
||||
--- a/src/explos.c
|
||||
+++ b/src/explos.c
|
||||
@@ -126,10 +126,10 @@ int x2, y2;
|
||||
while (tmp) {
|
||||
|
||||
x2 = fixtoi(tmp->x)-x;
|
||||
- x2 -= fixtoi(fmul(itofix(tmp->spr->w), tmp->r))/2;
|
||||
+ x2 -= fixtoi(fixmul(itofix(tmp->spr->w), tmp->r))/2;
|
||||
|
||||
y2 = fixtoi(tmp->y)-y;
|
||||
- y2 -= fixtoi(fmul(itofix(tmp->spr->h), tmp->r))/2;
|
||||
+ y2 -= fixtoi(fixmul(itofix(tmp->spr->h), tmp->r))/2;
|
||||
|
||||
/* dibujar */
|
||||
rotate_scaled_sprite(bmp, tmp->spr, x2, y2, itofix(tmp->rot), tmp->r);
|
||||
diff --git a/src/game.c b/src/game.c
|
||||
index b055554..03ae5a3 100644
|
||||
--- a/src/game.c
|
||||
+++ b/src/game.c
|
||||
@@ -412,7 +412,7 @@ else
|
||||
void comenzar_juego(int load_savegame)
|
||||
{
|
||||
/* funcion interna que libera listas enlazadas */
|
||||
- static void liberar_listas_interno()
|
||||
+ void liberar_listas_interno()
|
||||
{
|
||||
/* LIBERAR LISTAS... */
|
||||
liberar_lista_enemigos();
|
||||
@@ -428,7 +428,7 @@ void comenzar_juego(int load_savegame)
|
||||
|
||||
/* funcion interna que limpia los colores y bufferes
|
||||
y coloca la paleta de juego, etc */
|
||||
- static void hacer_cleanup_mapeos()
|
||||
+ void hacer_cleanup_mapeos()
|
||||
{
|
||||
set_palette(pal_game);
|
||||
color_map = &tabla_transparencia; /* la rutina de sombras la precisa! */
|
||||
@@ -442,7 +442,7 @@ void comenzar_juego(int load_savegame)
|
||||
}
|
||||
|
||||
/* Funcion interna para instalar los timers */
|
||||
- static void pone_timers_juego()
|
||||
+ void pone_timers_juego()
|
||||
{
|
||||
/* Timers */
|
||||
if (install_int_ex(increment_speed_counter, BPS_TO_TIMER(30)))
|
||||
@@ -456,7 +456,7 @@ void comenzar_juego(int load_savegame)
|
||||
}
|
||||
|
||||
/* Funcion interna para SACAR los timers */
|
||||
- static void saca_timers_juego()
|
||||
+ void saca_timers_juego()
|
||||
{
|
||||
/* remover timers... */
|
||||
remove_int(fps_proc);
|
||||
diff --git a/src/guiprocs.c b/src/guiprocs.c
|
||||
index e84e862..752c4b8 100644
|
||||
--- a/src/guiprocs.c
|
||||
+++ b/src/guiprocs.c
|
||||
@@ -563,8 +563,10 @@ int xedit_proc(int msg, DIALOG *d, int c)
|
||||
{
|
||||
button.x = d->x + d->w - button.w - 1;
|
||||
edit.w -= button.w;
|
||||
+#if 0
|
||||
if(font == &_default_font)
|
||||
button.dp = "_";
|
||||
+#endif
|
||||
}
|
||||
|
||||
switch(msg)
|
||||
diff --git a/src/joymnu.c b/src/joymnu.c
|
||||
index 24aaa38..b265531 100644
|
||||
--- a/src/joymnu.c
|
||||
+++ b/src/joymnu.c
|
||||
@@ -21,7 +21,7 @@ void probar_el_joystick(int nj)
|
||||
y cambia de color cuando presiona el boton 1,2 o 3
|
||||
usa d2 para propositos internos...
|
||||
*/
|
||||
- static int xbox_joystick_test_proc(int msg, DIALOG *d, int c)
|
||||
+ int xbox_joystick_test_proc(int msg, DIALOG *d, int c)
|
||||
{
|
||||
int new_pos = 0;
|
||||
int pos_x = 0 , pos_y = 0; // posicion (-1 = abj,izq, 1 = arr,der )
|
||||
diff --git a/src/menu.c b/src/menu.c
|
||||
index 2c3235b..a3e51aa 100644
|
||||
--- a/src/menu.c
|
||||
+++ b/src/menu.c
|
||||
@@ -146,7 +146,7 @@ static int keybutton_proc(int msg, DIALOG *d, int c)
|
||||
static void hacer_el_menu_principal_helper()
|
||||
{
|
||||
// comenzar un nuevo juego
|
||||
- static int nuevo_juego_mnu()
|
||||
+ int nuevo_juego_mnu()
|
||||
{
|
||||
DIALOG skill_select_dlg[] =
|
||||
{
|
||||
@@ -173,14 +173,14 @@ static void hacer_el_menu_principal_helper()
|
||||
}
|
||||
|
||||
// Carga un juego
|
||||
- static int cargar_mnu()
|
||||
+ int cargar_mnu()
|
||||
{
|
||||
menu_seleccionado = MNU_S_LOAD_GAME;
|
||||
|
||||
return D_CLOSE;
|
||||
}
|
||||
|
||||
- static int salir_mnu()
|
||||
+ int salir_mnu()
|
||||
{
|
||||
menu_seleccionado = MNU_S_QUIT_GAME;
|
||||
|
||||
@@ -188,7 +188,7 @@ static void hacer_el_menu_principal_helper()
|
||||
}
|
||||
|
||||
/* Permite seleccionar un nuevo modo de video */
|
||||
- static int choose_video_mnu()
|
||||
+ int choose_video_mnu()
|
||||
{
|
||||
int card = 0, w = SCREEN_W, h = SCREEN_H;
|
||||
|
||||
@@ -206,7 +206,7 @@ static void hacer_el_menu_principal_helper()
|
||||
}
|
||||
|
||||
/* Acerca de... */
|
||||
- static int acercade_proggy_mnu()
|
||||
+ int acercade_proggy_mnu()
|
||||
{
|
||||
DIALOG acerca_de_dlg[] =
|
||||
{
|
||||
@@ -241,14 +241,14 @@ static void hacer_el_menu_principal_helper()
|
||||
}
|
||||
|
||||
/* idioma -> espa¤ol */
|
||||
- static int cambia_espanol(void)
|
||||
+ int cambia_espanol(void)
|
||||
{
|
||||
menu_seleccionado = MNU_S_CFG_SPANISH;
|
||||
return D_CLOSE;
|
||||
}
|
||||
|
||||
/* idioma -> ingles */
|
||||
- static int cambia_ingles(void)
|
||||
+ int cambia_ingles(void)
|
||||
{
|
||||
menu_seleccionado = MNU_S_CFG_ENGLISH;
|
||||
return D_CLOSE;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From 3fccff95f5a7466658308fe1023957cda1a74a6f Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 13 Jul 2020 12:55:58 +0200
|
||||
Subject: 64bit fix from Debian
|
||||
|
||||
|
||||
diff --git a/include/pmask.h b/include/pmask.h
|
||||
index 7455a39..c820414 100644
|
||||
--- a/include/pmask.h
|
||||
+++ b/include/pmask.h
|
||||
@@ -44,7 +44,7 @@ extern "C" {
|
||||
//MASK_WORD_BITBITS should be the log base 2
|
||||
//of the number of bits in MASK_WORD_TYPE
|
||||
//e.g. 4 for 16-bit ints, 5 for 32-bit ints, 6 for 64-bit ints
|
||||
-#define MASK_WORD_BITBITS 5
|
||||
+#define MASK_WORD_BITBITS (sizeof(MASK_WORD_TYPE)==4?5:6)
|
||||
|
||||
|
||||
//if SINGLE_MEMORY_BLOCK is defined
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From 9b645f3c28c2a82c76d659bf65522cf02cc8ec2d Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 13 Jul 2020 13:50:09 +0200
|
||||
Subject: Patch adapted from Debian to load files from the correct place.
|
||||
|
||||
|
||||
diff --git a/src/data.c b/src/data.c
|
||||
index 2eb37ba..7cf1df5 100644
|
||||
--- a/src/data.c
|
||||
+++ b/src/data.c
|
||||
@@ -575,6 +575,7 @@ int cargar_nivel(int nivel, int solo_verificar)
|
||||
int xx, yy; // para leer las grillas
|
||||
char tmpstr[1024]; // uso general
|
||||
char tmpstr2[1024];
|
||||
+ char fname_buff[2048];
|
||||
|
||||
if (krapmain == NULL) return -1;
|
||||
|
||||
@@ -598,7 +599,8 @@ int cargar_nivel(int nivel, int solo_verificar)
|
||||
info_nivel.musica = NULL; /* por ahora, no se si hay musica... */
|
||||
|
||||
/* Debo SOLO verificar si el nivel existe? */
|
||||
- if (solo_verificar) return !exists(info_nivel.level_dat);
|
||||
+ if (solo_verificar)
|
||||
+ return !exists(where_is_the_filename(fname_buff, info_nivel.level_dat));
|
||||
|
||||
/* ------ Cargar realmente en RAM el archivo... ------ */
|
||||
|
||||
@@ -617,7 +619,8 @@ int cargar_nivel(int nivel, int solo_verificar)
|
||||
if (datmapa == NULL) return -1; /* fallo la carga del nivel */
|
||||
|
||||
/* copiarse las grillas */
|
||||
- sprintf(tmpstr2, "%s#mapa_g", info_nivel.level_dat); // cargar el mapa_g
|
||||
+ sprintf(tmpstr2, "%s#mapa_g", where_is_the_filename(fname_buff, info_nivel.level_dat));
|
||||
+ // cargar el mapa_g
|
||||
fp = pack_fopen(tmpstr2, F_READ);
|
||||
if (fp == NULL) levantar_error("ERROR: no existe mapa_g en el nivel!");
|
||||
for (xx =0; xx < W_FONDO / W_GR; xx++)
|
||||
@@ -627,11 +630,11 @@ int cargar_nivel(int nivel, int solo_verificar)
|
||||
pack_fclose(fp);
|
||||
|
||||
// grilla de enemigos, con soporte para varias dificultades
|
||||
- sprintf(tmpstr2, "%s#enem_g_%d", info_nivel.level_dat, nivel_de_dificultad);
|
||||
+ sprintf(tmpstr2, "%s#enem_g_%d", where_is_the_filename(fname_buff, info_nivel.level_dat), nivel_de_dificultad);
|
||||
fp = pack_fopen(tmpstr2, F_READ);
|
||||
if (fp == NULL)
|
||||
{
|
||||
- sprintf(tmpstr2, "%s#enem_g", info_nivel.level_dat );
|
||||
+ sprintf(tmpstr2, "%s#enem_g", where_is_the_filename(fname_buff, info_nivel.level_dat) );
|
||||
fp = pack_fopen(tmpstr2, F_READ);
|
||||
if (fp == NULL) levantar_error("ERROR: no existe enem_g en el nivel!");
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Reference in New Issue
Block a user