Message-Id: <3.0.6.32.19990101154321.007a0d10@tenforward.com> X-Sender: sw AT tenforward DOT com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Fri, 01 Jan 1999 15:43:21 -0800 To: djgpp AT delorie DOT com From: Mad Cow Subject: Extended Stupid Question(with source) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_915263001==_" Reply-To: djgpp AT delorie DOT com --=====================_915263001==_ Content-Type: text/plain; charset="us-ascii" okay, here is my code w/poblem: >i earlier reported an error dealing with cwsdpmi*b, well i found it on the >net.. >and now all i get when trying to run my program is : >* in windows i get a system fault error and it shuts the dos prompt down. > >* in dos only mode i get something like this: > >Shutting Down Allegro >Exiting due to SIGSEGV >Page Fault at eip00001fe1, error 0004 > > >***extended hex address numbers here*** >and then it goes back to the prompt. > > >so, is it allegro? is it my programming? is it my machine? (i.e. bad >sowftware) might be your code. try post it if it isn't too big. I think you should try to localize where it halts. put exit(0); in your code. Move it forwards until you get the error. >what? thanks for your time. > > --=====================_915263001==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="alien.cc" #include #include "tutorial.h" #define MIN_Y 8 DATAFILE*data; BITMAP*backdrop,*framebuf; int X=0,Y=100; int main(){ allegro_init(); install_keyboard(); initialise_joystick(); data=load_datafile("alien.dat"); set_gfx_mode(GFX_VGA,320,200,0,0); set_palette((RGB*)data[DAT_GAMEPAL].dat); // create 320x192 backdrop backdrop=create_bitmap(320,192); for (int Y=0; Y<128; Y++) hline(backdrop,0,Y,319, (Y/2)+128); for (int Y=128; Y<192; Y++) hline(backdrop,0,Y,319, ((Y-128)/2)+192); // create 320x200 double buffer framebuf=create_bitmap(320,200); clear(framebuf); while (!key[KEY_ESC]) { // build frame blit(backdrop,framebuf,0,0,0,MIN_Y,320,200); draw_rle_sprite(framebuf,(RLE_SPRITE*)data[DAT_ALIEN].dat,X,Y); // display frame vsync(); blit(framebuf,screen,0,0,0,0,320,200); // get user input poll_joystick(); if (key[KEY_LEFT]||joy_left) X--; if (key[KEY_RIGHT]||joy_right) X++; if (key[KEY_UP]||joy_up) Y--; if (key[KEY_DOWN]||joy_down) Y++; } return 0; } --=====================_915263001==_ Content-Type: text/plain; charset="us-ascii" sw AT tenforward DOT com http://come.to/NCI --=====================_915263001==_--