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

This file contains engine redraw actions routines. More...

#include "redraw.h"
#include "sdlengine.h"
#include "lbaengine.h"
#include "interface.h"
#include "images.h"
#include "grid.h"
#include "scene.h"
#include "actor.h"
#include "hqrdepack.h"
#include "resources.h"
#include "menu.h"

Include dependency graph for redraw.c:

Go to the source code of this file.

Data Structures

struct  RedrawStruct
struct  DrawListStruct

Functions

void add_redraw_current_area (int left, int top, int right, int bottom)
void add_redraw_area (int left, int top, int right, int bottom)
void move_next_areas ()
void flip_redraw_areas ()
void blit_background_areas ()
void sort_drawing_list (DrawListStruct *list, int listSize)
int process_actors_drawlist (int bgRedraw)
void process_drawing (int numDrawingList)
void redraw_engine_actions (int bgRedraw)

Variables

RedrawStruct currentRedrawList [300]
RedrawStruct nextRedrawList [300]
DrawListStruct drawList [150]
int currNumOfRedrawBox
int numOfRedrawBox


Detailed Description

This file contains engine redraw actions 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 redraw.c.


Function Documentation

void add_redraw_area ( int  left,
int  top,
int  right,
int  bottom 
)

Add a certain region to redraw list array

Parameters:
left start width to redraw the region
top start height to redraw the region
right end width to redraw the region
bottom end height to redraw the region

Definition at line 143 of file redraw.c.

References add_redraw_current_area(), RedrawStruct::bottom, currNumOfRedrawBox, RedrawStruct::left, RedrawStruct::right, SCREEN_HEIGHT, SCREEN_TEXTLIMIT_BOTTOM, SCREEN_TEXTLIMIT_RIGHT, SCREEN_WIDTH, and RedrawStruct::top.

Referenced by process_drawing().

void add_redraw_current_area ( int  left,
int  top,
int  right,
int  bottom 
)

Add a certain region to the current redraw list array

Parameters:
left start width to redraw the region
top start height to redraw the region
right end width to redraw the region
bottom end height to redraw the region

Definition at line 79 of file redraw.c.

References RedrawStruct::bottom, RedrawStruct::left, numOfRedrawBox, RedrawStruct::right, SCREEN_TEXTLIMIT_BOTTOM, SCREEN_WIDTH, and RedrawStruct::top.

Referenced by add_redraw_area(), flip_redraw_areas(), and move_next_areas().

void blit_background_areas (  ) 

Blit/Update all screen regions in the currentRedrawList

Definition at line 201 of file redraw.c.

References blit_box(), RedrawStruct::bottom, frontVideoBuffer, RedrawStruct::left, numOfRedrawBox, RedrawStruct::right, RedrawStruct::top, and workVideoBuffer.

Referenced by redraw_engine_actions().

void flip_redraw_areas (  ) 

Flip currentRedrawList regions in the screen

This only updates small areas in the screen so few CPU processor is used

Definition at line 183 of file redraw.c.

References add_redraw_current_area(), copy_block_phys(), currNumOfRedrawBox, and numOfRedrawBox.

Referenced by redraw_engine_actions().

void move_next_areas (  ) 

Move next regions to the current redraw list

Definition at line 168 of file redraw.c.

References add_redraw_current_area(), currNumOfRedrawBox, and numOfRedrawBox.

Referenced by redraw_engine_actions().

int process_actors_drawlist ( int  bgRedraw  ) 

void process_drawing ( int  numDrawingList  ) 

void redraw_engine_actions ( int  bgRedraw  ) 

This is responsible for the entire game screen redraw

Parameters:
bgRedraw true if we want to redraw background grid, false if we want to update certain screen areas

Definition at line 448 of file redraw.c.

References blit_background_areas(), clear_screen(), copy_screen(), cross_fade(), currNumOfRedrawBox, display_zones(), fade_in(), fade_out(), flip(), flip_redraw_areas(), freeze_time(), frontVideoBuffer, move_next_areas(), needChangeScene, paletteRGBA, process_actors_drawlist(), process_drawing(), projPosXScreen, projPosYScreen, redraw_grid(), reset_clip(), skipIntro, sort_drawing_list(), and workVideoBuffer.

Referenced by run_game_engine(), show_game_options(), and show_giveup_menu().

void sort_drawing_list ( DrawListStruct list,
int  listSize 
)

Sort drawing list struct ordered as the first objects appear in the top left corner of the screen

Parameters:
list drawing list variable which contains information of the drawing objects
listSize number of drawing objects in the list

Definition at line 217 of file redraw.c.

Referenced by redraw_engine_actions().


Variable Documentation

Definition at line 50 of file redraw.c.

Current number of redraw regions in the screen

Definition at line 70 of file redraw.c.

Referenced by add_redraw_area(), flip_redraw_areas(), move_next_areas(), and redraw_engine_actions().

Draw list array to grab the necessary

Definition at line 67 of file redraw.c.

Definition at line 51 of file redraw.c.

Number of redraw regions in the screen

Definition at line 72 of file redraw.c.

Referenced by add_redraw_current_area(), blit_background_areas(), flip_redraw_areas(), and move_next_areas().


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