#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"
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 |
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.
| void add_redraw_area | ( | int | left, | |
| int | top, | |||
| int | right, | |||
| int | bottom | |||
| ) |
Add a certain region to redraw list array
| 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
| 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 | ) |
Process what objects must the drawn in the screen
| bgRedraw | true if we want to redraw background grid, false if we want to update certain screen areas |
Definition at line 240 of file redraw.c.
References StaticFlagsStruct::bDoesntCastShadow, StaticFlagsStruct::bIsBackgrounded, StaticFlagsStruct::bIsHidden, StaticFlagsStruct::bIsSpriteActor, DynamicFlagsStruct::bIsVisible, StaticFlagsStruct::bUsesClipping, cameraX, cameraY, cameraZ, cellingGridIdx, cfgfile, ActorStruct::dinamicFlags, ActorStruct::entity, DrawListStruct::field_A, DrawListStruct::index, ActorStruct::lastX, ActorStruct::lastZ, DrawListStruct::posValue, project_position_on_screen(), projPosX, projPosY, sceneActors, sceneNumActors, sceneZones, ConfigFile::ShadowMode, shadowX, shadowY, shadowZ, ActorStruct::standOn, ActorStruct::staticFlags, useCellingGrid, DrawListStruct::X, ActorStruct::X, DrawListStruct::Y, ActorStruct::Y, DrawListStruct::Z, and ActorStruct::Z.
Referenced by redraw_engine_actions().
| void process_drawing | ( | int | numDrawingList | ) |
Process object drawing on screen
Objects like 3D actors, sprite actors, extra bonus and shadows
| numDrawingList | number of drawing actors in the current screen |
Definition at line 346 of file redraw.c.
References add_redraw_area(), DynamicFlagsStruct::bIsVisible, ActorStruct::boudingBox, StaticFlagsStruct::bUsesClipping, cameraX, cameraY, cameraZ, ActorStruct::dinamicFlags, draw_over_sprite_actor(), draw_sprite(), ActorStruct::entity, ActorStruct::field_3, get_sprite_size(), DrawListStruct::index, ActorStruct::info0, ActorStruct::info1, ActorStruct::info2, ActorStruct::info3, ActorStruct::lastX, ActorStruct::lastY, ActorStruct::lastZ, project_position_on_screen(), projPosX, projPosXScreen, projPosY, projPosYScreen, renderBottom, renderLeft, renderRight, renderTop, reset_clip(), sceneActors, set_clip(), spriteBoundingBoxPtr, spriteTable, ActorStruct::staticFlags, textWindowBottom, textWindowLeft, textWindowRight, textWindowTop, ZVPoint::topRight, ZVBox::X, ActorStruct::X, ActorStruct::Y, ZVBox::Z, and ActorStruct::Z.
Referenced by redraw_engine_actions().
| void redraw_engine_actions | ( | int | bgRedraw | ) |
This is responsible for the entire game screen redraw
| 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
| 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().
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().
| DrawListStruct drawList[150] |
| int numOfRedrawBox |
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().
1.5.5