Skip to content

Commit

Permalink
Merge branch 'master' into switch
Browse files Browse the repository at this point in the history
Add more key shortcuts

# Conflicts:
#	README.md
#	src/engine/localevent.cpp
#	src/engine/logging.h
  • Loading branch information
dimag0g committed Mar 12, 2021
2 parents 766dce8 + f1b5696 commit 91ec8bf
Show file tree
Hide file tree
Showing 153 changed files with 3,854 additions and 1,794 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: OSX
name: macOS

on:
pull_request:
Expand All @@ -13,10 +13,7 @@ jobs:
fetch-depth: 50
- name: install SDL 1
run: |
brew install sdl
brew install sdl_ttf
brew install sdl_mixer
brew install sdl_image
brew install sdl sdl_ttf sdl_mixer sdl_image
- name: compile
run: make -j 2
env:
Expand All @@ -31,10 +28,7 @@ jobs:
fetch-depth: 50
- name: install SDL 2
run: |
brew install sdl2
brew install sdl2_ttf
brew install sdl2_mixer
brew install sdl2_image
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
- name: compile
run: make -j 2
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: OSX (release)
name: macOS (release)

on:
push:
Expand All @@ -13,10 +13,7 @@ jobs:
fetch-depth: 50
- name: install SDL 1
run: |
brew install sdl
brew install sdl_ttf
brew install sdl_mixer
brew install sdl_image
brew install sdl sdl_ttf sdl_mixer sdl_image
- name: compile
run: make -j 2
env:
Expand All @@ -26,10 +23,10 @@ jobs:
- name: create package
run: |
cp doc/README.txt .
zip fheroes2_osx_sdl1.zip fheroes2 LICENSE fheroes2.key script/macos/install_sdl_1.sh script/demo/demo_macos.sh changelog.txt README.txt
zip fheroes2_macos10_15_sdl1.zip fheroes2 LICENSE fheroes2.key script/macos/install_sdl_1.sh script/demo/demo_macos.sh changelog.txt README.txt
- uses: ncipollo/release-action@v1
with:
artifacts: fheroes2_osx_sdl1.zip
artifacts: fheroes2_macos10_15_sdl1.zip
body: Compiled version of ${{ github.sha }} commit
token: ${{ secrets.GITHUB_TOKEN }}
name: MacOS build with SDL 1 support (latest commit)
Expand All @@ -45,10 +42,7 @@ jobs:
fetch-depth: 50
- name: install SDL 2
run: |
brew install sdl2
brew install sdl2_ttf
brew install sdl2_mixer
brew install sdl2_image
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
- name: compile
run: make -j 2
env:
Expand All @@ -57,10 +51,10 @@ jobs:
- name: create package
run: |
cp doc/README.txt .
zip fheroes2_osx_sdl2.zip fheroes2 LICENSE fheroes2.key script/macos/install_sdl_2.sh script/demo/demo_macos.sh changelog.txt README.txt
zip fheroes2_macos10_15_sdl2.zip fheroes2 LICENSE fheroes2.key script/macos/install_sdl_2.sh script/demo/demo_macos.sh changelog.txt README.txt
- uses: ncipollo/release-action@v1
with:
artifacts: fheroes2_osx_sdl2.zip
artifacts: fheroes2_macos10_15_sdl2.zip
body: Compiled version of ${{ github.sha }} commit
token: ${{ secrets.GITHUB_TOKEN }}
name: MacOS build with SDL 2 support (latest commit)
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/scan-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
- name: install SDL 2 and clang-tools
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev
sudo apt-get install -y libsdl2-ttf-dev
sudo apt-get install -y libsdl2-mixer-dev
sudo apt-get install -y libsdl2-image-dev
sudo apt-get install -y gettext
sudo apt-get install -y clang-tools
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tools
- name: compile
run: scan-build -v make -j 2
env:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/vs2019_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: VS2019

on:
pull_request:
branches: [ master ]

