wesnoth/source_lists
Tommy 3dbf212f8c Add a draw manager, to manage drawing to the screen
There is a new global interface draw_manager which handles drawing,
and a new abstract base class top_level_drawable (TLD) to indicate
that an object is something that has a place on the screen and should
be drawn.

Basic usage is fairly straightforward. Top-level objects (such as
windows) inherit from top_level_drawable. They must implement the
functions layout(), screen_location(), and expose().

layout() should ensure that screen location and animations are current.
screen_location() should return the current draw location on screen.
expose() should do the actual drawing.

The draw manager keeps track of what regions of the screen, if any,
need to be redrawn. Regions must be invalidated by calling
invalidate_region(rect). This can be done at any time other than during
expose(). It must not be called during expose().

The draw manager has one main callable function, sparkle(). This may
be renamed at some point. It manages calling the TLD functions on all
TLDs in the correct order. It also manages loop delay and vsync.

The standard game loop now becomes:
1. events::pump()
2. draw_manager::sparkle()
2022-07-13 13:34:01 +12:00
..
2022-07-06 20:11:11 -05:00
lua
2022-03-09 15:01:37 -06:00