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
|
// Signal the physical screen to update
|
||||||
g_system->updateScreen();
|
updateScreen();
|
||||||
_dirtyRects.clear();
|
_dirtyRects.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Screen::updateScreen() {
|
||||||
|
// Update the screen
|
||||||
|
g_system->updateScreen();
|
||||||
|
}
|
||||||
|
|
||||||
void Screen::addDirtyRect(const Common::Rect &r) {
|
void Screen::addDirtyRect(const Common::Rect &r) {
|
||||||
Common::Rect bounds = r;
|
Common::Rect bounds = r;
|
||||||
|
|
|
@ -40,22 +40,22 @@ namespace Graphics {
|
||||||
* areas to the physical screen
|
* areas to the physical screen
|
||||||
*/
|
*/
|
||||||
class Screen : public ManagedSurface {
|
class Screen : public ManagedSurface {
|
||||||
private:
|
protected:
|
||||||
/**
|
/**
|
||||||
* List of affected areas of the screen
|
* List of affected areas of the screen
|
||||||
*/
|
*/
|
||||||
Common::List<Common::Rect> _dirtyRects;
|
Common::List<Common::Rect> _dirtyRects;
|
||||||
private:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Merges together overlapping dirty areas of the screen
|
* Merges together overlapping dirty areas of the screen
|
||||||
*/
|
*/
|
||||||
void mergeDirtyRects();
|
void mergeDirtyRects();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the union of two dirty area rectangles
|
* Returns the union of two dirty area rectangles
|
||||||
*/
|
*/
|
||||||
bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2);
|
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
|
* Adds a rectangle to the list of modified areas of the screen during the
|
||||||
* current frame
|
* current frame
|
||||||
|
@ -87,6 +87,11 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the screen at the end of an update call
|
||||||
|
*/
|
||||||
|
virtual void updateScreen();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the currently active palette
|
* Return the currently active palette
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue