2013-09-01 16:27:21 +02:00
|
|
|
/*
|
2021-06-22 09:38:23 -04:00
|
|
|
** config.h
|
|
|
|
**
|
|
|
|
** This file is part of mkxp.
|
|
|
|
**
|
2023-10-04 21:07:34 +02:00
|
|
|
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
2021-06-22 09:38:23 -04:00
|
|
|
**
|
|
|
|
** mkxp is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 2 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** mkxp is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-09-01 16:27:21 +02:00
|
|
|
|
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
2021-06-22 18:32:39 -04:00
|
|
|
#include "util/json5pp.hpp"
|
|
|
|
|
2020-02-25 01:00:12 -05:00
|
|
|
#include <set>
|
2013-12-11 20:46:54 +01:00
|
|
|
#include <string>
|
2013-12-26 20:18:33 +01:00
|
|
|
#include <vector>
|
|
|
|
|
2020-02-25 01:00:12 -05:00
|
|
|
struct Config {
|
2021-06-22 18:32:39 -04:00
|
|
|
// Used for sending the JSON data to Ruby as System::CONFIG
|
|
|
|
json5pp::value raw;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
int rgssVersion;
|
|
|
|
|
|
|
|
bool debugMode;
|
2022-01-23 08:21:59 -05:00
|
|
|
bool winConsole;
|
2022-01-16 19:57:50 -05:00
|
|
|
bool preferMetalRenderer;
|
2022-12-12 05:11:31 +00:00
|
|
|
bool displayFPS;
|
2021-06-22 09:38:23 -04:00
|
|
|
bool printFPS;
|
|
|
|
|
|
|
|
bool winResizable;
|
|
|
|
bool fullscreen;
|
|
|
|
bool fixedAspectRatio;
|
|
|
|
bool smoothScaling;
|
2023-05-05 19:39:42 +00:00
|
|
|
bool lanczos3Scaling;
|
2023-05-28 22:03:28 +00:00
|
|
|
bool enableHires;
|
|
|
|
double textureScalingFactor;
|
|
|
|
double framebufferScalingFactor;
|
|
|
|
double atlasScalingFactor;
|
2021-06-22 09:38:23 -04:00
|
|
|
bool vsync;
|
|
|
|
|
|
|
|
int defScreenW;
|
|
|
|
int defScreenH;
|
|
|
|
std::string windowTitle;
|
|
|
|
|
|
|
|
int fixedFramerate;
|
|
|
|
bool frameSkip;
|
|
|
|
bool syncToRefreshrate;
|
|
|
|
|
2023-04-12 20:54:48 -04:00
|
|
|
std::vector<std::string> solidFonts;
|
2021-06-22 09:38:23 -04:00
|
|
|
|
|
|
|
bool subImageFix;
|
|
|
|
bool enableBlitting;
|
|
|
|
int maxTextureSize;
|
|
|
|
|
2022-07-03 06:59:46 -04:00
|
|
|
struct {
|
|
|
|
bool active;
|
|
|
|
bool lastMileScaling;
|
|
|
|
} integerScaling;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
std::string gameFolder;
|
2022-01-23 18:29:08 -05:00
|
|
|
bool manualFolderSelect;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
bool anyAltToggleFS;
|
|
|
|
bool enableReset;
|
2022-07-04 13:06:35 -04:00
|
|
|
bool enableSettings;
|
2021-06-22 09:38:23 -04:00
|
|
|
bool allowSymlinks;
|
|
|
|
bool pathCache;
|
|
|
|
|
|
|
|
std::string dataPathOrg;
|
|
|
|
std::string dataPathApp;
|
|
|
|
|
|
|
|
std::string iconPath;
|
|
|
|
std::string execName;
|
|
|
|
std::string titleLanguage;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
std::string soundFont;
|
|
|
|
bool chorus;
|
|
|
|
bool reverb;
|
|
|
|
} midi;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
int sourceCount;
|
|
|
|
} SE;
|
|
|
|
|
2023-04-23 19:09:38 -04:00
|
|
|
struct {
|
|
|
|
int trackCount;
|
|
|
|
} BGM;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
bool useScriptNames;
|
|
|
|
|
|
|
|
std::string customScript;
|
|
|
|
|
|
|
|
std::vector<std::string> launchArgs;
|
|
|
|
std::vector<std::string> preloadScripts;
|
|
|
|
std::vector<std::string> rtps;
|
|
|
|
|
|
|
|
std::vector<std::string> fontSubs;
|
|
|
|
|
|
|
|
std::vector<std::string> rubyLoadpaths;
|
|
|
|
|
|
|
|
/* Editor flags */
|
|
|
|
struct {
|
|
|
|
bool debug;
|
|
|
|
bool battleTest;
|
|
|
|
} editor;
|
|
|
|
|
|
|
|
/* Game INI contents */
|
|
|
|
struct {
|
|
|
|
std::string scripts;
|
|
|
|
std::string title;
|
|
|
|
} game;
|
|
|
|
|
2023-03-03 13:56:23 +00:00
|
|
|
// MJIT Options
|
2021-06-22 09:38:23 -04:00
|
|
|
struct {
|
|
|
|
bool enabled;
|
|
|
|
int verboseLevel;
|
|
|
|
int maxCache;
|
|
|
|
int minCalls;
|
|
|
|
} jit;
|
|
|
|
|
2023-03-03 13:56:23 +00:00
|
|
|
// YJIT Options
|
|
|
|
struct {
|
|
|
|
bool enabled;
|
|
|
|
} yjit;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
// Keybinding action name mappings
|
2021-01-15 04:49:27 -05:00
|
|
|
struct {
|
|
|
|
std::string a;
|
|
|
|
std::string b;
|
|
|
|
std::string c;
|
|
|
|
|
|
|
|
std::string x;
|
|
|
|
std::string y;
|
|
|
|
std::string z;
|
|
|
|
|
|
|
|
std::string l;
|
|
|
|
std::string r;
|
|
|
|
} kbActionNames;
|
2021-06-22 09:38:23 -04:00
|
|
|
|
2022-07-05 03:16:44 -04:00
|
|
|
std::string userConfPath;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
/* Internal */
|
|
|
|
std::string customDataPath;
|
|
|
|
|
|
|
|
Config();
|
|
|
|
|
2023-04-12 20:54:48 -04:00
|
|
|
bool fontIsSolid(const char *fontName) const;
|
|
|
|
|
2021-06-22 09:38:23 -04:00
|
|
|
void read(int argc, char *argv[]);
|
|
|
|
void readGameINI();
|
2013-09-01 16:27:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONFIG_H
|