@@ -2176,20 +2176,20 @@ ADE_FUNC(resetClip, l_Graphics, NULL, "Resets the clipping region that might hav
21762176 return ADE_RETURN_TRUE;
21772177}
21782178
2179- ADE_FUNC (openMovie, l_Graphics, " string name, boolean looping = false" ,
2179+ ADE_FUNC (openMovie, l_Graphics, " string name, [ boolean looping = false, boolean withAudio = false] " ,
21802180 " Opens the movie with the specified name. If the name has an extension it will be removed. This function will "
21812181 " try all movie formats supported by the engine and use the first that is found." ,
21822182 " movie_player" , " The cutscene player handle or invalid handle if cutscene could not be opened." )
21832183{
21842184 const char * name = nullptr ;
21852185 bool looping = false ;
2186- if (!ade_get_args (L, " s|b" , &name, &looping)) {
2186+ bool with_audio = false ;
2187+ if (!ade_get_args (L, " s|bb" , &name, &looping, &with_audio)) {
21872188 return ade_set_error (L, " o" , l_MoviePlayer.Set (movie_player_h ()));
21882189 }
21892190
2190- // Audio is disabled for scripted movies at the moment
21912191 cutscene::PlaybackProperties props;
2192- props.with_audio = false ;
2192+ props.with_audio = with_audio ;
21932193 props.looping = looping;
21942194
21952195 auto player = cutscene::Player::newPlayer (name, props);
0 commit comments