NANCY: Clean up graphics loop
Removed some leftovers from an older version of the graphics manager and made the drawing code only loop once through all render objects instead of twice.
This commit is contained in:
parent
b3d06c327e
commit
a16c9b90ae
1 changed files with 2 additions and 8 deletions
|
@ -47,6 +47,7 @@ void GraphicsManager::init() {
|
|||
initGraphics(640, 480, &screenPixelFormat);
|
||||
_screen.create(640, 480, screenPixelFormat);
|
||||
_screen.setTransparentColor(getTransColor());
|
||||
_screen.clear();
|
||||
|
||||
Common::SeekableReadStream *ob = NanEngine.getBootChunkStream("OB0");
|
||||
ob->seek(0);
|
||||
|
@ -57,17 +58,10 @@ void GraphicsManager::init() {
|
|||
}
|
||||
|
||||
void GraphicsManager::draw() {
|
||||
// First go through all objects and update them
|
||||
// Then add dirty rects to layers below if transparent
|
||||
for (auto it : _objects) {
|
||||
RenderObject ¤t = *it;
|
||||
|
||||
current.updateGraphics();
|
||||
}
|
||||
|
||||
Common::Array<Common::Rect> drawn;
|
||||
|
||||
for (auto it : _objects) {
|
||||
RenderObject ¤t = *it;
|
||||
|
||||
if (current._isVisible && current._needsRedraw) {
|
||||
// object is visible and updated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue