.gear/rules | 2 + .../tags/606c586fbb704fbf76eaab9c0f23df449a7fcf7e | 13 ++ .gear/tags/list | 1 + c_stuff/fb_c_stuff.xs | 59 +++--- c_stuff/lib/fb_config.pm | 7 + frozen-bubble.spec | 213 +++++++++++++++++++++ 6 files changed, 268 insertions(+), 27 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..9973244 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: @version@:. name=frozen-bubble-@version@ +diff: @version@:. . name=frozen-bubble-@version@-@release@.patch diff --git a/.gear/tags/606c586fbb704fbf76eaab9c0f23df449a7fcf7e b/.gear/tags/606c586fbb704fbf76eaab9c0f23df449a7fcf7e new file mode 100644 index 0000000..58aa6d9 --- /dev/null +++ b/.gear/tags/606c586fbb704fbf76eaab9c0f23df449a7fcf7e @@ -0,0 +1,13 @@ +object b970fc33cf5868e7de503126b4e4af520b3edbdc +type commit +tag 2.2.0 +tagger Alexey Tourbin 1266364337 +0300 + +2.2.0 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) + +iEYEABECAAYFAkt7L7IACgkQfBKgtDjnu0a80wCeIC6kwKvGOayLU043FJhY7j5b +S48AoMsCPhdbvvT1FBNN5JK1toFEtOb0 +=DaYp +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..90686bf --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +606c586fbb704fbf76eaab9c0f23df449a7fcf7e 2.2.0 diff --git a/c_stuff/fb_c_stuff.xs b/c_stuff/fb_c_stuff.xs index 3eca23d..8451e52 100644 --- a/c_stuff/fb_c_stuff.xs +++ b/c_stuff/fb_c_stuff.xs @@ -94,17 +94,18 @@ int rand_(double val) { return 1+(int) (val*rand()/(RAND_MAX+1.0)); } /* -------------- Double Store ------------------ */ +void copy_line(int l, SDL_Surface * s, SDL_Surface * img) { + memcpy(s->pixels + l*img->pitch, img->pixels + l*img->pitch, img->pitch); +} + +void copy_column(int c, SDL_Surface * s, SDL_Surface * img) { + int bpp = img->format->BytesPerPixel; + for (y=0; ypixels + y*img->pitch + c*bpp, img->pixels + y*img->pitch + c*bpp, bpp); +} + void store_effect(SDL_Surface * s, SDL_Surface * img) { - void copy_line(int l) { - memcpy(s->pixels + l*img->pitch, img->pixels + l*img->pitch, img->pitch); - } - void copy_column(int c) { - int bpp = img->format->BytesPerPixel; - for (y=0; ypixels + y*img->pitch + c*bpp, img->pixels + y*img->pitch + c*bpp, bpp); - } - int step = 0; int store_thickness = 15; @@ -116,8 +117,8 @@ void store_effect(SDL_Surface * s, SDL_Surface * img) for (i=0; i<=YRES/2/store_thickness; i++) { int v = step - i; if (v >= 0 && v < store_thickness) { - copy_line(i*store_thickness + v); - copy_line(YRES - 1 - (i*store_thickness + v)); + copy_line(i*store_thickness + v, s, img); + copy_line(YRES - 1 - (i*store_thickness + v), s, img); } } step++; @@ -133,8 +134,8 @@ void store_effect(SDL_Surface * s, SDL_Surface * img) for (i=0; i<=XRES/2/store_thickness; i++) { int v = step - i; if (v >= 0 && v < store_thickness) { - copy_column(i*store_thickness + v); - copy_column(XRES - 1 - (i*store_thickness + v)); + copy_column(i*store_thickness + v, s, img); + copy_column(XRES - 1 - (i*store_thickness + v), s, img); } } step++; @@ -176,21 +177,21 @@ void bars_effect(SDL_Surface * s, SDL_Surface * img) /* -------------- Squares ------------------ */ +int fillrect(int i, int j, SDL_Surface * s, SDL_Surface * img, const int squares_size, int bpp) { + int c, v; + if (i >= XRES/squares_size || j >= YRES/squares_size) + return 0; + v = i*squares_size*bpp + j*squares_size*img->pitch; + for (c=0; cpixels + v + c*img->pitch, img->pixels + v + c*img->pitch, squares_size*bpp); + return 1; +} + void squares_effect(SDL_Surface * s, SDL_Surface * img) { int bpp = img->format->BytesPerPixel; const int squares_size = 32; - int fillrect(int i, int j) { - int c, v; - if (i >= XRES/squares_size || j >= YRES/squares_size) - return 0; - v = i*squares_size*bpp + j*squares_size*img->pitch; - for (c=0; cpixels + v + c*img->pitch, img->pixels + v + c*img->pitch, squares_size*bpp); - return 1; - } - int still_moving = 1; for (i=0; still_moving; i++) { @@ -200,7 +201,7 @@ void squares_effect(SDL_Surface * s, SDL_Surface * img) still_moving = 0; for (j=i; j>=0; j--) { - if (fillrect(j, k)) + if (fillrect(j, k, s, img, squares_size, bpp)) still_moving = 1; k++; } @@ -212,11 +213,15 @@ void squares_effect(SDL_Surface * s, SDL_Surface * img) /* -------------- Circle ------------------ */ +int isqr(int v) +{ + return v*v; +} + int * circle_steps; const int circle_max_steps = 40; void circle_init(void) { - int sqr(int v) { return v*v; } circle_steps = malloc(XRES * YRES * sizeof(int)); if (!circle_steps) @@ -224,8 +229,8 @@ void circle_init(void) for (y=0; y%buildroot%_desktopdir/%name.desktop +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Frozen Bubble +TryExec=frozen-bubble +Exec=frozen-bubble +Categories=Application;Game;ArcadeGame +Icon=/usr/share/icons/hicolor/48x48/apps/frozen-bubble.png +Comment=Frozen Bubble Arcade Game +Comment[ru]=Игра Frozen Bubble +EOF + +install -pDm644 icons/%name-icon-16x16.png %buildroot%_miconsdir/%name.png +install -pDm644 icons/%name-icon-32x32.png %buildroot%_niconsdir/%name.png +install -pDm644 icons/%name-icon-48x48.png %buildroot%_liconsdir/%name.png + +cd c_stuff +%perl_vendor_install + +%files +%doc README AUTHORS TIPS NEWS +%_bindir/%name +%_bindir/%name-editor +%_man6dir/%name.6* +%_man6dir/%name-editor.6* +%_desktopdir/%name.desktop +%_niconsdir/*.png +%_miconsdir/*.png +%_liconsdir/*.png +%perl_vendor_archlib/*.pm +%perl_vendor_autolib/fb_c_stuff + +%package data +Summary: Frozen Bubble arcade game +Group: Games/Arcade +Conflicts: %name < %version +BuildArch: noarch + +%description data +Colorful 3D rendered penguin animations, 100 levels of 1p game, +hours and hours of 2p game, nights and nights of 2p/3p/4p/5p game +over LAN or Internet, a level-editor, 3 professional quality +digital soundtracks, 15 stereo sound effects, 8 unique graphical +transition effects, 8 unique logo eye-candies. + +%files data +%dir %_datadir/%name +%_datadir/%name/data +%_datadir/%name/gfx +%_datadir/%name/snd + +# TODO: +# - package server +# - package locales + +%changelog +* Thu Jan 24 2019 Igor Vlasenko 2.2.0-alt4.1 +- rebuild with new perl 5.28.1 + +* Mon Jan 08 2018 Michael Shigorin 2.2.0-alt4 +- E2K: added openbsd clang patch +- added Russian descriptions (closes: #33776) +- minor spec cleanup + +* Fri Dec 15 2017 Igor Vlasenko 2.2.0-alt3.2.1.1 +- rebuild with new perl 5.26.1 + +* Fri Feb 03 2017 Igor Vlasenko 2.2.0-alt3.2.1 +- rebuild with new perl 5.24.1 + +* Tue Jun 14 2016 Igor Vlasenko 2.2.0-alt3.2 +- preparing for perl-SDL rename + +* Wed Nov 25 2015 Igor Vlasenko 2.2.0-alt3.1.1 +- rebuild with new perl 5.22.0 + +* Tue Dec 09 2014 Igor Vlasenko 2.2.0-alt3.1 +- rebuild with new perl 5.20.1 + +* Fri Aug 30 2013 Vladimir Lettiev 2.2.0-alt3 +- built for perl 5.18 + +* Tue Sep 04 2012 Vladimir Lettiev 2.2.0-alt2 +- rebuilt for perl-5.16 + +* Sun Oct 16 2011 Alexey Tourbin 2.2.0-alt1.2 +- rebuilt for perl-5.14 + +* Sun Nov 07 2010 Vladimir Lettiev 2.2.0-alt1.1 +- rebuilt with perl 5.12 + +* Fri Feb 19 2010 Alexey Tourbin 2.2.0-alt1 +- 2.1.0 -> 2.2.0 +- split %name-data noarch package + +* Wed Feb 03 2010 Repocop Q. A. Robot 2.1.0-alt2.qa1 +- NMU (by repocop): the following fixes applied: + * update_menus for frozen-bubble + * pixmap-in-deprecated-location for frozen-bubble + * postclean-05-filetriggers for spec file + +* Thu Dec 14 2006 Pavlov Konstantin 2.1.0-alt2 +- Fixed .desktop file. + +* Tue Nov 28 2006 Pavlov Konstantin 2.1.0-alt1 +- 2.1.0 release. + +* Sat Nov 18 2006 Pavlov Konstantin 2.0.0-alt3 +- Fixed @LIBDIR@ in fb_stuff.pm. + +* Thu Nov 09 2006 Pavlov Konstantin 2.0.0-alt2 +- Packager changed. +- Cleaned up spec file a bit. +- Added freedesktop menu. + +* Mon Oct 30 2006 Pavlov Konstantin 2.0.0-alt1 +- 2.0.0 release. +- Removed patch for SDL_Perl-2.x. +- Changed Source URL. +- Altered BuildRequires. +- New Description. + +* Fri Feb 04 2005 Alexey Tourbin 1.0.0-alt5 +- ported to SDL_Perl-2.x API +- abandoned Makefile, reworked specfile + +* Fri May 07 2004 Alexey Voinov 1.0.0-alt4 +- removed gimp-perl from buildreqs +- little spec cleaun up +- man pages included + +* Tue Oct 14 2003 Alexey Tourbin 1.0.0-alt3 +- unnecessary files removed along with dependencies (#3159) + +* Tue Sep 30 2003 Alexey Tourbin 1.0.0-alt2 +- fixed build (Makefile workarounds) +- specfile cleanup + +* Mon Feb 24 2003 Rider 1.0.0-alt1 +- 1.0.0 + +* Thu Jan 09 2003 Konstantin Volckov 0.9.3-alt4 +- Fixed menu file + +* Thu Oct 31 2002 Konstantin Volckov 0.9.3-alt3 +- Rebuilt with new perl +- Fixed icons permissions + +* Thu Oct 24 2002 Konstantin Volckov 0.9.3-alt2 +- Rebuilt in new environment + +* Fri Jun 07 2002 Konstantin Volckov 0.9.3-alt1 +- 0.9.3 +- Remove internal libSDL_mixer +- Remove fixed packager + +* Tue Mar 05 2002 Alexander Bokovoy 0.9.2-alt1 +- Initial build for ALT Linux + +* Thu Feb 7 2002 Guillaume Cottenceau 0.9.2-1mdk +- new version + +* Wed Feb 6 2002 Guillaume Cottenceau 0.9.1-1mdk +- first mdk rpm +