#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "movies.h"
#include "images.h"
#include "sdlengine.h"
#include "main.h"
#include "sound.h"
#include "filereader.h"
Go to the source code of this file.
Defines | |
| #define | FLA_EXT ".fla" |
| #define | MOVIES_DIR "movies//" |
| #define | MOVIES_EXT ".avi" |
| #define | LOAD_PALETTE 0 |
| #define | FADE 1 |
| #define | PLAY_SAMPLE 2 |
| #define | STOP_SAMPLE 4 |
| #define | DELTA_FRAME 5 |
| #define | KEY_FRAME 7 |
Functions | |
| void | draw_key_frame (unsigned char *ptr, int width, int height) |
| void | draw_delta_frame (unsigned char *ptr, int width) |
| void | scale_fla_2x () |
| void | process_frame () |
| void | play_fla_movie (char *filename) |
| void | play_movie (char *movie) |
Variables | |
| int | fadeOut |
| int | fadeOutFrames |
| int | flaSampleTable [100] |
| int | samplesInFla |
| unsigned char * | workVideoBufferCopy |
| FLAHeaderStruct | flaHeaderData |
| FLAFrameDataStruct | frameData |
| filereader | frFla |
Prequengine: a Little Big Adventure engine
Copyright (C) 2008 Prequengine team
Copyright (C) 2002-2007 The TwinEngine team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition in file movies.c.
| #define DELTA_FRAME 5 |
| #define FADE 1 |
| #define FLA_EXT ".fla" |
| #define KEY_FRAME 7 |
| #define LOAD_PALETTE 0 |
| #define MOVIES_DIR "movies//" |
| #define MOVIES_EXT ".avi" |
| #define PLAY_SAMPLE 2 |
| #define STOP_SAMPLE 4 |
| void draw_delta_frame | ( | unsigned char * | ptr, | |
| int | width | |||
| ) |
FLA movie draw delta frame
| ptr | FLA frame buffer pointer | |
| width | FLA movie width |
Definition at line 129 of file movies.c.
References flaBuffer.
Referenced by process_frame().
| void draw_key_frame | ( | unsigned char * | ptr, | |
| int | width, | |||
| int | height | |||
| ) |
FLA movie draw key frame
| ptr | FLA frame buffer pointer | |
| width | FLA movie width | |
| height | FLA movie height |
Definition at line 85 of file movies.c.
References flaBuffer.
Referenced by process_frame().
| void play_fla_movie | ( | char * | filename | ) |
Play FLA movies
| filname | FLA movie file name |
Definition at line 317 of file movies.c.
References cfgfile, convert_pal_2_RGBA(), copy_screen(), cross_fade(), ConfigFile::CrossFade, ConfigFile::Debug, fade_2_black(), fade_2_pal(), fade_in(), fadeOut, fadeOutFrames, flaSampleTable, flip(), fps_cycles(), frontVideoBuffer, fropen(), frread(), FLAHeaderStruct::numOfFrames, palette, paletteRGBA, process_frame(), read_keys(), samplesInFla, scale_fla_2x(), set_palette(), skipIntro, FLAHeaderStruct::speed, stop_sample(), FLAHeaderStruct::var1, FLAHeaderStruct::version, workVideoBuffer, workVideoBufferCopy, FLAHeaderStruct::xsize, and FLAHeaderStruct::ysize.
Referenced by play_movie().
| void play_movie | ( | char * | movie | ) |
Generic play movies, according with the settings
| movie | - movie file path |
Definition at line 420 of file movies.c.
References cfgfile, FLA_DIR, FLA_EXT, MOVIES_DIR, MOVIES_EXT, play_fla_movie(), and ConfigFile::UseAVI.
Referenced by init_engine().
| void process_frame | ( | ) |
FLA movie process frame
Definition at line 234 of file movies.c.
References convert_pal_2_RGBA(), DELTA_FRAME, draw_delta_frame(), draw_key_frame(), FLAFrameDataStruct::dummy, FADE, fade_2_black(), fadeOut, fadeOutFrames, FLASCREEN_HEIGHT, FLASCREEN_WIDTH, FLAFrameDataStruct::frameVar0, FLASampleStruct::freq, frread(), KEY_FRAME, LOAD_PALETTE, palette, paletteRGBA, play_fla_sample(), PLAY_SAMPLE, FLASampleStruct::repeat, sample, FLASampleStruct::sampleNum, stop_sample(), STOP_SAMPLE, FLAFrameDataStruct::videoSize, workVideoBufferCopy, FLASampleStruct::x, and FLASampleStruct::y.
Referenced by play_fla_movie().
| void scale_fla_2x | ( | ) |
Scale FLA movie 2 times
According with the settins we can put the original aspect radio stretch to fullscreen or preserve it and use top and button black bars
Definition at line 183 of file movies.c.
References cfgfile, flaBuffer, FLASCREEN_HEIGHT, FLASCREEN_WIDTH, ConfigFile::FLAwide, SCALE, SCREEN_WIDTH, and workVideoBuffer.
Referenced by play_fla_movie().
| int fadeOut |
Auxiliar FLA fade out variable
Definition at line 60 of file movies.c.
Referenced by play_fla_movie(), and process_frame().
| int fadeOutFrames |
Auxiliar FLA fade out variable to count frames between the fade
Definition at line 62 of file movies.c.
Referenced by play_fla_movie(), and process_frame().
| int flaSampleTable[100] |
FLA movie sample auxiliar table
Definition at line 65 of file movies.c.
Referenced by play_fla_movie().
| int samplesInFla |
Number of samples in FLA movie
Definition at line 67 of file movies.c.
Referenced by play_fla_movie().
| unsigned char* workVideoBufferCopy |
Auxiliar work video buffer
Definition at line 69 of file movies.c.
Referenced by play_fla_movie(), and process_frame().
1.5.5