/*! Play the video file @name M:play */ int lua_video_play(lua_State *L) { Video *s = Glue<Video>::checkto(L, 1); if(s) { s->play(); } else { luaL_error(L, "Video.play: invalid arguments"); } return 0; }
Scheme_Object *video_play(int argc, Scheme_Object **argv) { MZ_GC_DECL_REG(1); MZ_GC_VAR_IN_REG(0, argv); MZ_GC_REG(); if (!SCHEME_NUMBERP(argv[0])) scheme_wrong_type("video-play", "number", 0, argc, argv); Video *v = find_video("video-play", argv[0]); if (v != NULL) v->play(); MZ_GC_UNREG(); return scheme_void; }
void Scene::loadCutscene(const char* fileName) { _cutsceneTexture = new Texture; _cutscene.setResource(config.path(kPathResources, fileName, kObjectVideo).c_str()); videoManager.requestVideo(&_cutscene); if (_cutscene.isLoaded()) { _cutscene.play(); DGFrame* frame = _cutscene.currentFrame(); _cutsceneTexture->loadRawData(frame->data, frame->width, frame->height); _isCutsceneLoaded = true; } }