mirror of
https://github.com/SFML/SFML.git
synced 2024-11-26 05:11:04 +08:00
50 lines
886 B
D
50 lines
886 B
D
|
module util;
|
||
|
|
||
|
const ubyte AudioData = 1;
|
||
|
const ubyte EndOfStream = 2;
|
||
|
|
||
|
public import dsfml.system.all;
|
||
|
public import dsfml.audio.all;
|
||
|
public import dsfml.network.all;
|
||
|
|
||
|
version(Tango)
|
||
|
{
|
||
|
public import tango.io.Console;
|
||
|
public import tango.text.convert.Integer;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
public import std.stdio;
|
||
|
|
||
|
//simple abstraction of Cout & Cin for phobos
|
||
|
class Cout
|
||
|
{
|
||
|
static Cout s_c;
|
||
|
static this()
|
||
|
{
|
||
|
s_c = new Cout();
|
||
|
}
|
||
|
|
||
|
static Cout opCall(char[] str)
|
||
|
{
|
||
|
writefln("%s", str);
|
||
|
return s_c;
|
||
|
}
|
||
|
void newline()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class Cin
|
||
|
{
|
||
|
static char[] get()
|
||
|
{
|
||
|
return readln();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public import std.string : atoi;
|
||
|
alias atoi parse;
|
||
|
}
|