Changeset 427
- Timestamp:
- Feb 8, 2011, 12:32:03 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/monsterz/monsterz.cpp
r332 r427 63 63 new SdlInput(); 64 64 new Interface(); 65 new DebugFps( 460, 20);65 new DebugFps(20, 20); 66 66 67 67 while (!Ticker::Finished()) -
trunk/monsterz/thumbs.cpp
r348 r427 71 71 for (int n = 0; n < data->npieces; n++) 72 72 { 73 int2 p = int2(4 44, 380- 28 * n);73 int2 p = int2(459, 372 - 28 * n); 74 74 Scene::GetDefault()->AddTile((data->icons << 16) | n, p.x, p.y, 11, 0); 75 75 } … … 86 86 data->text[n] = new Text(NULL, "monsterz/gfx/font1.png"); 87 87 Ticker::Ref(data->text[n]); 88 int3 p = int3(4 76, 383- 28 * n, 1);88 int3 p = int3(492, 374 - 28 * n, 1); 89 89 data->text[n]->SetPos(p); 90 90 } -
trunk/src/debugfps.cpp
r294 r427 37 37 : data(new DebugFpsData()) 38 38 { 39 #if 0 39 40 for (int i = 0; i < 5; i ++) 40 41 { … … 43 44 Ticker::Ref(data->lines[i]); 44 45 } 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 45 51 } 46 52 … … 51 57 char buf[1024]; 52 58 59 #if 0 53 60 sprintf(buf, "%2.2f fps (%i)", 54 61 1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME), … … 75 82 Profiler::GetMax(Profiler::STAT_TICK_FRAME)); 76 83 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 77 94 } 78 95 79 96 DebugFps::~DebugFps() 80 97 { 98 #if 0 81 99 for (int i = 0; i < 5; i ++) 82 100 Ticker::Unref(data->lines[i]); 101 #else 102 Ticker::Unref(data->lines[0]); 103 #endif 83 104 delete data; 84 105 }
Note: See TracChangeset
for help on using the changeset viewer.