No more Font:set(), instead love.graphics.setNewFont

This commit is contained in:
Bart van Strien
2011-12-13 19:22:59 +01:00
parent 9682ebecf9
commit e37470f54d
5 changed files with 23 additions and 19 deletions
-11
View File
@@ -19,7 +19,6 @@
**/
// LOVE
#include "Graphics.h"
#include "wrap_Font.h"
namespace love
@@ -28,8 +27,6 @@ namespace graphics
{
namespace opengl
{
extern Graphics * instance;
Font * luax_checkfont(lua_State * L, int idx)
{
return luax_checktype<Font>(L, idx, "Font", GRAPHICS_FONT_T);
@@ -92,20 +89,12 @@ namespace opengl
return 1;
}
int w_Font_set(lua_State * L)
{
Font * t = luax_checkfont(L, 1);
instance->setFont(t);
return 0;
}
static const luaL_Reg functions[] = {
{ "getHeight", w_Font_getHeight },
{ "getWidth", w_Font_getWidth },
{ "getWrap", w_Font_getWrap },
{ "setLineHeight", w_Font_setLineHeight },
{ "getLineHeight", w_Font_getLineHeight },
{ "set", w_Font_set },
{ 0, 0 }
};
-1
View File
@@ -37,7 +37,6 @@ namespace opengl
int w_Font_getWrap(lua_State * L);
int w_Font_setLineHeight(lua_State * L);
int w_Font_getLineHeight(lua_State * L);
int w_Font_set(lua_State * L);
int luaopen_font(lua_State * L);
} // opengl
@@ -32,7 +32,7 @@ namespace graphics
{
namespace opengl
{
Graphics * instance = 0;
static Graphics * instance = 0;
int w_checkMode(lua_State * L)
{