Hello community,

here is the log from the commit of package bstone for openSUSE:Factory checked 
in at 2020-11-15 15:27:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bstone (Old)
 and      /work/SRC/openSUSE:Factory/.bstone.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bstone"

Sun Nov 15 15:27:04 2020 rev:10 rq:848510 version:1.2.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/bstone/bstone.changes    2020-07-14 
07:59:05.833752262 +0200
+++ /work/SRC/openSUSE:Factory/.bstone.new.24930/bstone.changes 2020-11-15 
15:27:47.331541189 +0100
@@ -1,0 +2,11 @@
+Sat Nov 14 13:09:00 UTC 2020 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.2.9
+  Added
+  * Option vid_filler_color_index to select filler color.
+  Fixed
+  * Enable sfx and music by default for first startup.
+  * Lives counter.
+  * Input floor panel visual glitches.
+
+-------------------------------------------------------------------

Old:
----
  bstone-1.2.8.tar.gz

New:
----
  bstone-1.2.9.tar.gz

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

Other differences:
------------------
++++++ bstone.spec ++++++
--- /var/tmp/diff_new_pack.DX9WBZ/_old  2020-11-15 15:27:47.775541664 +0100
+++ /var/tmp/diff_new_pack.DX9WBZ/_new  2020-11-15 15:27:47.779541668 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           bstone
-Version:        1.2.8
+Version:        1.2.9
 Release:        0
 Summary:        A source port of Blake Stone
 License:        GPL-2.0-or-later

++++++ bstone-1.2.8.tar.gz -> bstone-1.2.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/CHANGELOG.md 
new/bstone-1.2.9/CHANGELOG.md
--- old/bstone-1.2.8/CHANGELOG.md       2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/CHANGELOG.md       2020-11-14 13:19:25.000000000 +0100
@@ -1,6 +1,17 @@
 # BStone changelog
 
 
+## [1.2.9] - 2020-11-14
+### Added
+- Option `vid_filler_color_index` to select filler color.
+- [Windows] File information resource.
+
+### Fixed
+- Enable sfx and music by default for first startup.
+- Lives counter.
+- Input floor panel visual glitches.
+
+
 ## [1.2.8] - 2020-07-10
 ### Fixed
 - Disabled episodes 5 and 6 in static build.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/README.md new/bstone-1.2.9/README.md
--- old/bstone-1.2.8/README.md  2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/README.md  2020-11-14 13:19:25.000000000 +0100
@@ -1,7 +1,7 @@
 BStone
 ======
 
-A source port of Blake Stone: Aliens Of Gold and Blake Stone: Planet Strike.
+Unofficial source port for Blake Stone series (Aliens Of Gold and Planet 
Strike).
 
 
 Contents
@@ -57,7 +57,7 @@
 2 - Overview
 ============
 
-BStone is a source port of "Blake Stone" game series: "Aliens Of Gold" and 
"Planet Strike".
+BStone is unofficial source port for "Blake Stone" game series: "Aliens Of 
Gold" and "Planet Strike".
 
 Features:
 * High resolution vanilla rendering
@@ -99,7 +99,7 @@
 ============
 
 - Put addon's files into separate directory. Do not overwrite any original 
files!
-- Run with command line option `--mod_dir` to pointo to this directory (i.e. 
`bstone.exe --mod_dir addon1`).
+- Run with command line option `--mod_dir` to point to this directory (i.e. 
`bstone.exe --mod_dir addon1`).
 
 
 4 - Required assets
