diff --git a/worminator-3.0R2.1-c23.patch b/worminator-3.0R2.1-c23.patch deleted file mode 100644 index fd7233a..0000000 --- a/worminator-3.0R2.1-c23.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up worminator-3.0R2.1/prototypes.h~ worminator-3.0R2.1/prototypes.h ---- worminator-3.0R2.1/prototypes.h~ 2006-02-24 20:02:25.000000000 +0100 -+++ worminator-3.0R2.1/prototypes.h 2026-01-24 12:54:21.075157509 +0100 -@@ -173,7 +173,7 @@ void push_player(float x_amount, float y - void player_touched(int x_tile_location, int y_tile_location); - - void control_player(); --void trigger_switch(); -+void trigger_switch(int x, int y); - - /* This function will assign the player.frame attribute to an appropriate - value, based on what the player is doing at the time. */ diff --git a/worminator-3.0R2.1-c99.patch b/worminator-3.0R2.1-c99.patch deleted file mode 100644 index 62c3a98..0000000 --- a/worminator-3.0R2.1-c99.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fixes C99 compliance issue. -https://sourceforge.net/p/worminator/bugs/2/ - -diff --git a/particle_ai.h b/particle_ai.h -index 93ac1ec..05ec08d 100644 ---- a/particle_ai.h -+++ b/particle_ai.h -@@ -111,7 +111,7 @@ else sprites[sprite_number].timer--; - /*****************\ - |** SHRAPGIB AI **| - \*****************/ --void shrapgib_ai(sprite_number) -+void shrapgib_ai(int sprite_number) - { - // Update the timer and destroy sprite if time is up - sprites[sprite_number].timer--; diff --git a/worminator-3.0R2.1-fix-compiler-warnings.patch b/worminator-3.0R2.1-fix-compiler-warnings.patch deleted file mode 100644 index 5f96812..0000000 --- a/worminator-3.0R2.1-fix-compiler-warnings.patch +++ /dev/null @@ -1,186 +0,0 @@ -diff -up worminator-3.0R2.1/Worminator.c~ worminator-3.0R2.1/Worminator.c ---- worminator-3.0R2.1/Worminator.c~ 2026-01-24 11:37:54.000000000 +0100 -+++ worminator-3.0R2.1/Worminator.c 2026-01-24 12:50:28.996630952 +0100 -@@ -77,7 +77,7 @@ release_screen(); - void greenify() - { - RGB newcol, oldcol; --int i, avg = 0;; -+int i, avg = 0; - - newcol.r = 0; - newcol.b = 0; -@@ -108,7 +108,7 @@ pal_time = 64; - void little_tinge() - { - RGB newcol, oldcol; --int i, avg = 0;; -+int i; - - if (pal_time < 0) {pal_time = -32; return;} - if (pal_time > 0) return; -@@ -121,7 +121,6 @@ newcol.b = 0; - newcol.filler = 0; // silence warnings. - - for (i = 0; i < 256; i++) { -- avg = 0; - get_color(i, &oldcol); - /*avg += oldcol.r; - avg += oldcol.g; -@@ -141,7 +140,7 @@ game_is_running = TRUE; - void redify() - { - RGB newcol, oldcol; --int i, avg = 0;; -+int i, avg = 0; - - newcol.g = 0; - newcol.b = 0; -@@ -161,7 +160,7 @@ for (i = 0; i < 256; i++) { - void darken(char always) - { - RGB newcol, oldcol; --int i, avg = 0;; -+int i; - - newcol.r = 0; - newcol.b = 0; -@@ -184,7 +183,6 @@ if (!always) { - select_palette(worminator_data_file[DEFAULT_WORMINATOR_PALLETE].dat); - - for (i = 0; i < 256; i++) { -- avg = 0; - get_color(i, &oldcol); - newcol.r = oldcol.r / 2; - newcol.g = oldcol.g / 2; -diff -up worminator-3.0R2.1/animation.h~ worminator-3.0R2.1/animation.h ---- worminator-3.0R2.1/animation.h~ 2006-03-01 13:47:26.000000000 +0100 -+++ worminator-3.0R2.1/animation.h 2026-01-24 12:47:51.189632867 +0100 -@@ -141,14 +141,11 @@ void build_animation_table() - { - short unsigned int x_tile_loop, y_tile_loop; - int number_of_animations = 0; --int bg_tile, fg_tile; - - - // Add all animated tiles to the list - for (x_tile_loop = 0; x_tile_loop < worminator_map.map_width; x_tile_loop++) { - for (y_tile_loop = 0; y_tile_loop < worminator_map.map_height; y_tile_loop++) { -- bg_tile = worminator_map.background_tile_grid[x_tile_loop][y_tile_loop]; -- fg_tile = worminator_map.foreground_tile_grid[x_tile_loop][y_tile_loop]; - - ////////////// A red strobe light and its glare /////////////////////////////////////////////// - if (check_tile_for_animation(x_tile_loop, y_tile_loop, RED_STROBE_LIGHT_ANIMATION_START, RED_STROBE_LIGHT_ANIMATION_LENGTH, RED_STROBE_LIGHT_ANIMATION_SPEED, number_of_animations) == TRUE) number_of_animations++; -diff -up worminator-3.0R2.1/globals.h~ worminator-3.0R2.1/globals.h ---- worminator-3.0R2.1/globals.h~ 2026-01-24 12:53:20.000000000 +0100 -+++ worminator-3.0R2.1/globals.h 2026-01-24 12:58:14.609674800 +0100 -@@ -293,7 +293,7 @@ int look_shift = 0; - char player_just_died = FALSE; - - // This is the path of the current level --char current_level_mapfile_path[256] = ""; -+char current_level_mapfile_path[512] = ""; - - // Map and stats toggles and togglers - char display_map = FALSE; -diff -up worminator-3.0R2.1/menus.h~ worminator-3.0R2.1/menus.h ---- worminator-3.0R2.1/menus.h~ 2006-02-26 20:44:09.000000000 +0100 -+++ worminator-3.0R2.1/menus.h 2026-01-24 12:48:48.149271239 +0100 -@@ -84,7 +84,8 @@ if (theta >= 64) masked_blit(img, bmp, w - else { - for (i = 0; i < w/2; i++) { - j = i*tan(theta*360/256*RADIAN_CONVERTER); -- if (j > h/2) j = h/2; if (j < 0) j = 0; -+ if (j > h/2) j = h/2; -+ if (j < 0) j = 0; - masked_blit(img, bmp, w/2 + i, h/2 - j, x + w/2 + i, y + h/2 - j, 1, j); - } - return; -@@ -95,7 +96,8 @@ if (theta >= 128) masked_blit(img, bmp, - else { - for (i = w/2; i >= 0; i--) { - j = (h/2)-abs((i - w/2)*tan(theta*360/256*RADIAN_CONVERTER)); -- if (j > h/2) j = h/2; if (j < 0) j = 0; -+ if (j > h/2) j = h/2; -+ if (j < 0) j = 0; - masked_blit(img, bmp, i, 0, x + i, y, 1, j); - } - return; -@@ -106,7 +108,8 @@ if (theta >= 192) masked_blit(img, bmp, - else { - for (i = w/2; i >= 0; i--) { - j = abs((i - w/2)*tan(theta*360/256*RADIAN_CONVERTER)); -- if (j > h/2) j = h/2; if (j < 0) j = 0; -+ if (j > h/2) j = h/2; -+ if (j < 0) j = 0; - masked_blit(img, bmp, i, h/2, x + i, y + h/2, 1, j); - } - return; -@@ -117,7 +120,8 @@ if (theta == 255) masked_blit(img, bmp, - else { - for (i = 0; i < w/2; i++) { - j = (h/2)-abs(i*tan(theta*360/256*RADIAN_CONVERTER)); -- if (j > h/2) j = h/2; if (j < 0) j = 0; -+ if (j > h/2) j = h/2; -+ if (j < 0) j = 0; - masked_blit(img, bmp, w/2 + i, h - j, x + w/2 + i, y + h - j, 1, j); - } - return; -@@ -2610,7 +2610,7 @@ void save_screenshot() - { - BITMAP *backup; - int shotnum = -1; --char *fname = "fuck this shit"; -+char fname[32]; - do { - shotnum++; - sprintf(fname, "shot%d.bmp", shotnum); -diff -up worminator-3.0R2.1/misc_ai.h~ worminator-3.0R2.1/misc_ai.h ---- worminator-3.0R2.1/misc_ai.h~ 2006-02-02 21:33:38.000000000 +0100 -+++ worminator-3.0R2.1/misc_ai.h 2026-01-24 12:51:31.180236159 +0100 -@@ -4,7 +4,6 @@ - void floating_platform_ai(int sprite_number) - { - char done_looping = FALSE; --char blocked = FALSE; - char exponent_loop; - int tile_hit; - int blocked_test; -@@ -51,7 +50,7 @@ if (sprite_is_touching_player(sprite_num - if (player.y_position_in_pixels + 32 > sprites[sprite_number].y_position_in_pixels - 1 && player.y_position_in_pixels + 32 < sprites[sprite_number].y_position_in_pixels + 4) { - blocked_test = (int)player.y_position_in_pixels; - push_player(0, -1); -- if (blocked_test == (int)player.y_position_in_pixels) done_looping = TRUE, blocked = TRUE; -+ if (blocked_test == (int)player.y_position_in_pixels) done_looping = TRUE; - } - else done_looping = TRUE; - }; -@@ -241,7 +240,6 @@ if (sprites[sprite_number].timer == 0) { - void pushable_crate_ai(int sprite_number) - { - char done_looping = FALSE; --char blocked = FALSE; - int blocked_test; - // These are true or false for the three points nessecary for collision detection - char p1, p2, p3; -@@ -305,7 +303,7 @@ if (sprite_is_touching_player(sprite_num - if (player.y_position_in_pixels + 32 > sprites[sprite_number].y_position_in_pixels - 1 && player.y_position_in_pixels + 32 < sprites[sprite_number].y_position_in_pixels + 4) { - blocked_test = (int)player.y_position_in_pixels; - push_player(0, -1); -- if (blocked_test == (int)player.y_position_in_pixels) done_looping = TRUE, blocked = TRUE; -+ if (blocked_test == (int)player.y_position_in_pixels) done_looping = TRUE; - } - else done_looping = TRUE; - }; -diff -up worminator-3.0R2.1/text.h~ worminator-3.0R2.1/text.h ---- worminator-3.0R2.1/text.h~ 2006-02-24 14:18:31.000000000 +0100 -+++ worminator-3.0R2.1/text.h 2026-01-24 12:56:19.034408585 +0100 -@@ -137,7 +137,7 @@ void stringPop(char *string) - { - int length = strlen(string); - -- strncpy(string, string + 1, length - 1); -+ memmove(string, string + 1, length - 1); - string[length - 1] = 0; - } - diff --git a/worminator-3.0R2.1-remove-al-fix-aliases.patch b/worminator-3.0R2.1-remove-al-fix-aliases.patch deleted file mode 100644 index 9764782..0000000 --- a/worminator-3.0R2.1-remove-al-fix-aliases.patch +++ /dev/null @@ -1,70 +0,0 @@ -Remove the use of / need for -DALLEGRO_FIX_ALIASES - -Starting with gcc 15 the default C-level is -std=gnu23 this enables -the fsub, fadd, fcos, etc function protypes in math.h causing -a conflict with the use of ALLEGRO_FIX_ALIASES which adds aliased -for allegro's fixed math functions back to the old allegro names -which conflict with the math.h prototypes. - -Since worminator only uses fsin, this can be fixed by dropping the use of -ALLEGRO_FIX_ALIASES, combined with s/fsin/fixsin/ - -diff -up worminator-3.0R2.1/Worminator.c~ worminator-3.0R2.1/Worminator.c ---- worminator-3.0R2.1/Worminator.c~ 2026-01-24 11:21:39.000000000 +0100 -+++ worminator-3.0R2.1/Worminator.c 2026-01-24 11:30:30.547339822 +0100 -@@ -2064,7 +2064,7 @@ if (player.direction == 0) { - sx = ((int)(screen_width * .8) / 2) + 32; - if (x2 - (player.x_position_in_pixels + 37) < ((int)(screen_width * .8) / 2) + 32) sx = x2 - (player.x_position_in_pixels + 37); - for (y = 0; y < sx; y++) { -- x1 = fixtof(fsin(itofix(y * 12))) * 4; -+ x1 = fixtof(fixsin(itofix(y * 12))) * 4; - if (rand() % 64 < 32) spawn_stardust(player.x_position_in_pixels + 37 + y, player.y_position_in_pixels + 13 + x1, 0, 0, 217 + (float)((rand() % 20) - 10.00) / 10.00, 212 + (float)((rand() % 20) - 10.00) / 10.00, 1, 1); - else spawn_stardust(player.x_position_in_pixels + 37 + y, player.y_position_in_pixels + 13 + x1, (float)((rand() % 20) - 10.00) / 80.00, (float)((rand() % 20) - 10.00) / 80.00, 217 - 64 + (float)((rand() % 20) - 10.00) / 10.00, 212 - 64 + (float)((rand() % 20) - 10.00) / 10.00, 1, 1); - } -@@ -2104,7 +2104,7 @@ else { - sx = ((int)(screen_width * .8) / 2) + 32; - if (player.x_position_in_pixels - 6 - x2 < ((int)(screen_width * .8) / 2) + 32) sx = player.x_position_in_pixels - 6 - x2; - for (y = 0; y < sx; y++) { -- x1 = fixtof(fsin(itofix(y * 12))) * 4; -+ x1 = fixtof(fixsin(itofix(y * 12))) * 4; - if (rand() % 64 < 32) spawn_stardust(player.x_position_in_pixels - 6 - y, player.y_position_in_pixels + 13 + x1, (float)((rand() % 20) - 10.00) / 80.00, (float)((rand() % 20) - 10.00) / 80.00, 217 + (float)((rand() % 20) - 10.00) / 10.00, 212 + (float)((rand() % 20) - 10.00) / 10.00, 1, 1); - else spawn_stardust(player.x_position_in_pixels - 6 - y, player.y_position_in_pixels + 13 + x1, 0, 0, 217 - 64 + (float)((rand() % 20) - 10.00) / 10.00, 212 - 64 + (float)((rand() % 20) - 10.00) / 10.00, 1, 1); - } -diff -up worminator-3.0R2.1/particle_ai.h~ worminator-3.0R2.1/particle_ai.h ---- worminator-3.0R2.1/particle_ai.h~ 2026-01-24 11:21:39.000000000 +0100 -+++ worminator-3.0R2.1/particle_ai.h 2026-01-24 11:30:21.932393870 +0100 -@@ -175,12 +175,12 @@ else if (sprites[sprite_number].action_s - sprites[sprite_number].y_acceleration = (float)((rand() % 20) - 10.00) / 10.00; - } - else if (sprites[sprite_number].action_state == 5) { -- sprites[sprite_number].x_acceleration = fixtof(fsin(itofix(sprites[sprite_number].direction))); -+ sprites[sprite_number].x_acceleration = fixtof(fixsin(itofix(sprites[sprite_number].direction))); - if (sprites[sprite_number].direction == -1) sprites[sprite_number].direction = 0; - else sprites[sprite_number].direction += 8; - } - else if (sprites[sprite_number].action_state == 6) { -- sprites[sprite_number].y_acceleration = fixtof(fsin(itofix(sprites[sprite_number].direction))); -+ sprites[sprite_number].y_acceleration = fixtof(fixsin(itofix(sprites[sprite_number].direction))); - if (sprites[sprite_number].direction == -1) sprites[sprite_number].direction = 0; - else sprites[sprite_number].direction += 8; - } -diff -up worminator-3.0R2.1/projectile_ai.h~ worminator-3.0R2.1/projectile_ai.h ---- worminator-3.0R2.1/projectile_ai.h~ 2006-02-02 21:33:38.000000000 +0100 -+++ worminator-3.0R2.1/projectile_ai.h 2026-01-24 11:30:35.155310910 +0100 -@@ -586,14 +586,14 @@ if (sprite_hit >= 0) { - // The following updates are based on the type of spikestar (red - sine, blue - negative sine, yellow - straight) - if (sprites[sprite_number].frame == WORMINATOR_SPIKESTAR_RED_FLY) { - // Adjust the spikestar's y velocity to conform to a sine wave path -- sprites[sprite_number].y_acceleration = fixtof(fsin(itofix(sprites[sprite_number].rotate_factor))); -+ sprites[sprite_number].y_acceleration = fixtof(fixsin(itofix(sprites[sprite_number].rotate_factor))); - - // Stardust smoke trail - if (out_of_player_range(sprite_number) == FALSE) spawn_stardust((sprites[sprite_number].x_position_in_pixels + sprites[sprite_number].width / 2), (sprites[sprite_number].y_position_in_pixels + sprites[sprite_number].height / 2), 0, .05, 77, 66, 2, 1); - } - else if (sprites[sprite_number].frame == WORMINATOR_SPIKESTAR_BLUE_FLY) { - // Adjust the spikestar's y velocity to conform to an inverse sine wave path -- sprites[sprite_number].y_acceleration = -fixtof(fsin(itofix(sprites[sprite_number].rotate_factor))); -+ sprites[sprite_number].y_acceleration = -fixtof(fixsin(itofix(sprites[sprite_number].rotate_factor))); - - // Stardust smoke trail - if (out_of_player_range(sprite_number) == FALSE) spawn_stardust((sprites[sprite_number].x_position_in_pixels + sprites[sprite_number].width / 2), (sprites[sprite_number].y_position_in_pixels + sprites[sprite_number].height / 2), 0, -.05, 157, 146, 2, 1); diff --git a/worminator.spec b/worminator.spec index ba31cb4..167316c 100644 --- a/worminator.spec +++ b/worminator.spec @@ -1,9 +1,8 @@ Name: worminator Version: 3.0R2.1 -Release: 49%{?dist} +Release: 34%{?dist} Summary: Sidescrolling platform and shoot'em up action-game -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ URL: http://sourceforge.net/projects/worminator/ Source0: http://downloads.sourceforge.net/worminator/worminator-%{version}.tar.gz Source1: worminator.png @@ -11,10 +10,6 @@ Source2: worminator.desktop Source3: %{name}.appdata.xml Patch0: worminator-3.0R2.1-speed.patch Patch1: worminator-3.0R2.1-format-security.patch -Patch2: worminator-3.0R2.1-c99.patch -Patch3: worminator-3.0R2.1-remove-al-fix-aliases.patch -Patch4: worminator-3.0R2.1-fix-compiler-warnings.patch -Patch5: worminator-3.0R2.1-c23.patch BuildRequires: gcc BuildRequires: allegro-devel desktop-file-utils libappstream-glib Requires: worminator-data >= 3.0R2.1-2, hicolor-icon-theme @@ -32,7 +27,8 @@ sed -i 's/\r//' ReadMe.txt %build gcc $RPM_OPT_FLAGS -fsigned-char -Wno-deprecated-declarations \ - -Wno-char-subscripts -DDATADIR=\"%{_datadir}/%{name}/\" -o %{name} \ + -Wno-char-subscripts -DALLEGRO_FIX_ALIASES \ + -DDATADIR=\"%{_datadir}/%{name}/\" -o %{name} \ Worminator.c `allegro-config --libs` -lm @@ -62,51 +58,6 @@ appstream-util validate-relax --nonet \ %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 3.0R2.1-49 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jan 24 2026 Hans de Goede - 3.0R2.1-48 -- Fix FTBFS (rhbz#2341554, rhbz#2385732) - -* Sat Jan 17 2026 Fedora Release Engineering - 3.0R2.1-47 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Jul 25 2025 Fedora Release Engineering - 3.0R2.1-46 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 3.0R2.1-45 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 26 2024 Miroslav Suchý - 3.0R2.1-44 -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 3.0R2.1-43 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 3.0R2.1-42 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 3.0R2.1-41 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Jan 21 2023 Fedora Release Engineering - 3.0R2.1-40 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Dec 23 2022 Peter Fordham - 3.0R2.1-39 -- Add a missing int for C99 compliance. - -* Sat Jul 23 2022 Fedora Release Engineering - 3.0R2.1-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 3.0R2.1-37 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 3.0R2.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 3.0R2.1-35 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - * Wed Jul 29 2020 Fedora Release Engineering - 3.0R2.1-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild