add global function rgss_stop
It's only useful for testing code. Also RGSS3's rgss_stop (and rgss_main) is written in Ruby and not in C++. But I doubt someone relies on that.
This commit is contained in:
parent
6d414c0777
commit
4920931d33
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue