Skip to content

Commit

Permalink
Once again
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatecompvir committed Sep 29, 2024
1 parent d425a82 commit 90d9d2b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 67 deletions.
79 changes: 13 additions & 66 deletions src/band3/game/Defines.cpp
Original file line number Diff line number Diff line change
@@ -1,83 +1,30 @@
#include "Defines.h"
#include <os/Debug.h>
#include <obj/DataUtl.h>

TrackType ControllerTypeToTrackType(ControllerType controllerType, bool alt) {
switch (controllerType) {
case kControllerDrum:
return kTrackDrum;
case kControllerVocals:
return kTrackVocals;
case kControllerGuitar:
return alt ? kTrackBass : kTrackGuitar;
case kControllerRealGuitar:
return alt ? kTrackRealBass : kTrackRealGuitar;
case kControllerKeys:
return alt ? kTrackRealKeys : kTrackKeys;
default:
return kTrackNone;
}
}

TrackType ScoreTypeToTrackType(ScoreType scoreType) {
TrackType trackType;
switch (scoreType) {
case kScoreDrum:
trackType = kTrackDrum;
break;
case kScoreBass:
trackType = kTrackBass;
break;
case kScoreGuitar:
trackType = kTrackGuitar;
break;
case kScoreVocals:
trackType = kTrackVocals;
break;
case kScoreHarmony:
trackType = kTrackVocals;
break;
case kScoreKeys:
trackType = kTrackKeys;
case 0:
break;
case kScoreRealDrum:
trackType = kTrackDrum;
break;
case kScoreRealGuitar:
trackType = kTrackRealGuitar;
break;
case kScoreRealBass:
trackType = kTrackRealBass;
break;
case kScoreRealKeys:
trackType = kTrackRealKeys;
break;
case kScoreBand:
trackType = kTrackNone;
break;
default:
TheDebug.Fail(MakeString("no TrackType for this ScoreType!"));
trackType = kTrackNone;
}
return trackType;
}

ControllerType TrackTypeToControllerType(TrackType trackType) {
switch (trackType) {
case kTrackDrum:
case 0:
return kControllerDrum;
case kTrackGuitar:
case kTrackBass:
case 1:
case 2:
return kControllerGuitar;
case kTrackVocals:
case 3:
return kControllerVocals;
case kTrackKeys:
case kTrackRealKeys:
return kControllerKeys;
case kTrackRealGuitar:
case kTrackRealBass:
return kControllerRealGuitar;
default:
case 4:
case 5:
return kControllerNone;
case 6:
case 8:
return (ControllerType)4;
default:
return (ControllerType)5;
}
}
}
1 change: 0 additions & 1 deletion src/band3/game/Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ enum TrackType {
kTrackProBass = 8
};

TrackType ControllerTypeToTrackType(ControllerType controllerType, bool isReal);
TrackType ScoreTypeToTrackType(ScoreType scoreType);
ControllerType TrackTypeToControllerType(TrackType trackType);
Symbol TrackTypeToSym(TrackType);
Expand Down

0 comments on commit 90d9d2b

Please sign in to comment.