Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// Game start
- path_movie = "movie.dll"
- lib_movie_init = external_define(path_movie, "movie_init", dll_cdecl, ty_real, 0)
- lib_movie_set = external_define(path_movie, "movie_set", dll_cdecl, ty_real, 5, ty_real, ty_real, ty_real, ty_real, ty_real)
- lib_movie_start = external_define(path_movie, "movie_start", dll_cdecl, ty_real, 2, ty_string, ty_string)
- lib_movie_audio_file_decode = external_define(path_movie, "movie_audio_file_decode", dll_cdecl, ty_real, 2, ty_string, ty_string)
- lib_movie_audio_file_add = external_define(path_movie, "movie_audio_file_add", dll_cdecl, ty_real, 1, ty_string)
- lib_movie_audio_sound_add = external_define(path_movie, "movie_audio_sound_add", dll_cdecl, ty_real, 5, ty_real, ty_real, ty_real, ty_real, ty_real)
- lib_movie_frame = external_define(path_movie, "movie_frame", dll_cdecl, ty_real, 1, ty_string)
- lib_movie_done = external_define(path_movie, "movie_done", dll_cdecl, ty_real, 0)
- /// movie_set(width, height, bitrate, framerate, audio)
- /// Sets the movie properties, sets the width and height of the movie.
- /// bitrate defines the quality, a good value is 2500000
- /// framerate is the number of frames per second, 24 is a good start
- /// audio is whether to include audio in the output
- return external_call(lib_movie_set, argument0, argument1, argument2, argument3, argument4)
- /// movie_start(filename, format)
- /// Starts writing a movie file into the given filename.
- /// format defines the codec/format. Accepted values are mp4, mov or wmv.
- return external_call(lib_movie_start, argument0, argument1)
- /// movie_audio_file_add(filename)
- /// Loads a file of raw audio into memory. Returns its ID.
- return external_call(lib_movie_audio_file_add, argument0)
- /// movie_audio_file_decode(source, dest)
- /// Decodes a sound file into raw format.
- return external_call(lib_movie_audio_file_decode, argument0, argument1)
- /// movie_audio_sound_add(file, play, volume, start, end)
- /// Adds a sound to the movie from a audio file ID (as returned by movie_audio_file_add).
- /// play is the amount of seconds in the movie to play the sound.
- /// volume from 0-1.
- /// start is the offset in the audio file to start playing (0 to start at the beginning).
- /// end is the offset from the end of the audio file to stop playing (0 to stop at the end).
- return external_call(lib_movie_audio_sound_add, argument0, argument1, argument2, argument3, argument4)
- /// movie_frame(filename)
- /// Adds a single frame from a file of raw pixels. This can be generated using buffer_get_surface().
- return external_call(lib_movie_frame, argument0)
- /// movie_done()
- /// Finishes the movie file.
- return external_call(lib_movie_done)
- /// Example use
- movie_set(...)
- movie_start(...)
- foreach audio file
- movie_audio_file_decode(...)
- id = movie_audio_file_add(...)
- foreach sound effect
- movie_audio_sound_add(audio file id, ...)
- foreach frame
- generate frame...
- export frame...
- movie_frame(...)
- movie_done()
Advertisement
Add Comment
Please, Sign In to add comment