From: Laszlo T. <ave...@us...> - 2004-08-10 19:55:57
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19191 Modified Files: GUIScript.cpp Log Message: GetGameScript(idx) guiscript command, currently returns the Loading Mos (the picture intended to be seen at loading) on idx=0 Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** GUIScript.cpp 8 Aug 2004 13:22:43 -0000 1.186 --- GUIScript.cpp 10 Aug 2004 19:55:47 -0000 1.187 *************** *** 165,168 **** --- 165,190 ---- } + PyDoc_STRVAR( GemRB_GetGameString__doc, + "GetGameVariable(Index\n\n" + "Returns various game strings, known values for index are:\n" + "0 - Loading Mos picture\n" + "1 and above - undefined."); + + static PyObject* GemRB_GetGameString(PyObject*, PyObject* args) + { + int Index; + + if (!PyArg_ParseTuple( args, "i", &Index )) { + return AttributeError( GemRB_GetGameString__doc ); + } + if(Index==0) { + Game *game = core->GetGame(); + if(game) return Py_BuildValue("s", core->GetGame()->LoadMos); + return Py_BuildValue("s", ""); + } + + return NULL; + } + PyDoc_STRVAR( GemRB_LoadGame__doc, "LoadGame(Index)\n\n" *************** *** 3289,3292 **** --- 3311,3316 ---- {"EvaluateString", GemRB_EvaluateString, METH_VARARGS, GemRB_EvaluateString__doc}, + {"GetGameString", GemRB_GetGameString, METH_VARARGS, + GemRB_GetGameString__doc}, {"LoadGame", GemRB_LoadGame, METH_VARARGS, GemRB_LoadGame__doc}, |