MRI-Binding: Add RGSS3 '__FILE__' variant
This commit is contained in:
parent
711060db8f
commit
f25d2db63c
|
@ -210,6 +210,12 @@ static void runCustomScript(const std::string &filename)
|
||||||
|
|
||||||
VALUE kernelLoadDataInt(const char *filename);
|
VALUE kernelLoadDataInt(const char *filename);
|
||||||
|
|
||||||
|
#ifdef RGSS3
|
||||||
|
#define RGSS_SECTION_STR "{%04ld}"
|
||||||
|
#else
|
||||||
|
#define RGSS_SECTION_STR "Section%03ld"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void runRMXPScripts()
|
static void runRMXPScripts()
|
||||||
{
|
{
|
||||||
const std::string &scriptPack = shState->rtData().config.game.scripts;
|
const std::string &scriptPack = shState->rtData().config.game.scripts;
|
||||||
|
@ -303,7 +309,7 @@ static void runRMXPScripts()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
int len = snprintf(buf, sizeof(buf), "Section%03ld", i);
|
int len = snprintf(buf, sizeof(buf), RGSS_SECTION_STR, i);
|
||||||
fname = newStringUTF8(buf, len);
|
fname = newStringUTF8(buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue