MACVENTURE: Hack for dynamic object drawing
This commit is contained in:
parent
1540674f77
commit
0fb344dfed
1 changed files with 6 additions and 14 deletions
|
@ -26,9 +26,6 @@
|
|||
#include "macventure/macventure.h"
|
||||
#include "macventure/gui.h"
|
||||
|
||||
//Test
|
||||
#include "common/system.h"
|
||||
|
||||
namespace MacVenture {
|
||||
|
||||
enum MenuAction;
|
||||
|
@ -103,8 +100,10 @@ Gui::~Gui() {
|
|||
|
||||
void Gui::draw() {
|
||||
|
||||
drawWindows();
|
||||
// Will be performance-improved after the milestone
|
||||
_wm.setFullRefresh(true);
|
||||
|
||||
drawWindows();
|
||||
drawTitle();
|
||||
|
||||
_wm.draw();
|
||||
|
@ -225,7 +224,6 @@ void Gui::initGUI() {
|
|||
if (!loadControls())
|
||||
error("Could not load controls");
|
||||
|
||||
|
||||
draw();
|
||||
|
||||
}
|
||||
|
@ -506,6 +504,8 @@ void Gui::drawMainGameWindow() {
|
|||
Graphics::ManagedSurface *srf = _mainGameWindow->getSurface();
|
||||
BorderBounds border = borderBounds(getWindowData(kMainGameWindow).type);
|
||||
|
||||
_mainGameWindow->setDirty(true);
|
||||
|
||||
if (!_assets.contains(3)) {
|
||||
_assets[3] = new ImageAsset(3, _graphics);
|
||||
}
|
||||
|
@ -518,11 +518,6 @@ void Gui::drawMainGameWindow() {
|
|||
|
||||
drawObjectsInWindow(kMainGameWindow, _mainGameWindow->getSurface());
|
||||
|
||||
// To be deleted
|
||||
_wm.draw();
|
||||
|
||||
g_system->updateScreen();
|
||||
|
||||
}
|
||||
|
||||
void Gui::drawSelfWindow() {
|
||||
|
@ -549,11 +544,8 @@ void Gui::drawObjectsInWindow(WindowReference target, Graphics::ManagedSurface *
|
|||
border.topOffset * 2 + pos.y,
|
||||
mode);
|
||||
|
||||
// To be deleted
|
||||
// To be deleted, this is a big hack, but it doesn't work without it.
|
||||
_wm.draw();
|
||||
|
||||
g_system->updateScreen();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue