Cleanup: remove references to DrawSprite API method (debug method to draw on SFML window for a single frame)

This commit is contained in:
John McCardle 2023-08-12 10:57:53 -04:00
parent c1c17bab69
commit 232ce34d54
2 changed files with 0 additions and 29 deletions

View File

@ -19,9 +19,6 @@ bool McRFPy_API::do_camfollow;
EntityManager McRFPy_API::entities;
static PyMethodDef mcrfpyMethods[] = {
{"drawSprite", McRFPy_API::_drawSprite, METH_VARARGS,
"Draw a sprite (index, x, y)"},
{"createMenu", McRFPy_API::_createMenu, METH_VARARGS,
"Create a new uimenu (name_str, x, y, w, h)"},
@ -176,29 +173,6 @@ void McRFPy_API::setSpriteTexture(int ti)
// functionality
//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() {
// build API exposure before python initialization

View File

@ -136,9 +136,6 @@ public:
//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 executePyString(std::string);
};