GRAPHICS: Add new overridable updateScreen method to Screen
This commit is contained in:
parent
85d784a03a
commit
db92f62b7a
2 changed files with 17 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue