Compare commits

...
Sign in to create a new pull request.

51 commits

Author SHA1 Message Date
Fedora Release Engineering
4321cd4061 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:34:30 +00:00
Fedora Release Engineering
446b8e0440 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 16:53:04 +00:00
Fedora Release Engineering
1a714c3450 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 10:50:15 +00:00
Fedora Release Engineering
efac2ac1e0 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 16:49:20 +00:00
Miroslav Suchý
cb9a31ed9e convert GPL+ license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-06-17 12:23:30 +02:00
Fedora Release Engineering
9d5ba30360 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 22:52:55 +00:00
Fedora Release Engineering
1eec839880 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 12:39:09 +00:00
Fedora Release Engineering
1d61b34025 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:06:09 +00:00
Fedora Release Engineering
53230feb08 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:34:24 +00:00
Fedora Release Engineering
39f1b05ebf Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 20:37:23 +00:00
Fedora Release Engineering
6a9c793e8c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:06:05 +00:00
Fedora Release Engineering
6db4e01492 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 17:25:22 +00:00
Fedora Release Engineering
c9237aca50 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 12:30:03 +00:00
Fedora Release Engineering
f33992ca87 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-25 23:57:50 +00:00
Tom Stellard
3982ddf1b3 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-16 23:22:56 +00:00
Fedora Release Engineering
ec101877ca - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-31 23:54:04 +00:00
Fedora Release Engineering
39170e91f1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 11:54:26 +00:00
Hans de Goede
48f5e4eaee Fix FTBFS (rhbz#1799146) 2020-02-14 23:31:19 +01:00
Fedora Release Engineering
2d4d3e46bf - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 11:23:59 +00:00
Fedora Release Engineering
297a07898b - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 17:44:33 +00:00
Fedora Release Engineering
22f7ad688b - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 13:09:56 +00:00
Igor Gnatenko
2bea587b69 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:23:55 +01:00
Florian Weimer
9145ea0a05 Rebuild with fixed binutils 2018-07-31 10:41:42 +02:00
Hans de Goede
e69b5627ec Fix FTBFS (rhbz#1603365) 2018-07-29 22:33:57 +02:00
Igor Gnatenko
c6888e66c6
Add missing BuildRequires on gcc
make: cc: Command not found

References: https://bugzilla.redhat.com/show_bug.cgi?id=1603365
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-24 16:21:47 +02:00
Fedora Release Engineering
b48d8f15fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 20:07:19 +00:00
Fedora Release Engineering
449bef7e7d - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 02:05:21 +00:00
Igor Gnatenko
cc175a4c8a Remove obsolete scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-07 19:04:22 +01:00
Hans de Goede
8b0e04c95c Fix missing libappstream-glib BuildRequires 2017-09-08 13:12:58 +02:00
Hans de Goede
4ada0023c4 Run windowed rather then fullscreen by default
Add example alex4.ini to the documentation (for e.g. setting fullscreen mode)
Add appdata
2017-09-08 12:21:48 +02:00
Fedora Release Engineering
4448ff0929 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 17:29:35 +00:00
Fedora Release Engineering
f9ab7b4dd9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 02:44:24 +00:00
Fedora Release Engineering
c8857c1378 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 05:51:38 +00:00
Dennis Gilmore
104e84b239 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 16:05:09 +00:00
Dennis Gilmore
2a1e71e053 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-16 23:45:56 +00:00
Peter Robinson
13d4441638 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-15 20:16:29 +00:00
Dennis Gilmore
d42b0fca24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 19:25:16 -05:00
Dennis Gilmore
53f9cd4a9d - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 19:32:13 -05:00
Rahul Sundaram
e677cfe1f0 remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines
2013-02-09 12:18:21 -05:00
Dennis Gilmore
e6ed38b8d5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 10:45:58 -05:00
Dennis Gilmore
e3f45bc053 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 15:08:38 -06:00
Hans de Goede
f5fae1244f Rebuild for new allegro-4.4 2011-07-15 16:30:42 +02:00
Dennis Gilmore
f0ee85da6f - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 18:48:30 -06:00
Fedora Release Engineering
614a98df0c dist-git conversion 2010-07-28 09:41:41 +00:00
Bill Nottingham
6721ecd13a Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:39:03 +00:00
Jesse Keating
96aba90d74 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 16:42:34 +00:00
Jesse Keating
e778088f77 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 00:31:57 +00:00
Hans de Goede
c538221025 - Fix patch fuzz build failure 2008-09-07 13:29:06 +00:00
Jesse Keating
184005a268 - Autorebuild for GCC 4.3 2008-02-19 07:49:28 +00:00
Hans de Goede
0dbfb8ca4a - Several patches from Debian (Thanks Peter De Wachter)
- endian clean dot-files code
- fsf address corrected
- no longer use deprecated allegro functions
2008-01-30 14:42:31 +00:00
Hans de Goede
4aa059dc3f - Update License tag for new Licensing Guidelines compliance 2007-08-03 18:57:19 +00:00
13 changed files with 948 additions and 61 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: alex4
# $Id$
NAME := alex4
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

406
alex4-allegro-4.2.patch Normal file
View file

@ -0,0 +1,406 @@
Index: alex4-1.1/src/edit.c
===================================================================
--- alex4-1.1.orig/src/edit.c 2008-01-23 00:01:05.000000000 +0100
+++ alex4-1.1/src/edit.c 2008-01-23 00:48:53.000000000 +0100
@@ -69,8 +69,8 @@
}
// show stuff
- textprintf(bmp, data[THE_FONT].dat, 1, 1, 0, "TILE: %d,%d", tx, ty);
- textprintf(bmp, data[THE_FONT].dat, 1, 11, 0, "SIZE: %d,%d", map->width, map->height);
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 1, 0, -1, "TILE: %d,%d", tx, ty);
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 11, 0, -1, "SIZE: %d,%d", map->width, map->height);
// show start pos
x = (ABS(map->start_x) << 4) - map->offset_x;
@@ -80,7 +80,7 @@
// draw status bar
rectfill(bmp, 0, 110, 159, 119, 1);
- textprintf(bmp, data[THE_FONT].dat, 1, 111, 4, "EDITING: %s", get_filename(edit_path_and_file));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 111, 4, -1, "EDITING: %s", get_filename(edit_path_and_file));
}
else if (edit_mode == EDIT_MODE_SELECT) { // draw tile palette
// calculate offset depending on mouse pointer
@@ -104,16 +104,16 @@
else if (edit_mode == EDIT_MODE_STATS) { // draw map properties
int ty = 16;
clear_to_color(bmp, 3);
- textprintf(bmp, data[THE_FONT].dat, 1, 1, 1, "%s (props)", get_filename(edit_path_and_file));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 1, 1, -1, "%s (props)", get_filename(edit_path_and_file));
line(bmp, 0, 10, 159, 10, 1);
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "Win by:");
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 1) reach exit (%s)", (map->win_conditions & MAP_WIN_EXIT ? "X" : " "));
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 2) kill boss (%s)", (map->win_conditions & MAP_WIN_KILL_GUARDIAN ? "X" : " "));
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 3) kill all (%s)", (map->win_conditions & MAP_WIN_KILL_ALL ? "X" : " "));
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "4) Boss level: (%s)", (map->boss_level ? "X" : " "));
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "5) Name: %s", map->name);
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "Win by:");
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 1) reach exit (%s)", (map->win_conditions & MAP_WIN_EXIT ? "X" : " "));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 2) kill boss (%s)", (map->win_conditions & MAP_WIN_KILL_GUARDIAN ? "X" : " "));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 3) kill all (%s)", (map->win_conditions & MAP_WIN_KILL_ALL ? "X" : " "));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "4) Boss level: (%s)", (map->boss_level ? "X" : " "));
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "5) Name: %s", map->name);
- textprintf(bmp, data[THE_FONT].dat, 1, 110, 1, "F1: back to editor");
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 110, 1, -1, "F1: back to editor");
}
if (edit_mode != EDIT_MODE_STATS) {
Index: alex4-1.1/src/hisc.c
===================================================================
--- alex4-1.1.orig/src/hisc.c 2008-01-23 00:48:53.000000000 +0100
+++ alex4-1.1/src/hisc.c 2008-01-23 00:48:53.000000000 +0100
@@ -153,9 +153,9 @@
// draws a single hisc post
void draw_hisc_post(Thisc *table, BITMAP *bmp, FONT *fnt, int x, int y, int color, int show_level) {
- textprintf(bmp, fnt, x, y, color, "%s", table->name);
- if (show_level) textprintf_right(bmp, fnt, x+80, y, color, "%2d", table->level);
- textprintf_right(bmp, fnt, x+140, y, color, "%d", table->score);
+ textprintf_ex(bmp, fnt, x, y, color, -1, "%s", table->name);
+ if (show_level) textprintf_right_ex(bmp, fnt, x+80, y, color, -1, "%2d", table->level);
+ textprintf_right_ex(bmp, fnt, x+140, y, color, -1, "%d", table->score);
}
// draws the entire table
Index: alex4-1.1/src/main.c
===================================================================
--- alex4-1.1.orig/src/main.c 2008-01-23 00:48:53.000000000 +0100
+++ alex4-1.1/src/main.c 2008-01-23 00:48:53.000000000 +0100
@@ -322,7 +322,7 @@
cycle_count = 0;
if (got_sound && duh_player != NULL) al_poll_duh(duh_player);
i ++;
- while(!cycle_count) yield_timeslice();
+ while(!cycle_count) rest(0);
}
}
@@ -496,15 +496,15 @@
rectfill(bmp, 0, y, 159, y+9, 1);
draw_sprite_h_flip(bmp, data[HERO_NORM].dat, 0, y+1);
- textprintf(bmp, data[THE_FONT].dat, 9, y+1, 4, " :%d", player.lives);
+ textprintf_ex(bmp, data[THE_FONT].dat, 9, y+1, 4, -1, " :%d", player.lives);
for(i = 0; i < player.health; i ++)
draw_sprite(bmp, data[HEART2].dat, 40 + 10 * i, y-3);
draw_sprite(bmp, data[EGG].dat, 80, y-5);
- textprintf(bmp, data[THE_FONT].dat, 85, y+1, 4, " :%d", player.ammo);
+ textprintf_ex(bmp, data[THE_FONT].dat, 85, y+1, 4, -1, " :%d", player.ammo);
- textprintf_right(bmp, data[THE_FONT].dat, 158, y+1, 4, "%d", player.score);
+ textprintf_right_ex(bmp, data[THE_FONT].dat, 158, y+1, 4, -1, "%d", player.score);
}
@@ -626,7 +626,6 @@
// various allegro things
log2file(" initializing allegro");
- text_mode(-1);
garble_string(init_string, 53);
#ifdef __unix__
snprintf(filename, sizeof(filename), "%s/.alex4/alex4.ini",
@@ -635,7 +634,6 @@
#else
set_config_file("alex4.ini");
#endif
- set_window_close_button(FALSE);
// install timers
log2file(" installing timers");
@@ -701,7 +699,7 @@
// show initial loading screen
clear(swap_screen);
- textout_centre(swap_screen, font, "loading...", 320, 200, 1);
+ textout_centre_ex(swap_screen, font, "loading...", 320, 200, 1, -1);
blit_to_screen(swap_screen);
#ifndef __unix__
@@ -788,8 +786,8 @@
clear_to_color(swap_screen, 3);
bmp = data[FLD_LOGO].dat;
- draw_character(swap_screen, bmp, 80 - bmp->w / 2 + 0, 50 + 1, 1);
- draw_character(swap_screen, bmp, 80 - bmp->w / 2, 50, 4);
+ draw_character_ex(swap_screen, bmp, 80 - bmp->w / 2 + 0, 50 + 1, 1, -1);
+ draw_character_ex(swap_screen, bmp, 80 - bmp->w / 2, 50, 4, -1);
blit_to_screen(swap_screen);
@@ -1100,11 +1098,11 @@
// draws text with an outline
void textout_outline(BITMAP *bmp, const char *txt, int x, int y) {
- textout(bmp, data[THE_FONT].dat, txt, x+1, y, 1);
- textout(bmp, data[THE_FONT].dat, txt, x-1, y, 1);
- textout(bmp, data[THE_FONT].dat, txt, x, y+1, 1);
- textout(bmp, data[THE_FONT].dat, txt, x, y-1, 1);
- textout(bmp, data[THE_FONT].dat, txt, x, y, 4);
+ textout_ex(bmp, data[THE_FONT].dat, txt, x+1, y, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, txt, x-1, y, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y+1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y-1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y, 4, -1);
}
@@ -1153,7 +1151,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw stuff
draw_frame(swap_screen, 1);
@@ -1195,7 +1193,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw stuff
draw_frame(swap_screen, 1);
@@ -1257,7 +1255,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw stuff
draw_custom_ending(swap_screen);
@@ -1373,7 +1371,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw stuff
blit(swap2, swap_screen, 0, 0, 0, 0, 160, 120);
@@ -1447,12 +1445,12 @@
sprintf(buf, "%s %d %s", (level > min ? "<" : " "), level, (level < max ? ">" : " "));
clear_bitmap(stuff);
- textout_centre(stuff, data[THE_FONT].dat, buf, stuff->w/2 + 1, 1, 2);
- textout_centre(stuff, data[THE_FONT].dat, buf, stuff->w/2, 0, 1);
+ textout_centre_ex(stuff, data[THE_FONT].dat, buf, stuff->w/2 + 1, 1, 2, -1);
+ textout_centre_ex(stuff, data[THE_FONT].dat, buf, stuff->w/2, 0, 1, -1);
stretch_sprite(bmp, stuff, 80 - 4*stuff->w/2, 30, 4*stuff->w, 4*stuff->h);
- textout_centre(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 80, 90, 1);
- textout_centre(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 79, 89, 4);
+ textout_centre_ex(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 80, 90, 1, -1);
+ textout_centre_ex(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 79, 89, 4, -1);
if (options.one_hundred) {
if (game_count & 32 || game_count & 16) draw_sprite(bmp, data[SHIP100].dat, xpos, 2);
@@ -2343,7 +2341,7 @@
if (is_fire(&ctrl) || is_jump(&ctrl)) done = 1;
if (keypressed()) done = 1;
if (key[KEY_ESC]) done = -1;
- yield_timeslice();
+ rest(0);
}
if (done == -1) {
@@ -2493,7 +2491,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw
frame_count ++;
@@ -2524,20 +2522,20 @@
y = 60;
x = 50;
- textout(bmp, data[THE_FONT].dat, start_string, x+1, y+1, 1);
- textout(bmp, data[THE_FONT].dat, start_string, x, y, 4);
+ textout_ex(bmp, data[THE_FONT].dat, start_string, x+1, y+1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, start_string, x, y, 4, -1);
y += step;
- textout(bmp, data[THE_FONT].dat, "HIGH SCORES", x+1, y+1, 1);
- textout(bmp, data[THE_FONT].dat, "HIGH SCORES", x, y, 4);
+ textout_ex(bmp, data[THE_FONT].dat, "HIGH SCORES", x+1, y+1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, "HIGH SCORES", x, y, 4, -1);
y += step;
- textout(bmp, data[THE_FONT].dat, "EDITOR", x+1, y+1, 1);
- textout(bmp, data[THE_FONT].dat, "EDITOR", x, y, 4);
+ textout_ex(bmp, data[THE_FONT].dat, "EDITOR", x+1, y+1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, "EDITOR", x, y, 4, -1);
y += step;
- textout(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1);
- textout(bmp, data[THE_FONT].dat, "QUIT", x, y, 4);
+ textout_ex(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1, -1);
+ textout_ex(bmp, data[THE_FONT].dat, "QUIT", x, y, 4, -1);
draw_sprite(bmp, data[POINTER].dat, x - 25 + fixtoi(3 * fcos(itofix(tick << 2))), 44 + menu_choice * step);
}
@@ -2589,7 +2587,7 @@
string[i] = letters[current_letter];
string[i + 1] = '\0';
blit(block, bmp, 0, 0, pos_x - 1, pos_y - 1, block->w, block->h);
- textout(bmp, f, string, pos_x, pos_y, colour);
+ textout_ex(bmp, f, string, pos_x, pos_y, colour, -1);
blit_to_screen(bmp);
if (pad != NULL) {
@@ -2775,7 +2773,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// draw
frame_count ++;
Index: alex4-1.1/src/map.c
===================================================================
--- alex4-1.1.orig/src/map.c 2008-01-23 00:48:53.000000000 +0100
+++ alex4-1.1/src/map.c 2008-01-23 00:49:56.000000000 +0100
@@ -280,7 +280,7 @@
if (sm == NULL) return;
- set_clip(bmp, dx, dy, dx+w-1, dy+h-1);
+ set_clip_rect(bmp, dx, dy, dx+w-1, dy+h-1);
for(y=0;y<7;y++) {
for(x=0;x<11;x++) {
@@ -330,13 +330,13 @@
if (edit) {
if (sm->dat[pos].type == MAP_DEAD) {
- textout(bmp, font, "D", dx + x*16 + ax, dy + y*16 + ay, 0);
+ textout_ex(bmp, font, "D", dx + x*16 + ax, dy + y*16 + ay, 0, -1);
}
if (sm->dat[pos].type == MAP_EXIT) {
- textout(bmp, font, "XT", dx + x*16 + ax, dy + y*16 + ay, 255);
+ textout_ex(bmp, font, "XT", dx + x*16 + ax, dy + y*16 + ay, 255, -1);
}
if (sm->dat[pos].type == MAP_BRK) {
- textout(bmp, font, "GL", dx + x*16 + ax, dy + y*16 + ay, 255);
+ textout_ex(bmp, font, "GL", dx + x*16 + ax, dy + y*16 + ay, 255, -1);
}
if (sm->dat[pos].type == MAP_ENEMY1) {
draw_sprite(bmp, sm->data[ENEMY1_01 + ((ABS(game_count) >> 3) % 4)].dat, dx + x*16 + ax, dy + y*16 + ay);
@@ -367,7 +367,7 @@
}
}
- set_clip(bmp, 0, 0, SCREEN_W - 1, SCREEN_H - 1);
+ set_clip_rect(bmp, 0, 0, SCREEN_W - 1, SCREEN_H - 1);
}
Index: alex4-1.1/src/script.c
===================================================================
--- alex4-1.1.orig/src/script.c 2008-01-23 00:01:05.000000000 +0100
+++ alex4-1.1/src/script.c 2008-01-23 00:48:53.000000000 +0100
@@ -89,7 +89,7 @@
// draw text
for(i = 0; i < lines; i ++) {
- textout(bmp, d[THE_FONT].dat, rows[i], x1 + 4, y1 + 5 + i * 9, 1);
+ textout_ex(bmp, d[THE_FONT].dat, rows[i], x1 + 4, y1 + 5 + i * 9, 1, -1);
}
}
@@ -103,7 +103,7 @@
poll_music();
count ++;
while(!cycle_count);
- yield_timeslice();
+ rest(0);
}
if (key[KEY_ESC]) script_done = -1;
}
@@ -521,7 +521,7 @@
}
// let other processes play
- yield_timeslice();
+ rest(0);
// blit buffer to swap buffer
blit(buffer, swap_buffer, 0, 0, 0, 0, 160, 120);
Index: alex4-1.1/src/scroller.c
===================================================================
--- alex4-1.1.orig/src/scroller.c 2008-01-23 00:01:05.000000000 +0100
+++ alex4-1.1/src/scroller.c 2008-01-23 00:50:53.000000000 +0100
@@ -65,22 +65,22 @@
if (sc->horizontal) {
if (sc->offset < -sc->length) return;
if (sc->offset > sc->width) return;
- set_clip(bmp, x, y, x + sc->width, y + sc->height);
- textout(bmp, sc->fnt, sc->text, x + sc->offset + 1, y + 1, 1);
- textout(bmp, sc->fnt, sc->text, x + sc->offset, y, 3);
- set_clip(bmp, 0, 0, bmp->w-1, bmp->h-1);
+ set_clip_rect(bmp, x, y, x + sc->width, y + sc->height);
+ textout_ex(bmp, sc->fnt, sc->text, x + sc->offset + 1, y + 1, 1, -1);
+ textout_ex(bmp, sc->fnt, sc->text, x + sc->offset, y, 3, -1);
+ set_clip_rect(bmp, 0, 0, bmp->w-1, bmp->h-1);
}
else {
int i;
if (sc->offset < -sc->rows * sc->font_height) return;
if (sc->offset > sc->height) return;
- set_clip(bmp, x, y, x + sc->width, y + sc->height);
+ set_clip_rect(bmp, x, y, x + sc->width, y + sc->height);
for(i=0;i<sc->rows;i++) {
if (i * sc->font_height + sc->offset <= sc->height)
if ((i+1) * sc->font_height + sc->offset >= 0)
- textout_centre(bmp, sc->fnt, sc->lines[i], x+(sc->width>>1) , i * sc->font_height + y + sc->offset, -1);
+ textout_centre_ex(bmp, sc->fnt, sc->lines[i], x+(sc->width>>1) , i * sc->font_height + y + sc->offset, -1, -1);
}
- set_clip(bmp, 0, 0, bmp->w-1, bmp->h-1);
+ set_clip_rect(bmp, 0, 0, bmp->w-1, bmp->h-1);
}
}
Index: alex4-1.1/src/shooter.c
===================================================================
--- alex4-1.1.orig/src/shooter.c 2008-01-23 00:48:53.000000000 +0100
+++ alex4-1.1/src/shooter.c 2008-01-23 00:48:53.000000000 +0100
@@ -341,7 +341,7 @@
if (!o->hit || o->type == SO_PLAYER_BULLET)
draw_sprite(bmp, s_data[o->image].dat, (int)o->x, (int)o->y);
else
- draw_character(bmp, s_data[o->image].dat, (int)o->x, (int)o->y, 4);
+ draw_character_ex(bmp, s_data[o->image].dat, (int)o->x, (int)o->y, 4, -1);
}
else {
int c = (o->energy + 8) >> 3;
@@ -379,8 +379,8 @@
padding_str[i] = '0';
padding_str[i] = '\0';
strcat(padding_str, score_str);
- textprintf_right(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 3, "%s", padding_str);
- if (s_var.score) textprintf_right(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 4, "%s", score_str);
+ textprintf_right_ex(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 3, -1, "%s", padding_str);
+ if (s_var.score) textprintf_right_ex(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 4, -1, "%s", score_str);
}
@@ -1268,7 +1268,7 @@
// let other processes play
- yield_timeslice();
+ rest(0);
// draw
frame_count ++;

View file

@ -0,0 +1,100 @@
Index: alex4src/src/control.c
===================================================================
--- alex4src.orig/src/control.c 2008-01-17 00:20:33.000000000 +0100
+++ alex4src/src/control.c 2008-01-17 00:29:35.000000000 +0100
@@ -93,10 +93,24 @@
// saves the control config to disk using FP
void save_control(Tcontrol *c, PACKFILE *fp) {
- pack_fwrite(c, sizeof(Tcontrol), fp);
+ pack_iputl(c->use_joy, fp);
+ pack_iputl(c->key_left, fp);
+ pack_iputl(c->key_right, fp);
+ pack_iputl(c->key_up, fp);
+ pack_iputl(c->key_down, fp);
+ pack_iputl(c->key_fire, fp);
+ pack_iputl(c->key_jump, fp);
+ pack_putc(c->flags, fp);
}
// loads the control config from disk using FP
void load_control(Tcontrol *c, PACKFILE *fp) {
- pack_fread(c, sizeof(Tcontrol), fp);
+ c->use_joy = pack_igetl(fp);
+ c->key_left = pack_igetl(fp);
+ c->key_right = pack_igetl(fp);
+ c->key_up = pack_igetl(fp);
+ c->key_down = pack_igetl(fp);
+ c->key_fire = pack_igetl(fp);
+ c->key_jump = pack_igetl(fp);
+ c->flags = pack_getc(fp);
}
Index: alex4src/src/hisc.c
===================================================================
--- alex4src.orig/src/hisc.c 2008-01-17 00:29:45.000000000 +0100
+++ alex4src/src/hisc.c 2008-01-17 00:42:13.000000000 +0100
@@ -117,9 +117,12 @@
for(i=0; i<MAX_SCORES; i++) {
int c_disk, c_real;
// load entry
- pack_fread(&table[i], sizeof(Thisc), fp);
+ pack_fread(&table[i].name, sizeof(table[i].name), fp);
+ pack_getc(fp); pack_getc(fp); // 2 bytes padding
+ table[i].score = pack_igetl(fp);
+ table[i].level = pack_igetl(fp);
// load checksum
- pack_fread(&c_disk, sizeof(int), fp);
+ c_disk = pack_igetl(fp);
// generate check sum
c_real = generate_checksum(&table[i]);
// compare checksums
@@ -137,11 +140,14 @@
for(i=0; i<MAX_SCORES; i++) {
int checksum;
// save entry
- pack_fwrite(&table[i], sizeof(Thisc), fp);
+ pack_fwrite(&table[i].name, sizeof(table[i].name), fp);
+ pack_putc(0, fp); pack_putc(0, fp); // 2 bytes padding
+ pack_iputl(table[i].score, fp);
+ pack_iputl(table[i].level, fp);
// generate check sum
checksum = generate_checksum(&table[i]);
// save checksum
- pack_fwrite(&checksum, sizeof(int), fp);
+ pack_iputl(checksum, fp);
}
}
Index: alex4src/src/options.c
===================================================================
--- alex4src.orig/src/options.c 2008-01-17 00:24:31.000000000 +0100
+++ alex4src/src/options.c 2008-01-17 00:36:56.000000000 +0100
@@ -26,12 +26,26 @@
// saves the data structure to disk
void save_options(Toptions *o, PACKFILE *fp) {
- pack_fwrite(o, sizeof(Toptions), fp);
+ int i;
+ pack_iputl(o->max_levels, fp);
+ for (i = 0; i < MAX_LEVELS; ++i)
+ pack_iputl(o->cherries[i], fp);
+ for (i = 0; i < MAX_LEVELS; ++i)
+ pack_iputl(o->stars[i], fp);
+ pack_iputl(o->use_vsync, fp);
+ pack_iputl(o->one_hundred, fp);
}
// loads the data structure from disk
void load_options(Toptions *o, PACKFILE *fp) {
- pack_fread(o, sizeof(Toptions), fp);
+ int i;
+ o->max_levels = pack_igetl(fp);
+ for (i = 0; i < MAX_LEVELS; ++i)
+ o->cherries[i] = pack_igetl(fp);
+ for (i = 0; i < MAX_LEVELS; ++i)
+ o->stars[i] = pack_igetl(fp);
+ o->use_vsync = pack_igetl(fp);
+ o->one_hundred = pack_igetl(fp);
}
// resets all data

177
alex4-fcommon-fix.patch Normal file
View file

@ -0,0 +1,177 @@
diff -ur alex4src/src/bullet.c alex4src.nre/src/bullet.c
--- alex4src/src/bullet.c 2003-07-26 12:53:52.000000000 +0200
+++ alex4src.nre/src/bullet.c 2020-02-14 16:55:54.227165835 +0100
@@ -26,6 +26,8 @@
#include "timer.h"
#include "../data/data.h"
+// the bullets themselves
+Tbullet bullet[MAX_BULLETS];
// sets values on a bullet
void set_bullet(Tbullet *b, int x, int y, double dx, double dy, BITMAP *bmp, int bad) {
diff -ur alex4src/src/bullet.h alex4src.nre/src/bullet.h
--- alex4src/src/bullet.h 2020-02-14 20:21:00.557446660 +0100
+++ alex4src.nre/src/bullet.h 2020-02-14 16:55:54.227165835 +0100
@@ -42,7 +42,7 @@
#define MAX_BULLETS 64
// the bullets themselves
-Tbullet bullet[MAX_BULLETS];
+extern Tbullet bullet[MAX_BULLETS];
// functions
void reset_bullets(Tbullet *b, int max);
diff -ur alex4src/src/edit.c alex4src.nre/src/edit.c
--- alex4src/src/edit.c 2020-02-14 20:21:00.559446658 +0100
+++ alex4src.nre/src/edit.c 2020-02-14 20:14:07.160857305 +0100
@@ -33,8 +33,6 @@
int edit_tile = 0;
// path to current map
char edit_path_and_file[1024];
-// datafile to use
-DATAFILE *data;
// current edit mode
int edit_mode;
diff -ur alex4src/src/main.h alex4src.nre/src/main.h
--- alex4src/src/main.h 2020-02-14 20:21:00.556446662 +0100
+++ alex4src.nre/src/main.h 2020-02-14 20:13:57.681842152 +0100
@@ -59,6 +59,7 @@
#define SMPL_TALK 24
#define SMPL_BEAM 25
+extern DATAFILE *data;
// functions
char *get_init_string();
diff -ur alex4src/src/particle.c alex4src.nre/src/particle.c
--- alex4src/src/particle.c 2003-07-26 12:53:52.000000000 +0200
+++ alex4src.nre/src/particle.c 2020-02-14 20:17:53.166697996 +0100
@@ -21,16 +21,11 @@
+#include "main.h"
#include "particle.h"
-// pointer to datafile
-DATAFILE *data;
-
-
-// set datafile to use
-void set_datafile(DATAFILE *d) {
- data = d;
-}
+// the particles themselves
+Tparticle particle[MAX_PARTICLES];
// inits variables in a particle
diff -ur alex4src/src/particle.h alex4src.nre/src/particle.h
--- alex4src/src/particle.h 2020-02-14 20:21:00.555446663 +0100
+++ alex4src.nre/src/particle.h 2020-02-14 20:15:57.210817230 +0100
@@ -42,10 +42,9 @@
// the particles themselves
-Tparticle particle[MAX_PARTICLES];
+extern Tparticle particle[MAX_PARTICLES];
// functions
-void set_datafile(DATAFILE *d);
void reset_particles(Tparticle *p, int max);
Tparticle *get_free_particle(Tparticle *p, int max);
void set_particle(Tparticle *p, int x, int y, double dx, double dy, int color, int life, int bmp);
diff -ur alex4src/src/player.c alex4src.nre/src/player.c
--- alex4src/src/player.c 2003-07-26 12:53:52.000000000 +0200
+++ alex4src.nre/src/player.c 2020-02-14 16:55:54.229165835 +0100
@@ -25,6 +25,9 @@
#include "timer.h"
#include "../data/data.h"
+// the player
+Tplayer player;
+
// draws the player depending on his state
void draw_player(BITMAP *bmp, Tplayer *p, int x, int y) {
BITMAP *head, *body;
diff -ur alex4src/src/player.h alex4src.nre/src/player.h
--- alex4src/src/player.h 2020-02-14 20:21:00.554446664 +0100
+++ alex4src.nre/src/player.h 2020-02-14 16:55:54.229165835 +0100
@@ -53,7 +53,7 @@
// the player
-Tplayer player;
+extern Tplayer player;
// functions
void draw_player(BITMAP *bmp, Tplayer *p, int x, int y);
diff -ur alex4src/src/script.c alex4src.nre/src/script.c
--- alex4src/src/script.c 2020-02-14 20:21:00.560446657 +0100
+++ alex4src.nre/src/script.c 2020-02-14 20:14:25.441886527 +0100
@@ -33,9 +33,8 @@
// silly value
#define NO_CHANGE -3249587
-
-// datafile to use
-DATAFILE *data;
+// array holding the sounds ids
+int active_sounds[MAX_SCRIPT_SOUNDS];
// internal buffers
BITMAP *buffer;
BITMAP *swap_buffer;
diff -ur alex4src/src/script.h alex4src.nre/src/script.h
--- alex4src/src/script.h 2020-02-14 20:21:00.556446662 +0100
+++ alex4src.nre/src/script.h 2020-02-14 16:55:54.230165835 +0100
@@ -42,7 +42,7 @@
// max number of sounds played by the script
#define MAX_SCRIPT_SOUNDS 16
// array holding the sounds ids
-int active_sounds[MAX_SCRIPT_SOUNDS];
+extern int active_sounds[MAX_SCRIPT_SOUNDS];
// functions
diff -ur alex4src/src/timer.c alex4src.nre/src/timer.c
--- alex4src/src/timer.c 2020-02-14 20:21:00.557446660 +0100
+++ alex4src.nre/src/timer.c 2020-02-14 16:55:54.226165836 +0100
@@ -23,6 +23,14 @@
#include "allegro.h"
#include "timer.h"
+// the variables used by the timers
+volatile int frame_count;
+volatile int fps;
+volatile int logic_count;
+volatile int lps;
+volatile int cycle_count;
+volatile int game_count;
+
// keeps track of frames each second
void fps_counter(void) {
fps = frame_count;
diff -ur alex4src/src/timer.h alex4src.nre/src/timer.h
--- alex4src/src/timer.h 2020-02-14 20:21:00.556446662 +0100
+++ alex4src.nre/src/timer.h 2020-02-14 16:55:54.227165835 +0100
@@ -24,12 +24,12 @@
#define _TIMERS_H_
// the variables used by the timers
-volatile int frame_count;
-volatile int fps;
-volatile int logic_count;
-volatile int lps;
-volatile int cycle_count;
-volatile int game_count;
+extern volatile int frame_count;
+extern volatile int fps;
+extern volatile int logic_count;
+extern volatile int lps;
+extern volatile int cycle_count;
+extern volatile int game_count;
// functions

15
alex4-fsf-address.patch Normal file
View file

@ -0,0 +1,15 @@
Index: alex4-1.1/readme.txt
===================================================================
--- alex4-1.1.orig/readme.txt 2008-01-22 00:10:21.000000000 +0100
+++ alex4-1.1/readme.txt 2008-01-22 00:10:51.000000000 +0100
@@ -49,8 +49,8 @@
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+St, Fifth Floor, Boston, MA 02110-1301, USA.
COMPILING

19
alex4-ini-comment.patch Normal file
View file

@ -0,0 +1,19 @@
diff -up alex4src/alex4.ini~ alex4src/alex4.ini
--- alex4src/alex4.ini~ 2003-07-26 12:55:26.000000000 +0200
+++ alex4src/alex4.ini 2017-09-08 11:50:17.095282921 +0200
@@ -1,12 +1,11 @@
##############################################################
#
-# Configuration file for Alex 4 (v1.1)
+# Example configuration file for Alex 4 (v1.1)
#
##############################################################
#
-# If you lose control of the contents of this file
-# and wants to restore to the defaults, you will have
-# to reinstall the game. Conclusion: Handle with care!
+# To make cchanges to alex4's configuration copy this file to
+# ~/.alex4/alex4.ini and edit it.
#
##############################################################

View file

@ -83,7 +83,7 @@
w = get_config_int("graphics", "f_width", 640);
h = get_config_int("graphics", "f_height", 480);
}
@@ -672,10 +681,10 @@
@@ -672,7 +681,7 @@
h = get_config_int("graphics", "w_height", 480);
}
@ -91,11 +91,7 @@
+ log2file(" entering gfx mode set in alex4.ini (%dx%d %s)", w, h, (get_config_int("graphics", "fullscreen", 1) ? "full" : "win"));
if (set_gfx_mode(
- (get_config_int("graphics", "fullscreen", 0) ? GFX_AUTODETECT_FULLSCREEN : GFX_AUTODETECT_WINDOWED),
+ (get_config_int("graphics", "fullscreen", 1) ? GFX_AUTODETECT_FULLSCREEN : GFX_AUTODETECT_WINDOWED),
w, h, 0, 0)) {
log2file(" *** failed");
log2file(" entering gfx mode (640x480 windowed)");
(get_config_int("graphics", "fullscreen", 0) ? GFX_AUTODETECT_FULLSCREEN : GFX_AUTODETECT_WINDOWED),
@@ -695,6 +704,7 @@
textout_centre(swap_screen, font, "loading...", 320, 200, 1);
blit_to_screen(swap_screen);

28
alex4.appdata.xml Normal file
View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<component type="desktop">
<id>alex4.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL+</project_license>
<name>Alex the Allegator 4</name>
<summary>Old school platform game</summary>
<description>
<p>
Alex the Allegator 4 is a true jump'n'run, just like the old classic ones.
Guide Alex through the jungle in order to save his girlfriend Lola from
evil humans who want to make a bag of her.
</p>
<p>
Alex 4 is a very small game. It runs in a very low resolution with only
four colors and will not provide you with any real time video or 3D
effects. Nor will it snare you with a compelling storyline. It's only a
short platform game with a few tricks up it's sleeve. We're sure you'll
like it.
</p>
</description>
<url type="homepage">https://obiot.github.io/Alex4-WE/readme.html</url>
<url type="help">https://obiot.github.io/Alex4-WE/readme.html#play</url>
<screenshots>
<screenshot type="default">https://obiot.github.io/Alex4-WE/images/overview.gif</screenshot>
</screenshots>
<updatecontact>jwrdegoede_at_fedoraproject.org</updatecontact>
</component>

View file

@ -1,5 +1,4 @@
[Desktop Entry]
Encoding=UTF-8
Name=Alex the Allegator 4
Comment=Old school platform game
Exec=alex4
@ -8,3 +7,4 @@ Terminal=false
StartupNotify=false
Type=Application
Categories=Game;ArcadeGame;ActionGame;
Keywords=Game;Arcade;Platform;Retro;

BIN
alex4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -1,16 +1,23 @@
Name: alex4
Version: 1.0
Release: 3%{?dist}
Release: 47%{?dist}
Summary: Alex the Allegator 4 - Platform game
Group: Amusements/Games
License: GPL
URL: http://allegator.sourceforge.net/
Source0: http://dl.sf.net/sourceforge/allegator/alex4src_data.zip
License: GPL-1.0-or-later
URL: https://obiot.github.io/Alex4-WE/readme.html
Source0: http://downloads.sf.net/allegator/Alex4/source%20and%20data/alex4src_data.zip
Source1: alex4.desktop
Source2: alex4.png
Source3: alex4.appdata.xml
Patch0: alex4-unix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: allegro-devel dumb-devel desktop-file-utils ImageMagick
Patch1: alex4-allegro-4.2.patch
Patch2: alex4-dot-files-endian-clean.patch
Patch3: alex4-fsf-address.patch
Patch4: alex4-ini-comment.patch
Patch5: alex4src-warnings.patch
Patch6: alex4-fcommon-fix.patch
BuildRequires: gcc
BuildRequires: allegro-devel dumb-devel desktop-file-utils libappstream-glib
BuildRequires: make
Requires: hicolor-icon-theme
%description
@ -20,57 +27,184 @@ nice colors guaranteed!
%prep
%setup -q -n alex4src
%patch0 -p1 -z .unix
sed -i 's/\r//' *.txt
%autosetup -p1 -n alex4src
sed -i 's/\r//' *.txt *.ini
%build
pushd src
make %{?_smp_mflags} PREFIX=%{_prefix} \
CFLAGS="$RPM_OPT_FLAGS -Wno-deprecated-declarations"
CFLAGS="$RPM_OPT_FLAGS -Wno-deprecated-declarations -Wno-unused-result -DALLEGRO_FIX_ALIASES"
popd
%install
rm -rf $RPM_BUILD_ROOT
pushd src
make install PREFIX=$RPM_BUILD_ROOT%{_prefix}
popd
# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
install -p -m 644 %{SOURCE2} \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/appdata
appstream-util validate-relax --nonet \
$RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
%files
%defattr(-,root,root,-)
%doc license.txt readme.txt
%doc license.txt readme.txt alex4.ini
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jun 17 2024 Miroslav Suchý <msuchy@redhat.com> - 1.0-43
- convert license to SPDX
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-34
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Feb 14 2020 Hans de Goede <hdegoede@redhat.com> - 1.0-32
- Fix FTBFS (rhbz#1799146)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.0-28
- Rebuild with fixed binutils
* Sun Jul 29 2018 Hans de Goede <hdegoede@redhat.com> - 1.0-27
- Fix FTBFS (rhbz#1603365)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Jan 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0-24
- Remove obsolete scriptlets
* Fri Sep 08 2017 Hans de Goede <hdegoede@redhat.com> - 1.0-23
- Run windowed rather then fullscreen by default
- Add example alex4.ini to the documentation (for e.g. setting fullscreen mode)
- Add appdata
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Feb 09 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 1.0-14
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Jul 15 2011 Hans de Goede <hdegoede@redhat.com> - 1.0-11
- Rebuild for new allegro-4.4
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sun Sep 7 2008 Hans de Goede <hdegoede@redhat.com> 1.0-7
- Fix patch fuzz build failure
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0-6
- Autorebuild for GCC 4.3
* Wed Jan 30 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-5
- Several patches from Debian (Thanks Peter De Wachter)
- endian clean dot-files code
- fsf address corrected
- no longer use deprecated allegro functions
* Thu Aug 2 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-4
- Update License tag for new Licensing Guidelines compliance
* Sat Mar 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-3
- Fixup .desktop file categories for games-menus usage

33
alex4src-warnings.patch Normal file
View file

@ -0,0 +1,33 @@
diff -up alex4src/src/main.c~ alex4src/src/main.c
--- alex4src/src/main.c~ 2017-09-08 12:11:48.000000000 +0200
+++ alex4src/src/main.c 2017-09-08 12:15:45.784592931 +0200
@@ -452,7 +452,7 @@ void load_level_files(const char *filena
mode = 2;
}
else {
- char full_path_to_map[1024];
+ char full_path_to_map[2048];
clear_trailing_whitespace(buf);
sprintf(full_path_to_map, "%s%s", path, buf);
@@ -2579,7 +2579,7 @@ int get_string(BITMAP *bmp, char *string
if (block == NULL)
return 1;
- blit(bmp, block, pos_x - 1, pos_y - 1, 0, 0, block->w, block->h);
+ blit(bmp, block, pos_x - 1, pos_y - 1, 0, 0, block->w, block->h);
clear_keybuf();
while(1) {
diff -up alex4src/src/shooter.c~ alex4src/src/shooter.c
--- alex4src/src/shooter.c~ 2017-09-08 12:11:48.000000000 +0200
+++ alex4src/src/shooter.c 2017-09-08 12:14:27.389952486 +0200
@@ -903,7 +903,7 @@ void s_check_collision(Tspace_object *ar
s_var.score += 1000000;
}
else { // increase power
- s_var.power_level = MIN(s_var.power_level ++, 7);
+ s_var.power_level++;
}
play_sound_id(SMPL_HEART);