* Fixed regression bug with DllLoader

+ added missing Font functions
* using alias template parameter for DrawableImpl now

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1337 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
trass3r 2010-01-07 22:00:45 +00:00
parent 0baf8e9b46
commit 8293de5c50
15 changed files with 297 additions and 280 deletions

View file

@ -36,18 +36,12 @@ import dsfml.graphics.idrawable,
dsfml.graphics.renderimage,
dsfml.graphics.shader;
package
{
struct sfSprite{};
struct sfShape{};
struct sfText{};
}
/*
* Package base class of all drawable.
* Provide implementation of IDrawable and functions aliases.
*/
package class Drawableimpl(T) : DSFMLObject, IDrawable
package class Drawableimpl(alias symbol) : DSFMLObject, IDrawable
{
protected:
this()
@ -302,19 +296,6 @@ private:
else
DllLoader dll = DllLoader.load("csfml-graphics");
static if (is (T : sfSprite))
{
string symbol = "sfSprite";
}
else static if (is (T : sfText))
{
string symbol = "sfText";
}
else static if (is (T : sfShape))
{
string symbol = "sfShape";
}
sfDrawable_Create = cast(pf_sfDrawable_Create)dll.getSymbol(symbol ~ "_Create");
sfDrawable_Destroy = cast(pf_sfDrawable_Destroy)dll.getSymbol(symbol ~ "_Destroy");
sfDrawable_SetX = cast(pf_sfDrawable_SetX)dll.getSymbol(symbol ~ "_SetX");