D:/WorkAround/prequengine/trunk/src/movies.c File Reference

This file contains movies routines. More...

#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"

Include dependency graph for movies.c:

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


Detailed Description

This file contains movies routines.

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 Documentation

#define DELTA_FRAME   5

Draw delta frame opcode

Definition at line 55 of file movies.c.

Referenced by process_frame().

#define FADE   1

Fade frame opcode

Definition at line 49 of file movies.c.

Referenced by process_frame().

#define FLA_EXT   ".fla"

FLA movie extension

Definition at line 40 of file movies.c.

Referenced by play_movie().

#define KEY_FRAME   7

Draw key frame opcode

Definition at line 57 of file movies.c.

Referenced by process_frame().

#define LOAD_PALETTE   0

Load palette frame opcode

Definition at line 47 of file movies.c.

Referenced by process_frame().

#define MOVIES_DIR   "movies//"

Common movie directory

Definition at line 42 of file movies.c.

Referenced by play_movie().

#define MOVIES_EXT   ".avi"

Common movie extension

Definition at line 44 of file movies.c.

Referenced by play_movie().

#define PLAY_SAMPLE   2

Play sample frame opcode

Definition at line 51 of file movies.c.

Referenced by process_frame().

#define STOP_SAMPLE   4

Stop sample frame opcode

Definition at line 53 of file movies.c.

Referenced by process_frame().


Function Documentation

void draw_delta_frame ( unsigned char *  ptr,
int  width 
)

FLA movie draw delta frame

Parameters:
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

Parameters:
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  ) 

void play_movie ( char *  movie  ) 

Generic play movies, according with the settings

Parameters:
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 (  ) 

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().


Variable Documentation

int fadeOut

Auxiliar FLA fade out variable

Definition at line 60 of file movies.c.

Referenced by play_fla_movie(), and process_frame().

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().

Auxiliar scale buffer FLA movie pointer FLA movie header data

Definition at line 75 of file movies.c.

int flaSampleTable[100]

FLA movie sample auxiliar table

Definition at line 65 of file movies.c.

Referenced by play_fla_movie().

FLA movie header data

Definition at line 77 of file movies.c.

Definition at line 79 of file movies.c.

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().


Generated on Thu Sep 18 14:14:48 2008 for Prequengine by  doxygen 1.5.5