Permalink
Browse files

changes to the sprite sheet

  • Loading branch information...
jonbro committed Apr 18, 2012
1 parent fd82cca commit 7944692f878c9a29974ff03f823e1534c1d2e795
Showing with 7 additions and 1 deletion.
  1. +2 −0 src/bludSpriteSheet.cpp
  2. +5 −1 src/bludSpriteSheet.h
View
@@ -39,12 +39,14 @@ Lunar<bludSpriteSheet>::RegType bludSpriteSheet::methods[] = {
method(bludSpriteSheet, addCenterRotatedTile),
method(bludSpriteSheet, addCornerTile),
method(bludSpriteSheet, addCornerColorTile),
+ method(bludSpriteSheet, setBlendMode),
{0,0}
};
bludSpriteSheet::bludSpriteSheet(lua_State *L){
texture = new LinearTexture();
spriteRenderer = new ofxSpriteSheetRenderer(luaL_checknumber(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), luaL_checknumber(L, 4));
+ blendMode = 0;
}
int bludSpriteSheet::loadTexture(lua_State *L){
View
@@ -139,7 +139,10 @@ class bludSpriteSheet {
bludSpriteSheet(lua_State *L);
int loadTexture(lua_State *L);
int setupTexture(lua_State *L);
-
+ int setBlendMode(lua_State *L) {
+ blendMode = luaL_checknumber(L, 1);
+ return 1;
+ }
int clear(lua_State *L) {
spriteRenderer->clear();
return 1;
@@ -332,6 +335,7 @@ class bludSpriteSheet {
delete texture;
printf("deleted sprite sheet (%p)\n", this);
}
+ int blendMode;
LinearTexture *texture;
ofxSpriteSheetRenderer * spriteRenderer;
private:

0 comments on commit 7944692

Please sign in to comment.