UpdateList_t Struct Reference
[Render System]

Contains a list of rectangles that must be updated. More...


Data Fields

Uint32 area [2]
 The area on the screen that must be redrawn.
Uint8 currState
 The index of the current render state.
Sint8 dirty
 Tracks the dirty status.
Uint16 length
 The number of rectangles that each list in rects can contain.
Uint8 nextState
 The index of the next render state.
Uint16 numRects [2]
 The number of rectangles needing an update in each of the lists.
SDL_Rect * rects [2]
 Lists of rectangles that need to be redrawn.
Bool renderAll
 Flags the need to render everything.
Uint8 totalStates
 The total number of states presently supported.


Detailed Description

Contains a list of rectangles that must be updated.

The list holds changes for the current frame, and if double buffering is used, for the next frame.

For internal use only.

Author:
Jeff Jackowski

Definition at line 50 of file render.c.


Field Documentation

Uint32 UpdateList_t::area[2]

The area on the screen that must be redrawn.

When this value passes a threshold, the entire frame will be rendered in hopes that will provide better performance than figuring out the minimum to be redrawn.

Todo:
Use this, or remove it.

Definition at line 74 of file render.c.

Uint8 UpdateList_t::currState

The index of the current render state.

Valid only in reference to this struct.

Definition at line 97 of file render.c.

Referenced by AddToUpdateLists(), ClearRenderItem(), and FindNextCollision().

Sint8 UpdateList_t::dirty

Tracks the dirty status.

This was originally a flag, but needed to become an integer to properly handle multiple display states. The value is equal to the number of states that need to be updated. If the value is greater than zero, Render() will render a frame and decrement the value. To flag the display as dirty, set the value to totalStates.

Definition at line 92 of file render.c.

Referenced by ClearRenderItem(), ForceDirtyFrame(), ForceRenderAll(), and PlaceRenderItem().

Uint16 UpdateList_t::length

The number of rectangles that each list in rects can contain.

Definition at line 84 of file render.c.

Referenced by RenderUninit().

Uint8 UpdateList_t::nextState

The index of the next render state.

Valid only in reference to this struct.

Definition at line 102 of file render.c.

Uint16 UpdateList_t::numRects[2]

The number of rectangles needing an update in each of the lists.

After a state has been rendered, the corresponding value here will be set to zero.

Definition at line 80 of file render.c.

Referenced by AddToUpdateLists(), ClearRenderItem(), FindNextCollision(), and RenderUninit().

SDL_Rect* UpdateList_t::rects[2]

Lists of rectangles that need to be redrawn.

After a state has been rendered, the rectangles in the corresponding list will remain but will be overwritten rather than reused.

If two updated items are in overlapping rectangular regions and the area of the overlap is less than the area of the rect containing both overlapping rects minus the area of the overlapping rects plus the area of the overlap, then both overlapping rects will be in the update list. Otherwise, one larger rect containing both overlapping rects will be in the list.

Todo:
Explain the overlapping rects situation better.
Todo:
This may need companion data to indicate the rect is for an opaque item

Definition at line 67 of file render.c.

Referenced by AddToUpdateLists(), ClearRenderItem(), FindNextCollision(), and RenderUninit().

Bool UpdateList_t::renderAll

Flags the need to render everything.

This disregards previous display states, skipping logic used to determine a subset that needs to be redrawn. With this flag set, Render() will decrement dirty, and if it is zero, this flag will be cleared.

Definition at line 114 of file render.c.

Referenced by ForceRenderAll(), PlaceRenderItem(), Render(), and RenderWillRenderAll().

Uint8 UpdateList_t::totalStates

The total number of states presently supported.

This value can be less than BACK_STATES depending on how the renderer is initalized.

Definition at line 107 of file render.c.

Referenced by AddToUpdateLists(), ClearRenderItem(), ForceDirtyFrame(), ForceRenderAll(), PlaceRenderItem(), Render(), and RenderUninit().


The documentation for this struct was generated from the following file:
Generated on Mon May 28 04:41:44 2007 for Retro Tank Super Attack by  doxygen 1.5.2