Funkin/source/funkin/util/Constants.hx

202 lines
4.5 KiB
Haxe
Raw Normal View History

package funkin.util;
import flixel.util.FlxColor;
2022-04-18 19:36:09 -04:00
import lime.app.Application;
class Constants
{
/**
* ENGINE AND VERSION DATA
*/
// ==============================
/**
* The title of the game, for debug printing purposes.
* Change this if you're making an engine.
*/
2023-06-02 15:25:28 -04:00
public static final TITLE:String = "Friday Night Funkin'";
/**
* The current version number of the game.
* Modify this in the `project.xml` file.
*/
public static var VERSION(get, null):String;
/**
* A suffix to add to the game version.
* Add a suffix to prototype builds and remove it for releases.
*/
2023-06-02 15:25:28 -04:00
public static final VERSION_SUFFIX:String = ' PROTOTYPE';
#if debug
static function get_VERSION():String
{
return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH})' + VERSION_SUFFIX;
}
#else
static function get_VERSION():String
{
return 'v${Application.current.meta.get('version')}' + VERSION_SUFFIX;
}
#end
/**
* URL DATA
*/
// ==============================
/**
* Link to download the game on Itch.io.
*/
2023-06-02 15:25:28 -04:00
public static final URL_ITCH:String = 'https://ninja-muffin24.itch.io/funkin/purchase';
/**
* Link to the game's page on Kickstarter.
*/
2023-06-02 15:25:28 -04:00
public static final URL_KICKSTARTER:String = 'https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/';
/**
* GIT REPO DATA
*/
// ==============================
#if debug
/**
* The current Git branch.
*/
2023-06-02 15:25:28 -04:00
public static final GIT_BRANCH:String = funkin.util.macro.GitCommit.getGitBranch();
/**
* The current Git commit hash.
*/
2023-06-02 15:25:28 -04:00
public static final GIT_HASH:String = funkin.util.macro.GitCommit.getGitCommitHash();
#end
/**
* COLORS
*/
// ==============================
/**
* The color used by the enemy health bar.
*/
public static final COLOR_HEALTH_BAR_RED:FlxColor = 0xFFFF0000;
/**
* The color used by the player health bar.
*/
public static final COLOR_HEALTH_BAR_GREEN:FlxColor = 0xFF66FF33;
2023-06-02 15:25:28 -04:00
/**
* Default variation for charts.
*/
public static final DEFAULT_VARIATION:String = 'default';
/**
* STAGE DEFAULTS
*/
// ==============================
/**
* Default difficulty for charts.
*/
public static final DEFAULT_DIFFICULTY:String = 'normal';
/**
* Default player character for charts.
*/
public static final DEFAULT_CHARACTER:String = 'bf';
/**
* Default stage for charts.
*/
public static final DEFAULT_STAGE:String = 'mainStage';
/**
* Default song for if the PlayState messes up.
*/
public static final DEFAULT_SONG:String = 'tutorial';
/**
2023-07-02 15:33:12 -04:00
* TIMING
*/
// ==============================
2023-07-02 15:33:12 -04:00
/**
* The number of seconds in a minute.
*/
public static final SECS_PER_MIN:Int = 60;
/**
* The number of milliseconds in a second.
*/
public static final MS_PER_SEC:Int = 1000;
/**
* The number of microseconds in a millisecond.
*/
public static final US_PER_MS:Int = 1000;
/**
* The number of microseconds in a second.
*/
public static final US_PER_SEC:Int = US_PER_MS * MS_PER_SEC;
/**
* The number of nanoseconds in a microsecond.
*/
public static final NS_PER_US:Int = 1000;
/**
* The number of nanoseconds in a millisecond.
*/
public static final NS_PER_MS:Int = NS_PER_US * US_PER_MS;
/**
* The number of nanoseconds in a second.
*/
public static final NS_PER_SEC:Int = NS_PER_US * US_PER_MS * MS_PER_SEC;
2023-06-02 15:25:28 -04:00
/**
* All MP3 decoders introduce a playback delay of `528` samples,
* which at 44,100 Hz (samples per second) is ~12 ms.
*/
2023-07-02 15:33:12 -04:00
public static final MP3_DELAY_MS:Float = 528 / 44100 * MS_PER_SEC;
2023-06-02 15:25:28 -04:00
/**
2023-07-02 15:33:12 -04:00
* The default BPM of the conductor.
*/
2023-07-02 15:33:12 -04:00
public static final DEFAULT_BPM:Float = 100.0;
public static final DEFAULT_TIME_SIGNATURE_NUM:Int = 4;
public static final DEFAULT_TIME_SIGNATURE_DEN:Int = 4;
public static final STEPS_PER_BEAT:Int = 4;
/**
* OTHER
*/
// ==============================
/**
2023-07-02 15:33:12 -04:00
* The scale factor to use when increasing the size of pixel art graphics.
*/
2023-07-02 15:33:12 -04:00
public static final PIXEL_ART_SCALE:Float = 6;
/**
* The volume at which to play the countdown before the song starts.
*/
2023-06-02 15:25:28 -04:00
public static final COUNTDOWN_VOLUME:Float = 0.6;
/**
* The default intensity for camera zooms.
*/
public static final DEFAULT_ZOOM_INTENSITY:Float = 0.015;
2023-06-02 15:25:28 -04:00
/**
* The default rate for camera zooms (in beats per zoom).
*/
public static final DEFAULT_ZOOM_RATE:Int = 4;
}