@@ -56,6 +56,7 @@ liblol_a_SOURCES = \ | |||||
gpu/emptymaterial.lolfx \ | gpu/emptymaterial.lolfx \ | ||||
gpu/testmaterial.lolfx \ | gpu/testmaterial.lolfx \ | ||||
\ | \ | ||||
gpu/lolfx.cpp gpu/lolfx.h \ | |||||
gpu/lolfx-compiler.cpp gpu/lolfx-compiler.h \ | gpu/lolfx-compiler.cpp gpu/lolfx-compiler.h \ | ||||
generated/lolfx-parser.cpp generated/lolfx-parser.h \ | generated/lolfx-parser.cpp generated/lolfx-parser.h \ | ||||
generated/lolfx-scanner.cpp \ | generated/lolfx-scanner.cpp \ | ||||
@@ -113,6 +113,7 @@ static inline int isnan(float f) | |||||
#include "dict.h" | #include "dict.h" | ||||
#include "map.h" | #include "map.h" | ||||
#include "layer.h" | #include "layer.h" | ||||
#include "gpu/lolfx.h" | |||||
#include "gpu/shader.h" | #include "gpu/shader.h" | ||||
#include "gpu/indexbuffer.h" | #include "gpu/indexbuffer.h" | ||||
#include "gpu/vertexbuffer.h" | #include "gpu/vertexbuffer.h" | ||||
@@ -0,0 +1,51 @@ | |||||
// | |||||
// Lol Engine | |||||
// | |||||
// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net> | |||||
// This program is free software; you can redistribute it and/or | |||||
// modify it under the terms of the Do What The Fuck You Want To | |||||
// Public License, Version 2, as published by Sam Hocevar. See | |||||
// http://sam.zoy.org/projects/COPYING.WTFPL for more details. | |||||
// | |||||
// | |||||
// The LolFx class | |||||
// --------------- | |||||
// | |||||
#if defined HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#if defined _XBOX | |||||
# define _USE_MATH_DEFINES /* for M_PI */ | |||||
# include <xtl.h> | |||||
# undef near /* Fuck Microsoft */ | |||||
# undef far /* Fuck Microsoft again */ | |||||
#elif defined _WIN32 | |||||
# define _USE_MATH_DEFINES /* for M_PI */ | |||||
# define WIN32_LEAN_AND_MEAN | |||||
# include <windows.h> | |||||
# undef near /* Fuck Microsoft */ | |||||
# undef far /* Fuck Microsoft again */ | |||||
#endif | |||||
#include "core.h" | |||||
#include "gpu/lolfx-compiler.h" | |||||
namespace lol | |||||
{ | |||||
LolFx::LolFx() | |||||
{ | |||||
; | |||||
} | |||||
bool LolFx::Compile(char const *command) | |||||
{ | |||||
LolFxCompiler lc(*this); | |||||
return lc.ParseString(command); | |||||
} | |||||
} /* namespace lol */ | |||||
@@ -0,0 +1,35 @@ | |||||
// | |||||
// Lol Engine | |||||
// | |||||
// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net> | |||||
// This program is free software; you can redistribute it and/or | |||||
// modify it under the terms of the Do What The Fuck You Want To | |||||
// Public License, Version 2, as published by Sam Hocevar. See | |||||
// http://sam.zoy.org/projects/COPYING.WTFPL for more details. | |||||
// | |||||
// | |||||
// The LolFx class | |||||
// --------------- | |||||
// | |||||
#if !defined __GPU_LOLFX_H__ | |||||
#define __GPU_LOLFX_H__ | |||||
namespace lol | |||||
{ | |||||
class LolFx | |||||
{ | |||||
friend class LolFxParser; | |||||
public: | |||||
LolFx(); | |||||
bool Compile(char const *command); | |||||
}; | |||||
} /* namespace lol */ | |||||
#endif /* __GPU_LOLFX_H__ */ | |||||
@@ -252,6 +252,7 @@ | |||||
<ClCompile Include="gpu\framebuffer.cpp" /> | <ClCompile Include="gpu\framebuffer.cpp" /> | ||||
<ClCompile Include="gpu\indexbuffer.cpp" /> | <ClCompile Include="gpu\indexbuffer.cpp" /> | ||||
<ClCompile Include="gpu\lolfx-compiler.cpp" /> | <ClCompile Include="gpu\lolfx-compiler.cpp" /> | ||||
<ClCompile Include="gpu\lolfx.cpp" /> | |||||
<ClCompile Include="gpu\shader.cpp" /> | <ClCompile Include="gpu\shader.cpp" /> | ||||
<ClCompile Include="gpu\vertexbuffer.cpp" /> | <ClCompile Include="gpu\vertexbuffer.cpp" /> | ||||
<ClCompile Include="gradient.cpp" /> | <ClCompile Include="gradient.cpp" /> | ||||
@@ -564,6 +565,7 @@ | |||||
<ClInclude Include="gpu\framebuffer.h" /> | <ClInclude Include="gpu\framebuffer.h" /> | ||||
<ClInclude Include="gpu\indexbuffer.h" /> | <ClInclude Include="gpu\indexbuffer.h" /> | ||||
<ClInclude Include="gpu\lolfx-compiler.h" /> | <ClInclude Include="gpu\lolfx-compiler.h" /> | ||||
<ClInclude Include="gpu\lolfx.h" /> | |||||
<ClInclude Include="gpu\shader.h" /> | <ClInclude Include="gpu\shader.h" /> | ||||
<ClInclude Include="gpu\vertexbuffer.h" /> | <ClInclude Include="gpu\vertexbuffer.h" /> | ||||
<ClInclude Include="gradient.h" /> | <ClInclude Include="gradient.h" /> | ||||
@@ -625,6 +625,9 @@ | |||||
<ClCompile Include="gpu\lolfx-compiler.cpp"> | <ClCompile Include="gpu\lolfx-compiler.cpp"> | ||||
<Filter>src\gpu</Filter> | <Filter>src\gpu</Filter> | ||||
</ClCompile> | </ClCompile> | ||||
<ClCompile Include="gpu\lolfx.cpp"> | |||||
<Filter>src\gpu</Filter> | |||||
</ClCompile> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ClInclude Include="image\image.h"> | <ClInclude Include="image\image.h"> | ||||
@@ -1560,6 +1563,9 @@ | |||||
<ClInclude Include="gpu\lolfx-compiler.h"> | <ClInclude Include="gpu\lolfx-compiler.h"> | ||||
<Filter>src\gpu</Filter> | <Filter>src\gpu</Filter> | ||||
</ClInclude> | </ClInclude> | ||||
<ClInclude Include="gpu\lolfx.h"> | |||||
<Filter>src\gpu</Filter> | |||||
</ClInclude> | |||||
<ClInclude Include="generated\lolfx-parser.h"> | <ClInclude Include="generated\lolfx-parser.h"> | ||||
<Filter>src\gpu</Filter> | <Filter>src\gpu</Filter> | ||||
</ClInclude> | </ClInclude> | ||||