PocketMatrix forums

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

Questions on graphic

1) Is there any software to create my own vga fonts to use in PPL progs?

2) What formats does loadprite() support? JPEG, GIF, TIFF?

3)What's the best (most optimal, simpliest, providing best perfomance) way of doing the following:

Application is displaying some sprite objects on the screen (5-10) at the same time. Each time user taps screen with a stylus, some procedures are called and some sprites should be replaced with other sprite objects.

I think the most optimal way is to disable automatic screen refresh and redraw the screen every time user taps it, loading sprites from files. Is there any more optimized way?
1. You can look around for vga font editor on google. I found one there. It's old and for DOS but it works.

2. PPL supports a lot of formats but PNG is not supported on the PC.

this is from the image.h in pocketfrog (which PPL uses) root dir:

"The PocketPC and the desktop PC versions of this function are implemented differently. On PocketPC, we use the "imgdecmp.dll" decompression library to load different file formats without having to deal with legal issues such as GIF decompression.

On the desktop, we use the OleLoadPicture() function to load image files.
This give us access to a similar set of image formats.

The following formats are supported:
PocketPC: .BMP, .GIF, .JPG, .PNG and .XBM
Desktop: .BMP, .GIF, .JPG, .WMF and .ICO"


3. Leave automatic sprites display on. (Autodraw). You should load all surfaces (LoadSurface) at the beginning of the program and when the mouse is clicked you can SetSpriteSurface() and it will be fast. You can also detect mouse click on a per-sprite basis too.
kornalius wrote:You should load all surfaces (LoadSurface) at the beginning of the program


There will be about 100 images... I don't think loading all of them into memory is a good idea :wink:
The LoadSurface and SetSpriteSurface is probably your best bet. But don't forget that loading images on the PocketPC is always slow no matter what you try to do.

If you prefer, you can do the drawing yourself by turning the AutoDraw to false and putting your code in WM_PAINT of your main game procedure. Use the DrawSurface. Sprites are good to use if you need to keep track of positions and things like that.