diff --git a/sjscript/src/sjscript/Token.d b/sjscript/src/sjscript/Token.d index 8c54899..cc909bc 100644 --- a/sjscript/src/sjscript/Token.d +++ b/sjscript/src/sjscript/Token.d @@ -3,7 +3,8 @@ module sjscript.Token; import std.algorithm, std.array, - std.ascii; + std.ascii, + std.conv; import dast.tokenize; diff --git a/src/sj/Game.d b/src/sj/Game.d index 1e28cdb..beb5be0 100644 --- a/src/sj/Game.d +++ b/src/sj/Game.d @@ -10,7 +10,7 @@ import std.algorithm, import gl4d; -static import sjplayer; +import sjplayer; import sj.AbstractGame, sj.Args, @@ -38,10 +38,10 @@ class Game : AbstractGame { // To prevent working GC, all objects should be created at here. fonts_ = new FontSet; - programs_ = new ProgramSet; + programs_ = new sj.ProgramSet.ProgramSet; - posteffect_ = new sjplayer.PostEffect( - programs_.Get!(sjplayer.PostEffectProgram), + posteffect_ = new PostEffect( + programs_.Get!PostEffectProgram, vec2i(args.window_size, args.window_size)); lobby_ = new LobbyWorld(programs_); @@ -108,11 +108,11 @@ class Game : AbstractGame { private: Music[] music_list_; - FontSet fonts_; - ProgramSet programs_; + FontSet fonts_; + sj.ProgramSet.ProgramSet programs_; - sjplayer.PostEffect posteffect_; - LobbyWorld lobby_; + PostEffect posteffect_; + LobbyWorld lobby_; TitleScene title_; SelectScene select_; diff --git a/src/sj/LoadingScene.d b/src/sj/LoadingScene.d index c9e6cb2..a201493 100644 --- a/src/sj/LoadingScene.d +++ b/src/sj/LoadingScene.d @@ -8,7 +8,7 @@ import std.math, import gl4d; -static import sjplayer; +import sjplayer; import sj.FontSet, sj.KeyInput, @@ -40,10 +40,10 @@ class LoadingScene : SceneInterface { /// this( - LobbyWorld lobby, - sjplayer.PostEffect posteffect, - ProgramSet programs, - FontSet fonts) { + LobbyWorld lobby, + PostEffect posteffect, + sj.ProgramSet.ProgramSet programs, + FontSet fonts) { lobby_ = lobby; posteffect_ = posteffect; programs_ = programs; @@ -110,9 +110,9 @@ class LoadingScene : SceneInterface { } private: - sjplayer.PostEffect posteffect_; + PostEffect posteffect_; - ProgramSet programs_; + sj.ProgramSet.ProgramSet programs_; LobbyWorld lobby_; diff --git a/src/sj/Music.d b/src/sj/Music.d index 721cb68..889513e 100644 --- a/src/sj/Music.d +++ b/src/sj/Music.d @@ -14,7 +14,7 @@ import derelict.sfml2.audio, import gl4d; -static import sjplayer; +import sjplayer; /// class Music { @@ -82,9 +82,8 @@ class Music { } /// - sjplayer.Context CreatePlayerContext( - sjplayer.PostEffect posteffect, sjplayer.ProgramSet programs) const { - return sjplayer.CreateContextFromText( + Context CreatePlayerContext(PostEffect posteffect, ProgramSet programs) const { + return CreateContextFromText( script_path_.readText, posteffect, programs); } diff --git a/src/sj/PlayScene.d b/src/sj/PlayScene.d index 9511248..770db17 100644 --- a/src/sj/PlayScene.d +++ b/src/sj/PlayScene.d @@ -5,7 +5,7 @@ import std.conv; import gl4d; -static import sjplayer; +import sjplayer; import sj.KeyInput, sj.Music, @@ -23,7 +23,7 @@ class PlayScene : SceneInterface { enum NearnessScoreRatio = 10; /// - this(sjplayer.PostEffect posteffect) { + this(PostEffect posteffect) { posteffect_ = posteffect; } ~this() { @@ -36,7 +36,7 @@ class PlayScene : SceneInterface { } /// - void Initialize(Music music, sjplayer.Context context, float offset_beat) { + void Initialize(Music music, Context context, float offset_beat) { music_ = music; context_ = context; @@ -94,12 +94,12 @@ class PlayScene : SceneInterface { return result; } - sjplayer.PostEffect posteffect_; + PostEffect posteffect_; ResultScene result_scene_; - Music music_; - sjplayer.Context context_; + Music music_; + Context context_; float beat_; int score_; diff --git a/src/sj/TitleScene.d b/src/sj/TitleScene.d index 7afb135..39ad070 100644 --- a/src/sj/TitleScene.d +++ b/src/sj/TitleScene.d @@ -6,7 +6,7 @@ import std.conv, import gl4d; -static import sjplayer; +import sjplayer; import sj.KeyInput, sj.LobbyWorld, @@ -40,7 +40,7 @@ class TitleScene : SceneInterface { enum Contrast = vec4(1.2, 1.2, 1.2, 1); /// - this(sjplayer.PostEffect posteffect, LobbyWorld lobby, ProgramSet program) { + this(PostEffect posteffect, LobbyWorld lobby, sj.ProgramSet.ProgramSet program) { posteffect_ = posteffect; lobby_ = lobby; title_ = program.Get!TitleTextProgram; @@ -89,7 +89,7 @@ class TitleScene : SceneInterface { private: SelectScene select_scene_; - sjplayer.PostEffect posteffect_; + PostEffect posteffect_; LobbyWorld lobby_; diff --git a/thirdparty/dast/src/dast/parse/itemset.d b/thirdparty/dast/src/dast/parse/itemset.d index 41464b1..a4ffac1 100644 --- a/thirdparty/dast/src/dast/parse/itemset.d +++ b/thirdparty/dast/src/dast/parse/itemset.d @@ -119,7 +119,7 @@ do { T[] new_items; foreach (item; items) { - const type = + auto type = !item.canAdvance || item.next.isTerminal? null: item.next.nonTerminalType; if (resolved_types[].canFind!"a is b"(type)) continue;