PocketMatrix forums

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

Checking to see if a surface was loaded.

summer_goth · 05 Feb 2004, 19:26 UTC
Hi there everyone. I have converted my project from Gapidraw to PocketFrog and everything has gone rather smoothly.

There's only one thing I would like to know:

When loading a picture, how do I check whether the picture has loaded successfully? I know that in Gapidraw you just check to see whether its S_OK. Is there a similar way in PocketFrog?

Keep up the good work.
If PocketFrog fails to load a image, the returned surface will be NULL. So you can simply check for that.
summer_goth · 10 Feb 2004, 18:06 UTC
Thanks Thierry.

I must say I am quite impressed with PocketFrog.
At first it looked a bit daunting, but it was a joy to code with.
BTW is there any way in PocketFrog to flip images?

For instance to flip a surface when walking left, thus just having
a sprite facing right in memory.
summer_goth wrote:I must say I am quite impressed with PocketFrog.
At first it looked a bit daunting, but it was a joy to code with.


Yes, I do not know why PF gives this impression... Maybe it's all the rotated surface stuff... Soon to be eliminated. The next release of PF will have much less source and yet be more powerful.

summer_goth wrote:BTW is there any way in PocketFrog to flip images?


I don't think there is, unless Fzammetti added the functionality in 0.7. Putting it on my todo list...
Nope, mirroring and flipping wer both on my to-do list as well, but never got to it.

Although you do have rotations, and depending on your images that can give the same result (usually not, but you'll know either way).