Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F628015
main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
585 B
Referenced Files
None
Subscribers
None
main.cpp
View Options
//#include <iostream>
#include
"SDL.h"
#include
"Game.h"
int
main
(
int
argc
,
char
*
argv
[])
{
int
FPS
=
60
,
frameDelay
=
1000
/
FPS
;
Uint32
frameStart
;
int
frameTime
;
Game
game
(
false
,
1.5
);
while
(
game
.
running
())
{
if
(
game
.
gameData
.
FPS
!=
FPS
)
{
FPS
=
game
.
gameData
.
FPS
;
frameDelay
=
1000
/
FPS
;
}
frameStart
=
SDL_GetTicks
();
game
.
update
();
frameTime
=
SDL_GetTicks
()
-
frameStart
;
if
(
frameDelay
>
frameTime
)
{
SDL_Delay
(
frameDelay
-
frameTime
);
}
}
return
0
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 3:09 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
138512
Default Alt Text
main.cpp (585 B)
Attached To
Mode
R74 BloonsTD
Attached
Detach File
Event Timeline