From: <ave...@us...> - 2003-12-02 23:09:42
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1:/tmp/cvs-serv19236/GUIScript Modified Files: GUIScript.cpp Log Message: Add: EnableCheatKeys script command, enabled ctrl-s/p/x/5 (searchmap, pathfinder, coordinates) Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** GUIScript.cpp 29 Nov 2003 22:16:37 -0000 1.76 --- GUIScript.cpp 2 Dec 2003 23:09:39 -0000 1.77 *************** *** 162,165 **** --- 162,180 ---- } + static PyObject * GemRB_EnableCheatKeys(PyObject */*self*/, PyObject *args) + { + int Flag; + + if(!PyArg_ParseTuple(args, "i", &Flag)) { + printMessage("GUIScript", "Syntax Error: EnableCheatKeys(flag)\n", LIGHT_RED); + return NULL; + } + + core->EnableCheatKeys(Flag); + + Py_INCREF(Py_None); + return Py_None; + } + static PyObject * GemRB_SetWindowPos(PyObject */*self*/, PyObject *args) { *************** *** 1880,1883 **** --- 1895,1901 ---- {"InvalidateWindow", GemRB_InvalidateWindow, METH_VARARGS, "Invalidates the given Window."}, + + {"EnableCheatKeys", GemRB_EnableCheatKeys, METH_VARARGS, + "Sets CheatFlags."}, {NULL, NULL, 0, NULL} |