Lua binder compability changes

* A lot of changes in lua binder to compile with clang's libc++
* Add more portability to luabinder
* Remove const keyword from bound lua functions
* Deprecate std::bind usage with luabinder replace its usage with registerSingletonClass/bindSingletonFunction for binding singleton classes
* Fix a bug in lua binder where calling functions with bil object would make the client crash
* More fixes to compile with clang
This commit is contained in:
Eduardo Bart
2012-06-17 12:21:46 -03:00
parent 10b33c6124
commit ad04043a88
17 changed files with 368 additions and 397 deletions

View File

@@ -160,7 +160,7 @@ void BitmapFont::calculateDrawTextCoords(CoordsBuffer& coordsBuffer, const std::
const std::vector<Point>& BitmapFont::calculateGlyphsPositions(const std::string& text,
Fw::AlignmentFlag align,
Size *textBoxSize) const
Size *textBoxSize)
{
// for performance reasons we use statics vectors that are allocated on demand
static std::vector<Point> glyphsPositions(1);

View File

@@ -47,20 +47,20 @@ public:
/// Calculate glyphs positions to use on render, also calculates textBoxSize if wanted
const std::vector<Point>& calculateGlyphsPositions(const std::string& text,
Fw::AlignmentFlag align = Fw::AlignTopLeft,
Size* textBoxSize = NULL) const;
Size* textBoxSize = NULL);
/// Simulate render and calculate text size
Size calculateTextRectSize(const std::string& text);
std::string wrapText(const std::string& text, int maxWidth);
std::string getName() const { return m_name; }
int getGlyphHeight() const { return m_glyphHeight; }
const Rect* getGlyphsTextureCoords() const { return m_glyphsTextureCoords; }
const Size* getGlyphsSize() const { return m_glyphsSize; }
const TexturePtr& getTexture() const { return m_texture; }
int getYOffset() const { return m_yOffset; }
Size getGlyphSpacing() const { return m_glyphSpacing; }
std::string getName() { return m_name; }
int getGlyphHeight() { return m_glyphHeight; }
const Rect* getGlyphsTextureCoords() { return m_glyphsTextureCoords; }
const Size* getGlyphsSize() { return m_glyphsSize; }
const TexturePtr& getTexture() { return m_texture; }
int getYOffset() { return m_yOffset; }
Size getGlyphSpacing() { return m_glyphSpacing; }
private:
/// Calculates each font character by inspecting font bitmap

View File

@@ -67,10 +67,10 @@ public:
void updateCaches();
bool isHardwareCached() { return m_hardwareCached; }
float *getVertexArray() const { return m_vertexArray.vertices(); }
float *getTextureCoordArray() const { return m_textureCoordArray.vertices(); }
int getVertexCount() const { return m_vertexArray.vertexCount(); }
int getTextureCoordCount() const { return m_textureCoordArray.vertexCount(); }
float *getVertexArray() { return m_vertexArray.vertices(); }
float *getTextureCoordArray() { return m_textureCoordArray.vertices(); }
int getVertexCount() { return m_vertexArray.vertexCount(); }
int getTextureCoordCount() { return m_textureCoordArray.vertexCount(); }
HardwareBuffer *getHardwareVertexArray() { return m_hardwareVertexArray; }
HardwareBuffer *getHardwareTextureCoordArray() { return m_hardwareTextureCoordArray; }