-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdc8404
commit d5cb5f9
Showing
27 changed files
with
232 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "2hot" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Blazin'" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Bopeebo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Cocoa" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "DadBattle" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Darnell" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Eggnog" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Fresh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Guns" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "High" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Lit Up" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "M.I.L.F" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Monster" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Roses" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Satin Panties" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Senpai" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "South" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Spookeez" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Stress" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Thorns" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Tutorial" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Ugh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Winter Horrorland" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package; | ||
|
||
import haxe.Json; | ||
import sys.FileSystem; | ||
import sys.io.File; | ||
|
||
using StringTools; | ||
|
||
class GenerateSongsFolder | ||
{ | ||
public static function main() | ||
{ | ||
var songsToGenerate:Array<Array<String>> = []; | ||
var generateText:Array<String> = File.getContent('./songsToGenerate.txt').split('\n'); | ||
|
||
for (i in generateText) | ||
{ | ||
songsToGenerate.push(i.split(' - ')); | ||
} | ||
|
||
for (song in songsToGenerate) | ||
{ | ||
var yeah = { | ||
"name": song[1] | ||
}; | ||
var yeahAsString:String = Json.stringify(yeah, null, '\t').replace('\\r', ''); | ||
|
||
FileSystem.createDirectory('./' + song[0]); | ||
File.saveContent('./' + song[0] + '/metadata.json', yeahAsString); | ||
} | ||
} | ||
|
||
static function print(string:String) | ||
{ | ||
Sys.stdout().writeString(string + '\n'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
package funkin.data.song; | ||
|
||
import flixel.sound.FlxSoundGroup; | ||
import funkin.structures.SongStructure; | ||
|
||
class Song | ||
{ | ||
static var cachedSongs:Map<String, Song>; | ||
|
||
/** | ||
* Caches all songs to use later. | ||
*/ | ||
public static function cacheSongs():Void | ||
{ | ||
cachedSongs = new Map<String, Song>(); | ||
|
||
for (file in Paths.location.scan('gameplay/songs', '.json', true, PATH_FILE, false)) | ||
{ | ||
if (!file.endsWith('metadata')) | ||
continue; | ||
|
||
var endLength:Int = file.length - 'metadata'.length - 1; | ||
var songName:String = file.substring('gameplay/songs/'.length, endLength); | ||
var song:Song = new Song(songName); | ||
cachedSongs.set(songName, song); | ||
} | ||
} | ||
|
||
/** | ||
* Gets a song using it's ID. | ||
* @param id The ID of the song to search for. | ||
* @return The Song Object. | ||
*/ | ||
public static function getSongByID(id:String):Song | ||
{ | ||
if (cachedSongs == null) | ||
cacheSongs(); | ||
|
||
return cachedSongs.get(id); | ||
} | ||
|
||
/** | ||
* The song ID. | ||
*/ | ||
public final id:String; | ||
|
||
/** | ||
* All the metadatas. | ||
* id => structure | ||
*/ | ||
public final metadatas:Map<String, SongMetadata>; | ||
|
||
public function new(id:String) | ||
{ | ||
this.id = id; | ||
|
||
metadatas = new Map<String, SongMetadata>(); | ||
|
||
for (variation in getVariations()) | ||
{ | ||
metadatas.set(variation, getSongMetadata(id, variation)); | ||
} | ||
} | ||
|
||
/** | ||
* Get the Display Name for this song. | ||
* @param variation The variation to get the name from. | ||
* @return The name. | ||
*/ | ||
public function getDisplayName(variation:String = 'default'):String | ||
{ | ||
var metadata:SongMetadata = metadatas.get(variation); | ||
return metadata.name; | ||
} | ||
|
||
static function getSongMetadata(id:String, variation:String):SongMetadata | ||
{ | ||
var path:String = 'gameplay/songs/' + id + '/'; | ||
|
||
if (variation != 'default') | ||
path += variation + '-'; | ||
|
||
path += 'metadata'; | ||
|
||
return cast haxe.Json.parse(Paths.content.json(path)); | ||
} | ||
|
||
var _variations:Array<String>; | ||
|
||
/** | ||
* Get all of the variations for this Song. | ||
* @return The variations. | ||
*/ | ||
public function getVariations():Array<String> | ||
{ | ||
if (_variations != null) | ||
return _variations; | ||
|
||
_variations = ['default']; | ||
|
||
var queryPath:String = 'gameplay/songs/' + id; | ||
for (file in Paths.location.scan(queryPath, 'metadata.json', false, FILE, false)) | ||
{ | ||
if (file == '') // default | ||
continue; | ||
|
||
var variationWithoutDash:String = file.substring(0, file.length - 1); | ||
_variations.push(variationWithoutDash); | ||
} | ||
|
||
return _variations; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package funkin.structures; | ||
|
||
typedef SongMetadata = | ||
{ | ||
/** | ||
* The name of the song. | ||
*/ | ||
var name:String; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters