Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package flare for openSUSE:Factory checked 
in at 2022-05-12 23:00:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/flare (Old)
 and      /work/SRC/openSUSE:Factory/.flare.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "flare"

Thu May 12 23:00:28 2022 rev:8 rq:976463 version:1.13.04

Changes:
--------
--- /work/SRC/openSUSE:Factory/flare/flare.changes      2022-02-06 
23:55:58.306136774 +0100
+++ /work/SRC/openSUSE:Factory/.flare.new.1538/flare.changes    2022-05-12 
23:00:55.792842682 +0200
@@ -1,0 +2,10 @@
+Sat May  7 19:52:39 UTC 2022 - Ferdinand Thiessen <[email protected]>
+
+- Update to version 1.13.04
+  * Added 'bar_gfx' property to menus/enemy.txt for setting the "fill" image
+  * Fix crash when trying to read a non-existent file with INCLUDE
+  * Fix passive powers not being correctly re-applied after death
+  * Improve performance of WidgetListBox by caching all items
+    instead of just the visible ones
+
+-------------------------------------------------------------------

Old:
----
  flare-engine-v1.13.tar.gz

New:
----
  flare-engine-v1.13.04.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ flare.spec ++++++
--- /var/tmp/diff_new_pack.7idTk9/_old  2022-05-12 23:00:56.468843590 +0200
+++ /var/tmp/diff_new_pack.7idTk9/_new  2022-05-12 23:00:56.472843595 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           flare
-Version:        1.13
+Version:        1.13.04
 Release:        0
 Summary:        Free Libre Action Roleplaying Engine
 License:        (CC-BY-SA-3.0 OR CC-BY-SA-4.0) AND GPL-3.0-or-later
@@ -35,8 +35,8 @@
 Requires:       %{name}-game = %{version}
 Requires(post): hicolor-icon-theme
 Requires(post): update-desktop-files
-Requires(postun): hicolor-icon-theme
-Requires(postun): update-desktop-files
+Requires(postun):hicolor-icon-theme
+Requires(postun):update-desktop-files
 Recommends:     python
 Provides:       %{name}-engine = %{version}
 
@@ -63,7 +63,7 @@
     -DDATADIR="share/flare" \
     -DCMAKE_BUILD_TYPE="Release" \
     -DCMAKE_INSTALL_PREFIX="%{_prefix}"
-%make_build
+%cmake_build
 
 %install
 %cmake_install

++++++ flare-engine-v1.13.tar.gz -> flare-engine-v1.13.04.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/CMakeLists.txt 
new/flare-engine-v1.13.04/CMakeLists.txt
--- old/flare-engine-v1.13/CMakeLists.txt       2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/CMakeLists.txt    2022-02-09 17:40:26.000000000 
+0100
@@ -2,7 +2,7 @@
 cmake_minimum_required (VERSION 2.8.12)
 
 Set (PACKAGE "FLARE")
-Set (VERSION "1.13")
+Set (VERSION "1.13.04")
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/RELEASE_NOTES.txt 
new/flare-engine-v1.13.04/RELEASE_NOTES.txt
--- old/flare-engine-v1.13/RELEASE_NOTES.txt    2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/RELEASE_NOTES.txt 2022-02-09 17:40:26.000000000 
+0100
@@ -1,3 +1,19 @@
+Flare v1.14 (WIP)
+
+Flare v1.13.04
+
+Engine features:
+
+* Added 'bar_gfx' property to menus/enemy.txt for setting the "fill" image
+
+Engine fixes:
+
+* Fix crash when trying to read a non-existent file with INCLUDE
+* Fix passive powers not being correctly re-applied after death
+* Improve performance of WidgetListBox by caching all items instead of just 
the visible ones
+
+
+
 Flare v1.13 (https://flarerpg.org/2022/01/31/flare-1-13/)
 
 Engine features:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/docs/attribute-reference.html 
new/flare-engine-v1.13.04/docs/attribute-reference.html
--- old/flare-engine-v1.13/docs/attribute-reference.html        2022-02-01 
06:15:01.000000000 +0100
+++ new/flare-engine-v1.13.04/docs/attribute-reference.html     2022-02-09 
17:40:26.000000000 +0100
@@ -1374,6 +1374,8 @@
 
 <p><strong>bar_fill_size</strong> | <code>int, int : Width, Height</code> | 
Size of the bar's fill graphics. If not defined, the width/height of bar_pos is 
used.</p>
 
+<p><strong>bar_gfx</strong> | <code>filename</code> | Filename of the image to 
use for the "fill" of the bar.</p>
+
 <hr />
 
 <h4>MenuGameOver</h4>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/FileParser.cpp 
new/flare-engine-v1.13.04/src/FileParser.cpp
--- old/flare-engine-v1.13/src/FileParser.cpp   2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/FileParser.cpp        2022-02-09 
17:40:26.000000000 +0100
@@ -180,8 +180,10 @@
                                                include_fp = NULL;
                                        }
 
