Jump to content

  • Log In with Google      Sign In   
  • Create Account

Help loading mappy level!!


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Brad   Members   -  Reputation: 122

Posted 05 January 2000 - 02:46 PM

-------------------------------------------------------------------------------- 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

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS