Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lbreakouthd for openSUSE:Factory checked in at 2022-03-07 17:47:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lbreakouthd (Old) and /work/SRC/openSUSE:Factory/.lbreakouthd.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lbreakouthd" Mon Mar 7 17:47:14 2022 rev:5 rq:959839 version:1.0.9 Changes: -------- --- /work/SRC/openSUSE:Factory/lbreakouthd/lbreakouthd.changes 2021-08-19 10:02:17.603170982 +0200 +++ /work/SRC/openSUSE:Factory/.lbreakouthd.new.1958/lbreakouthd.changes 2022-03-07 17:47:17.915113649 +0100 @@ -1,0 +2,6 @@ +Sun Mar 6 07:21:37 UTC 2022 - Carsten Ziepke <[email protected]> + +- Update to version 1.0.9: + * fixed texture problem with old hardware + +------------------------------------------------------------------- Old: ---- lbreakouthd-1.0.8.tar.gz New: ---- lbreakouthd-1.0.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lbreakouthd.spec ++++++ --- /var/tmp/diff_new_pack.tEg0yb/_old 2022-03-07 17:47:18.727113414 +0100 +++ /var/tmp/diff_new_pack.tEg0yb/_new 2022-03-07 17:47:18.731113413 +0100 @@ -1,7 +1,7 @@ # # spec file for package lbreakouthd # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2019-2021, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: lbreakouthd -Version: 1.0.8 +Version: 1.0.9 Release: 0 Summary: Classic Breakout-Style Game License: GPL-2.0-or-later ++++++ lbreakouthd-1.0.8.tar.gz -> lbreakouthd-1.0.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/Changelog new/lbreakouthd-1.0.9/Changelog --- old/lbreakouthd-1.0.8/Changelog 2021-08-08 18:18:48.000000000 +0200 +++ new/lbreakouthd-1.0.9/Changelog 2022-03-02 13:47:58.000000000 +0100 @@ -1,3 +1,6 @@ +1.0.9: +- fixed texture problem with old hardware (2022/03/02 MS) + 1.0.8: - fixed instant set selection in custom set dialog (2021/08/08 MS) - added paddle acceleration for keys/gamepad (2021/08/08 MS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/README new/lbreakouthd-1.0.9/README --- old/lbreakouthd-1.0.8/README 2018-12-21 19:10:39.000000000 +0100 +++ new/lbreakouthd-1.0.9/README 2021-10-16 12:38:16.000000000 +0200 @@ -1,5 +1,14 @@ -LBreakoutHD ------------ +ToC +--- + Introduction + Extras/Bricks + Minigames + Themes + Troubleshooting + + +Introduction +------------ First and foremost to make things clear: LBreakoutHD is an HD remake of LBreakout2 (all levelsets and themes will work). The game itself is @@ -98,6 +107,7 @@ Jumping Jack: Try to hit the brick before time runs out. If you succeed it jumps to a new position. With every hit you'll gain more score but have less time. + Themes ------ The most boring part first: IF you use other people's artwork please check that @@ -199,6 +209,19 @@ pixels in theme resolution. Just play around with the values if you're interested in changing it. + +Troubleshooting +--------------- +1) If bonuses/maluses are not shown properly on older machines it's an SDL2 +problem connected to older versions of OpenGL (already reported to SDL +thanks to Antoni Aloy Torrens). If you have this problem you can try to run + LIBGL_ALWAYS_SOFTWARE=1 lbreakouthd +to use software rendering. This might fix the problem of not showing +bonuses/maluses but will be slower. + +2) If the screen is cut off this might be due to an older non-16:9 +resolution like 1366x768. Either switch to 1280x720 or play in window mode. + Enjoy, Michael diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/TODO new/lbreakouthd-1.0.9/TODO --- old/lbreakouthd-1.0.8/TODO 2021-04-06 20:48:01.000000000 +0200 +++ new/lbreakouthd-1.0.9/TODO 2021-08-09 09:12:34.000000000 +0200 @@ -1,2 +1,3 @@ editor -menu for gamepad \ No newline at end of file +menu for gamepad +warp mouse for absolute position to keep inside playing field \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/configure new/lbreakouthd-1.0.9/configure --- old/lbreakouthd-1.0.8/configure 2021-08-08 18:52:17.000000000 +0200 +++ new/lbreakouthd-1.0.9/configure 2022-03-02 13:48:02.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for lbreakouthd 1.0.8. +# Generated by GNU Autoconf 2.69 for lbreakouthd 1.0.9. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='lbreakouthd' PACKAGE_TARNAME='lbreakouthd' -PACKAGE_VERSION='1.0.8' -PACKAGE_STRING='lbreakouthd 1.0.8' +PACKAGE_VERSION='1.0.9' +PACKAGE_STRING='lbreakouthd 1.0.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1359,7 +1359,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lbreakouthd 1.0.8 to adapt to many kinds of systems. +\`configure' configures lbreakouthd 1.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1430,7 +1430,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lbreakouthd 1.0.8:";; + short | recursive ) echo "Configuration of lbreakouthd 1.0.9:";; esac cat <<\_ACEOF @@ -1542,7 +1542,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -lbreakouthd configure 1.0.8 +lbreakouthd configure 1.0.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2228,7 +2228,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lbreakouthd $as_me 1.0.8, which was +It was created by lbreakouthd $as_me 1.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3099,7 +3099,7 @@ # Define the identity of the package. PACKAGE='lbreakouthd' - VERSION='1.0.8' + VERSION='1.0.9' cat >>confdefs.h <<_ACEOF @@ -12659,7 +12659,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by lbreakouthd $as_me 1.0.8, which was +This file was extended by lbreakouthd $as_me 1.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12725,7 +12725,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -lbreakouthd config.status 1.0.8 +lbreakouthd config.status 1.0.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/configure.ac new/lbreakouthd-1.0.9/configure.ac --- old/lbreakouthd-1.0.8/configure.ac 2021-08-08 18:18:47.000000000 +0200 +++ new/lbreakouthd-1.0.9/configure.ac 2022-03-02 13:47:51.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT(lbreakouthd, 1.0.8) +AC_INIT(lbreakouthd, 1.0.9) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE Binary files old/lbreakouthd-1.0.8/po/de.gmo and new/lbreakouthd-1.0.9/po/de.gmo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/po/de.po new/lbreakouthd-1.0.9/po/de.po --- old/lbreakouthd-1.0.8/po/de.po 2021-08-08 18:18:47.000000000 +0200 +++ new/lbreakouthd-1.0.9/po/de.po 2022-03-02 13:48:30.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-08 12:33+0200\n" +"POT-Creation-Date: 2022-03-02 13:48+0100\n" "PO-Revision-Date: 2019-06-26 10:11+0200\n" "Last-Translator: Wuzzy <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/po/lbreakouthd.pot new/lbreakouthd-1.0.9/po/lbreakouthd.pot --- old/lbreakouthd-1.0.8/po/lbreakouthd.pot 2021-08-08 18:18:47.000000000 +0200 +++ new/lbreakouthd-1.0.9/po/lbreakouthd.pot 2022-03-02 13:48:30.000000000 +0100 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: lbreakouthd 1.0.8\n" +"Project-Id-Version: lbreakouthd 1.0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-08 12:33+0200\n" +"POT-Creation-Date: 2022-03-02 13:48+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/src/sdl.cpp new/lbreakouthd-1.0.9/src/sdl.cpp --- old/lbreakouthd-1.0.8/src/sdl.cpp 2021-04-06 20:48:01.000000000 +0200 +++ new/lbreakouthd-1.0.9/src/sdl.cpp 2022-03-02 13:30:28.000000000 +0100 @@ -104,31 +104,119 @@ return ret; } +/** OLD STUFF FOR SOFTWARE SCALE AS FALLBACK */ + +/** Set pixel in surface. */ +Uint32 set_pixel( SDL_Surface *surf, int x, int y, Uint32 pixel ) +{ + int pos = 0; + + if (x < 0 || y < 0 || x >= surf->w || y >= surf->h) + return pixel; + + pos = y * surf->pitch + x * surf->format->BytesPerPixel; + memcpy( (char*)(surf->pixels) + pos, &pixel, surf->format->BytesPerPixel ); + return pixel; +} + +/** Get pixel from surface. */ +Uint32 get_pixel( SDL_Surface *surf, int x, int y ) +{ + int pos = 0; + Uint32 pixel = 0; + + pos = y * surf->pitch + x * surf->format->BytesPerPixel; + memcpy( &pixel, (char*)(surf->pixels) + pos, surf->format->BytesPerPixel ); + return pixel; +} + +/** Scale surface to half the size */ +SDL_Surface *create_small_surface(SDL_Surface *src) { + SDL_Surface *dst = 0; + SDL_PixelFormat *spf = src->format; + + if ((dst = SDL_CreateRGBSurface(SDL_SWSURFACE, + src->w/2, src->h/2, + spf->BitsPerPixel, + spf->Rmask, spf->Gmask, spf->Bmask, + spf->Amask)) == 0) { + _logsdlerr(); + return 0; + } + + for ( int j = 0; j < dst->h; j++ ) { + for ( int i = 0; i < dst->w; i++ ) + set_pixel(dst, i, j, + get_pixel( src, i*2, j*2 ) ); + } + return dst; +} + +/** OLD STUFF END */ + +/** Load image from file. Return + * 1 on success without any problems + * 2 on successfully loading surface but failing to create hardware texture + * then surface is scaled to half size and smaller texture is created + * 0 on complete failure + */ int Image::load(const string& fname) { _logdebug(1,"Loading texture %s\n",fname.c_str()); + /* delete old texture */ if (tex) { SDL_DestroyTexture(tex); tex = NULL; } + w = 0; + h = 0; + /* load image as software surface */ SDL_Surface *surf = IMG_Load(fname.c_str()); if (surf == NULL) { _logsdlerr(); return 0; } + + /* set black as color key if requested for old images */ if (Image::useColorKeyBlack) SDL_SetColorKey(surf, SDL_TRUE, 0x0); - if ((tex = SDL_CreateTextureFromSurface(mrc, surf)) == NULL) { + + /* create hardware texture from software surface */ + if ((tex = SDL_CreateTextureFromSurface(mrc, surf))) { + w = surf->w; + h = surf->h; + SDL_FreeSurface(surf); + return 1; + } + _logsdlerr(); + + /* if we get here, surface was loaded thus file found + * but we couldn't create the texture strongly suggesting + * it is too large for video memory. so we scale down and + * retry once before we give up. */ + + /* get new surface half the size */ + SDL_Surface *newsurf = create_small_surface(surf); + if (newsurf == 0) { _logsdlerr(); + SDL_FreeSurface(surf); return 0; } - w = surf->w; - h = surf->h; + + /* create texture with new surface */ + int ret = 0; + if ((tex = SDL_CreateTextureFromSurface(mrc, newsurf))) { + w = newsurf->w; + h = newsurf->h; + ret = 2; + } SDL_FreeSurface(surf); - return 1; + SDL_FreeSurface(newsurf); + return ret; } + int Image::load(SDL_Surface *s) { _logdebug(1,"Loading texture from surface %dx%d\n",s->w,s->h); @@ -291,9 +379,19 @@ int GridImage::load(const string& fname, int _gw, int _gh) { + /* set grid size and load basic image */ gw = _gw; gh = _gh; - return Image::load(fname); + int ret = Image::load(fname); + /* if 2 is returned the image was scaled down to + * half the size so adjust grid size accordingly. */ + if (ret == 2) { + gw /= 2; + gh /= 2; + _logerr("Grid image %s too big for hardware texture: scaled to half size %dx%d", + fname.c_str(),gw,gh); + } + return ret; } int GridImage::load(SDL_Surface *s, int _gw, int _gh) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.0.8/src/theme.cpp new/lbreakouthd-1.0.9/src/theme.cpp --- old/lbreakouthd-1.0.8/src/theme.cpp 2021-04-07 18:35:48.000000000 +0200 +++ new/lbreakouthd-1.0.9/src/theme.cpp 2022-02-19 13:05:56.000000000 +0100 @@ -496,8 +496,8 @@ sExtras[EX_SCORE5000].load(testRc(path,"score.wav")); sExtras[EX_SCORE10000].load(testRc(path,"score.wav")); sExtras[EX_GOLDSHOWER].load(testRc(path,"score.wav")); - sExtras[EX_SHORTEN].load(testRc(path,"expand.wav")); - sExtras[EX_LENGTHEN].load(testRc(path,"shrink.wav")); + sExtras[EX_SHORTEN].load(testRc(path,"shrink.wav")); + sExtras[EX_LENGTHEN].load(testRc(path,"expand.wav")); sExtras[EX_LIFE].load(testRc(path,"gainlife.wav")); sExtras[EX_SLIME].load(testRc(path,"attach.wav")); sExtras[EX_METAL].load(testRc(path,"energyhit.wav"));
