add global function rgss_stop #59

Merged
cremno merged 1 commits from mri-add-global-function-rgss_stop into master 2014-08-29 20:15:31 +00:00
1 changed files with 13 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "filesystem.h" #include "filesystem.h"
#include "util.h" #include "util.h"
#include "debugwriter.h" #include "debugwriter.h"
#include "graphics.h"
#include <ruby.h> #include <ruby.h>
#include <ruby/encoding.h> #include <ruby/encoding.h>
@ -75,6 +76,7 @@ RB_METHOD(mriDataDirectory);
RB_METHOD(mkxpPuts); RB_METHOD(mkxpPuts);
RB_METHOD(mriRgssMain); RB_METHOD(mriRgssMain);
RB_METHOD(mriRgssStop);
RB_METHOD(_kernelCaller); RB_METHOD(_kernelCaller);
static void mriBindingInit() static void mriBindingInit()
@ -107,6 +109,7 @@ static void mriBindingInit()
if (rgssVer >= 3) if (rgssVer >= 3)
{ {
_rb_define_module_function(rb_mKernel, "rgss_main", mriRgssMain); _rb_define_module_function(rb_mKernel, "rgss_main", mriRgssMain);
_rb_define_module_function(rb_mKernel, "rgss_stop", mriRgssStop);
_rb_define_module_function(rb_mKernel, "msgbox", mriPrint); _rb_define_module_function(rb_mKernel, "msgbox", mriPrint);
_rb_define_module_function(rb_mKernel, "msgbox_p", mriP); _rb_define_module_function(rb_mKernel, "msgbox_p", mriP);
@ -217,6 +220,16 @@ RB_METHOD(mriRgssMain)
return Qnil; return Qnil;
} }
RB_METHOD(mriRgssStop)
{
RB_UNUSED_PARAM;
while (true)
shState->graphics().update();
return Qnil;
}
RB_METHOD(_kernelCaller) RB_METHOD(_kernelCaller)
{ {
RB_UNUSED_PARAM; RB_UNUSED_PARAM;