PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Anyone have Pocket PC Game Programming? I have a Q

Hi,

Could anyone with the book Pocket PC Game programming by Jonathan Harbour help me out with two things:

1. Does the code samples in the book consider frame buffer orientations (e.g. does the samples pre-rotate images to match the frame buffer rotation so that Blit loops always can be performed with xpitch=1pixel, ypitch=width)?
2. Does the code samples operate on multiple pixels simultaneously (32-bit reads and writes)?
3. Does the code samples use any form of loop expansion, such as template meta code?

I am writing an article on GapiDraw and the above information would help me out a bit.

Thanks in advance
//Johan
From what I can remember the game library he creates in the book is based on top of GDI rather than GAPI, there's only one chapter that really gives any information about GAPI and writing to the frame buffer, so the simple answer to all your questions is no :)
PocketHAL is so fast it can rotate the framebuffer real-time and still be faster than a well-written GAPI blit.

Dan East
For 1 and 2: Not that I've seen. More pagespace is given to replacing multipllies with shifts than is given to the GAPI buffer layout. About the only piece of information you get in that regard, is this equation: "Pixel = (X_pos * X_pitch) + (Y_pos * Y_pitch)", and a vague reference about optimizing for popular pitch values.

For 3: Things like that are much too involved for the target audience of this book. Performance, especially on the graphics side of things, isn't really given much consideration in the book.

Originally, I was going to complain about having to dig this book out from under my java and pascal books, but I found a $20 bill doing duty as a bookmark. I'm eating like a king today!
Andy: Thanks a lot! Really! And have a nice lunch! :)
Yes Dan, we all know the superiority of PocketHAL :D