Skip to content

Commit

Permalink
Version 0.9.14 (#5226)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihhub authored Apr 9, 2022
1 parent ebed9f6 commit 6a5f295
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 62 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
cmake_minimum_required(VERSION 3.20)
cmake_policy(SET CMP0074 NEW)

project(fheroes2 VERSION 0.9.13 LANGUAGES C CXX)
project(fheroes2 VERSION 0.9.14 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 11)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# FHEROES2_DATA: set the built-in path to the fheroes2 data directory (e.g. /usr/share/fheroes2)

TARGET := fheroes2
PROJECT_VERSION := 0.9.13
PROJECT_VERSION := 0.9.14

.PHONY: all bundle clean

Expand Down
2 changes: 1 addition & 1 deletion Makefile.switch
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MAKE := make

PROJECT_TITLE := fheroes2
PROJECT_AUTHOR := fheroes2 resurrection team
PROJECT_VERSION := 0.9.13
PROJECT_VERSION := 0.9.14

PATH := $(PATH):/opt/devkitpro/portlibs/switch/bin/:/opt/devkitpro/tools/bin/

Expand Down
62 changes: 61 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
version 0.9.13 (07 February 2022)
version 0.9.14 (09 April 2022)
- generate Italian "Battle Only" button
- fix line breaking in welcome message for various languages
- update and improve Italian translation
- generate Polish "Battle Only" button
- fix switching fullscreen mode in Mac OS for certain resolutions
- generate French "Battle Only" button
- fix a crash due to an assertion failure when the shooter hits back at a unit under Berserk spell
- fix scrolling in full-screen mode in case of an aspect ratio mismatch
- fix rare cases for incorrect letters being generated while switching languages
- add Norwegian language option and font generation
- update French translation
- add initial implementation of Dimension Door spell usage for AI
- fix Gold Watch artifact invalid bonus
- rework artifact logic with proper separation and calculations of artifact's bonuses and curses
- play only one sound while getting ar artifact within an event
- speed up castle and hero icons on adventure map
- add "Battle Only" button generation for German version of the game
- fix Mage Guild bottom status bar rendering
- fix incorrect artifact discovery description
- add in-game Italian language option and diacritics
- fix army order option related crash
- fix High Score Music after winning scenario
- adjust AI spell estimates
- fix rendering of bottom bar in Well dialog
- update Polish translation
- remove unnecessary call to play VICTORY music during Campaign intro
- fix the calculation of the cost of surrender
- fix Town Gate spell logic
- prioritize AI castles further from enemy territory
- take the weekly growth into account when calculating monthly population growth bonuses and fines
- update minimap colors
- optimize AI fighter hero priorities
- add native macOS application generation
- build player influence map to inform AI kingdom development decisions
- speed up data reading from AGG files
- update Norwegian translation
- add a popup window for battle log
- add a mandatory requirement of h2d file being present
- fix incorrect logic for palette application function
- fix position of armies for quick info window for both castle and enemy hero
- set the direction for attacking and defending units in battle in a more OG-like way
- fix incorrect popup monster window in Well
- greatly speedup heavy video loading
- do not render extra frame while playing an audio only video file
- properly center the first sentence in the battle surrender dialog
- dynamically update Game Language dialog
- fix translation and UI in Tavern dialog
- add MP3 file support
- increase the number of sound channels to 32
- allow a hero to surrender to the captain during the siege
- fix rare case of Shipwreck having no battle
- display experience amount for Tree of Knowledge
- fix Witch's Hut message body
- for Anduran assembly window show artifact name as a title
- for hero level up window with one secondary skill make the skill right clickable
- for hero level up window with no secondary skill display the primary skill icon
- add search for FLAC files if OGG files aren't found
- add popup dialogs for Arena's skill choices

version 0.9.13 (07 March 2022)
- show captain quick info dialog in Kingdom Overview
- add popup windows for campaign awards and bonuses
- remove Map loading screen
Expand Down
4 changes: 2 additions & 2 deletions script/packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fheroes2 (0.9.13-1) UNRELEASED; urgency=medium
fheroes2 (0.9.14-1) UNRELEASED; urgency=medium

* Initial release

-- fheroes2 team <fhomm2@gmail.com> Mon, 07 Mar 2022 00:00:00 +0000
-- fheroes2 team <fhomm2@gmail.com> Sat, 09 Apr 2022 00:00:00 +0000
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sonar.organization=ihhub

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=fheroes2
sonar.projectVersion=0.9.13
sonar.projectVersion=0.9.14

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=.
Expand Down
94 changes: 54 additions & 40 deletions src/fheroes2/game/game_credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,19 @@ namespace
"vincent-grosbois\n"
"eos428\n"
"a1exsh\n"
"Zense\n"
"Vasilenko Alexey\n"
"Andrii Kurdiumov\n"
"dimag0g\n"
"felix642\n" );
"felix642\n"
"Arthusppp\n" );

