Ignore:
Timestamp:
Aug 22, 2010, 7:52:12 PM (11 years ago)
Author:
sam
Message:

Store the frame number in the Ticker instead of duplicating the information
in each class that uses it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugfps.cpp

    r154 r167  
    2323private:
    2424    int fontid;
    25     int frame;
    2625};
    2726
     
    3534
    3635    data->fontid = Forge::Register("gfx/font/ascii.png");
    37     data->frame = 0;
    3836}
    3937
     
    4745    Entity::TickDraw(deltams);
    4846
    49     data->frame++;
    50 
    5147    char buf[1024];
    5248    Font *font = Forge::GetFont(data->fontid);
    5349
    5450    sprintf(buf, "%2.2f fps (%i)",
    55             1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME), data->frame);
     51            1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     52            Ticker::GetFrameNum());
    5653    font->PrintBold(10, 10, buf);
    5754
Note: See TracChangeset for help on using the changeset viewer.