Skip to content

Commit

Permalink
PINK: removed FPS counter
Browse files Browse the repository at this point in the history
  • Loading branch information
voltya authored and sev- committed Jun 28, 2018
1 parent e2ac931 commit fc57a96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 1 addition & 12 deletions engines/pink/director.cpp
Expand Up @@ -36,27 +36,16 @@ Director::Director()
}

void Director::update() {
static uint32 time = g_system->getMillis();
static uint32 times = 0;

for (uint i = 0; i < _sounds.size(); ++i) {
_sounds[i]->update();
}

for (uint i = 0; i < _sprites.size(); ++i) {
if (_sprites[i]->needsUpdate())
_sprites[i]->update();
}

draw();

times++;
if (g_system->getMillis() - time >= 1000) {
debug("FPS: %u ", times);
sum += times;
count++;
time = g_system->getMillis();
times = 0;
}
}

void Director::addSprite(ActionCEL *sprite) {
Expand Down
4 changes: 1 addition & 3 deletions engines/pink/director.h
Expand Up @@ -64,14 +64,12 @@ class Director {

Graphics::MacWindowManager &getWndManager() { return _wndManager; };

uint32 count = 0;
uint32 sum = 0;

private:
void draw();
void mergeDirtyRects();
void drawRect(const Common::Rect &rect);

private:
Graphics::Screen _surface;
Graphics::MacWindowManager _wndManager;
Common::Array<Common::Rect> _dirtyRects;
Expand Down

0 comments on commit fc57a96

Please sign in to comment.