本文整理汇总了C++中ParsePyTupleError函数的典型用法代码示例。如果您正苦于以下问题:C++ ParsePyTupleError函数的具体用法?C++ ParsePyTupleError怎么用?C++ ParsePyTupleError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ParsePyTupleError函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: InitialiseFramework
bool InitialiseFramework( PyObject* a_pModule )
{
bool bSuccess = false;
PyObject* pInitialise = GetHandleToPythonFunction( a_pModule, "PyInitialise" );
if( pInitialise )
{
PyObject* pReturnValue = CallPythonFunction( pInitialise, nullptr );
if( pReturnValue )
{
int iWidth; int iHeight; bool bFullscreen; char* windowTitle;
if (!PyArg_ParseTuple(pReturnValue, "iibs", &iWidth, &iHeight, &bFullscreen, &windowTitle))
{
ParsePyTupleError( __func__, __LINE__ );
}
Py_DECREF(pReturnValue);
int titleLength = strlen(windowTitle);
g_pWindowTitle = new char[titleLength+1];
memcpy(g_pWindowTitle, windowTitle, titleLength);
g_pWindowTitle[titleLength] = '\0';
bSuccess = ( Initialise( iWidth, iHeight, bFullscreen, g_pWindowTitle) == 0 );
}
Py_XDECREF(pInitialise);
}
return bSuccess;
}
开发者ID:flickenmaste,项目名称:Python_Stuff,代码行数:28,代码来源:main.cpp
示例2: ParsePyTupleError
// Destroy The Particle
PyObject* Python::B2D_DestroyParticle (PyObject* Self, PyObject* Args){
// Create Variables
int particleType, particleReference;
// Look For Errors
if (!PyArg_ParseTuple (Args, "ii", &particleType, &particleReference)){
ParsePyTupleError (__func__, __LINE__);
}
// Set Function
if (particleType == 0){
Python::particlePointList[particleReference].Destroy();
// Remove From List
Python::particlePointList.erase (Python::particlePointList.begin() + particleReference);
}
else{
Python::particleLineList[particleReference].Destroy();
// Remove From List
Python::particleLineList.erase (Python::particleLineList.begin() + particleReference);
}
Py_RETURN_NONE;
}
开发者ID:K-Finlay,项目名称:B2D,代码行数:30,代码来源:PyRenderParticle.cpp
示例3: ParsePyTupleError
//--------------------------- Sound
PyObject* LMF_SoundLoad (PyObject *self, PyObject *args){
char* cPath;
if (!PyArg_ParseTuple(args, "s", &cPath)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
int SoundID = SoundLoad(cPath);
return Py_BuildValue("i", SoundID);
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:10,代码来源:LukeMonaghanFrameworkPython.cpp
示例4: LMF_CameraRotate
PyObject* LMF_CameraRotate(PyObject *self, PyObject *args){
float fRot;
if (!PyArg_ParseTuple(args, "f", &fRot)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
CameraRotate(fRot);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例5: LMF_ControllerVibrate
PyObject* LMF_ControllerVibrate (PyObject *self, PyObject *args){
int iControllerID,iLVal,iRVal;
if (!PyArg_ParseTuple(args, "iii", &iControllerID, &iLVal, &iRVal)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
ControllerVibrate(iControllerID,iLVal,iRVal);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例6: LMF_FrameworkBlendMode
PyObject* LMF_FrameworkBlendMode(PyObject *self, PyObject *args){
int iBegin, iFinal, iEqu;
if (!PyArg_ParseTuple(args, "iii", &iBegin, &iFinal, &iEqu)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
FrameworkBlendMode(iBegin,iFinal,iEqu);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例7: LMF_SoundVolumeMain
PyObject* LMF_SoundVolumeMain(PyObject *self, PyObject *args){
float fVol;
if (!PyArg_ParseTuple(args, "f", &fVol)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
SoundVolumeMain(fVol);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例8: LMF_ShaderUnload
PyObject* LMF_ShaderUnload(PyObject *self, PyObject *args){
int ShaderID;
if (!PyArg_ParseTuple(args, "i", &ShaderID)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
ShaderUnload(ShaderID);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例9: LMF_FontUnload
PyObject* LMF_FontUnload(PyObject *self, PyObject *args){
unsigned int FontID;
if (!PyArg_ParseTuple(args, "i", &FontID)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
FontUnload(FontID);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例10: LMF_FontLoad
//--------------------------- Fonts
PyObject* LMF_FontLoad(PyObject *self, PyObject *args){
char* path;
if (!PyArg_ParseTuple(args, "s", &path)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
unsigned int FontID = FontLoad(path);
return Py_BuildValue("i", FontID);
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:10,代码来源:LukeMonaghanFrameworkPython.cpp
示例11: LMF_ModelDraw
PyObject* LMF_ModelDraw(PyObject *self, PyObject *args){
unsigned int ModelID, Camera0_world1;
if (!PyArg_ParseTuple(args, "i", &ModelID, &Camera0_world1)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
ModelDraw(ModelID, Camera0_world1);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例12: LMF_ParticleEmitterDraw
PyObject* LMF_ParticleEmitterDraw(PyObject *self, PyObject *args){
unsigned int EmitterID, Camera0_world1;
if (!PyArg_ParseTuple(args, "ii", &EmitterID, &Camera0_world1)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
ParticleEmitterDraw(EmitterID, Camera0_world1);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例13: LMF_ParticleEmitterUnload
PyObject* LMF_ParticleEmitterUnload(PyObject *self, PyObject *args){
unsigned int EmitterID;
if (!PyArg_ParseTuple(args, "i", &EmitterID)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
ParticleEmitterUnload(EmitterID);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例14: LMF_ParticleEmitterLoadEmpty
//--------------------------- Particle Emitters
PyObject* LMF_ParticleEmitterLoadEmpty(PyObject *self, PyObject *args){
unsigned int SpriteID;
if (!PyArg_ParseTuple(args, "i", &SpriteID)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
unsigned int EmitterID = ParticleEmitterLoad(SpriteID);
return Py_BuildValue("i", EmitterID);
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:10,代码来源:LukeMonaghanFrameworkPython.cpp
示例15: LMF_FrameworkFullscreen
PyObject* LMF_FrameworkFullscreen(PyObject *self, PyObject *args){
int fullscr;
if (!PyArg_ParseTuple(args, "i", &fullscr)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
FrameworkFullscreen(fullscr);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例16: LMF_VSyncSet
//--------------------------- MISC
PyObject* LMF_VSyncSet(PyObject *self, PyObject *args){
int vSyncMode;
if (!PyArg_ParseTuple(args, "i", &vSyncMode)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
VSyncSet(vSyncMode);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:10,代码来源:LukeMonaghanFrameworkPython.cpp
示例17: LMF_FrameworkBGColour
PyObject* LMF_FrameworkBGColour(PyObject *self, PyObject *args){
float fR,fG,fB,fA;
if (!PyArg_ParseTuple(args, "ffff", &fR,&fG,&fB,&fA)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
FrameworkBGColour(fR,fG,fB,fA);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例18: LMF_SoundPauseAll
PyObject* LMF_SoundPauseAll (PyObject *self, PyObject *args){
int bPaused;
if (!PyArg_ParseTuple(args, "i", &bPaused)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
SoundPauseAll(bPaused);
Py_RETURN_NONE;
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例19: LMF_KeyReleased
PyObject* LMF_KeyReleased(PyObject *self, PyObject *args){
int iKeyCode;
if (!PyArg_ParseTuple(args, "i", &iKeyCode)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
int iKeyUp = KeyReleased(iKeyCode);
return Py_BuildValue("i", iKeyUp);
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
示例20: LMF_ControllerConnected
PyObject* LMF_ControllerConnected (PyObject *self, PyObject *args){
int iControllerID;
if (!PyArg_ParseTuple(args, "i", &iControllerID)) {
ParsePyTupleError( __func__, __LINE__ );
return nullptr;
}
int iBConConnected = ControllerConnected(iControllerID);
return Py_BuildValue("i", iBConConnected);
}
开发者ID:lukemonaghan,项目名称:YR01_04_OpenGLFramework,代码行数:9,代码来源:LukeMonaghanFrameworkPython.cpp
注:本文中的ParsePyTupleError函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论