IN BIG LUMPS
//==================
// main - start here
//------------------
Here Begins the program
int main(void) {
Set up a value to splat stuff into for timing
int i;
Splat State flag into the Function GMLIB to tell it to set up
(have a look at the code its obvious enough what is happening)
gmlib(GMLIB_INIT);
Decide if we are a kindle with a 4bit or 8bit display and the use the right method
if (ppb-1) { gmplay4(); } else { gmplay8(); }
Continue to do awesome video stuff until...
Get total elapsed time - put it into "i" (tag on a frame count) Print it
i=getmsec()/100; printf("%d frames in %0.1f secs = %2.1f FPS\n",
fc,(double)i/10.0,(double)fc*10.0/i);
when we are done send the Finished State Enumeration
gmlib(GMLIB_CLOSE);
return 0;
}
There are some very clever bits I elide here, but more or less that is what you were discussing.
Last edited by twobob; 08-26-2012 at 04:55 PM.
Reason: 8 bit not b bit
|