Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bitmaps

Started by Aggrix Oct 22, 2001 at 8:44 PM 1 replies 300+ views
Original Post
Aggrix
Aggrix
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
Aggrix
Aggrix
Is it because it deletes it at the end of the function?(just thought about that)
Tracy
Tracy
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)
"A man can't just sit around." 'Lawn Chair' Larry Walters (1982)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.