Here's the latest version of this library.
It includes 3 new functions
ptc_blit(void *buffer, int srcwidth, int srcheight, int dstx, int dsty, int dstwidth, int dstheight, char filtering);
ptc_blitscale(void *buffer, int srcwidth, int srcheight, int dstx, int dsty, float scale, char filtering);
ptc_clear(unsigned int colour);
The two blit functions can be used instead of ptc_update to blit any source graphic to any size and location on the screen. Very useful for getting round aspect ratio problems. You can use bilinear filtering or not.
You may need to clear the screen using ptc_clear if you dynamically change the output size.
The sample code shows how to use it.
I have fixed the mouse button code so that it only reads the mouse when it is in the window.
Finally, I have included the ability not to have to use the C runtime library. Just put the crinkler exe in the folder and call it link.exe, and choose the Release No Runtime configuration to try it out. The sample exe comes out at 2k, which isn't miniscule but it is fun!
Jim