diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index 5c888ba..9492c1b 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -163,13 +163,23 @@ static void mriBindingInit() { spriteBindingInit(); viewportBindingInit(); planeBindingInit(); - + if (rgssVer == 1) { windowBindingInit(); - tilemapBindingInit(); } else { windowVXBindingInit(); + } + + if (shState->config().tilemapVersion == 1) { + tilemapBindingInit(); + } else if (shState->config().tilemapVersion == 2) { tilemapVXBindingInit(); + } else { + if (rgssVer == 1) { + tilemapBindingInit(); + } else { + tilemapVXBindingInit(); + } } inputBindingInit(); diff --git a/mkxp.json b/mkxp.json index 91c31c3..7e6ba61 100644 --- a/mkxp.json +++ b/mkxp.json @@ -531,6 +531,15 @@ // }, + // Use alternate tilemap class independent of RGSS version. + // 0: Match RGSS version + // 1: XP + // 2: VX/Ace + // (default: 0) + // + // "tilemapVersion": 0 + + // Dump tile atlas (for debugging purposes) // (default: false) // diff --git a/src/config.cpp b/src/config.cpp index cdd7a29..d0053cc 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -197,6 +197,7 @@ void Config::read(int argc, char *argv[]) { {"JITMaxCache", 100}, {"JITMinCalls", 10000}, {"YJITEnable", false}, + {"tilemapVersion", 0}, {"dumpAtlas", false}, {"bindingNames", json::object({ {"a", "A"}, @@ -314,6 +315,7 @@ try { exp } catch (...) {} SET_OPT_CUSTOMKEY(BGM.trackCount, BGMTrackCount, integer); SET_STRINGOPT(customScript, customScript); SET_OPT(useScriptNames, boolean); + SET_OPT(tilemapVersion, integer); SET_OPT(dumpAtlas, boolean); fillStringVec(opts["preloadScript"], preloadScripts); diff --git a/src/config.h b/src/config.h index b3e0cae..1276f93 100644 --- a/src/config.h +++ b/src/config.h @@ -146,6 +146,7 @@ struct Config { bool enabled; } yjit; + int tilemapVersion; bool dumpAtlas; // Keybinding action name mappings