Fix compilation with DMD v2.112.0
This commit is contained in:
@@ -9,6 +9,7 @@ import std.uni;
|
|||||||
import std.utf;
|
import std.utf;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
import undead.string;
|
||||||
static import std.algorithm;
|
static import std.algorithm;
|
||||||
struct Trace
|
struct Trace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import std.stdio;
|
|||||||
import std.ascii;
|
import std.ascii;
|
||||||
import std.range;
|
import std.range;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
import undead.string;
|
||||||
import std.algorithm;
|
import std.algorithm;
|
||||||
import otya.smilebasic.error;
|
import otya.smilebasic.error;
|
||||||
import otya.smilebasic.type;
|
import otya.smilebasic.type;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import derelict.sdl2.image;
|
|||||||
import derelict.opengl3.gl;
|
import derelict.opengl3.gl;
|
||||||
import otya.smilebasic.petitcomputer;
|
import otya.smilebasic.petitcomputer;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
import undead.string;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
import std.file;
|
import std.file;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ static import std.algorithm;
|
|||||||
import core.stdc.stdio;
|
import core.stdc.stdio;
|
||||||
import core.sync.mutex;
|
import core.sync.mutex;
|
||||||
import core.sync.condition;
|
import core.sync.condition;
|
||||||
|
import core.thread;
|
||||||
static import core.stdc.string;
|
static import core.stdc.string;
|
||||||
import otya.smilebasic.sprite;
|
import otya.smilebasic.sprite;
|
||||||
import otya.smilebasic.error;
|
import otya.smilebasic.error;
|
||||||
@@ -704,8 +705,8 @@ class PetitComputer
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
import std.algorithm : clamp, min, max;
|
import std.algorithm : clamp, min, max;
|
||||||
short stickx = SDL_GameControllerGetAxis(controller, x).clamp(-short.max, short.max);
|
short stickx = SDL_GameControllerGetAxis(controller, x).clamp(cast(short)-short.max, short.max);
|
||||||
short sticky = SDL_GameControllerGetAxis(controller, y).clamp(-short.max, short.max);
|
short sticky = SDL_GameControllerGetAxis(controller, y).clamp(cast(short)-short.max, short.max);
|
||||||
s.internalX = stickx / (short.max / Stick.max);
|
s.internalX = stickx / (short.max / Stick.max);
|
||||||
s.internalY = -sticky / (short.max / Stick.max);
|
s.internalY = -sticky / (short.max / Stick.max);
|
||||||
stick(id, s);
|
stick(id, s);
|
||||||
|
|||||||
35
dub.json
35
dub.json
@@ -1,14 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "otyasmilebasic",
|
"buildRequirements": [
|
||||||
"dependencies": {
|
"allowWarnings"
|
||||||
"derelict-sdl2": "1.9.7",
|
],
|
||||||
"derelict-gl3": "1.0.15"
|
|
||||||
},
|
|
||||||
"sourcePaths": ["SMILEBASIC/"],
|
|
||||||
"importPaths": ["SMILEBASIC/"],
|
|
||||||
"targetType": "executable",
|
|
||||||
"buildRequirements": ["allowWarnings"],
|
|
||||||
"targetPath": "out",
|
"targetPath": "out",
|
||||||
|
"name": "otyasmilebasic",
|
||||||
|
"copyFiles": [
|
||||||
|
"SMILEBASIC/TEST.txt",
|
||||||
|
"SMILEBASIC/resources/*.txt",
|
||||||
|
"SMILEBASIC/spdef.csv",
|
||||||
|
"SMILEBASIC/dialogresource",
|
||||||
|
"SDL_GameControllerDB/gamecontrollerdb.txt"
|
||||||
|
],
|
||||||
|
"sourcePaths": [
|
||||||
|
"SMILEBASIC/"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"derelict-gl3": "1.0.15",
|
||||||
|
"derelict-sdl2": "1.9.7",
|
||||||
|
"undead": "~>1.2.0"
|
||||||
|
},
|
||||||
|
"targetType": "executable",
|
||||||
"workingDirectory": "out",
|
"workingDirectory": "out",
|
||||||
"copyFiles": ["SMILEBASIC/TEST.txt", "SMILEBASIC/resources/*.txt", "SMILEBASIC/spdef.csv", "SMILEBASIC/dialogresource", "SDL_GameControllerDB/gamecontrollerdb.txt"]
|
"importPaths": [
|
||||||
}
|
"SMILEBASIC/"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user