2009-01-29 00:18:34 +08:00
|
|
|
module util;
|
|
|
|
|
2010-03-04 10:23:27 +08:00
|
|
|
const ubyte AudioData = 1;
|
2009-01-29 00:18:34 +08:00
|
|
|
const ubyte EndOfStream = 2;
|
|
|
|
|
|
|
|
public import dsfml.system.all;
|
|
|
|
public import dsfml.audio.all;
|
|
|
|
public import dsfml.network.all;
|
|
|
|
|
|
|
|
version(Tango)
|
|
|
|
{
|
2010-03-04 10:23:27 +08:00
|
|
|
public import tango.io.Console;
|
|
|
|
public import tango.text.convert.Integer;
|
2009-01-29 00:18:34 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-03-04 10:23:27 +08:00
|
|
|
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()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2009-01-29 00:18:34 +08:00
|
|
|
|
2010-03-04 10:23:27 +08:00
|
|
|
class Cin
|
|
|
|
{
|
|
|
|
static char[] get()
|
|
|
|
{
|
|
|
|
return readln();
|
|
|
|
}
|
|
|
|
}
|
2009-01-29 00:18:34 +08:00
|
|
|
|
2010-03-04 10:23:27 +08:00
|
|
|
public import std.string : atoi;
|
|
|
|
alias atoi parse;
|
2009-01-29 00:18:34 +08:00
|
|
|
}
|