TrustedUser
2,147
edits
(Added note about testbed) |
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=") |
||
Line 24: | Line 24: | ||
==== Example of minimal main() ==== | ==== Example of minimal main() ==== | ||
< | <syntaxhighlight lang="cpp">int main(int argc, char *argv[]) { | ||
g_system = new OSystem_Foobar(); | g_system = new OSystem_Foobar(); | ||
assert(g_system); | assert(g_system); | ||
Line 52: | Line 52: | ||
If you are writing a backend for such a system, you may use code like this: | If you are writing a backend for such a system, you may use code like this: | ||
< | <syntaxhighlight lang="cpp">void updateScreen() { | ||
uint32 newTime = getMillis(); | uint32 newTime = getMillis(); | ||
if (newTime - _oldTime < 1000 / MAX_FPS) | if (newTime - _oldTime < 1000 / MAX_FPS) |