Advertisement

Help loading mappy level!!

Started by January 04, 2000 10:20 PM
1 comment, last by Brad 24 years, 11 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); lpdd->CreatePalette(DDPCAPS_8BIT, mappept, &lpddpal, NULL); lpddsprimary->SetPalette(lpddpal); lpddsback->SetPalette(lpddpal); 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 Edited by - Brad on 1/4/00 11:48:58 PM
Brad, from the code I can only guess what''s happening. If it''s not much of a problem could you send the code & the map to me? josephfernald@hotmail.com . I''ll check it out when I come home tonight I''ll take a look at it & see what''s happening.

Joe.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
Advertisement
I sent all the files I thought you would need. All i''m trying to do is load the level - not scroll it or anything yet.

Thanks a LOT for the help.

This topic is closed to new replies.

Advertisement