bugfixes for .parent property - partial #183 solution
This commit is contained in:
parent
a4c2c04343
commit
7e47050d6f
9 changed files with 357 additions and 149 deletions
|
|
@ -42,8 +42,8 @@ static PyObject* McRFPy_Libtcod::compute_fov(PyObject* self, PyObject* args) {
|
|||
|
||||
// Return list of visible cells
|
||||
PyObject* visible_list = PyList_New(0);
|
||||
for (int gy = 0; gy < grid->grid_y; gy++) {
|
||||
for (int gx = 0; gx < grid->grid_x; gx++) {
|
||||
for (int gy = 0; gy < grid->grid_h; gy++) {
|
||||
for (int gx = 0; gx < grid->grid_w; gx++) {
|
||||
if (grid->isInFOV(gx, gy)) {
|
||||
PyObject* pos = Py_BuildValue("(ii)", gx, gy);
|
||||
PyList_Append(visible_list, pos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue