Advertisement
Clownacy

Untitled

Sep 10th, 2018
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.47 KB | None | 0 0
  1. void __thiscall OrgData::PlayData(OrgData *this)
  2. {
  3.   OrgData *this2; // [sp+0h] [bp-8h]@1
  4.   signed int i; // [sp+4h] [bp-4h]@6
  5.   signed int j; // [sp+4h] [bp-4h]@25
  6.  
  7.   this2 = this;
  8.   if ( bFadeout && Volume )
  9.     Volume -= 2;
  10.   if ( Volume < 0 )
  11.     Volume = 0;
  12.   for ( i = 0; i < 8; ++i )
  13.   {
  14.     if ( np[i] && play_p == np[i]->x )
  15.     {
  16.       if ( !mute[i] && np[i]->y != 255 )
  17.       {
  18.         PlayOrganObject(np[i]->y, -1, i, this2->info.tdata[i].freq);
  19.         now_leng[i] = np[i]->length;
  20.       }
  21.       if ( np[i]->pan != 255 )
  22.         ChangeOrganPan(np[i]->y, np[i]->pan, i);
  23.       if ( np[i]->volume != 255 )
  24.         TrackVol[i] = np[i]->volume;
  25.       np[i] = np[i]->to;
  26.     }
  27.     if ( !now_leng[i] )
  28.       PlayOrganObject(0, 2, i, this2->info.tdata[i].freq);
  29.     if ( now_leng[i] > 0 )
  30.       --now_leng[i];
  31.     if ( np[i] )
  32.       ChangeOrganVolume(np[i]->y, Volume * TrackVol[i] / 127, i);
  33.   }
  34.   for ( j = 8; j < 16; ++j )
  35.   {
  36.     if ( np[j] && play_p == np[j]->x )
  37.     {
  38.       if ( np[j]->y != 255 && !mute[j] )
  39.         PlayDramObject(np[j]->y, 1, j - 8);
  40.       if ( np[j]->pan != 255 )
  41.         ChangeDramPan(np[j]->pan, j - 8);
  42.       if ( np[j]->volume != 255 )
  43.         TrackVol[j] = np[j]->volume;
  44.       np[j] = np[j]->to;
  45.     }
  46.     if ( np[j] )
  47.       ChangeDramVolume(Volume * TrackVol[j] / 127, j - 8);
  48.   }
  49.   if ( ++play_p >= this2->info.end_x )
  50.   {
  51.     play_p = this2->info.repeat_x;
  52.     OrgData::SetPlayPointer(this2, play_p);
  53.   }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement