[update] Updated the debug mode to load music fast.
This commit is contained in:
parent
210c25e695
commit
1c9aa9340d
@ -5,7 +5,8 @@ import std.algorithm,
|
||||
std.exception,
|
||||
std.file,
|
||||
std.json,
|
||||
std.path;
|
||||
std.path,
|
||||
std.typecons;
|
||||
|
||||
import gl4d;
|
||||
|
||||
@ -60,7 +61,9 @@ class Game : AbstractGame {
|
||||
if (args.debug_music_index >= 0) {
|
||||
enforce(args.debug_music_index < music_list.length);
|
||||
load_.Initialize(
|
||||
music_list_[args.debug_music_index], args.debug_music_offset_beat);
|
||||
music_list_[args.debug_music_index],
|
||||
args.debug_music_offset_beat,
|
||||
Yes.FastLoad);
|
||||
super(load_);
|
||||
|
||||
} else {
|
||||
|
@ -1,7 +1,8 @@
|
||||
/// License: MIT
|
||||
module sj.LoadingScene;
|
||||
|
||||
import std.math;
|
||||
import std.math,
|
||||
std.typecons;
|
||||
|
||||
import gl4d;
|
||||
|
||||
@ -25,6 +26,8 @@ class LoadingScene : SceneInterface {
|
||||
///
|
||||
enum AnimeFrames = 300;
|
||||
///
|
||||
enum FastLoadAnimeFrames = 30;
|
||||
///
|
||||
enum CubeRotationSpeed = vec3(PI/200, PI/20, PI/200);
|
||||
///
|
||||
enum LoadingTextScale = vec3(-0.1, 0.1, 0.1);
|
||||
@ -63,11 +66,11 @@ class LoadingScene : SceneInterface {
|
||||
}
|
||||
|
||||
///
|
||||
void Initialize(Music music, float offset_beat) {
|
||||
void Initialize(Music music, float offset_beat, Flag!"FastLoad" fastload) {
|
||||
music_ = music;
|
||||
offset_beat_ = offset_beat;
|
||||
|
||||
anime_ = Animation(AnimeFrames);
|
||||
anime_ = Animation(fastload? FastLoadAnimeFrames: AnimeFrames);
|
||||
|
||||
with (lobby_) {
|
||||
bg_inner_ease_ = Easing!vec4(
|
||||
|
@ -4,6 +4,7 @@ module sj.SelectScene;
|
||||
import std.conv,
|
||||
std.math,
|
||||
std.random,
|
||||
std.typecons,
|
||||
std.variant;
|
||||
|
||||
import derelict.sfml2.audio;
|
||||
@ -383,7 +384,7 @@ private class MusicPlayState : AbstractSceneState {
|
||||
if (anime_.isFinished) {
|
||||
music_.StopPlaying();
|
||||
|
||||
owner.load_scene_.Initialize(music_, 0);
|
||||
owner.load_scene_.Initialize(music_, 0, No.FastLoad);
|
||||
return CreateResult(owner.load_scene_);
|
||||
}
|
||||
return CreateResult(this);
|
||||
|
Reference in New Issue
Block a user