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