www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/16/05:00:46

From: "JCx" <jicehix AT worldnet DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Problem with WinAllegro WIP7...
Date: Tue, 15 Dec 1998 21:21:16 +0100
Lines: 53
Message-ID: <757uof$6ua$1@news2.isdnet.net>
NNTP-Posting-Host: p14-020.province.worldnet.fr
X-Trace: news2.isdnet.net 913800783 7114 195.3.14.20 (16 Dec 1998 09:33:03 GMT)
X-Complaints-To: abuse AT isdnet DOT net
NNTP-Posting-Date: 16 Dec 1998 09:33:03 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

    Hi there !

I have the following problem with WinAllegro WIP7, using RSXNTDJ:

My prog (some sort of RPG game) launches without any problem, everything
works fine. Normally, in the DOS djgpp version of the program, it switches
to a battle mode after some time (randomly defined). First problem: when
compiled with RSX, the program doesn't try to launch the battle mode. Is the
random() function used the same way in both RSX and djgpp ? BTW, that's not
very important... because I thought I could launch the battle mode by
pressing a key. There comes the issue: when I press the chosen key, crash! A
nice dialog appears, telling me that my program encountered a SIGSEGV and an
exception at 0x00000009. Wow. I've included a short code excerpt to show you
what I'm trying to do when entering battle mode:

----------------------- Start of code excerpt -----------------------

void enter_battle_mode(char decor[15],char enemy[15])
{
   int progress=16;

   b_temp=create_bitmap(640,480);
   e_temp=create_bitmap(195,164);
   clear(b_temp);
   clear(e_temp);

   decor_file=load_datafile(decor);
   enemy_file=load_datafile(enemy);

   blit(enemy_file[frame1].dat,e_temp,0,0,0,0,195,164);

   play_midi(decor_file[battle_music].dat,TRUE);

   show_mouse(NULL);

   drawing_mode(DRAW_MODE_TRANS,0,0,0);

------------------------- End of code excerpt -------------------------

... here come other instructions, but I think that's enough. In fact, I
think this should be okay, coz the program crashes just after starting
playing the MIDI file. I've tried commenting the lines following
play_midi(), but it doesn't help. I tried turning the sound off, doesn't
help. Has someone any idea of what's happening ?

   Thanks, JCx.
   jicehix AT worldnet DOT fr

P.S: don't forget to include your name if you answer (mail preferred, but
you can post to the group if you think it can help any other user), so I can
put it in the credits list of the game (that's a school project).


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019