follows latest dlang changes

This commit is contained in:
falsycat 2022-02-02 11:12:46 +09:00
parent c2a4e4af97
commit a18c020652
7 changed files with 30 additions and 30 deletions

View File

@ -3,7 +3,8 @@ module sjscript.Token;
import std.algorithm,
std.array,
std.ascii;
std.ascii,
std.conv;
import dast.tokenize;

View File

@ -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_;

View File

@ -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_;

View File

@ -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);
}

View File

@ -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_;

View File

@ -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_;

View File

@ -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;