Modified line 500 for GameInpInitMacros(). Changed the conditional from checking for directional inputs, to checking if the player number was correct. This prevents the duplicate buttons from being added (ie. 2 P1 Weak Punch macros), while adding in the buttons like coin, start, and select.
We can now define input defaults for any player, any game, together with keyboard/joysticks mapping.
Macros are also supported.
Autofire supported and added a menu to set fire rate.
Also some code optimizations in startup and controllers config.
IMPORTANT NOTE:
This changes folders paths for <romname>.ini, *.fs, *.nv, samples and *.dat (and propably some other I forget to mention).
Some paths were not consistently defined and used. Now support paths are similar to those used in Windows.
Details about what changes:
- hiscore.dat must be placed in ~/.local/share/fbneo/support/hiscores/ (this is also where *.hi will be stored);
- samples *.zip must be placed in ~/.local/share/fbneo/support/samples/
- <romname>.ini, *.fs and *.nv are all stored in ~/.local/share/fbneo/config/games/
- when using "-dat" parameter, the *.dat files will be created in ~/.local/share/fbneo/support/lists/dat/
Other code changes:
- main.cpp was checking fbneo.ini two times, and one of those times was too early (making highscores disabled by default when creating fbneo on first run);
- burner.h was declaring many extern variables already declared in burner.h (and it was causing issues somehow - changing values one place was not reflected elsewhere);
- when loading text files also ignore CR char, not only LF;
- only display help text if not loading a game or menu;
- always show what inputs are assigned to each player when loading a game.
Fixed inputs always being reset to defaults (ignoring custom inputs from <romname>.ini).
Also fixed loading presets when <romname>.ini does not exist.
Note: -joy parameter will always ignore inputs from *.ini and set joystick inputs for all players.
If the -joy parameter is used when a game is launched for the first time, player 1 inputs will be set to joysticks and won't work without -joy after that, because without -joy the keyboard is assigned to player 1.
- Added all the possible combination buttons for all games
- In cps2 system, two buttons for setting volume are shielded (Macro only)
- Solved some games with three buttons, P3 without "fire 3" caused by macro settings error (jurassic99 ...)
// The problem that P5 & P6 macro of xmen6p was pointed to "P1 coin" was solved
- Check box is added for listview in input settings to set auto-fire
- All added macros can be set to auto-fire, which needs to be checked in advance
- When setting auto-fire, there will be a prompt if there is an error
- The text of the information prompt does not use RC resources. It can only be rendered in English for the time being and may be updated in the future
- Create Weak PK, Medium PK, Strong PK macros, Combination keys in the sfa3 series
- Create a SP+WK macro, Quick cancel technique in sf2ce series
[taoenwen]