Hello community, here is the log from the commit of package bstone for openSUSE:Factory checked in at 2020-01-27 00:22:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bstone (Old) and /work/SRC/openSUSE:Factory/.bstone.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bstone" Mon Jan 27 00:22:44 2020 rev:5 rq:767256 version:1.1.15 Changes: -------- --- /work/SRC/openSUSE:Factory/bstone/bstone.changes 2019-12-04 14:19:23.530388168 +0100 +++ /work/SRC/openSUSE:Factory/.bstone.new.26092/bstone.changes 2020-01-27 00:23:07.753516545 +0100 @@ -1,0 +2,7 @@ +Sat Jan 25 17:37:49 UTC 2020 - Martin Hauke <[email protected]> + +- Update to version 1.1.15 + * Changed: Number secret floor + * Fixed: Destination position for inter-floor teleporter + +------------------------------------------------------------------- Old: ---- bstone-1.1.14.tar.gz New: ---- bstone-1.1.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bstone.spec ++++++ --- /var/tmp/diff_new_pack.K4D8cN/_old 2020-01-27 00:23:10.213517704 +0100 +++ /var/tmp/diff_new_pack.K4D8cN/_new 2020-01-27 00:23:10.213517704 +0100 @@ -1,7 +1,7 @@ # # spec file for package bstone # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: bstone -Version: 1.1.14 +Version: 1.1.15 Release: 0 Summary: A source port of Blake Stone License: GPL-2.0-or-later ++++++ bstone-1.1.14.tar.gz -> bstone-1.1.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/CHANGELOG.md new/bstone-1.1.15/CHANGELOG.md --- old/bstone-1.1.14/CHANGELOG.md 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/CHANGELOG.md 2020-01-25 12:07:38.000000000 +0100 @@ -1,5 +1,14 @@ # BStone changelog + +## [1.1.15] - 2020-01-25 +### Changed +- Number secret floor (by bibendovsky). + +### Fixed +- Destination position for inter-floor teleporter (by bibendovsky). + + ## [1.1.14] - 2019-11-09 ### Added - [Vita] Version 0.3 (by 01y). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/3d_debug.cpp new/bstone-1.1.15/src/3d_debug.cpp --- old/bstone-1.1.14/src/3d_debug.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/3d_debug.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -480,8 +480,6 @@ // ::Quit(); - - return true; } else if (::Keyboard[ScanCode::sc_o]) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/3d_game.cpp new/bstone-1.1.15/src/3d_game.cpp --- old/bstone-1.1.14/src/3d_game.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/3d_game.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -2997,12 +2997,16 @@ } else { - ::px = 13; + ::px = 16; } if (assets_info.is_secret_level(::gamestate.mapon)) { - ::ShPrint(" SECRET ", 0, false); + const auto secret_floor_index = assets_info.secret_floor_get_index(gamestate.mapon); + const auto index_string = std::to_string(secret_floor_index + 1); + const auto message = "SECRET " + index_string; + + ShPrint(message.c_str(), 0, false); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/3d_main.cpp new/bstone-1.1.15/src/3d_main.cpp --- old/bstone-1.1.14/src/3d_main.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/3d_main.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -8283,6 +8283,48 @@ std::int8_t LS_current = -1; std::int8_t LS_total = -1; +void player_fix_transported_position() +{ + if (playstate != ex_transported) + { + return; + } + + if (gamestuff.level[gamestate.mapon].ptilex == 0 || + gamestuff.level[gamestate.mapon].ptiley == 0) + { + return; + } + + const auto tile_x = gamestuff.level[gamestate.mapon].ptilex; + const auto tile_y = gamestuff.level[gamestate.mapon].ptiley; + auto dir = 1 + (gamestuff.level[gamestate.mapon].pangle / 90); + + const auto& assets_info = AssetsInfo{}; + + if (assets_info.is_aog()) + { + dir -= 1; + } + + player->tilex = static_cast<std::uint8_t>(tile_x); + player->tiley = static_cast<std::uint8_t>(tile_y); + + player->areanumber = GetAreaNumber(player->tilex, player->tiley); + + player->x = (static_cast<std::int32_t>(tile_x) << TILESHIFT) + (TILEGLOBAL / 2); + player->y = (static_cast<std::int32_t>(tile_y) << TILESHIFT) + (TILEGLOBAL / 2); + + player->angle = (1 - dir) * 90; + + if (player->angle < 0) + { + player->angle += ANGLES; + } + + areabyplayer[player->areanumber] = true; +} + bool LoadLevel( int level_index) { @@ -8390,6 +8432,8 @@ // First actor is always player new_actor->unarchive(archiver); + player_fix_transported_position(); + for (std::int32_t i = 1; i < actor_count; ++i) { ::GetNewActor(); @@ -9546,11 +9590,13 @@ ::ShutdownId(); } +[[noreturn]] void Quit() { ::Quit({}); } +[[noreturn]] void Quit( const std::string& message) { @@ -10470,7 +10516,7 @@ #ifdef __vita__ static const std::string version = "0.3"; #else - static const std::string version = "1.1.14"; + static const std::string version = "1.1.15"; #endif return version; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/3d_state.cpp new/bstone-1.1.15/src/3d_state.cpp --- old/bstone-1.1.14/src/3d_state.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/3d_state.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -868,7 +868,6 @@ default: ::Quit("Illegal direction passed."); - return; } ob->x += sign_x * move; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/CMakeLists.txt new/bstone-1.1.15/src/CMakeLists.txt --- old/bstone-1.1.14/src/CMakeLists.txt 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/CMakeLists.txt 2020-01-25 12:07:38.000000000 +0100 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR) -project(bstone VERSION 1.1.14 LANGUAGES CXX) +project(bstone VERSION 1.1.15 LANGUAGES CXX) option(BSTONE_USE_STATIC_LINKING "Link build statically." OFF) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/bstone_string_helper.cpp new/bstone-1.1.15/src/bstone_string_helper.cpp --- old/bstone-1.1.14/src/bstone_string_helper.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/bstone_string_helper.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -25,6 +25,7 @@ #include "bstone_string_helper.h" +[[noreturn]] void Quit( const std::string& message); @@ -129,8 +130,6 @@ if (octet < 0 || octet > 0xFF) { ::Quit("Octet value out of range: " + std::to_string(octet) + "."); - - return {}; } const auto high_nibble = (octet >> 4) & 0xF; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/id_ca.cpp new/bstone-1.1.15/src/id_ca.cpp --- old/bstone-1.1.14/src/id_ca.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/id_ca.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -1562,8 +1562,38 @@ else { ::Quit("No assets information."); + } +} + +int AssetsInfo::secret_floor_get_index( + const int level_number) const +{ + if (is_aog()) + { + if (level_number <= 0) + { + return 0; + } + + if (level_number >= 10) + { + return level_number - 10 + 1; + } - return false; + return -1; + } + else if (is_ps()) + { + if (level_number >= 20) + { + return level_number - 20; + } + + return -1; + } + else + { + Quit("No assets information."); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/id_ca.h new/bstone-1.1.15/src/id_ca.h --- old/bstone-1.1.14/src/id_ca.h 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/id_ca.h 2020-01-25 12:07:38.000000000 +0100 @@ -171,6 +171,9 @@ bool is_secret_level( const int level_number) const; + int secret_floor_get_index( + const int level_number) const; + private: static std::string empty_extension_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/id_heads.h new/bstone-1.1.15/src/id_heads.h --- old/bstone-1.1.14/src/id_heads.h 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/id_heads.h 2020-01-25 12:07:38.000000000 +0100 @@ -85,8 +85,10 @@ extern std::uint8_t update[UPDATESIZE]; +[[noreturn]] void Quit(); +[[noreturn]] void Quit( const std::string& message); // BBi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/id_in.cpp new/bstone-1.1.15/src/id_in.cpp --- old/bstone-1.1.14/src/id_in.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/id_in.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -1417,7 +1417,6 @@ case SDL_QUIT: ::Quit(); - break; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/jm_free.cpp new/bstone-1.1.15/src/jm_free.cpp --- old/bstone-1.1.14/src/jm_free.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/jm_free.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -1117,7 +1117,6 @@ { bstone::Log::write_version(); ::Quit(); - return; } // Setup for APOGEECD thingie. @@ -1134,7 +1133,6 @@ { ::ca_dump_hashes(); ::Quit(); - return; } // Make sure there's room to play the game diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/jm_io.cpp new/bstone-1.1.15/src/jm_io.cpp --- old/bstone-1.1.14/src/jm_io.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/jm_io.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -74,11 +74,9 @@ case ct_LZW: ::Quit("No code for LZW compression."); - break; default: ::Quit("Unknown compression type."); - break; } } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bstone-1.1.14/src/movie.cpp new/bstone-1.1.15/src/movie.cpp --- old/bstone-1.1.14/src/movie.cpp 2019-11-09 11:08:15.000000000 +0100 +++ new/bstone-1.1.15/src/movie.cpp 2020-01-25 12:07:38.000000000 +0100 @@ -504,7 +504,6 @@ default: ::Quit("Unrecognized anim code."); - break; } }
