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

This file contains image processing. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "images.h"
#include "resources.h"
#include "main.h"
#include "sdlengine.h"
#include "music.h"
#include "hqrdepack.h"

Include dependency graph for images.c:

Go to the source code of this file.

Functions

void adeline_logo ()
void load_menu_image ()
void load_image (int index)
void load_image_delay (int index, int time)
void convert_pal_2_RGBA (unsigned char *palSource, unsigned char *palDest)
void fade_in (unsigned char *palette)
void fade_out (unsigned char *palette)
int cross_dot (int modifier, int color, int param, int intensity)
void adjust_palette (unsigned char R, unsigned char G, unsigned char B, unsigned char *palette, int intensity)
void fade_2_black (unsigned char *palette)
void fade_2_pal (unsigned char *palette)
void black_2_white ()
void set_back_pal ()
void copy_screen (unsigned char *source, unsigned char *destination)
void clear_screen ()


Detailed Description

This file contains image processing.

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 images.c.


Function Documentation

void adeline_logo (  ) 

void adjust_palette ( unsigned char  R,
unsigned char  G,
unsigned char  B,
unsigned char *  palette,
int  intensity 
)

Adjust palette intensity

Parameters:
R red component of color
G green component of color
B blue component of color
palette palette to adjust
intensity intensity value to adjust

Definition at line 145 of file images.c.

References cross_dot(), NUMOFCOLORS, and set_palette().

Referenced by fade_2_black(), and fade_2_pal().

void black_2_white (  ) 

Fade black palette to with palette

Definition at line 219 of file images.c.

References NUMOFCOLORS, palette, and set_palette().

void clear_screen (  ) 

Clear front buffer screen

Definition at line 267 of file images.c.

References frontVideoBuffer, SCREEN_HEIGHT, and SCREEN_WIDTH.

Referenced by redraw_engine_actions().

void convert_pal_2_RGBA ( unsigned char *  palSource,
unsigned char *  palDest 
)

Converts in-game palette to SDL palette

Parameters:
palSource palette source with RGB
palDest palette destination with RGBA

Definition at line 90 of file images.c.

References NUMOFCOLORS.

Referenced by adeline_logo(), load_image(), load_image_delay(), load_menu_image(), main_menu(), play_fla_movie(), process_frame(), and toggle_fullscreen().

void copy_screen ( unsigned char *  source,
unsigned char *  destination 
)

Copy a determinate screen buffer to another

Parameters:
source screen buffer
destination screen buffer

Definition at line 247 of file images.c.

References SCALE, SCREEN_HEIGHT, and SCREEN_WIDTH.

Referenced by adeline_logo(), advoptions_menu(), giveup_menu(), load_image(), load_image_delay(), load_menu_image(), main_menu(), options_menu(), play_fla_movie(), process_menu(), redraw_engine_actions(), savemanage_menu(), toggle_fullscreen(), and volume_menu().

int cross_dot ( int  modifier,
int  color,
int  param,
int  intensity 
)

Calculate a new color component according with an intensity

Parameters:
modifier color compenent
color color value
param unknown
intensity intensity value to adjust
Returns:
new color component

Definition at line 132 of file images.c.

Referenced by adjust_palette(), and draw_button_gfx().

void fade_2_black ( unsigned char *  palette  ) 

Fade image to black

Parameters:
palette current palette to fade

Definition at line 184 of file images.c.

References adjust_palette(), fps_cycles(), and palReseted.

Referenced by fade_out(), play_fla_movie(), and process_frame().

void fade_2_pal ( unsigned char *  palette  ) 

Fade image with another palette source

Parameters:
palette current palette to fade

Definition at line 202 of file images.c.

References adjust_palette(), fps_cycles(), palReseted, and set_palette().

Referenced by fade_in(), main_menu(), and play_fla_movie().

void fade_in ( unsigned char *  palette  ) 

Fade image in

Parameters:
palette current palette to fade in

Definition at line 106 of file images.c.

References cfgfile, cross_fade(), ConfigFile::CrossFade, fade_2_pal(), and frontVideoBuffer.

Referenced by adeline_logo(), load_image(), load_image_delay(), load_menu_image(), play_fla_movie(), and redraw_engine_actions().

void fade_out ( unsigned char *  palette  ) 

Fade image out

Parameters:
palette current palette to fade out

Definition at line 116 of file images.c.

References cfgfile, ConfigFile::CrossFade, and fade_2_black().

Referenced by adeline_logo(), load_image_delay(), and redraw_engine_actions().

void load_image ( int  index  ) 

Load and display a particulary image on RESS.HQR file with cross fade effect

Parameters:
index RESS.HQR entry index (starting from 0)

Definition at line 63 of file images.c.

References convert_pal_2_RGBA(), copy_screen(), fade_in(), frontVideoBuffer, hqr_get_entry(), HQR_RESS_FILE, palette, paletteRGBA, set_palette(), and workVideoBuffer.

void load_image_delay ( int  index,
int  time 
)

Load and display a particulary image on RESS.HQR file with cross fade effect and delay

Parameters:
index RESS.HQR entry index (starting from 0)
time number of seconds to delay

Definition at line 76 of file images.c.

References convert_pal_2_RGBA(), copy_screen(), delay(), fade_in(), fade_out(), frontVideoBuffer, hqr_get_entry(), HQR_RESS_FILE, palette, paletteRGBA, and workVideoBuffer.

Referenced by init_engine().

void load_menu_image (  ) 

void set_back_pal (  ) 

Resets both in-game and sdl palettes

Definition at line 234 of file images.c.

References NUMOFCOLORS, palette, paletteRGBA, palReseted, and set_palette().


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