Difference for socket/sounds.c from version 1.4 to 1.5


version 1.4 version 1.5
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_sound_c =   * static char *rcsid_sound_c =
  *   "$Id: sounds.c,v 1.4 2003/12/02 18:51:44 ryo_saeba Exp $";   *   "$Id: sounds.c,v 1.5 2003/12/14 16:28:47 ryo_saeba Exp $";
  */   */
   
 /* Send bug reports to Raphael Quinet (quinet@montefiore.ulg.ac.be) */  /* Send bug reports to Raphael Quinet (quinet@montefiore.ulg.ac.be) */
Line 26
 
Line 26
 /**  /**
  * Plays a sound for specified player only   * Plays a sound for specified player only
  */   */
 void play_sound_player_only(player *pl, int soundnum,  int x, int y)  void play_sound_player_only(player *pl, short soundnum,  sint8 x, sint8 y)
 {  {
     int soundtype;      char soundtype;
     SockList sl;      SockList sl;
   
     if (!pl->socket.sound) return;      if (!pl->socket.sound) return;
Line 53
 
Line 53
 #define POW2(x) ((x) * (x))  #define POW2(x) ((x) * (x))
   
 /** Plays some sound on map at x,y.  */  /** Plays some sound on map at x,y.  */
 void play_sound_map(mapstruct *map, int x, int y, int sound_num)  void play_sound_map(mapstruct *map, int x, int y, short sound_num)
 {  {
     player *pl;      player *pl;
   
Line 67
 
Line 67
      int distance=isqrt(POW2(pl->ob->x - x) + POW2(pl->ob->y - y));       int distance=isqrt(POW2(pl->ob->x - x) + POW2(pl->ob->y - y));
   
      if (distance<=MAX_SOUND_DISTANCE) {       if (distance<=MAX_SOUND_DISTANCE) {
  play_sound_player_only(pl, sound_num, x-pl->ob->x, y-pl->ob->y);   play_sound_player_only(pl, sound_num, ( sint8 )( x-pl->ob->x ), ( sint8 )( y-pl->ob->y ));
      }       }
  }   }
     }      }


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:38