# PlayStation Vita port of [fheroes2](https://github.com/ihhub/fheroes2) project
### Vita support was merged into upstream, so [fheroes2 release page](https://github.com/ihhub/fheroes2/releases) is probably the best place to get the latest version. I'm keeping this repo just as a playground for new stuff and latest fixes.
## Install
Install fheroes2.vpk to your Vita.
fheroes2 requires data files from the original Heroes of Might and Magic II.
Copy HEROES2.AGG and HEROES2X.AGG (if you own Price of Loyalty expansion) from the original games "DATA" folder into "ux0:data/fheroes2/data" and everything from "MAPS" folder into "ux0:data/fheroes2/maps".
Music files in OGG format (from GoG release of the game) should be placed into the "ux0:data/fheroes2/music/" folder.
fheroes2 supports ingame cinematics. To play into and/or other videos, make sure that all of "*.SMK" files are placed inside "ux0:data/fheroes2/heroes2/anim/" folder.
[rePatch reDux0](https://github.com/dots-tb/rePatch-reDux0) OR [FdFix](https://github.com/TheOfficialFloW/FdFix) plugin is required for proper suspend/resume support (only use one at a time).
## Building
### Prerequisites
- VitaSDK
- libSDL2
- libSDL2-mixer (optional)
- libSDL2-image (optional)
To build the game just run
```
make -f Makefile.vita
```
## Controls
- Left analog stick - Pointer movement
- × - Left mouse button
- ○ - Right mouse button
- D-Pad / Right analog stick - Map scrolling
- 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
## Vita specific options
Pointer movement speed can be changed with 'gamepad_pointer_speed' parameter in "ux0:data/fheroes2/fheroes2.cfg".
Use "fullscreen = on" option to scale game area to native Vita resolution or "fullscreen = off" to keep the game area at the center of the screen.
Native resolution is supported (set "videomode = 960x544" option in config file or just click on the left door in main menu and select resolution manually).
fheroes2
======
[](https://github.com/ihhub/fheroes2/releases) [](https://discord.gg/xF85vbZ) [](https://www.facebook.com/groups/fheroes2) [](https://vk.com/fheroes2) [](https://www.patreon.com/fheroes2)
Free implementation of **Heroes of Might and Magic II** game engine.
<p align="center">
<img src="files/images/screenshots/screenshot_world_map.png?raw=true" width="410"> <img src="files/images/screenshots/screenshot_castle.png?raw=true" width="410">
</p>
<p align="center">
<img src="files/images/screenshots/screenshot_battle.png?raw=true" width="512">
</p>
Download
---------------------------
You can download a compiled version of the game for your operating system at [**Github releases**](https://github.com/ihhub/fheroes2/releases) of this project.
Copyright
---------------------------
All rights for the original game and its resources belong to former The 3DO Company. These rights were transferred to Ubisoft. We do not encourage and do not support any form of illegal usage of the original game. We strongly advise to purchase the original game on [**GOG**](https://www.gog.com) or [**Ubisoft Store**](https://store.ubi.com) platforms. Alternatively, you can download a free demo version of the game.
Requirements
---------------------------
You are required to have at least a demo version of Heroes of Might and Magic 2 game to be able to play it. Please use one of our scripts to download the demo version of the original game. A script comes with the compiled game.
### Mac OS
Please go to `script/macos` and run **install_sdl_1.sh** or **install_sdl_2.sh** file. For MacOS we highly recommend to use SDL 2 as latest versions of MacOS do not fully support SDL 1.
### Debian-based
Please go to `script/linux` directory and run **install_sdl_1.sh** or **install_sdl_2.sh** file.
### Arch
For Arch based Linux distributions use the command `sudo pacman -S sdl sdl_mixer`.
### RedHat-based
RPM based distributions like Fedora/Red Hat use the commands `sudo yum install SDL*` or `sudo dnf install SDL*`.
### OpenSUSE
openSUSE supports the One-Click-Install via `SDL_mixer.ymp` file in `script/linux`.
### Gentoo
If you have Gentoo, in addition to basic distribution you need to run following command `emerge --ask media-libs/sdl2-mixer media-libs/sdl2-ttf`.
Compilation
---------------------------
[](https://travis-ci.org/ihhub/fheroes2) [](https://ci.appveyor.com/project/ihhub/fheroes2) [](https://github.com/ihhub/fheroes2/actions)
[](https://sonarcloud.io/dashboard?id=ihhub_fheroes2) [](https://sonarcloud.io/dashboard?id=ihhub_fheroes2) [](https://sonarcloud.io/dashboard?id=ihhub_fheroes2) [](https://sonarcloud.io/dashboard?id=ihhub_fheroes2) [](https://sonarcloud.io/dashboard?id=ihhub_fheroes2) [](https://lgtm.com/projects/g/ihhub/fheroes2/context:cpp) [](https://lgtm.com/projects/g/ihhub/fheroes2/alerts/)
Please follow below instructions to be able to compile the project:
Windows
------------------------
- **Optional step**: Install **7-zip** archiver at its default location as `C:\Program Files\7-Zip\7z.exe` or otherwise, you will need to manually extract each downloaded package (follow the instructions shown by batch scripts mentioned below).
- open `script/windows` directory and run **install_packages.bat** file. It installs necessary packages for Visual Studio build.
- open `script/demo` directory and run **demo_windows.bat** file. It downloads a demo version of the game which is needed for minimum development.
- open **fheroes2-vs2015.vcxproj** or **fheroes2-vs2019.vcxproj** file depending on your Visual Studio and compile the project.
MacOS and Linux
-------------------
- open `script/macos` or `script/linux` directory depending on your OS and run **install_sdl_2.sh** (default setup) or **install_sdl_1.sh** file. For MacOS we do not recommend to run SDL 1 as latest versions of MacOS do not support it fully.
- open `script/demo` directory and run **demo_macos.sh** or **demo_linux.sh** file depending on your OS. It downloads a demo version of the game which is needed for minimum development.
- run `make` command in root directory of the project. For SDL 1 compilation please run `export FHEROES2_SDL1="ON"` command before compiling the project.
Contribution
---------------------------
We welcome and appreciate any help, even if it is a tiny text or code change. Please read [contribution](https://github.com/ihhub/fheroes2/blob/master/CONTRIBUTING.md) page before starting work on a pull request.
Not sure what to start with? Feel free to refer to [good first issue](https://github.com/ihhub/fheroes2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) or [help wanted](https://github.com/ihhub/fheroes2/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) tags.
License
---------------------------
This project is under GNU General Public License v2.0. Please refer to file [**LICENSE**](https://github.com/ihhub/fheroes2/blob/master/LICENSE) for more details.
The original project had been developed at [sourceforge](https://sourceforge.net/projects/fheroes2/).
Donation
---------------------------
We accept donations via **Patreon** or **PayPal**. 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.
[](https://www.patreon.com/fheroes2) [](https://www.paypal.com/paypalme/fheroes2)