delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/30/17:59:40

From: "Stex" <sbcinf AT mbox DOT vol DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: SIGFPE HELP!!!
Date: 30 Mar 1997 21:54:53 GMT
Organization: Telecom Italia - Video On Line
Lines: 77
Message-ID: <01bc3d54$db2c6c00$ad971fc3@stefabiz.vol.it>
NNTP-Posting-Host: novara4-46.tin.it
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Messaggio a pił sezioni in formato MIME.

------=_NextPart_000_01BC3D65.9EBE63C0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi and good Easter to all!
I have a problem using this little function :

unsigned int Maschera[30];

...
...

void Crea_Mask ( BITMAP *p )
{
 int a, b;

 for (a = 0; a < p->h; a++)
     {
     Maschera[a] = 0;
     for (b = 0; b < p->w; b++)
         {
          if (p->line[a][b] != 0)
             {
             Maschera[a] = Maschera[a] | (int)pow( (int)2, (int) (p->w - b)
);
             }
         }
     }
}

into a program. After a while it return a SIGFPE error (I really do not
understand why. I used UINT and *not* float).
Is there anybody who can (and want) help me?

I tried to debug the program but: using FSDB the system crash on
install_keyboard() allegro function, while from RHGDB it hangs and I need
to reboot (sometimes the system itself reboot!).

As you can understand, the function take a sprite and create the mask for a
pixel collision detection.
Thank you!

Stex
------=_NextPart_000_01BC3D65.9EBE63C0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">Hi and good Easter to all!<br>I have a =
problem using this little function :<br><br>unsigned int =
Maschera[30];<br><br>...<br>...<br><br>void Crea_Mask ( BITMAP *p =
)<br>{<br> int a, b;<br><br> for (a =3D 0; a &lt; p-&gt;h; a++)<br> =
&nbsp;&nbsp;&nbsp;&nbsp;{<br> &nbsp;&nbsp;&nbsp;&nbsp;Maschera[a] =3D =
0;<br> &nbsp;&nbsp;&nbsp;&nbsp;for (b =3D 0; b &lt; p-&gt;w; b++)<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if =
(p-&gt;line[a][b] !=3D 0)<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{=
<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;M=
aschera[a] =3D Maschera[a] | (int)pow( (int)2, (int) (p-&gt;w - b) =
);<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}=
<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> =
&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><br>into a program. After a while it =
return a SIGFPE error (I really do not understand why. I used UINT and =
*not* float).<br>Is there anybody who can (and want) help me?<br><br>I =
tried to debug the program but: using FSDB the system crash on =
install_keyboard() allegro function, while from RHGDB it hangs and I =
need to reboot (sometimes the system itself reboot!).<br><br>As you can =
understand, the function take a sprite and create the mask for a pixel =
collision detection.<br>Thank you!<br><br>Stex</p>
</font></body></html>
------=_NextPart_000_01BC3D65.9EBE63C0--

- Raw text -


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