Changeset 427


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

The most recent interface layout.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/monsterz.cpp

    r332 r427  
    6363    new SdlInput();
    6464    new Interface();
    65     new DebugFps(460, 20);
     65    new DebugFps(20, 20);
    6666
    6767    while (!Ticker::Finished())
  • trunk/monsterz/thumbs.cpp

    r348 r427  
    7171    for (int n = 0; n < data->npieces; n++)
    7272    {
    73         int2 p = int2(444, 380 - 28 * n);
     73        int2 p = int2(459, 372 - 28 * n);
    7474        Scene::GetDefault()->AddTile((data->icons << 16) | n, p.x, p.y, 11, 0);
    7575    }
     
    8686        data->text[n] = new Text(NULL, "monsterz/gfx/font1.png");
    8787        Ticker::Ref(data->text[n]);
    88         int3 p = int3(476, 383 - 28 * n, 1);
     88        int3 p = int3(492, 374 - 28 * n, 1);
    8989        data->text[n]->SetPos(p);
    9090    }
  • 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.