-                                       // INCLUDE file will inherit the 
current section
-                                       include_fp->section = section;
+                                       if (include_fp) {
+                                               // INCLUDE file will inherit 
the current section
+                                               include_fp->section = section;
+                                       }
 
                                        continue;
                                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/Flare.rc 
new/flare-engine-v1.13.04/src/Flare.rc
--- old/flare-engine-v1.13/src/Flare.rc 2022-02-01 06:15:01.000000000 +0100
+++ new/flare-engine-v1.13.04/src/Flare.rc      2022-02-09 17:40:26.000000000 
+0100
@@ -24,20 +24,20 @@
 
 VS_VERSION_INFO VERSIONINFO
   FILEVERSION    1,0,0,0
-  PRODUCTVERSION 1,13,0,0
+  PRODUCTVERSION 1,13,4,0
 BEGIN
     BLOCK "StringFileInfo"
     BEGIN
         BLOCK "040904E4"
         BEGIN
-            VALUE "Comments", "Flare Alpha\0"
+            VALUE "Comments", "Flare\0"
             VALUE "FileDescription", "Free Libre Action Roleplaying Engine\0"
             VALUE "FileVersion", "1, 0, 0\0"
             VALUE "InternalName", "Flare\0"
             VALUE "LegalCopyright", "Clint Bellanger and Contributors - 2011\0"
             VALUE "OriginalFilename", "flare.exe\0"
             VALUE "ProductName", "Flare\0"
-            VALUE "ProductVersion", "1, 13, 0\0"
+            VALUE "ProductVersion", "1, 13, 04\0"
         END
     END
     BLOCK "VarFileInfo"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/GameStatePlay.cpp 
new/flare-engine-v1.13.04/src/GameStatePlay.cpp
--- old/flare-engine-v1.13/src/GameStatePlay.cpp        2022-02-01 
06:15:01.000000000 +0100
+++ new/flare-engine-v1.13.04/src/GameStatePlay.cpp     2022-02-09 
17:40:26.000000000 +0100
@@ -969,6 +969,8 @@
                pc->stats.hp = pc->stats.get(Stats::HP_MAX);
                pc->stats.logic();
                pc->stats.recalc();
+               menu->pow->resetToBasePowers();
+               menu->pow->setUnlockedPowers();
                powers->activatePassives(&pc->stats);
                pc->respawn = false;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/MenuEnemy.cpp 
new/flare-engine-v1.13.04/src/MenuEnemy.cpp
--- old/flare-engine-v1.13/src/MenuEnemy.cpp    2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/MenuEnemy.cpp 2022-02-09 17:40:26.000000000 
+0100
@@ -43,6 +43,7 @@
        , custom_text_pos(false)
        , bar_fill_offset()
        , bar_fill_size(-1, -1)
