mirror of https://github.com/PrimeDecomp/prime.git
Cleanup GenerateNextTrackEvent
This commit is contained in:
parent
f60291726a
commit
76f0d17291
|
@ -943,7 +943,9 @@ static SEQ_EVENT* GenerateNextTrackEvent(u8 trackId) {
|
||||||
if (track->addr->pattern == 0xffff) {
|
if (track->addr->pattern == 0xffff) {
|
||||||
track->addr = NULL;
|
track->addr = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (track->addr->pattern == 0xfffe) {
|
}
|
||||||
|
|
||||||
|
if (track->addr->pattern == 0xfffe) {
|
||||||
if (cseq->trackSectionTab == NULL) {
|
if (cseq->trackSectionTab == NULL) {
|
||||||
if (cseq->section[0].loopDisable) {
|
if (cseq->section[0].loopDisable) {
|
||||||
track->addr = NULL;
|
track->addr = NULL;
|
||||||
|
@ -956,6 +958,7 @@ static SEQ_EVENT* GenerateNextTrackEvent(u8 trackId) {
|
||||||
|
|
||||||
ev->type = 3;
|
ev->type = 3;
|
||||||
ev->time = track->addr->time;
|
ev->time = track->addr->time;
|
||||||
|
// TODO what is this?
|
||||||
track->addr = &track->base[*((u16*)&track->addr->transpose)];
|
track->addr = &track->base[*((u16*)&track->addr->transpose)];
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -1005,11 +1008,12 @@ static SEQ_EVENT* GenerateNextTrackEvent(u8 trackId) {
|
||||||
if (pitchTime < modTime) {
|
if (pitchTime < modTime) {
|
||||||
ev->time = pitchTime + pattern->baseTime;
|
ev->time = pitchTime + pattern->baseTime;
|
||||||
ev->type = 2;
|
ev->type = 2;
|
||||||
} else {
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
use_mod_time:
|
use_mod_time:
|
||||||
ev->time = modTime + pattern->baseTime;
|
ev->time = modTime + pattern->baseTime;
|
||||||
ev->type = 1;
|
ev->type = 1;
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
return ev;
|
return ev;
|
||||||
|
|
Loading…
Reference in New Issue