PocketMatrix forums

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

PocketHAL: how do I load an image from resource ?

using pocketHAL, how do I load an image from the resource to a surface ?

my code so far:

//global variable
Surface *m_background; //Background image

//within: bool Project001::OnInitialize()
Display *display = GetDisplay();
m_background = LoadImage( display, IDB_BITMAP1 ); <~ of course this LoadImage doesn't work (I just stole it from a pocketFrog sample to get an idea)
PocketHAL doesn't have any support for loading images. If you want to load images, I would suggest looking at how PocketFrog does it. You should be able to easily modify the code to use PocketHAL surfaces. Look in PF's "image.cpp" file.
I've removed the resource graphic files and instead inserted the needed GFX as a header file.

http://droneship.com/forums/viewtopic.p ... dc3d4f34cb