int w_SpriteBatch_add(lua_State * L) { SpriteBatch * t = luax_checkspritebatch(L, 1); float x = (float)luaL_optnumber(L, 2, 0.0f); float y = (float)luaL_optnumber(L, 3, 0.0f); float angle = (float)luaL_optnumber(L, 4, 0.0f); float sx = (float)luaL_optnumber(L, 5, 1.0f); float sy = (float)luaL_optnumber(L, 6, sx); float ox = (float)luaL_optnumber(L, 7, 0); float oy = (float)luaL_optnumber(L, 8, 0); t->add(x, y, angle, sx, sy, ox, oy); return 0; }
int w_SpriteBatch_set(lua_State *L) { SpriteBatch *t = luax_checkspritebatch(L, 1); int index = luaL_checkinteger(L, 2); float x = (float)luaL_optnumber(L, 3, 0.0f); float y = (float)luaL_optnumber(L, 4, 0.0f); float angle = (float)luaL_optnumber(L, 5, 0.0f); float sx = (float)luaL_optnumber(L, 6, 1.0f); float sy = (float)luaL_optnumber(L, 7, sx); float ox = (float)luaL_optnumber(L, 8, 0); float oy = (float)luaL_optnumber(L, 9, 0); float kx = (float)luaL_optnumber(L, 10, 0); float ky = (float)luaL_optnumber(L, 11, 0); t->add(x, y, angle, sx, sy, ox, oy, kx, ky, index); return 0; }