Solarus merge requestshttps://gitlab.com/solarus-games/solarus/-/merge_requests2024-03-19T21:13:38Zhttps://gitlab.com/solarus-games/solarus/-/merge_requests/1452get_xx_binding searches in multiple bindings2024-03-19T21:13:38Zstd::gregwarget_xx_binding searches in multiple bindingsAdresses the possibilty of `get_{keyboard, joypad}_binding` returning nil even if there are key/buttons bound to the queried command.Adresses the possibilty of `get_{keyboard, joypad}_binding` returning nil even if there are key/buttons bound to the queried command.https://gitlab.com/solarus-games/solarus/-/merge_requests/1430Adding event hero:on_life_changed2023-02-27T14:02:24ZTwilCynderAdding event hero:on_life_changedAdding the event "on_life_changed" to the Hero entity, triggered whenever the life of a hero changes.Adding the event "on_life_changed" to the Hero entity, triggered whenever the life of a hero changes.https://gitlab.com/solarus-games/solarus/-/merge_requests/1424Draft: Refactor `QuestFiles` implementation to address PhysFS deprecations2023-05-09T16:42:10ZHugo HromicDraft: Refactor `QuestFiles` implementation to address PhysFS deprecationsWhile working on MR !1422 I realised that the `QuestFiles` namespace has some technical debt as described in the commits of this MR.
In summary, I refactored the namespace to get rid of (almost) all those annoying PhysFS deprecation war...While working on MR !1422 I realised that the `QuestFiles` namespace has some technical debt as described in the commits of this MR.
In summary, I refactored the namespace to get rid of (almost) all those annoying PhysFS deprecation warnings during building Solarus. In addition, I clarified the platform notation to use for files/directories in all methods of `QuestFiles` and also ensured that methods use the correct directory separator where relevant, i.e. when platform-dependant notation is used.
I also decoupled initialization code regarding the base and engine write directories to make the code more readable and flexible.Solarus 2.0Hugo HromicHugo Hromichttps://gitlab.com/solarus-games/solarus/-/merge_requests/1422Draft: Add support for loading optional Game Controller Database file2022-09-27T23:09:24ZHugo HromicDraft: Add support for loading optional Game Controller Database fileThis simple MR adds support to optionally load a Game Controller Database file for joypads.
The new SDL GameController API input interface requires devices to have known controller mappings. SDL2 provides an embedded database of recogni...This simple MR adds support to optionally load a Game Controller Database file for joypads.
The new SDL GameController API input interface requires devices to have known controller mappings. SDL2 provides an embedded database of recognised controllers in its [own source code](https://github.com/libsdl-org/SDL/blob/main/src/joystick/SDL_gamecontrollerdb.h), however this database is rather small and focused on very well-known controllers only.
SDL can read more mappings from a database file using the `SDL_GAMECONTROLLERCONFIG_FILE` hint environment variable. However, this trivial MR improves game controller quality of life by implementing support for loading an optional default game controller database file without having to set said env variable necessarily. If a `gamecontrollerdb.txt` file exists in the current directory, then game controller mappings will be loaded from it as well.
SDL officially endorses the community-sourced database in here: https://github.com/gabomdq/SDL_GameControllerDB
This community database has many more controllers mapped and ready to use than the stock mappings in SDL. As an exaple, my 8BitDo N30 Pro controller is not recognised by Solarus with the default embedded database in SDL, but is mapped in the community database above. With this MR, and when I place the above database file in the current directory, Solarus recognises my controller out of the box without any further configuration. In other words, this community databae greatly improves controller compatibility.
We could even bundle copies of this community file on each release for a truly out of the box experience with controllers.
In addition, more "power" users can also create their own custom controller mappings using readily available tools (see the above community repository).
I also added logging to report detected joypads on startup, so is easier to identify what Solarus is detecting as controllers. Example:
```
[Solarus] [0] Info: Solarus 1.7.0 (f80a33757)
[Solarus] [0] Info: Opening quest 'solarus-1.7-controls-test/data/'
[Solarus] [0] Info: Loaded Game Controller Database file: gamecontrollerdb.txt
[Solarus] [0] Info: Connected to audio device 'OpenAL Soft on Speakers (High Definition Audio Device)'
[Solarus] [0] Info: Number of available Game Controller mappings: 758
[Solarus] [0] Info: Joypad added: 8BitDo N30 Pro (03000000c82d00000190000000000000)
[Solarus] [0] Info: Legacy joypad support enabled: true
[Solarus] [0] Info: SDL: 2.24.0
[Solarus] [0] Info: Using modern GL Shaders
...
```Solarus 2.0Hugo HromicHugo Hromichttps://gitlab.com/solarus-games/solarus/-/merge_requests/1418Draft: New launcher2023-11-12T17:27:40ZOlivier CléroDraft: New launcherIn this branch, some modifications have been done to support the [new launcher](https://gitlab.com/solarus-games/solarus-launcher):
- The QtWidgets-based launcher has been removed (`SolarusGui` and the `gui` directory have been removed) ...In this branch, some modifications have been done to support the [new launcher](https://gitlab.com/solarus-games/solarus-launcher):
- The QtWidgets-based launcher has been removed (`SolarusGui` and the `gui` directory have been removed) because the new launcher uses QtQuick.
- **NB:** The removed QtWidgets files should be instead moved to the quest editor repository (done in [this MR](https://gitlab.com/solarus-games/solarus-quest-editor/-/merge_requests/436)).
- New quest properties have been added:
- `languages` (list)
- `initial_release_date` (date as string, YYYMMDD)
- `license` (string)
- `min_players` (integer)
- `max_players` (integer)
- `genre` (string)Solarus 2.0Olivier CléroOlivier Cléro