From 8e411cbcfe4be1075798fe33f3ad2a789f06d165 Mon Sep 17 00:00:00 2001 From: Mook Date: Fri, 30 Oct 2015 08:01:36 -0700 Subject: [PATCH] Graphics: Stub out play_movie Some people are using it to detect the RGSS version. --- binding-mri/graphics-binding.cpp | 17 +++++++++++++++++ src/graphics.cpp | 5 +++++ src/graphics.h | 1 + 3 files changed, 23 insertions(+) diff --git a/binding-mri/graphics-binding.cpp b/binding-mri/graphics-binding.cpp index a585e17..6b39697 100644 --- a/binding-mri/graphics-binding.cpp +++ b/binding-mri/graphics-binding.cpp @@ -183,6 +183,18 @@ RB_METHOD(graphicsReset) 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(FrameCount) DEF_GRA_PROP_I(Brightness) @@ -223,6 +235,11 @@ void graphicsBindingInit() 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( ShowCursor, "show_cursor" ); } diff --git a/src/graphics.cpp b/src/graphics.cpp index 956c4d9..fe51f74 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -957,6 +957,11 @@ void Graphics::resizeScreen(int width, int 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) void Graphics::setBrightness(int value) diff --git a/src/graphics.h b/src/graphics.h index e914178..aa30189 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -54,6 +54,7 @@ public: int width() const; int height() const; void resizeScreen(int width, int height); + void playMovie(const char *filename); void reset();