| 353 | } |
| 354 | |
| 355 | void Rjp1::setupInstrument(Rjp1Channel *channel, uint8 num) { |
| 356 | if (channel->currentInstrument != num) { |
| 357 | channel->currentInstrument = num; |
| 358 | const uint8 *p = _vars.songData[0] + num * 32; |
| 359 | channel->noteData = p; |
| 360 | channel->repeatPos = readBEWord(p + 20); |
| 361 | channel->repeatLen = readBEWord(p + 22); |
| 362 | channel->volumeScale = readBEWord(p + 14); |
| 363 | channel->modulatePeriodBase = readBEWord(p + 24); |
| 364 | channel->modulatePeriodIndex = 0; |
| 365 | channel->modulatePeriodLimit = readBEWord(p + 26) * 2; |
| 366 | channel->modulateVolumeBase = readBEWord(p + 28); |
| 367 | channel->modulateVolumeIndex = 0; |
| 368 | channel->modulateVolumeLimit = readBEWord(p + 30) * 2; |
| 369 | channel->waveData = _vars.instData + readBEDWord(p); |
| 370 | uint32 off = readBEDWord(p + 4); |
| 371 | channel->modulatePeriodData = _vars.instData + off; |
| 372 | off = readBEDWord(p + 8); |
| 373 | channel->modulateVolumeData = _vars.instData + off; |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | void Rjp1::setRelease(Rjp1Channel *channel) { |
| 378 | const int8 *e = channel->envelopeData; |
nothing calls this directly
no test coverage detected