Changeset 227 for trunk/src


Ignore:
Timestamp:
Jan 18, 2011, 5:58:13 PM (11 years ago)
Author:
sam
Message:

Spawn several pieces in Monsterz now that we can.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugfps.cpp

    r221 r227  
    2727
    2828private:
     29    int x, y;
    2930    int fontid;
    3031};
     
    3435 */
    3536
    36 DebugFps::DebugFps()
     37DebugFps::DebugFps(int x, int y)
    3738{
    3839    data = new DebugFpsData();
    3940
    4041    data->fontid = Forge::Register("gfx/font/ascii.png");
     42    data->x = x;
     43    data->y = y;
    4144
    4245    drawgroup = DRAWGROUP_HUD;
     
    5053    Font *font = Forge::GetFont(data->fontid);
    5154
     55    int x = data->x;
     56    int y = data->y;
     57
    5258    sprintf(buf, "%2.2f fps (%i)",
    5359            1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    5460            Ticker::GetFrameNum());
    55     font->PrintBold(10, 10, buf);
     61    font->PrintBold(x, y, buf);
    5662
    5763    sprintf(buf, "Game  % 7.2f % 7.2f",
    5864            Profiler::GetAvg(Profiler::STAT_TICK_GAME),
    5965            Profiler::GetMax(Profiler::STAT_TICK_GAME));
    60     font->PrintBold(10, 34, buf);
     66    font->PrintBold(x, y + 24, buf);
    6167
    6268    sprintf(buf, "Draw  % 7.2f % 7.2f",
    6369            Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
    6470            Profiler::GetMax(Profiler::STAT_TICK_DRAW));
    65     font->PrintBold(10, 50, buf);
     71    font->PrintBold(x, y + 40, buf);
    6672
    6773    sprintf(buf, "Blit  % 7.2f % 7.2f",
    6874            Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
    6975            Profiler::GetMax(Profiler::STAT_TICK_BLIT));
    70     font->PrintBold(10, 66, buf);
     76    font->PrintBold(x, y + 56, buf);
    7177
    7278    sprintf(buf, "Frame % 7.2f % 7.2f",
    7379            Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    7480            Profiler::GetMax(Profiler::STAT_TICK_FRAME));
    75     font->PrintBold(10, 82, buf);
     81    font->PrintBold(x, y + 72, buf);
    7682}
    7783
  • trunk/src/debugfps.h

    r221 r227  
    2424{
    2525public:
    26     DebugFps();
     26    DebugFps(int x, int y);
    2727    virtual ~DebugFps();
    2828
Note: See TracChangeset for help on using the changeset viewer.