View Single Post
Old 08-26-2012, 04:52 PM   #173
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
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
twobob is offline   Reply With Quote