Page 1 of 1

PocketHAL: how do I load an image from resource ?

PostPosted: Jul 11, 2004 @ 5:26am
by abiemann
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)

PostPosted: Jul 12, 2004 @ 6:36am
by Kzinti
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.

PostPosted: Jul 13, 2004 @ 2:22pm
by abiemann
I've removed the resource graphic files and instead inserted the needed GFX as a header file.

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