I have very little experience in C or C++, so I don’t understand some of the various shortcuts and common tasks in the language.
I’m looking at game code that looks similar to this:
bool
update_frame (void)
{
// Various bits of code
return TRUE;
}
This is the main loop of the game. I’m thinking that it’s similar to something like:
while (true) {
// do stuff
}
Which I would use in C# or Java. Is this what’s going on here?
This code is likely using a game engine. The engine will call
update_frame30/60/X times per second. In between, however, it might perform other tasks.It probably functions as a while(true) loop, though.