diff --git a/binding/filesystem-binding.cpp b/binding/filesystem-binding.cpp index 6297b4b8..b5263c82 100644 --- a/binding/filesystem-binding.cpp +++ b/binding/filesystem-binding.cpp @@ -137,7 +137,7 @@ RB_METHOD(fileIntPos) { VALUE kernelLoadDataInt(const char *filename, bool rubyExc, bool raw) { - rb_gc_start(); + //rb_gc_start(); VALUE port = fileIntForPath(filename, rubyExc); VALUE result; @@ -168,18 +168,7 @@ RB_METHOD(kernelLoadData) { if (raw != Qnil && raw != Qtrue && raw != Qfalse) { rb_raise(rb_eTypeError, "load_data: second argument must be Boolean"); } - - if (!shState->config().encryptedGraphics) { - VALUE isGraphicsFile = rb_funcall(filename, rb_intern("start_with?"), 1, - rb_str_new2("Graphics")); - - if (isGraphicsFile == Qtrue) { - VALUE f = rb_file_open_str(filename, "rb"); - VALUE ret = rb_funcall(f, rb_intern("read"), 0); - rb_funcall(f, rb_intern("close"), 0); - return ret; - } - } + return kernelLoadDataInt(RSTRING_PTR(filename), true, RTEST(raw)); } diff --git a/mkxp.json b/mkxp.json index f3b9281d..0417e94c 100644 --- a/mkxp.json +++ b/mkxp.json @@ -220,18 +220,6 @@ // // "pathCache": true, - // Whether to load graphics files from the game's .rgssad - // and any RTP locations, or places mounted with System.mount - // - // Disabling this can speed up old versions of Essentials - // *massively*, and even current versions by a large amount. - // Applies to any sort of RTP or archive, not just RGSS - // archives. - // (default: true) - // - // "encryptedGraphics": true, - - // Add 'rtp1', 'rtp2.zip' and 'game.rgssad' to the // asset search path (multiple allowed) // (default: none) diff --git a/src/config.cpp b/src/config.cpp index 5035f17e..ceef9340 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -205,7 +205,6 @@ try { exp } catch (...) {} SET_OPT_CUSTOMKEY(SE.sourceCount, SESourceCount, integer); SET_STRINGOPT(customScript, customScript); SET_OPT(pathCache, boolean); - SET_OPT(encryptedGraphics, boolean); SET_OPT(useScriptNames, boolean); SET_OPT_CUSTOMKEY(jit.enabled, JITEnable, boolean); SET_OPT_CUSTOMKEY(jit.verboseLevel, JITVerboseLevel, integer); diff --git a/src/config.h b/src/config.h index a0549350..11eb91a0 100644 --- a/src/config.h +++ b/src/config.h @@ -57,7 +57,6 @@ struct Config { bool enableReset; bool allowSymlinks; bool pathCache; - bool encryptedGraphics; std::string dataPathOrg; std::string dataPathApp; diff --git a/src/filesystem/filesystem.cpp b/src/filesystem/filesystem.cpp index 58d228b7..0e5e8c66 100644 --- a/src/filesystem/filesystem.cpp +++ b/src/filesystem/filesystem.cpp @@ -658,6 +658,7 @@ void FileSystem::openReadRaw(SDL_RWops &ops, const char *filename, throw Exception(Exception::NoFileError, "%s", filename); initReadOps(handle, ops, freeOnClose); + return; } // RGSS normalizes paths for at least audio