+       , bar_gfx("images/menus/enemy_bar_hp.png")
        , enemy(NULL)
 {
        // disappear after 10 seconds
@@ -56,8 +57,6 @@
                        if (parseMenuKey(infile.key, infile.val))
                                continue;
 
-                       infile.val = infile.val + ',';
-
                        // @ATTR bar_pos|rectangle|Position and dimensions of 
the health bar.
                        if(infile.key == "bar_pos") {
                                bar_pos = Parse::toRect(infile.val);
@@ -75,6 +74,10 @@
                        else if (infile.key == "bar_fill_size") {
                                bar_fill_size = Parse::toPoint(infile.val);
                        }
+                       // @ATTR bar_gfx|filename|Filename of the image to use 
for the "fill" of the bar.
+                       else if (infile.key == "bar_gfx") {
+                               bar_gfx = infile.val;
+                       }
                        else {
                                infile.error("MenuEnemy: '%s' is not a valid 
key.", infile.key.c_str());
                        }
@@ -99,7 +102,7 @@
        if (!background)
                setBackground("images/menus/enemy_bar.png");
 
-       graphics = render_device->loadImage("images/menus/enemy_bar_hp.png", 
RenderDevice::ERROR_NORMAL);
+       graphics = render_device->loadImage(bar_gfx, 
RenderDevice::ERROR_NORMAL);
        if (graphics) {
                bar_hp = graphics->createSprite();
                graphics->unref();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/MenuEnemy.h 
new/flare-engine-v1.13.04/src/MenuEnemy.h
--- old/flare-engine-v1.13/src/MenuEnemy.h      2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/MenuEnemy.h   2022-02-09 17:40:26.000000000 
+0100
@@ -40,6 +40,7 @@
        bool custom_text_pos;
        Point bar_fill_offset;
        Point bar_fill_size;
+       std::string bar_gfx;
 
        WidgetLabel label_text;
        WidgetLabel label_stats;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/Version.cpp 
new/flare-engine-v1.13.04/src/Version.cpp
--- old/flare-engine-v1.13/src/Version.cpp      2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/Version.cpp   2022-02-09 17:40:26.000000000 
+0100
@@ -30,7 +30,7 @@
 
 #include <SDL.h>
 
-Version VersionInfo::ENGINE(1, 13, 0);
+Version VersionInfo::ENGINE(1, 13, 4);
 Version VersionInfo::MIN(0, 0, 0);
 Version VersionInfo::MAX(USHRT_MAX, USHRT_MAX, USHRT_MAX);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/WidgetLabel.cpp 
new/flare-engine-v1.13.04/src/WidgetLabel.cpp
--- old/flare-engine-v1.13/src/WidgetLabel.cpp  2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/WidgetLabel.cpp       2022-02-09 
17:40:26.000000000 +0100
@@ -59,6 +59,40 @@
        enable_tablist_nav = false;
 }
 
+WidgetLabel::WidgetLabel(const WidgetLabel &other)
+       : label(NULL)
+{
+       *this = other;
+}
+
+WidgetLabel& WidgetLabel::operator=(const WidgetLabel &other) {
+       if (this == &other)
+               return *this;
+
+       Widget::operator=(other);
+
+       justify = other.justify;
+       valign = other.valign;
+       max_width = other.max_width;
+       update_flag = UPDATE_RECACHE;
+       hidden = other.hidden;
+       window_resize_flag = other.window_resize_flag;
+       alpha = other.alpha;
+       text = other.text;
+       font_style = other.font_style;
+       color = other.color;
+       bounds = other.bounds;
+
+       if (label) {
+               delete label;
+       }
+
+       label = NULL;
+       update();
+
+       return *this;
+}
+
 void WidgetLabel::setMaxWidth(int width) {
        if (width != max_width) {
                max_width = width;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/WidgetLabel.h 
new/flare-engine-v1.13.04/src/WidgetLabel.h
--- old/flare-engine-v1.13/src/WidgetLabel.h    2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/WidgetLabel.h 2022-02-09 17:40:26.000000000 
+0100
@@ -80,6 +80,8 @@
        static const std::string DEFAULT_FONT;
 
        WidgetLabel();
+       WidgetLabel(const WidgetLabel& other);
+       WidgetLabel& operator= (const WidgetLabel &other);
        ~WidgetLabel();
        void render();
        void setMaxWidth(int width);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/WidgetListBox.cpp 
new/flare-engine-v1.13.04/src/WidgetListBox.cpp
--- old/flare-engine-v1.13/src/WidgetListBox.cpp        2022-02-01 
06:15:01.000000000 +0100
+++ new/flare-engine-v1.13.04/src/WidgetListBox.cpp     2022-02-09 
17:40:26.000000000 +0100
@@ -42,7 +42,6 @@
        , has_scroll_bar(false)
        , any_selected(false)
        , show_tooltip_for_selected(false)
-       , vlabels(std::vector<WidgetLabel>(height,WidgetLabel()))
        , rows(std::vector<Rect>(height,Rect()))
        , scrollbar(new WidgetScrollBar(WidgetScrollBar::DEFAULT_FILE))
        , pos_scroll()
@@ -352,10 +351,10 @@
                        render_device->render(listboxs);
                }
 
-               if (i<items.size()) {
-                       vlabels[i].local_frame = local_frame;
-                       vlabels[i].local_offset = local_offset;
-                       vlabels[i].render();
+               if (i+cursor < items.size()) {
+                       items[i+cursor].label.local_frame = local_frame;
+                       items[i+cursor].label.local_offset = local_offset;
+                       items[i+cursor].label.render();
                }
        }
 
@@ -397,8 +396,8 @@
  * Also, toggle the scrollbar based on the size of the list
  */
 void WidgetListBox::refresh() {
-       std::string temp;
        int right_margin = 0;
+       int padding = font->getFontHeight();
 
        // Update the scrollbar
        if (items.size() > rows.size()) {
@@ -415,6 +414,17 @@
                right_margin = eset->widgets.listbox_text_margin.y;
        }
 
+       // cache all item text
+       for (size_t i = 0; i < items.size(); ++i) {
+               items[i].label.setVAlign(LabelInfo::VALIGN_CENTER);
+               if (disable_text_trim)
+                       items[i].label.setText(items[i].value);
+               else
+                       
items[i].label.setText(font->trimTextToWidth(items[i].value, 
pos.w-right_margin-padding, FontEngine::USE_ELLIPSIS, 0));
+
+               items[i].label.setHidden(i < static_cast<size_t>(cursor) || i 
>= static_cast<size_t>(cursor) + rows.size());
+       }
+
        // Update each row's hitbox and label
        for(unsigned i=0; i<rows.size(); i++) {
                rows[i].x = pos.x;
@@ -427,24 +437,15 @@
                }
                rows[i].h = pos.h;
 
-               int padding = font->getFontHeight();
 
                if (i+cursor < items.size()) {
-                       if (disable_text_trim)
-                               temp = items[i+cursor].value;
-                       else
-                               temp = 
font->trimTextToWidth(items[i+cursor].value, pos.w-right_margin-padding, 
FontEngine::USE_ELLIPSIS, 0);
-               }
-
-               vlabels[i].setPos(rows[i].x + 
eset->widgets.listbox_text_margin.x, rows[i].y + (rows[i].h/2));
-               vlabels[i].setVAlign(LabelInfo::VALIGN_CENTER);
-               vlabels[i].setText(temp);
-
-               if(i+cursor < items.size() && items[i+cursor].selected) {
-                       
vlabels[i].setColor(font->getColor(FontEngine::COLOR_WIDGET_NORMAL));
-               }
-               else if (i < items.size()) {
-                       
vlabels[i].setColor(font->getColor(FontEngine::COLOR_WIDGET_DISABLED));
+                       items[i+cursor].label.setPos(rows[i].x + 
eset->widgets.listbox_text_margin.x, rows[i].y + (rows[i].h/2));
+                       if (items[i+cursor].selected) {
+                               
items[i+cursor].label.setColor(font->getColor(FontEngine::COLOR_WIDGET_NORMAL));
+                       }
+                       else {
+                               
items[i+cursor].label.setColor(font->getColor(FontEngine::COLOR_WIDGET_DISABLED));
+                       }
                }
        }
 
@@ -557,10 +558,8 @@
        if (new_size < 2)
                new_size = 2;
 
-       vlabels.clear();
        rows.clear();
 
-       vlabels.resize(static_cast<size_t>(new_size));
        rows.resize(static_cast<size_t>(new_size));
 
        refresh();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flare-engine-v1.13/src/WidgetListBox.h 
new/flare-engine-v1.13.04/src/WidgetListBox.h
--- old/flare-engine-v1.13/src/WidgetListBox.h  2022-02-01 06:15:01.000000000 
+0100
+++ new/flare-engine-v1.13.04/src/WidgetListBox.h       2022-02-09 
17:40:26.000000000 +0100
@@ -44,6 +44,7 @@
                }
                std::string value;
                std::string tooltip;
+               WidgetLabel label;
                bool selected;
        };
 
@@ -58,7 +59,6 @@
        bool any_selected;
        bool show_tooltip_for_selected;
        std::vector<ListBoxItem> items;
-       std::vector<WidgetLabel> vlabels;
        std::vector<Rect> rows;
        WidgetScrollBar *scrollbar;
 

Reply via email to