mirror of https://github.com/pret/pokeemerald.git
Merge branch 'master' of https://github.com/pret/pokeemerald
This commit is contained in:
commit
8d551517f6
|
@ -776,18 +776,12 @@ void CalculateWaits(std::vector<Event>& events)
|
||||||
int CalculateCompressionScore(std::vector<Event>& events, int index)
|
int CalculateCompressionScore(std::vector<Event>& events, int index)
|
||||||
{
|
{
|
||||||
int score = 0;
|
int score = 0;
|
||||||
std::uint8_t lastParam1 = (std::uint8_t)events[index].type;
|
std::uint8_t lastParam1 = events[index].param1;
|
||||||
std::uint8_t lastVelocity = 0x80u;
|
std::uint8_t lastVelocity = 0x80u;
|
||||||
EventType lastType = events[index].type;
|
EventType lastType = events[index].type;
|
||||||
std::int32_t lastDuration = 0x80000000;
|
std::int32_t lastDuration = 0x80000000;
|
||||||
std::uint8_t lastNote = 0x40u;
|
std::uint8_t lastNote = 0x40u;
|
||||||
|
|
||||||
if (events[index].type == EventType::Note)
|
|
||||||
{
|
|
||||||
// Bug reintroduction
|
|
||||||
lastParam1 = events[index].note + 0x40;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (events[index].time > 0)
|
if (events[index].time > 0)
|
||||||
score++;
|
score++;
|
||||||
|
|
||||||
|
@ -846,18 +840,11 @@ int CalculateCompressionScore(std::vector<Event>& events, int index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BUG: uses type instead of param1
|
lastParam1 = events[i].param1;
|
||||||
lastParam1 = (std::uint8_t)events[i].type;
|
|
||||||
if (events[i].type == EventType::Note)
|
|
||||||
{
|
|
||||||
// Bug reintroduction
|
|
||||||
lastParam1 = events[i].note + 0x40;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastType = events[i].type;
|
lastType = events[i].type;
|
||||||
|
|
||||||
if (events[i].time)
|
if (events[i].time)
|
||||||
++score;
|
score++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return score;
|
return score;
|
||||||
|
|
Loading…
Reference in New Issue