Archived

This topic is now archived and is closed to further replies.

Bitmaps

This topic is 5896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Where do I put the code for loading the bitmaps. I''v read the tutorial(Game Programming Genesis) here on gamedev.net. I''m Using that function at the buttom. Where should I call it from and What should i put for the first argument? Thanx

Share this post


Link to post
Share on other sites
Don''t know if this''ll help, but here''s what I do:

int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpCmdLine,int nCmdShow)
{
MSG msg;
BOOL GO=TRUE;

if(!initApp(hInstance,nCmdShow)) /**/
return FALSE;

while(GO)
{
if(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if(msg.message==WM_QUIT)
GO=FALSE;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
renderFrame(); /**/
}
return (msg.wParam);
}

In the initApp() function I do all the windows initialization stuff, after that it calls a function that initializes directDraw (and loads bitmaps). Hope that helps.

"A man can''t just sit around." ''Lawn Chair'' Larry Walters (1982)

Share this post


Link to post
Share on other sites