Skip to content

Commit e53d270

Browse files
committed
light fixes and hacked together ENHANCED_OPENS support
1 parent 9bc7a79 commit e53d270

File tree

9 files changed

+204
-88
lines changed

9 files changed

+204
-88
lines changed

Encore/src/RhythmEngine/ChartLoaders/BaseLoader.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ namespace Encore::RhythmEngine {
4848
&& event[1] <= MinMaxDiff[diff].second;
4949
}
5050

51+
[[nodiscard]] static bool IsInPitchRangeGB(int diff, const smf::MidiEvent &event) {
52+
return event[1] >= GuitarMinMaxDiff[diff].first
53+
&& event[1] <= GuitarMinMaxDiff[diff].second;
54+
}
55+
5156
[[nodiscard]] static int GetEventLane(int diff, const smf::MidiEvent &event) {
5257
return event[1] - MinMaxDiff[diff].first;
5358
}

Encore/src/RhythmEngine/ChartLoaders/GuitarLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void Encore::RhythmEngine::GuitarLoader::GetNotes(smf::MidiEventList track) {
186186
// im tired boss
187187
CheckEvents(event);
188188
CheckModifiers(event);
189-
if (IsInPitchRange(Difficulty, event) && event.isNoteOn()) {
189+
if (IsInPitchRangeGB(Difficulty, event) && event.isNoteOn()) {
190190
if (chart[0].empty()) {
191191
chart.BaseScore += BASE_SCORE_NOTE_POINT;
192192
CreateNote(event);

Encore/src/RhythmEngine/Engine/BaseEngine.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ void Encore::RhythmEngine::BaseEngine::CheckMissedNotes(int Lane, double SongTim
9898
}
9999
void Encore::RhythmEngine::BaseEngine::HitNote(int lane) {
100100
int chordSize = std::popcount(chart->CurrentNoteIterators.at(lane)->Lane);
101+
if (chordSize == 0) chordSize = 1;
102+
101103
int startTick = chart->CurrentNoteIterators.at(lane)->StartTicks;
102104
double startTime = chart->CurrentNoteIterators.at(lane)->StartSeconds;
103105
Encore::EncoreLog(

Encore/src/RhythmEngine/NoteVector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inline std::vector<std::pair<int, int> > MinMaxDiff = {
2222
{ 60, 64 }, { 72, 76 }, { 84, 88 }, { 96, 100 }
2323
};
2424

25+
inline std::vector<std::pair<int, int> > GuitarMinMaxDiff = {
26+
{ 59, 64 }, { 71, 76 }, { 83, 88 }, { 95, 100 }
27+
};
28+
2529
inline std::vector<std::pair<int, int> > LiftMinMaxDiff = {
2630
{ 66, 69 }, { 78, 81 }, { 90, 93 }, { 102, 106 }
2731
};

0 commit comments

Comments
 (0)