Cleanup: remove references to DrawSprite API method (debug method to draw on SFML window for a single frame)
This commit is contained in:
parent
c1c17bab69
commit
232ce34d54
|
@ -19,9 +19,6 @@ bool McRFPy_API::do_camfollow;
|
||||||
EntityManager McRFPy_API::entities;
|
EntityManager McRFPy_API::entities;
|
||||||
|
|
||||||
static PyMethodDef mcrfpyMethods[] = {
|
static PyMethodDef mcrfpyMethods[] = {
|
||||||
{"drawSprite", McRFPy_API::_drawSprite, METH_VARARGS,
|
|
||||||
"Draw a sprite (index, x, y)"},
|
|
||||||
|
|
||||||
{"createMenu", McRFPy_API::_createMenu, METH_VARARGS,
|
{"createMenu", McRFPy_API::_createMenu, METH_VARARGS,
|
||||||
"Create a new uimenu (name_str, x, y, w, h)"},
|
"Create a new uimenu (name_str, x, y, w, h)"},
|
||||||
|
|
||||||
|
@ -176,29 +173,6 @@ void McRFPy_API::setSpriteTexture(int ti)
|
||||||
// functionality
|
// functionality
|
||||||
//void McRFPy_API::
|
//void McRFPy_API::
|
||||||
|
|
||||||
// functionality
|
|
||||||
void McRFPy_API::drawSprite(int tex_index, int grid_x, int grid_y)
|
|
||||||
{
|
|
||||||
setSpriteTexture(tex_index);
|
|
||||||
sprite.setPosition(
|
|
||||||
sf::Vector2f(grid_x * texture_size,
|
|
||||||
grid_y * texture_size)
|
|
||||||
);
|
|
||||||
game->getWindow().draw(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
// python connection
|
|
||||||
PyObject* McRFPy_API::_drawSprite(PyObject *self, PyObject *args)
|
|
||||||
{
|
|
||||||
int ti, gx, gy;
|
|
||||||
if (!PyArg_ParseTuple(args, "iii", &ti, &gx, &gy)) return NULL;
|
|
||||||
drawSprite(ti, gx, gy);
|
|
||||||
|
|
||||||
// return None correctly
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return Py_None;
|
|
||||||
}
|
|
||||||
|
|
||||||
void McRFPy_API::api_init() {
|
void McRFPy_API::api_init() {
|
||||||
|
|
||||||
// build API exposure before python initialization
|
// build API exposure before python initialization
|
||||||
|
|
|
@ -136,9 +136,6 @@ public:
|
||||||
|
|
||||||
//void spawnEntity(int tex_index, int grid_x, int grid_y, PyObject* script);
|
//void spawnEntity(int tex_index, int grid_x, int grid_y, PyObject* script);
|
||||||
|
|
||||||
// test function, do not use in production
|
|
||||||
static void drawSprite(int tex_index, int grid_x, int grid_y);
|
|
||||||
|
|
||||||
static void executeScript(std::string);
|
static void executeScript(std::string);
|
||||||
static void executePyString(std::string);
|
static void executePyString(std::string);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue