Moved all bindings to the "bindings" sub-directory
Renamed the CSFML directory to c Renamed the DSFML directory to d --> bindings must now be updated to match the new organization! git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1630 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
0cc5563cac
commit
0e2297af28
417 changed files with 0 additions and 0 deletions
49
bindings/d/samples/dsfml/voip/util.d
Normal file
49
bindings/d/samples/dsfml/voip/util.d
Normal file
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue