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. |
The list holds changes for the current frame, and if double buffering is used, for the next frame.
For internal use only.
Definition at line 50 of file render.c.
Uint32 UpdateList_t::area[2] |
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 |
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.
Definition at line 67 of file render.c.
Referenced by AddToUpdateLists(), ClearRenderItem(), FindNextCollision(), and RenderUninit().
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().
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().