PocketMatrix forums

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

jpeg support

i'm a total newbie and i'm trying to display a gif file from a file in my game. And of course i don't understand how to use PF to do this. Can anyone give me a simple example?
In short, here's a fast way to write a splash screen:

Code:

void MyGame::SplashScreen()
{
Surface *MySplashImage;
MySplashImage = Frog::LoadImage(GetDisplay(), _T("\\splashscreen.gif"));
GetDisplay()->Blit(0, 0, MySplashImage);
GetDisplay()->Update();
delete MySplashImage;
}

That loads the image from a file. I prefer to load them from resources personally.

-John
You can also load the image from a resource, the same way you'd load a bitmap; remember, however, that the resource has to be of type "IMAGE".
draluy · 08 Apr 2003, 08:51 UTC — more help!!
Thanks a lot !! But I'd like to display it in a dialog box, so the picture can move with it. Could u help me a little bit more?
You can't use PF inside a dialog box.

And you don't need PF to display an image in a dialog box to begin with.
Draluy · 08 Apr 2003, 10:12 UTC — Ok...
Ok but the problem I'm currently having is that GetDisplay method cannot be found. I think because it is protected, but i probably did not use these functions correctly. The error message is as following:
error C2065: 'GetDisplay' : undeclared identifier

Thanks for any suggestion on how I could fix it. :(
Did you inherit your MyGame class from Game?

Are you "using namespace Frog;" before your code?

Look at the samples.
thanksnow it works fine!