Skip to content

Commit

Permalink
add hopo_threshold support to please jnack (YARC-Official#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjkiv authored Apr 28, 2023
1 parent e2a3522 commit d1217fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Script/Serialization/Xbox/XboxSong.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void CompleteSongInfo(SongInfo song, bool rb) {
song.songLength = songDta.songLength / 1000f;
// song.delay
song.drumType = rb ? SongInfo.DrumType.FOUR_LANE : SongInfo.DrumType.FIVE_LANE;
// song.hopoFreq
if(songDta.hopoThreshold != 0) song.hopoFreq = songDta.hopoThreshold;
song.artistName = songDta.artist;
song.album = songDta.albumName;
song.genre = songDta.genre;
Expand Down
2 changes: 2 additions & 0 deletions Assets/Script/Serialization/Xbox/XboxSongData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class XboxSongData {
public short[] realGuitarTuning, realBassTuning;
public string[] solos;
public Dictionary<string, ushort> ranks;
public int hopoThreshold = 0;

//TODO: implement macro support, such as #ifndef kControllerRealGuitar, or #ifdef YARG
public void ParseFromDta(DataArray dta) {
Expand Down Expand Up @@ -90,6 +91,7 @@ public void ParseFromDta(DataArray dta) {
if (dtaArray[j] is DataArray inner)
ranks.Add(((DataSymbol) inner[0]).Name, (ushort) ((DataAtom) inner[1]).Int);
break;
case "hopo_threshold": hopoThreshold = ((DataAtom) dtaArray[1]).Int; break;
case "game_origin": gameOrigin = ((DataSymbol) dtaArray[1]).Name; break;
case "genre": genre = ((DataSymbol) dtaArray[1]).Name; break;
case "rating": rating = (byte) ((DataAtom) dtaArray[1]).Int; break;
Expand Down

0 comments on commit d1217fa

Please sign in to comment.