| 151 | } |
| 152 | |
| 153 | int16 cSound_Amiga::Track_Load( sSound* pSound, int16 pTrack, int16 pSong = -1) { |
| 154 | int16 Number = 0; |
| 155 | const sSoundData *Tracks = CANNON_BASED(Tracks1, Tracks2); |
| 156 | const sSoundData *Track = 0; |
| 157 | |
| 158 | // Intro |
| 159 | if (pTrack >= 16 && pTrack <= 20) { |
| 160 | Track = &Tracks[1]; |
| 161 | Number = (pTrack - 16); |
| 162 | |
| 163 | if (!Number) |
| 164 | Number = 1; |
| 165 | } |
| 166 | |
| 167 | // Mission |
| 168 | if (pTrack >= 0x32) { |
| 169 | Track = &Tracks[2 + (pTrack - 0x32)]; |
| 170 | Number = 2; |
| 171 | } |
| 172 | |
| 173 | // Jon |
| 174 | if (pTrack < 16) { |
| 175 | Track = &Tracks[0]; |
| 176 | Number = pTrack; |
| 177 | } |
| 178 | |
| 179 | if (pSound->mTrack != Track) { |
| 180 | if (Track) { |
| 181 | pSound->mCurrentMusicSongData = g_Resource->fileGet(Track->mSongData); |
| 182 | pSound->mCurrentMusicInstrumentData = g_Resource->fileGet(Track->mInstrumentData); |
| 183 | } |
| 184 | pSound->mTrack = Track; |
| 185 | } |
| 186 | |
| 187 | if (pSong >= 0) |
| 188 | Number = pSong; |
| 189 | |
| 190 | return Number; |
| 191 | } |
| 192 | |
| 193 | void cSound_Amiga::Sound_Play( int16 pTileset, int16 pSoundEffect, int16 pVolume, int16 pIndex) { |
| 194 | |