mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-03-28 14:56:22 +01:00
Speed up load_data & remove encryptedGraphics setting
This commit is contained in:
parent
4e40910dfb
commit
7ea0f01ade
5 changed files with 3 additions and 27 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
12
mkxp.json
12
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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -57,7 +57,6 @@ struct Config {
|
|||
bool enableReset;
|
||||
bool allowSymlinks;
|
||||
bool pathCache;
|
||||
bool encryptedGraphics;
|
||||
|
||||
std::string dataPathOrg;
|
||||
std::string dataPathApp;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue