I think (at least the title implies) that you wonder how it is possible to specify true
and bool
in C, yes?
ANSI C (C89/C90) does not provide a special data type for booleans; boolean functionality is expressed using integers, where 0 stands for "false" and everything else is interpreted as "true".
C99 provides "built-in support", though, by defining appropriate macros as you can see in this answer.
So, either the code you are looking at is using C99 (check whether the header is included somewhere) or bool
is a typedef macro, so look out whether there's a
typedef int bool;
or something similar to be found in the code. The mere fact that it says "return TRUE" would imply the latter, since TRUE
is very common in ANSI C and most often defined as
#define TRUE 1
So again you may look out for that.
As to your other question what that function might do, it could be implemented similar to a "game loop"/while(true) loop, like this:
while (update_frame()) { /* render current state to screen */
/* do game logic */
}