STARK: Add loading of replacement PNG files for the background images

The replacement PNG files can have larger dimensions when compared to
the original XMG images, enabling the creation of a high resolution mod.

The game looks for the replacement files in the game directory and then
in the xarc subdirectory of the directory containing the archive in
which the xmg picture to be replaced is located. For instance:
'1e/00/xarc/fountain_layercenter.png' should be used for the Venice park
background.
This commit is contained in:
Bastien Bouclet 2019-01-14 20:29:54 +01:00
parent 8b3b309200
commit 45c5cf0c80
13 changed files with 166 additions and 39 deletions

View file

@ -27,6 +27,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
namespace Stark {
@ -296,11 +297,27 @@ static const ADFileBasedFallback fileBasedFallback[] = {
{NULL, {NULL}}
};*/
#define GAMEOPTION_ASSETS_MOD GUIO_GAMEOPTIONS1
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_ASSETS_MOD,
{
_s("Load modded assets"),
_s("Enable loading of external replacement assets."),
"enable_assets_mod",
true
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
class StarkMetaEngine : public AdvancedMetaEngine {
public:
StarkMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), starkGames) {
StarkMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), starkGames, optionsList) {
_singleId = "stark";
_guiOptions = GUIO1(GUIO_NOMIDI);
_guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_ASSETS_MOD);
}
const char *getName() const override {