Graphics: Stub out play_movie

Some people are using it to detect the RGSS version.
This commit is contained in:
Mook 2015-10-30 08:01:36 -07:00
parent 7bf6eca362
commit 8e411cbcfe
3 changed files with 23 additions and 0 deletions

View File

@ -183,6 +183,18 @@ RB_METHOD(graphicsReset)
return Qnil; return Qnil;
} }
RB_METHOD(graphicsPlayMovie)
{
RB_UNUSED_PARAM;
const char *filename;
rb_get_args(argc, argv, "z", &filename RB_ARG_END);
shState->graphics().playMovie(filename);
return Qnil;
}
DEF_GRA_PROP_I(FrameRate) DEF_GRA_PROP_I(FrameRate)
DEF_GRA_PROP_I(FrameCount) DEF_GRA_PROP_I(FrameCount)
DEF_GRA_PROP_I(Brightness) DEF_GRA_PROP_I(Brightness)
@ -223,6 +235,11 @@ void graphicsBindingInit()
INIT_GRA_PROP_BIND( Brightness, "brightness" ); INIT_GRA_PROP_BIND( Brightness, "brightness" );
} }
if (rgssVer >= 3)
{
_rb_define_module_function(module, "play_movie", graphicsPlayMovie);
}
INIT_GRA_PROP_BIND( Fullscreen, "fullscreen" ); INIT_GRA_PROP_BIND( Fullscreen, "fullscreen" );
INIT_GRA_PROP_BIND( ShowCursor, "show_cursor" ); INIT_GRA_PROP_BIND( ShowCursor, "show_cursor" );
} }

View File

@ -957,6 +957,11 @@ void Graphics::resizeScreen(int width, int height)
shState->eThread().requestWindowResize(width, height); shState->eThread().requestWindowResize(width, height);
} }
void Graphics::playMovie(const char *filename)
{
Debug() << "Graphics.playMovie(" << filename << ") not implemented";
}
DEF_ATTR_RD_SIMPLE(Graphics, Brightness, int, p->brightness) DEF_ATTR_RD_SIMPLE(Graphics, Brightness, int, p->brightness)
void Graphics::setBrightness(int value) void Graphics::setBrightness(int value)

View File

@ -54,6 +54,7 @@ public:
int width() const; int width() const;
int height() const; int height() const;
void resizeScreen(int width, int height); void resizeScreen(int width, int height);
void playMovie(const char *filename);
void reset(); void reset();