2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-13 18:17:49 -04:00

Fix line endings and tabs

This commit is contained in:
Branan Purvine-Riley
2011-04-11 16:27:55 -07:00
parent d4250e19b5
commit 908aaeb6f6
2738 changed files with 702562 additions and 702562 deletions

View File

@ -1,86 +1,86 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekGame.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek game client class
//
pyHeekGame::pyHeekGame(): pyGameCli() {}
pyHeekGame::pyHeekGame(pfGameCli* client): pyGameCli(client)
{
if (client && (client->GetGameTypeId() != kGameTypeId_Heek))
gameClient = nil; // wrong type, just clear it out
}
bool pyHeekGame::IsHeekGame(std::wstring guid)
{
Uuid gameUuid(guid.c_str());
return gameUuid == kGameTypeId_Heek;
}
void pyHeekGame::JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID)
{
pfGameMgr::GetInstance()->JoinCommonGame(callbackKey.getKey(), kGameTypeId_Heek, gameID, 0, NULL);
}
void pyHeekGame::PlayGame(int position, UInt32 points, std::wstring name)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->PlayGame((unsigned)position, (dword)points, name.c_str());
}
}
void pyHeekGame::LeaveGame()
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->LeaveGame();
}
}
void pyHeekGame::Choose(int choice)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->Choose((EHeekChoice)choice);
}
}
void pyHeekGame::SequenceFinished(int seq)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->SequenceFinished((EHeekSeqFinished)seq);
}
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekGame.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek game client class
//
pyHeekGame::pyHeekGame(): pyGameCli() {}
pyHeekGame::pyHeekGame(pfGameCli* client): pyGameCli(client)
{
if (client && (client->GetGameTypeId() != kGameTypeId_Heek))
gameClient = nil; // wrong type, just clear it out
}
bool pyHeekGame::IsHeekGame(std::wstring guid)
{
Uuid gameUuid(guid.c_str());
return gameUuid == kGameTypeId_Heek;
}
void pyHeekGame::JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID)
{
pfGameMgr::GetInstance()->JoinCommonGame(callbackKey.getKey(), kGameTypeId_Heek, gameID, 0, NULL);
}
void pyHeekGame::PlayGame(int position, UInt32 points, std::wstring name)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->PlayGame((unsigned)position, (dword)points, name.c_str());
}
}
void pyHeekGame::LeaveGame()
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->LeaveGame();
}
}
void pyHeekGame::Choose(int choice)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->Choose((EHeekChoice)choice);
}
}
void pyHeekGame::SequenceFinished(int seq)
{
if (gameClient)
{
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->SequenceFinished((EHeekSeqFinished)seq);
}
}

View File

@ -1,69 +1,69 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef pyHeekGame_h
#define pyHeekGame_h
/////////////////////////////////////////////////////////////////////////////
//
// NAME: pyHeekGame
//
// PURPOSE: Class wrapper for the Heek game client
//
#include "pfGameMgr/pfGameMgr.h"
#include <python.h>
#include "../../pyGlueHelpers.h"
#include "../pyGameCli.h"
#include "../../pyKey.h"
class pyHeekGame : public pyGameCli
{
protected:
pyHeekGame();
pyHeekGame(pfGameCli* client);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGame);
static PyObject* New(pfGameCli* client);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGame object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGame); // converts a PyObject to a pyHeekGame (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsHeekGame(std::wstring guid);
static void JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID);
void PlayGame(int position, UInt32 points, std::wstring name);
void LeaveGame();
void Choose(int choice);
void SequenceFinished(int seq);
};
#endif // pyHeekGame_h
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef pyHeekGame_h
#define pyHeekGame_h
/////////////////////////////////////////////////////////////////////////////
//
// NAME: pyHeekGame
//
// PURPOSE: Class wrapper for the Heek game client
//
#include "pfGameMgr/pfGameMgr.h"
#include <python.h>
#include "../../pyGlueHelpers.h"
#include "../pyGameCli.h"
#include "../../pyKey.h"
class pyHeekGame : public pyGameCli
{
protected:
pyHeekGame();
pyHeekGame(pfGameCli* client);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGame);
static PyObject* New(pfGameCli* client);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGame object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGame); // converts a PyObject to a pyHeekGame (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsHeekGame(std::wstring guid);
static void JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID);
void PlayGame(int position, UInt32 points, std::wstring name);
void LeaveGame();
void Choose(int choice);
void SequenceFinished(int seq);
};
#endif // pyHeekGame_h

View File

@ -1,207 +1,207 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekGame.h"
#include <python.h>
#include "../../pyEnum.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek game client class
//
PYTHON_CLASS_DEFINITION(ptHeekGame, pyHeekGame);
PYTHON_DEFAULT_NEW_DEFINITION(ptHeekGame, pyHeekGame)
PYTHON_DEFAULT_DEALLOC_DEFINITION(ptHeekGame)
PYTHON_NO_INIT_DEFINITION(ptHeekGame)
PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns true if the specifed typeID (guid as a string) is a Heek game")
{
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyHeekGame::IsHeekGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyHeekGame::IsHeekGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PYTHON_RETURN_ERROR;
}
}
PYTHON_GLOBAL_METHOD_DEFINITION(PtJoinCommonHeekGame, args, "Params: callbackKey, gameID\nJoins a common Heek game with the specified ID. If one doesn't exist, it creates it")
{
PyObject* callbackObj = NULL;
int gameID = 0;
if (!PyArg_ParseTuple(args, "Oi", &callbackObj, &gameID))
{
PyErr_SetString(PyExc_TypeError, "PtJoinCommonHeekGame expects a ptKey and an integer");
PYTHON_RETURN_ERROR;
}
if (!pyKey::Check(callbackObj))
{
PyErr_SetString(PyExc_TypeError, "PtJoinCommonHeekGame expects a ptKey and an integer");
PYTHON_RETURN_ERROR;
}
pyKey* key = pyKey::ConvertFrom(callbackObj);
pyHeekGame::JoinCommonHeekGame(*key, gameID);
PYTHON_RETURN_NONE;
}
PYTHON_METHOD_DEFINITION(ptHeekGame, playGame, args)
{
int position = 0;
long points = 0;
PyObject* textObj = NULL;
if (!PyArg_ParseTuple(args,"ilO", &position, &points, &textObj))
{
PyErr_SetString(PyExc_TypeError, "playGame expects an int, a long, and a unicode string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->PlayGame(position, points, temp);
delete [] temp;
PYTHON_RETURN_NONE;
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* temp = PyString_AsString(textObj);
wchar_t* wTemp = hsStringToWString(temp);
self->fThis->PlayGame(position, points, wTemp);
delete [] wTemp;
PYTHON_RETURN_NONE;
}
else
{
PyErr_SetString(PyExc_TypeError, "playGame expects an int, a long, and a unicode string");
PYTHON_RETURN_ERROR;
}
}
PYTHON_BASIC_METHOD_DEFINITION(ptHeekGame, leaveGame, LeaveGame)
PYTHON_METHOD_DEFINITION(ptHeekGame, choose, args)
{
int choice = 0;
if (!PyArg_ParseTuple(args, "i", &choice))
{
PyErr_SetString(PyExc_TypeError, "choose expects an int");
PYTHON_RETURN_ERROR;
}
self->fThis->Choose(choice);
PYTHON_RETURN_NONE;
}
PYTHON_METHOD_DEFINITION(ptHeekGame, sequenceFinished, args)
{
int seq = 0;
if (!PyArg_ParseTuple(args, "i", &seq))
{
PyErr_SetString(PyExc_TypeError, "sequenceFinished expects an int");
PYTHON_RETURN_ERROR;
}
self->fThis->SequenceFinished(seq);
PYTHON_RETURN_NONE;
}
PYTHON_START_METHODS_TABLE(ptHeekGame)
PYTHON_METHOD(ptHeekGame, playGame, "Params: position, points, name\nRequests to start playing the game in the specified position"),
PYTHON_BASIC_METHOD(ptHeekGame, leaveGame, "Leaves this game (puts us into \"observer\" mode"),
PYTHON_METHOD(ptHeekGame, choose, "Params: choice\nMakes the specified move (see PtHeekGameChoice)"),
PYTHON_METHOD(ptHeekGame, sequenceFinished, "Params: sequence\nTells the server that the specified animation finished (see PtHeekGameSeq)"),
PYTHON_END_METHODS_TABLE;
// Type structure definition
PLASMA_DEFAULT_TYPE_WBASE(ptHeekGame, pyGameCli, "Game client for the Heek game");
// required functions for PyObject interoperability
PyObject* pyHeekGame::New(pfGameCli* client)
{
ptHeekGame *newObj = (ptHeekGame*)ptHeekGame_type.tp_new(&ptHeekGame_type, NULL, NULL);
if (client && (client->GetGameTypeId() == kGameTypeId_Heek))
newObj->fThis->gameClient = client;
return (PyObject*)newObj;
}
PYTHON_CLASS_CHECK_IMPL(ptHeekGame, pyHeekGame)
PYTHON_CLASS_CONVERT_FROM_IMPL(ptHeekGame, pyHeekGame)
// Module and method definitions
void pyHeekGame::AddPlasmaClasses(PyObject* m)
{
PYTHON_CLASS_IMPORT_START(m);
PYTHON_CLASS_IMPORT(m, ptHeekGame);
PYTHON_CLASS_IMPORT_END(m);
}
void pyHeekGame::AddPlasmaConstantsClasses(PyObject* m)
{
PYTHON_ENUM_START(PtHeekGameChoice);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoiceRock, kHeekRock);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoicePaper, kHeekPaper);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoiceScissors, kHeekScissors);
PYTHON_ENUM_END(m, PtHeekGameChoice);
PYTHON_ENUM_START(PtHeekGameSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqCountdown, kHeekCountdownSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqChoiceAnim, kHeekChoiceAnimSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqGameWinAnim, kHeekGameWinAnimSeq);
PYTHON_ENUM_END(m, PtHeekGameSeq);
}
void pyHeekGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
{
PYTHON_GLOBAL_METHOD(methods, PtIsHeekGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonHeekGame);
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekGame.h"
#include <python.h>
#include "../../pyEnum.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek game client class
//
PYTHON_CLASS_DEFINITION(ptHeekGame, pyHeekGame);
PYTHON_DEFAULT_NEW_DEFINITION(ptHeekGame, pyHeekGame)
PYTHON_DEFAULT_DEALLOC_DEFINITION(ptHeekGame)
PYTHON_NO_INIT_DEFINITION(ptHeekGame)
PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns true if the specifed typeID (guid as a string) is a Heek game")
{
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyHeekGame::IsHeekGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyHeekGame::IsHeekGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PYTHON_RETURN_ERROR;
}
}
PYTHON_GLOBAL_METHOD_DEFINITION(PtJoinCommonHeekGame, args, "Params: callbackKey, gameID\nJoins a common Heek game with the specified ID. If one doesn't exist, it creates it")
{
PyObject* callbackObj = NULL;
int gameID = 0;
if (!PyArg_ParseTuple(args, "Oi", &callbackObj, &gameID))
{
PyErr_SetString(PyExc_TypeError, "PtJoinCommonHeekGame expects a ptKey and an integer");
PYTHON_RETURN_ERROR;
}
if (!pyKey::Check(callbackObj))
{
PyErr_SetString(PyExc_TypeError, "PtJoinCommonHeekGame expects a ptKey and an integer");
PYTHON_RETURN_ERROR;
}
pyKey* key = pyKey::ConvertFrom(callbackObj);
pyHeekGame::JoinCommonHeekGame(*key, gameID);
PYTHON_RETURN_NONE;
}
PYTHON_METHOD_DEFINITION(ptHeekGame, playGame, args)
{
int position = 0;
long points = 0;
PyObject* textObj = NULL;
if (!PyArg_ParseTuple(args,"ilO", &position, &points, &textObj))
{
PyErr_SetString(PyExc_TypeError, "playGame expects an int, a long, and a unicode string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->PlayGame(position, points, temp);
delete [] temp;
PYTHON_RETURN_NONE;
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* temp = PyString_AsString(textObj);
wchar_t* wTemp = hsStringToWString(temp);
self->fThis->PlayGame(position, points, wTemp);
delete [] wTemp;
PYTHON_RETURN_NONE;
}
else
{
PyErr_SetString(PyExc_TypeError, "playGame expects an int, a long, and a unicode string");
PYTHON_RETURN_ERROR;
}
}
PYTHON_BASIC_METHOD_DEFINITION(ptHeekGame, leaveGame, LeaveGame)
PYTHON_METHOD_DEFINITION(ptHeekGame, choose, args)
{
int choice = 0;
if (!PyArg_ParseTuple(args, "i", &choice))
{
PyErr_SetString(PyExc_TypeError, "choose expects an int");
PYTHON_RETURN_ERROR;
}
self->fThis->Choose(choice);
PYTHON_RETURN_NONE;
}
PYTHON_METHOD_DEFINITION(ptHeekGame, sequenceFinished, args)
{
int seq = 0;
if (!PyArg_ParseTuple(args, "i", &seq))
{
PyErr_SetString(PyExc_TypeError, "sequenceFinished expects an int");
PYTHON_RETURN_ERROR;
}
self->fThis->SequenceFinished(seq);
PYTHON_RETURN_NONE;
}
PYTHON_START_METHODS_TABLE(ptHeekGame)
PYTHON_METHOD(ptHeekGame, playGame, "Params: position, points, name\nRequests to start playing the game in the specified position"),
PYTHON_BASIC_METHOD(ptHeekGame, leaveGame, "Leaves this game (puts us into \"observer\" mode"),
PYTHON_METHOD(ptHeekGame, choose, "Params: choice\nMakes the specified move (see PtHeekGameChoice)"),
PYTHON_METHOD(ptHeekGame, sequenceFinished, "Params: sequence\nTells the server that the specified animation finished (see PtHeekGameSeq)"),
PYTHON_END_METHODS_TABLE;
// Type structure definition
PLASMA_DEFAULT_TYPE_WBASE(ptHeekGame, pyGameCli, "Game client for the Heek game");
// required functions for PyObject interoperability
PyObject* pyHeekGame::New(pfGameCli* client)
{
ptHeekGame *newObj = (ptHeekGame*)ptHeekGame_type.tp_new(&ptHeekGame_type, NULL, NULL);
if (client && (client->GetGameTypeId() == kGameTypeId_Heek))
newObj->fThis->gameClient = client;
return (PyObject*)newObj;
}
PYTHON_CLASS_CHECK_IMPL(ptHeekGame, pyHeekGame)
PYTHON_CLASS_CONVERT_FROM_IMPL(ptHeekGame, pyHeekGame)
// Module and method definitions
void pyHeekGame::AddPlasmaClasses(PyObject* m)
{
PYTHON_CLASS_IMPORT_START(m);
PYTHON_CLASS_IMPORT(m, ptHeekGame);
PYTHON_CLASS_IMPORT_END(m);
}
void pyHeekGame::AddPlasmaConstantsClasses(PyObject* m)
{
PYTHON_ENUM_START(PtHeekGameChoice);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoiceRock, kHeekRock);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoicePaper, kHeekPaper);
PYTHON_ENUM_ELEMENT(PtHeekGameChoice, kHeekGameChoiceScissors, kHeekScissors);
PYTHON_ENUM_END(m, PtHeekGameChoice);
PYTHON_ENUM_START(PtHeekGameSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqCountdown, kHeekCountdownSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqChoiceAnim, kHeekChoiceAnimSeq);
PYTHON_ENUM_ELEMENT(PtHeekGameSeq, kHeekGameSeqGameWinAnim, kHeekGameWinAnimSeq);
PYTHON_ENUM_END(m, PtHeekGameSeq);
}
void pyHeekGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
{
PYTHON_GLOBAL_METHOD(methods, PtIsHeekGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonHeekGame);
}

View File

@ -1,386 +1,386 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekMsg.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek msg class
//
pyHeekMsg::pyHeekMsg(): pyGameCliMsg() {}
pyHeekMsg::pyHeekMsg(pfGameCliMsg* msg): pyGameCliMsg(msg)
{
if (message && (message->gameCli->GetGameTypeId() != kGameTypeId_Heek))
message = nil; // wrong type, just clear it out
}
int pyHeekMsg::GetHeekMsgType() const
{
if (message)
return message->netMsg->messageId;
return -1;
}
PyObject* pyHeekMsg::UpcastToFinalHeekMsg() const
{
if (!message)
PYTHON_RETURN_NONE;
switch (message->netMsg->messageId)
{
case kSrv2Cli_Heek_PlayGame:
return pyHeekPlayGameMsg::New(message);
case kSrv2Cli_Heek_Goodbye:
return pyHeekGoodbyeMsg::New(message);
case kSrv2Cli_Heek_Welcome:
return pyHeekWelcomeMsg::New(message);
case kSrv2Cli_Heek_Drop:
return pyHeekDropMsg::New(message);
case kSrv2Cli_Heek_Setup:
return pyHeekSetupMsg::New(message);
case kSrv2Cli_Heek_LightState:
return pyHeekLightStateMsg::New(message);
case kSrv2Cli_Heek_InterfaceState:
return pyHeekInterfaceStateMsg::New(message);
case kSrv2Cli_Heek_CountdownState:
return pyHeekCountdownStateMsg::New(message);
case kSrv2Cli_Heek_WinLose:
return pyHeekWinLoseMsg::New(message);
case kSrv2Cli_Heek_GameWin:
return pyHeekGameWinMsg::New(message);
case kSrv2Cli_Heek_PointUpdate:
return pyHeekPointUpdateMsg::New(message);
default:
PYTHON_RETURN_NONE;
}
}
///////////////////////////////////////////////////////////////////////////////
//
// The different messages we can receive
//
pyHeekPlayGameMsg::pyHeekPlayGameMsg(): pyHeekMsg() {}
pyHeekPlayGameMsg::pyHeekPlayGameMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_PlayGame))
message = nil; // wrong type, just clear it out
}
bool pyHeekPlayGameMsg::IsPlaying() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->isPlaying;
}
return false;
}
bool pyHeekPlayGameMsg::IsSinglePlayer() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->isSinglePlayer;
}
return false;
}
bool pyHeekPlayGameMsg::EnableButtons() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->enableButtons;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekGoodbyeMsg::pyHeekGoodbyeMsg(): pyHeekMsg() {}
pyHeekGoodbyeMsg::pyHeekGoodbyeMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Goodbye))
message = nil; // wrong type, just clear it out
}
///////////////////////////////////////////////////////////////////////////////
pyHeekWelcomeMsg::pyHeekWelcomeMsg(): pyHeekMsg() {}
pyHeekWelcomeMsg::pyHeekWelcomeMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Welcome))
message = nil; // wrong type, just clear it out
}
unsigned long pyHeekWelcomeMsg::Points() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->points;
}
return 0;
}
unsigned long pyHeekWelcomeMsg::Rank() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->rank;
}
return 0;
}
std::wstring pyHeekWelcomeMsg::Name() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->name;
}
return L"";
}
///////////////////////////////////////////////////////////////////////////////
pyHeekDropMsg::pyHeekDropMsg(): pyHeekMsg() {}
pyHeekDropMsg::pyHeekDropMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Drop))
message = nil; // wrong type, just clear it out
}
int pyHeekDropMsg::Position() const
{
if (message)
{
const Srv2Cli_Heek_Drop* gmMsg = (const Srv2Cli_Heek_Drop*)message->netMsg;
return gmMsg->position;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekSetupMsg::pyHeekSetupMsg(): pyHeekMsg() {}
pyHeekSetupMsg::pyHeekSetupMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Welcome))
message = nil; // wrong type, just clear it out
}
int pyHeekSetupMsg::Position() const
{
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
return gmMsg->position;
}
return -1;
}
bool pyHeekSetupMsg::ButtonState() const
{
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
return gmMsg->buttonState;
}
return false;
}
std::vector<bool> pyHeekSetupMsg::LightOn() const
{
std::vector<bool> retVal;
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
int numLights = arrsize(gmMsg->lightOn);
for (int i = 0; i < numLights; ++i)
retVal.push_back(gmMsg->lightOn[i]);
return retVal;
}
return retVal;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekLightStateMsg::pyHeekLightStateMsg(): pyHeekMsg() {}
pyHeekLightStateMsg::pyHeekLightStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_LightState))
message = nil; // wrong type, just clear it out
}
int pyHeekLightStateMsg::LightNum() const
{
if (message)
{
const Srv2Cli_Heek_LightState* gmMsg = (const Srv2Cli_Heek_LightState*)message->netMsg;
return gmMsg->lightNum;
}
return -1;
}
int pyHeekLightStateMsg::State() const
{
if (message)
{
const Srv2Cli_Heek_LightState* gmMsg = (const Srv2Cli_Heek_LightState*)message->netMsg;
return gmMsg->state;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekInterfaceStateMsg::pyHeekInterfaceStateMsg(): pyHeekMsg() {}
pyHeekInterfaceStateMsg::pyHeekInterfaceStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_InterfaceState))
message = nil; // wrong type, just clear it out
}
bool pyHeekInterfaceStateMsg::ButtonsEnabled() const
{
if (message)
{
const Srv2Cli_Heek_InterfaceState* gmMsg = (const Srv2Cli_Heek_InterfaceState*)message->netMsg;
return gmMsg->buttonsEnabled;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekCountdownStateMsg::pyHeekCountdownStateMsg(): pyHeekMsg() {}
pyHeekCountdownStateMsg::pyHeekCountdownStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_CountdownState))
message = nil; // wrong type, just clear it out
}
int pyHeekCountdownStateMsg::State() const
{
if (message)
{
const Srv2Cli_Heek_CountdownState* gmMsg = (const Srv2Cli_Heek_CountdownState*)message->netMsg;
return gmMsg->state;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekWinLoseMsg::pyHeekWinLoseMsg(): pyHeekMsg() {}
pyHeekWinLoseMsg::pyHeekWinLoseMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_WinLose))
message = nil; // wrong type, just clear it out
}
bool pyHeekWinLoseMsg::Win() const
{
if (message)
{
const Srv2Cli_Heek_WinLose* gmMsg = (const Srv2Cli_Heek_WinLose*)message->netMsg;
return gmMsg->win;
}
return false;
}
int pyHeekWinLoseMsg::Choice() const
{
if (message)
{
const Srv2Cli_Heek_WinLose* gmMsg = (const Srv2Cli_Heek_WinLose*)message->netMsg;
return gmMsg->choice;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekGameWinMsg::pyHeekGameWinMsg(): pyHeekMsg() {}
pyHeekGameWinMsg::pyHeekGameWinMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_GameWin))
message = nil; // wrong type, just clear it out
}
int pyHeekGameWinMsg::Choice() const
{
if (message)
{
const Srv2Cli_Heek_GameWin* gmMsg = (const Srv2Cli_Heek_GameWin*)message->netMsg;
return gmMsg->choice;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekPointUpdateMsg::pyHeekPointUpdateMsg(): pyHeekMsg() {}
pyHeekPointUpdateMsg::pyHeekPointUpdateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_PointUpdate))
message = nil; // wrong type, just clear it out
}
bool pyHeekPointUpdateMsg::DisplayUpdate() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->displayUpdate;
}
return false;
}
unsigned long pyHeekPointUpdateMsg::Points() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->points;
}
return 0;
}
unsigned long pyHeekPointUpdateMsg::Rank() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->rank;
}
return 0;
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "pyHeekMsg.h"
///////////////////////////////////////////////////////////////////////////////
//
// Base Heek msg class
//
pyHeekMsg::pyHeekMsg(): pyGameCliMsg() {}
pyHeekMsg::pyHeekMsg(pfGameCliMsg* msg): pyGameCliMsg(msg)
{
if (message && (message->gameCli->GetGameTypeId() != kGameTypeId_Heek))
message = nil; // wrong type, just clear it out
}
int pyHeekMsg::GetHeekMsgType() const
{
if (message)
return message->netMsg->messageId;
return -1;
}
PyObject* pyHeekMsg::UpcastToFinalHeekMsg() const
{
if (!message)
PYTHON_RETURN_NONE;
switch (message->netMsg->messageId)
{
case kSrv2Cli_Heek_PlayGame:
return pyHeekPlayGameMsg::New(message);
case kSrv2Cli_Heek_Goodbye:
return pyHeekGoodbyeMsg::New(message);
case kSrv2Cli_Heek_Welcome:
return pyHeekWelcomeMsg::New(message);
case kSrv2Cli_Heek_Drop:
return pyHeekDropMsg::New(message);
case kSrv2Cli_Heek_Setup:
return pyHeekSetupMsg::New(message);
case kSrv2Cli_Heek_LightState:
return pyHeekLightStateMsg::New(message);
case kSrv2Cli_Heek_InterfaceState:
return pyHeekInterfaceStateMsg::New(message);
case kSrv2Cli_Heek_CountdownState:
return pyHeekCountdownStateMsg::New(message);
case kSrv2Cli_Heek_WinLose:
return pyHeekWinLoseMsg::New(message);
case kSrv2Cli_Heek_GameWin:
return pyHeekGameWinMsg::New(message);
case kSrv2Cli_Heek_PointUpdate:
return pyHeekPointUpdateMsg::New(message);
default:
PYTHON_RETURN_NONE;
}
}
///////////////////////////////////////////////////////////////////////////////
//
// The different messages we can receive
//
pyHeekPlayGameMsg::pyHeekPlayGameMsg(): pyHeekMsg() {}
pyHeekPlayGameMsg::pyHeekPlayGameMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_PlayGame))
message = nil; // wrong type, just clear it out
}
bool pyHeekPlayGameMsg::IsPlaying() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->isPlaying;
}
return false;
}
bool pyHeekPlayGameMsg::IsSinglePlayer() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->isSinglePlayer;
}
return false;
}
bool pyHeekPlayGameMsg::EnableButtons() const
{
if (message)
{
const Srv2Cli_Heek_PlayGame* gmMsg = (const Srv2Cli_Heek_PlayGame*)message->netMsg;
return gmMsg->enableButtons;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekGoodbyeMsg::pyHeekGoodbyeMsg(): pyHeekMsg() {}
pyHeekGoodbyeMsg::pyHeekGoodbyeMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Goodbye))
message = nil; // wrong type, just clear it out
}
///////////////////////////////////////////////////////////////////////////////
pyHeekWelcomeMsg::pyHeekWelcomeMsg(): pyHeekMsg() {}
pyHeekWelcomeMsg::pyHeekWelcomeMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Welcome))
message = nil; // wrong type, just clear it out
}
unsigned long pyHeekWelcomeMsg::Points() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->points;
}
return 0;
}
unsigned long pyHeekWelcomeMsg::Rank() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->rank;
}
return 0;
}
std::wstring pyHeekWelcomeMsg::Name() const
{
if (message)
{
const Srv2Cli_Heek_Welcome* gmMsg = (const Srv2Cli_Heek_Welcome*)message->netMsg;
return gmMsg->name;
}
return L"";
}
///////////////////////////////////////////////////////////////////////////////
pyHeekDropMsg::pyHeekDropMsg(): pyHeekMsg() {}
pyHeekDropMsg::pyHeekDropMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Drop))
message = nil; // wrong type, just clear it out
}
int pyHeekDropMsg::Position() const
{
if (message)
{
const Srv2Cli_Heek_Drop* gmMsg = (const Srv2Cli_Heek_Drop*)message->netMsg;
return gmMsg->position;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekSetupMsg::pyHeekSetupMsg(): pyHeekMsg() {}
pyHeekSetupMsg::pyHeekSetupMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_Welcome))
message = nil; // wrong type, just clear it out
}
int pyHeekSetupMsg::Position() const
{
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
return gmMsg->position;
}
return -1;
}
bool pyHeekSetupMsg::ButtonState() const
{
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
return gmMsg->buttonState;
}
return false;
}
std::vector<bool> pyHeekSetupMsg::LightOn() const
{
std::vector<bool> retVal;
if (message)
{
const Srv2Cli_Heek_Setup* gmMsg = (const Srv2Cli_Heek_Setup*)message->netMsg;
int numLights = arrsize(gmMsg->lightOn);
for (int i = 0; i < numLights; ++i)
retVal.push_back(gmMsg->lightOn[i]);
return retVal;
}
return retVal;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekLightStateMsg::pyHeekLightStateMsg(): pyHeekMsg() {}
pyHeekLightStateMsg::pyHeekLightStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_LightState))
message = nil; // wrong type, just clear it out
}
int pyHeekLightStateMsg::LightNum() const
{
if (message)
{
const Srv2Cli_Heek_LightState* gmMsg = (const Srv2Cli_Heek_LightState*)message->netMsg;
return gmMsg->lightNum;
}
return -1;
}
int pyHeekLightStateMsg::State() const
{
if (message)
{
const Srv2Cli_Heek_LightState* gmMsg = (const Srv2Cli_Heek_LightState*)message->netMsg;
return gmMsg->state;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekInterfaceStateMsg::pyHeekInterfaceStateMsg(): pyHeekMsg() {}
pyHeekInterfaceStateMsg::pyHeekInterfaceStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_InterfaceState))
message = nil; // wrong type, just clear it out
}
bool pyHeekInterfaceStateMsg::ButtonsEnabled() const
{
if (message)
{
const Srv2Cli_Heek_InterfaceState* gmMsg = (const Srv2Cli_Heek_InterfaceState*)message->netMsg;
return gmMsg->buttonsEnabled;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekCountdownStateMsg::pyHeekCountdownStateMsg(): pyHeekMsg() {}
pyHeekCountdownStateMsg::pyHeekCountdownStateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_CountdownState))
message = nil; // wrong type, just clear it out
}
int pyHeekCountdownStateMsg::State() const
{
if (message)
{
const Srv2Cli_Heek_CountdownState* gmMsg = (const Srv2Cli_Heek_CountdownState*)message->netMsg;
return gmMsg->state;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekWinLoseMsg::pyHeekWinLoseMsg(): pyHeekMsg() {}
pyHeekWinLoseMsg::pyHeekWinLoseMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_WinLose))
message = nil; // wrong type, just clear it out
}
bool pyHeekWinLoseMsg::Win() const
{
if (message)
{
const Srv2Cli_Heek_WinLose* gmMsg = (const Srv2Cli_Heek_WinLose*)message->netMsg;
return gmMsg->win;
}
return false;
}
int pyHeekWinLoseMsg::Choice() const
{
if (message)
{
const Srv2Cli_Heek_WinLose* gmMsg = (const Srv2Cli_Heek_WinLose*)message->netMsg;
return gmMsg->choice;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekGameWinMsg::pyHeekGameWinMsg(): pyHeekMsg() {}
pyHeekGameWinMsg::pyHeekGameWinMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_GameWin))
message = nil; // wrong type, just clear it out
}
int pyHeekGameWinMsg::Choice() const
{
if (message)
{
const Srv2Cli_Heek_GameWin* gmMsg = (const Srv2Cli_Heek_GameWin*)message->netMsg;
return gmMsg->choice;
}
return -1;
}
///////////////////////////////////////////////////////////////////////////////
pyHeekPointUpdateMsg::pyHeekPointUpdateMsg(): pyHeekMsg() {}
pyHeekPointUpdateMsg::pyHeekPointUpdateMsg(pfGameCliMsg* msg): pyHeekMsg(msg)
{
if (message && (message->netMsg->messageId != kSrv2Cli_Heek_PointUpdate))
message = nil; // wrong type, just clear it out
}
bool pyHeekPointUpdateMsg::DisplayUpdate() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->displayUpdate;
}
return false;
}
unsigned long pyHeekPointUpdateMsg::Points() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->points;
}
return 0;
}
unsigned long pyHeekPointUpdateMsg::Rank() const
{
if (message)
{
const Srv2Cli_Heek_PointUpdate* gmMsg = (const Srv2Cli_Heek_PointUpdate*)message->netMsg;
return gmMsg->rank;
}
return 0;
}

View File

@ -1,283 +1,283 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef pyHeekMsg_h
#define pyHeekMsg_h
/////////////////////////////////////////////////////////////////////////////
//
// NAME: pyHeekMsg
//
// PURPOSE: Class wrapper for Heek game messages
//
#include "pfGameMgr/pfGameMgr.h"
#include <python.h>
#include "../../pyGlueHelpers.h"
#include "../pyGameCliMsg.h"
class pyHeekMsg : public pyGameCliMsg
{
protected:
pyHeekMsg();
pyHeekMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_EXPOSE_TYPE; // so we can subclass
PYTHON_CLASS_NEW_FRIEND(ptHeekMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekMsg); // converts a PyObject to a pyHeekMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int GetHeekMsgType() const;
PyObject* UpcastToFinalHeekMsg() const; // returns the heek message this really is
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekPlayGameMsg : public pyHeekMsg
{
protected:
pyHeekPlayGameMsg();
pyHeekPlayGameMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekPlayGameMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekPlayGameMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekPlayGameMsg); // converts a PyObject to a pyHeekPlayGameMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool IsPlaying() const;
bool IsSinglePlayer() const;
bool EnableButtons() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekGoodbyeMsg : public pyHeekMsg
{
protected:
pyHeekGoodbyeMsg();
pyHeekGoodbyeMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGoodbyeMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGoodbyeMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGoodbyeMsg); // converts a PyObject to a pyHeekGoodbyeMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekWelcomeMsg : public pyHeekMsg
{
protected:
pyHeekWelcomeMsg();
pyHeekWelcomeMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekWelcomeMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekWelcomeMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekWelcomeMsg); // converts a PyObject to a pyHeekWelcomeMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
unsigned long Points() const;
unsigned long Rank() const;
std::wstring Name() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekDropMsg : public pyHeekMsg
{
protected:
pyHeekDropMsg();
pyHeekDropMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekDropMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekDropMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekDropMsg); // converts a PyObject to a pyHeekDropMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Position() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekSetupMsg : public pyHeekMsg
{
protected:
pyHeekSetupMsg();
pyHeekSetupMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekSetupMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekSetupMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekSetupMsg); // converts a PyObject to a pyHeekSetupMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Position() const;
bool ButtonState() const;
std::vector<bool> LightOn() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekLightStateMsg : public pyHeekMsg
{
protected:
pyHeekLightStateMsg();
pyHeekLightStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekLightStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekLightStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekLightStateMsg); // converts a PyObject to a pyHeekLightStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int LightNum() const;
int State() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekInterfaceStateMsg : public pyHeekMsg
{
protected:
pyHeekInterfaceStateMsg();
pyHeekInterfaceStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekInterfaceStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekInterfaceStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekInterfaceStateMsg); // converts a PyObject to a pyHeekInterfaceStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool ButtonsEnabled() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekCountdownStateMsg : public pyHeekMsg
{
protected:
pyHeekCountdownStateMsg();
pyHeekCountdownStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekCountdownStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekCountdownStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekCountdownStateMsg); // converts a PyObject to a pyHeekCountdownStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int State() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekWinLoseMsg : public pyHeekMsg
{
protected:
pyHeekWinLoseMsg();
pyHeekWinLoseMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekWinLoseMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekWinLoseMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekWinLoseMsg); // converts a PyObject to a pyHeekWinLoseMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool Win() const;
int Choice() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekGameWinMsg : public pyHeekMsg
{
protected:
pyHeekGameWinMsg();
pyHeekGameWinMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGameWinMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGameWinMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGameWinMsg); // converts a PyObject to a pyHeekGameWinMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Choice() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekPointUpdateMsg : public pyHeekMsg
{
protected:
pyHeekPointUpdateMsg();
pyHeekPointUpdateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekPointUpdateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekPointUpdateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekPointUpdateMsg); // converts a PyObject to a pyHeekPointUpdateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool DisplayUpdate() const;
unsigned long Points() const;
unsigned long Rank() const;
};
#endif // pyHeekMsg_h
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef pyHeekMsg_h
#define pyHeekMsg_h
/////////////////////////////////////////////////////////////////////////////
//
// NAME: pyHeekMsg
//
// PURPOSE: Class wrapper for Heek game messages
//
#include "pfGameMgr/pfGameMgr.h"
#include <python.h>
#include "../../pyGlueHelpers.h"
#include "../pyGameCliMsg.h"
class pyHeekMsg : public pyGameCliMsg
{
protected:
pyHeekMsg();
pyHeekMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_EXPOSE_TYPE; // so we can subclass
PYTHON_CLASS_NEW_FRIEND(ptHeekMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekMsg); // converts a PyObject to a pyHeekMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int GetHeekMsgType() const;
PyObject* UpcastToFinalHeekMsg() const; // returns the heek message this really is
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekPlayGameMsg : public pyHeekMsg
{
protected:
pyHeekPlayGameMsg();
pyHeekPlayGameMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekPlayGameMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekPlayGameMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekPlayGameMsg); // converts a PyObject to a pyHeekPlayGameMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool IsPlaying() const;
bool IsSinglePlayer() const;
bool EnableButtons() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekGoodbyeMsg : public pyHeekMsg
{
protected:
pyHeekGoodbyeMsg();
pyHeekGoodbyeMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGoodbyeMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGoodbyeMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGoodbyeMsg); // converts a PyObject to a pyHeekGoodbyeMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekWelcomeMsg : public pyHeekMsg
{
protected:
pyHeekWelcomeMsg();
pyHeekWelcomeMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekWelcomeMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekWelcomeMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekWelcomeMsg); // converts a PyObject to a pyHeekWelcomeMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
unsigned long Points() const;
unsigned long Rank() const;
std::wstring Name() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekDropMsg : public pyHeekMsg
{
protected:
pyHeekDropMsg();
pyHeekDropMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekDropMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekDropMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekDropMsg); // converts a PyObject to a pyHeekDropMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Position() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekSetupMsg : public pyHeekMsg
{
protected:
pyHeekSetupMsg();
pyHeekSetupMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekSetupMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekSetupMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekSetupMsg); // converts a PyObject to a pyHeekSetupMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Position() const;
bool ButtonState() const;
std::vector<bool> LightOn() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekLightStateMsg : public pyHeekMsg
{
protected:
pyHeekLightStateMsg();
pyHeekLightStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekLightStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekLightStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekLightStateMsg); // converts a PyObject to a pyHeekLightStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int LightNum() const;
int State() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekInterfaceStateMsg : public pyHeekMsg
{
protected:
pyHeekInterfaceStateMsg();
pyHeekInterfaceStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekInterfaceStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekInterfaceStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekInterfaceStateMsg); // converts a PyObject to a pyHeekInterfaceStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool ButtonsEnabled() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekCountdownStateMsg : public pyHeekMsg
{
protected:
pyHeekCountdownStateMsg();
pyHeekCountdownStateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekCountdownStateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekCountdownStateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekCountdownStateMsg); // converts a PyObject to a pyHeekCountdownStateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaConstantsClasses(PyObject* m);
int State() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekWinLoseMsg : public pyHeekMsg
{
protected:
pyHeekWinLoseMsg();
pyHeekWinLoseMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekWinLoseMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekWinLoseMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekWinLoseMsg); // converts a PyObject to a pyHeekWinLoseMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool Win() const;
int Choice() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekGameWinMsg : public pyHeekMsg
{
protected:
pyHeekGameWinMsg();
pyHeekGameWinMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekGameWinMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekGameWinMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekGameWinMsg); // converts a PyObject to a pyHeekGameWinMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
int Choice() const;
};
///////////////////////////////////////////////////////////////////////////////
class pyHeekPointUpdateMsg : public pyHeekMsg
{
protected:
pyHeekPointUpdateMsg();
pyHeekPointUpdateMsg(pfGameCliMsg* msg);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptHeekPointUpdateMsg);
static PyObject* New(pfGameCliMsg* msg);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyHeekPointUpdateMsg object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyHeekPointUpdateMsg); // converts a PyObject to a pyHeekPointUpdateMsg (throws error if not correct type)
static void AddPlasmaClasses(PyObject* m);
bool DisplayUpdate() const;
unsigned long Points() const;
unsigned long Rank() const;
};
#endif // pyHeekMsg_h

File diff suppressed because it is too large Load Diff