name.Set( contributors + _( "and many other contributors!" ), Font::BIG, textWidth );
name.Blit( 2 * columnStep + ( columnStep - name.w() ) / 2, offsetY, output );
offsetY += name.h() + 10;

const fheroes2::Sprite & hydra = fheroes2::AGG::GetICN( ICN::HYDRA, 11 );
fheroes2::Blit( hydra, output, 2 * columnStep + ( columnStep - hydra.width() ) / 2, offsetY );
offsetY += hydra.height();

title.Set( _( "Original project before 0.7" ), Font::YELLOW_SMALL, textWidth );
title.Blit( 2 * columnStep + ( columnStep - title.w() ) / 2, offsetY, output );
offsetY += title.h();

name.Set( "Andrey Afletdinov\nhttps://sourceforge.net/\nprojects/fheroes2/", Font::SMALL, textWidth );
name.Blit( 2 * columnStep + ( columnStep - name.w() ) / 2, offsetY, output );

const fheroes2::Sprite & goblin = fheroes2::AGG::GetICN( ICN::GOBLIN, 27 );
fheroes2::Blit( goblin, output, ( output.width() - goblin.width() ) / 2, ( output.height() - goblin.height() ) / 2 );
Expand All @@ -259,65 +253,77 @@ namespace
fheroes2::Sprite output = fheroes2::AGG::GetICN( ICN::CBKGSWMP, 0 );
output._disableTransformLayer();

const int32_t columnStep = 425;
const int32_t textInitialOffsetY = 50;
const int32_t textInitialOffsetX = 350;
const int32_t columnStep = 430;
const int32_t textInitialOffsetY = 55;
const int32_t textWidth = 300;

int32_t offsetY = textInitialOffsetY;

TextBox title( _( "Support us at" ), Font::BIG, textWidth );
TextBox name( "https://www.patreon.com/fheroes2", Font::YELLOW_BIG, textWidth );
title.Blit( ( columnStep - title.w() ) / 2, offsetY, output );
name.Blit( ( columnStep - name.w() ) / 2, offsetY + title.h(), output );
offsetY += title.h() + name.h() + 10;
title.Blit( ( textInitialOffsetX - title.w() ) / 2, offsetY, output );
name.Blit( ( textInitialOffsetX - name.w() ) / 2, offsetY + title.h(), output );
offsetY += title.h() + name.h() + 5;

const fheroes2::Sprite & wizard = fheroes2::AGG::GetICN( ICN::CMBTCAPZ, 4 );
fheroes2::Blit( wizard, output, ( columnStep - wizard.width() ) / 2, offsetY );
fheroes2::Blit( wizard, output, ( textInitialOffsetX - wizard.width() ) / 2, offsetY );
offsetY += wizard.height();

title.Set( _( "Connect with us at" ), Font::BIG, textWidth );
name.Set( "https://www.facebook.com/groups/fheroes2", Font::YELLOW_BIG, textWidth - 10 ); // special case to properly split the string
title.Blit( ( columnStep - title.w() ) / 2, offsetY, output );
name.Blit( ( columnStep - name.w() ) / 2, offsetY + title.h(), output );
title.Blit( ( textInitialOffsetX - title.w() ) / 2, offsetY, output );
name.Blit( ( textInitialOffsetX - name.w() ) / 2, offsetY + title.h(), output );
offsetY += title.h() + name.h() + 10;

const fheroes2::Sprite & vampireLord = fheroes2::AGG::GetICN( ICN::VAMPIRE2, 22 );
fheroes2::Blit( vampireLord, output, ( columnStep - vampireLord.width() ) / 2, offsetY );
fheroes2::Blit( vampireLord, output, ( textInitialOffsetX - vampireLord.width() ) / 2, offsetY );
offsetY += vampireLord.height();

title.Set( _( "Need help with the game?" ), Font::BIG, textWidth );
name.Set( "https://discord.gg/xF85vbZ", Font::YELLOW_BIG, textWidth );
title.Blit( ( columnStep - title.w() ) / 2, offsetY, output );
name.Blit( ( columnStep - name.w() ) / 2, offsetY + title.h(), output );
title.Blit( ( textInitialOffsetX - title.w() ) / 2, offsetY, output );
name.Blit( ( textInitialOffsetX - name.w() ) / 2, offsetY + title.h(), output );
offsetY += title.h() + name.h() + 10;

fheroes2::Sprite labyrinth = fheroes2::AGG::GetICN( ICN::TWNWUP_3, 0 );
fheroes2::ApplyPalette( labyrinth, 2 );
fheroes2::Blit( labyrinth, output, ( columnStep - labyrinth.width() ) / 2, offsetY );
fheroes2::Blit( labyrinth, output, ( textInitialOffsetX - labyrinth.width() ) / 2, offsetY );

offsetY = textInitialOffsetY + 55;
offsetY = textInitialOffsetY + 35;

title.Set( _( "Special Thanks to" ), Font::YELLOW_BIG, output.width() - columnStep );
title.Blit( columnStep + ( output.width() - columnStep - title.w() ) / 2, offsetY, output );
title.Set( _( "Special Thanks to" ), Font::YELLOW_BIG, output.width() - textInitialOffsetX );
title.Blit( textInitialOffsetX + ( output.width() - textInitialOffsetX - title.w() ) / 2, offsetY, output );
offsetY += title.h();

const std::string contributors( "William Hoskinson\n"
"Kiril Lipatov\n"
"Aleksei Mazur\n"
"Matt Taylor\n"
"Connor Townsend\n"
"Brandon Wright\n" );
std::string contributors( "William Hoskinson\n"
"Aleksei Mazur\n"
"Connor Townsend\n"
"Brandon Wright\n" );

name.Set( contributors, Font::BIG, output.width() - textInitialOffsetX );
name.Blit( textInitialOffsetX + ( ( output.width() - textInitialOffsetX ) / 2 - name.w() ) / 2, offsetY, output );

contributors = "Kiril Lipatov\n"
"Matt Taylor\n"
"Andrew Szucs\n"
"slvclw\n";

name.Set( contributors + _( "and many-many other supporters!" ), Font::BIG, output.width() - columnStep );
name.Blit( columnStep + ( output.width() - columnStep - title.w() ) / 2, offsetY, output );
name.Set( contributors, Font::BIG, output.width() - textInitialOffsetX );
name.Blit( textInitialOffsetX + ( 3 * ( output.width() - textInitialOffsetX ) / 2 - name.w() ) / 2, offsetY, output );

offsetY += name.h();

name.Set( _( "and many-many other supporters!" ), Font::BIG, output.width() - columnStep );
name.Blit( textInitialOffsetX + ( output.width() - textInitialOffsetX - name.w() ) / 2, offsetY, output );
offsetY += name.h() + 10;

const fheroes2::Sprite & miniPeasant = fheroes2::AGG::GetICN( ICN::MONS32, 0 );
const fheroes2::Sprite & miniSwordsman = fheroes2::AGG::GetICN( ICN::MONS32, 5 );
const fheroes2::Sprite & miniCrusader = fheroes2::AGG::GetICN( ICN::MONS32, 10 );
const fheroes2::Sprite & miniTitan = fheroes2::AGG::GetICN( ICN::MONS32, 46 );

const int32_t miniMonsterXOffset = columnStep + ( output.width() - columnStep ) / 2;
const int32_t miniMonsterXOffset = textInitialOffsetX + ( output.width() - textInitialOffsetX ) / 2;
offsetY += miniTitan.height();

fheroes2::Blit( miniPeasant, 0, 0, output, miniMonsterXOffset - miniPeasant.width() - miniSwordsman.width(), offsetY - miniPeasant.height(), miniPeasant.width(),
Expand All @@ -327,13 +333,22 @@ namespace
fheroes2::Blit( miniCrusader, 0, 0, output, miniMonsterXOffset, offsetY - miniCrusader.height(), miniCrusader.width(), miniCrusader.height() );
fheroes2::Blit( miniTitan, 0, 0, output, miniMonsterXOffset + miniCrusader.width(), offsetY - miniTitan.height(), miniTitan.width(), miniTitan.height() );

offsetY += 10;

title.Set( _( "Original project before 0.7" ), Font::YELLOW_SMALL, textWidth );
title.Blit( textInitialOffsetX + ( output.width() - textInitialOffsetX - title.w() ) / 2, offsetY, output );
offsetY += title.h();

name.Set( "Andrey Afletdinov\nhttps://sourceforge.net/\nprojects/fheroes2/", Font::SMALL, textWidth );
name.Blit( textInitialOffsetX + ( output.width() - textInitialOffsetX - name.w() ) / 2, offsetY, output );

fheroes2::Sprite creature = fheroes2::AGG::GetICN( ICN::MAGE2, 4 );
transformToBlack( creature );

const int32_t creatureOffsetY = output.height() - 100;
fheroes2::Blit( creature, 0, 0, output, miniMonsterXOffset - creature.width() / 2, output.height() - 100, creature.width(), creature.height() );
const int32_t creatureOffsetY = output.height() - 95;
fheroes2::Blit( creature, 0, 0, output, miniMonsterXOffset - creature.width() / 2, creatureOffsetY, creature.width(), creature.height() );
title.Set( "?", Font::YELLOW_BIG, 30 );
title.Blit( miniMonsterXOffset - title.w() / 2, creatureOffsetY + creature.height() / 2, output );
title.Blit( miniMonsterXOffset - title.w() / 2, creatureOffsetY + creature.height() / 2 - 5, output );

return output;
}
Expand Down Expand Up @@ -582,12 +597,8 @@ void Game::ShowCredits()
// setup cursor
const CursorRestorer cursorRestorer( true, Cursor::POINTER );

fheroes2::Display & display = fheroes2::Display::instance();

AGG::PlayMusic( MUS::VICTORY, true, true );

LocalEvent & le = LocalEvent::Get();

fheroes2::Image blackScreen( fheroes2::Display::DEFAULT_WIDTH, fheroes2::Display::DEFAULT_HEIGHT );
blackScreen.fill( 0 );
blackScreen._disableTransformLayer();
Expand All @@ -610,6 +621,9 @@ void Game::ShowCredits()

bool fadeInHeader = true;

fheroes2::Display & display = fheroes2::Display::instance();

LocalEvent & le = LocalEvent::Get();
while ( le.HandleEvents( Game::isCustomDelayNeeded( animationDelay ) ) ) {
if ( le.KeyPress() || le.MouseClickLeft() || le.MouseClickMiddle() || le.MouseClickRight() )
break;
Expand Down
12 changes: 1 addition & 11 deletions src/fheroes2/resource/artifact_ultimate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,5 @@ StreamBase & operator<<( StreamBase & msg, const UltimateArtifact & ultimate )
StreamBase & operator>>( StreamBase & msg, UltimateArtifact & ultimate )
{
Artifact & artifact = ultimate;
msg >> artifact >> ultimate._index >> ultimate._isFound;

static_assert( LAST_SUPPORTED_FORMAT_VERSION < FORMAT_VERSION_PRE_097_RELEASE, "Remove the check below." );
if ( Game::GetLoadVersion() >= FORMAT_VERSION_PRE_097_RELEASE ) {
msg >> ultimate._offset;
}
else {
ultimate._offset = fheroes2::Point();
}

return msg;
return msg >> artifact >> ultimate._index >> ultimate._isFound >> ultimate._offset;
}
5 changes: 2 additions & 3 deletions src/fheroes2/system/save_format_version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* Free Heroes of Might and Magic II: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2021 *
* Copyright (C) 2021 - 2022 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -31,9 +31,8 @@ enum SaveFileFormat : uint16_t
FORMAT_VERSION_PRE1_0912_RELEASE = 9800,
FORMAT_VERSION_097_RELEASE = 9701,
FORMAT_VERSION_PRE_097_RELEASE = 9700,
FORMAT_VERSION_096_RELEASE = 9600,

LAST_SUPPORTED_FORMAT_VERSION = FORMAT_VERSION_096_RELEASE,
LAST_SUPPORTED_FORMAT_VERSION = FORMAT_VERSION_PRE_097_RELEASE,

CURRENT_FORMAT_VERSION = FORMAT_VERSION_0912_RELEASE
};
2 changes: 1 addition & 1 deletion src/fheroes2/system/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#define MAJOR_VERSION 0
#define MINOR_VERSION 9
#define INTERMEDIATE_VERSION 13
#define INTERMEDIATE_VERSION 14

#ifndef BUILD_VERSION
#define BUILD_VERSION 0
Expand Down

0 comments on commit 6a5f295

Please sign in to comment.