🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Help loading mappy level!!

Started by
-1 comments, last by Brad 24 years, 5 months ago
-------------------------------------------------------------------------------- I''m trying to use mappy to load a level and display it. I don''t know how many of you are familier with mappy and it''s built in functions but i''m having a bitch of a time getting this to work so I would appreciate some help. The program compiles fine but when I run it the level does not load... in fact the program displays a blank screen for a second and than tosses me back to the desktop. I have the "TEST.FMP" file in the same directory as my exe so that isn''t the problem. If someone could please take a look and point out exactly where and how i''m screwing up I''d be grateful. Anyways here are my gameinit() and gamemain() functions (yes it is lamothe influenced) int Game_Main() { // this is the main loop of the game, do all your processing // here int start_map_x, start_map_y, end_map_x, end_map_y; // for now test if user is hitting ESC and send WM_CLOSE if (KEYDOWN(VK_ESCAPE)) SendMessage(main_window_handle,WM_CLOSE,0,0); Start_Clock(); DDraw_Fill_Surface(lpddsback, 0); start_map_x = world_x/64; start_map_y = world_y/64; end_map_x = start_map_x + 10 - 1; end_map_y = start_map_y + 7 - 1; MapDrawBG(lpddsback, end_map_x, end_map_y); DDraw_Flip(); Wait_Clock(30); // return success or failure or your own return code here return(1); } // end Game_Main //////////////////////////////////////////////////////////// int Game_Init() { // this is called once after the initial window is created and // before the main event loop is entered, do all your initialization // here int index; char filename[80]; DDraw_Init(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP); MapLoad ("TEST.FMP", lpdd); RECT screen_rect = {0,0,screen_width,screen_height-32}; lpddclipper = DDraw_Attach_Clipper(lpddsback,1,&screen_rect); ShowCursor(FALSE); // return success or failure or your own return code here return(1); } // end Game_Init

This topic is closed to new replies.

Advertisement