Merged the new frame rate system into dev-char
This commit is contained in:
+8
-1
@@ -34,6 +34,7 @@ InWorld::InWorld() {
|
||||
cout << "entering InWorld" << endl;
|
||||
#endif
|
||||
cout << "Client Index: " << infoMgr->GetClientIndex() << endl;
|
||||
font.SetSurface(surfaceMgr->Get("font"));
|
||||
pc.GetSprite()->SetSurface(surfaceMgr->Get("elliot"), 32, 48);
|
||||
}
|
||||
|
||||
@@ -61,7 +62,13 @@ void InWorld::FrameEnd() {
|
||||
}
|
||||
|
||||
void InWorld::Render(SDL_Surface* const screen) {
|
||||
ClockFrameRate();
|
||||
|
||||
pc.DrawTo(screen);
|
||||
|
||||
//since we're using this twice, make a tmp var
|
||||
string fps = itos(GetFrameRate());
|
||||
font.DrawStringTo(fps, screen, screen->w - fps.size() * font.GetCharW(), 0);
|
||||
}
|
||||
|
||||
//-------------------------
|
||||
@@ -198,4 +205,4 @@ void InWorld::HandleDisconnection(::Disconnect& disconnect) {
|
||||
Disconnect();
|
||||
SetNextScene(SceneList::MAINMENU);
|
||||
cout << "You have been disconnected" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user