jobs:
build:
strategy:
fail-fast: false
matrix:
config-type: [Release-SDL1, Release-SDL2]
platform-type: [x86, x64]
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- name: install packages
run: |
cd script/windows
./install_packages.bat
cd ../..
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: compile
run: MSBuild.exe fheroes2-vs2019.vcxproj /property:Configuration=${{ matrix.config-type }} /property:Platform=${{ matrix.platform-type }}
29 changes: 5 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ matrix:
name: "SonarCloud analysis"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl2-dev
- sudo apt-get install -y libsdl2-ttf-dev
- sudo apt-get install -y libsdl2-mixer-dev
- sudo apt-get install -y libsdl2-image-dev
- sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev
- export FHEROES2_STRICT_COMPILATION="ON"
script:
# Wraps the compilation with the Build Wrapper to generate configuration (used
Expand All @@ -37,10 +34,7 @@ matrix:
name: "Ubuntu (Linux) with SDL 1.2"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl1.2-dev
- sudo apt-get install -y libsdl-ttf2.0-dev
- sudo apt-get install -y libsdl-mixer1.2-dev
- sudo apt-get install -y libsdl-image1.2-dev
- sudo apt-get install -y libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev
- export FHEROES2_SDL1="ON" FHEROES2_STRICT_COMPILATION="ON"
before_deploy:
- cp doc/README.txt .
Expand All @@ -62,10 +56,7 @@ matrix:
name: "Ubuntu (Linux) with SDL 2.0"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl2-dev
- sudo apt-get install -y libsdl2-ttf-dev
- sudo apt-get install -y libsdl2-mixer-dev
- sudo apt-get install -y libsdl2-image-dev
- sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev
- export FHEROES2_STRICT_COMPILATION="ON"
before_deploy:
- cp doc/README.txt .
Expand All @@ -88,12 +79,7 @@ matrix:
name: "Ubuntu (Linux) ARM with SDL 1.2"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl1.2-dev
- sudo apt-get install -y libsdl-ttf2.0-dev
- sudo apt-get install -y libsdl-mixer1.2-dev
- sudo apt-get install -y libsdl-image1.2-dev
- sudo apt-get install -y gettext
- sudo apt-get install -y zip
- sudo apt-get install -y libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev gettext zip
- export FHEROES2_SDL1="ON" FHEROES2_STRICT_COMPILATION="ON"
before_deploy:
- cp doc/README.txt .
Expand All @@ -116,12 +102,7 @@ matrix:
name: "Ubuntu (Linux) ARM with SDL 2.0"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl2-dev
- sudo apt-get install -y libsdl2-ttf-dev
- sudo apt-get install -y libsdl2-mixer-dev
- sudo apt-get install -y libsdl2-image-dev
- sudo apt-get install -y gettext
- sudo apt-get install -y zip
- sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext zip
- export FHEROES2_STRICT_COMPILATION="ON"
before_deploy:
- cp doc/README.txt .
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#### **Do you want to contribute to the project?**

fheroes2 is a volunteer effort. We encourage you to pitch in and [join the team](https://github.com/ihhub/fheroes2/wiki/Contributors)! If you see that your name is not present in the list, please be free to contact us and report about such terrible mistake.
fheroes2 is a volunteer effort. We encourage you to pitch in and join the team!

Thanks! :heart: :heart: :heart:

Expand Down
25 changes: 21 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# makefile
# project: Free Heroes of Might and Magic II (https://github.com/ihhub/fheroes2)
#
###########################################################################
# Free Heroes of Might and Magic II: https://github.com/ihhub/fheroes2 #
# Copyright (C) 2021 #
# #
# 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 #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
###########################################################################

# Options:
# DEBUG: build in debug mode
# RELEASE: build with addons extensions
Expand All @@ -9,7 +26,7 @@
# WITHOUT_MIXER: build without SDL_mixer library
# WITHOUT_AUDIOCD: disable audio CD support
# WITHOUT_UNICODE: build without unicode (disable translation and ttf font)
# WITHOUT_IMAGE: build without SDL_image library (disable cache image, icn2png)
# FHEROES2_IMAGE_SUPPORT: build with SDL image support
# WITHOUT_XML: skip build tinyxml, used for load alt. resources
# WITH_TOOLS: build tools
# WITHOUT_BUNDLED_LIBS: do not build XML third party library
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,18 @@ In the end you should have the following directory tree on your SD card:
This build of Free Heroes 2 was tested on 10.2.0|AMS 0.14.4|S (FAT32). exFAT is not recommended.
Alternative controllers (keyboards, mouses, etc.) might work but weren't tested.

Working controls controls are:
Working controls are:
- Touchscreen - emulates mouse, including dragging
- L-stick - move mouse cursor
- R-stick/D-pad - scroll
- A - left mouse click
- B - Right mouse click
- X - Escape
- Y - Enter
- (+) - Cast spell
- (-) - End turn
- R - Cycle through towns
- L - Cycle through heroes


[4] TODO
Expand Down
1 change: 1 addition & 0 deletions VisualStudio/Debug.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
Expand Down
2 changes: 1 addition & 1 deletion VisualStudio/SDL2.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\..\sdl2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_TTF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_TTF;FHEROES2_IMAGE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\..\sdl2\lib/$(PlatformTarget);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
Expand Down
1 change: 1 addition & 0 deletions VisualStudio/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<OutDir>$(MSBuildThisFileDirectory)..\build\$(PlatformTarget)\$(Configuration)\</OutDir>
<IntDir>$(MSBuildThisFileDirectory)..\build\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
<TargetName>fheroes2</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ skip_commits:
skip_tags: true

# version format
version: 0.9.0.{build}
version: 0.9.1.{build}

# Build worker image (VM template)
image: Visual Studio 2015
Expand Down Expand Up @@ -45,6 +45,9 @@ install:
- if not exist C:\projects\packages call install_packages.bat
- cd C:\projects\fheroes2

build:
project: fheroes2-vs2015.vcxproj

after_build:
- cmd: cd C:\projects\fheroes2\build\%platform%\%configuration%
- cmd: if "%platform%" == "x86" xcopy /Y /s /Q "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvcp140.dll" "."
Expand Down
58 changes: 58 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
version 0.9.1 (04 March 2021)
- add "Artifacts" category in Oracle Screen
- add barrier fading animation
- improve AI retreat condition
- fix Split-related issues and implement some new techniques
- disable retreat for auto battle mode
- fix object's visited info and grammar
- fix issues with path finding during combat to avoid being stopped by moat
- fix incorrect names of Ballista and Turret during battle
- add missing shadow for arrow cursor on SDL2
- fix ACCEPT button font for Good Interface
- fix AI wide units pathfding and moat logic
- allow to modify a hero during level up
- fix summon boat logic
- fix monster movement nearby moat
- AI does not chase faster units during battle
- fix hero shadow drawing on world map
- fix missing animation frame for wince
- fix object fading animation on world map
- fix missing last lost hero condition reset
- fix simultaneous animation of boat while during another building construction
- change logic in monster hiring window
- fix save loading crash for broken saves
- add middle resolution status support
- do not show waiting cursor for an exhausted hero
- fix post Daemon Cave missing music
- fix well's max button drawing
- fix incorrect castle focus while visiting by a hero
- fix fog drawings
- reduce income window area in towns
- fix autosave option logic
- fix overlapped battleground objects
- remember scenario difficulty while restarting or choosing a new scenario
- fix multiple game frezes with MIDI music playback
- add resizable window support on SDL2
- make deterministic bonus for hero level-up
- fix wrong controller pointer speed option name and touch coordinates translation
- add auto battle resolve mode to the game
- add logic to support video frame rescaling
- optimize screen resolution logic
- fix garrison strength estimation by AI
- fix magic gardens priority if object capture is enabled
- optimize AI's troop placement before the battle
- use same colour for all battlegrounds
- change text in map size hint, to be displayed in more pleasant manner
- load game button from UI should lead to common load game logic
- initial implementation of "View World"
- fix application crash for drawings
- change building status message for Dwellings
- fix crash when entering ally castle
- add Campaign continuation initial support
- speed up rendering of World Map
- fix spell book status on hovering
- save fullscreen mode in configuration file while switching between modes
- AI should avoid spellcasting if has advantage in battle
- fix rendering with mouse emulation
- fix extensive memory usage by dialog windows

version 0.9.0 (04 February 2021)
- make AI to buy magic books in castles
- fix infinite AI turns
Expand Down
3 changes: 1 addition & 2 deletions fheroes2.vcxproj → fheroes2-vs2015.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
<ClCompile Include="src\engine\audio_music.cpp" />
<ClCompile Include="src\engine\dir.cpp" />
<ClCompile Include="src\engine\engine.cpp" />
<ClCompile Include="src\engine\error.cpp" />
<ClCompile Include="src\engine\font.cpp" />
<ClCompile Include="src\engine\image.cpp" />
<ClCompile Include="src\engine\image_tool.cpp" />
Expand Down Expand Up @@ -213,6 +212,7 @@
<ClCompile Include="src\fheroes2\ai\normal\ai_normal_castle.cpp" />
<ClCompile Include="src\fheroes2\ai\normal\ai_normal_hero.cpp" />
<ClCompile Include="src\fheroes2\ai\normal\ai_normal_kingdom.cpp" />
<ClCompile Include="src\fheroes2\ai\normal\ai_normal_spell.cpp" />
<ClCompile Include="src\fheroes2\army\army.cpp" />
<ClCompile Include="src\fheroes2\army\army_bar.cpp" />
<ClCompile Include="src\fheroes2\army\army_troop.cpp" />
Expand Down Expand Up @@ -384,7 +384,6 @@
<ClInclude Include="src\engine\audio_music.h" />
<ClInclude Include="src\engine\dir.h" />
<ClInclude Include="src\engine\engine.h" />
<ClInclude Include="src\engine\error.h" />
<ClInclude Include="src\engine\font.h" />
<ClInclude Include="src\engine\image.h" />
<ClInclude Include="src\engine\image_tool.h" />
Expand Down
Loading

0 comments on commit 91ec8bf

Please sign in to comment.