diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index 39d62d21..70ef8d7e 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -160,13 +160,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 3430db82..ec3fea1a 100644 --- a/mkxp.json +++ b/mkxp.json @@ -522,6 +522,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 6d89d8e5..2e82984d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -196,6 +196,7 @@ void Config::read(int argc, char *argv[]) { {"JITMaxCache", 100}, {"JITMinCalls", 10000}, {"YJITEnable", false}, + {"tilemapVersion", 0}, {"dumpAtlas", false}, {"bindingNames", json::object({ {"a", "A"}, @@ -313,6 +314,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 74605773..dd79fcbb 100644 --- a/src/config.h +++ b/src/config.h @@ -145,6 +145,7 @@ struct Config { bool enabled; } yjit; + int tilemapVersion; bool dumpAtlas; // Keybinding action name mappings