trashed old unnecessary font stuff - compiles, but obviously will not work yet

--HG--
branch : newfont
This commit is contained in:
Bill Meltsner
2011-03-05 23:17:36 -05:00
parent ba44dfb682
commit 94b4319878
20 changed files with 28 additions and 627 deletions
@@ -26,8 +26,6 @@
A93E6E5510420B57007D418B /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; }; A93E6E5510420B57007D418B /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; };
A93E6EED10420BA8007D418B /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; }; A93E6EED10420BA8007D418B /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; };
A946CE821172BCD7005E1462 /* wrap_EncodedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A946CE811172BCD7005E1462 /* wrap_EncodedImageData.cpp */; }; A946CE821172BCD7005E1462 /* wrap_EncodedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A946CE811172BCD7005E1462 /* wrap_EncodedImageData.cpp */; };
A946D3BB117681BD005E1462 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A946D3BA117681BC005E1462 /* FontData.cpp */; };
A946D3C611768D69005E1462 /* wrap_FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A946D3C511768D69005E1462 /* wrap_FontData.cpp */; };
A946D67F104248DA002BF36C /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69EA10420ABF007D418B /* Reference.cpp */; }; A946D67F104248DA002BF36C /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69EA10420ABF007D418B /* Reference.cpp */; };
A946D680104248DA002BF36C /* Matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69E310420ABF007D418B /* Matrix.cpp */; }; A946D680104248DA002BF36C /* Matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69E310420ABF007D418B /* Matrix.cpp */; };
A946D681104248DA002BF36C /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69E810420ABF007D418B /* Object.cpp */; }; A946D681104248DA002BF36C /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E69E810420ABF007D418B /* Object.cpp */; };
@@ -84,8 +82,6 @@
A946D702104249A4002BF36C /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8D10420AC2007D418B /* Graphics.cpp */; }; A946D702104249A4002BF36C /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8D10420AC2007D418B /* Graphics.cpp */; };
A946D703104249A4002BF36C /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8710420AC2007D418B /* Font.cpp */; }; A946D703104249A4002BF36C /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8710420AC2007D418B /* Font.cpp */; };
A946D704104249A4002BF36C /* SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A9510420AC2007D418B /* SpriteBatch.cpp */; }; A946D704104249A4002BF36C /* SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A9510420AC2007D418B /* SpriteBatch.cpp */; };
A946D705104249A4002BF36C /* wrap_Glyph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A9B10420AC2007D418B /* wrap_Glyph.cpp */; };
A946D706104249A4002BF36C /* Glyph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8B10420AC2007D418B /* Glyph.cpp */; };
A946D708104249A4002BF36C /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8210420AC2007D418B /* Drawable.cpp */; }; A946D708104249A4002BF36C /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8210420AC2007D418B /* Drawable.cpp */; };
A946D709104249A4002BF36C /* wrap_Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */; }; A946D709104249A4002BF36C /* wrap_Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */; };
A946D70A104249A4002BF36C /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8F10420AC2007D418B /* Image.cpp */; }; A946D70A104249A4002BF36C /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A8F10420AC2007D418B /* Image.cpp */; };
@@ -362,8 +358,6 @@
A93E6A8810420AC2007D418B /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; }; A93E6A8810420AC2007D418B /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; };
A93E6A8910420AC2007D418B /* GLee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GLee.c; sourceTree = "<group>"; }; A93E6A8910420AC2007D418B /* GLee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GLee.c; sourceTree = "<group>"; };
A93E6A8A10420AC2007D418B /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLee.h; sourceTree = "<group>"; }; A93E6A8A10420AC2007D418B /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLee.h; sourceTree = "<group>"; };
A93E6A8B10420AC2007D418B /* Glyph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Glyph.cpp; sourceTree = "<group>"; };
A93E6A8C10420AC2007D418B /* Glyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Glyph.h; sourceTree = "<group>"; };
A93E6A8D10420AC2007D418B /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Graphics.cpp; sourceTree = "<group>"; }; A93E6A8D10420AC2007D418B /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Graphics.cpp; sourceTree = "<group>"; };
A93E6A8E10420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = "<group>"; }; A93E6A8E10420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = "<group>"; };
A93E6A8F10420AC2007D418B /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; }; A93E6A8F10420AC2007D418B /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; };
@@ -374,8 +368,6 @@
A93E6A9610420AC2007D418B /* SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteBatch.h; sourceTree = "<group>"; }; A93E6A9610420AC2007D418B /* SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteBatch.h; sourceTree = "<group>"; };
A93E6A9910420AC2007D418B /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = "<group>"; }; A93E6A9910420AC2007D418B /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = "<group>"; };
A93E6A9A10420AC2007D418B /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = "<group>"; }; A93E6A9A10420AC2007D418B /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = "<group>"; };
A93E6A9B10420AC2007D418B /* wrap_Glyph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Glyph.cpp; sourceTree = "<group>"; };
A93E6A9C10420AC2007D418B /* wrap_Glyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Glyph.h; sourceTree = "<group>"; };
A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Graphics.cpp; sourceTree = "<group>"; }; A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Graphics.cpp; sourceTree = "<group>"; };
A93E6A9E10420AC3007D418B /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; }; A93E6A9E10420AC3007D418B /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
A93E6A9F10420AC3007D418B /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = "<group>"; }; A93E6A9F10420AC3007D418B /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = "<group>"; };
@@ -572,10 +564,6 @@
A93E6E5310420B57007D418B /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = /Library/Frameworks/Lua.framework; sourceTree = "<absolute>"; }; A93E6E5310420B57007D418B /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = /Library/Frameworks/Lua.framework; sourceTree = "<absolute>"; };
A946CE801172BCD6005E1462 /* wrap_EncodedImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_EncodedImageData.h; sourceTree = "<group>"; }; A946CE801172BCD6005E1462 /* wrap_EncodedImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_EncodedImageData.h; sourceTree = "<group>"; };
A946CE811172BCD7005E1462 /* wrap_EncodedImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_EncodedImageData.cpp; sourceTree = "<group>"; }; A946CE811172BCD7005E1462 /* wrap_EncodedImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_EncodedImageData.cpp; sourceTree = "<group>"; };
A946D3B9117681BC005E1462 /* FontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontData.h; sourceTree = "<group>"; };
A946D3BA117681BC005E1462 /* FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontData.cpp; sourceTree = "<group>"; };
A946D3C411768D69005E1462 /* wrap_FontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_FontData.h; sourceTree = "<group>"; };
A946D3C511768D69005E1462 /* wrap_FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_FontData.cpp; sourceTree = "<group>"; };
A946D4421176AC42005E1462 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; }; A946D4421176AC42005E1462 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; };
A95684F5125D3555001B276B /* b64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b64.cpp; sourceTree = "<group>"; }; A95684F5125D3555001B276B /* b64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b64.cpp; sourceTree = "<group>"; };
A95684F6125D3555001B276B /* b64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b64.h; sourceTree = "<group>"; }; A95684F6125D3555001B276B /* b64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b64.h; sourceTree = "<group>"; };
@@ -939,8 +927,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A946D4421176AC42005E1462 /* Font.h */, A946D4421176AC42005E1462 /* Font.h */,
A946D3BA117681BC005E1462 /* FontData.cpp */,
A946D3B9117681BC005E1462 /* FontData.h */,
A93E6A7010420AC1007D418B /* freetype */, A93E6A7010420AC1007D418B /* freetype */,
A93E6A7710420AC2007D418B /* GlyphData.cpp */, A93E6A7710420AC2007D418B /* GlyphData.cpp */,
A93E6A7810420AC2007D418B /* GlyphData.h */, A93E6A7810420AC2007D418B /* GlyphData.h */,
@@ -948,8 +934,6 @@
A93E6A7A10420AC2007D418B /* ImageRasterizer.h */, A93E6A7A10420AC2007D418B /* ImageRasterizer.h */,
A93E6A7B10420AC2007D418B /* Rasterizer.cpp */, A93E6A7B10420AC2007D418B /* Rasterizer.cpp */,
A93E6A7C10420AC2007D418B /* Rasterizer.h */, A93E6A7C10420AC2007D418B /* Rasterizer.h */,
A946D3C511768D69005E1462 /* wrap_FontData.cpp */,
A946D3C411768D69005E1462 /* wrap_FontData.h */,
A93E6A7D10420AC2007D418B /* wrap_GlyphData.cpp */, A93E6A7D10420AC2007D418B /* wrap_GlyphData.cpp */,
A93E6A7E10420AC2007D418B /* wrap_GlyphData.h */, A93E6A7E10420AC2007D418B /* wrap_GlyphData.h */,
A93E6A7F10420AC2007D418B /* wrap_Rasterizer.cpp */, A93E6A7F10420AC2007D418B /* wrap_Rasterizer.cpp */,
@@ -996,8 +980,6 @@
A9BD60711226C988007DEC63 /* Framebuffer.h */, A9BD60711226C988007DEC63 /* Framebuffer.h */,
A93E6A8910420AC2007D418B /* GLee.c */, A93E6A8910420AC2007D418B /* GLee.c */,
A93E6A8A10420AC2007D418B /* GLee.h */, A93E6A8A10420AC2007D418B /* GLee.h */,
A93E6A8B10420AC2007D418B /* Glyph.cpp */,
A93E6A8C10420AC2007D418B /* Glyph.h */,
A93E6A8D10420AC2007D418B /* Graphics.cpp */, A93E6A8D10420AC2007D418B /* Graphics.cpp */,
A93E6A8E10420AC2007D418B /* Graphics.h */, A93E6A8E10420AC2007D418B /* Graphics.h */,
A93E6A8F10420AC2007D418B /* Image.cpp */, A93E6A8F10420AC2007D418B /* Image.cpp */,
@@ -1012,8 +994,6 @@
A93E6A9A10420AC2007D418B /* wrap_Font.h */, A93E6A9A10420AC2007D418B /* wrap_Font.h */,
A9BD60721226C988007DEC63 /* wrap_Framebuffer.cpp */, A9BD60721226C988007DEC63 /* wrap_Framebuffer.cpp */,
A9BD60731226C988007DEC63 /* wrap_Framebuffer.h */, A9BD60731226C988007DEC63 /* wrap_Framebuffer.h */,
A93E6A9B10420AC2007D418B /* wrap_Glyph.cpp */,
A93E6A9C10420AC2007D418B /* wrap_Glyph.h */,
A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */, A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */,
A93E6A9E10420AC3007D418B /* wrap_Graphics.h */, A93E6A9E10420AC3007D418B /* wrap_Graphics.h */,
A93E6A9F10420AC3007D418B /* wrap_Image.cpp */, A93E6A9F10420AC3007D418B /* wrap_Image.cpp */,
@@ -1542,8 +1522,6 @@
A946D702104249A4002BF36C /* Graphics.cpp in Sources */, A946D702104249A4002BF36C /* Graphics.cpp in Sources */,
A946D703104249A4002BF36C /* Font.cpp in Sources */, A946D703104249A4002BF36C /* Font.cpp in Sources */,
A946D704104249A4002BF36C /* SpriteBatch.cpp in Sources */, A946D704104249A4002BF36C /* SpriteBatch.cpp in Sources */,
A946D705104249A4002BF36C /* wrap_Glyph.cpp in Sources */,
A946D706104249A4002BF36C /* Glyph.cpp in Sources */,
A946D708104249A4002BF36C /* Drawable.cpp in Sources */, A946D708104249A4002BF36C /* Drawable.cpp in Sources */,
A946D709104249A4002BF36C /* wrap_Graphics.cpp in Sources */, A946D709104249A4002BF36C /* wrap_Graphics.cpp in Sources */,
A946D70A104249A4002BF36C /* Image.cpp in Sources */, A946D70A104249A4002BF36C /* Image.cpp in Sources */,
@@ -1648,8 +1626,6 @@
A986DEB5113249A800810279 /* Thread.cpp in Sources */, A986DEB5113249A800810279 /* Thread.cpp in Sources */,
A986DEB6113249A800810279 /* wrap_Thread.cpp in Sources */, A986DEB6113249A800810279 /* wrap_Thread.cpp in Sources */,
A946CE821172BCD7005E1462 /* wrap_EncodedImageData.cpp in Sources */, A946CE821172BCD7005E1462 /* wrap_EncodedImageData.cpp in Sources */,
A946D3BB117681BD005E1462 /* FontData.cpp in Sources */,
A946D3C611768D69005E1462 /* wrap_FontData.cpp in Sources */,
A9BD60741226C988007DEC63 /* Framebuffer.cpp in Sources */, A9BD60741226C988007DEC63 /* Framebuffer.cpp in Sources */,
A9BD60751226C988007DEC63 /* wrap_Framebuffer.cpp in Sources */, A9BD60751226C988007DEC63 /* wrap_Framebuffer.cpp in Sources */,
A95684F7125D3555001B276B /* b64.cpp in Sources */, A95684F7125D3555001B276B /* b64.cpp in Sources */,
-2
View File
@@ -22,7 +22,6 @@
#define LOVE_FONT_FONT_H #define LOVE_FONT_FONT_H
// LOVE // LOVE
#include "FontData.h"
#include "Rasterizer.h" #include "Rasterizer.h"
#include <image/ImageData.h> #include <image/ImageData.h>
#include <common/Module.h> #include <common/Module.h>
@@ -44,7 +43,6 @@ namespace font
virtual Rasterizer * newRasterizer(love::image::ImageData * data, std::string glyphs) = 0; virtual Rasterizer * newRasterizer(love::image::ImageData * data, std::string glyphs) = 0;
virtual Rasterizer * newRasterizer(love::image::ImageData * data, unsigned short * glyphs, int length) = 0; virtual Rasterizer * newRasterizer(love::image::ImageData * data, unsigned short * glyphs, int length) = 0;
virtual GlyphData * newGlyphData(Rasterizer * r, unsigned short glyph) = 0; virtual GlyphData * newGlyphData(Rasterizer * r, unsigned short glyph) = 0;
virtual FontData * newFontData(Rasterizer * r) = 0;
// Implement Module // Implement Module
virtual const char * getName() const = 0; virtual const char * getName() const = 0;
-67
View File
@@ -1,67 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "FontData.h"
namespace love
{
namespace font
{
FontData::FontData(Rasterizer * raster)
: raster(raster)
{
data = new GlyphData *[MAX_CHARS];
for (unsigned int i = 0; i < MAX_CHARS; i++) {
data[i] = raster->getGlyphData(i);
}
}
FontData::~FontData()
{
for (unsigned int i = 0; i < MAX_CHARS; i++) {
data[i]->release();
}
delete[] data;
}
void * FontData::getData() const
{
return (void *)data;
}
int FontData::getSize() const
{
return MAX_CHARS;
}
GlyphData * FontData::getGlyphData(unsigned short glyph) const
{
return data[glyph];
}
int FontData::getHeight() const
{
return raster->getHeight();
}
} // font
} // love
-56
View File
@@ -1,56 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_FONT_FONT_DATA_H
#define LOVE_FONT_FONT_DATA_H
// LOVE
#include <common/Data.h>
#include "GlyphData.h"
#include "Rasterizer.h"
namespace love
{
namespace font
{
class FontData : public Data
{
public:
FontData(Rasterizer * raster);
virtual ~FontData();
// Implements Data.
void * getData() const;
int getSize() const;
GlyphData * getGlyphData(unsigned short glyph) const;
int getHeight() const;
static const unsigned int MAX_CHARS = 256;
private:
GlyphData ** data;
Rasterizer * raster;
};
} // font
} // love
#endif // LOVE_FONT_FONT_DATA_H
-5
View File
@@ -67,11 +67,6 @@ namespace freetype
return r->getGlyphData(glyph); return r->getGlyphData(glyph);
} }
FontData * Font::newFontData(Rasterizer * r)
{
return new FontData(r);
}
const char * Font::getName() const const char * Font::getName() const
{ {
return "love.font.freetype"; return "love.font.freetype";
-1
View File
@@ -63,7 +63,6 @@ namespace freetype
Rasterizer * newRasterizer(love::image::ImageData * data, std::string glyphs); Rasterizer * newRasterizer(love::image::ImageData * data, std::string glyphs);
Rasterizer * newRasterizer(love::image::ImageData * data, unsigned short * glyphs, int length); Rasterizer * newRasterizer(love::image::ImageData * data, unsigned short * glyphs, int length);
GlyphData * newGlyphData(Rasterizer * r, unsigned short glyph); GlyphData * newGlyphData(Rasterizer * r, unsigned short glyph);
FontData * newFontData(Rasterizer * r);
// Implement Module // Implement Module
const char * getName() const; const char * getName() const;
-11
View File
@@ -22,7 +22,6 @@
#include "Font.h" #include "Font.h"
#include <font/wrap_FontData.h>
#include <font/wrap_GlyphData.h> #include <font/wrap_GlyphData.h>
#include <font/wrap_Rasterizer.h> #include <font/wrap_Rasterizer.h>
@@ -65,24 +64,14 @@ namespace freetype
return 1; return 1;
} }
int w_newFontData(lua_State * L)
{
Rasterizer * r = luax_checkrasterizer(L, 1);
FontData * f = instance->newFontData(r);
luax_newtype(L, "FontData", FONT_FONT_DATA_T, (void*)f);
return 1;
}
// List of functions to wrap. // List of functions to wrap.
static const luaL_Reg functions[] = { static const luaL_Reg functions[] = {
{ "newRasterizer", w_newRasterizer }, { "newRasterizer", w_newRasterizer },
{ "newGlyphData", w_newGlyphData }, { "newGlyphData", w_newGlyphData },
{ "newFontData", w_newFontData },
{ 0, 0 } { 0, 0 }
}; };
static const lua_CFunction types[] = { static const lua_CFunction types[] = {
luaopen_fontdata,
luaopen_glyphdata, luaopen_glyphdata,
luaopen_rasterizer, luaopen_rasterizer,
0 0
-46
View File
@@ -1,46 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "wrap_FontData.h"
#include <common/wrap_Data.h>
namespace love
{
namespace font
{
FontData * luax_checkfontdata(lua_State * L, int idx)
{
return luax_checktype<FontData>(L, idx, "FontData", FONT_FONT_DATA_T);
}
static const luaL_Reg functions[] = {
{ "getPointer", w_Data_getPointer },
{ "getSize", w_Data_getSize },
{ 0, 0 }
};
int luaopen_fontdata(lua_State * L)
{
return luax_register_type(L, "FontData", functions);
}
} // font
} // love
-39
View File
@@ -1,39 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_FONT_WRAP_FONT_DATA_H
#define LOVE_FONT_WRAP_FONT_DATA_H
// LOVE
#include <common/runtime.h>
#include "FontData.h"
namespace love
{
namespace font
{
FontData * luax_checkfontdata(lua_State * L, int idx);
int luaopen_fontdata(lua_State * L);
} // font
} // love
#endif // LOVE_FONT_WRAP_FONT_DATA_H
+11 -19
View File
@@ -31,18 +31,15 @@ namespace graphics
namespace opengl namespace opengl
{ {
Font::Font(love::font::FontData * data, const Image::Filter& filter) Font::Font(love::font::Rasterizer * r, const Image::Filter& filter)
: height(data->getHeight()), lineHeight(1), mSpacing(1) : rasterizer(r), height(r->getHeight()), lineHeight(1), mSpacing(1)
{ {
glyphs = new Glyph*[MAX_CHARS];
type = FONT_UNKNOWN; type = FONT_UNKNOWN;
love::font::GlyphData * gd; love::font::GlyphData * gd;
for(unsigned int i = 0; i < MAX_CHARS; i++) for(unsigned int i = 0; i < MAX_CHARS; i++)
{ {
gd = data->getGlyphData(i); gd = r->getGlyphData(i);
glyphs[i] = new Glyph(gd, filter);
glyphs[i]->load();
widths[i] = gd->getWidth(); widths[i] = gd->getWidth();
spacing[i] = gd->getAdvance(); spacing[i] = gd->getAdvance();
bearingX[i] = gd->getBearingX(); bearingX[i] = gd->getBearingX();
@@ -53,11 +50,6 @@ namespace opengl
Font::~Font() Font::~Font()
{ {
for(unsigned int i = 0; i < MAX_CHARS; i++)
{
glyphs[i]->release();
}
delete[] glyphs;
} }
float Font::getHeight() const float Font::getHeight() const
@@ -67,7 +59,7 @@ namespace opengl
void Font::print(std::string text, float x, float y, float angle, float sx, float sy) const void Font::print(std::string text, float x, float y, float angle, float sx, float sy) const
{ {
float dx = 0.0f; // spacing counter for newline handling /*float dx = 0.0f; // spacing counter for newline handling
glPushMatrix(); glPushMatrix();
glTranslatef(ceil(x), ceil(y), 0.0f); glTranslatef(ceil(x), ceil(y), 0.0f);
@@ -89,16 +81,16 @@ namespace opengl
glTranslatef(static_cast<GLfloat>(spacing[g]), 0, 0); glTranslatef(static_cast<GLfloat>(spacing[g]), 0, 0);
dx += spacing[g]; dx += spacing[g];
} }
glPopMatrix(); glPopMatrix();*/
} }
void Font::print(char character, float x, float y) const void Font::print(char character, float x, float y) const
{ {
if (!glyphs[(int)character]) character = ' '; /*if (!glyphs[(int)character]) character = ' ';
glPushMatrix(); glPushMatrix();
glTranslatef(x, floor(y+getHeight() + 0.5f), 0.0f); glTranslatef(x, floor(y+getHeight() + 0.5f), 0.0f);
glCallList(list+character); glCallList(list+character);
glPopMatrix(); glPopMatrix();*/
} }
int Font::getWidth(const std::string & line) const int Font::getWidth(const std::string & line) const
@@ -181,7 +173,7 @@ namespace opengl
bool Font::loadVolatile() bool Font::loadVolatile()
{ {
// reload all glyphs /*// reload all glyphs
for(unsigned int i = 0; i < MAX_CHARS; i++) for(unsigned int i = 0; i < MAX_CHARS; i++)
{ {
glyphs[i]->load(); glyphs[i]->load();
@@ -189,13 +181,13 @@ namespace opengl
glyphs[i]->draw(0, 0, 0, 1, 1, 0, 0); glyphs[i]->draw(0, 0, 0, 1, 1, 0, 0);
glEndList(); glEndList();
} }
return true; return true;*/
} }
void Font::unloadVolatile() void Font::unloadVolatile()
{ {
// delete the glyphs /*// delete the glyphs
glDeleteLists(list, MAX_CHARS); glDeleteLists(list, MAX_CHARS);*/
} }
} // opengl } // opengl
+6 -4
View File
@@ -26,9 +26,10 @@
// LOVE // LOVE
#include <common/Object.h> #include <common/Object.h>
#include <font/FontData.h> #include <font/Rasterizer.h>
#include <graphics/Image.h> #include <graphics/Image.h>
#include "Glyph.h"
#include "GLee.h"
namespace love namespace love
{ {
@@ -47,10 +48,11 @@ namespace opengl
FONT_UNKNOWN FONT_UNKNOWN
}; };
love::font::Rasterizer * rasterizer;
int height; int height;
float lineHeight; float lineHeight;
float mSpacing; // modifies the spacing by multiplying it with this value float mSpacing; // modifies the spacing by multiplying it with this value
Glyph ** glyphs;
GLuint list; // the list of glyphs, for quicker drawing GLuint list; // the list of glyphs, for quicker drawing
FontType type; FontType type;
@@ -70,7 +72,7 @@ namespace opengl
* *
* @param data The font data to construct from. * @param data The font data to construct from.
**/ **/
Font(love::font::FontData * data, const Image::Filter& filter = Image::Filter()); Font(love::font::Rasterizer * r, const Image::Filter& filter = Image::Filter());
virtual ~Font(); virtual ~Font();
-147
View File
@@ -1,147 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "Glyph.h"
// STD
#include <cstring> // For memcpy
namespace love
{
namespace graphics
{
namespace opengl
{
Glyph::Glyph(love::font::GlyphData * data, const Image::Filter& filter_)
: data(data),
width((float)data->getWidth()), height((float)data->getHeight()),
texture(0), filter(filter_)
{
data->retain();
memset(vertices, 255, sizeof(vertex)*4);
vertices[0].x = 0; vertices[0].y = 0;
vertices[1].x = 0; vertices[1].y = height;
vertices[2].x = width; vertices[2].y = height;
vertices[3].x = width; vertices[3].y = 0;
vertices[0].s = 0; vertices[0].t = 0;
vertices[1].s = 0; vertices[1].t = 1;
vertices[2].s = 1; vertices[2].t = 1;
vertices[3].s = 1; vertices[3].t = 0;
}
Glyph::~Glyph()
{
if(data != 0)
data->release();
unload();
}
void Glyph::draw(float x, float y, float angle, float sx, float sy, float ox, float oy) const
{
static Matrix t;
t.setTransformation(x, y, angle, sx, sy, ox, oy);
if(texture != 0)
glBindTexture(GL_TEXTURE_2D,texture);
glPushMatrix();
glMultMatrixf((const GLfloat*)t.getElements());
glTranslatef(static_cast<float>(data->getBearingX()), static_cast<float>(-data->getBearingY()), 0.0f);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid*)&vertices[0].x);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid*)&vertices[0].s);
glDrawArrays(GL_QUADS, 0, 4);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glPopMatrix();
}
bool Glyph::load()
{
return loadVolatile();
}
void Glyph::unload()
{
unloadVolatile();
}
bool Glyph::loadVolatile()
{
GLint format = GL_RGBA;
if (data->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA) format = GL_LUMINANCE_ALPHA;
glGenTextures(1,&texture);
glBindTexture(GL_TEXTURE_2D, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
(filter.mag == Image::FILTER_LINEAR) ? GL_LINEAR : GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
(filter.min == Image::FILTER_LINEAR) ? GL_LINEAR : GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGBA,
(GLsizei)width,
(GLsizei)height,
0,
format,
GL_UNSIGNED_BYTE,
data->getData());
return true;
}
void Glyph::unloadVolatile()
{
// Delete the hardware texture.
if(texture != 0)
{
glDeleteTextures(1, (GLuint*)&texture);
texture = 0;
}
}
float Glyph::getWidth() const
{
return width;
}
float Glyph::getHeight() const
{
return height;
}
} // opengl
} // graphics
} // love
-82
View File
@@ -1,82 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_GRAPHICS_OPENGL_GLYPH_H
#define LOVE_GRAPHICS_OPENGL_GLYPH_H
// LOVE
#include <common/config.h>
#include <common/math.h>
#include <common/Matrix.h>
#include <font/GlyphData.h>
#include <graphics/Drawable.h>
#include <graphics/Volatile.h>
#include <graphics/Image.h>
// OpenGL
#include "GLee.h"
#include <SDL/SDL_opengl.h>
namespace love
{
namespace graphics
{
namespace opengl
{
class Glyph : public Drawable, public Volatile
{
private:
love::font::GlyphData * data;
float width, height;
GLuint texture;
vertex vertices[4];
Image::Filter filter;
public:
Glyph(love::font::GlyphData * data, const Image::Filter& filter_ = Image::Filter());
virtual ~Glyph();
bool load();
void unload();
// Implements Volatile.
bool loadVolatile();
void unloadVolatile();
float getWidth() const;
float getHeight() const;
void draw(float x, float y, float angle, float sx, float sy, float ox, float oy) const;
}; // Glyph
} // opengl
} // graphics
} // love
#endif // LOVE_GRAPHICS_OPENGL_GLYPH_H
+2 -2
View File
@@ -472,9 +472,9 @@ namespace opengl
return new Quad(v, sw, sh); return new Quad(v, sw, sh);
} }
Font * Graphics::newFont(love::font::FontData * data, const Image::Filter& filter) Font * Graphics::newFont(love::font::Rasterizer * r, const Image::Filter& filter)
{ {
Font * font = new Font(data, filter); Font * font = new Font(r, filter);
// Load it and check for errors. // Load it and check for errors.
if(!font) if(!font)
+1 -3
View File
@@ -33,8 +33,6 @@
// LOVE // LOVE
#include <graphics/Graphics.h> #include <graphics/Graphics.h>
#include <font/FontData.h>
#include <image/Image.h> #include <image/Image.h>
#include <image/ImageData.h> #include <image/ImageData.h>
@@ -261,7 +259,7 @@ namespace opengl
/** /**
* Creates a Font object. * Creates a Font object.
**/ **/
Font * newFont(love::font::FontData * data, const Image::Filter& filter = Image::Filter()); Font * newFont(love::font::Rasterizer * data, const Image::Filter& filter = Image::Filter());
SpriteBatch * newSpriteBatch(Image * image, int size, int usage); SpriteBatch * newSpriteBatch(Image * image, int size, int usage);
@@ -1,47 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
// LOVE
#include "wrap_Glyph.h"
namespace love
{
namespace graphics
{
namespace opengl
{
Glyph * luax_checkglyph(lua_State * L, int idx)
{
return luax_checktype<Glyph>(L, idx, "Glyph", GRAPHICS_GLYPH_T);
}
static const luaL_Reg functions[] = {
{ 0, 0 }
};
int luaopen_glyph(lua_State * L)
{
luax_register_type(L, "Glyph", functions);
return 0;
}
} // opengl
} // graphics
} // love
-41
View File
@@ -1,41 +0,0 @@
/**
* Copyright (c) 2006-2011 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_GRAPHICS_OPENGL_WRAP_GLYPH_H
#define LOVE_GRAPHICS_OPENGL_WRAP_GLYPH_H
// LOVE
#include <common/runtime.h>
#include "Glyph.h"
namespace love
{
namespace graphics
{
namespace opengl
{
Glyph * luax_checkglyph(lua_State * L, int idx);
int luaopen_glyph(lua_State * L);
} // opengl
} // graphics
} // love
#endif // LOVE_GRAPHICS_OPENGL_WRAP_GLYPH_H
+6 -27
View File
@@ -22,7 +22,6 @@
#include <image/ImageData.h> #include <image/ImageData.h>
#include <font/Rasterizer.h> #include <font/Rasterizer.h>
#include <font/FontData.h>
#include <scripts/graphics.lua.h> #include <scripts/graphics.lua.h>
@@ -175,20 +174,6 @@ namespace opengl
return 1; return 1;
} }
int w_newGlyph(lua_State * L)
{
love::font::GlyphData * data = luax_checktype<love::font::GlyphData>(L, 1, "GlyphData", FONT_GLYPH_DATA_T);
// Create the image.
Glyph * t = new Glyph(data);
t->load();
// Push the type.
luax_newtype(L, "Glyph", GRAPHICS_GLYPH_T, (void*)t);
return 1;
}
int w_newQuad(lua_State * L) int w_newQuad(lua_State * L)
{ {
int x = luaL_checkint(L, 1); int x = luaL_checkint(L, 1);
@@ -234,14 +219,10 @@ namespace opengl
luax_convobj(L, idxs, 2, "font", "newRasterizer"); luax_convobj(L, idxs, 2, "font", "newRasterizer");
} }
// Convert to FontData, if necessary. love::font::Rasterizer * rasterizer = luax_checktype<love::font::Rasterizer>(L, 1, "Rasterizer", FONT_RASTERIZER_T);
if(luax_istype(L, 1, FONT_RASTERIZER_T))
luax_convobj(L, 1, "font", "newFontData");
love::font::FontData * data = luax_checktype<love::font::FontData>(L, 1, "FontData", FONT_FONT_DATA_T);
// Create the font. // Create the font.
Font * font = instance->newFont(data); Font * font = instance->newFont(rasterizer);
if(font == 0) if(font == 0)
return luaL_error(L, "Could not load font."); return luaL_error(L, "Could not load font.");
@@ -278,10 +259,10 @@ namespace opengl
if(luax_istype(L, 1, FONT_RASTERIZER_T)) if(luax_istype(L, 1, FONT_RASTERIZER_T))
luax_convobj(L, 1, "font", "newFontData"); luax_convobj(L, 1, "font", "newFontData");
love::font::FontData * data = luax_checktype<love::font::FontData>(L, 1, "FontData", FONT_FONT_DATA_T); love::font::Rasterizer * rasterizer = luax_checktype<love::font::Rasterizer>(L, 1, "Rasterizer", FONT_RASTERIZER_T);
// Create the font. // Create the font.
Font * font = instance->newFont(data, img_filter); Font * font = instance->newFont(rasterizer, img_filter);
if(font == 0) if(font == 0)
return luaL_error(L, "Could not load font."); return luaL_error(L, "Could not load font.");
@@ -473,10 +454,10 @@ namespace opengl
if(luax_istype(L, 1, FONT_RASTERIZER_T)) if(luax_istype(L, 1, FONT_RASTERIZER_T))
luax_convobj(L, 1, "font", "newFontData"); luax_convobj(L, 1, "font", "newFontData");
love::font::FontData * data = luax_checktype<love::font::FontData>(L, 1, "FontData", FONT_FONT_DATA_T); love::font::Rasterizer * rasterizer = luax_checktype<love::font::Rasterizer>(L, 1, "Rasterizer", FONT_RASTERIZER_T);
// Create the font. // Create the font.
font = instance->newFont(data); font = instance->newFont(rasterizer);
if(font == 0) if(font == 0)
return luaL_error(L, "Could not load font."); return luaL_error(L, "Could not load font.");
@@ -934,7 +915,6 @@ namespace opengl
{ "present", w_present }, { "present", w_present },
{ "newImage", w_newImage }, { "newImage", w_newImage },
{ "newGlyph", w_newGlyph },
{ "newQuad", w_newQuad }, { "newQuad", w_newQuad },
{ "newFont1", w_newFont1 }, { "newFont1", w_newFont1 },
{ "newImageFont", w_newImageFont }, { "newImageFont", w_newImageFont },
@@ -1017,7 +997,6 @@ namespace opengl
static const lua_CFunction types[] = { static const lua_CFunction types[] = {
luaopen_font, luaopen_font,
luaopen_image, luaopen_image,
luaopen_glyph,
luaopen_frame, luaopen_frame,
luaopen_spritebatch, luaopen_spritebatch,
luaopen_particlesystem, luaopen_particlesystem,
@@ -24,7 +24,6 @@
// LOVE // LOVE
#include "wrap_Font.h" #include "wrap_Font.h"
#include "wrap_Image.h" #include "wrap_Image.h"
#include "wrap_Glyph.h"
#include "wrap_Quad.h" #include "wrap_Quad.h"
#include "wrap_SpriteBatch.h" #include "wrap_SpriteBatch.h"
#include "wrap_ParticleSystem.h" #include "wrap_ParticleSystem.h"
@@ -52,7 +51,6 @@ namespace opengl
int w_setScissor(lua_State * L); int w_setScissor(lua_State * L);
int w_getScissor(lua_State * L); int w_getScissor(lua_State * L);
int w_newImage(lua_State * L); int w_newImage(lua_State * L);
int w_newGlyph(lua_State * L);
int w_newQuad(lua_State * L); int w_newQuad(lua_State * L);
int w_newFrame(lua_State * L); int w_newFrame(lua_State * L);
int w_newFont1(lua_State * L); int w_newFont1(lua_State * L);
+2 -2
View File
@@ -77,7 +77,7 @@ namespace sdl
Thread *t = luax_checkthread(L, 1); Thread *t = luax_checkthread(L, 1);
std::string name = luax_checklstring(L, 2); std::string name = luax_checklstring(L, 2);
t->lock(); t->lock();
ThreadVariant *v = t->receive(name); ThreadVariant *v = t->get(name);
t->clear(name); t->clear(name);
t->unlock(); t->unlock();
if (!v) if (!v)
@@ -167,7 +167,7 @@ namespace sdl
Thread *t = luax_checkthread(L, 1); Thread *t = luax_checkthread(L, 1);
std::string name = luax_checklstring(L, 2); std::string name = luax_checklstring(L, 2);
t->lock(); t->lock();
ThreadVariant *v = t->receive(name); ThreadVariant *v = t->get(name);
t->unlock(); t->unlock();
if (!v) if (!v)
{ {