diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1357,7 +1357,7 @@ emb_set_life(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1398,7 +1398,7 @@ emb_set_type(PyObject *self, PyObject *args, PyObject *keywds) int i = -1,life,j=-1,x=-1,y=-1; char *name = ""; char *type = ""; - char *kwlist[] = {"setto", "settoint", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "settoint", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "|sIsIII:set_type",kwlist ,&type,&life,&name,&i,&x,&y)) return NULL; // @@ -1439,7 +1439,7 @@ emb_set_temp(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1479,7 +1479,7 @@ emb_set_tmp(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1520,7 +1520,7 @@ emb_set_x(PyObject *self, PyObject *args, PyObject *keywds) int i = -1,life,j,x=-1,y=-1; char *name = ""; char *type = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1560,7 +1560,7 @@ emb_set_y(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1601,7 +1601,7 @@ emb_set_ctype(PyObject *self, PyObject *args, PyObject *keywds) int i = -1,life,j,x=-1,y=-1; char *name = ""; char *type = ""; - char *kwlist[] = {"setto", "toctypeint", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "toctypeint", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "s|IsIII:set_type",kwlist ,&type, &life, &name,&i,&x,&y)) return NULL; // @@ -1643,7 +1643,7 @@ emb_set_vx(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -1683,7 +1683,7 @@ emb_set_vy(PyObject *self, PyObject *args, PyObject *keywds) { int i = -1,life,j,x=-1,y=-1; char *name = ""; - char *kwlist[] = {"setto", "from", "i", "x", "y", NULL}; + char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) return NULL; // @@ -3245,7 +3245,7 @@ int main(int argc, char *argv[]) { for (j=-bsy; j<=bsy; j++) for (i=-bsx; i<=bsx; i++) - if ((CURRENT_BRUSH==CIRCLE_BRUSH && (pow(i,2))/(pow(bsx,2))+(pow(j,2))/(pow(bsy,2))<=1)||(CURRENT_BRUSH==SQUARE_BRUSH&&i*j<=bsy*bsx)) + if (x+i>0 && y+j>0 && x+i<XRES && y+j<YRES && ((CURRENT_BRUSH==CIRCLE_BRUSH && (pow(i,2))/(pow(bsx,2))+(pow(j,2))/(pow(bsy,2))<=1)||(CURRENT_BRUSH==SQUARE_BRUSH&&i*j<=bsy*bsx))) { vx[(y+j)/CELL][(x+i)/CELL] += (x-lx)*0.01f; vy[(y+j)/CELL][(x+i)/CELL] += (y-ly)*0.01f; |
