Code style check: check the syntax of markdown files (#9394)

This commit is contained in:
Oleg Derevenetz
2024-12-31 12:10:46 +08:00
committed by GitHub
parent 6d94347463
commit f93c42fef3
23 changed files with 205 additions and 133 deletions
+2
View File
@@ -32,3 +32,5 @@ jobs:
(grep "VALUE \"LegalCopyright\", *\"\\\\251 $(date +%Y) fheroes2 Resurrection team" src/resources/fheroes2.rc > /dev/null && \ (grep "VALUE \"LegalCopyright\", *\"\\\\251 $(date +%Y) fheroes2 Resurrection team" src/resources/fheroes2.rc > /dev/null && \
echo "The date specified in the LegalCopyright entry is valid.") || \ echo "The date specified in the LegalCopyright entry is valid.") || \
(echo "Please update the date in the LegalCopyright entry!" && false) (echo "Please update the date in the LegalCopyright entry!" && false)
- name: Check format of markdown files
uses: DavidAnson/markdownlint-cli2-action@v19
+49
View File
@@ -0,0 +1,49 @@
{
"config": {
"default": true,
"heading-style": {
"style": "atx"
},
"ul-style": {
"style": "asterisk"
},
"no-trailing-spaces": {
"strict": true
},
"line-length": {
"code_block_line_length": 170,
"heading_line_length": 170,
"line_length": 170
},
"no-inline-html": {
"allowed_elements": [
"a",
"details",
"img",
"p",
"summary"
]
},
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"emphasis-style": {
"style": "underscore"
},
"strong-style": {
"style": "asterisk"
},
"table-pipe-style": {
"style": "leading_and_trailing"
}
},
"globs": [
"**/*.md"
],
"ignores": [
"cmake/README_findsdl2.md"
]
}
+1 -1
View File
@@ -1,4 +1,4 @@
## Contribution and Development # Contribution and Development
This repository is a place for everyone. If you want to contribute, please read more [**here**](https://github.com/ihhub/fheroes2/wiki/F.A.Q.#q-how-can-i-contribute-to-the-project). This repository is a place for everyone. If you want to contribute, please read more [**here**](https://github.com/ihhub/fheroes2/wiki/F.A.Q.#q-how-can-i-contribute-to-the-project).
+5 -4
View File
@@ -9,11 +9,12 @@ and user interface improvements), breathing new life into one of the most addict
You can find a complete list of all of our changes and enhancements in [**its own wiki page**](https://github.com/ihhub/fheroes2/wiki/Features-and-enhancements-of-the-project). You can find a complete list of all of our changes and enhancements in [**its own wiki page**](https://github.com/ihhub/fheroes2/wiki/Features-and-enhancements-of-the-project).
<p align="center"> <p align="center">
<img src="docs/images/screenshots/screenshot_world_map.png?raw=true" width="820"> <img src="docs/images/screenshots/screenshot_world_map.png?raw=true" width="820" alt="Screenshot of the world map">
</p> </p>
<p align="center"> <p align="center">
<img src="docs/images/screenshots/screenshot_battle.png?raw=true" width="410"> <img src="docs/images/screenshots/screenshot_castle.png?raw=true" width="410"> <img src="docs/images/screenshots/screenshot_battle.png?raw=true" width="410" alt="Screenshot of the battle screen">
<img src="docs/images/screenshots/screenshot_castle.png?raw=true" width="410" alt="Screenshot of the castle screen">
</p> </p>
## Download and install ## Download and install
@@ -52,8 +53,8 @@ If you would like to help translating the project, please read the [**translatio
## Donation ## Donation
We accept donations via [**Patreon**](https://www.patreon.com/fheroes2), [**PayPal**](https://www.paypal.com/paypalme/fheroes2) or [**Boosty**](https://boosty.to/fheroes2). All donations will be used only for the future project development as we do not We accept donations via [**Patreon**](https://www.patreon.com/fheroes2), [**PayPal**](https://www.paypal.com/paypalme/fheroes2) or [**Boosty**](https://boosty.to/fheroes2).
consider this project as a source of income by any means. All donations will be used only for the future project development as we do not consider this project as a source of income by any means.
[![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg)](https://www.patreon.com/fheroes2) [![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg)](https://www.patreon.com/fheroes2)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2)
View File
-6
View File
@@ -6,7 +6,6 @@ Please follow the instructions below to be able to build the project from source
**Note:** You will need to clone the `fheroes2` project before following the instructions below. **Note:** You will need to clone the `fheroes2` project before following the instructions below.
<a name="windows"></a>
### Windows ### Windows
* Go to the directory `script/windows` and run the file `install_packages.bat`. This script will install all the * Go to the directory `script/windows` and run the file `install_packages.bat`. This script will install all the
@@ -18,7 +17,6 @@ Please follow the instructions below to be able to build the project from source
* Open the file `fheroes2-vs2019.vcxproj` (targeted for Visual Studio 2019) and build the project. * Open the file `fheroes2-vs2019.vcxproj` (targeted for Visual Studio 2019) and build the project.
* Visual Studio will automatically copy game files in the root directory to the build directory. * Visual Studio will automatically copy game files in the root directory to the build directory.
<a name="macos-and-linux"></a>
### macOS and Linux ### macOS and Linux
* Depending on your OS, run the following scripts to install the dependencies required for the build: * Depending on your OS, run the following scripts to install the dependencies required for the build:
@@ -30,7 +28,6 @@ Please follow the instructions below to be able to build the project from source
This script will download a demo version of the original game, which is the minimum required for development. This script will download a demo version of the original game, which is the minimum required for development.
* Run the `make` command in the root directory of the project to build it. * Run the `make` command in the root directory of the project to build it.
<a name="android"></a>
### Android ### Android
* Go to the directory `script/android` and run the file `install_packages.bat` if your development platform is Windows or * Go to the directory `script/android` and run the file `install_packages.bat` if your development platform is Windows or
@@ -38,17 +35,14 @@ Please follow the instructions below to be able to build the project from source
to build the project using Android Studio. to build the project using Android Studio.
* Launch Android Studio, open the project in the `android` directory and run the build. * Launch Android Studio, open the project in the `android` directory and run the build.
<a name="playstation-vita"></a>
### PlayStation Vita ### PlayStation Vita
If you would like to build and run this project on PlayStation Vita please follow the instructions on [**this page**](README_PSV.md). If you would like to build and run this project on PlayStation Vita please follow the instructions on [**this page**](README_PSV.md).
<a name="nintendo-switch"></a>
### Nintendo Switch ### Nintendo Switch
If you would like to build and run this project on Nintendo Switch please follow the instructions on [**this page**](README_switch.md). If you would like to build and run this project on Nintendo Switch please follow the instructions on [**this page**](README_switch.md).
<a name="build-with-cmake"></a>
### Build with CMake ### Build with CMake
If you would like to build the project using CMake please follow the instructions on [**this page**](README_cmake.md). If you would like to build the project using CMake please follow the instructions on [**this page**](README_cmake.md).
+11 -11
View File
@@ -12,35 +12,35 @@ This guide is designed for Linux, MacOS and Windows users. The source files to t
## Where to get the tools ## Where to get the tools
You can download the precompiled tools for your operating system (OS) of choice here:<br> You can download the precompiled tools for your operating system (OS) of choice here:
[Windows 32-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-windows-x86-SDL2/fheroes2_tools_windows_x86_SDL2.zip)<br> [Windows 32-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-windows-x86-SDL2/fheroes2_tools_windows_x86_SDL2.zip)
[Windows 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-windows-x64-SDL2/fheroes2_tools_windows_x64_SDL2.zip) [Windows 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-windows-x64-SDL2/fheroes2_tools_windows_x64_SDL2.zip)
[MacOS](https://github.com/ihhub/fheroes2/releases/download/fheroes2-osx-sdl2_dev/fheroes2_tools_macos_x86-64_SDL2.zip) [MacOS](https://github.com/ihhub/fheroes2/releases/download/fheroes2-osx-sdl2_dev/fheroes2_tools_macos_x86-64_SDL2.zip)
[Linux Ubuntu 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-linux-sdl2_dev/fheroes2_tools_ubuntu_x86-64_SDL2.zip)<br> [Linux Ubuntu 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-linux-sdl2_dev/fheroes2_tools_ubuntu_x86-64_SDL2.zip)
[Linux Ubuntu ARM 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-linux-arm-sdl2_dev/fheroes2_tools_ubuntu_arm64_SDL2.zip) [Linux Ubuntu ARM 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-linux-arm-sdl2_dev/fheroes2_tools_ubuntu_arm64_SDL2.zip)
Here is a list and short description of the various graphical artist tools: Here is a list and short description of the various graphical artist tools:
- extractor * extractor
This tool extracts all the contents of the AGG files mentioned above. Among the extracted files are the ICNs which hold the graphical assets. This tool extracts all the contents of the AGG files mentioned above. Among the extracted files are the ICNs which hold the graphical assets.
- icn2img * icn2img
This tool converts the various graphical assets contained within the ICNs into PNG or BMP files. This tool converts the various graphical assets contained within the ICNs into PNG or BMP files.
- pal2img * pal2img
This tool generates a PNG or BMP file from the palette file `KB.PAL`. It displays it as 16x16 tiles of 16 pixels each. This tool generates a PNG or BMP file from the palette file `KB.PAL`. It displays it as 16x16 tiles of 16 pixels each.
Some colors in the game are used for the cycling animation. They are marked in the generated image by a black area in Some colors in the game are used for the cycling animation. They are marked in the generated image by a black area in
the top-left corner on a tile. Use these colors only if the animation is a requirement: the top-left corner on a tile. Use these colors only if the animation is a requirement:
- 214, 215, 216, 217
- 218, 219, 220, 221 * 214, 215, 216, 217
- 231, 232, 233, 234, 235 * 218, 219, 220, 221
- 238, 239, 240, 241 * 231, 232, 233, 234, 235
* 238, 239, 240, 241
## How to use the tools to extract the images ## How to use the tools to extract the images
+50 -27
View File
@@ -16,16 +16,16 @@ Precompiled binaries of the release version are currently available for the foll
* [**Windows installer**](#windows-installer) * [**Windows installer**](#windows-installer)
* [**Windows ZIP archive**](#windows-zip-archive) * [**Windows ZIP archive**](#windows-zip-archive)
* [**macOS**](#macos) * [**macOS**](#macos)
* [**Homebrew**](#homebrew-mac) * [**Homebrew**](#homebrew-on-macos)
* [**MacPorts**](#macports) * [**MacPorts**](#macports)
* [**macOS ZIP archive**](#macos-zip-archive) * [**macOS ZIP archive**](#macos-zip-archive)
* [**macOS native app**](#macos-native-app) * [**macOS native app**](#macos-native-app)
* [**Linux**](#linux) * [**Linux**](#linux)
* [**Flatpak**](#flatpak-linux) * [**Flatpak**](#flatpak)
* [**Gentoo**](#gentoo-package) * [**Gentoo**](#gentoo-package)
* [**Homebrew**](#homebrew-linux) * [**Homebrew**](#homebrew-on-linux)
* [**AUR package**](#aur-package) * [**AUR package**](#aur-package)
* [**Debian and Ubuntu**](#debian-package) * [**Debian and Ubuntu**](#debian-and-ubuntu)
* [**Linux ZIP archive**](#linux-zip-archive) * [**Linux ZIP archive**](#linux-zip-archive)
* [**Android**](#android) * [**Android**](#android)
* [**PlayStation Vita**](#playstation-vita) * [**PlayStation Vita**](#playstation-vita)
@@ -34,13 +34,15 @@ Precompiled binaries of the release version are currently available for the foll
Alternatively, you can download the precompiled binaries of the latest commit (snapshot) [**here**](#snapshots-latest-builds). Alternatively, you can download the precompiled binaries of the latest commit (snapshot) [**here**](#snapshots-latest-builds).
<a name="windows"></a> <a name="windows"></a>
## Windows ## Windows
<a name="windows-installer"></a> <a name="windows-installer"></a>
### Windows installer ### Windows installer
* Download one of the following Windows installer packages:<br> * Download one of the following Windows installer packages:
[**Windows x64 (64-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x64_SDL2_installer.exe) or<br> [**Windows x64 (64-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x64_SDL2_installer.exe) or
[**Windows x86 (32-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x86_SDL2_installer.exe) [**Windows x86 (32-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x86_SDL2_installer.exe)
* After downloading the installer, launch it and follow the instructions. * After downloading the installer, launch it and follow the instructions.
@@ -59,10 +61,11 @@ Alternatively, you can download the precompiled binaries of the latest commit (s
be missing depending on the version of the original game) from the original game directory to the fheroes2 installation directory. be missing depending on the version of the original game) from the original game directory to the fheroes2 installation directory.
<a name="windows-zip-archive"></a> <a name="windows-zip-archive"></a>
### Windows ZIP archive ### Windows ZIP archive
* Download one of the following Windows ZIP archives:<br> * Download one of the following Windows ZIP archives:
[**Windows x64 (64-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x64_SDL2.zip) or<br> [**Windows x64 (64-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x64_SDL2.zip) or
[**Windows x86 (32-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x86_SDL2.zip) [**Windows x86 (32-bit)**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_windows_x86_SDL2.zip)
* After downloading the ZIP archive, extract it to a suitable directory of your choice. * After downloading the ZIP archive, extract it to a suitable directory of your choice.
@@ -80,14 +83,16 @@ Alternatively, you can download the precompiled binaries of the latest commit (s
If you see complaints about missing DLLs when running fheroes2, then you may need to install the Microsoft Visual C++ redistributable If you see complaints about missing DLLs when running fheroes2, then you may need to install the Microsoft Visual C++ redistributable
package. You can download it using the following URLs: package. You can download it using the following URLs:
[**https://aka.ms/vs/17/release/vc_redist.x64.exe**](https://aka.ms/vs/17/release/vc_redist.x64.exe) - for 64-bit x64 fheroes2 builds;<br> [**https://aka.ms/vs/17/release/vc_redist.x64.exe**](https://aka.ms/vs/17/release/vc_redist.x64.exe) - for 64-bit x64 fheroes2 builds;
[**https://aka.ms/vs/17/release/vc_redist.x86.exe**](https://aka.ms/vs/17/release/vc_redist.x86.exe) - for 32-bit x86 fheroes2 builds. [**https://aka.ms/vs/17/release/vc_redist.x86.exe**](https://aka.ms/vs/17/release/vc_redist.x86.exe) - for 32-bit x86 fheroes2 builds.
<a name="macos"></a> <a name="macos"></a>
## macOS ## macOS
<a name="homebrew-mac"></a> <a name="homebrew-on-macos"></a>
### Homebrew
### Homebrew on macOS
If you are using [**Homebrew**](https://brew.sh/), you can install the game by running the following command: If you are using [**Homebrew**](https://brew.sh/), you can install the game by running the following command:
@@ -95,9 +100,10 @@ If you are using [**Homebrew**](https://brew.sh/), you can install the game by r
brew install fheroes2 brew install fheroes2
``` ```
Follow the [**instructions below**](#macos-resources) to gather resources necessary for fheroes2 to function as expected. Follow the [**instructions below**](#gathering-game-resources) to gather resources necessary for fheroes2 to function as expected.
<a name="macports"></a> <a name="macports"></a>
### MacPorts ### MacPorts
If you are using [**MacPorts**](https://www.macports.org/), you can install the game by running the following command: If you are using [**MacPorts**](https://www.macports.org/), you can install the game by running the following command:
@@ -108,22 +114,24 @@ port install fheroes2
Then follow the instructions on the screen. Then follow the instructions on the screen.
Follow the [**instructions below**](#macos-resources) to gather resources necessary for fheroes2 to function as expected. Follow the [**instructions below**](#gathering-game-resources) to gather resources necessary for fheroes2 to function as expected.
<a name="macos-zip-archive"></a> <a name="macos-zip-archive"></a>
### macOS ZIP archive ### macOS ZIP archive
* Download the [**macOS ZIP archive**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_macos_x86-64_SDL2.zip). * Download the [**macOS ZIP archive**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_macos_x86-64_SDL2.zip).
Currently only x86-64 binaries are provided. If you use a machine with an Apple Silicon chip, you should choose another installation Currently only x86-64 binaries are provided. If you use a machine with an Apple Silicon chip, you should choose another installation
method (using [**MacPorts**](#macports) or [**Homebrew**](#homebrew-mac)), or method (using [**MacPorts**](#macports) or [**Homebrew**](#homebrew-on-macos)), or
[**build the project from source**](DEVELOPMENT.md#macos-and-linux). [**build the project from source**](DEVELOPMENT.md#macos-and-linux).
* After downloading the ZIP archive, extract it to a suitable directory of your choice and then run the script `install_sdl2.sh` from * After downloading the ZIP archive, extract it to a suitable directory of your choice and then run the script `install_sdl2.sh` from
the `script/macos` subdirectory. This will install the SDL libraries required to run the game. the `script/macos` subdirectory. This will install the SDL libraries required to run the game.
Follow the [**instructions below**](#macos-resources) to gather resources necessary for fheroes2 to function as expected. Follow the [**instructions below**](#gathering-game-resources) to gather resources necessary for fheroes2 to function as expected.
<a name="macos-native-app"></a> <a name="macos-native-app"></a>
### macOS native app ### macOS native app
* Download the source and compile with the `-DMACOS_APP_BUNDLE=ON` option (if using CMake) or using the following command (with make): * Download the source and compile with the `-DMACOS_APP_BUNDLE=ON` option (if using CMake) or using the following command (with make):
@@ -132,18 +140,19 @@ Follow the [**instructions below**](#macos-resources) to gather resources necess
make FHEROES2_MACOS_APP_BUNDLE=ON make FHEROES2_MACOS_APP_BUNDLE=ON
``` ```
Follow the [**instructions below**](#macos-resources) to gather resources necessary for fheroes2 to function as expected. Follow the [**instructions below**](#gathering-game-resources) to gather resources necessary for fheroes2 to function as expected.
<a name="gathering-game-resources"></a>
<a name="macos-resources"></a>
### Gathering game resources ### Gathering game resources
Once you obtain the fheroes2 executable using any of the options above, you should follow these steps to load in the correct resources: Once you obtain the fheroes2 executable using any of the options above, you should follow these steps to load in the correct resources:
* If you have a legally purchased copy of the original game in a self-extracting Windows executable (such as from GOG), you can utilize * If you have a legally purchased copy of the original game in a self-extracting Windows executable (such as from GOG), you can utilize
[`innoextract`](https://constexpr.org/innoextract/#use) to extract files out of the exe without having to use Wine/Windows emulation [`innoextract`](https://constexpr.org/innoextract/#use) to extract files out of the exe without having to use Wine/Windows emulation
software on your *UNIX-based machine. software on your *UNIX-based machine.
* If you have a legally purchased copy of the original game, run the extract resources script which will prompt you to enter * If you have a legally purchased copy of the original game, run the extract resources script which will prompt you to enter
the location of the original game, and will extract all the necessary resource files. The script can be run from the following paths depending on the location of the original game, and will extract all the necessary resource files. The script can be run from the following paths depending on
how you installed fheroes2: how you installed fheroes2:
* `fheroes2-extract-resources` if you used a package manager (MacPorts or Homebrew); * `fheroes2-extract-resources` if you used a package manager (MacPorts or Homebrew);
@@ -151,7 +160,7 @@ Once you obtain the fheroes2 executable using any of the options above, you shou
* `script/homm2/extract_homm2_resources.sh` for all other cases. * `script/homm2/extract_homm2_resources.sh` for all other cases.
* As an alternative to the previous step, you can manually copy the subdirectories `ANIM`, `DATA`, `MAPS` and `MUSIC` (some of them may * As an alternative to the previous step, you can manually copy the subdirectories `ANIM`, `DATA`, `MAPS` and `MUSIC` (some of them may
be missing depending on the version of the original game) from the original game directory to be missing depending on the version of the original game) from the original game directory to
* `~/Library/Application Support/fheroes2` if you built from source using the [**macOS native app**](#macos-native-app) method; * `~/Library/Application Support/fheroes2` if you built from source using the [**macOS native app**](#macos-native-app) method;
* `~/.fheroes2` for all other cases. * `~/.fheroes2` for all other cases.
@@ -162,9 +171,11 @@ Once you obtain the fheroes2 executable using any of the options above, you shou
* `script/demo/download_demo_version.sh` for all other cases. * `script/demo/download_demo_version.sh` for all other cases.
<a name="linux"></a> <a name="linux"></a>
## Linux ## Linux
<a name="flatpak-linux"></a> <a name="flatpak"></a>
### Flatpak ### Flatpak
If you are using [**Flatpak**](https://flatpak.org) and [**Flathub**](https://flathub.org), you can install the game by running the If you are using [**Flatpak**](https://flatpak.org) and [**Flathub**](https://flathub.org), you can install the game by running the
@@ -183,6 +194,7 @@ flatpak run io.github.ihhub.Fheroes2
Alternatively, you can use an application manager like Discover, which is also available on Steam Deck. Alternatively, you can use an application manager like Discover, which is also available on Steam Deck.
After the first start you will be asked for the original files. There are three possibilities: After the first start you will be asked for the original files. There are three possibilities:
1. Install GOG version (recommended) 1. Install GOG version (recommended)
2. Manual install 2. Manual install
3. Install demo 3. Install demo
@@ -193,6 +205,7 @@ For the manual installation you have to copy the subdirectories `ANIM`, `DATA`,
`~/.var/app/io.github.ihhub.Fheroes2/data/fheroes2` directory. The destination folder will be opened when this option is selected. `~/.var/app/io.github.ihhub.Fheroes2/data/fheroes2` directory. The destination folder will be opened when this option is selected.
<a name="gentoo-package"></a> <a name="gentoo-package"></a>
### Gentoo package ### Gentoo package
If you are using [**Gentoo**](https://gentoo.org), you can install the game using package manager. There are several options: If you are using [**Gentoo**](https://gentoo.org), you can install the game using package manager. There are several options:
@@ -229,8 +242,9 @@ sudo emerge -av games-engines/fheroes2
The second command (Note: run it without root) will ask you where your data files are. The second command (Note: run it without root) will ask you where your data files are.
<a name="homebrew-linux"></a> <a name="homebrew-on-linux"></a>
### Homebrew
### Homebrew on Linux
If you are using [**Homebrew**](https://brew.sh/), you can install the game by running the following command: If you are using [**Homebrew**](https://brew.sh/), you can install the game by running the following command:
@@ -244,6 +258,7 @@ be missing depending on the version of the original game) from the original game
`/usr/share/fheroes2/download_demo_version.sh` script. `/usr/share/fheroes2/download_demo_version.sh` script.
<a name="aur-package"></a> <a name="aur-package"></a>
### AUR package ### AUR package
If you are using Arch Linux or compatible distribution, you can install [**fheroes2 package**](https://aur.archlinux.org/packages/fheroes2) If you are using Arch Linux or compatible distribution, you can install [**fheroes2 package**](https://aur.archlinux.org/packages/fheroes2)
@@ -268,7 +283,8 @@ cd fheroes2
makepkg -si makepkg -si
``` ```
<a name="debian-package"></a> <a name="debian-and-ubuntu"></a>
### Debian and Ubuntu ### Debian and Ubuntu
fheroes2 is available from `contrib` repositories for Debian (since 13) and Ubuntu (since 24.04). You can install it by running: fheroes2 is available from `contrib` repositories for Debian (since 13) and Ubuntu (since 24.04). You can install it by running:
@@ -276,6 +292,7 @@ fheroes2 is available from `contrib` repositories for Debian (since 13) and Ubun
```sh ```sh
apt install fheroes2 apt install fheroes2
``` ```
These distributions may not provide the latest version of the game due to their release cycle. These distributions may not provide the latest version of the game due to their release cycle.
#### Game resources #### Game resources
@@ -288,13 +305,15 @@ To make the resource package:
game-data-packager heroes2 <path_to_installed_original_game> game-data-packager heroes2 <path_to_installed_original_game>
apt install ./homm2-data_<version>_all.deb apt install ./homm2-data_<version>_all.deb
``` ```
You can get more info about resource packaging by running `game-data-packager heroes2 --help` You can get more info about resource packaging by running `game-data-packager heroes2 --help`
<a name="linux-zip-archive"></a> <a name="linux-zip-archive"></a>
### Linux ZIP archive ### Linux ZIP archive
* Download one of the following Linux ZIP archives:<br> * Download one of the following Linux ZIP archives:
[**Linux x86-64**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_ubuntu_x86-64_SDL2.zip) or<br> [**Linux x86-64**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_ubuntu_x86-64_SDL2.zip) or
[**Linux ARM64**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_ubuntu_arm64_SDL2.zip) [**Linux ARM64**](https://github.com/ihhub/fheroes2/releases/latest/download/fheroes2_ubuntu_arm64_SDL2.zip)
* After downloading the ZIP archive, extract it to a suitable directory of your choice. Then you will need to install the SDL libraries * After downloading the ZIP archive, extract it to a suitable directory of your choice. Then you will need to install the SDL libraries
@@ -321,6 +340,7 @@ You can get more info about resource packaging by running `game-data-packager he
by running the `download_demo_version.sh` script supplied in the ZIP archive. by running the `download_demo_version.sh` script supplied in the ZIP archive.
<a name="android"></a> <a name="android"></a>
## Android ## Android
* Install the fheroes2 app from [**Google Play**](https://play.google.com/store/apps/details?id=org.fheroes2) or download the * Install the fheroes2 app from [**Google Play**](https://play.google.com/store/apps/details?id=org.fheroes2) or download the
@@ -329,6 +349,7 @@ You can get more info about resource packaging by running `game-data-packager he
* Follow the [**instructions**](README_android.md). * Follow the [**instructions**](README_android.md).
<a name="playstation-vita"></a> <a name="playstation-vita"></a>
## PlayStation Vita ## PlayStation Vita
**Please note**: you need to be running custom firmware for it to work. **Please note**: you need to be running custom firmware for it to work.
@@ -338,6 +359,7 @@ You can get more info about resource packaging by running `game-data-packager he
* Follow the [**instructions**](README_PSV.md). * Follow the [**instructions**](README_PSV.md).
<a name="nintendo-switch"></a> <a name="nintendo-switch"></a>
## Nintendo Switch ## Nintendo Switch
**Please note**: you need to be running custom firmware for it to work. **Please note**: you need to be running custom firmware for it to work.
@@ -347,6 +369,7 @@ You can get more info about resource packaging by running `game-data-packager he
* Follow the [**instructions**](README_switch.md). * Follow the [**instructions**](README_switch.md).
<a name="snapshots-latest-builds"></a> <a name="snapshots-latest-builds"></a>
## Snapshots (latest builds) ## Snapshots (latest builds)
You can download the precompiled binaries of the latest commit (snapshot) for You can download the precompiled binaries of the latest commit (snapshot) for
+3 -2
View File
@@ -16,7 +16,8 @@ third-party suppliers which collects sensitive personal information from its use
If you have any questions or concerns about any of the matters in relation to If you have any questions or concerns about any of the matters in relation to
this Privacy Policy then there are several ways of contacting us: this Privacy Policy then there are several ways of contacting us:
- via email to fhomm2@gmail.com
- via Discord at https://discord.gg/xF85vbZ by contacting any of the collaborators * via email to <fhomm2@gmail.com>
* via Discord at <https://discord.gg/xF85vbZ> by contacting any of the collaborators
This Privacy Policy was last updated 04th April 2023. This Privacy Policy was last updated 04th April 2023.
+5 -4
View File
@@ -9,11 +9,12 @@ and user interface improvements), breathing new life into one of the most addict
You can find a complete list of all of our changes and enhancements in [**its own wiki page**](https://github.com/ihhub/fheroes2/wiki/Features-and-enhancements-of-the-project). You can find a complete list of all of our changes and enhancements in [**its own wiki page**](https://github.com/ihhub/fheroes2/wiki/Features-and-enhancements-of-the-project).
<p align="center"> <p align="center">
<img src="images/screenshots/screenshot_world_map.png?raw=true" width="820"> <img src="images/screenshots/screenshot_world_map.png?raw=true" width="820" alt="Screenshot of the world map">
</p> </p>
<p align="center"> <p align="center">
<img src="images/screenshots/screenshot_battle.png?raw=true" width="410"> <img src="images/screenshots/screenshot_castle.png?raw=true" width="410"> <img src="images/screenshots/screenshot_battle.png?raw=true" width="410" alt="Screenshot of the battle screen">
<img src="images/screenshots/screenshot_castle.png?raw=true" width="410" alt="Screenshot of the castle screen">
</p> </p>
## Download and install ## Download and install
@@ -52,8 +53,8 @@ If you would like to help translating the project, please read the [**translatio
## Donation ## Donation
We accept donations via [**Patreon**](https://www.patreon.com/fheroes2), [**PayPal**](https://www.paypal.com/paypalme/fheroes2) or [**Boosty**](https://boosty.to/fheroes2). All donations will be used only for the future project development as we do not We accept donations via [**Patreon**](https://www.patreon.com/fheroes2), [**PayPal**](https://www.paypal.com/paypalme/fheroes2) or [**Boosty**](https://boosty.to/fheroes2).
consider this project as a source of income by any means. All donations will be used only for the future project development as we do not consider this project as a source of income by any means.
[![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg)](https://www.patreon.com/fheroes2) [![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg)](https://www.patreon.com/fheroes2)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2)
+26 -21
View File
@@ -1,6 +1,7 @@
# PlayStation Vita port of [**fheroes2**](README.md) project # PlayStation Vita port of [**fheroes2**](README.md) project
## Install ## Install
Install fheroes2.vpk to your Vita. Install fheroes2.vpk to your Vita.
fheroes2 requires data files from the original Heroes of Might and Magic II. fheroes2 requires data files from the original Heroes of Might and Magic II.
@@ -17,37 +18,41 @@ inside "ux0:data/fheroes2/heroes2/anim/" folder.
is required for proper suspend/resume support (only use one at a time). is required for proper suspend/resume support (only use one at a time).
## Building ## Building
### Prerequisites ### Prerequisites
- VitaSDK
- libSDL2 * VitaSDK
- libSDL2-mixer * libSDL2
* libSDL2-mixer
To build the game just run To build the game just run
```
```sh
make -f Makefile.vita make -f Makefile.vita
``` ```
## Controls ## Controls
- Left analog stick - Pointer movement
- Right analog stick - Map scrolling * Left analog stick - Pointer movement
- × - Left mouse button * Right analog stick - Map scrolling
- ○ - Right mouse button * × - Left mouse button
- □ - End turn * ○ - Right mouse button
- △ - Open spellbook * □ - End turn
- D-Pad left - Next hero * △ - Open spellbook
- D-Pad right - Next castle * D-Pad left - Next hero
- D-Pad down - Re-visit the object that hero stands on * D-Pad right - Next castle
- R1 - Cursor acceleration * D-Pad down - Re-visit the object that hero stands on
- SELECT - System menu * R1 - Cursor acceleration
- START - Enter * SELECT - System menu
* START - Enter
Text input is done with D-Pad. Text input is done with D-Pad.
- Left - Remove character * Left - Remove character
- Right - Add new character * Right - Add new character
- Down - Next character (alphabetically) * Down - Next character (alphabetically)
- Up - Previous character * Up - Previous character
- R1, L1 - Switch current character between uppercase/lowercase * R1, L1 - Switch current character between uppercase/lowercase
## Vita specific options ## Vita specific options
+4 -1
View File
@@ -1,11 +1,12 @@
# Android port of [**fheroes2**](README.md) project # Android port of [**fheroes2**](README.md) project
## Installation ## Installation
Install the fheroes2.apk to your device running Android. You need to have set the necessary permissions on your device to Install the fheroes2.apk to your device running Android. You need to have set the necessary permissions on your device to
do this. do this.
fheroes2 requires the data files from the original Heroes of Might and Magic II. If you do not have the original game you fheroes2 requires the data files from the original Heroes of Might and Magic II. If you do not have the original game you
can download a demo version of the game from https://archive.org/download/HeroesofMightandMagicIITheSuccessionWars_1020/h2demo.zip can download a demo version of the game from <https://archive.org/download/HeroesofMightandMagicIITheSuccessionWars_1020/h2demo.zip>
If you already have a legally purchased copy of the original game, then put the directories "ANIM", "DATA", "MAPS" and "MUSIC" If you already have a legally purchased copy of the original game, then put the directories "ANIM", "DATA", "MAPS" and "MUSIC"
from your original Heroes of Might and Magic II installation into a ZIP archive and copy this archive to your Android device. from your original Heroes of Might and Magic II installation into a ZIP archive and copy this archive to your Android device.
@@ -21,6 +22,7 @@ Depending on your original version of Heroes 2 they can either be found on your
your Heroes 2 installation directory. your Heroes 2 installation directory.
## Controls ## Controls
To simulate a right-click to get info on various items, you need to first touch and keep touching on the item of interest To simulate a right-click to get info on various items, you need to first touch and keep touching on the item of interest
and then touch anywhere else on the screen. While holding the second finger, you can remove the first one from the screen and then touch anywhere else on the screen. While holding the second finger, you can remove the first one from the screen
and keep viewing the information on the item. and keep viewing the information on the item.
@@ -39,6 +41,7 @@ intend to attack from, to the cell occupied by the enemy unit. Next, you should
your planned attack, and then confirm the action by touching the target cell with your finger again. your planned attack, and then confirm the action by touching the target cell with your finger again.
## Android specific notes ## Android specific notes
Fullscreen is enabled by default. To have the info bar with the clock visible you can disable fullscreen mode within the Fullscreen is enabled by default. To have the info bar with the clock visible you can disable fullscreen mode within the
main menu settings under "Graphics". main menu settings under "Graphics".
+5 -5
View File
@@ -1,6 +1,6 @@
Building with CMake # Building with CMake
--------------------------------
### Linux and macOS ## Linux and macOS
[**fheroes2**](README.md) can be built with CMake buildsystem. First, you need to install dependencies. [**fheroes2**](README.md) can be built with CMake buildsystem. First, you need to install dependencies.
For Linux and macOS follow to instructions as described above. For Linux and macOS follow to instructions as described above.
@@ -19,7 +19,7 @@ cmake --build build
After building, executable can be found in `build` directory. After building, executable can be found in `build` directory.
### Windows / Visual Studio ## Windows / Visual Studio
For Windows you'll need Visual Studio 2019 with C++ support and For Windows you'll need Visual Studio 2019 with C++ support and
[vcpkg package manager](https://vcpkg.readthedocs.io/en/latest/) for dependency management. [vcpkg package manager](https://vcpkg.readthedocs.io/en/latest/) for dependency management.
@@ -60,7 +60,7 @@ cmake --build build --config Release
After building, executable can be found in `build\Release` directory. After building, executable can be found in `build\Release` directory.
### Using Demo data ## Using Demo data
CMake project allows to download and install original HoMM II Demo files which used by fheroes2 project. CMake project allows to download and install original HoMM II Demo files which used by fheroes2 project.
To do this please add `-DGET_HOMM2_DEMO=ON` to configuration options. For example: To do this please add `-DGET_HOMM2_DEMO=ON` to configuration options. For example:
+29 -22
View File
@@ -3,14 +3,17 @@
It's a homebrew app, so you need to be running custom firmware for it to work. It's a homebrew app, so you need to be running custom firmware for it to work.
## BUILDING ## BUILDING
You will need to install the [devkitPro](https://devkitpro.org/) toolchain. Make sure to include the following package: You will need to install the [devkitPro](https://devkitpro.org/) toolchain. Make sure to include the following package:
```
```text
libnx switch-sdl2_mixer libnx switch-sdl2_mixer
``` ```
After installation run `make -f Makefile.switch -j 2` command to build the package. After installation run `make -f Makefile.switch -j 2` command to build the package.
## SETUP ## SETUP
You will need a copy of the official game to run this port. You will need a copy of the official game to run this port.
fheroes2 root directory is hardcoded as `/switch/fheroes2`. Put the game files there (specifically `ANIM`, `DATA`, `MAPS` fheroes2 root directory is hardcoded as `/switch/fheroes2`. Put the game files there (specifically `ANIM`, `DATA`, `MAPS`
@@ -20,35 +23,39 @@ this port.
At the end you should have the following directory tree on your SD card: At the end you should have the following directory tree on your SD card:
switch ```text
switch
|
+-- ...
+-- fheroes2 <--- this is the game directory
| |
+-- ... +--- anim <--- HoMM2 game data
+-- fheroes2 <--- this is the game directory +--- data <--- HoMM2 game data
| +--- files <--- Part of fheroes2 release
+--- anim <--- HoMM2 game data +--- maps <--- HoMM2 game data
+--- data <--- HoMM2 game data +--- music <--- HoMM2 game data
+--- files <--- Part of fheroes2 release +--- fheroes2.nro <--- Part of fheroes2 release
+--- maps <--- HoMM2 game data ```
+--- music <--- HoMM2 game data
+--- fheroes2.nro <--- Part of fheroes2 release
Generally, you will need game resources from the localized version of HoMM2 in order to use translations in fheroes2. During Generally, you will need game resources from the localized version of HoMM2 in order to use translations in fheroes2. During
the first run, the game should auto-detect the game data you have and offer to choose a language you'd like to use. English the first run, the game should auto-detect the game data you have and offer to choose a language you'd like to use. English
is always available. is always available.
## RUNNING ## RUNNING
This build of fheroes2 was tested on 12.0.3|AMS M.19.4|S (FAT32). exFAT is not recommended. This build of fheroes2 was tested on 12.0.3|AMS M.19.4|S (FAT32). exFAT is not recommended.
USB mice and keyboards connected via an OTG adapter are supported. USB mice and keyboards connected via an OTG adapter are supported.
Working controls are: Working controls are:
- Touchscreen - emulates mouse, including dragging
- L-stick - move mouse cursor * Touchscreen - emulates mouse, including dragging
- R-stick/D-pad - scroll * L-stick - move mouse cursor
- A - left mouse click * R-stick/D-pad - scroll
- B - Right mouse click * A - left mouse click
- X - Escape * B - Right mouse click
- Y - Enter * X - Escape
- (+) - Cast spell * Y - Enter
- (-) - End turn * (+) - Cast spell
- R - Cycle through towns * (-) - End turn
- L - Cycle through heroes * R - Cycle through towns
* L - Cycle through heroes
+7 -13
View File
@@ -27,7 +27,6 @@ subdirectory of the project source tree. The current instruction is designed for
![Ukrainian](https://img.shields.io/endpoint?url=https://ihhub.github.io/fheroes2/json/lang_uk.json) ![Ukrainian](https://img.shields.io/endpoint?url=https://ihhub.github.io/fheroes2/json/lang_uk.json)
![Vietnamese](https://img.shields.io/endpoint?url=https://ihhub.github.io/fheroes2/json/lang_vi.json) ![Vietnamese](https://img.shields.io/endpoint?url=https://ihhub.github.io/fheroes2/json/lang_vi.json)
## Adding new translations/localizations ## Adding new translations/localizations
If you want to add a new localization, you will first need to add it to the `SupportedLanguage` list/enumeration in the source code. If you want to add a new localization, you will first need to add it to the `SupportedLanguage` list/enumeration in the source code.
@@ -36,26 +35,22 @@ language abbreviations. Then to have font support, you will have to specify what
the language to the font generation code found in `src/fheroes2/gui/ui_font.cpp`. If a compatible font encoding has not currently the language to the font generation code found in `src/fheroes2/gui/ui_font.cpp`. If a compatible font encoding has not currently
been implemented, then code for that will need to be written. been implemented, then code for that will need to be written.
## Editing translations - Before you start ## Editing translations - Before you start
Before starting, you will have to set up the necessary environment: fork the fheroes2 repository and install an application used Before starting, you will have to set up the necessary environment: fork the fheroes2 repository and install an application used
for translating. When you have your own fork of fheroes2 you should create a branch. At this point you can start translating. for translating. When you have your own fork of fheroes2 you should create a branch. At this point you can start translating.
After you finish your work, and you are ready to share it, you will have to prepare a pull request. After you finish your work, and you are ready to share it, you will have to prepare a pull request.
### Forking the fheroes2 repository ### Forking the fheroes2 repository
A fork is your copy of the fheroes2 repository. It gives you a safe environment to prepare and test your changes. A fork is your copy of the fheroes2 repository. It gives you a safe environment to prepare and test your changes.
You can read here how to [**create a fork**](https://docs.github.com/en/get-started/quickstart/fork-a-repo). You can read here how to [**create a fork**](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
### Translation editing software ### Translation editing software
We encourage you to use [**poedit**](https://poedit.net/) or [**gtranslator**](https://wiki.gnome.org/Apps/Gtranslator) to We encourage you to use [**poedit**](https://poedit.net/) or [**gtranslator**](https://wiki.gnome.org/Apps/Gtranslator) to
edit translations. Currently all implemented languages adhere to a standardized font encoding/charset. edit translations. Currently all implemented languages adhere to a standardized font encoding/charset.
## Editing translations - For the first time or again ## Editing translations - For the first time or again
### Syncing your fork ### Syncing your fork
@@ -87,6 +82,7 @@ Once the translation files have been modified, for Linux/MacOS run the `make` co
machine object (MO) binary files which can be used by the fheroes2 engine. machine object (MO) binary files which can be used by the fheroes2 engine.
For example, for the German PO file, `de.po`, the following would be the command: For example, for the German PO file, `de.po`, the following would be the command:
```bash ```bash
make de.mo make de.mo
``` ```
@@ -109,17 +105,16 @@ set to.
For example, for German you will have to set font encoding to CP1252, while for Russian this would be CP1251. Later when submitting For example, for German you will have to set font encoding to CP1252, while for Russian this would be CP1251. Later when submitting
a pull request with your changes, you will have to save the PO file in UTF-8 encoding because this is what Github supports. a pull request with your changes, you will have to save the PO file in UTF-8 encoding because this is what Github supports.
### Sharing your translation work ### Sharing your translation work
When you are satisfied with your work, you can proceed with sharing it. The first step is to commit your work into the branch you made of When you are satisfied with your work, you can proceed with sharing it. The first step is to commit your work into the branch you made of
your own fheroes2 fork. Then, create a pull request that proposes to introduce your changes into the fheroes2 repository. your own fheroes2 fork. Then, create a pull request that proposes to introduce your changes into the fheroes2 repository.
How to [**commit**](https://github.com/git-guides/git-commit). How to [**commit**](https://github.com/git-guides/git-commit).
How to [**create a pull request from your fork**](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). How to [**create a pull request from your fork**](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
The pull request title has to be something human-understandable. This allows the team to quickly identify the purpose of The pull request title has to be something human-understandable. This allows the team to quickly identify the purpose of
your work, I.E. "Update the Slovak translation". your work, I.E. "Update the Slovak translation".
<details> <details>
@@ -141,7 +136,6 @@ example creature names or castle buildings.
</details> </details>
## Updating PO templates and translatable strings in PO files ## Updating PO templates and translatable strings in PO files
Currently all PO files are automatically updated with new strings after each commit that brings changes to the ingame text. If for whatever reason Currently all PO files are automatically updated with new strings after each commit that brings changes to the ingame text. If for whatever reason
@@ -159,4 +153,4 @@ Once the POT file has been created, go to the `files/lang` folder and run the co
make merge make merge
``` ```
If you are using programs mentioned above like POEdit, then they have options to merge new strings from a POT file. If you are using programs mentioned above like POEdit, then they have options to merge new strings from a POT file.
+1 -2
View File
@@ -1,4 +1,3 @@
Scripts # Scripts
======
This directory contains helper scripts needed for installation and compilation of the project. This directory contains helper scripts needed for installation and compilation of the project.
+1 -2
View File
@@ -1,4 +1,3 @@
AGG # AGG
======
This directory contains helper scripts for extracting the contents of AGG files. This directory contains helper scripts for extracting the contents of AGG files.
+1 -2
View File
@@ -1,4 +1,3 @@
Package installation for Android Studio # Package installation for Android Studio
======
Run the `install_packages.bat` or `install_packages.sh` and it will try to install everything at once. Run the `install_packages.bat` or `install_packages.sh` and it will try to install everything at once.
+1 -2
View File
@@ -1,5 +1,4 @@
Demo # Demo
======
This directory contains helper scripts to download and unpack demo version of original game. This directory contains helper scripts to download and unpack demo version of original game.
Downloading pirated or unlicensed version of the game is strictly prohibited by copyright law. Downloading pirated or unlicensed version of the game is strictly prohibited by copyright law.
+1 -2
View File
@@ -1,5 +1,4 @@
HoMM2 # HoMM2
======
This directory contains helper scripts to extract and copy resources from the original Heroes This directory contains helper scripts to extract and copy resources from the original Heroes
of Might and Magic II distribution. of Might and Magic II distribution.
+1 -2
View File
@@ -1,4 +1,3 @@
Linux # Linux
======
This directory contains helper scripts to install SDL. This directory contains helper scripts to install SDL.
+1 -2
View File
@@ -1,4 +1,3 @@
macOS # macOS
======
This directory contains helper scripts to install SDL. This directory contains helper scripts to install SDL.
+1 -2
View File
@@ -1,4 +1,3 @@
Package installation for Visual Studio # Package installation for Visual Studio
======
Run the `install_packages.bat` and it will try to install everything at once. Run the `install_packages.bat` and it will try to install everything at once.