Difference for main/piggy.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 19
 
Line 19
  * Functions for managing the pig files.   * Functions for managing the pig files.
  *    *
  * $Log$   * $Log$
    * Revision 1.6  2000/01/23 02:59:29  sekmu
    * mostly completed alternate sound loading
    *
  * Revision 1.5  1999/12/17 02:22:18  donut   * Revision 1.5  1999/12/17 02:22:18  donut
  * Tim Riker's shareware sound fix   * Tim Riker's shareware sound fix
  *   *
Line 788
 
Line 791
  }   }
   
  for (i=0; i<N_sounds; i++ ) {   for (i=0; i<N_sounds; i++ ) {
   //edited on 1/22/99 by Victor Rachels to complete alt soundfiles
 //added on 11/13/99 by Victor Rachels to add alt soundfiles  //added on 11/13/99 by Victor Rachels to add alt soundfiles
                if(use_alt_sounds && use_alt_sound(i))                 if(use_alt_sounds && use_alt_sound(i))
                 {                  {
Line 795
 
Line 799
                   altfname = load_alt_sound_info(i,&temp_sound);                    altfname = load_alt_sound_info(i,&temp_sound);
                   piggy_register_sound(&temp_sound,altfname,1);                    piggy_register_sound(&temp_sound,altfname,1);
                   SoundOffset[Num_sound_files] = 0;                    SoundOffset[Num_sound_files] = 0;
 #ifdef ALLEGRO                    sbytes += get_alt_sound_size(i);
                   sbytes += temp_sound.len;  
 #else  
                   sbytes += temp_sound.length;  
 #endif  
                 }                  }
                else                 else
                 {                  {
Line 890
 
Line 890
  for (i=0; i<Num_sound_files; i++ ) {   for (i=0; i<Num_sound_files; i++ ) {
  digi_sound *snd = &GameSounds[i];   digi_sound *snd = &GameSounds[i];
   
   //edited on 1/22/99 by Victor Rachels to complete alt soundfiles
 //added on 11/13/99 by Victor Rachels to use alternate sounds  //added on 11/13/99 by Victor Rachels to use alternate sounds
                 if ( use_alt_sounds && use_alt_sound(i) )                  if ( use_alt_sounds && use_alt_sound(i) )
                  {                   {
                    snd->data = ptr;                     snd->data = ptr;
                    load_alt_sound(i,snd);                     load_alt_sound(i,snd);
                     #ifdef ALLEGRO                     ptr += get_alt_sound_size(i);
                       ptr += snd->len;                     sbytes += get_alt_sound_size(i);
                       sbytes += snd->len;         Error("sound: %i size %i smples %i",i,get_alt_sound_size(i), (int)snd->len );
                     #else  
                       ptr += snd->length;  
                       sbytes += snd->length;  
                     #endif  
                  }                   }
                 else if ( SoundOffset[i] > 0 )       {                  else if ( SoundOffset[i] > 0 )       {
 //end this section addition - VR  //end this section addition - VR
Line 935
 
Line 932
  }   }
  }   }
  }   }
   
  mprintf(( 0, "\nActual Sound usage: %d KB\n", sbytes/1024 ));   mprintf(( 0, "\nActual Sound usage: %d KB\n", sbytes/1024 ));
 #ifdef SHAREWARE  #ifdef SHAREWARE
  if (lastbuf)   if (lastbuf)
Line 1281
 
Line 1277
   
  mprintf( (0, "\nDumping sounds..." ));   mprintf( (0, "\nDumping sounds..." ));
   
  for (i=0; i < Num_sound_files; i++ ) {   for (i=0; i < Num_sound_files; i++ )
            if(!use_alt_sounds || !use_alt_sound(i))  {
  digi_sound *snd;   digi_sound *snd;
   
  snd = &GameSounds[i];   snd = &GameSounds[i];

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