diff --git a/.github/workflows/code_style_check.yml b/.github/workflows/code_style_check.yml index af2d548be..0a4866e8a 100644 --- a/.github/workflows/code_style_check.yml +++ b/.github/workflows/code_style_check.yml @@ -32,3 +32,5 @@ jobs: (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 "Please update the date in the LegalCopyright entry!" && false) + - name: Check format of markdown files + uses: DavidAnson/markdownlint-cli2-action@v19 diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 000000000..5e63082dc --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -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" + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b759a424..630c6f46c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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). diff --git a/README.md b/README.md index 6f776bbab..68f8279c7 100644 --- a/README.md +++ b/README.md @@ -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).

- + Screenshot of the world map

- + Screenshot of the battle screen + Screenshot of the castle screen

## Download and install @@ -52,8 +53,8 @@ If you would like to help translating the project, please read the [**translatio ## 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 -consider this project as a source of income by any means. +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 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-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2) diff --git a/cmake/LICENSE.md b/cmake/LICENSE similarity index 100% rename from cmake/LICENSE.md rename to cmake/LICENSE diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index f1ef754e9..0ab9d7e04 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -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. - ### Windows * 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. * Visual Studio will automatically copy game files in the root directory to the build directory. - ### macOS and Linux * 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. * Run the `make` command in the root directory of the project to build it. - ### Android * 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. * Launch Android Studio, open the project in the `android` directory and run the build. - ### 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). - ### 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). - ### Build with CMake If you would like to build the project using CMake please follow the instructions on [**this page**](README_cmake.md). diff --git a/docs/GRAPHICAL_ASSETS.md b/docs/GRAPHICAL_ASSETS.md index b024d4756..5cb8a1996 100644 --- a/docs/GRAPHICAL_ASSETS.md +++ b/docs/GRAPHICAL_ASSETS.md @@ -12,35 +12,35 @@ This guide is designed for Linux, MacOS and Windows users. The source files to t ## Where to get the tools -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)
+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) [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) -[Linux Ubuntu 64-bit](https://github.com/ihhub/fheroes2/releases/download/fheroes2-linux-sdl2_dev/fheroes2_tools_ubuntu_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) [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: -- 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. -- icn2img +* icn2img 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. 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: -- 214, 215, 216, 217 -- 218, 219, 220, 221 -- 231, 232, 233, 234, 235 -- 238, 239, 240, 241 + +* 214, 215, 216, 217 +* 218, 219, 220, 221 +* 231, 232, 233, 234, 235 +* 238, 239, 240, 241 ## How to use the tools to extract the images diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 537a59ff0..59d068a3a 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -16,16 +16,16 @@ Precompiled binaries of the release version are currently available for the foll * [**Windows installer**](#windows-installer) * [**Windows ZIP archive**](#windows-zip-archive) * [**macOS**](#macos) - * [**Homebrew**](#homebrew-mac) + * [**Homebrew**](#homebrew-on-macos) * [**MacPorts**](#macports) * [**macOS ZIP archive**](#macos-zip-archive) * [**macOS native app**](#macos-native-app) * [**Linux**](#linux) - * [**Flatpak**](#flatpak-linux) + * [**Flatpak**](#flatpak) * [**Gentoo**](#gentoo-package) - * [**Homebrew**](#homebrew-linux) + * [**Homebrew**](#homebrew-on-linux) * [**AUR package**](#aur-package) - * [**Debian and Ubuntu**](#debian-package) + * [**Debian and Ubuntu**](#debian-and-ubuntu) * [**Linux ZIP archive**](#linux-zip-archive) * [**Android**](#android) * [**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). + ## Windows + ### Windows installer -* 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
+* 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 [**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. @@ -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. + ### Windows ZIP archive -* 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
+* 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 [**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. @@ -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 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;
+[**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. + ## macOS - -### Homebrew + + +### Homebrew on macOS 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 ``` -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. + ### MacPorts 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. -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. + ### macOS ZIP archive * 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 - 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). * 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. -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. + ### 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): @@ -132,18 +140,19 @@ Follow the [**instructions below**](#macos-resources) to gather resources necess 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. + + - ### 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: -* 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 +* 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 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 how you installed fheroes2: * `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. * 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; * `~/.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. + ## Linux - + + ### Flatpak 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. After the first start you will be asked for the original files. There are three possibilities: + 1. Install GOG version (recommended) 2. Manual install 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. + ### Gentoo package 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. - -### Homebrew + + +### Homebrew on Linux 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. + ### AUR package 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 ``` - + + ### Debian and Ubuntu 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 apt install fheroes2 ``` + These distributions may not provide the latest version of the game due to their release cycle. #### Game resources @@ -288,13 +305,15 @@ To make the resource package: game-data-packager heroes2 apt install ./homm2-data__all.deb ``` + You can get more info about resource packaging by running `game-data-packager heroes2 --help` + ### Linux ZIP archive -* 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
+* 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 [**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 @@ -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. + ## Android * 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). + ## PlayStation Vita **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). + ## Nintendo Switch **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). + ## Snapshots (latest builds) You can download the precompiled binaries of the latest commit (snapshot) for diff --git a/docs/PRIVACY_POLICY.md b/docs/PRIVACY_POLICY.md index b42cf8fd0..6c10e6066 100644 --- a/docs/PRIVACY_POLICY.md +++ b/docs/PRIVACY_POLICY.md @@ -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 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 +* via Discord at by contacting any of the collaborators This Privacy Policy was last updated 04th April 2023. diff --git a/docs/README.md b/docs/README.md index 1275bf9d1..9168bd27f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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).

- + Screenshot of the world map

- + Screenshot of the battle screen + Screenshot of the castle screen

## Download and install @@ -52,8 +53,8 @@ If you would like to help translating the project, please read the [**translatio ## 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 -consider this project as a source of income by any means. +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 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-PayPal-green.svg)](https://www.paypal.com/paypalme/fheroes2) diff --git a/docs/README_PSV.md b/docs/README_PSV.md index 7826d662f..0e0d1eea9 100644 --- a/docs/README_PSV.md +++ b/docs/README_PSV.md @@ -1,6 +1,7 @@ # PlayStation Vita port of [**fheroes2**](README.md) project ## Install + Install fheroes2.vpk to your Vita. 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). ## Building + ### Prerequisites -- VitaSDK -- libSDL2 -- libSDL2-mixer + +* VitaSDK +* libSDL2 +* libSDL2-mixer To build the game just run -``` + +```sh make -f Makefile.vita ``` ## Controls -- Left analog stick - Pointer movement -- Right analog stick - Map scrolling -- × - Left mouse button -- ○ - Right mouse button -- □ - End turn -- △ - Open spellbook -- D-Pad left - Next hero -- D-Pad right - Next castle -- D-Pad down - Re-visit the object that hero stands on -- R1 - Cursor acceleration -- SELECT - System menu -- START - Enter + +* Left analog stick - Pointer movement +* Right analog stick - Map scrolling +* × - Left mouse button +* ○ - Right mouse button +* □ - End turn +* △ - Open spellbook +* D-Pad left - Next hero +* D-Pad right - Next castle +* D-Pad down - Re-visit the object that hero stands on +* R1 - Cursor acceleration +* SELECT - System menu +* START - Enter Text input is done with D-Pad. -- Left - Remove character -- Right - Add new character -- Down - Next character (alphabetically) -- Up - Previous character -- R1, L1 - Switch current character between uppercase/lowercase +* Left - Remove character +* Right - Add new character +* Down - Next character (alphabetically) +* Up - Previous character +* R1, L1 - Switch current character between uppercase/lowercase ## Vita specific options diff --git a/docs/README_android.md b/docs/README_android.md index cc15b1a8c..670a98d03 100644 --- a/docs/README_android.md +++ b/docs/README_android.md @@ -1,11 +1,12 @@ # Android port of [**fheroes2**](README.md) project ## Installation + Install the fheroes2.apk to your device running Android. You need to have set the necessary permissions on your device to 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 -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 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. @@ -21,6 +22,7 @@ Depending on your original version of Heroes 2 they can either be found on your your Heroes 2 installation directory. ## 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 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. @@ -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. ## Android specific notes + 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". diff --git a/docs/README_cmake.md b/docs/README_cmake.md index e871262be..9a1774862 100644 --- a/docs/README_cmake.md +++ b/docs/README_cmake.md @@ -1,6 +1,6 @@ -Building with CMake --------------------------------- -### Linux and macOS +# Building with CMake + +## Linux and macOS [**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. @@ -19,7 +19,7 @@ cmake --build build 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 [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. -### Using Demo data +## Using Demo data 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: diff --git a/docs/README_switch.md b/docs/README_switch.md index f8d174bea..f1500d674 100644 --- a/docs/README_switch.md +++ b/docs/README_switch.md @@ -3,14 +3,17 @@ It's a homebrew app, so you need to be running custom firmware for it to work. ## BUILDING + You will need to install the [devkitPro](https://devkitpro.org/) toolchain. Make sure to include the following package: -``` + +```text libnx switch-sdl2_mixer ``` After installation run `make -f Makefile.switch -j 2` command to build the package. ## SETUP + 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` @@ -20,35 +23,39 @@ this port. At the end you should have the following directory tree on your SD card: - switch +```text +switch + | + +-- ... + +-- fheroes2 <--- this is the game directory | - +-- ... - +-- fheroes2 <--- this is the game directory - | - +--- anim <--- HoMM2 game data - +--- data <--- HoMM2 game data - +--- files <--- Part of fheroes2 release - +--- maps <--- HoMM2 game data - +--- music <--- HoMM2 game data - +--- fheroes2.nro <--- Part of fheroes2 release + +--- anim <--- HoMM2 game data + +--- data <--- HoMM2 game data + +--- files <--- 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 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. ## RUNNING + 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. 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 + +* 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 diff --git a/docs/TRANSLATION.md b/docs/TRANSLATION.md index d802e14e1..7211ad215 100644 --- a/docs/TRANSLATION.md +++ b/docs/TRANSLATION.md @@ -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) ![Vietnamese](https://img.shields.io/endpoint?url=https://ihhub.github.io/fheroes2/json/lang_vi.json) - ## 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. @@ -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 been implemented, then code for that will need to be written. - ## 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 -for translating. When you have your own fork of fheroes2 you should create a branch. At this point you can start translating. +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. After you finish your work, and you are ready to share it, you will have to prepare a pull request. - ### 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. You can read here how to [**create a fork**](https://docs.github.com/en/get-started/quickstart/fork-a-repo). - ### Translation editing software 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. - ## Editing translations - For the first time or again ### 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. For example, for the German PO file, `de.po`, the following would be the command: + ```bash 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 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 -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. -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). -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".
@@ -141,7 +136,6 @@ example creature names or castle buildings.
- ## 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 @@ -159,4 +153,4 @@ Once the POT file has been created, go to the `files/lang` folder and run the co make merge ``` -If you are using programs mentioned above like POEdit, then they have options to merge new strings from a POT file. \ No newline at end of file +If you are using programs mentioned above like POEdit, then they have options to merge new strings from a POT file. diff --git a/script/README.md b/script/README.md index 857cf02a5..c415c37ce 100644 --- a/script/README.md +++ b/script/README.md @@ -1,4 +1,3 @@ -Scripts -====== +# Scripts This directory contains helper scripts needed for installation and compilation of the project. diff --git a/script/agg/README.md b/script/agg/README.md index 507ef7988..7880e68d8 100644 --- a/script/agg/README.md +++ b/script/agg/README.md @@ -1,4 +1,3 @@ -AGG -====== +# AGG This directory contains helper scripts for extracting the contents of AGG files. diff --git a/script/android/README.md b/script/android/README.md index a4aa94ae4..4d712cc57 100644 --- a/script/android/README.md +++ b/script/android/README.md @@ -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. diff --git a/script/demo/README.md b/script/demo/README.md index ff70f75c6..848196991 100644 --- a/script/demo/README.md +++ b/script/demo/README.md @@ -1,5 +1,4 @@ -Demo -====== +# Demo 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. diff --git a/script/homm2/README.md b/script/homm2/README.md index bd358a28c..4ff0861a8 100644 --- a/script/homm2/README.md +++ b/script/homm2/README.md @@ -1,5 +1,4 @@ -HoMM2 -====== +# HoMM2 This directory contains helper scripts to extract and copy resources from the original Heroes of Might and Magic II distribution. diff --git a/script/linux/README.md b/script/linux/README.md index 56e4f64f1..594181588 100644 --- a/script/linux/README.md +++ b/script/linux/README.md @@ -1,4 +1,3 @@ -Linux -====== +# Linux This directory contains helper scripts to install SDL. diff --git a/script/macos/README.md b/script/macos/README.md index 384c31a11..7acc651e7 100644 --- a/script/macos/README.md +++ b/script/macos/README.md @@ -1,4 +1,3 @@ -macOS -====== +# macOS This directory contains helper scripts to install SDL. diff --git a/script/windows/README.md b/script/windows/README.md index f2a139a21..4edf55295 100644 --- a/script/windows/README.md +++ b/script/windows/README.md @@ -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.