Ignore:
Timestamp:
Feb 8, 2011, 12:32:03 AM (11 years ago)
Author:
sam
Message:

The most recent interface layout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugfps.cpp

    r294 r427  
    3737  : data(new DebugFpsData())
    3838{
     39#if 0
    3940    for (int i = 0; i < 5; i ++)
    4041    {
     
    4344        Ticker::Ref(data->lines[i]);
    4445    }
     46#else
     47    data->lines[0] = new Text(NULL, "gfx/font/ascii.png");
     48    data->lines[0]->SetPos(int3(x, y, 0));
     49    Ticker::Ref(data->lines[0]);
     50#endif
    4551}
    4652
     
    5157    char buf[1024];
    5258
     59#if 0
    5360    sprintf(buf, "%2.2f fps (%i)",
    5461            1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     
    7582            Profiler::GetMax(Profiler::STAT_TICK_FRAME));
    7683    data->lines[4]->SetText(buf);
     84#else
     85    sprintf(buf, "%2.2f/%2.2f/%2.2f/%2.2f %2.2f fps (%i)",
     86            Profiler::GetAvg(Profiler::STAT_TICK_GAME),
     87            Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
     88            Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
     89            Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     90            1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     91            Ticker::GetFrameNum());
     92    data->lines[0]->SetText(buf);
     93#endif
    7794}
    7895
    7996DebugFps::~DebugFps()
    8097{
     98#if 0
    8199    for (int i = 0; i < 5; i ++)
    82100        Ticker::Unref(data->lines[i]);
     101#else
     102    Ticker::Unref(data->lines[0]);
     103#endif
    83104    delete data;
    84105}
Note: See TracChangeset for help on using the changeset viewer.