From 4ada0023c44e5523f38672c0c5395b03dae388a3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sep 08 2017 10:21:48 +0000 Subject: Run windowed rather then fullscreen by default Add example alex4.ini to the documentation (for e.g. setting fullscreen mode) Add appdata --- diff --git a/alex4-ini-comment.patch b/alex4-ini-comment.patch new file mode 100644 index 0000000..fe29d03 --- /dev/null +++ b/alex4-ini-comment.patch @@ -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. + # + ############################################################## + diff --git a/alex4-unix.patch b/alex4-unix.patch index 0de8031..b0b3b70 100644 --- a/alex4-unix.patch +++ b/alex4-unix.patch @@ -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); diff --git a/alex4.appdata.xml b/alex4.appdata.xml new file mode 100644 index 0000000..8d19c63 --- /dev/null +++ b/alex4.appdata.xml @@ -0,0 +1,28 @@ + + + alex4.desktop + CC0-1.0 + GPL+ + Alex the Allegator 4 + Old school platform game + +

+ 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. +

+

+ 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. +

+
+ https://obiot.github.io/Alex4-WE/readme.html + https://obiot.github.io/Alex4-WE/readme.html#play + + https://obiot.github.io/Alex4-WE/images/overview.gif + + jwrdegoede_at_fedoraproject.org +
diff --git a/alex4.desktop b/alex4.desktop index 549aa7b..392e3f8 100644 --- a/alex4.desktop +++ b/alex4.desktop @@ -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; diff --git a/alex4.png b/alex4.png index 2c8807a..07a7ace 100644 Binary files a/alex4.png and b/alex4.png differ diff --git a/alex4.spec b/alex4.spec index 182932e..17dc35f 100644 --- a/alex4.spec +++ b/alex4.spec @@ -1,17 +1,20 @@ Name: alex4 Version: 1.0 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Alex the Allegator 4 - Platform game Group: Amusements/Games License: GPL+ -URL: http://allegator.sourceforge.net/ +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 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 BuildRequires: allegro-devel dumb-devel desktop-file-utils ImageMagick Requires: hicolor-icon-theme @@ -22,18 +25,14 @@ nice colors guaranteed! %prep -%setup -q -n alex4src -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -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" popd @@ -46,9 +45,13 @@ popd mkdir -p $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 + $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 %post @@ -65,14 +68,20 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -%doc license.txt readme.txt +%doc license.txt readme.txt alex4.ini %{_bindir}/%{name} %{_datadir}/%{name} +%{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop -%{_datadir}/icons/hicolor/32x32/apps/%{name}.png +%{_datadir}/icons/hicolor/64x64/apps/%{name}.png %changelog +* Fri Sep 08 2017 Hans de Goede - 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 - 1.0-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/alex4src-warnings.patch b/alex4src-warnings.patch new file mode 100644 index 0000000..2e73f64 --- /dev/null +++ b/alex4src-warnings.patch @@ -0,0 +1,24 @@ +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 +@@ -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); +