MRI: add $RGSS_SCRIPTS

This commit is contained in:
cremno 2014-04-09 22:36:56 +02:00
parent 96d2707edb
commit 804a697c03
1 changed files with 4 additions and 0 deletions

View File

@ -210,6 +210,8 @@ static void runRMXPScripts()
return; return;
} }
rb_gv_set("$RGSS_SCRIPTS", scriptArray);
long scriptCount = RARRAY_LEN(scriptArray); long scriptCount = RARRAY_LEN(scriptArray);
std::string decodeBuffer; std::string decodeBuffer;
@ -259,6 +261,8 @@ static void runRMXPScripts()
break; break;
} }
rb_ary_store(script, 3, rb_str_new_cstr(decodeBuffer.c_str()));
/* Store encoding header + the decoded script /* Store encoding header + the decoded script
* in 'sc.decData' */ * in 'sc.decData' */
std::string decData = "#encoding:utf-8\n"; std::string decData = "#encoding:utf-8\n";