@@ -140,7 +140,6 @@
 
 - [Steam](http://store.steampowered.com)  
   Windows only.  
-  "The Apogee Throwback Pack" supported as well as separated titles.
 
 
 5 - Profile
@@ -364,6 +363,11 @@
   Values: [`2`..`32`]  
   Default: `1`
 
+* `--vid_filler_color_index value`  
+  Sets a color for screen bars.  
+  Values: [`0`..`255`]  
+  Default: `0`
+
 * `--snd_is_disabled value`  
   Enables or disables audio subsystem.  
   Values: `0` (disable) or `1` (enable)  
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_agent.cpp 
new/bstone-1.2.9/src/3d_agent.cpp
--- old/bstone-1.2.8/src/3d_agent.cpp   2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_agent.cpp   2020-11-14 13:19:25.000000000 +0100
@@ -260,6 +260,7 @@
 
 // BBi
 extern bstone::MemoryStream g_playtemp;
+bool is_select_floor = false;
 
 
 /*
@@ -3067,6 +3068,43 @@
 =============================================================================
 */
 
+void select_floor()
+{
+       is_select_floor = false;
+
+       const auto new_floor = InputFloor();
+
+       if (new_floor != -1 && new_floor != gamestate.mapon)
+       {
+               const auto& assets_info = AssetsInfo{};
+               const auto is_ps = assets_info.is_ps();
+
+               if (is_ps)
+               {
+                       gamestuff.level[gamestate.mapon].ptilex = player->tilex;
+                       gamestuff.level[gamestate.mapon].ptiley = player->tiley;
+
+                       auto angle = player->angle - 180;
+
+                       if (angle < 0)
+                       {
+                               angle += ANGLES;
+                       }
+
+                       gamestuff.level[gamestate.mapon].pangle = 
static_cast<std::int16_t>(angle);
+               }
+
+               playstate = is_ps ? ex_transported : ex_completed;
+
+               gamestate.lastmapon = gamestate.mapon;
+               gamestate.mapon = static_cast<std::int16_t>(new_floor - 1);
+       }
+       else
+       {
+               DrawPlayScreen(false);
+       }
+}
+
 void Cmd_Fire()
 {
        if (noShots)
@@ -3166,90 +3204,59 @@
                        {
                                // Test for 'display elevator buttons'
                                //
-                       case TRANSPORTERTILE:
-                       {
-                               const auto new_floor = InputFloor();
-
-                               if (new_floor != -1 && new_floor != 
gamestate.mapon)
-                               {
-                                       const auto is_ps = assets_info.is_ps();
+                               case TRANSPORTERTILE:
+                                       is_select_floor = true;
+                                       break;
 
-                                       if (is_ps)
+                               case DIRECTTRANSPORTTILE:
+                                       switch (iconnum & 0xff00)
                                        {
-                                               
gamestuff.level[gamestate.mapon].ptilex = player->tilex;
-                                               
gamestuff.level[gamestate.mapon].ptiley = player->tiley;
+                                       case 0xf400:
+                                               playstate = ex_transported;
+                                               gamestate.lastmapon = 
gamestate.mapon;
+                                               gamestate.mapon = (iconnum & 
0xff) - 1;
+                                               break;
 
-                                               auto angle = player->angle - 
180;
+                                       default:
+                                               // Stay in current level warp 
to new location
 
-                                               if (angle < 0)
-                                               {
-                                                       angle += ANGLES;
-                                               }
+                                               playstate = ex_transported;
+                                               Warped();
+                                               playstate = ex_stillplaying;
+
+                                               player->tilex = (iconnum >> 8);
+                                               player->tiley = iconnum & 0xff;
+                                               player->x = player->tilex + 0.5;
+                                               player->y = player->tiley + 0.5;
 
-                                               
gamestuff.level[gamestate.mapon].pangle = static_cast<std::int16_t>(angle);
+                                               DrawWarpIn();
+                                               break;
                                        }
-
-                                       playstate = is_ps ? ex_transported : 
ex_completed;
-
-                                       gamestate.lastmapon = gamestate.mapon;
-                                       gamestate.mapon = 
static_cast<std::int16_t>(new_floor - 1);
-                               }
-                               else
-                               {
-                                       DrawPlayScreen(false);
-                               }
-                       }
-                       break;
-
-                       case DIRECTTRANSPORTTILE:
-                               switch (iconnum & 0xff00)
-                               {
-                               case 0xf400:
-                                       playstate = ex_transported;
-                                       gamestate.lastmapon = gamestate.mapon;
-                                       gamestate.mapon = (iconnum & 0xff) - 1;
                                        break;
 
-                               default:
-                                       // Stay in current level warp to new 
location
-
-                                       playstate = ex_transported;
-                                       Warped();
-                                       playstate = ex_stillplaying;
-
-                                       player->tilex = (iconnum >> 8);
-                                       player->tiley = iconnum & 0xff;
-                                       player->x = player->tilex + 0.5;
-                                       player->y = player->tiley + 0.5;
-
-                                       DrawWarpIn();
+                                       //
+                                       // Test for Wall Switch Activation
+                                       //
+                               case OFF_SWITCH:
+                               case ON_SWITCH:
+                                       ActivateWallSwitch(iconnum, checkx, 
checky);
                                        break;
-                               }
-                               break;
-
-                               //
-                               // Test for Wall Switch Activation
-                               //
-                       case OFF_SWITCH:
-                       case ON_SWITCH:
-                               ActivateWallSwitch(iconnum, checkx, checky);
-                               break;
 
 
-                               // Test for Concession Machines
-                               //
+                                       // Test for Concession Machines
+                                       //
 
-                       case FOODTILE:
-                       case SODATILE:
-                               
OperateConcession(static_cast<std::uint16_t>(reinterpret_cast<std::size_t>(actorat[checkx][checky])));
-                               break;
+                               case FOODTILE:
+                               case SODATILE:
+                                       
OperateConcession(static_cast<std::uint16_t>(reinterpret_cast<std::size_t>(actorat[checkx][checky])));
+                                       break;
 
-                       default:
-                               if (assets_info.is_ps())
-                               {
-                                       tryDetonator = true;
-                               }
-                               break;
+                               default:
+                                       if (assets_info.is_ps())
+                                       {
+                                               tryDetonator = true;
+                                       }
+                                       break;
                        }
                }
        }
@@ -4201,7 +4208,12 @@
        }
        else
        {
-               return ps_input_floor();
+               const auto old_vid_is_hud = vid_is_hud;
+               vid_is_hud = false;
+               const auto result = ps_input_floor();
+               vid_is_hud = old_vid_is_hud;
+
+               return result;
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_game.cpp 
new/bstone-1.2.9/src/3d_game.cpp
--- old/bstone-1.2.8/src/3d_game.cpp    2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_game.cpp    2020-11-14 13:19:25.000000000 +0100
@@ -3105,11 +3105,11 @@
        sd_wait_sound_done();
        StopMusic();
 
-       gamestate.lives--;
+       gamestate.lives -= 1;
 
-       if (gamestate.lives > -1)
+       if (gamestate.lives >= 0)
        {
-               old_gamestate.lives -= 1;
+               old_gamestate.lives = gamestate.lives;
                gamestate = old_gamestate;
 
                gamestuff = old_gamestuff;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_inter.cpp 
new/bstone-1.2.9/src/3d_inter.cpp
--- old/bstone-1.2.8/src/3d_inter.cpp   2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_inter.cpp   2020-11-14 13:19:25.000000000 +0100
@@ -183,6 +183,16 @@
 
                vid_set_ui_mask_3d(false);
        }
+       else
+       {
+               VWB_Bar(
+                       0,
+                       ref_3d_view_top_y - ref_3d_margin,
+                       vga_ref_width,
+                       ref_3d_view_height + 2 * ref_3d_margin,
+                       0
+               );
+       }
 
        VW_FadeIn();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_main.cpp 
new/bstone-1.2.9/src/3d_main.cpp
--- old/bstone-1.2.8/src/3d_main.cpp    2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_main.cpp    2020-11-14 13:19:25.000000000 +0100
@@ -7514,6 +7514,8 @@
 
        mouseadjustment = default_mouse_sensitivity;
 
+       sd_is_sound_enabled_ = true;
+       sd_is_music_enabled_ = true;
        sd_sfx_volume_ = sd_default_sfx_volume;
        sd_music_volume_ = sd_default_music_volume;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_menu.cpp 
new/bstone-1.2.9/src/3d_menu.cpp
--- old/bstone-1.2.8/src/3d_menu.cpp    2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_menu.cpp    2020-11-14 13:19:25.000000000 +0100
@@ -22,6 +22,7 @@
 */
 
 
+#include <cmath>
 #include <cstring>
 
 #include <algorithm>
@@ -137,6 +138,7 @@
        mvl_texturing,
        mvl_widescreen,
        mvl_stretch_ui,
+       mvl_filler_color,
 };
 // BBi
 
@@ -424,7 +426,7 @@
 CP_iteminfo SwitchItems = {MENU_X, 0, 0, 0, 0, 9, {87, -1, 132, 7, 1}};
 
 // BBi
-CP_iteminfo video_items = {MENU_X, MENU_Y + 30, 4, 0, 0, 9, {77, -1, 154, 7, 
1}};
+CP_iteminfo video_items = {MENU_X, MENU_Y + 30, 5, 0, 0, 9, {77, -1, 154, 7, 
1}};
 CP_iteminfo video_mode_items = {MENU_X, MENU_Y + 10, 8, 0, 0, 9, {77, -1, 154, 
7, 1}};
 CP_iteminfo texturing_items = {MENU_X, MENU_Y + 10, 9, 0, 0, 9, {77, -1, 154, 
7, 1}};
 CP_iteminfo switches2_items = {MENU_X, MENU_Y + 30, 2, 0, 0, 9, {87, -1, 132, 
7, 1}};
@@ -606,12 +608,16 @@
 void texturing_routine(
        const std::int16_t index);
 
