GRAPHICS: Add new overridable updateScreen method to Screen

This commit is contained in:
Paul Gilbert 2018-08-22 21:06:32 -07:00 committed by Paul Gilbert
parent 85d784a03a
commit db92f62b7a
2 changed files with 17 additions and 8 deletions

View file

@ -53,10 +53,14 @@ void Screen::update() {
}
// Signal the physical screen to update
g_system->updateScreen();
updateScreen();
_dirtyRects.clear();
}
void Screen::updateScreen() {
// Update the screen
g_system->updateScreen();
}
void Screen::addDirtyRect(const Common::Rect &r) {
Common::Rect bounds = r;

View file

@ -40,12 +40,12 @@ namespace Graphics {
* areas to the physical screen
*/
class Screen : public ManagedSurface {
private:
protected:
/**
* List of affected areas of the screen
*/
Common::List<Common::Rect> _dirtyRects;
private:
protected:
/**
* Merges together overlapping dirty areas of the screen
*/
@ -55,7 +55,7 @@ private:
* Returns the union of two dirty area rectangles
*/
bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2);
protected:
/**
* Adds a rectangle to the list of modified areas of the screen during the
* current frame
@ -87,6 +87,11 @@ public:
*/
virtual void update();
/**
* Updates the screen at the end of an update call
*/
virtual void updateScreen();
/**
* Return the currently active palette
*/