Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lbreakouthd for openSUSE:Factory checked in at 2026-03-02 17:35:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lbreakouthd (Old) and /work/SRC/openSUSE:Factory/.lbreakouthd.new.29461 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lbreakouthd" Mon Mar 2 17:35:27 2026 rev:22 rq:1335616 version:1.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/lbreakouthd/lbreakouthd.changes 2026-01-13 21:33:20.020946043 +0100 +++ /work/SRC/openSUSE:Factory/.lbreakouthd.new.29461/lbreakouthd.changes 2026-03-02 17:35:37.415549746 +0100 @@ -1,0 +2,6 @@ +Sun Feb 22 05:38:22 UTC 2026 - Carsten Ziepke <[email protected]> + +- Update to version 1.2.2 + * improved "casual level" check + +------------------------------------------------------------------- Old: ---- lbreakouthd-1.2.1.tar.gz New: ---- lbreakouthd-1.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lbreakouthd.spec ++++++ --- /var/tmp/diff_new_pack.UEZIUm/_old 2026-03-02 17:35:38.311587115 +0100 +++ /var/tmp/diff_new_pack.UEZIUm/_new 2026-03-02 17:35:38.315587282 +0100 @@ -18,7 +18,7 @@ Name: lbreakouthd -Version: 1.2.1 +Version: 1.2.2 Release: 0 Summary: Classic Breakout-Style Game License: GPL-2.0-or-later ++++++ lbreakouthd-1.2.1.tar.gz -> lbreakouthd-1.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/Changelog new/lbreakouthd-1.2.2/Changelog --- old/lbreakouthd-1.2.1/Changelog 2026-01-03 18:18:26.000000000 +0100 +++ new/lbreakouthd-1.2.2/Changelog 2026-02-20 14:03:13.000000000 +0100 @@ -1,3 +1,6 @@ +1.2.2: +- improved "casual level" check (2026/02/20 MS) + 1.2.1: - skip "non-casual" levels for RANDOM20 (2025/12/25 MS) - use proper warp icon for old themes (2025/12/23 MS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/configure new/lbreakouthd-1.2.2/configure --- old/lbreakouthd-1.2.1/configure 2026-01-03 18:18:28.000000000 +0100 +++ new/lbreakouthd-1.2.2/configure 2026-02-20 17:59:28.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for lbreakouthd 1.2.1. +# Generated by GNU Autoconf 2.71 for lbreakouthd 1.2.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ # Identity of this package. PACKAGE_NAME='lbreakouthd' PACKAGE_TARNAME='lbreakouthd' -PACKAGE_VERSION='1.2.1' -PACKAGE_STRING='lbreakouthd 1.2.1' +PACKAGE_VERSION='1.2.2' +PACKAGE_STRING='lbreakouthd 1.2.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1351,7 +1351,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.2.1 to adapt to many kinds of systems. +\`configure' configures lbreakouthd 1.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1422,7 +1422,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lbreakouthd 1.2.1:";; + short | recursive ) echo "Configuration of lbreakouthd 1.2.2:";; esac cat <<\_ACEOF @@ -1530,7 +1530,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -lbreakouthd configure 1.2.1 +lbreakouthd configure 1.2.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1925,7 +1925,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.2.1, which was +It was created by lbreakouthd $as_me 1.2.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3416,7 +3416,7 @@ # Define the identity of the package. PACKAGE='lbreakouthd' - VERSION='1.2.1' + VERSION='1.2.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -10913,7 +10913,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.2.1, which was +This file was extended by lbreakouthd $as_me 1.2.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10981,7 +10981,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -lbreakouthd config.status 1.2.1 +lbreakouthd config.status 1.2.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/configure.ac new/lbreakouthd-1.2.2/configure.ac --- old/lbreakouthd-1.2.1/configure.ac 2026-01-03 18:18:21.000000000 +0100 +++ new/lbreakouthd-1.2.2/configure.ac 2026-02-20 17:59:23.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.71]) -AC_INIT([lbreakouthd],[1.2.1]) +AC_INIT([lbreakouthd],[1.2.2]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/po/de.po new/lbreakouthd-1.2.2/po/de.po --- old/lbreakouthd-1.2.1/po/de.po 2026-01-03 18:18:30.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/de.po 2026-02-20 17:59:30.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+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.2.1/po/es.po new/lbreakouthd-1.2.2/po/es.po --- old/lbreakouthd-1.2.1/po/es.po 2026-01-03 18:18:30.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/es.po 2026-02-20 17:59:30.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 1.1.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+0100\n" "PO-Revision-Date: 2023-10-09 14:04+0200\n" "Last-Translator: Jorge Maldonado Ventura <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/po/fr.po new/lbreakouthd-1.2.2/po/fr.po --- old/lbreakouthd-1.2.1/po/fr.po 2026-01-03 18:18:30.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/fr.po 2026-02-20 17:59:30.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+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.2.1/po/lbreakouthd.pot new/lbreakouthd-1.2.2/po/lbreakouthd.pot --- old/lbreakouthd-1.2.1/po/lbreakouthd.pot 2026-01-03 18:18:29.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/lbreakouthd.pot 2026-02-20 17:59:30.000000000 +0100 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: lbreakouthd 1.2.1\n" +"Project-Id-Version: lbreakouthd 1.2.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+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.2.1/po/ru.po new/lbreakouthd-1.2.2/po/ru.po --- old/lbreakouthd-1.2.1/po/ru.po 2026-01-03 18:18:30.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/ru.po 2026-02-20 17:59:30.000000000 +0100 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 1.1.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+0100\n" "PO-Revision-Date: 2024-01-12 14:04+0300\n" "Last-Translator: Olesya Gerasimenko <[email protected]>\n" "Language-Team: Basealt Translation Team\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/po/sv.po new/lbreakouthd-1.2.2/po/sv.po --- old/lbreakouthd-1.2.1/po/sv.po 2026-01-03 18:18:30.000000000 +0100 +++ new/lbreakouthd-1.2.2/po/sv.po 2026-02-20 17:59:30.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lbreakouthd 1.0.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-03 18:18+0100\n" +"POT-Creation-Date: 2026-02-20 17:59+0100\n" "PO-Revision-Date: 2022-07-07 17:21+0200\n" "Last-Translator: \n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/src/clientgame.cpp new/lbreakouthd-1.2.2/src/clientgame.cpp --- old/lbreakouthd-1.2.1/src/clientgame.cpp 2026-01-03 17:10:54.000000000 +0100 +++ new/lbreakouthd-1.2.2/src/clientgame.cpp 2026-02-20 17:44:43.000000000 +0100 @@ -446,21 +446,23 @@ if (name == RANDOM20) { /* check for and remove badly designed levels */ int numlev = (levelset->count>20)?20:(levelset->count-1); - int subpos = numlev; + int subpos = numlev; /* position of substitute level */ Level **levels = levelset->levels; _logdebug(2,"Checking %s for bad levels...\n", RANDOM20); for (int i = 0; i < numlev; i++) { if (!checkLevel(levels[i])) { - _logdebug(2," [%d] %s is bad...", i, levels[i]->name); + _logdebug(2," rejecting [%d] %s\n", i, levels[i]->name); while (!checkLevel(levels[subpos])) { + _logdebug(2," rejecting [%d] %s\n", + subpos, levels[subpos]->name); subpos++; if (subpos == levelset->count) { subpos--; /* use this last level even if bad */ break; } } - _logdebug(2," replacing with [%d] %s\n",subpos, + _logdebug(2," replacing with [%d] %s\n",subpos, levels[subpos]->name); memcpy(levels[i],levels[subpos],sizeof(Level)); subpos++; @@ -501,41 +503,109 @@ return CGF_RESTARTLEVEL | CGF_LIFELOST; } +/** Return whether position in edit area has a wall brick. If outside edit area + * always true (outer boundary) except for bottom that is always open */ +bool ClientGame::isWall(const Level *l, int x, int y) +{ + if (x < 0 || y < 0 || x >= EDITWIDTH) + return true; + if (y >= EDITHEIGHT) + return false; + + string wallChars = "E#@"; + if (wallChars.find(l->bricks[x][y]) != std::string::npos) + return true; + + return false; +} + /** Check whether level is ok (return true) or bad (return false) * for casual play by checking various criteria. */ bool ClientGame::checkLevel(const Level *l) { - /* if last two lines are used, level is considered too low */ - bool tooLow = false; - for (int j = EDITHEIGHT-2; j < EDITHEIGHT; j++) - for (int i = 0; i < EDITWIDTH; i++) - if (l->bricks[i][j] != '.') - tooLow = true; - if (tooLow) - return false; + bool ret = true; - /* should not have more than 20 wall bricks of any kind - * TODO: improve this to actually check for narrow passages - * but testing for not too many wall bricks should do the - * trick for now. */ - string wallChars = "E#@"; + /* if any of the last two lines has more than 50% bricks, + * level is considered too low */ + int llBrickLimit = EDITWIDTH/2; /* last lines brick limit */ + int llc1 = 0, llc2 = 0; + for (int i = 0; i < EDITWIDTH; i++) { + if (l->bricks[i][EDITHEIGHT-1] != '.') + llc1++; + if (l->bricks[i][EDITHEIGHT-2] != '.') + llc2++; + } + if (llc1 > llBrickLimit || llc2 > llBrickLimit) { + _logdebug(2," too many low bricks (%d, %d)\n",llc1,llc2); + ret = false; + } + + /* should not have more than 30 wall bricks of any kind */ uint wallCount = 0; for (int j = 0; j < EDITHEIGHT; j++) for (int i = 0; i < EDITWIDTH; i++) - if (wallChars.find(l->bricks[i][j]) != std::string::npos) + if (isWall(l,i,j)) wallCount++; - if (wallCount >= 20) - return false; + if (wallCount > 30) { + _logdebug(2," too many walls (%d)\n",wallCount); + ret = false; + } - /* not more than 20 strong or regen bricks */ - string strongChars = "abcvxyz"; + /* not more than 30 strong bricks */ + string strongChars = "bcv"; /* a is one-hint, does not count */ uint strongCount = 0; for (int j = 0; j < EDITHEIGHT; j++) for (int i = 0; i < EDITWIDTH; i++) if (strongChars.find(l->bricks[i][j]) != std::string::npos) strongCount++; - if (strongCount >= 20) - return false; + if (strongCount > 30) { + _logdebug(2," too many strong bricks (%d)\n",strongCount); + ret = false; + } + + /* not more than 12 regen bricks */ + string regenChars = "xyz"; + uint regenCount = 0; + for (int j = 0; j < EDITHEIGHT; j++) + for (int i = 0; i < EDITWIDTH; i++) + if (regenChars.find(l->bricks[i][j]) != std::string::npos) + regenCount++; + if (regenCount > 12) { + _logdebug(2," too many regen bricks (%d)\n",regenCount); + ret = false; + } + + /* not more than 30 grow bricks */ + string growChars = "!"; + uint growCount = 0; + for (int j = 0; j < EDITHEIGHT; j++) + for (int i = 0; i < EDITWIDTH; i++) + if (growChars.find(l->bricks[i][j]) != std::string::npos) + growCount++; + if (growCount > 30) { + _logdebug(2," too many grow bricks (%d)\n",growCount); + ret = false; + } + + /* not more than 5 narrow passages which are defined as "not wall" surrounded + * by at least 2 walls on opposite sites (or outer boundary). so it doesn't + * matter if a brick is temporarily blocking the choke point. */ + uint narrowCount = 0; + for (int j = 0; j < EDITHEIGHT; j++) { + for (int i = 0; i < EDITWIDTH; i++) { + if (isWall(l,i,j)) + continue; + + /* test adjacent positions */ + if ((isWall(l,i-1,j) && isWall(l,i+1,j)) || + (isWall(l,i,j-1) && isWall(l,i,j+1))) + narrowCount++; + } + } + if (narrowCount > 5) { + _logdebug(2," too many narrow gaps (%d)\n",narrowCount); + ret = false; + } - return true; + return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lbreakouthd-1.2.1/src/clientgame.h new/lbreakouthd-1.2.2/src/clientgame.h --- old/lbreakouthd-1.2.1/src/clientgame.h 2026-01-03 17:10:54.000000000 +0100 +++ new/lbreakouthd-1.2.2/src/clientgame.h 2026-02-20 13:44:28.000000000 +0100 @@ -115,6 +115,7 @@ ClientPlayer *getNextPlayer(); void initLevel(Level *l); int loadSuperset(const string &name); + bool isWall(const Level *l, int x, int y); bool checkLevel(const Level *l); public: ClientGame(Config &cfg);