+void filler_color_routine(
+       const std::int16_t index);
+
 CP_itemtype video_menu[] =
 {
        {AT_ENABLED, "MODE", video_menu_mode_routine},
        {AT_ENABLED, "TEXTURING", texturing_routine},
        {AT_ENABLED, "WIDESCREEN", nullptr},
        {AT_ENABLED, "STRETCH UI", nullptr},
+       {AT_ENABLED, "FILLER COLOR", filler_color_routine},
 };
 // BBi
 
@@ -2262,9 +2268,8 @@
 void DrawMenuTitle(
        const char* title)
 {
-
        fontnumber = 3;
-       CA_CacheGrChunk(STARTFONT + 3);
+       CA_CacheGrChunk(STARTFONT + fontnumber);
 
        PrintX = WindowX = 32;
        PrintY = WindowY = 32;
@@ -2280,8 +2285,7 @@
        SETFONTCOLOR(ENABLED_TEXT_COLOR, TERM_BACK_COLOR);
        US_PrintCentered(title);
 
-       FREEFONT(STARTFONT + 3);
-
+       FREEFONT(STARTFONT + fontnumber);
 }
 
 const std::int16_t INSTRUCTIONS_Y_POS = 154 + 10;
@@ -4623,6 +4627,7 @@
                "CHANGES TEXTURING OPTIONS",
                "TOGGLES BETWEEN WIDESCREEN AND 4X3 MODES",
                "TOGGLES STRETCHING OF USER INTERFACE",
+               "SELECTS FILLER'S COLOR",
        };
 
        fontnumber = 2;
@@ -4684,6 +4689,7 @@
                        {
                                case mvl_mode:
                                case mvl_texturing:
+                               case mvl_filler_color:
                                        continue;
 
                        case mvl_widescreen:
@@ -5812,6 +5818,13 @@
                        VL_RefreshScreen();
                        break;
 
+               case mvl_filler_color:
+                       sd_play_player_sound(ESCPRESSEDSND, 
bstone::ActorChannel::unpausable);
+                       video_draw_menu();
+                       MenuFadeIn();
+                       WaitKeyUp();
+                       break;
+
                default:
                        break;
                }
@@ -6185,6 +6198,223 @@
 }
 ///
 
+
+///
+
+constexpr auto filler_cell_width = 9;
+constexpr auto filler_cell_height = 8;
+constexpr auto filler_cells_x = (vga_ref_width - (16 * filler_cell_width)) / 2;
+constexpr auto filler_cells_y = 36;
+
+
+void draw_filler_color_menu()
+{
+       CA_CacheScreen(BACKGROUND_SCREENPIC);
+
+       auto color_index = 0;
+
+       auto y = filler_cells_y;
+
+       for (auto h = 0; h < 16; ++h)
+       {
+               auto x = filler_cells_x;
+
+               for (auto w = 0; w < 16; ++w)
+               {
+                       VL_Bar(x, y, filler_cell_width, filler_cell_height, 
color_index++);
+
+                       x += filler_cell_width;
+               }
+
+               y += filler_cell_height;
+       }
+}
+
+constexpr int weight_color(
+       int r,
+       int g,
+       int b) noexcept
+{
+       return (r << 16) | (g << 8) | b;
+}
+
+int find_highlight_filler_color_index(
+       int color_index)
+{
+       const auto src_palette_index = color_index * 3;
+
+       const auto src_r = vgapal[src_palette_index + 0];
+       const auto src_g = vgapal[src_palette_index + 1];
+       const auto src_b = vgapal[src_palette_index + 2];
+
+       const auto src_weight = weight_color(src_r, src_g, src_b);
+
+       auto max_match_abs_weight_diff = 0;
+       auto match_color_index = -1;
+
+       for (auto i = 0; i < 256; ++i)
+       {
+               if (i == color_index)
+               {
+                       continue;
+               }
+
+               const auto match_palette_index = i * 3;
+
+               const auto match_r = vgapal[match_palette_index + 0];
+               const auto match_g = vgapal[match_palette_index + 1];
+               const auto match_b = vgapal[match_palette_index + 2];
+
+               const auto match_weight = weight_color(match_r, match_g, 
match_b);
+               const auto match_abs_weight_diff = std::abs(match_weight - 
src_weight);
+
+               if (match_abs_weight_diff > max_match_abs_weight_diff)
+               {
+                       max_match_abs_weight_diff = match_abs_weight_diff;
+                       match_color_index = i;
+               }
+       }
+
+       if (match_color_index < 0)
+       {
+               match_color_index = color_index + 128;
+
+               if (match_color_index > 255)
+               {
+                       match_color_index -= 255;
+               }
+       }
+
+       return match_color_index;
+}
+
+void draw_filler_color_cell(
+       int color_index,
+       bool is_highlighted)
+{
+       const auto cell_x = color_index % 16;
+       const auto cell_y = color_index / 16;
+
+       const auto x = filler_cells_x + (cell_x * filler_cell_width);
+       const auto y = filler_cells_y + (cell_y * filler_cell_height);
+
+       VL_Bar(x, y, filler_cell_width, filler_cell_height, color_index);
+
+       if (is_highlighted)
+       {
+               const auto highlighted_color_index = 
find_highlight_filler_color_index(color_index);
+
+               vwb_rect(x, y, filler_cell_width, filler_cell_height, 
highlighted_color_index);
+       }
+}
+
+void filler_color_routine(
+       const std::int16_t index)
+{
+       VL_SetPalette(0, 256, vgapal);
+       draw_filler_color_menu();
+       MenuFadeIn();
+       WaitKeyUp();
+
+       auto& configuration = vid_cfg_get();
+
+       ControlInfo ci;
+
+       auto is_highlighted = false;
+       auto highlight_counter = 0;
+
+       auto is_cell_changed = true;
+       auto cell_x = configuration.filler_color_index % 16;
+       auto cell_y = configuration.filler_color_index / 16;
+
+       while (true)
+       {
+               CalcTics();
+               ReadAnyControl(&ci);
+
+               switch (ci.dir)
+               {
+                       case dir_North:
+                               is_cell_changed = true;
+                               cell_y -= 1;
+                               break;
+
+                       case dir_South:
+                               is_cell_changed = true;
+                               cell_y += 1;
+                               break;
+
+                       case dir_West:
+                               is_cell_changed = true;
+                               cell_x -= 1;
+                               break;
+
+                       case dir_East:
+                               is_cell_changed = true;
+                               cell_x += 1;
+                               break;
+
+                       default:
+                               break;
+               }
+
+               if (is_cell_changed)
+               {
+                       is_cell_changed = false;
+
+                       is_highlighted = true;
+
+                       
draw_filler_color_cell(configuration.filler_color_index, false);
+
+                       if (cell_x < 0)
+                       {
+                               cell_x = 15;
+                       }
+                       else if (cell_x > 15)
+                       {
+                               cell_x = 0;
+                       }
+
+                       if (cell_y < 0)
+                       {
+                               cell_y = 15;
+                       }
+                       else if (cell_y > 15)
+                       {
+                               cell_y = 0;
+                       }
+
+                       configuration.filler_color_index = (cell_y * 16) + 
cell_x;
+
+                       IN_ClearKeysDown();
+
+                       vid_apply_filler_color();
+               }
+
+               if (ci.button1 || Keyboard[ScanCode::sc_escape])
+               {
+                       break;
+               }
+
+               draw_filler_color_cell(configuration.filler_color_index, 
is_highlighted);
+
+               VW_UpdateScreen();
+
+               highlight_counter += 1;
+
+               if (highlight_counter > 10)
+               {
+                       highlight_counter = 0;
+                       is_highlighted = !is_highlighted;
+               }
+       }
+
+       MenuFadeOut();
+}
+
+///
+
+
 void MenuFadeOut()
 {
        const auto& assets_info = AssetsInfo{};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/3d_play.cpp 
new/bstone-1.2.9/src/3d_play.cpp
--- old/bstone-1.2.8/src/3d_play.cpp    2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/3d_play.cpp    2020-11-14 13:19:25.000000000 +0100
@@ -58,6 +58,8 @@
 void ConnectAreas();
 void UpdateSoundLoc();
 
+void select_floor();
+
 
 /*
 =============================================================================
@@ -2005,6 +2007,7 @@
 
 
 extern bool ShowQuickMsg;
+extern bool is_select_floor;
 
 
 void PlayLoop()
@@ -2090,6 +2093,11 @@
 
                UpdateSoundLoc();               // JAB
 
+               if (is_select_floor)
+               {
+                       select_floor();
+               }
+
                if (screenfaded & !playstate)
                {
                        VW_FadeIn();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/CMakeLists.txt 
new/bstone-1.2.9/src/CMakeLists.txt
--- old/bstone-1.2.8/src/CMakeLists.txt 2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/CMakeLists.txt 2020-11-14 13:19:25.000000000 +0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR)
-project(bstone VERSION 1.2.8 LANGUAGES CXX)
+project(bstone VERSION 1.2.9 LANGUAGES CXX)
 
 
 #
@@ -62,6 +62,11 @@
        "${PROJECT_BINARY_DIR}/bstone_version_.h"
 )
 
+configure_file(
+       "${PROJECT_SOURCE_DIR}/sys/win32/bstone_win32.rc.in"
+       "${PROJECT_BINARY_DIR}/sys/win32/bstone_win32.rc"
+)
+
 
 #
 # Target properties.
@@ -344,6 +349,7 @@
        target_sources(
                ${PROJECT_NAME}
                PRIVATE
+                       sys/win32/bstone_win32_rc.h
                        sys/win32/bstone_win32_registry.h
        )
 endif ()
@@ -467,7 +473,7 @@
        target_sources(
                ${PROJECT_NAME}
                PRIVATE
-                       sys/win32/bstone_win32.rc
+                       "${PROJECT_BINARY_DIR}/sys/win32/bstone_win32.rc"
                        sys/win32/bstone_win32_registry.cpp
        )
 endif ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/bstone_math.h 
new/bstone-1.2.9/src/bstone_math.h
--- old/bstone-1.2.8/src/bstone_math.h  2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/bstone_math.h  2020-11-14 13:19:25.000000000 +0100
@@ -62,13 +62,13 @@
 constexpr double fixed_to_floating(
        const int value)
 {
-       return (value >> 16) + ((value & 0xFFFF) / 65'536.0);
+       return static_cast<double>(value) / static_cast<double>(1 << 16);
 }
 
 constexpr int floating_to_fixed(
        const double value)
 {
-       return static_cast<int>(value * 65'536.0);
+       return static_cast<int>(value * (1 << 16));
 }
 
 
@@ -94,6 +94,15 @@
        }
 }
 
+template<typename T>
+constexpr T clamp(
+       const T& value,
+       const T& min_value,
+       const T& max_value)
+{
+       return value < min_value ? min_value : (value > max_value ? max_value : 
value);
+}
+
 
 } // math
 } // bstone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/id_vl.cpp 
new/bstone-1.2.9/src/id_vl.cpp
--- old/bstone-1.2.8/src/id_vl.cpp      2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/id_vl.cpp      2020-11-14 13:19:25.000000000 +0100
@@ -38,6 +38,7 @@
 
 #include "bstone_hw_texture_mgr.h"
 #include "bstone_logger.h"
+#include "bstone_math.h"
 #include "bstone_mod_value.h"
 #include "bstone_mt_task_mgr.h"
 #include "bstone_ren_3d_cmd_buffer.h"
@@ -222,9 +223,6 @@
 SDL_Rect sw_screen_dst_rect_;
 auto sw_filler_color_ = SDL_Color{};
 
-const auto sw_ref_filler_color = SDL_Color{0x00, 0x28, 0x50, 0xFF};
-const auto filler_color_index = 0xE8;
-
 
 struct CalculateScreenSizeInputParam
 {
@@ -441,6 +439,13 @@
        return result;
 }
 
+const std::string& vid_get_filler_color_index_name()
+{
+       static const auto result = std::string{"vid_filler_color_index"};
+
+       return result;
+}
+
 int vid_align_dimension(
        const int dimension)
 {
@@ -890,6 +895,12 @@
        vid_cl_read_int(vid_get_texture_upscale_xbrz_degree_key_name(), 
vid_cfg_.texture_upscale_xbrz_degree_);
 }
 
+void vid_cl_read_filler_color_index()
+{
+       vid_cl_read_int(vid_get_filler_color_index_name(), 
vid_cfg_.filler_color_index);
+       vid_cfg_.filler_color_index = 
vid_clamp_filler_color_index(vid_cfg_.filler_color_index);
+}
+
 const std::string& vid_get_vid_string()
 {
        static const auto result = std::string{"[VID]"};
@@ -1068,6 +1079,7 @@
        vid_cl_read_aa_degree();
        vid_cl_read_texture_upscale_filter();
        vid_cl_read_texture_upscale_xbrz_degree();
+       vid_cl_read_filler_color_index();
 }
 
 void vid_cfg_read()
@@ -1562,6 +1574,14 @@
                bstone::RgbPalette::get_max_color_count());
 }
 
+void sw_apply_filler_color_index()
+{
+       sw_filler_color_.r = static_cast<Uint8>((255 * 
vgapal[(vid_cfg_.filler_color_index * 3) + 0]) / 63);
+       sw_filler_color_.g = static_cast<Uint8>((255 * 
vgapal[(vid_cfg_.filler_color_index * 3) + 1]) / 63);
+       sw_filler_color_.b = static_cast<Uint8>((255 * 
vgapal[(vid_cfg_.filler_color_index * 3) + 2]) / 63);
+       sw_filler_color_.a = 0xFF;
+}
+
 void sw_calculate_dimensions()
 {
        auto src_param = vid_create_screen_size_param();
@@ -1712,14 +1732,7 @@
                vid_dimensions_.screen_bottom_filler_height_,
        };
 
-       // Filler color.
-       sw_filler_color_ = SDL_Color
-       {
-               static_cast<Uint8>((255 * vgapal[(filler_color_index * 3) + 0]) 
/ 63),
-               static_cast<Uint8>((255 * vgapal[(filler_color_index * 3) + 1]) 
/ 63),
-               static_cast<Uint8>((255 * vgapal[(filler_color_index * 3) + 2]) 
/ 63),
-               0xFF,
-       };
+       sw_apply_filler_color_index();
 
        // Screen destination rect.
 
@@ -3806,9 +3819,9 @@
        );
 
        const auto& filler_color = hw_vga_color_to_rgba_8(
-               vgapal[(filler_color_index * 3) + 0],
-               vgapal[(filler_color_index * 3) + 1],
-               vgapal[(filler_color_index * 3) + 2]
+               vgapal[(vid_cfg_.filler_color_index * 3) + 0],
+               vgapal[(vid_cfg_.filler_color_index * 3) + 1],
+               vgapal[(vid_cfg_.filler_color_index * 3) + 2]
        );
 
        const auto left_left_f = static_cast<float>(0.0F);
@@ -4258,10 +4271,11 @@
        hw_create_ui_ib();
        hw_create_ui_vb();
        hw_create_ui_vi();
+
        hw_create_2d_fillers_ib();
        hw_create_2d_fillers_vb();
-
        hw_create_2d_fillers_vi();
+
        hw_create_ui_texture();
        hw_create_black_1x1_2d_texture();
        hw_create_white_1x1_2d_texture();
@@ -11648,6 +11662,17 @@
        hw_update_player_weapon_sampler();
 }
 
+void hw_apply_filler_color_index()
+{
+       hw_destroy_2d_fillers_vi();
+       hw_destroy_2d_fillers_ib();
+       hw_destroy_2d_fillers_vb();
+
+       hw_create_2d_fillers_ib();
+       hw_create_2d_fillers_vb();
+       hw_create_2d_fillers_vi();
+}
+
 void hw_uninitialize_video()
 {
        hw_uninitialize_command_buffers();
@@ -12804,6 +12829,17 @@
        }
 }
 
+void vid_cfg_read_filler_color_index(
+       const std::string& value_string)
+{
+       int value = 0;
+
+       if (bstone::StringHelper::string_to_int(value_string, value))
+       {
+               vid_cfg_.filler_color_index = 
vid_clamp_filler_color_index(value);
+       }
+}
+
 bool vid_cfg_parse_key_value(
        const std::string& key_string,
        const std::string& value_string)
@@ -12871,6 +12907,10 @@
        {
                vid_cfg_read_hw_texture_upscale_xbrz_factor(value_string);
        }
+       else if (key_string == vid_get_filler_color_index_name())
+       {
+               vid_cfg_read_filler_color_index(value_string);
+       }
        else
        {
                return false;
@@ -13082,6 +13122,12 @@
                vid_get_3d_texture_anisotropy_key_name(),
                std::to_string(vid_cfg_.d3_texture_anisotropy_)
        );
+
+       cfg_file_write_entry(
+               text_writer,
+               vid_get_filler_color_index_name(),
+               std::to_string(vid_cfg_.filler_color_index)
+       );
 }
 
 void vid_cfg_set_defaults()
@@ -13113,6 +13159,8 @@
 
        vid_cfg_.texture_upscale_kind_ = 
bstone::HwTextureMgrUpscaleFilterKind::none;
        vid_cfg_.texture_upscale_xbrz_degree_ = 0;
+
+       vid_cfg_.filler_color_index = 0;
 }
 
 VidCfg& vid_cfg_get()
@@ -13920,6 +13968,24 @@
        }
 }
 
+int vid_clamp_filler_color_index(
+       int filler_color_index) noexcept
+{
+       return bstone::math::clamp(filler_color_index, 0, 255);
+}
+
+void vid_apply_filler_color()
+{
+       if (vid_is_hw_)
+       {
+               hw_apply_filler_color_index();
+       }
+       else
+       {
+               sw_apply_filler_color_index();
+       }
+}
+
 bool operator==(
        const VideoModeCfg& lhs,
        const VideoModeCfg& rhs) noexcept
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/id_vl.h new/bstone-1.2.9/src/id_vl.h
--- old/bstone-1.2.8/src/id_vl.h        2020-07-10 15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/id_vl.h        2020-11-14 13:19:25.000000000 +0100
@@ -84,6 +84,8 @@
 
        bstone::HwTextureMgrUpscaleFilterKind texture_upscale_kind_;
        int texture_upscale_xbrz_degree_;
+
+       int filler_color_index;
 }; // VidCfg
 
 struct VideoModeCfg
@@ -439,5 +441,10 @@
 
 void vid_apply_upscale();
 
+int vid_clamp_filler_color_index(
+       int filler_color_index) noexcept;
+
+void vid_apply_filler_color();
+
 
 #endif // BSTONE_ID_VL_INCLUDED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/sys/win32/bstone_win32.rc 
new/bstone-1.2.9/src/sys/win32/bstone_win32.rc
--- old/bstone-1.2.8/src/sys/win32/bstone_win32.rc      2020-07-10 
15:58:35.000000000 +0200
+++ new/bstone-1.2.9/src/sys/win32/bstone_win32.rc      1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-101 ICON "bstone_icon.ico"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/sys/win32/bstone_win32.rc.in 
new/bstone-1.2.9/src/sys/win32/bstone_win32.rc.in
--- old/bstone-1.2.8/src/sys/win32/bstone_win32.rc.in   1970-01-01 
01:00:00.000000000 +0100
+++ new/bstone-1.2.9/src/sys/win32/bstone_win32.rc.in   2020-11-14 
13:19:25.000000000 +0100
@@ -0,0 +1,36 @@
+#include "bstone_win32_rc.h"
+
+
+101 ICON "bstone_icon.ico"
+
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION ${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 
${PROJECT_VERSION_PATCH}
+PRODUCTVERSION ${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 
${PROJECT_VERSION_PATCH}
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS VER_DBG
+FILEOS VOS_NT
+FILETYPE VFT_DRV
+FILESUBTYPE VFT2_DRV_SYSTEM
+BEGIN
+       BLOCK "StringFileInfo"
+       BEGIN
+               BLOCK "040904B0"
+               BEGIN
+                       VALUE "Comments", L"Unofficial source port for Blake 
Stone classic series"
+                       VALUE "CompanyName", L"Boris I. Bendovsky"
+                       VALUE "FileDescription", L"Unofficial source port for 
Blake Stone classic series"
+                       VALUE "FileVersion", L"${BSTONE_VERSION}"
+                       VALUE "InternalName", L"${PROJECT_NAME}"
+                       VALUE "LegalCopyright", L"Copyright (c) Boris I. 
Bendovsky 2013-2020"
+                       VALUE "OriginalFilename", L"bstone.exe"
+                       VALUE "ProductName", L"BStone"
+                       VALUE "ProductVersion", L"${BSTONE_VERSION}"
+               END
+       END
+
+       BLOCK "VarFileInfo"
+       BEGIN
+               VALUE "Translation", 0x0409, 1200
+       END
+END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bstone-1.2.8/src/sys/win32/bstone_win32_rc.h 
new/bstone-1.2.9/src/sys/win32/bstone_win32_rc.h
--- old/bstone-1.2.8/src/sys/win32/bstone_win32_rc.h    1970-01-01 
01:00:00.000000000 +0100
+++ new/bstone-1.2.9/src/sys/win32/bstone_win32_rc.h    2020-11-14 
13:19:25.000000000 +0100
@@ -0,0 +1,23 @@
+#define VS_VERSION_INFO 1
+
+#ifndef VS_FFI_FILEFLAGSMASK
+#define VS_FFI_FILEFLAGSMASK 0x0000003FL
+#endif // !VS_FFI_FILEFLAGSMASK
+
+#ifdef _DEBUG
+#define VER_DBG 1
+#else // _DEBUG
+#define VER_DBG 0
+#endif // _DEBUG
+
+#ifndef VOS_NT
+#define VOS_NT 0x00040000L
+#endif // !VOS_NT
+
+#ifndef VFT_DRV
+#define VFT_DRV 0x00000003L
+#endif // !VFT_DRV
+
+#ifndef VFT2_DRV_SYSTEM
+#define VFT2_DRV_SYSTEM 0x00000007L
+#endif // !VFT2_DRV_SYSTEM
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to