mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsBlueSpiralGame, args, "Params: typeID\nRetur
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyBlueSpiralGame::IsBlueSpiralGame(text);
|
||||
|
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsClimbingWallGame, args, "Params: typeID\nRet
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyClimbingWallGame::IsClimbingWallGame(text);
|
||||
|
@ -65,12 +65,12 @@ 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)
|
||||
void pyHeekGame::PlayGame(int position, uint32_t points, std::wstring name)
|
||||
{
|
||||
if (gameClient)
|
||||
{
|
||||
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
|
||||
heek->PlayGame((unsigned)position, (dword)points, name.c_str());
|
||||
heek->PlayGame((unsigned)position, (uint32_t)points, name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
static bool IsHeekGame(std::wstring guid);
|
||||
static void JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID);
|
||||
|
||||
void PlayGame(int position, UInt32 points, std::wstring name);
|
||||
void PlayGame(int position, uint32_t points, std::wstring name);
|
||||
void LeaveGame();
|
||||
void Choose(int choice);
|
||||
void SequenceFinished(int seq);
|
||||
|
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns tru
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyHeekGame::IsHeekGame(text);
|
||||
@ -122,7 +122,7 @@ PYTHON_METHOD_DEFINITION(ptHeekGame, playGame, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* temp = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
|
||||
temp[strLen] = L'\0';
|
||||
self->fThis->PlayGame(position, points, temp);
|
||||
|
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsMarkerGame, args, "Params: typeID\nReturns t
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyMarkerGame::IsMarkerGame(text);
|
||||
@ -117,7 +117,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
|
||||
if (PyUnicode_Check(gameNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(gameNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)gameNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
name = text;
|
||||
@ -142,7 +142,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
|
||||
if (PyUnicode_Check(templateIdObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(templateIdObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)templateIdObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
templateId = text;
|
||||
@ -181,7 +181,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeGameName, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->ChangeGameName(text);
|
||||
@ -236,7 +236,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
|
||||
if (PyUnicode_Check(nameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(nameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
name = text;
|
||||
@ -261,7 +261,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
|
||||
if (PyUnicode_Check(ageObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(ageObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)ageObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
age = text;
|
||||
@ -309,7 +309,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeMarkerName, args)
|
||||
if (PyUnicode_Check(nameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(nameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->ChangeMarkerName(markerId, text);
|
||||
|
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsTTTGame, args, "Params: typeID\nReturns true
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyTTTGame::IsTTTGame(text);
|
||||
|
@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsVarSyncGame, args, "Params: typeID\nReturns
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = pyVarSyncGame::IsVarSyncGame(text);
|
||||
@ -121,7 +121,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, setStringVar, args)
|
||||
if (PyUnicode_Check(valueObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(valueObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->SetStringVar(id, text);
|
||||
@ -187,7 +187,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
|
||||
if (PyUnicode_Check(varNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(varNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
varName = text;
|
||||
@ -211,7 +211,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
|
||||
if (PyUnicode_Check(valueObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(valueObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
val = text;
|
||||
@ -249,7 +249,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createNumericVar, args)
|
||||
if (PyUnicode_Check(varNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(varNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
varName = text;
|
||||
|
@ -87,7 +87,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetGameNameByTypeID, args, "Params: guid\nRetu
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
std::wstring retVal = pyGameCli::GetGameNameByTypeID(text);
|
||||
|
@ -135,7 +135,7 @@ void cyAccountManagement::UpgradeVisitorToExplorer(unsigned playerId)
|
||||
|
||||
void cyAccountManagement::ChangePassword(const char* password)
|
||||
{
|
||||
wchar* wpassword = StrDupToUnicode(password);
|
||||
wchar_t* wpassword = StrDupToUnicode(password);
|
||||
NetCommChangeMyPassword(wpassword);
|
||||
FREE(wpassword);
|
||||
free(wpassword);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
|
||||
#include <Python.h>
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
class cyAccountManagement
|
||||
|
@ -93,7 +93,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
|
||||
if (PyUnicode_Check(playerNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(playerNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)playerNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
playerName = text;
|
||||
@ -116,7 +116,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
|
||||
if (PyUnicode_Check(avatarShapeObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(avatarShapeObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)avatarShapeObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
avatarShape = text;
|
||||
@ -139,7 +139,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
|
||||
if (PyUnicode_Check(invitationObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(invitationObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)invitationObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
invitation = text;
|
||||
|
@ -131,7 +131,7 @@ void cyAnimation::Play()
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -174,7 +174,7 @@ void cyAnimation::Stop()
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -212,7 +212,7 @@ void cyAnimation::Resume()
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -245,7 +245,7 @@ void cyAnimation::Resume()
|
||||
//
|
||||
// PURPOSE : Play an animation only from specific time start to end
|
||||
//
|
||||
void cyAnimation::PlayRange(hsScalar start, hsScalar end)
|
||||
void cyAnimation::PlayRange(float start, float end)
|
||||
{
|
||||
SkipToTime(start);
|
||||
PlayToTime(end);
|
||||
@ -258,13 +258,13 @@ void cyAnimation::PlayRange(hsScalar start, hsScalar end)
|
||||
//
|
||||
// PURPOSE : Play (continue) an animation until the specified time is reached
|
||||
//
|
||||
void cyAnimation::PlayToTime(hsScalar time)
|
||||
void cyAnimation::PlayToTime(float time)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -297,13 +297,13 @@ void cyAnimation::PlayToTime(hsScalar time)
|
||||
//
|
||||
// PURPOSE : Play (continue) an animation until the specified point is reached
|
||||
//
|
||||
void cyAnimation::PlayToPercentage(hsScalar zeroToOne)
|
||||
void cyAnimation::PlayToPercentage(float zeroToOne)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -337,13 +337,13 @@ void cyAnimation::PlayToPercentage(hsScalar zeroToOne)
|
||||
// PURPOSE : Jump the animation to the specified time
|
||||
// : Doesn't start or stop playing of animation
|
||||
//
|
||||
void cyAnimation::SkipToTime(hsScalar time)
|
||||
void cyAnimation::SkipToTime(float time)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -382,7 +382,7 @@ void cyAnimation::Looped(hsBool looped)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -423,7 +423,7 @@ void cyAnimation::Backwards(hsBool backwards)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -458,13 +458,13 @@ void cyAnimation::Backwards(hsBool backwards)
|
||||
// Function : SetLoopStart and SetLoopEnd
|
||||
// PARAMETERS : value - sets the start or the end of the animation
|
||||
//
|
||||
void cyAnimation::SetLoopStart(hsScalar start)
|
||||
void cyAnimation::SetLoopStart(float start)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -490,13 +490,13 @@ void cyAnimation::SetLoopStart(hsScalar start)
|
||||
}
|
||||
}
|
||||
|
||||
void cyAnimation::SetLoopEnd(hsScalar end)
|
||||
void cyAnimation::SetLoopEnd(float end)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -532,13 +532,13 @@ void cyAnimation::SetLoopEnd(hsScalar end)
|
||||
// PURPOSE : Sets the speed of the animation
|
||||
// : Doesn't start or stop playing animation
|
||||
//
|
||||
void cyAnimation::Speed(hsScalar speed)
|
||||
void cyAnimation::Speed(float speed)
|
||||
{
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -571,7 +571,7 @@ void cyAnimation::IRunOneCmd(int cmd)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
|
@ -109,20 +109,20 @@ public:
|
||||
|
||||
// Play an animation only from specific time start to end
|
||||
//
|
||||
virtual void PlayRange(hsScalar start, hsScalar end);
|
||||
virtual void PlayRange(float start, float end);
|
||||
|
||||
// Play (continue) an animation until the specified time is reached
|
||||
//
|
||||
virtual void PlayToTime(hsScalar time);
|
||||
virtual void PlayToTime(float time);
|
||||
|
||||
// Play (continue) an animation until the specified point is reached
|
||||
//
|
||||
virtual void PlayToPercentage(hsScalar zeroToOne);
|
||||
virtual void PlayToPercentage(float zeroToOne);
|
||||
|
||||
// Jump the animation to the specified time
|
||||
// Doesn't start or stop playing of animation
|
||||
//
|
||||
virtual void SkipToTime(hsScalar time);
|
||||
virtual void SkipToTime(float time);
|
||||
|
||||
// Set whether the animation is to be looped or not
|
||||
//
|
||||
@ -135,13 +135,13 @@ public:
|
||||
|
||||
// Sets the start and end of the looping points in the animation
|
||||
//
|
||||
virtual void SetLoopStart(hsScalar start);
|
||||
virtual void SetLoopEnd(hsScalar end);
|
||||
virtual void SetLoopStart(float start);
|
||||
virtual void SetLoopEnd(float end);
|
||||
|
||||
// Sets the speed of the animation
|
||||
// Doesn't start or stop playing animation
|
||||
//
|
||||
virtual void Speed(hsScalar speed);
|
||||
virtual void Speed(float speed);
|
||||
|
||||
|
||||
// Jump the animation to the specified time
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "cyAnimation.h"
|
||||
#include "hsUtils.h"
|
||||
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
|
@ -179,7 +179,7 @@ void cyAvatar::OneShot(pyKey &seekKey, float duration, hsBool usePhysics,
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAvOneShotMsg* pMsg = TRACKED_NEW plAvOneShotMsg(
|
||||
plAvOneShotMsg* pMsg = new plAvOneShotMsg(
|
||||
(plKey )fSender,
|
||||
nil,
|
||||
seekKey.getKey(), // Mark D told me to do it ...paulg
|
||||
@ -226,7 +226,7 @@ void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp)
|
||||
if ( plOneShotMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()) != nil )
|
||||
{
|
||||
// create a message OneShotMessage
|
||||
plOneShotMsg* pMsg = TRACKED_NEW plOneShotMsg;
|
||||
plOneShotMsg* pMsg = new plOneShotMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (netProp)
|
||||
{
|
||||
@ -267,7 +267,7 @@ void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp)
|
||||
{
|
||||
// its a multistage thingy... need to send it a plNotifyMsg
|
||||
// create new notify message to do the actual send with
|
||||
plNotifyMsg* pNMsg = TRACKED_NEW plNotifyMsg;
|
||||
plNotifyMsg* pNMsg = new plNotifyMsg;
|
||||
|
||||
// set whether this should be forced over the network (ignoring net-cascading)
|
||||
if (netProp)
|
||||
@ -320,7 +320,7 @@ void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netFor
|
||||
{
|
||||
// its a multistage thingy... need to send it a plNotifyMsg
|
||||
// create new notify message to do the actual send with
|
||||
plNotifyMsg* pNMsg = TRACKED_NEW plNotifyMsg;
|
||||
plNotifyMsg* pNMsg = new plNotifyMsg;
|
||||
|
||||
// set whether this should be forced over the network (ignoring net-cascading)
|
||||
if (netProp)
|
||||
@ -372,7 +372,7 @@ void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netFor
|
||||
//
|
||||
// NOTE: only works with multi-stage behaviors
|
||||
//
|
||||
void cyAvatar::NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce)
|
||||
{
|
||||
// first there is someone to send to and make sure that we an avatar to send this to
|
||||
@ -385,7 +385,7 @@ void cyAvatar::NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsSc
|
||||
if ( avKey )
|
||||
{
|
||||
// create the message
|
||||
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg::kNextStage, 0, setTime, newTime,
|
||||
setDirection, (bool)isForward, transTime);
|
||||
|
||||
@ -411,7 +411,7 @@ void cyAvatar::NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsSc
|
||||
//
|
||||
// NOTE: only works with multi-stage behaviors
|
||||
//
|
||||
void cyAvatar::PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce)
|
||||
{
|
||||
// first there is someone to send to and make sure that we an avatar to send this to
|
||||
@ -424,7 +424,7 @@ void cyAvatar::PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime,
|
||||
if ( avKey )
|
||||
{
|
||||
// create the message
|
||||
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg::kPrevStage, 0, setTime, newTime,
|
||||
setDirection, (bool)isForward, transTime);
|
||||
|
||||
@ -451,7 +451,7 @@ void cyAvatar::PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime,
|
||||
//
|
||||
// NOTE: only works with multi-stage behaviors
|
||||
//
|
||||
void cyAvatar::GoToStage(pyKey &behKey, Int32 stage, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce)
|
||||
{
|
||||
// first there is someone to send to and make sure that we an avatar to send this to
|
||||
@ -464,7 +464,7 @@ void cyAvatar::GoToStage(pyKey &behKey, Int32 stage, hsScalar transTime, hsBool
|
||||
if ( avKey )
|
||||
{
|
||||
// create the message
|
||||
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
|
||||
plAvBrainGenericMsg::kGotoStage, stage, setTime, newTime,
|
||||
setDirection, isForward, transTime);
|
||||
|
||||
@ -479,15 +479,15 @@ void cyAvatar::GoToStage(pyKey &behKey, Int32 stage, hsScalar transTime, hsBool
|
||||
}
|
||||
|
||||
|
||||
void cyAvatar::SetLoopCount(pyKey &behKey, Int32 stage, Int32 loopCount, hsBool netForce)
|
||||
void cyAvatar::SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsBool netForce)
|
||||
{
|
||||
// if it is a Multistage guy
|
||||
if ( plMultistageBehMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()) != nil )
|
||||
{
|
||||
plMultistageModMsg* pMsg = TRACKED_NEW plMultistageModMsg((plKey)nil, behKey.getKey());
|
||||
plMultistageModMsg* pMsg = new plMultistageModMsg((plKey)nil, behKey.getKey());
|
||||
pMsg->SetCommand(plMultistageModMsg::kSetLoopCount);
|
||||
pMsg->fStageNum = (UInt8)stage;
|
||||
pMsg->fNumLoops = (UInt8)loopCount;
|
||||
pMsg->fStageNum = (uint8_t)stage;
|
||||
pMsg->fNumLoops = (uint8_t)loopCount;
|
||||
|
||||
if ( netForce )
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce | plMessage::kNetPropagate);
|
||||
@ -513,7 +513,7 @@ void cyAvatar::Seek(pyKey &seekKey, float duration, hsBool usePhysics)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAvSeekMsg* pMsg = TRACKED_NEW plAvSeekMsg(
|
||||
plAvSeekMsg* pMsg = new plAvSeekMsg(
|
||||
(plKey)fSender,nil, seekKey.getKey(),duration,usePhysics);
|
||||
|
||||
// check if this needs to be network forced to all clients
|
||||
@ -543,7 +543,7 @@ void cyAvatar::Seek(pyKey &seekKey, float duration, hsBool usePhysics)
|
||||
//
|
||||
// PURPOSE : Return what clothing group the avatar is in
|
||||
//
|
||||
Int32 cyAvatar::GetAvatarClothingGroup()
|
||||
int32_t cyAvatar::GetAvatarClothingGroup()
|
||||
{
|
||||
// find the avatar's armature modifier
|
||||
const plArmatureMod *avMod = nil;
|
||||
@ -572,7 +572,7 @@ Int32 cyAvatar::GetAvatarClothingGroup()
|
||||
//
|
||||
// PURPOSE : Return a list of the wearable items for this avatar of that clothing_type
|
||||
//
|
||||
std::vector<std::string> cyAvatar::GetEntireClothingList(Int32 clothing_type)
|
||||
std::vector<std::string> cyAvatar::GetEntireClothingList(int32_t clothing_type)
|
||||
{
|
||||
// Currently, just all the clothing available will be returned
|
||||
hsTArray<plClothingItem*> clothingList = plClothingMgr::GetClothingMgr()->GetItemList();
|
||||
@ -594,7 +594,7 @@ std::vector<std::string> cyAvatar::GetEntireClothingList(Int32 clothing_type)
|
||||
//
|
||||
// PURPOSE : Return a list of the wearable items for this avatar of that clothing_type
|
||||
//
|
||||
std::vector<PyObject*> cyAvatar::GetClosetClothingList(Int32 clothing_type)
|
||||
std::vector<PyObject*> cyAvatar::GetClosetClothingList(int32_t clothing_type)
|
||||
{
|
||||
std::vector<PyObject*> retVal;
|
||||
|
||||
@ -816,7 +816,7 @@ void cyAvatar::AddWardrobeClothingItem(const char* clothing_name,pyColor& tint1,
|
||||
// PURPOSE : Return a list of unique clothing items (each has a different mesh)
|
||||
// : that belong to the specific type
|
||||
//
|
||||
std::vector<PyObject*> cyAvatar::GetUniqueMeshList(Int32 clothing_type)
|
||||
std::vector<PyObject*> cyAvatar::GetUniqueMeshList(int32_t clothing_type)
|
||||
{
|
||||
std::vector<PyObject*> retVal;
|
||||
|
||||
@ -1049,7 +1049,7 @@ hsBool cyAvatar::TintClothingItem(const char* clothing_name, pyColor& tint)
|
||||
//
|
||||
// PURPOSE : Tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
hsBool cyAvatar::TintClothingItemLayer(const char* clothing_name, pyColor& tint, UInt8 layer)
|
||||
hsBool cyAvatar::TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer)
|
||||
{
|
||||
return TintClothingItemLayerU(clothing_name,tint,layer,true);
|
||||
}
|
||||
@ -1164,7 +1164,7 @@ hsBool cyAvatar::TintClothingItemU(const char* clothing_name, pyColor& tint, hsB
|
||||
//
|
||||
// PURPOSE : Tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
hsBool cyAvatar::TintClothingItemLayerU(const char* clothing_name, pyColor& tint, UInt8 layer, hsBool update)
|
||||
hsBool cyAvatar::TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, hsBool update)
|
||||
{
|
||||
const plArmatureMod *avMod = nil;
|
||||
// we can really only talk to one avatar, so just get the first one (which is probably the only one)
|
||||
@ -1246,7 +1246,7 @@ PyObject* cyAvatar::GetTintClothingItem(const char* clothing_name)
|
||||
//
|
||||
// PURPOSE : Get the tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
PyObject* cyAvatar::GetTintClothingItemL(const char* clothing_name, UInt8 layer)
|
||||
PyObject* cyAvatar::GetTintClothingItemL(const char* clothing_name, uint8_t layer)
|
||||
{
|
||||
const plArmatureMod *avMod = nil;
|
||||
// we can really only talk to one avatar, so just get the first one (which is probably the only one)
|
||||
@ -1379,7 +1379,7 @@ plMorphSequence* cyAvatar::LocalMorphSequence()
|
||||
//
|
||||
// PURPOSE : Set the morph value of a specific layer of clothing
|
||||
//
|
||||
void cyAvatar::SetMorph(const char* clothing_name, UInt8 layer, float value)
|
||||
void cyAvatar::SetMorph(const char* clothing_name, uint8_t layer, float value)
|
||||
{
|
||||
plClothingItem *item = plClothingMgr::GetClothingMgr()->FindItemByName(clothing_name);
|
||||
if( !item )
|
||||
@ -1430,7 +1430,7 @@ void cyAvatar::SetMorph(const char* clothing_name, UInt8 layer, float value)
|
||||
//
|
||||
// PURPOSE : Returns the current morph value of the specific layer of clothing
|
||||
//
|
||||
float cyAvatar::GetMorph(const char* clothing_name, UInt8 layer)
|
||||
float cyAvatar::GetMorph(const char* clothing_name, uint8_t layer)
|
||||
{
|
||||
plMorphSequence* seq = LocalMorphSequence();
|
||||
if( !seq )
|
||||
@ -1474,7 +1474,7 @@ float cyAvatar::GetMorph(const char* clothing_name, UInt8 layer)
|
||||
//
|
||||
// PURPOSE : Set the skin blend for the specified layer
|
||||
//
|
||||
void cyAvatar::SetSkinBlend(UInt8 layer, float value)
|
||||
void cyAvatar::SetSkinBlend(uint8_t layer, float value)
|
||||
{
|
||||
if (value < 0.0) value = 0.0;
|
||||
if (value > 1.0) value = 1.0;
|
||||
@ -1494,7 +1494,7 @@ void cyAvatar::SetSkinBlend(UInt8 layer, float value)
|
||||
//
|
||||
// PURPOSE : Returns the current layer's skin blend
|
||||
//
|
||||
float cyAvatar::GetSkinBlend(UInt8 layer)
|
||||
float cyAvatar::GetSkinBlend(uint8_t layer)
|
||||
{
|
||||
plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar();
|
||||
|
||||
@ -1546,7 +1546,7 @@ void cyAvatar::EnterSubWorld(pySceneObject& object)
|
||||
plKey subWorldKey = SOkey;
|
||||
plKey physKey = avatar->GetKey();
|
||||
plKey nilKey; // sorry
|
||||
plSubWorldMsg *swMsg = TRACKED_NEW plSubWorldMsg(nilKey, physKey, subWorldKey);
|
||||
plSubWorldMsg *swMsg = new plSubWorldMsg(nilKey, physKey, subWorldKey);
|
||||
swMsg->Send();
|
||||
}
|
||||
}
|
||||
@ -1573,7 +1573,7 @@ void cyAvatar::ExitSubWorld()
|
||||
plKey subWorldKey; // we're going to the nil subworld
|
||||
plKey physKey = avatar->GetKey();
|
||||
plKey nilKey; // sorry
|
||||
plSubWorldMsg *swMsg = TRACKED_NEW plSubWorldMsg(nilKey, physKey, subWorldKey);
|
||||
plSubWorldMsg *swMsg = new plSubWorldMsg(nilKey, physKey, subWorldKey);
|
||||
swMsg->Send();
|
||||
}
|
||||
}
|
||||
@ -1616,7 +1616,7 @@ void cyAvatar::ChangeAvatar(const char* genderName)
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
plClothingMgr::ChangeAvatar((char*)genderName);
|
||||
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, genderName, arrsize(wStr));
|
||||
|
||||
RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef();
|
||||
@ -1637,7 +1637,7 @@ void cyAvatar::ChangeAvatar(const char* genderName)
|
||||
//
|
||||
void cyAvatar::ChangePlayerName(const char* playerName)
|
||||
{
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, playerName, arrsize(wStr));
|
||||
|
||||
RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef();
|
||||
@ -1847,12 +1847,12 @@ bool cyAvatar::LocalAvatarIsMoving()
|
||||
return false;
|
||||
}
|
||||
|
||||
void cyAvatar::SetMouseTurnSensitivity(hsScalar val)
|
||||
void cyAvatar::SetMouseTurnSensitivity(float val)
|
||||
{
|
||||
plArmatureMod::SetMouseTurnSensitivity(val);
|
||||
}
|
||||
|
||||
hsScalar cyAvatar::GetMouseTurnSensitivity()
|
||||
float cyAvatar::GetMouseTurnSensitivity()
|
||||
{
|
||||
return plArmatureMod::GetMouseTurnSensitivity();
|
||||
}
|
||||
@ -1949,7 +1949,7 @@ bool IExitTopmostGenericMode()
|
||||
{
|
||||
plArmatureMod *avatar = plAvatarMgr::GetInstance()->GetLocalAvatar();
|
||||
|
||||
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg(nil, avatar->GetKey(),
|
||||
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg(nil, avatar->GetKey(),
|
||||
plAvBrainGenericMsg::kGotoStage, 2, false, 0.0,
|
||||
false, false, 0.0);
|
||||
|
||||
|
@ -110,15 +110,15 @@ public:
|
||||
virtual void RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netForce, hsBool netProp);
|
||||
|
||||
// for the multistage behaviors
|
||||
virtual void NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
virtual void NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce);
|
||||
virtual void PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
virtual void PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce);
|
||||
virtual void GoToStage(pyKey &behKey, Int32 stage, hsScalar transTime, hsBool setTime, hsScalar newTime,
|
||||
virtual void GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, hsBool netForce);
|
||||
|
||||
// static behavior functions:
|
||||
static void SetLoopCount(pyKey &behKey, Int32 stage, Int32 loopCount, hsBool netForce);
|
||||
static void SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsBool netForce);
|
||||
|
||||
virtual void SetSenderKey(pyKey &pKey);
|
||||
|
||||
@ -132,7 +132,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Return what clothing group the avatar is in
|
||||
//
|
||||
virtual Int32 GetAvatarClothingGroup();
|
||||
virtual int32_t GetAvatarClothingGroup();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -141,7 +141,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Return a list of the wearable items for this avatar of that clothing_type
|
||||
//
|
||||
virtual std::vector<std::string> GetEntireClothingList(Int32 clothing_type);
|
||||
virtual std::vector<std::string> GetEntireClothingList(int32_t clothing_type);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -150,7 +150,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Return a list of the wearable items for this avatar of that clothing_type
|
||||
//
|
||||
virtual std::vector<PyObject*> GetClosetClothingList(Int32 clothing_type);
|
||||
virtual std::vector<PyObject*> GetClosetClothingList(int32_t clothing_type);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -189,7 +189,7 @@ public:
|
||||
// PURPOSE : Return a list of unique clothing items (each has a different mesh)
|
||||
// : that belong to the specific type
|
||||
//
|
||||
virtual std::vector<PyObject*> GetUniqueMeshList(Int32 clothing_type);
|
||||
virtual std::vector<PyObject*> GetUniqueMeshList(int32_t clothing_type);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -248,7 +248,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
virtual hsBool TintClothingItemLayer(const char* clothing_name, pyColor& tint, UInt8 layer);
|
||||
virtual hsBool TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -288,7 +288,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
virtual hsBool TintClothingItemLayerU(const char* clothing_name, pyColor& tint, UInt8 layer, hsBool update);
|
||||
virtual hsBool TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, hsBool update);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -315,7 +315,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Get the tint a clothing item, i.e. change the color of it
|
||||
//
|
||||
virtual PyObject* GetTintClothingItemL(const char* clothing_name, UInt8 layer);
|
||||
virtual PyObject* GetTintClothingItemL(const char* clothing_name, uint8_t layer);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -354,7 +354,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Set the morph value of a specific layer of clothing
|
||||
//
|
||||
virtual void SetMorph(const char* clothing_name, UInt8 layer, float value);
|
||||
virtual void SetMorph(const char* clothing_name, uint8_t layer, float value);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -364,7 +364,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Returns the current morph value of the specific layer of clothing
|
||||
//
|
||||
virtual float GetMorph(const char* clothing_name, UInt8 layer);
|
||||
virtual float GetMorph(const char* clothing_name, uint8_t layer);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -374,7 +374,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Set the skin blend for the specified layer
|
||||
//
|
||||
virtual void SetSkinBlend(UInt8 layer, float value);
|
||||
virtual void SetSkinBlend(uint8_t layer, float value);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -383,7 +383,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Returns the current layer's skin blend
|
||||
//
|
||||
virtual float GetSkinBlend(UInt8 layer);
|
||||
virtual float GetSkinBlend(uint8_t layer);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -542,8 +542,8 @@ public:
|
||||
static bool LocalAvatarRunKeyDown();
|
||||
static bool LocalAvatarIsMoving();
|
||||
|
||||
static void SetMouseTurnSensitivity(hsScalar val);
|
||||
static hsScalar GetMouseTurnSensitivity();
|
||||
static void SetMouseTurnSensitivity(float val);
|
||||
static float GetMouseTurnSensitivity();
|
||||
|
||||
static void SpawnNext();
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -83,7 +83,7 @@ void cyCamera::SetSender(plKey &sender)
|
||||
void cyCamera::Push(pyKey& newCamKey)
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
|
||||
@ -113,7 +113,7 @@ void cyCamera::Push(pyKey& newCamKey)
|
||||
void cyCamera::Pop(pyKey& oldCamKey)
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
|
||||
@ -140,12 +140,12 @@ void cyCamera::Pop(pyKey& oldCamKey)
|
||||
//
|
||||
// PURPOSE : Send controlKey commands to the virtual camera (should be like a pass thru)
|
||||
//
|
||||
void cyCamera::ControlKey(Int32 controlKey, hsBool activated)
|
||||
void cyCamera::ControlKey(int32_t controlKey, hsBool activated)
|
||||
{
|
||||
// make sure that we have a virtual camera to send this to
|
||||
if ( fTheCam )
|
||||
{
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
// set sender if there is one
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
@ -173,7 +173,7 @@ void cyCamera::ControlKey(Int32 controlKey, hsBool activated)
|
||||
void cyCamera::TransitionTo(pyKey& newCamKey, double time, hsBool save)
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
// must have a receiver!
|
||||
@ -200,7 +200,7 @@ void cyCamera::SetEnableFirstPersonOverride(hsBool state)
|
||||
if ( fTheCam )
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
|
||||
@ -218,7 +218,7 @@ void cyCamera::SetEnableFirstPersonOverride(hsBool state)
|
||||
void cyCamera::UndoFirstPerson()
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
if ( fSender )
|
||||
pMsg->SetSender(fSender);
|
||||
// must have a receiver!
|
||||
@ -233,7 +233,7 @@ void cyCamera::UndoFirstPerson()
|
||||
}
|
||||
|
||||
|
||||
hsScalar cyCamera::GetFOV()
|
||||
float cyCamera::GetFOV()
|
||||
{
|
||||
if ( fTheCam )
|
||||
{
|
||||
@ -250,7 +250,7 @@ hsScalar cyCamera::GetFOV()
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void cyCamera::SetFOV(hsScalar fov, double t)
|
||||
void cyCamera::SetFOV(float fov, double t)
|
||||
{
|
||||
if ( fTheCam )
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
// PURPOSE: Class wrapper to map camera functions to plasma2 message
|
||||
//
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
class pyKey;
|
||||
@ -83,7 +83,7 @@ public:
|
||||
virtual void Pop(pyKey& oldCamKey);
|
||||
|
||||
// Send controlKey commands to the virtual camera (should be like a pass thru)
|
||||
virtual void ControlKey(Int32 controlKey, hsBool activated);
|
||||
virtual void ControlKey(int32_t controlKey, hsBool activated);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -102,8 +102,8 @@ public:
|
||||
|
||||
virtual void UndoFirstPerson();
|
||||
|
||||
virtual hsScalar GetFOV();
|
||||
virtual void SetFOV(hsScalar fov, double t);
|
||||
virtual float GetFOV();
|
||||
virtual void SetFOV(float fov, double t);
|
||||
|
||||
virtual void SetSmootherCam(hsBool state);
|
||||
virtual hsBool IsSmootherCam();
|
||||
|
@ -78,7 +78,7 @@ void cyDraw::EnableT(hsBool state)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
|
||||
plEnableMsg* pMsg = new plEnableMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
|
@ -70,8 +70,8 @@ void cyInputInterface::PushTelescopeInterface()
|
||||
{
|
||||
if (!fTelescopeInterface)
|
||||
{
|
||||
fTelescopeInterface = TRACKED_NEW plTelescopeInputInterface;
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kAddInterface);
|
||||
fTelescopeInterface = new plTelescopeInputInterface;
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kAddInterface);
|
||||
pMsg->SetIFace(fTelescopeInterface);
|
||||
pMsg->Send();
|
||||
}
|
||||
@ -88,7 +88,7 @@ void cyInputInterface::PopTelescope()
|
||||
{
|
||||
if (fTelescopeInterface)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kRemoveInterface);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kRemoveInterface);
|
||||
pMsg->SetIFace(fTelescopeInterface);
|
||||
pMsg->Send();
|
||||
hsRefCnt_SafeUnRef( fTelescopeInterface );
|
||||
|
@ -109,12 +109,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
//// Static Class Stuff //////////////////////////////////////////////////////
|
||||
plPipeline* cyMisc::fPipeline = nil;
|
||||
UInt32 cyMisc::fUniqueNumber = 0;
|
||||
uint32_t cyMisc::fUniqueNumber = 0;
|
||||
|
||||
#ifdef PLASMA_EXTERNAL_RELEASE
|
||||
UInt32 cyMisc::fPythonLoggingLevel = cyMisc::kErrorLevel;
|
||||
uint32_t cyMisc::fPythonLoggingLevel = cyMisc::kErrorLevel;
|
||||
#else
|
||||
UInt32 cyMisc::fPythonLoggingLevel = cyMisc::kWarningLevel;
|
||||
uint32_t cyMisc::fPythonLoggingLevel = cyMisc::kWarningLevel;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -137,11 +137,11 @@ void cyMisc::Update( double secs )
|
||||
//
|
||||
// PURPOSE : gets and sets the python debug print level
|
||||
//
|
||||
UInt32 cyMisc::GetPythonLoggingLevel()
|
||||
uint32_t cyMisc::GetPythonLoggingLevel()
|
||||
{
|
||||
return fPythonLoggingLevel;
|
||||
}
|
||||
void cyMisc::SetPythonLoggingLevel(UInt32 new_level)
|
||||
void cyMisc::SetPythonLoggingLevel(uint32_t new_level)
|
||||
{
|
||||
fPythonLoggingLevel = new_level;
|
||||
}
|
||||
@ -158,7 +158,7 @@ void cyMisc::Console(const char* command)
|
||||
if ( command != nil )
|
||||
{
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
|
||||
pMsg->SetControlActivated(true);
|
||||
@ -172,7 +172,7 @@ void cyMisc::ConsoleNet(const char* command, hsBool netForce)
|
||||
if ( command != nil )
|
||||
{
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
if ( netForce )
|
||||
@ -249,13 +249,13 @@ void cyMisc::PopUpConsole(const char* command)
|
||||
if ( command != nil )
|
||||
{
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg1 = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg1 = new plControlEventMsg;
|
||||
pMsg1->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg1->SetControlCode(B_SET_CONSOLE_MODE);
|
||||
pMsg1->SetControlActivated(true);
|
||||
plgDispatch::MsgSend( pMsg1 ); // whoosh... off it goes
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg2 = new plControlEventMsg;
|
||||
pMsg2->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg2->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
|
||||
pMsg2->SetControlActivated(true);
|
||||
@ -271,10 +271,10 @@ void cyMisc::PopUpConsole(const char* command)
|
||||
//
|
||||
// PURPOSE : Execute a console command from a python script
|
||||
//
|
||||
void cyMisc::TimerCallback(pyKey& selfkey, hsScalar time, UInt32 id)
|
||||
void cyMisc::TimerCallback(pyKey& selfkey, float time, uint32_t id)
|
||||
{
|
||||
// setup the message to come back to whoever the pyKey is pointing to
|
||||
plTimerCallbackMsg* pTimerMsg = TRACKED_NEW plTimerCallbackMsg(selfkey.getKey(),id);
|
||||
plTimerCallbackMsg* pTimerMsg = new plTimerCallbackMsg(selfkey.getKey(),id);
|
||||
plgTimerCallbackMgr::NewTimer( time, pTimerMsg );
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ void cyMisc::AttachObject(pyKey& ckey, pyKey& pkey)
|
||||
if ( childKey )
|
||||
{
|
||||
// create the attach message to attach the child
|
||||
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
|
||||
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
|
||||
plgDispatch::MsgSend( pMsg );
|
||||
}
|
||||
}
|
||||
@ -320,7 +320,7 @@ void cyMisc::AttachObjectSO(pySceneObject& cobj, pySceneObject& pobj)
|
||||
if ( childKey )
|
||||
{
|
||||
// create the attach message to attach the child
|
||||
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
|
||||
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
|
||||
plgDispatch::MsgSend( pMsg );
|
||||
}
|
||||
}
|
||||
@ -343,7 +343,7 @@ void cyMisc::DetachObject(pyKey& ckey, pyKey& pkey)
|
||||
if ( childKey )
|
||||
{
|
||||
// create the attach message to detach the child
|
||||
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
|
||||
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
|
||||
plgDispatch::MsgSend( pMsg );
|
||||
}
|
||||
}
|
||||
@ -356,7 +356,7 @@ void cyMisc::DetachObjectSO(pySceneObject& cobj, pySceneObject& pobj)
|
||||
if ( childKey )
|
||||
{
|
||||
// create the attach message to detach the child
|
||||
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
|
||||
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
|
||||
plgDispatch::MsgSend( pMsg );
|
||||
}
|
||||
}
|
||||
@ -396,7 +396,7 @@ void cyMisc::DetachObjectSO(pySceneObject& cobj, pySceneObject& pobj)
|
||||
//
|
||||
// PURPOSE : set the Python modifier to be dirty and asked to be saved out
|
||||
//
|
||||
void cyMisc::SetDirtySyncState(pyKey &selfkey, const char* SDLStateName, UInt32 sendFlags)
|
||||
void cyMisc::SetDirtySyncState(pyKey &selfkey, const char* SDLStateName, uint32_t sendFlags)
|
||||
{
|
||||
selfkey.DirtySynchState(SDLStateName, sendFlags);
|
||||
}
|
||||
@ -408,7 +408,7 @@ void cyMisc::SetDirtySyncState(pyKey &selfkey, const char* SDLStateName, UInt32
|
||||
//
|
||||
// PURPOSE : set the Python modifier to be dirty and asked to be saved out
|
||||
//
|
||||
void cyMisc::SetDirtySyncStateWithClients(pyKey &selfkey, const char* SDLStateName, UInt32 sendFlags)
|
||||
void cyMisc::SetDirtySyncStateWithClients(pyKey &selfkey, const char* SDLStateName, uint32_t sendFlags)
|
||||
{
|
||||
selfkey.DirtySynchState(SDLStateName, sendFlags|plSynchedObject::kBCastToClients);
|
||||
}
|
||||
@ -610,7 +610,7 @@ PyObject* cyMisc::GetPrevAgeInfo()
|
||||
}
|
||||
|
||||
// current time in current age
|
||||
UInt32 cyMisc::GetAgeTime( void )
|
||||
uint32_t cyMisc::GetAgeTime( void )
|
||||
{
|
||||
return VaultAgeGetAgeTime();
|
||||
}
|
||||
@ -637,9 +637,9 @@ float cyMisc::GetAgeTimeOfDayPercent(void)
|
||||
return plNetClientMgr::GetInstance()->GetCurrentAgeTimeOfDayPercent();
|
||||
}
|
||||
|
||||
#define kMST (UInt32)25200
|
||||
#define kOneHour (UInt32)3600
|
||||
#define kOneDay (UInt32)86400
|
||||
#define kMST (uint32_t)25200
|
||||
#define kOneHour (uint32_t)3600
|
||||
#define kOneDay (uint32_t)86400
|
||||
|
||||
time_t cyMisc::ConvertGMTtoDni(time_t gtime)
|
||||
{
|
||||
@ -684,9 +684,9 @@ time_t cyMisc::ConvertGMTtoDni(time_t gtime)
|
||||
//
|
||||
// PURPOSE : Sets the state of an exclude region
|
||||
//
|
||||
void cyMisc::ExcludeRegionSet(pyKey& sender, pyKey& exKey, UInt16 state)
|
||||
void cyMisc::ExcludeRegionSet(pyKey& sender, pyKey& exKey, uint16_t state)
|
||||
{
|
||||
plExcludeRegionMsg *msg = TRACKED_NEW plExcludeRegionMsg;
|
||||
plExcludeRegionMsg *msg = new plExcludeRegionMsg;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@ -702,9 +702,9 @@ void cyMisc::ExcludeRegionSet(pyKey& sender, pyKey& exKey, UInt16 state)
|
||||
plgDispatch::MsgSend( msg ); // whoosh... off it goes
|
||||
}
|
||||
|
||||
void cyMisc::ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, UInt16 state)
|
||||
void cyMisc::ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, uint16_t state)
|
||||
{
|
||||
plExcludeRegionMsg *msg = TRACKED_NEW plExcludeRegionMsg;
|
||||
plExcludeRegionMsg *msg = new plExcludeRegionMsg;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@ -755,7 +755,7 @@ double cyMisc::GetSysSeconds()
|
||||
//
|
||||
// PURPOSE : Return the frame delta seconds
|
||||
//
|
||||
hsScalar cyMisc::GetDelSysSeconds()
|
||||
float cyMisc::GetDelSysSeconds()
|
||||
{
|
||||
return hsTimer::GetDelSysSeconds();
|
||||
}
|
||||
@ -870,7 +870,7 @@ void cyMisc::HideDialog(const char* name)
|
||||
//
|
||||
// PURPOSE : Return the frame delta seconds
|
||||
//
|
||||
PyObject* cyMisc::GetDialogFromTagID(UInt32 tag)
|
||||
PyObject* cyMisc::GetDialogFromTagID(uint32_t tag)
|
||||
{
|
||||
pfGameGUIMgr *mgr = pfGameGUIMgr::GetInstance();
|
||||
if ( mgr )
|
||||
@ -1054,12 +1054,12 @@ std::vector<PyObject*> cyMisc::GetPlayerListDistanceSorted()
|
||||
return pyPL;
|
||||
}
|
||||
|
||||
UInt32 cyMisc::GetMaxListenListSize()
|
||||
uint32_t cyMisc::GetMaxListenListSize()
|
||||
{
|
||||
return plNetListenList::kMaxListenListSize;
|
||||
}
|
||||
|
||||
hsScalar cyMisc::GetMaxListenDistSq()
|
||||
float cyMisc::GetMaxListenDistSq()
|
||||
{
|
||||
return plNetListenList::kMaxListenDistSq;
|
||||
}
|
||||
@ -1078,10 +1078,10 @@ hsScalar cyMisc::GetMaxListenDistSq()
|
||||
//
|
||||
// RETURNS : the flags that were sent with the message (may be modified)
|
||||
//
|
||||
UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const char* message, UInt32 flags)
|
||||
uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const char* message, uint32_t flags)
|
||||
{
|
||||
// create the messge that will contain the chat message
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kHACKChatMsg );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kHACKChatMsg );
|
||||
msg->SetString( message );
|
||||
msg->SetUser( from.GetPlayerName(), from.GetPlayerID() );
|
||||
msg->SetFlags( flags );
|
||||
@ -1104,7 +1104,7 @@ UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist,
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 msgFlags = msg->GetFlags();
|
||||
uint32_t msgFlags = msg->GetFlags();
|
||||
|
||||
if (tolist.size() == 0 || (msg->GetNetReceivers() && msg->GetNetReceivers()->size() > 0))
|
||||
msg->Send();
|
||||
@ -1112,10 +1112,10 @@ UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist,
|
||||
return msgFlags;
|
||||
}
|
||||
|
||||
UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const wchar_t* message, UInt32 flags)
|
||||
uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const wchar_t* message, uint32_t flags)
|
||||
{
|
||||
// create the messge that will contain the chat message
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kHACKChatMsg );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kHACKChatMsg );
|
||||
msg->SetString( message );
|
||||
msg->SetUser( from.GetPlayerName(), from.GetPlayerID() );
|
||||
msg->SetFlags( flags );
|
||||
@ -1137,7 +1137,7 @@ UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist,
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 msgFlags = msg->GetFlags();
|
||||
uint32_t msgFlags = msg->GetFlags();
|
||||
|
||||
if (tolist.size() == 0 || (msg->GetNetReceivers() && msg->GetNetReceivers()->size() > 0))
|
||||
msg->Send();
|
||||
@ -1155,10 +1155,10 @@ UInt32 cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist,
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
void cyMisc::SendKIMessage(UInt32 command, hsScalar value)
|
||||
void cyMisc::SendKIMessage(uint32_t command, float value)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (UInt8)command );
|
||||
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
|
||||
|
||||
// check to see if the value makes any sense
|
||||
if ( command == pfKIMsg::kSetChatFadeDelay )
|
||||
@ -1183,10 +1183,10 @@ void cyMisc::SendKIMessage(UInt32 command, hsScalar value)
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
void cyMisc::SendKIMessageS(UInt32 command, const wchar_t* value)
|
||||
void cyMisc::SendKIMessageS(uint32_t command, const wchar_t* value)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (UInt8)command );
|
||||
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
|
||||
|
||||
msg->SetString( value );
|
||||
|
||||
@ -1198,16 +1198,16 @@ void cyMisc::SendKIMessageS(UInt32 command, const wchar_t* value)
|
||||
//
|
||||
// Function : SendKIMessageI
|
||||
// PARAMETERS : command - the command type
|
||||
// : value - extra value as an Int32
|
||||
// : value - extra value as an int32_t
|
||||
//
|
||||
// PURPOSE : Send message to the KI, to tell it things to do
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
void cyMisc::SendKIMessageI(UInt32 command, Int32 value)
|
||||
void cyMisc::SendKIMessageI(uint32_t command, int32_t value)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (UInt8)command );
|
||||
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
|
||||
|
||||
msg->SetIntValue(value);
|
||||
|
||||
@ -1219,16 +1219,16 @@ void cyMisc::SendKIMessageI(UInt32 command, Int32 value)
|
||||
//
|
||||
// Function : SendKIMessageIReply
|
||||
// PARAMETERS : command - the command type
|
||||
// : value - extra value as an Int32
|
||||
// : value - extra value as an int32_t
|
||||
//
|
||||
// PURPOSE : Send message to the KI, to tell it things to do
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
void cyMisc::SendKIGZMarkerMsg(Int32 markerNumber, pyKey& sender)
|
||||
void cyMisc::SendKIGZMarkerMsg(int32_t markerNumber, pyKey& sender)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kGZInRange );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kGZInRange );
|
||||
|
||||
msg->SetIntValue(markerNumber);
|
||||
msg->SetSender(sender.getKey());
|
||||
@ -1239,7 +1239,7 @@ void cyMisc::SendKIGZMarkerMsg(Int32 markerNumber, pyKey& sender)
|
||||
|
||||
void cyMisc::SendKIRegisterImagerMsg(const char* imagerName, pyKey& sender)
|
||||
{
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg(pfKIMsg::kRegisterImager);
|
||||
pfKIMsg *msg = new pfKIMsg(pfKIMsg::kRegisterImager);
|
||||
|
||||
msg->SetString(imagerName);
|
||||
msg->SetSender(sender.getKey());
|
||||
@ -1261,7 +1261,7 @@ void cyMisc::SendKIRegisterImagerMsg(const char* imagerName, pyKey& sender)
|
||||
void cyMisc::YesNoDialog(pyKey& sender, const char* thestring)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kYesNoDialog );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kYesNoDialog );
|
||||
|
||||
msg->SetSender(sender.getKey());
|
||||
msg->SetString(thestring);
|
||||
@ -1290,7 +1290,7 @@ void cyMisc::YesNoDialog(pyKey& sender, std::wstring thestring)
|
||||
void cyMisc::RateIt(const char* chronicleName, const char* thestring, hsBool onceFlag)
|
||||
{
|
||||
// create the mesage to send
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kRateIt );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kRateIt );
|
||||
|
||||
msg->SetUser(chronicleName,0);
|
||||
msg->SetString(thestring);
|
||||
@ -1313,7 +1313,7 @@ void cyMisc::SetPrivateChatList(const std::vector<pyPlayer*> & tolist)
|
||||
{
|
||||
if (tolist.size() > 0)
|
||||
{
|
||||
plNetVoiceListMsg* pMsg = TRACKED_NEW plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode);
|
||||
plNetVoiceListMsg* pMsg = new plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode);
|
||||
for (int i=0 ; i<tolist.size() ; i++ )
|
||||
pMsg->GetClientList()->Append(tolist[i]->GetPlayerID());
|
||||
|
||||
@ -1333,7 +1333,7 @@ void cyMisc::SetPrivateChatList(const std::vector<pyPlayer*> & tolist)
|
||||
//
|
||||
void cyMisc::ClearPrivateChatList(pyKey& member)
|
||||
{
|
||||
plNetVoiceListMsg* pMsg = TRACKED_NEW plNetVoiceListMsg(plNetVoiceListMsg::kDistanceMode);
|
||||
plNetVoiceListMsg* pMsg = new plNetVoiceListMsg(plNetVoiceListMsg::kDistanceMode);
|
||||
pMsg->SetRemovedKey( member.getKey() );
|
||||
pMsg->Send();
|
||||
}
|
||||
@ -1366,10 +1366,10 @@ void cyMisc::SendPetitionToCCR(const char* message)
|
||||
{
|
||||
SendPetitionToCCRI(message,plNetCommon::PetitionTypes::kGeneralHelp,nil);
|
||||
}
|
||||
void cyMisc::SendPetitionToCCRI(const char* message, UInt8 reason,const char* title)
|
||||
void cyMisc::SendPetitionToCCRI(const char* message, uint8_t reason,const char* title)
|
||||
{
|
||||
// create the mesage to send
|
||||
plCCRPetitionMsg *msg = TRACKED_NEW plCCRPetitionMsg();
|
||||
plCCRPetitionMsg *msg = new plCCRPetitionMsg();
|
||||
msg->SetNote(message);
|
||||
msg->SetType(reason);
|
||||
if (title)
|
||||
@ -1386,10 +1386,10 @@ void cyMisc::SendPetitionToCCRI(const char* message, UInt8 reason,const char* ti
|
||||
//
|
||||
// PURPOSE : Send a chat message to the CCR for help or questions
|
||||
//
|
||||
void cyMisc::SendChatToCCR(const char* message,Int32 CCRPlayerID)
|
||||
void cyMisc::SendChatToCCR(const char* message,int32_t CCRPlayerID)
|
||||
{
|
||||
// create the mesage to send
|
||||
plCCRCommunicationMsg *msg = TRACKED_NEW plCCRCommunicationMsg();
|
||||
plCCRCommunicationMsg *msg = new plCCRCommunicationMsg();
|
||||
msg->SetMessage(message);
|
||||
msg->SetType(plCCRCommunicationMsg::kReturnChatMsg);
|
||||
msg->SetBCastFlag(plMessage::kNetAllowInterAge);
|
||||
@ -1424,7 +1424,7 @@ void cyMisc::PageInNodes(const std::vector<std::string> & nodeNames, const char*
|
||||
if (hsgResMgr::ResMgr())
|
||||
{
|
||||
plSynchEnabler ps(false); // disable dirty tracking while paging in
|
||||
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoom);
|
||||
plClientMsg* msg = new plClientMsg(plClientMsg::kLoadRoom);
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey(kClient_KEY);
|
||||
msg->AddReceiver(clientKey);
|
||||
|
||||
@ -1441,7 +1441,7 @@ void cyMisc::PageOutNode(const char* nodeName)
|
||||
if ( hsgResMgr::ResMgr() )
|
||||
{
|
||||
plSynchEnabler ps(false); // disable dirty tracking while paging out
|
||||
plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kUnloadRoom);
|
||||
plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kUnloadRoom);
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
|
||||
pMsg1->AddReceiver( clientKey );
|
||||
pMsg1->AddRoomLoc(plKeyFinder::Instance().FindLocation(nil, nodeName));
|
||||
@ -1524,7 +1524,7 @@ void cyMisc::SetClearColor(float red, float green, float blue)
|
||||
char command[256];
|
||||
sprintf(command,"Graphics.Renderer.SetClearColor %f %f %f",red,green,blue);
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
|
||||
pMsg->SetControlActivated(true);
|
||||
@ -1545,7 +1545,7 @@ void cyMisc::EnableAvatarCursorFade()
|
||||
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
|
||||
if (nmgr)
|
||||
{
|
||||
plIfaceFadeAvatarMsg* iMsg = TRACKED_NEW plIfaceFadeAvatarMsg;
|
||||
plIfaceFadeAvatarMsg* iMsg = new plIfaceFadeAvatarMsg;
|
||||
iMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
|
||||
iMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
iMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE);
|
||||
@ -1559,7 +1559,7 @@ void cyMisc::DisableAvatarCursorFade()
|
||||
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
|
||||
if (nmgr)
|
||||
{
|
||||
plIfaceFadeAvatarMsg* iMsg = TRACKED_NEW plIfaceFadeAvatarMsg;
|
||||
plIfaceFadeAvatarMsg* iMsg = new plIfaceFadeAvatarMsg;
|
||||
iMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
|
||||
iMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
iMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE);
|
||||
@ -1573,7 +1573,7 @@ void cyMisc::FadeLocalPlayer(hsBool fade)
|
||||
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
|
||||
if (nmgr)
|
||||
{
|
||||
plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg;
|
||||
plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg;
|
||||
pMsg->SetFadeOut(fade);
|
||||
pMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
@ -1593,7 +1593,7 @@ void cyMisc::FadeLocalPlayer(hsBool fade)
|
||||
|
||||
void cyMisc::EnableOfferBookMode(pyKey& selfkey, const char* ageFilename, const char* ageInstanceName)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetOfferBookMode);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetOfferBookMode);
|
||||
pMsg->SetSender(selfkey.getKey());
|
||||
pMsg->SetAgeFileName(ageFilename);
|
||||
pMsg->SetAgeName(ageInstanceName);
|
||||
@ -1602,13 +1602,13 @@ void cyMisc::EnableOfferBookMode(pyKey& selfkey, const char* ageFilename, const
|
||||
|
||||
void cyMisc::DisableOfferBookMode()
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kClearOfferBookMode);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kClearOfferBookMode);
|
||||
pMsg->Send();
|
||||
}
|
||||
|
||||
void cyMisc::NotifyOffererPublicLinkCompleted(UInt32 offerer)
|
||||
void cyMisc::NotifyOffererPublicLinkCompleted(uint32_t offerer)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferCompleted, plNetClientMgr::GetInstance()->GetPlayerID());
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferCompleted, plNetClientMgr::GetInstance()->GetPlayerID());
|
||||
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
|
||||
{
|
||||
@ -1621,9 +1621,9 @@ void cyMisc::NotifyOffererPublicLinkCompleted(UInt32 offerer)
|
||||
pMsg->Send();
|
||||
}
|
||||
|
||||
void cyMisc::NotifyOffererPublicLinkRejected(UInt32 offerer)
|
||||
void cyMisc::NotifyOffererPublicLinkRejected(uint32_t offerer)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferRejected);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferRejected);
|
||||
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
|
||||
{
|
||||
@ -1637,9 +1637,9 @@ void cyMisc::NotifyOffererPublicLinkRejected(UInt32 offerer)
|
||||
ToggleAvatarClickability(true);
|
||||
}
|
||||
|
||||
void cyMisc::NotifyOffererPublicLinkAccepted(UInt32 offerer)
|
||||
void cyMisc::NotifyOffererPublicLinkAccepted(uint32_t offerer)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferAccepted);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferAccepted);
|
||||
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
|
||||
{
|
||||
@ -1656,9 +1656,9 @@ void cyMisc::ToggleAvatarClickability(hsBool on)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = 0;
|
||||
if (on)
|
||||
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIEnableAvatarClickable);
|
||||
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIEnableAvatarClickable);
|
||||
else
|
||||
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
|
||||
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
|
||||
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
@ -1668,7 +1668,7 @@ void cyMisc::ToggleAvatarClickability(hsBool on)
|
||||
|
||||
void cyMisc::SetShareSpawnPoint(const char* spawnPoint)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareSpawnPoint);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareSpawnPoint);
|
||||
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
pMsg->SetSpawnPoint(spawnPoint);
|
||||
pMsg->Send();
|
||||
@ -1676,7 +1676,7 @@ void cyMisc::SetShareSpawnPoint(const char* spawnPoint)
|
||||
|
||||
void cyMisc::SetShareAgeInstanceGuid(const Uuid& guid)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareAgeInstanceGuid);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareAgeInstanceGuid);
|
||||
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
|
||||
pMsg->SetAgeInstanceGuid(guid);
|
||||
pMsg->Send();
|
||||
@ -1776,7 +1776,7 @@ void cyMisc::TransferParticlesToKey(pyKey& fromKey, pyKey& toKey, int numParticl
|
||||
|
||||
plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar();
|
||||
|
||||
plParticleTransferMsg* pMsg = TRACKED_NEW plParticleTransferMsg(nil, avMod->GetKey(), 0, frKey, numParticles);
|
||||
plParticleTransferMsg* pMsg = new plParticleTransferMsg(nil, avMod->GetKey(), 0, frKey, numParticles);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
pMsg->Send();
|
||||
@ -1811,7 +1811,7 @@ void cyMisc::SetParticleDissentPoint(float x, float y, float z, pyKey& particles
|
||||
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
|
||||
if (flock)
|
||||
{
|
||||
(TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, x, y, z))->Send();
|
||||
(new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, x, y, z))->Send();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1845,7 +1845,7 @@ void cyMisc::SetParticleOffset(float x, float y, float z, pyKey& particles)
|
||||
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
|
||||
if (flock)
|
||||
{
|
||||
(TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, x, y, z))->Send();
|
||||
(new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, x, y, z))->Send();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1878,7 +1878,7 @@ void cyMisc::KillParticles(float time, float pct, pyKey& particles)
|
||||
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
|
||||
if (flock)
|
||||
{
|
||||
plParticleKillMsg* pMsg = TRACKED_NEW plParticleKillMsg(nil, frKey, 0, pct, time, plParticleKillMsg::kParticleKillPercentage | plParticleKillMsg::kParticleKillImmortalOnly);
|
||||
plParticleKillMsg* pMsg = new plParticleKillMsg(nil, frKey, 0, pct, time, plParticleKillMsg::kParticleKillPercentage | plParticleKillMsg::kParticleKillImmortalOnly);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
pMsg->SetBCastFlag(plMessage::kPropagateToChildren);
|
||||
@ -1909,7 +1909,7 @@ int cyMisc::GetNumParticles(pyKey& host)
|
||||
}
|
||||
|
||||
|
||||
void cyMisc::SetLightColorValue(pyKey& light, const plString& lightName, hsScalar r, hsScalar g, hsScalar b, hsScalar a)
|
||||
void cyMisc::SetLightColorValue(pyKey& light, const plString& lightName, float r, float g, float b, float a)
|
||||
{
|
||||
// lightName is the name of the light object attached to the light that we want to talk to
|
||||
// for the bug lights, this would be "RTOmni-BugLightTest"
|
||||
@ -1995,12 +1995,12 @@ void cyMisc::SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool
|
||||
}
|
||||
if (pIface)
|
||||
{
|
||||
plEnableMsg* enableMsg = TRACKED_NEW plEnableMsg;
|
||||
plEnableMsg* enableMsg = new plEnableMsg;
|
||||
enableMsg->AddReceiver(pIface->GetKey());
|
||||
enableMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
enableMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
|
||||
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
|
||||
animMsg->AddReceiver(pIface->GetOwnerKey());
|
||||
animMsg->SetBCastFlag(plMessage::kPropagateToModifiers);
|
||||
animMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
@ -2032,7 +2032,7 @@ void cyMisc::SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool
|
||||
|
||||
void cyMisc::RegisterForControlEventMessages(hsBool on, pyKey& k)
|
||||
{
|
||||
plCmdIfaceModMsg* pMsg = TRACKED_NEW plCmdIfaceModMsg;
|
||||
plCmdIfaceModMsg* pMsg = new plCmdIfaceModMsg;
|
||||
pMsg->SetSender(k.getKey());
|
||||
if (on)
|
||||
pMsg->SetCmd(plCmdIfaceModMsg::kAdd);
|
||||
@ -2050,13 +2050,13 @@ void cyMisc::RegisterForControlEventMessages(hsBool on, pyKey& k)
|
||||
// PURPOSE : To request an LOS from a point on the screen
|
||||
//
|
||||
#include "plMessage/plLOSRequestMsg.h"
|
||||
bool cyMisc::RequestLOSScreen(pyKey &selfkey, Int32 ID, hsScalar xPos, hsScalar yPos, hsScalar distance, int what, int reportType)
|
||||
bool cyMisc::RequestLOSScreen(pyKey &selfkey, int32_t ID, float xPos, float yPos, float distance, int what, int reportType)
|
||||
{
|
||||
plPipeline* pipe = selfkey.GetPipeline();
|
||||
if (pipe)
|
||||
{
|
||||
Int32 x=(Int32) ( xPos * pipe->Width() );
|
||||
Int32 y=(Int32) ( yPos * pipe->Height() );
|
||||
int32_t x=(int32_t) ( xPos * pipe->Width() );
|
||||
int32_t y=(int32_t) ( yPos * pipe->Height() );
|
||||
|
||||
hsPoint3 endPos, startPos;
|
||||
|
||||
@ -2072,17 +2072,17 @@ bool cyMisc::RequestLOSScreen(pyKey &selfkey, Int32 ID, hsScalar xPos, hsScalar
|
||||
switch (what)
|
||||
{
|
||||
case kClickables:
|
||||
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
|
||||
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
|
||||
pMsg->SetCullDB(plSimDefs::kLOSDBUIBlockers);
|
||||
break;
|
||||
case kCameraBlockers:
|
||||
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest );
|
||||
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest );
|
||||
break;
|
||||
case kCustom:
|
||||
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestClosest );
|
||||
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestClosest );
|
||||
break;
|
||||
case kShootable:
|
||||
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBShootableItems, plLOSRequestMsg::kTestClosest );
|
||||
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBShootableItems, plLOSRequestMsg::kTestClosest );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2201,13 +2201,13 @@ bool cyMisc::IsEnterChatModeKeyBound()
|
||||
// PURPOSE : Shoots from screen coordinates, a bullet and makes a mark on objects that know about bullet holes
|
||||
//
|
||||
#include "plMessage/plBulletMsg.h"
|
||||
void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos, hsScalar radius, hsScalar range)
|
||||
void cyMisc::ShootBulletFromScreen(pyKey &selfkey, float xPos, float yPos, float radius, float range)
|
||||
{
|
||||
plPipeline* pipe = selfkey.GetPipeline();
|
||||
if (pipe)
|
||||
{
|
||||
Int32 x=(Int32) ( xPos * pipe->Width() );
|
||||
Int32 y=(Int32) ( yPos * pipe->Height() );
|
||||
int32_t x=(int32_t) ( xPos * pipe->Width() );
|
||||
int32_t y=(int32_t) ( yPos * pipe->Height() );
|
||||
|
||||
hsPoint3 endPos, startPos;
|
||||
|
||||
@ -2219,7 +2219,7 @@ void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos,
|
||||
view.Normalize();
|
||||
startPos = startPos + (view * 1.5f);
|
||||
|
||||
plBulletMsg* bull = TRACKED_NEW plBulletMsg( selfkey.getKey(), nil, nil );
|
||||
plBulletMsg* bull = new plBulletMsg( selfkey.getKey(), nil, nil );
|
||||
bull->FireShot(startPos, view, radius, range);
|
||||
bull->Send();
|
||||
}
|
||||
@ -2232,7 +2232,7 @@ void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos,
|
||||
//
|
||||
// PURPOSE : Shoots from an object, a bullet and makes a mark on objects that know about bullet holes
|
||||
//
|
||||
void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, hsScalar radius, hsScalar range)
|
||||
void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, float radius, float range)
|
||||
{
|
||||
plSceneObject* so = plSceneObject::ConvertNoRef(sobj->getObjKey()->ObjectIsLoaded());
|
||||
if( so )
|
||||
@ -2244,7 +2244,7 @@ void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, hsScalar
|
||||
dir.Normalize();
|
||||
hsPoint3 pos = l2w.GetTranslate();
|
||||
|
||||
plBulletMsg* bull = TRACKED_NEW plBulletMsg(selfkey.getKey(), nil, nil);
|
||||
plBulletMsg* bull = new plBulletMsg(selfkey.getKey(), nil, nil);
|
||||
bull->FireShot(pos, dir, radius, range);
|
||||
|
||||
bull->Send();
|
||||
@ -2274,9 +2274,9 @@ public:
|
||||
{
|
||||
Py_XDECREF( fPyObject );
|
||||
}
|
||||
void OperationStarted( UInt32 context )
|
||||
void OperationStarted( uint32_t context )
|
||||
{}
|
||||
void OperationComplete( UInt32 context, int resultCode )
|
||||
void OperationComplete( uint32_t context, int resultCode )
|
||||
{
|
||||
if ( !fPyObject )
|
||||
return;
|
||||
@ -2299,10 +2299,10 @@ public:
|
||||
|
||||
if ( ageInfoStream && nPlayersStream )
|
||||
{
|
||||
UInt16 nAgeInfoEntries;
|
||||
uint16_t nAgeInfoEntries;
|
||||
ageInfoStream->GetStream()->ReadLE( &nAgeInfoEntries );
|
||||
|
||||
UInt16 nPlayerCountEntries;
|
||||
uint16_t nPlayerCountEntries;
|
||||
nPlayersStream->GetStream()->ReadLE( &nPlayerCountEntries );
|
||||
|
||||
hsAssert( nAgeInfoEntries==nPlayerCountEntries, "huh?" );
|
||||
@ -2313,7 +2313,7 @@ public:
|
||||
for ( int i=0; i<nAgeInfoEntries; i++ )
|
||||
{
|
||||
plAgeInfoStruct ageInfo;
|
||||
UInt32 nPlayers;
|
||||
uint32_t nPlayers;
|
||||
ageInfo.Read( ageInfoStream->GetStream(), nil );
|
||||
nPlayersStream->GetStream()->ReadLE( &nPlayers );
|
||||
PyObject* t = PyTuple_New(2);
|
||||
@ -2421,7 +2421,7 @@ int cyMisc::GetKILevel()
|
||||
{
|
||||
int result = pfKIMsg::kNanoKI;
|
||||
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, pfKIMsg::kChronicleKILevel, arrsize(wStr));
|
||||
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wStr)) {
|
||||
VaultChronicleNode chron(rvn);
|
||||
@ -2515,7 +2515,7 @@ void cyMisc::PyClearCameraStack()
|
||||
|
||||
void cyMisc::RecenterCamera()
|
||||
{
|
||||
plCameraMsg* pCam = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam = new plCameraMsg;
|
||||
pCam->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam->SetCmd(plCameraMsg::kResetPanning);
|
||||
pCam->Send();
|
||||
@ -2525,19 +2525,19 @@ void cyMisc::RecenterCamera()
|
||||
|
||||
void cyMisc::FadeIn(float lenTime, bool holdFlag, bool noSound)
|
||||
{
|
||||
plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( noSound ? plTransitionMsg::kFadeInNoSound : plTransitionMsg::kFadeIn, lenTime, holdFlag );
|
||||
plTransitionMsg *msg = new plTransitionMsg( noSound ? plTransitionMsg::kFadeInNoSound : plTransitionMsg::kFadeIn, lenTime, holdFlag );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
void cyMisc::FadeOut(float lenTime, bool holdFlag, bool noSound)
|
||||
{
|
||||
plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( noSound ? plTransitionMsg::kFadeOutNoSound : plTransitionMsg::kFadeOut, lenTime, holdFlag );
|
||||
plTransitionMsg *msg = new plTransitionMsg( noSound ? plTransitionMsg::kFadeOutNoSound : plTransitionMsg::kFadeOut, lenTime, holdFlag );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
|
||||
void cyMisc::SetClickability(hsBool b)
|
||||
{
|
||||
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(b ? plInputIfaceMgrMsg::kEnableClickables : plInputIfaceMgrMsg::kDisableClickables );
|
||||
plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(b ? plInputIfaceMgrMsg::kEnableClickables : plInputIfaceMgrMsg::kDisableClickables );
|
||||
plgDispatch::MsgSend(msg);
|
||||
}
|
||||
|
||||
@ -2558,7 +2558,7 @@ void cyMisc::DebugAssert( bool cond, const char * msg )
|
||||
//
|
||||
// PURPOSE : script can trigger itself over time w/o having to specify it in the dataset.
|
||||
//
|
||||
void cyMisc::SetAlarm( float secs, PyObject * cb, UInt32 cbContext )
|
||||
void cyMisc::SetAlarm( float secs, PyObject * cb, uint32_t cbContext )
|
||||
{
|
||||
pyAlarmMgr::GetInstance()->SetAlarm( secs, cb, cbContext );
|
||||
}
|
||||
@ -2598,7 +2598,7 @@ void cyMisc::StartScreenCapture(pyKey& selfkey)
|
||||
cyMisc::StartScreenCaptureWH(selfkey, 800, 600);
|
||||
}
|
||||
|
||||
void cyMisc::StartScreenCaptureWH(pyKey& selfkey, UInt16 width, UInt16 height)
|
||||
void cyMisc::StartScreenCaptureWH(pyKey& selfkey, uint16_t width, uint16_t height)
|
||||
{
|
||||
plCaptureRender::Capture(selfkey.getKey(), width, height);
|
||||
}
|
||||
@ -2636,7 +2636,7 @@ void cyMisc::WearDefaultClothing(pyKey& key)
|
||||
}
|
||||
}
|
||||
|
||||
void cyMisc::WearDefaultClothingType(pyKey& key, UInt32 type)
|
||||
void cyMisc::WearDefaultClothingType(pyKey& key, uint32_t type)
|
||||
{
|
||||
if (key.getKey() != plNetClientMgr::GetInstance()->GetLocalPlayerKey())
|
||||
return;
|
||||
@ -2659,7 +2659,7 @@ void cyMisc::WearDefaultClothingType(pyKey& key, UInt32 type)
|
||||
|
||||
void cyMisc::FakeLinkToObject(pyKey& avatar, pyKey& object)
|
||||
{
|
||||
plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg;
|
||||
plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg;
|
||||
msg->fAvatarKey = avatar.getKey();
|
||||
msg->fLinkObjKey = object.getKey();
|
||||
plgDispatch::MsgSend(msg);
|
||||
@ -2675,7 +2675,7 @@ void cyMisc::FakeLinkToObjectNamed(const plString& name)
|
||||
|
||||
if (!key)
|
||||
return;
|
||||
plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg;
|
||||
plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg;
|
||||
msg->fAvatarKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
msg->fLinkObjKey = key;
|
||||
plgDispatch::MsgSend(msg);
|
||||
@ -2752,7 +2752,7 @@ void cyMisc::SetGraphicsOptions(int Width, int Height, int ColorDepth, hsBool Wi
|
||||
// This has to send a message to plClient because python is loaded in the max plugins
|
||||
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
|
||||
plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kResetGraphicsDevice);
|
||||
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kResetGraphicsDevice);
|
||||
clientMsg->AddReceiver(clientKey);
|
||||
//clientMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
clientMsg->fGraphicsSettings.fWidth = Width;
|
||||
@ -2808,7 +2808,7 @@ void cyMisc::SetBehaviorNetFlags(pyKey & behKey, hsBool netForce, hsBool netProp
|
||||
}
|
||||
}
|
||||
|
||||
void cyMisc::SendFriendInvite(const wchar email[], const wchar toName[])
|
||||
void cyMisc::SendFriendInvite(const wchar_t email[], const wchar_t toName[])
|
||||
{
|
||||
if (RelVaultNode* pNode = VaultGetPlayerNodeIncRef())
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ class pyAgeInfoStruct;
|
||||
class pyPoint3;
|
||||
|
||||
#include <Python.h>
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pnUtils/pnUtils.h"
|
||||
|
||||
@ -74,8 +74,8 @@ class cyMisc
|
||||
// this is only for the C++ side
|
||||
// The pipeline is set in the plClient
|
||||
static plPipeline* fPipeline;
|
||||
static UInt32 fUniqueNumber;
|
||||
static UInt32 fPythonLoggingLevel;
|
||||
static uint32_t fUniqueNumber;
|
||||
static uint32_t fPythonLoggingLevel;
|
||||
|
||||
public:
|
||||
// periodically do things
|
||||
@ -119,8 +119,8 @@ public:
|
||||
kShootable
|
||||
};
|
||||
|
||||
static UInt32 GetPythonLoggingLevel();
|
||||
static void SetPythonLoggingLevel(UInt32 new_level);
|
||||
static uint32_t GetPythonLoggingLevel();
|
||||
static void SetPythonLoggingLevel(uint32_t new_level);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -161,7 +161,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Execute a console command from a python script
|
||||
//
|
||||
static void TimerCallback(pyKey& selfkey, hsScalar time, UInt32 id);
|
||||
static void TimerCallback(pyKey& selfkey, float time, uint32_t id);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -212,7 +212,7 @@ public:
|
||||
//
|
||||
// PURPOSE : set the Python modifier to be dirty and asked to be saved out
|
||||
//
|
||||
static void SetDirtySyncState(pyKey &selfkey, const char* SDLStateName, UInt32 sendFlags);
|
||||
static void SetDirtySyncState(pyKey &selfkey, const char* SDLStateName, uint32_t sendFlags);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -222,7 +222,7 @@ public:
|
||||
// PURPOSE : set the Python modifier to be dirty and asked to be saved out
|
||||
// specifies that state should be sent to other clients as well as server
|
||||
//
|
||||
static void SetDirtySyncStateWithClients(pyKey &selfkey, const char* SDLStateName, UInt32 sendFlags);
|
||||
static void SetDirtySyncStateWithClients(pyKey &selfkey, const char* SDLStateName, uint32_t sendFlags);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -289,7 +289,7 @@ public:
|
||||
static const char* GetPrevAgeName();
|
||||
static PyObject* GetPrevAgeInfo();
|
||||
// current time in current age
|
||||
static UInt32 GetAgeTime( void );
|
||||
static uint32_t GetAgeTime( void );
|
||||
static time_t GetDniTime(void);
|
||||
static time_t ConvertGMTtoDni(time_t time);
|
||||
static time_t GetServerTime( void ); // returns the current server time in GMT
|
||||
@ -308,8 +308,8 @@ public:
|
||||
kExRegRelease = 0,
|
||||
kExRegClear = 1,
|
||||
};
|
||||
static void ExcludeRegionSet(pyKey& sender, pyKey& exKey, UInt16 state);
|
||||
static void ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, UInt16 state);
|
||||
static void ExcludeRegionSet(pyKey& sender, pyKey& exKey, uint16_t state);
|
||||
static void ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, uint16_t state);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -335,7 +335,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Return the frame delta seconds
|
||||
//
|
||||
static hsScalar GetDelSysSeconds();
|
||||
static float GetDelSysSeconds();
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -387,7 +387,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Return the frame delta seconds
|
||||
//
|
||||
static PyObject* GetDialogFromTagID(UInt32 tag); // returns pyGUIDialog
|
||||
static PyObject* GetDialogFromTagID(uint32_t tag); // returns pyGUIDialog
|
||||
static PyObject* GetDialogFromString(const char* name); // returns pyGUIDialog
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -423,8 +423,8 @@ public:
|
||||
static std::vector<PyObject*> GetPlayerList(); // list of pyPlayer
|
||||
static std::vector<PyObject*> GetPlayerListDistanceSorted(); // list of pyPlayer
|
||||
|
||||
static UInt32 GetMaxListenListSize();
|
||||
static hsScalar GetMaxListenDistSq();
|
||||
static uint32_t GetMaxListenListSize();
|
||||
static float GetMaxListenDistSq();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -439,8 +439,8 @@ public:
|
||||
//
|
||||
// RETURNS : the flags that were sent with the message (may be modified)
|
||||
//
|
||||
static UInt32 SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const char* message, UInt32 flags);
|
||||
static UInt32 SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const wchar_t* message, UInt32 flags);
|
||||
static uint32_t SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const char* message, uint32_t flags);
|
||||
static uint32_t SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const wchar_t* message, uint32_t flags);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -452,7 +452,7 @@ public:
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
static void SendKIMessage(UInt32 command, hsScalar value);
|
||||
static void SendKIMessage(uint32_t command, float value);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -464,20 +464,20 @@ public:
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
static void SendKIMessageS(UInt32 command, const wchar_t* value);
|
||||
static void SendKIMessageS(uint32_t command, const wchar_t* value);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Function : SendKIMessageI
|
||||
// PARAMETERS : command - the command type
|
||||
// : value - extra value as an Int32
|
||||
// : value - extra value as an int32_t
|
||||
//
|
||||
// PURPOSE : Send message to the KI, to tell it things to do
|
||||
//
|
||||
// RETURNS : nothing
|
||||
//
|
||||
static void SendKIMessageI(UInt32 command, Int32 value);
|
||||
static void SendKIGZMarkerMsg(Int32 markerNumber, pyKey& sender);
|
||||
static void SendKIMessageI(uint32_t command, int32_t value);
|
||||
static void SendKIGZMarkerMsg(int32_t markerNumber, pyKey& sender);
|
||||
static void SendKIRegisterImagerMsg(const char* imagerName, pyKey& sender);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -545,7 +545,7 @@ public:
|
||||
// PURPOSE : Send a petition to the CCR for help or questions
|
||||
//
|
||||
static void SendPetitionToCCR(const char* message);
|
||||
static void SendPetitionToCCRI(const char* message, UInt8 reason,const char* title);
|
||||
static void SendPetitionToCCRI(const char* message, uint8_t reason,const char* title);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -554,7 +554,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Send a petition to the CCR for help or questions
|
||||
//
|
||||
static void SendChatToCCR(const char* message,Int32 CCRPlayerID);
|
||||
static void SendChatToCCR(const char* message,int32_t CCRPlayerID);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -617,9 +617,9 @@ public:
|
||||
//
|
||||
static void EnableOfferBookMode(pyKey& selfkey, const char* ageFileName, const char* ageInstanceName);
|
||||
static void DisableOfferBookMode();
|
||||
static void NotifyOffererPublicLinkAccepted(UInt32 offerer);
|
||||
static void NotifyOffererPublicLinkRejected(UInt32 offerer);
|
||||
static void NotifyOffererPublicLinkCompleted(UInt32 offerer);
|
||||
static void NotifyOffererPublicLinkAccepted(uint32_t offerer);
|
||||
static void NotifyOffererPublicLinkRejected(uint32_t offerer);
|
||||
static void NotifyOffererPublicLinkCompleted(uint32_t offerer);
|
||||
static void ToggleAvatarClickability(hsBool on);
|
||||
static void SetShareSpawnPoint(const char* spawnPoint);
|
||||
static void SetShareAgeInstanceGuid(const Uuid& guid);
|
||||
@ -676,7 +676,7 @@ public:
|
||||
//
|
||||
// PURPOSE : To request an LOS from a point on the screen
|
||||
//
|
||||
static bool RequestLOSScreen(pyKey &selfkey, Int32 ID, hsScalar xPos, hsScalar yPos, hsScalar distance, int what, int reportType);
|
||||
static bool RequestLOSScreen(pyKey &selfkey, int32_t ID, float xPos, float yPos, float distance, int what, int reportType);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -697,7 +697,7 @@ public:
|
||||
static void SetParticleOffset(float x, float y, float z, pyKey& particles);
|
||||
static void KillParticles(float time, float pct, pyKey& particles);
|
||||
static int GetNumParticles(pyKey& host);
|
||||
static void SetLightColorValue(pyKey& light, const plString& lightName, hsScalar r, hsScalar g, hsScalar b, hsScalar a);
|
||||
static void SetLightColorValue(pyKey& light, const plString& lightName, float r, float g, float b, float a);
|
||||
static void SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool start);
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -745,7 +745,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Shoots from screen coordinates, a bullet and makes a mark on objects that know about bullet holes
|
||||
//
|
||||
static void ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos, hsScalar radius, hsScalar range);
|
||||
static void ShootBulletFromScreen(pyKey &selfkey, float xPos, float yPos, float radius, float range);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -754,7 +754,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Shoots from an object, a bullet and makes a mark on objects that know about bullet holes
|
||||
//
|
||||
static void ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, hsScalar radius, hsScalar range);
|
||||
static void ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, float radius, float range);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -839,7 +839,7 @@ public:
|
||||
//
|
||||
// PURPOSE : script can trigger itself over time w/o having to specify it in the dataset.
|
||||
//
|
||||
static void SetAlarm( float secs, PyObject * cb, UInt32 cbContext );
|
||||
static void SetAlarm( float secs, PyObject * cb, uint32_t cbContext );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -857,7 +857,7 @@ public:
|
||||
// update and a plCaptureRenderMsg when its ready
|
||||
//
|
||||
static void StartScreenCapture(pyKey& selfkey);
|
||||
static void StartScreenCaptureWH(pyKey& selfkey, UInt16 width, UInt16 height);
|
||||
static void StartScreenCaptureWH(pyKey& selfkey, uint16_t width, uint16_t height);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -868,7 +868,7 @@ public:
|
||||
static void WearMaintainerSuit(pyKey& key, hsBool wear);
|
||||
|
||||
static void WearDefaultClothing(pyKey& key);
|
||||
static void WearDefaultClothingType(pyKey& key, UInt32 type);
|
||||
static void WearDefaultClothingType(pyKey& key, uint32_t type);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -927,7 +927,7 @@ public:
|
||||
static std::wstring GetInitPath();
|
||||
|
||||
static void SetBehaviorNetFlags(pyKey & behKey, hsBool netForce, hsBool netProp);
|
||||
static void SendFriendInvite(const wchar email[], const wchar toName[]);
|
||||
static void SendFriendInvite(const wchar_t email[], const wchar_t toName[]);
|
||||
static PyObject* PyGuidGenerate();
|
||||
static PyObject* GetAIAvatarsByModelName(const char* name);
|
||||
static void ForceVaultNodeUpdate(unsigned nodeId);
|
||||
|
@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pyKey.h"
|
||||
#include "pyPlayer.h"
|
||||
|
||||
#include "hsUtils.h"
|
||||
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
@ -256,10 +256,10 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendRTChat, args, "Params: fromPlayer,toPlayer
|
||||
else if (PyUnicode_Check(message))
|
||||
{
|
||||
int size = PyUnicode_GetSize(message);
|
||||
wchar_t* msg = TRACKED_NEW wchar_t[size + 1]; msg[size] = 0;
|
||||
wchar_t* msg = new wchar_t[size + 1]; msg[size] = 0;
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)message, msg, size);
|
||||
UInt32 retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
|
||||
DEL(msg);
|
||||
uint32_t retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
|
||||
delete msg;
|
||||
return PyLong_FromUnsignedLong(retval);
|
||||
}
|
||||
else
|
||||
@ -289,7 +289,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendKIMessage, args, "Params: command,value\nS
|
||||
else if (PyUnicode_Check(val))
|
||||
{
|
||||
int len = PyUnicode_GetSize(val);
|
||||
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
|
||||
wchar_t* buffer = new wchar_t[len + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)val, buffer, len);
|
||||
buffer[len] = L'\0';
|
||||
cyMisc::SendKIMessageS(command, buffer);
|
||||
@ -314,7 +314,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendKIMessage, args, "Params: command,value\nS
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
PYTHON_GLOBAL_METHOD_DEFINITION(PtSendKIMessageInt, args, "Params: command,value\nSame as PtSendKIMessage except the value is guaranteed to be a UInt32\n"
|
||||
PYTHON_GLOBAL_METHOD_DEFINITION(PtSendKIMessageInt, args, "Params: command,value\nSame as PtSendKIMessage except the value is guaranteed to be a uint32_t\n"
|
||||
"(for things like player IDs)")
|
||||
{
|
||||
unsigned long command;
|
||||
@ -352,7 +352,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadAvatarModel, args, "Params: modelName, spa
|
||||
if (PyUnicode_Check(userStrObj))
|
||||
{
|
||||
int len = PyUnicode_GetSize(userStrObj);
|
||||
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
|
||||
wchar_t* buffer = new wchar_t[len + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)userStrObj, buffer, len);
|
||||
buffer[len] = L'\0';
|
||||
char* temp = hsWStringToString(buffer);
|
||||
@ -412,7 +412,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetLocalizedString, args, "Params: name, argum
|
||||
if (PyUnicode_Check(nameObj))
|
||||
{
|
||||
int len = PyUnicode_GetSize(nameObj);
|
||||
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
|
||||
wchar_t* buffer = new wchar_t[len + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, buffer, len);
|
||||
buffer[len] = L'\0';
|
||||
name = buffer;
|
||||
@ -450,7 +450,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetLocalizedString, args, "Params: name, argum
|
||||
else if (PyUnicode_Check(item))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(item);
|
||||
wchar_t* buffer = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* buffer = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)item, buffer, strLen);
|
||||
buffer[strLen] = L'\0';
|
||||
arg = buffer;
|
||||
@ -485,7 +485,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtDumpLogs, args, "Params: folder\nDumps all cur
|
||||
if (PyUnicode_Check(folderObj))
|
||||
{
|
||||
int len = PyUnicode_GetSize(folderObj);
|
||||
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
|
||||
wchar_t* buffer = new wchar_t[len + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)folderObj, buffer, len);
|
||||
buffer[len] = L'\0';
|
||||
bool retVal = cyMisc::DumpLogs(buffer);
|
||||
@ -553,4 +553,4 @@ void cyMisc::AddPlasmaMethods(std::vector<PyMethodDef> &methods)
|
||||
AddPlasmaMethods2(methods);
|
||||
AddPlasmaMethods3(methods);
|
||||
AddPlasmaMethods4(methods);
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtYesNoDialog, args, "Params: selfkey,dialogMess
|
||||
if (PyUnicode_Check(dialogMsgObj))
|
||||
{
|
||||
int len = PyUnicode_GetSize(dialogMsgObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[len + 1];
|
||||
wchar_t* text = new wchar_t[len + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)dialogMsgObj, text, len);
|
||||
text[len] = L'\0';
|
||||
cyMisc::YesNoDialog(*key, text);
|
||||
|
@ -629,7 +629,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtFileExists, args, "Params: filename\nReturns t
|
||||
if (PyUnicode_Check(filenameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(filenameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = cyMisc::FileExists(text);
|
||||
@ -664,7 +664,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreateDir, args, "Params: directory\nCreates t
|
||||
if (PyUnicode_Check(directoryObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(directoryObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)directoryObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
bool retVal = cyMisc::CreateDir(text);
|
||||
|
@ -666,11 +666,11 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendFriendInvite, args, "Params: emailAddress,
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
wchar emailAddr[kMaxEmailAddressLength];
|
||||
MemSet(emailAddr, 0, sizeof(emailAddr));
|
||||
wchar_t emailAddr[kMaxEmailAddressLength];
|
||||
memset(emailAddr, 0, sizeof(emailAddr));
|
||||
|
||||
wchar toName[kMaxPlayerNameLength];
|
||||
MemSet(toName, 0, sizeof(toName));
|
||||
wchar_t toName[kMaxPlayerNameLength];
|
||||
memset(toName, 0, sizeof(toName));
|
||||
|
||||
// Check and see if the email address is ok
|
||||
int origStrLen = 0;
|
||||
|
@ -79,9 +79,9 @@ void cyParticleSys::SetNetForce(hsBool state)
|
||||
//
|
||||
// PURPOSE : send the message to the Particle System
|
||||
//
|
||||
void cyParticleSys::ISendParticleSysMsg(UInt32 param, hsScalar value)
|
||||
void cyParticleSys::ISendParticleSysMsg(uint32_t param, float value)
|
||||
{
|
||||
plParticleUpdateMsg* pMsg = TRACKED_NEW plParticleUpdateMsg(fSender, nil, nil, param, value);
|
||||
plParticleUpdateMsg* pMsg = new plParticleUpdateMsg(fSender, nil, nil, param, value);
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -103,62 +103,62 @@ void cyParticleSys::ISendParticleSysMsg(UInt32 param, hsScalar value)
|
||||
//
|
||||
// All these methods just call the IsendParticleSysMsg to do the real work
|
||||
//
|
||||
void cyParticleSys::SetParticlesPerSecond(hsScalar value)
|
||||
void cyParticleSys::SetParticlesPerSecond(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamParticlesPerSecond,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetInitPitchRange(hsScalar value)
|
||||
void cyParticleSys::SetInitPitchRange(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamInitPitchRange,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetInitYawRange(hsScalar value)
|
||||
void cyParticleSys::SetInitYawRange(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamInitYawRange,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetVelMin(hsScalar value)
|
||||
void cyParticleSys::SetVelMin(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamVelMin,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetVelMax(hsScalar value)
|
||||
void cyParticleSys::SetVelMax(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamVelMax,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetXSize(hsScalar value)
|
||||
void cyParticleSys::SetXSize(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamXSize,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetYSize(hsScalar value)
|
||||
void cyParticleSys::SetYSize(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamYSize,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetScaleMin(hsScalar value)
|
||||
void cyParticleSys::SetScaleMin(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamScaleMin,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetScaleMax(hsScalar value)
|
||||
void cyParticleSys::SetScaleMax(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamScaleMax,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetGenLife(hsScalar value)
|
||||
void cyParticleSys::SetGenLife(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamGenLife,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetPartLifeMin(hsScalar value)
|
||||
void cyParticleSys::SetPartLifeMin(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamPartLifeMin,value);
|
||||
}
|
||||
|
||||
void cyParticleSys::SetPartLifeMax(hsScalar value)
|
||||
void cyParticleSys::SetPartLifeMax(float value)
|
||||
{
|
||||
ISendParticleSysMsg(plParticleUpdateMsg::kParamPartLifeMax,value);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ protected:
|
||||
hsTArray<plKey> fRecvr;
|
||||
hsBool fNetForce;
|
||||
|
||||
virtual void ISendParticleSysMsg(UInt32 param, hsScalar value);
|
||||
virtual void ISendParticleSysMsg(uint32_t param, float value);
|
||||
|
||||
cyParticleSys(const plKey sender=nil,const plKey recvr=nil);
|
||||
|
||||
@ -81,18 +81,18 @@ public:
|
||||
virtual void AddRecvr(plKey &recvr);
|
||||
virtual void SetNetForce(hsBool state);
|
||||
|
||||
virtual void SetParticlesPerSecond(hsScalar value);
|
||||
virtual void SetInitPitchRange(hsScalar value);
|
||||
virtual void SetInitYawRange(hsScalar value);
|
||||
virtual void SetVelMin(hsScalar value);
|
||||
virtual void SetVelMax(hsScalar value);
|
||||
virtual void SetXSize(hsScalar value);
|
||||
virtual void SetYSize(hsScalar value);
|
||||
virtual void SetScaleMin(hsScalar value);
|
||||
virtual void SetScaleMax(hsScalar value);
|
||||
virtual void SetGenLife(hsScalar value);
|
||||
virtual void SetPartLifeMin(hsScalar value);
|
||||
virtual void SetPartLifeMax(hsScalar value);
|
||||
virtual void SetParticlesPerSecond(float value);
|
||||
virtual void SetInitPitchRange(float value);
|
||||
virtual void SetInitYawRange(float value);
|
||||
virtual void SetVelMin(float value);
|
||||
virtual void SetVelMax(float value);
|
||||
virtual void SetXSize(float value);
|
||||
virtual void SetYSize(float value);
|
||||
virtual void SetScaleMin(float value);
|
||||
virtual void SetScaleMax(float value);
|
||||
virtual void SetGenLife(float value);
|
||||
virtual void SetPartLifeMin(float value);
|
||||
virtual void SetPartLifeMax(float value);
|
||||
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ void cyPhysics::EnableT(hsBool state)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
|
||||
plEnableMsg* pMsg = new plEnableMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -150,7 +150,7 @@ void cyPhysics::EnableCollision()
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg;
|
||||
plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg;
|
||||
if (fNetForce )
|
||||
{
|
||||
// set the network propagate flag to make sure it gets to the other clients
|
||||
@ -179,7 +179,7 @@ void cyPhysics::DisableCollision()
|
||||
// must have a receiver!
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg;
|
||||
plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg;
|
||||
if (fNetForce )
|
||||
{
|
||||
// set the network propagate flag to make sure it gets to the other clients
|
||||
@ -251,7 +251,7 @@ void cyPhysics::WarpMat(pyMatrix44& mat)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(mat.fMatrix);
|
||||
plWarpMsg* pMsg = new plWarpMsg(mat.fMatrix);
|
||||
pMsg->SetWarpFlags(plWarpMsg::kFlushTransform);
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
@ -283,7 +283,7 @@ void cyPhysics::WarpMat(pyMatrix44& mat)
|
||||
// : if the object is physical then warp it
|
||||
// : otherwise just use the coordinate interface and set the transform
|
||||
//
|
||||
void cyPhysics::Move(pyVector3& direction, hsScalar distance)
|
||||
void cyPhysics::Move(pyVector3& direction, float distance)
|
||||
{
|
||||
//move each receiver (object) separately
|
||||
int i;
|
||||
@ -310,7 +310,7 @@ void cyPhysics::Move(pyVector3& direction, hsScalar distance)
|
||||
if ( si )
|
||||
{
|
||||
// create message for each receiver
|
||||
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(target_matrix);
|
||||
plWarpMsg* pMsg = new plWarpMsg(target_matrix);
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -352,7 +352,7 @@ void cyPhysics::Move(pyVector3& direction, hsScalar distance)
|
||||
// : if the object is physical then warp it
|
||||
// : otherwise just use the coordinate interface and set the transform
|
||||
//
|
||||
void cyPhysics::Rotate(hsScalar rad, pyVector3& axis)
|
||||
void cyPhysics::Rotate(float rad, pyVector3& axis)
|
||||
{
|
||||
// rotate each receiver (object) separately
|
||||
int i;
|
||||
@ -380,7 +380,7 @@ void cyPhysics::Rotate(hsScalar rad, pyVector3& axis)
|
||||
if ( si )
|
||||
{
|
||||
// create message for each receiver
|
||||
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(target_matrix);
|
||||
plWarpMsg* pMsg = new plWarpMsg(target_matrix);
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -427,7 +427,7 @@ void cyPhysics::Force(pyVector3& force)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plForceMsg* pMsg = TRACKED_NEW plForceMsg;
|
||||
plForceMsg* pMsg = new plForceMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -466,7 +466,7 @@ void cyPhysics::ForceWithOffset(pyVector3& force, pyPoint3& offset)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plOffsetForceMsg* pMsg = TRACKED_NEW plOffsetForceMsg;
|
||||
plOffsetForceMsg* pMsg = new plOffsetForceMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -506,7 +506,7 @@ void cyPhysics::Torque(pyVector3& torque)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plTorqueMsg* pMsg = TRACKED_NEW plTorqueMsg;
|
||||
plTorqueMsg* pMsg = new plTorqueMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -544,7 +544,7 @@ void cyPhysics::Impulse(pyVector3& impulse)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plImpulseMsg* pMsg = TRACKED_NEW plImpulseMsg;
|
||||
plImpulseMsg* pMsg = new plImpulseMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -583,7 +583,7 @@ void cyPhysics::ImpulseWithOffset(pyVector3& impulse, pyPoint3& offset)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plOffsetImpulseMsg* pMsg = TRACKED_NEW plOffsetImpulseMsg;
|
||||
plOffsetImpulseMsg* pMsg = new plOffsetImpulseMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -622,7 +622,7 @@ void cyPhysics::AngularImpulse(pyVector3& impulse)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAngularImpulseMsg* pMsg = TRACKED_NEW plAngularImpulseMsg;
|
||||
plAngularImpulseMsg* pMsg = new plAngularImpulseMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -655,14 +655,14 @@ void cyPhysics::AngularImpulse(pyVector3& impulse)
|
||||
// : A damp factor of 1 leaves them alone.
|
||||
//
|
||||
//
|
||||
void cyPhysics::Damp(hsScalar damp)
|
||||
void cyPhysics::Damp(float damp)
|
||||
{
|
||||
hsAssert(0, "Who uses this?");
|
||||
// must have a receiver!
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plDampMsg* pMsg = TRACKED_NEW plDampMsg;
|
||||
plDampMsg* pMsg = new plDampMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -701,7 +701,7 @@ void cyPhysics::ShiftMass(pyVector3& offset)
|
||||
/* if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plShiftMassMsg* pMsg = TRACKED_NEW plShiftMassMsg;
|
||||
plShiftMassMsg* pMsg = new plShiftMassMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -752,7 +752,7 @@ void cyPhysics::SetLinearVelocity(pyVector3& velocity)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plLinearVelocityMsg* pMsg = TRACKED_NEW plLinearVelocityMsg;
|
||||
plLinearVelocityMsg* pMsg = new plLinearVelocityMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
@ -779,7 +779,7 @@ void cyPhysics::SetAngularVelocity(pyVector3& angVel)
|
||||
if ( fRecvr.Count() > 0 )
|
||||
{
|
||||
// create message
|
||||
plAngularVelocityMsg* pMsg = TRACKED_NEW plAngularVelocityMsg;
|
||||
plAngularVelocityMsg* pMsg = new plAngularVelocityMsg;
|
||||
// check if this needs to be network forced to all clients
|
||||
if (fNetForce )
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ public:
|
||||
// Move the object in a direction and distance
|
||||
// if the object is physical then warp it
|
||||
// otherwise just use the coordinate interface and set the transform
|
||||
virtual void Move(pyVector3& direction, hsScalar distance);
|
||||
virtual void Move(pyVector3& direction, float distance);
|
||||
|
||||
// Rotate the object
|
||||
// if the object is physical then warp it
|
||||
// otherwise just use the coordinate interface and set the transform
|
||||
virtual void Rotate(hsScalar rad, pyVector3& axis);
|
||||
virtual void Rotate(float rad, pyVector3& axis);
|
||||
|
||||
// apply a force to the center of mass of the receiver
|
||||
virtual void Force(pyVector3& force);
|
||||
@ -133,7 +133,7 @@ public:
|
||||
// Decrease all velocities on the given object.
|
||||
// A damp factor of 0 nulls them all entirely;
|
||||
// A damp factor of 1 leaves them alone.
|
||||
virtual void Damp(hsScalar damp);
|
||||
virtual void Damp(float damp);
|
||||
|
||||
// Shift the center of mass of the given object by the given
|
||||
// amount in the given direction.
|
||||
|
@ -176,7 +176,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "Games/VarSync/pyVarSyncMsg.h"
|
||||
#include "Games/VarSync/pyVarSyncGame.h"
|
||||
|
||||
Int32 PythonInterface::initialized = 0; // only need to initialize all of Python once
|
||||
int32_t PythonInterface::initialized = 0; // only need to initialize all of Python once
|
||||
hsBool PythonInterface::FirstTimeInit = true; // start with "this is the first time"
|
||||
hsBool PythonInterface::IsInShutdown = false; // whether we are _really_ in shutdown mode
|
||||
|
||||
@ -661,7 +661,7 @@ PYTHON_METHOD_DEFINITION(ptOutputRedirector, write, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->Write(text);
|
||||
@ -754,7 +754,7 @@ public:
|
||||
PyErr_Display(except, val, tb);
|
||||
|
||||
// Send to the log server
|
||||
wchar* wdata = hsStringToWString(fData.c_str());
|
||||
wchar_t* wdata = hsStringToWString(fData.c_str());
|
||||
NetCliAuthLogPythonTraceback(wdata);
|
||||
delete [] wdata;
|
||||
|
||||
@ -787,7 +787,7 @@ PYTHON_METHOD_DEFINITION(ptErrorRedirector, write, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->Write(text);
|
||||
@ -1164,7 +1164,7 @@ void PythonInterface::initPython()
|
||||
AddPlasmaMethods(methods);
|
||||
|
||||
// now copy the data to our real method definition structure
|
||||
plasmaMethods = TRACKED_NEW PyMethodDef[methods.size() + 1];
|
||||
plasmaMethods = new PyMethodDef[methods.size() + 1];
|
||||
for (int curMethod = 0; curMethod < methods.size(); curMethod++)
|
||||
plasmaMethods[curMethod] = methods[curMethod];
|
||||
PyMethodDef terminator = {NULL};
|
||||
@ -1290,7 +1290,7 @@ void PythonInterface::initPython()
|
||||
AddPlasmaGameMethods(methods);
|
||||
|
||||
// now copy the data to our real method definition structure
|
||||
plasmaGameMethods = TRACKED_NEW PyMethodDef[methods.size() + 1];
|
||||
plasmaGameMethods = new PyMethodDef[methods.size() + 1];
|
||||
for (int curMethod = 0; curMethod < methods.size(); curMethod++)
|
||||
plasmaGameMethods[curMethod] = methods[curMethod];
|
||||
plasmaGameMethods[methods.size()] = terminator; // add the terminator
|
||||
@ -2126,7 +2126,7 @@ PyObject* PythonInterface::CompileString(char *command, char* filename)
|
||||
//
|
||||
// PURPOSE : marshals an object into a char string
|
||||
//
|
||||
hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size)
|
||||
hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, int32_t* size)
|
||||
{
|
||||
PyObject *s; // the python string object where the marsalled object wil go
|
||||
// convert object to a marshalled string python object
|
||||
@ -2160,7 +2160,7 @@ hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size)
|
||||
//
|
||||
// PURPOSE : Load a python object from a pickled object
|
||||
//
|
||||
PyObject* PythonInterface::LoadObject(char* pickle, Int32 size)
|
||||
PyObject* PythonInterface::LoadObject(char* pickle, int32_t size)
|
||||
{
|
||||
return PyMarshal_ReadObjectFromString(pickle, size);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// NOTE: Eventually, this will be made into a separate dll, because there should
|
||||
// only be one instance of this interface.
|
||||
//
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include <Python.h>
|
||||
|
||||
@ -60,7 +60,7 @@ class pyKey;
|
||||
class PythonInterface
|
||||
{
|
||||
private:
|
||||
static Int32 initialized; // count how many times we initialize
|
||||
static int32_t initialized; // count how many times we initialize
|
||||
// and make sure that many finalize on the way out
|
||||
static hsBool FirstTimeInit;
|
||||
static hsBool IsInShutdown; // whether we are _really_ in shutdown mode
|
||||
@ -173,7 +173,7 @@ public:
|
||||
//
|
||||
// PURPOSE : marshals an object into a char string
|
||||
//
|
||||
static hsBool DumpObject(PyObject* pyobj, char** pickle, Int32* size);
|
||||
static hsBool DumpObject(PyObject* pyobj, char** pickle, int32_t* size);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -183,7 +183,7 @@ public:
|
||||
//
|
||||
// PURPOSE : Load a python object from a pickled object
|
||||
//
|
||||
static PyObject* LoadObject(char* pickle, Int32 size);
|
||||
static PyObject* LoadObject(char* pickle, int32_t size);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStream.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "hsResMgr.h"
|
||||
@ -434,7 +434,7 @@ bool plPythonFileMod::ILoadPythonCode()
|
||||
// see if the file exists first before trying to import it
|
||||
char pathandfile[256];
|
||||
sprintf(pathandfile, ".\\python\\%s.py",fPythonFile);
|
||||
wchar *wPathandfile = hsStringToWString(pathandfile);
|
||||
wchar_t *wPathandfile = hsStringToWString(pathandfile);
|
||||
hsBool exists = PathDoesFileExist(wPathandfile);
|
||||
delete [] wPathandfile;
|
||||
if (exists)
|
||||
@ -553,7 +553,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
|
||||
if (sceneObj)
|
||||
{
|
||||
hsAssert(!fSDLMod, "Python SDL modifier already created");
|
||||
fSDLMod = TRACKED_NEW plPythonSDLModifier(this);
|
||||
fSDLMod = new plPythonSDLModifier(this);
|
||||
sceneObj->AddModifier(fSDLMod);
|
||||
}
|
||||
}
|
||||
@ -604,7 +604,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
|
||||
case plPythonParameter::kFloat:
|
||||
value = PyFloat_FromDouble(parameter.datarecord.fFloatNumber);
|
||||
break;
|
||||
case plPythonParameter::kBoolean:
|
||||
case plPythonParameter::kbool:
|
||||
value = PyInt_FromLong(parameter.datarecord.fBool);
|
||||
break;
|
||||
case plPythonParameter::kString:
|
||||
@ -773,7 +773,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
|
||||
{
|
||||
// create the callback object
|
||||
// Set the callback for the vault thingy
|
||||
fVaultCallback = TRACKED_NEW PythonVaultCallback( this, kfunc_VaultEvent );
|
||||
fVaultCallback = new PythonVaultCallback( this, kfunc_VaultEvent );
|
||||
VaultRegisterCallback(fVaultCallback);
|
||||
}
|
||||
|
||||
@ -781,7 +781,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
|
||||
if ( fPyFunctionInstances[kfunc_OnDefaultKeyCaught] != nil )
|
||||
{
|
||||
// Make us a key catcher
|
||||
fKeyCatcher = TRACKED_NEW pfPythonKeyCatcher( this );
|
||||
fKeyCatcher = new pfPythonKeyCatcher( this );
|
||||
|
||||
// Tell the input interface manager to use our catcher
|
||||
plInputInterfaceMgr::GetInstance()->SetDefaultKeyCatcher( fKeyCatcher );
|
||||
@ -957,8 +957,8 @@ plString plPythonFileMod::IMakeModuleName(plSceneObject* sobj)
|
||||
const char* pKeyName = pKey->GetName().c_str();
|
||||
const char* pSobjName = sKey->GetName().c_str();
|
||||
|
||||
UInt16 len = pKey->GetName().GetSize();
|
||||
UInt16 slen = sKey->GetName().GetSize();
|
||||
uint16_t len = pKey->GetName().GetSize();
|
||||
uint16_t slen = sKey->GetName().GetSize();
|
||||
|
||||
hsAssert(len+slen < 256, "Warning: String length exceeds 256 characters.");
|
||||
char modulename[256];
|
||||
@ -987,7 +987,7 @@ plString plPythonFileMod::IMakeModuleName(plSceneObject* sobj)
|
||||
// we have an owner... so we must be a clone.
|
||||
// add the cloneID to the end of the module name
|
||||
// and set the fIAmAClone flag
|
||||
UInt32 cloneID = pKeyImp->GetUoid().GetCloneID();
|
||||
uint32_t cloneID = pKeyImp->GetUoid().GetCloneID();
|
||||
name += plString::Format("%d", cloneID);
|
||||
fAmIAttachedToClone = true;
|
||||
}
|
||||
@ -996,7 +996,7 @@ plString plPythonFileMod::IMakeModuleName(plSceneObject* sobj)
|
||||
if ( !PythonInterface::IsModuleNameUnique(modulename) )
|
||||
{
|
||||
// if not unique then add the sequence number to the end of the modulename
|
||||
UInt32 seqID = pKeyImp->GetUoid().GetLocation().GetSequenceNumber();
|
||||
uint32_t seqID = pKeyImp->GetUoid().GetLocation().GetSequenceNumber();
|
||||
name += plString::Format("%d", seqID);
|
||||
}
|
||||
|
||||
@ -1011,7 +1011,7 @@ plString plPythonFileMod::IMakeModuleName(plSceneObject* sobj)
|
||||
// PURPOSE : set the param in the python file
|
||||
// : so named stuff works
|
||||
//
|
||||
void plPythonFileMod::ISetKeyValue(const plKey& key, Int32 id)
|
||||
void plPythonFileMod::ISetKeyValue(const plKey& key, int32_t id)
|
||||
{
|
||||
PyObject* setParams = PythonInterface::GetModuleItem("glue_setParam",fModule);
|
||||
|
||||
@ -1045,7 +1045,7 @@ void plPythonFileMod::ISetKeyValue(const plKey& key, Int32 id)
|
||||
// PURPOSE : find a responder by name in all age and page locations
|
||||
// : and add to the Parameter list
|
||||
//
|
||||
void plPythonFileMod::IFindResponderAndAdd(const plString &responderName, Int32 id)
|
||||
void plPythonFileMod::IFindResponderAndAdd(const plString &responderName, int32_t id)
|
||||
{
|
||||
if ( !responderName.IsNull() )
|
||||
{
|
||||
@ -1073,7 +1073,7 @@ void plPythonFileMod::IFindResponderAndAdd(const plString &responderName, Int32
|
||||
// PURPOSE : find a responder by name in all age and page locations
|
||||
// : and add to the Parameter list
|
||||
//
|
||||
void plPythonFileMod::IFindActivatorAndAdd(const plString &activatorName, Int32 id)
|
||||
void plPythonFileMod::IFindActivatorAndAdd(const plString &activatorName, int32_t id)
|
||||
{
|
||||
if ( !activatorName.IsNull() )
|
||||
{
|
||||
@ -1110,7 +1110,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const plString &activatorName, Int32
|
||||
{
|
||||
// setup a ref notify when it does get loaded
|
||||
hsgResMgr::ResMgr()->AddViaNotify(keylist[i],
|
||||
TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, kAddNotify, 0),
|
||||
new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, kAddNotify, 0),
|
||||
plRefFlags::kPassiveRef);
|
||||
}
|
||||
}
|
||||
@ -1129,7 +1129,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const plString &activatorName, Int32
|
||||
// Tasks:
|
||||
// - Call the Python code's Update function (if there)
|
||||
//
|
||||
hsBool plPythonFileMod::IEval(double secs, hsScalar del, UInt32 dirty)
|
||||
hsBool plPythonFileMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
if ( fModule )
|
||||
{
|
||||
@ -1263,7 +1263,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
// create a list for the event records
|
||||
PyObject* levents = PyList_New(0); // start with a list of no elements
|
||||
// loop thought the event records to get the data and transform into python objects
|
||||
Int32 num_records = pNtfyMsg->GetEventCount();
|
||||
int32_t num_records = pNtfyMsg->GetEventCount();
|
||||
int j;
|
||||
for ( j=0; j<num_records; j++ )
|
||||
{
|
||||
@ -1486,7 +1486,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
|
||||
// Need to determine which of the Activators sent this plNotifyMsg
|
||||
// and set the ID appropriately
|
||||
Int32 id = -1; // assume that none was found
|
||||
int32_t id = -1; // assume that none was found
|
||||
if ( pNtfyMsg->GetSender() != nil )
|
||||
{
|
||||
// loop throught the parameters and set them by id
|
||||
@ -1621,7 +1621,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
// now create the control... but first we need to find out what it is
|
||||
PyObject* pyCtrlKey = pyKey::New(pGUIMsg->GetControlKey());
|
||||
UInt32 control_type = pyGUIDialog::WhatControlType(*(pyKey::ConvertFrom(pyCtrlKey)));
|
||||
uint32_t control_type = pyGUIDialog::WhatControlType(*(pyKey::ConvertFrom(pyCtrlKey)));
|
||||
Py_DECREF(pyCtrlKey);
|
||||
|
||||
switch (control_type)
|
||||
@ -1684,7 +1684,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
}
|
||||
// Need to determine which of the GUIDialogs sent this plGUINotifyMsg
|
||||
// and set the ID appropriately
|
||||
Int32 id = -1; // assume that none was found
|
||||
int32_t id = -1; // assume that none was found
|
||||
if ( pGUIMsg->GetSender() != nil )
|
||||
{
|
||||
// loop throught the parameters and set them by id
|
||||
@ -2339,7 +2339,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
PyObject* retVal = PyObject_CallMethod(
|
||||
fPyFunctionInstances[kfunc_OnMarkerMsg],
|
||||
(char*)fFunctionNames[kfunc_OnMarkerMsg],
|
||||
"lO", (UInt32)markermsg->fType, ptuple);
|
||||
"lO", (uint32_t)markermsg->fType, ptuple);
|
||||
if (retVal == nil)
|
||||
{
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
@ -2497,7 +2497,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
PyObject* retVal = PyObject_CallMethod(
|
||||
fPyFunctionInstances[kfunc_OnMovieEvent],
|
||||
(char*)fFunctionNames[kfunc_OnMovieEvent],
|
||||
"si", moviemsg->fMovieName, (UInt32)moviemsg->fReason);
|
||||
"si", moviemsg->fMovieName, (uint32_t)moviemsg->fReason);
|
||||
if ( retVal == nil )
|
||||
{
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
@ -2897,7 +2897,7 @@ void plPythonFileMod::EnableControlKeyEvents()
|
||||
if ( fPyFunctionInstances[kfunc_OnKeyEvent] != nil )
|
||||
{
|
||||
// register for key events
|
||||
plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg;
|
||||
plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg;
|
||||
pModMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pModMsg->SetSender(GetKey());
|
||||
pModMsg->SetCmd(plCmdIfaceModMsg::kAdd);
|
||||
@ -2916,7 +2916,7 @@ void plPythonFileMod::EnableControlKeyEvents()
|
||||
void plPythonFileMod::DisableControlKeyEvents()
|
||||
{
|
||||
// unregister for key events
|
||||
plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg;
|
||||
plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg;
|
||||
pModMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pModMsg->SetSender(GetKey());
|
||||
pModMsg->SetCmd(plCmdIfaceModMsg::kRemove);
|
||||
|
@ -72,7 +72,7 @@ protected:
|
||||
|
||||
plPythonSDLModifier* fSDLMod;
|
||||
|
||||
hsBool IEval(double secs, hsScalar del, UInt32 dirty);
|
||||
hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
|
||||
plString IMakeModuleName(plSceneObject* sobj);
|
||||
|
||||
@ -105,15 +105,15 @@ protected:
|
||||
struct NamedComponent
|
||||
{
|
||||
plString name;
|
||||
Int32 id;
|
||||
int32_t id;
|
||||
bool isActivator;
|
||||
};
|
||||
|
||||
hsTArray<NamedComponent> fNamedCompQueue;
|
||||
|
||||
virtual void IFindResponderAndAdd(const plString &responderName, Int32 id);
|
||||
virtual void IFindActivatorAndAdd(const plString &activatorName, Int32 id);
|
||||
void ISetKeyValue(const plKey& key, Int32 id);
|
||||
virtual void IFindResponderAndAdd(const plString &responderName, int32_t id);
|
||||
virtual void IFindActivatorAndAdd(const plString &activatorName, int32_t id);
|
||||
void ISetKeyValue(const plKey& key, int32_t id);
|
||||
|
||||
bool ILoadPythonCode();
|
||||
|
||||
@ -142,12 +142,12 @@ public:
|
||||
virtual hsBool AmIAttachedToClone() { return fAmIAttachedToClone; }
|
||||
|
||||
virtual void AddToNotifyList(plKey pKey) { fReceivers.Append(pKey); }
|
||||
virtual Int32 NotifyListCount() { return fReceivers.Count(); }
|
||||
virtual plKey GetNotifyListItem(Int32 i) { return fReceivers[i]; }
|
||||
virtual int32_t NotifyListCount() { return fReceivers.Count(); }
|
||||
virtual plKey GetNotifyListItem(int32_t i) { return fReceivers[i]; }
|
||||
|
||||
virtual void AddParameter(plPythonParameter param) { fParameters.Append(param); }
|
||||
virtual Int32 GetParameterListCount() { return fParameters.Count(); }
|
||||
virtual plPythonParameter GetParameterItem(Int32 i) { return fParameters[i]; }
|
||||
virtual int32_t GetParameterListCount() { return fParameters.Count(); }
|
||||
virtual plPythonParameter GetParameterItem(int32_t i) { return fParameters[i]; }
|
||||
|
||||
virtual void AddTarget(plSceneObject* sobj);
|
||||
virtual void RemoveTarget(plSceneObject* so);
|
||||
|
@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "plPythonPack.h"
|
||||
#include "hsStream.h"
|
||||
@ -53,8 +53,8 @@ static const char* kPackFilePath = ".\\Python\\";
|
||||
|
||||
struct plPackOffsetInfo
|
||||
{
|
||||
UInt32 fOffset;
|
||||
UInt32 fStreamIndex; // index of the stream object in the plPythonPack object that the file resides in
|
||||
uint32_t fOffset;
|
||||
uint32_t fStreamIndex; // index of the stream object in the plPythonPack object that the file resides in
|
||||
};
|
||||
|
||||
class plPythonPack
|
||||
@ -145,14 +145,14 @@ bool plPythonPack::Open()
|
||||
|
||||
// read the index data
|
||||
int numFiles = fPackStream->ReadLE32();
|
||||
UInt32 streamIndex = (UInt32)(fPackStreams.size());
|
||||
uint32_t streamIndex = (uint32_t)(fPackStreams.size());
|
||||
for (int i = 0; i < numFiles; i++)
|
||||
{
|
||||
// and pack the index into our own data structure
|
||||
char* buf = fPackStream->ReadSafeString();
|
||||
std::string pythonName = buf; // reading a "string" from a hsStream directly into a stl string causes memory loss
|
||||
delete [] buf;
|
||||
UInt32 offset = fPackStream->ReadLE32();
|
||||
uint32_t offset = fPackStream->ReadLE32();
|
||||
|
||||
plPackOffsetInfo offsetInfo;
|
||||
offsetInfo.fOffset = offset;
|
||||
@ -160,7 +160,7 @@ bool plPythonPack::Open()
|
||||
|
||||
if (fFileOffsets.find(pythonName) != fFileOffsets.end())
|
||||
{
|
||||
UInt32 index = fFileOffsets[pythonName].fStreamIndex;
|
||||
uint32_t index = fFileOffsets[pythonName].fStreamIndex;
|
||||
if (modTimes[index] < curModTime) // is the existing file older then the new one?
|
||||
fFileOffsets[pythonName] = offsetInfo; // yup, so replace it with the new info
|
||||
}
|
||||
@ -209,11 +209,11 @@ PyObject* plPythonPack::OpenPacked(const char* fileName)
|
||||
|
||||
fPackStream->SetPosition(offsetInfo.fOffset);
|
||||
|
||||
Int32 size = fPackStream->ReadLE32();
|
||||
int32_t size = fPackStream->ReadLE32();
|
||||
if (size > 0)
|
||||
{
|
||||
char *buf = TRACKED_NEW char[size];
|
||||
UInt32 readSize = fPackStream->Read(size, buf);
|
||||
char *buf = new char[size];
|
||||
uint32_t readSize = fPackStream->Read(size, buf);
|
||||
hsAssert(readSize <= size, xtl::format("Python PackFile %s: Incorrect amount of data, read %d instead of %d",
|
||||
fileName, readSize, size).c_str());
|
||||
|
||||
|
@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#define plPythonPack_h_inc
|
||||
|
||||
#include "Python.h"
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
namespace PythonPack
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ typedef struct plPythonParameter
|
||||
{
|
||||
public:
|
||||
// this is a unique (within one Python mod) id for this parameter
|
||||
Int32 fID;
|
||||
int32_t fID;
|
||||
|
||||
// then comes the value, which is a type followed by the data
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
{
|
||||
kInt=1,
|
||||
kFloat,
|
||||
kBoolean,
|
||||
kbool,
|
||||
kString,
|
||||
kSceneObject,
|
||||
kSceneObjectList,
|
||||
@ -89,14 +89,14 @@ public:
|
||||
kNone
|
||||
};
|
||||
|
||||
Int32 fValueType; // what type of value (dataType enum)
|
||||
int32_t fValueType; // what type of value (dataType enum)
|
||||
|
||||
// the data of the value
|
||||
union
|
||||
{
|
||||
Int32 fIntNumber;
|
||||
int32_t fIntNumber;
|
||||
|
||||
hsScalar fFloatNumber;
|
||||
float fFloatNumber;
|
||||
|
||||
hsBool fBool;
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
fValueType = kNone;
|
||||
}
|
||||
|
||||
plPythonParameter(Int32 id)
|
||||
plPythonParameter(int32_t id)
|
||||
{
|
||||
fID = id;
|
||||
fValueType = kNone;
|
||||
@ -143,8 +143,8 @@ public:
|
||||
case kFloat:
|
||||
SetToFloat(other.datarecord.fFloatNumber);
|
||||
break;
|
||||
case kBoolean:
|
||||
SetToBoolean(other.datarecord.fBool);
|
||||
case kbool:
|
||||
SetTobool(other.datarecord.fBool);
|
||||
break;
|
||||
case kString:
|
||||
SetToString(other.datarecord.fString);
|
||||
@ -221,22 +221,22 @@ public:
|
||||
fValueType = kNone;
|
||||
}
|
||||
|
||||
void SetToInt(Int32 number)
|
||||
void SetToInt(int32_t number)
|
||||
{
|
||||
SetToNone();
|
||||
fValueType = kInt;
|
||||
datarecord.fIntNumber = number;
|
||||
}
|
||||
void SetToFloat(hsScalar number)
|
||||
void SetToFloat(float number)
|
||||
{
|
||||
SetToNone();
|
||||
fValueType = kFloat;
|
||||
datarecord.fFloatNumber = number;
|
||||
}
|
||||
void SetToBoolean(hsBool state)
|
||||
void SetTobool(hsBool state)
|
||||
{
|
||||
SetToNone();
|
||||
fValueType = kBoolean;
|
||||
fValueType = kbool;
|
||||
datarecord.fBool = state;
|
||||
}
|
||||
void SetToString(const char* string)
|
||||
@ -371,7 +371,7 @@ public:
|
||||
stream->ReadLE(&datarecord.fFloatNumber);
|
||||
break;
|
||||
|
||||
case kBoolean:
|
||||
case kbool:
|
||||
datarecord.fBool = stream->ReadLE32();
|
||||
break;
|
||||
|
||||
@ -380,7 +380,7 @@ public:
|
||||
count = stream->ReadLE32();
|
||||
if ( count != 0 )
|
||||
{
|
||||
datarecord.fString = TRACKED_NEW char[count+1];
|
||||
datarecord.fString = new char[count+1];
|
||||
stream->ReadLE(count,datarecord.fString);
|
||||
}
|
||||
else
|
||||
@ -424,7 +424,7 @@ public:
|
||||
stream->WriteLE(datarecord.fFloatNumber);
|
||||
break;
|
||||
|
||||
case kBoolean:
|
||||
case kbool:
|
||||
stream->WriteLE32(datarecord.fBool);
|
||||
break;
|
||||
|
||||
|
@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "hsConfig.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plPythonSDLModifier.h"
|
||||
#include "cyPythonInterface.h"
|
||||
|
||||
@ -341,7 +341,7 @@ void plPythonSDLModifier::IDirtySynchState(const char* name, hsBool sendImmediat
|
||||
SDLMap::iterator it = fMap.find(name);
|
||||
if (it != fMap.end())
|
||||
{
|
||||
UInt32 flags = 0;
|
||||
uint32_t flags = 0;
|
||||
if (it->second.sendToClients)
|
||||
flags |= kBCastToClients;
|
||||
if (it->second.sendImmediate)
|
||||
|
@ -137,29 +137,29 @@ void pyAgeInfoStruct::SetAgeInstanceGuid( const char * guid )
|
||||
fAgeInfo.SetAgeInstanceGuid( &plUUID( guid ) );
|
||||
}
|
||||
|
||||
Int32 pyAgeInfoStruct::GetAgeSequenceNumber() const
|
||||
int32_t pyAgeInfoStruct::GetAgeSequenceNumber() const
|
||||
{
|
||||
return fAgeInfo.GetAgeSequenceNumber();
|
||||
}
|
||||
|
||||
void pyAgeInfoStruct::SetAgeSequenceNumber( Int32 v )
|
||||
void pyAgeInfoStruct::SetAgeSequenceNumber( int32_t v )
|
||||
{
|
||||
fAgeInfo.SetAgeSequenceNumber( v );
|
||||
}
|
||||
|
||||
Int32 pyAgeInfoStruct::GetAgeLanguage() const
|
||||
int32_t pyAgeInfoStruct::GetAgeLanguage() const
|
||||
{
|
||||
return fAgeInfo.GetAgeLanguage();
|
||||
}
|
||||
|
||||
void pyAgeInfoStruct::SetAgeLanguage( Int32 v )
|
||||
void pyAgeInfoStruct::SetAgeLanguage( int32_t v )
|
||||
{
|
||||
fAgeInfo.SetAgeLanguage( v );
|
||||
}
|
||||
|
||||
const char * pyAgeInfoStruct::GetDisplayName() const
|
||||
{
|
||||
Int32 seq = GetAgeSequenceNumber();
|
||||
int32_t seq = GetAgeSequenceNumber();
|
||||
if ( seq>0 )
|
||||
fDisplayName = plString::Format( "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
|
||||
else
|
||||
@ -223,19 +223,19 @@ void pyAgeInfoStructRef::SetAgeInstanceGuid( const char * guid )
|
||||
fAgeInfo.SetAgeInstanceGuid( &plUUID( guid ) );
|
||||
}
|
||||
|
||||
Int32 pyAgeInfoStructRef::GetAgeSequenceNumber() const
|
||||
int32_t pyAgeInfoStructRef::GetAgeSequenceNumber() const
|
||||
{
|
||||
return fAgeInfo.GetAgeSequenceNumber();
|
||||
}
|
||||
|
||||
void pyAgeInfoStructRef::SetAgeSequenceNumber( Int32 v )
|
||||
void pyAgeInfoStructRef::SetAgeSequenceNumber( int32_t v )
|
||||
{
|
||||
fAgeInfo.SetAgeSequenceNumber( v );
|
||||
}
|
||||
|
||||
const char * pyAgeInfoStructRef::GetDisplayName() const
|
||||
{
|
||||
Int32 seq = GetAgeSequenceNumber();
|
||||
int32_t seq = GetAgeSequenceNumber();
|
||||
if ( seq>0 )
|
||||
fDisplayName = plString::Format( "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
|
||||
else
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef pyAgeInfoStruct_h_inc
|
||||
#define pyAgeInfoStruct_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "plNetCommon/plNetServerSessionInfo.h"
|
||||
|
||||
@ -100,10 +100,10 @@ public:
|
||||
void SetAgeDescription( const char * v );
|
||||
const char * GetAgeInstanceGuid() const;
|
||||
void SetAgeInstanceGuid( const char * guid );
|
||||
Int32 GetAgeSequenceNumber() const;
|
||||
void SetAgeSequenceNumber( Int32 v );
|
||||
Int32 GetAgeLanguage() const;
|
||||
void SetAgeLanguage( Int32 v );
|
||||
int32_t GetAgeSequenceNumber() const;
|
||||
void SetAgeSequenceNumber( int32_t v );
|
||||
int32_t GetAgeLanguage() const;
|
||||
void SetAgeLanguage( int32_t v );
|
||||
const char * GetDisplayName() const;
|
||||
};
|
||||
|
||||
@ -143,8 +143,8 @@ public:
|
||||
void SetAgeUserDefinedName( const char * v );
|
||||
const char * GetAgeInstanceGuid() const;
|
||||
void SetAgeInstanceGuid( const char * guid );
|
||||
Int32 GetAgeSequenceNumber() const;
|
||||
void SetAgeSequenceNumber( Int32 v );
|
||||
int32_t GetAgeSequenceNumber() const;
|
||||
void SetAgeSequenceNumber( int32_t v );
|
||||
const char * GetDisplayName() const;
|
||||
};
|
||||
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef pyAgeLinkStruct_h_inc
|
||||
#define pyAgeLinkStruct_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "plNetCommon/plNetServerSessionInfo.h"
|
||||
#include "pyAgeInfoStruct.h"
|
||||
|
@ -200,7 +200,7 @@ const char* pyAgeVault::GetAgeGuid( void )
|
||||
// Chronicle
|
||||
PyObject* pyAgeVault::FindChronicleEntry( const char * entryName )
|
||||
{
|
||||
wchar wEntryName[kMaxVaultNodeStringLength];
|
||||
wchar_t wEntryName[kMaxVaultNodeStringLength];
|
||||
StrToUnicode(wEntryName, entryName, arrsize(wEntryName));
|
||||
|
||||
if (RelVaultNode * rvn = VaultFindAgeChronicleEntryIncRef(wEntryName)) {
|
||||
@ -213,25 +213,25 @@ PyObject* pyAgeVault::FindChronicleEntry( const char * entryName )
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
void pyAgeVault::AddChronicleEntry( const char * name, UInt32 type, const char * value )
|
||||
void pyAgeVault::AddChronicleEntry( const char * name, uint32_t type, const char * value )
|
||||
{
|
||||
wchar * wEntryName = StrDupToUnicode(name);
|
||||
wchar * wEntryValue = StrDupToUnicode(value);
|
||||
wchar_t * wEntryName = StrDupToUnicode(name);
|
||||
wchar_t * wEntryValue = StrDupToUnicode(value);
|
||||
|
||||
VaultAddAgeChronicleEntry(wEntryName, type, wEntryValue);
|
||||
|
||||
FREE(wEntryName);
|
||||
FREE(wEntryValue);
|
||||
free(wEntryName);
|
||||
free(wEntryValue);
|
||||
}
|
||||
|
||||
// AGE DEVICES. AKA IMAGERS, WHATEVER.
|
||||
// Add a new device.
|
||||
void pyAgeVault::AddDevice( const char * deviceName, PyObject * cbObject, UInt32 cbContext )
|
||||
void pyAgeVault::AddDevice( const char * deviceName, PyObject * cbObject, uint32_t cbContext )
|
||||
{
|
||||
pyVaultNode::pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNode::pyVaultNodeOperationCallback)( cbObject );
|
||||
cb->VaultOperationStarted( cbContext );
|
||||
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, deviceName, arrsize(wStr));
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeAddDeviceAndWaitIncRef(wStr)) {
|
||||
@ -245,7 +245,7 @@ void pyAgeVault::AddDevice( const char * deviceName, PyObject * cbObject, UInt32
|
||||
// Remove a device.
|
||||
void pyAgeVault::RemoveDevice( const char * deviceName )
|
||||
{
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, deviceName, arrsize(wStr));
|
||||
|
||||
VaultAgeRemoveDevice(wStr);
|
||||
@ -254,7 +254,7 @@ void pyAgeVault::RemoveDevice( const char * deviceName )
|
||||
// True if device exists in age.
|
||||
bool pyAgeVault::HasDevice( const char * deviceName )
|
||||
{
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, deviceName, arrsize(wStr));
|
||||
|
||||
return VaultAgeHasDevice(wStr);
|
||||
@ -262,7 +262,7 @@ bool pyAgeVault::HasDevice( const char * deviceName )
|
||||
|
||||
PyObject * pyAgeVault::GetDevice( const char * deviceName )
|
||||
{
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, deviceName, arrsize(wStr));
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeGetDeviceIncRef(wStr)) {
|
||||
@ -275,14 +275,14 @@ PyObject * pyAgeVault::GetDevice( const char * deviceName )
|
||||
}
|
||||
|
||||
// Sets the inbox associated with a device.
|
||||
void pyAgeVault::SetDeviceInbox( const char * deviceName, const char * inboxName, PyObject * cbObject, UInt32 cbContext )
|
||||
void pyAgeVault::SetDeviceInbox( const char * deviceName, const char * inboxName, PyObject * cbObject, uint32_t cbContext )
|
||||
{
|
||||
pyVaultNode::pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNode::pyVaultNodeOperationCallback)( cbObject );
|
||||
cb->VaultOperationStarted( cbContext );
|
||||
|
||||
wchar wDev[MAX_PATH];
|
||||
wchar_t wDev[MAX_PATH];
|
||||
StrToUnicode(wDev, deviceName, arrsize(wDev));
|
||||
wchar wInb[MAX_PATH];
|
||||
wchar_t wInb[MAX_PATH];
|
||||
StrToUnicode(wInb, inboxName, arrsize(wInb));
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeSetDeviceInboxAndWaitIncRef(wDev, wInb)) {
|
||||
@ -295,7 +295,7 @@ void pyAgeVault::SetDeviceInbox( const char * deviceName, const char * inboxName
|
||||
|
||||
PyObject * pyAgeVault::GetDeviceInbox( const char * deviceName )
|
||||
{
|
||||
wchar wStr[MAX_PATH];
|
||||
wchar_t wStr[MAX_PATH];
|
||||
StrToUnicode(wStr, deviceName, arrsize(wStr));
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeGetDeviceInboxIncRef(wStr)) {
|
||||
@ -311,7 +311,7 @@ PyObject * pyAgeVault::GetAgeSDL() const
|
||||
{
|
||||
plStateDataRecord * rec = NEWZERO(plStateDataRecord);
|
||||
if (!VaultAgeGetAgeSDL(rec)) {
|
||||
DEL(rec);
|
||||
delete rec;
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
else {
|
||||
|
@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
#include <Python.h>
|
||||
@ -98,7 +98,7 @@ public:
|
||||
PyObject* GetChronicleFolder( void ); // returns pyVaultFolderNode
|
||||
// Age chronicle (not the player chronicle!)
|
||||
PyObject* FindChronicleEntry( const char * entryName ); // returns pyVaultChronicleNode
|
||||
void AddChronicleEntry( const char * name, UInt32 type, const char * value );
|
||||
void AddChronicleEntry( const char * name, uint32_t type, const char * value );
|
||||
// Players who have published to devices in this age
|
||||
PyObject* GetPeopleIKnowAboutFolder( void ); // returns pyVaultPlayerInfoListNode
|
||||
// PERSONAL AGE SPECIFIC
|
||||
@ -108,7 +108,7 @@ public:
|
||||
PyObject* GetSubAgeLink( const pyAgeInfoStruct & info ); // returns pyVaultAgeLinkNode
|
||||
// AGE DEVICES. AKA IMAGERS, WHATEVER.
|
||||
// Add a new device.
|
||||
void AddDevice( const char * deviceName, PyObject * cb=nil, UInt32 cbContext=0 );
|
||||
void AddDevice( const char * deviceName, PyObject * cb=nil, uint32_t cbContext=0 );
|
||||
// Remove a device.
|
||||
void RemoveDevice( const char * deviceName );
|
||||
// True if device exists in age.
|
||||
@ -116,7 +116,7 @@ public:
|
||||
// Get the device node by name.
|
||||
PyObject * GetDevice( const char * deviceName ); // returns pyVaultTextNoteNode
|
||||
// Sets the inbox associated with a device.
|
||||
void SetDeviceInbox( const char * deviceName, const char * inboxName, PyObject * cb=nil, UInt32 cbContext=0 );
|
||||
void SetDeviceInbox( const char * deviceName, const char * inboxName, PyObject * cb=nil, uint32_t cbContext=0 );
|
||||
// Get the inbox associated with a device.
|
||||
PyObject * GetDeviceInbox( const char * deviceName ); // returns pyVaultFolderNode
|
||||
// find matching node
|
||||
|
@ -50,8 +50,8 @@ struct pyAlarm
|
||||
double fStart;
|
||||
float fSecs;
|
||||
PyObject * fCb;
|
||||
UInt32 fCbContext;
|
||||
pyAlarm( double start, float secs, PyObject * cb, UInt32 cbContext )
|
||||
uint32_t fCbContext;
|
||||
pyAlarm( double start, float secs, PyObject * cb, uint32_t cbContext )
|
||||
: fStart( start )
|
||||
, fSecs( secs )
|
||||
, fCb( cb )
|
||||
@ -127,10 +127,10 @@ void pyAlarmMgr::Update( double secs )
|
||||
}
|
||||
}
|
||||
|
||||
void pyAlarmMgr::SetAlarm( float secs, PyObject * cb, UInt32 cbContext )
|
||||
void pyAlarmMgr::SetAlarm( float secs, PyObject * cb, uint32_t cbContext )
|
||||
{
|
||||
double start = hsTimer::GetSysSeconds();
|
||||
fAlarms.push_back( TRACKED_NEW pyAlarm( start, secs, cb, cbContext ) );
|
||||
fAlarms.push_back( new pyAlarm( start, secs, cb, cbContext ) );
|
||||
}
|
||||
|
||||
void pyAlarmMgr::Clear()
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef pyAlarm_h_inc
|
||||
#define pyAlarm_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include <Python.h>
|
||||
|
||||
@ -55,7 +55,7 @@ public:
|
||||
~pyAlarmMgr();
|
||||
static pyAlarmMgr * GetInstance();
|
||||
void Update( double secs );
|
||||
void SetAlarm( float secs, PyObject * cb, UInt32 cbContext );
|
||||
void SetAlarm( float secs, PyObject * cb, uint32_t cbContext );
|
||||
void Clear();
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plAudio/plAudioCaps.h"
|
||||
|
||||
// Sets the master volume of a given audio channel
|
||||
void pyAudioControl::SetSoundFXVolume( hsScalar volume )
|
||||
void pyAudioControl::SetSoundFXVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kSoundFX;
|
||||
@ -68,7 +68,7 @@ void pyAudioControl::SetSoundFXVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
void pyAudioControl::SetMusicVolume( hsScalar volume )
|
||||
void pyAudioControl::SetMusicVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kBgndMusic;
|
||||
@ -82,7 +82,7 @@ void pyAudioControl::SetMusicVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
void pyAudioControl::SetVoiceVolume( hsScalar volume )
|
||||
void pyAudioControl::SetVoiceVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kVoice;
|
||||
@ -96,7 +96,7 @@ void pyAudioControl::SetVoiceVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
void pyAudioControl::SetAmbienceVolume( hsScalar volume )
|
||||
void pyAudioControl::SetAmbienceVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kAmbience;
|
||||
@ -110,7 +110,7 @@ void pyAudioControl::SetAmbienceVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
void pyAudioControl::SetGUIVolume( hsScalar volume )
|
||||
void pyAudioControl::SetGUIVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kGUI;
|
||||
@ -124,7 +124,7 @@ void pyAudioControl::SetGUIVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
void pyAudioControl::SetNPCVoiceVolume( hsScalar volume )
|
||||
void pyAudioControl::SetNPCVoiceVolume( float volume )
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kNPCVoice;
|
||||
@ -138,42 +138,42 @@ void pyAudioControl::SetNPCVoiceVolume( hsScalar volume )
|
||||
plgAudioSys::SetChannelVolume( chan, volume );
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetSoundFXVolume()
|
||||
float pyAudioControl::GetSoundFXVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kSoundFX;
|
||||
return plgAudioSys::GetChannelVolume(chan);
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetMusicVolume()
|
||||
float pyAudioControl::GetMusicVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kBgndMusic;
|
||||
return plgAudioSys::GetChannelVolume(chan);
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetVoiceVolume()
|
||||
float pyAudioControl::GetVoiceVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kVoice;
|
||||
return plgAudioSys::GetChannelVolume(chan);
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetAmbienceVolume()
|
||||
float pyAudioControl::GetAmbienceVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kAmbience;
|
||||
return plgAudioSys::GetChannelVolume(chan);
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetGUIVolume()
|
||||
float pyAudioControl::GetGUIVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kGUI;
|
||||
return plgAudioSys::GetChannelVolume(chan);
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetNPCVoiceVolume()
|
||||
float pyAudioControl::GetNPCVoiceVolume()
|
||||
{
|
||||
plgAudioSys::ASChannel chan;
|
||||
chan = plgAudioSys::kNPCVoice;
|
||||
@ -271,7 +271,7 @@ hsBool pyAudioControl::CanSetMicLevel()
|
||||
return plWinMicLevel::CanSetLevel();
|
||||
}
|
||||
|
||||
void pyAudioControl::SetMicLevel( hsScalar level )
|
||||
void pyAudioControl::SetMicLevel( float level )
|
||||
{
|
||||
// make sure the volume is within range
|
||||
if( level > 1.f )
|
||||
@ -282,7 +282,7 @@ void pyAudioControl::SetMicLevel( hsScalar level )
|
||||
plWinMicLevel::SetLevel( level );
|
||||
}
|
||||
|
||||
hsScalar pyAudioControl::GetMicLevel()
|
||||
float pyAudioControl::GetMicLevel()
|
||||
{
|
||||
return plWinMicLevel::GetLevel();
|
||||
}
|
||||
@ -348,29 +348,29 @@ void pyAudioControl::PushToTalk( hsBool state )
|
||||
}
|
||||
|
||||
// Set the squelch level
|
||||
void pyAudioControl::SquelchLevel( hsScalar level )
|
||||
void pyAudioControl::SquelchLevel( float level )
|
||||
{
|
||||
plVoiceRecorder::SetSquelch(level);
|
||||
}
|
||||
|
||||
|
||||
// Adjust voice packet frame size
|
||||
void pyAudioControl::RecordFrame( Int32 size )
|
||||
void pyAudioControl::RecordFrame( int32_t size )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Set the sample rate for recording
|
||||
void pyAudioControl::RecordSampleRate( Int32 sample_rate )
|
||||
void pyAudioControl::RecordSampleRate( int32_t sample_rate )
|
||||
{
|
||||
}
|
||||
|
||||
UInt8 pyAudioControl::GetPriorityCutoff( void )
|
||||
uint8_t pyAudioControl::GetPriorityCutoff( void )
|
||||
{
|
||||
return plgAudioSys::GetPriorityCutoff();
|
||||
}
|
||||
|
||||
void pyAudioControl::SetPriorityCutoff( UInt8 cut )
|
||||
void pyAudioControl::SetPriorityCutoff( uint8_t cut )
|
||||
{
|
||||
plgAudioSys::SetPriorityCutoff( cut );
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include <Python.h>
|
||||
#include "pyGlueHelpers.h"
|
||||
@ -71,18 +71,18 @@ public:
|
||||
// Audio settings
|
||||
|
||||
// Sets the master volume of a given audio channel
|
||||
virtual void SetSoundFXVolume( hsScalar volume );
|
||||
virtual void SetMusicVolume( hsScalar volume );
|
||||
virtual void SetVoiceVolume( hsScalar volume );
|
||||
virtual void SetAmbienceVolume( hsScalar volume );
|
||||
virtual void SetGUIVolume( hsScalar volume );
|
||||
virtual void SetNPCVoiceVolume( hsScalar volume );
|
||||
virtual hsScalar GetSoundFXVolume();
|
||||
virtual hsScalar GetMusicVolume();
|
||||
virtual hsScalar GetVoiceVolume();
|
||||
virtual hsScalar GetAmbienceVolume();
|
||||
virtual hsScalar GetGUIVolume();
|
||||
virtual hsScalar GetNPCVoiceVolume();
|
||||
virtual void SetSoundFXVolume( float volume );
|
||||
virtual void SetMusicVolume( float volume );
|
||||
virtual void SetVoiceVolume( float volume );
|
||||
virtual void SetAmbienceVolume( float volume );
|
||||
virtual void SetGUIVolume( float volume );
|
||||
virtual void SetNPCVoiceVolume( float volume );
|
||||
virtual float GetSoundFXVolume();
|
||||
virtual float GetMusicVolume();
|
||||
virtual float GetVoiceVolume();
|
||||
virtual float GetAmbienceVolume();
|
||||
virtual float GetGUIVolume();
|
||||
virtual float GetNPCVoiceVolume();
|
||||
|
||||
// Switch DirectX Audio on or off at runtime
|
||||
virtual void Enable();
|
||||
@ -124,8 +124,8 @@ public:
|
||||
|
||||
// Sets the microphone volume, in the range of 0 to 1
|
||||
virtual hsBool CanSetMicLevel();
|
||||
virtual void SetMicLevel( hsScalar level );
|
||||
virtual hsScalar GetMicLevel();
|
||||
virtual void SetMicLevel( float level );
|
||||
virtual float GetMicLevel();
|
||||
|
||||
// turn voice recording on or off
|
||||
virtual void EnableVoiceRecording( hsBool state );
|
||||
@ -149,16 +149,16 @@ public:
|
||||
virtual void PushToTalk( hsBool state );
|
||||
|
||||
// Set the squelch level
|
||||
virtual void SquelchLevel( hsScalar level );
|
||||
virtual void SquelchLevel( float level );
|
||||
|
||||
// Adjust voice packet frame size
|
||||
virtual void RecordFrame( Int32 size );
|
||||
virtual void RecordFrame( int32_t size );
|
||||
|
||||
// Set the sample rate for recording
|
||||
virtual void RecordSampleRate( Int32 sample_rate );
|
||||
virtual void RecordSampleRate( int32_t sample_rate );
|
||||
|
||||
virtual UInt8 GetPriorityCutoff( void );
|
||||
virtual void SetPriorityCutoff( UInt8 cut );
|
||||
virtual uint8_t GetPriorityCutoff( void );
|
||||
virtual void SetPriorityCutoff( uint8_t cut );
|
||||
|
||||
// does the device specified support EAX
|
||||
virtual hsBool SupportEAX(const char *deviceName);
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pfCCR/plCCRMgr.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
#include "pyColor.h"
|
||||
|
||||
pyColor::pyColor(hsScalar r, hsScalar g, hsScalar b, hsScalar a)
|
||||
pyColor::pyColor(float r, float g, float b, float a)
|
||||
{
|
||||
fColor.Set(r, g, b ,a);
|
||||
}
|
||||
|
@ -59,14 +59,14 @@ private:
|
||||
hsColorRGBA fColor;
|
||||
|
||||
protected:
|
||||
pyColor(hsScalar r=0.0f, hsScalar g=0.0f, hsScalar b=0.0f, hsScalar a=0.0f);
|
||||
pyColor(float r=0.0f, float g=0.0f, float b=0.0f, float a=0.0f);
|
||||
pyColor(hsColorRGBA color);
|
||||
|
||||
public:
|
||||
// required functions for PyObject interoperability
|
||||
PYTHON_CLASS_NEW_FRIEND(ptColor);
|
||||
PYTHON_CLASS_NEW_DEFINITION;
|
||||
static PyObject *New(hsScalar red, hsScalar green, hsScalar blue, hsScalar alpha = 0.0f);
|
||||
static PyObject *New(float red, float green, float blue, float alpha = 0.0f);
|
||||
static PyObject *New(const hsColorRGBA & color);
|
||||
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyColor object
|
||||
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyColor); // converts a PyObject to a pyColor (throws error if not correct type)
|
||||
@ -78,16 +78,16 @@ public:
|
||||
void setColor(hsColorRGBA color) { fColor = color; }
|
||||
|
||||
// python get attributes helpers
|
||||
hsScalar getRed() const { return fColor.r; }
|
||||
hsScalar getGreen() const { return fColor.g; }
|
||||
hsScalar getBlue() const { return fColor.b; }
|
||||
hsScalar getAlpha() const { return fColor.a; }
|
||||
float getRed() const { return fColor.r; }
|
||||
float getGreen() const { return fColor.g; }
|
||||
float getBlue() const { return fColor.b; }
|
||||
float getAlpha() const { return fColor.a; }
|
||||
|
||||
// python set attributes helpers
|
||||
void setRed(hsScalar red) { fColor.r = red; }
|
||||
void setGreen(hsScalar green) { fColor.g = green; }
|
||||
void setBlue(hsScalar blue) { fColor.b = blue; }
|
||||
void setAlpha(hsScalar alpha) { fColor.a = alpha; }
|
||||
void setRed(float red) { fColor.r = red; }
|
||||
void setGreen(float green) { fColor.g = green; }
|
||||
void setBlue(float blue) { fColor.b = blue; }
|
||||
void setAlpha(float alpha) { fColor.a = alpha; }
|
||||
|
||||
// override the equals to operator
|
||||
hsBool operator==(const pyColor &color) const
|
||||
|
@ -280,7 +280,7 @@ PLASMA_CUSTOM_TYPE(ptColor, "Params: red=0, green=0, blue=0, alpha=0\nPlasma col
|
||||
// required functions for PyObject interoperability
|
||||
PYTHON_CLASS_NEW_IMPL(ptColor, pyColor)
|
||||
|
||||
PyObject *pyColor::New(hsScalar red, hsScalar green, hsScalar blue, hsScalar alpha)
|
||||
PyObject *pyColor::New(float red, float green, float blue, float alpha)
|
||||
{
|
||||
ptColor *newObj = (ptColor*)ptColor_type.tp_new(&ptColor_type, NULL, NULL);
|
||||
newObj->fThis->setRed(red);
|
||||
|
@ -172,56 +172,56 @@ bool pyCritterBrain::AtGoal() const
|
||||
return fBrain->AtGoal();
|
||||
}
|
||||
|
||||
void pyCritterBrain::StopDistance(hsScalar stopDistance)
|
||||
void pyCritterBrain::StopDistance(float stopDistance)
|
||||
{
|
||||
if (!fBrain)
|
||||
return;
|
||||
fBrain->StopDistance(stopDistance);
|
||||
}
|
||||
|
||||
hsScalar pyCritterBrain::StopDistance() const
|
||||
float pyCritterBrain::StopDistance() const
|
||||
{
|
||||
if (!fBrain)
|
||||
return 0;
|
||||
return fBrain->StopDistance();
|
||||
}
|
||||
|
||||
void pyCritterBrain::SightCone(hsScalar coneRad)
|
||||
void pyCritterBrain::SightCone(float coneRad)
|
||||
{
|
||||
if (!fBrain)
|
||||
return;
|
||||
fBrain->SightCone(coneRad);
|
||||
}
|
||||
|
||||
hsScalar pyCritterBrain::SightCone() const
|
||||
float pyCritterBrain::SightCone() const
|
||||
{
|
||||
if (!fBrain)
|
||||
return 0;
|
||||
return fBrain->SightCone();
|
||||
}
|
||||
|
||||
void pyCritterBrain::SightDistance(hsScalar sightDis)
|
||||
void pyCritterBrain::SightDistance(float sightDis)
|
||||
{
|
||||
if (!fBrain)
|
||||
return;
|
||||
fBrain->SightDistance(sightDis);
|
||||
}
|
||||
|
||||
hsScalar pyCritterBrain::SightDistance() const
|
||||
float pyCritterBrain::SightDistance() const
|
||||
{
|
||||
if (!fBrain)
|
||||
return 0;
|
||||
return fBrain->SightDistance();
|
||||
}
|
||||
|
||||
void pyCritterBrain::HearingDistance(hsScalar hearDis)
|
||||
void pyCritterBrain::HearingDistance(float hearDis)
|
||||
{
|
||||
if (!fBrain)
|
||||
return;
|
||||
fBrain->HearingDistance(hearDis);
|
||||
}
|
||||
|
||||
hsScalar pyCritterBrain::HearingDistance() const
|
||||
float pyCritterBrain::HearingDistance() const
|
||||
{
|
||||
if (!fBrain)
|
||||
return 0;
|
||||
|
@ -104,15 +104,15 @@ public:
|
||||
bool AvoidingAvatars() const;
|
||||
bool AtGoal() const;
|
||||
|
||||
void StopDistance(hsScalar stopDistance);
|
||||
hsScalar StopDistance() const;
|
||||
void StopDistance(float stopDistance);
|
||||
float StopDistance() const;
|
||||
|
||||
void SightCone(hsScalar coneRad);
|
||||
hsScalar SightCone() const;
|
||||
void SightDistance(hsScalar sightDis);
|
||||
hsScalar SightDistance() const;
|
||||
void HearingDistance(hsScalar hearDis);
|
||||
hsScalar HearingDistance() const;
|
||||
void SightCone(float coneRad);
|
||||
float SightCone() const;
|
||||
void SightDistance(float sightDis);
|
||||
float SightDistance() const;
|
||||
void HearingDistance(float hearDis);
|
||||
float HearingDistance() const;
|
||||
|
||||
bool CanSeeAvatar(unsigned long id) const;
|
||||
bool CanHearAvatar(unsigned long id) const;
|
||||
|
@ -173,7 +173,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, addBehavior, args, keywords)
|
||||
if (PyUnicode_Check(animNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(animNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)animNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
char* cText = hsWStringToString(text);
|
||||
@ -193,7 +193,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, addBehavior, args, keywords)
|
||||
if (PyUnicode_Check(behNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(behNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
char* cText = hsWStringToString(text);
|
||||
@ -228,7 +228,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, startBehavior, args, keywords)
|
||||
if (PyUnicode_Check(behNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(behNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
char* cText = hsWStringToString(text);
|
||||
@ -260,7 +260,7 @@ PYTHON_METHOD_DEFINITION(ptCritterBrain, runningBehavior, args)
|
||||
if (PyUnicode_Check(behNameObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(behNameObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
char* cText = hsWStringToString(text);
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
pyDniCoordinates::pyDniCoordinates(plDniCoordinateInfo* coord)
|
||||
{
|
||||
fCoords = TRACKED_NEW plDniCoordinateInfo;
|
||||
fCoords = new plDniCoordinateInfo;
|
||||
if (coord) {
|
||||
// copy their coords into our copy
|
||||
fCoords->SetTorans(coord->GetTorans());
|
||||
@ -60,7 +60,7 @@ pyDniCoordinates::pyDniCoordinates(plDniCoordinateInfo* coord)
|
||||
|
||||
pyDniCoordinates::pyDniCoordinates()
|
||||
{
|
||||
fCoords = TRACKED_NEW plDniCoordinateInfo;
|
||||
fCoords = new plDniCoordinateInfo;
|
||||
fCoords->SetTorans(0);
|
||||
fCoords->SetHSpans(0);
|
||||
fCoords->SetVSpans(0);
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsGeometry3.h"
|
||||
|
||||
#include <Python.h>
|
||||
|
@ -51,7 +51,7 @@ pyDniInfoSource::pyDniInfoSource()
|
||||
{}
|
||||
|
||||
pyDniInfoSource::~pyDniInfoSource() {
|
||||
FREE(fAgeName);
|
||||
free(fAgeName);
|
||||
}
|
||||
|
||||
PyObject* pyDniInfoSource::GetAgeCoords( void )
|
||||
@ -65,16 +65,16 @@ PyObject* pyDniInfoSource::GetAgeCoords( void )
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
UInt32 pyDniInfoSource::GetAgeTime( void ) const
|
||||
uint32_t pyDniInfoSource::GetAgeTime( void ) const
|
||||
{
|
||||
RelVaultNode * node = VaultGetAgeInfoNodeIncRef();
|
||||
if (!node)
|
||||
return 0;
|
||||
|
||||
UInt32 result;
|
||||
uint32_t result;
|
||||
VaultAgeInfoNode ageInfo(node);
|
||||
if (const plUnifiedTime * utime = ageInfo.GetAgeTime())
|
||||
result = (UInt32)utime->GetSecs();
|
||||
result = (uint32_t)utime->GetSecs();
|
||||
else
|
||||
result = 0;
|
||||
node->DecRef();
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef pyDniInfoSource_h_inc
|
||||
#define pyDniInfoSource_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
// current coords of the player in current age as a pyDniCoordinates
|
||||
PyObject* GetAgeCoords( void ); // returns pyDniCoordinates
|
||||
// current time in current age (tbd)
|
||||
UInt32 GetAgeTime( void ) const;
|
||||
uint32_t GetAgeTime( void ) const;
|
||||
// name of current age
|
||||
const char * GetAgeName( void ) const;
|
||||
// unique identifier for this age instance
|
||||
|
@ -58,13 +58,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plAvatar/plArmatureMod.h"
|
||||
#endif
|
||||
|
||||
void pyDrawControl::SetGamma2(hsScalar gamma)
|
||||
void pyDrawControl::SetGamma2(float gamma)
|
||||
{
|
||||
#ifndef BUILDING_PYPLASMA
|
||||
char command[256];
|
||||
sprintf(command,"Graphics.Renderer.Gamma2 %f",gamma);
|
||||
// create message to send to the console
|
||||
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
|
||||
plControlEventMsg* pMsg = new plControlEventMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
|
||||
pMsg->SetControlActivated(true);
|
||||
@ -77,14 +77,14 @@ void pyDrawControl::SetGamma2(hsScalar gamma)
|
||||
#include "plGLight/plShadowMaster.h"
|
||||
#endif
|
||||
|
||||
void pyDrawControl::SetShadowVisDistance(hsScalar distance)
|
||||
void pyDrawControl::SetShadowVisDistance(float distance)
|
||||
{
|
||||
#ifndef BUILDING_PYPLASMA
|
||||
plShadowMaster::SetGlobalShadowQuality(distance);
|
||||
#endif
|
||||
}
|
||||
|
||||
hsScalar pyDrawControl::GetShadowVisDistance()
|
||||
float pyDrawControl::GetShadowVisDistance()
|
||||
{
|
||||
#ifndef BUILDING_PYPLASMA
|
||||
return plShadowMaster::GetGlobalShadowQuality();
|
||||
@ -131,7 +131,7 @@ void pyDrawControl::DisableRenderScene()
|
||||
{
|
||||
#ifndef BUILDING_PYPLASMA
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
|
||||
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kDisableRenderScene);
|
||||
plClientMsg* msg = new plClientMsg(plClientMsg::kDisableRenderScene);
|
||||
msg->AddReceiver( clientKey );
|
||||
msg->Send();
|
||||
#endif
|
||||
@ -141,7 +141,7 @@ void pyDrawControl::EnableRenderScene()
|
||||
{
|
||||
#ifndef BUILDING_PYPLASMA
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
|
||||
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kEnableRenderScene);
|
||||
plClientMsg* msg = new plClientMsg(plClientMsg::kEnableRenderScene);
|
||||
msg->AddReceiver( clientKey );
|
||||
msg->Send();
|
||||
#endif
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
|
||||
@ -65,9 +65,9 @@ public:
|
||||
//static void AddPlasmaConstantsClasses(PyObject* m);
|
||||
|
||||
// static python functions
|
||||
static void SetGamma2(hsScalar gamma);
|
||||
static void SetShadowVisDistance(hsScalar distance);
|
||||
static hsScalar GetShadowVisDistance();
|
||||
static void SetGamma2(float gamma);
|
||||
static void SetShadowVisDistance(float distance);
|
||||
static float GetShadowVisDistance();
|
||||
static void EnableShadows();
|
||||
static void DisableShadows();
|
||||
static hsBool IsShadowsEnabled();
|
||||
|
@ -120,7 +120,7 @@ plDynamicTextMsg* pyDynamicText::ICreateDTMsg()
|
||||
// must have a receiver!
|
||||
if ( fReceivers.Count() > 0 )
|
||||
{
|
||||
plDynamicTextMsg* pMsg = TRACKED_NEW plDynamicTextMsg;
|
||||
plDynamicTextMsg* pMsg = new plDynamicTextMsg;
|
||||
if ( fSenderKey )
|
||||
pMsg->SetSender(fSenderKey);
|
||||
if ( fNetPropagate )
|
||||
@ -198,7 +198,7 @@ void pyDynamicText::SetTextColor2( pyColor& color, bool blockRGB )
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::SetFont( const char *facename, Int16 size )
|
||||
void pyDynamicText::SetFont( const char *facename, int16_t size )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -209,7 +209,7 @@ void pyDynamicText::SetFont( const char *facename, Int16 size )
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::FillRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bottom, pyColor& color )
|
||||
void pyDynamicText::FillRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, pyColor& color )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -220,7 +220,7 @@ void pyDynamicText::FillRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bott
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::FrameRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bottom, pyColor& color )
|
||||
void pyDynamicText::FrameRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, pyColor& color )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -231,7 +231,7 @@ void pyDynamicText::FrameRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bot
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::SetClipping( UInt16 clipLeft, UInt16 clipTop, UInt16 clipRight, UInt16 clipBottom)
|
||||
void pyDynamicText::SetClipping( uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom)
|
||||
{
|
||||
fClip = true;
|
||||
fClipLeft = clipLeft;
|
||||
@ -245,7 +245,7 @@ void pyDynamicText::UnsetClipping()
|
||||
fClip = false;
|
||||
}
|
||||
|
||||
void pyDynamicText::SetWrapping( UInt16 wrapWidth, UInt16 wrapHeight )
|
||||
void pyDynamicText::SetWrapping( uint16_t wrapWidth, uint16_t wrapHeight )
|
||||
{
|
||||
fWrap = true;
|
||||
fWrapWidth = wrapWidth;
|
||||
@ -260,7 +260,7 @@ void pyDynamicText::UnsetWrapping()
|
||||
//
|
||||
// Draw text paying attention to Clipping and Wrapping if user wanted it
|
||||
//
|
||||
void pyDynamicText::DrawText( Int16 x, Int16 y, const char *text )
|
||||
void pyDynamicText::DrawText( int16_t x, int16_t y, const char *text )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -281,7 +281,7 @@ void pyDynamicText::DrawText( Int16 x, Int16 y, const char *text )
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::DrawTextW( Int16 x, Int16 y, std::wstring text )
|
||||
void pyDynamicText::DrawTextW( int16_t x, int16_t y, std::wstring text )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -305,7 +305,7 @@ void pyDynamicText::DrawTextW( Int16 x, Int16 y, std::wstring text )
|
||||
//
|
||||
// Draw an image on the DynamicMap
|
||||
//
|
||||
void pyDynamicText::DrawImage( UInt16 x, UInt16 y, pyImage& image, hsBool respectAlpha )
|
||||
void pyDynamicText::DrawImage( uint16_t x, uint16_t y, pyImage& image, hsBool respectAlpha )
|
||||
{
|
||||
// create message
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
@ -319,7 +319,7 @@ void pyDynamicText::DrawImage( UInt16 x, UInt16 y, pyImage& image, hsBool respec
|
||||
//
|
||||
// Draw an image on the DynamicMap
|
||||
//
|
||||
void pyDynamicText::DrawImageClipped( UInt16 x, UInt16 y, pyImage& image, UInt16 cx, UInt16 cy, UInt16 cw, UInt16 ch,
|
||||
void pyDynamicText::DrawImageClipped( uint16_t x, uint16_t y, pyImage& image, uint16_t cx, uint16_t cy, uint16_t cw, uint16_t ch,
|
||||
hsBool respectAlpha )
|
||||
{
|
||||
// create message
|
||||
@ -332,7 +332,7 @@ void pyDynamicText::DrawImageClipped( UInt16 x, UInt16 y, pyImage& image, UInt16
|
||||
}
|
||||
|
||||
|
||||
UInt16 pyDynamicText::GetWidth( void )
|
||||
uint16_t pyDynamicText::GetWidth( void )
|
||||
{
|
||||
// We better just pick our first key. Note that the ONLY time we should be getting multiple receivers
|
||||
// is if the export process ends up creating multiple copies of the material. Now, WHY you'd be wanting
|
||||
@ -344,10 +344,10 @@ UInt16 pyDynamicText::GetWidth( void )
|
||||
if( dtMap == nil )
|
||||
return 0;
|
||||
|
||||
return (UInt16)dtMap->GetWidth();
|
||||
return (uint16_t)dtMap->GetWidth();
|
||||
}
|
||||
|
||||
UInt16 pyDynamicText::GetHeight( void )
|
||||
uint16_t pyDynamicText::GetHeight( void )
|
||||
{
|
||||
// We better just pick our first key. Note that the ONLY time we should be getting multiple receivers
|
||||
// is if the export process ends up creating multiple copies of the material. Now, WHY you'd be wanting
|
||||
@ -359,7 +359,7 @@ UInt16 pyDynamicText::GetHeight( void )
|
||||
if( dtMap == nil )
|
||||
return 0;
|
||||
|
||||
return (UInt16)dtMap->GetHeight();
|
||||
return (uint16_t)dtMap->GetHeight();
|
||||
}
|
||||
|
||||
void pyDynamicText::CalcTextExtents( std::wstring text, unsigned &width, unsigned &height )
|
||||
@ -374,10 +374,10 @@ void pyDynamicText::CalcTextExtents( std::wstring text, unsigned &width, unsigne
|
||||
if (!dtMap)
|
||||
return;
|
||||
|
||||
width = dtMap->CalcStringWidth(text.c_str(), (UInt16*)&height);
|
||||
width = dtMap->CalcStringWidth(text.c_str(), (uint16_t*)&height);
|
||||
}
|
||||
|
||||
void pyDynamicText::SetJustify(UInt8 justify)
|
||||
void pyDynamicText::SetJustify(uint8_t justify)
|
||||
{
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
if (pMsg)
|
||||
@ -387,7 +387,7 @@ void pyDynamicText::SetJustify(UInt8 justify)
|
||||
}
|
||||
}
|
||||
|
||||
void pyDynamicText::SetLineSpacing(Int16 spacing)
|
||||
void pyDynamicText::SetLineSpacing(int16_t spacing)
|
||||
{
|
||||
plDynamicTextMsg* pMsg = ICreateDTMsg();
|
||||
if (pMsg)
|
||||
|
@ -72,15 +72,15 @@ private:
|
||||
|
||||
// clipping
|
||||
hsBool fClip;
|
||||
UInt16 fClipLeft;
|
||||
UInt16 fClipTop;
|
||||
UInt16 fClipRight;
|
||||
UInt16 fClipBottom;
|
||||
uint16_t fClipLeft;
|
||||
uint16_t fClipTop;
|
||||
uint16_t fClipRight;
|
||||
uint16_t fClipBottom;
|
||||
|
||||
// wrapping
|
||||
hsBool fWrap;
|
||||
UInt16 fWrapWidth;
|
||||
UInt16 fWrapHeight;
|
||||
uint16_t fWrapWidth;
|
||||
uint16_t fWrapHeight;
|
||||
|
||||
virtual plDynamicTextMsg* ICreateDTMsg();
|
||||
virtual void IInit();
|
||||
@ -115,27 +115,27 @@ public:
|
||||
virtual void Flush( void );
|
||||
virtual void SetTextColor( pyColor& color );
|
||||
virtual void SetTextColor2( pyColor& color, bool blockRGB );
|
||||
virtual void SetFont( const char *facename, Int16 size );
|
||||
virtual void FillRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bottom, pyColor& color );
|
||||
virtual void FrameRect( UInt16 left, UInt16 top, UInt16 right, UInt16 bottom, pyColor& color );
|
||||
virtual void SetClipping( UInt16 clipLeft, UInt16 clipTop, UInt16 clipRight, UInt16 clipBottom);
|
||||
virtual void SetFont( const char *facename, int16_t size );
|
||||
virtual void FillRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, pyColor& color );
|
||||
virtual void FrameRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, pyColor& color );
|
||||
virtual void SetClipping( uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom);
|
||||
virtual void UnsetClipping();
|
||||
virtual void SetWrapping( UInt16 wrapWidth, UInt16 wrapHeight );
|
||||
virtual void SetWrapping( uint16_t wrapWidth, uint16_t wrapHeight );
|
||||
virtual void UnsetWrapping();
|
||||
virtual void DrawText( Int16 x, Int16 y, const char *text );
|
||||
virtual void DrawTextW( Int16 x, Int16 y, std::wstring text );
|
||||
virtual void DrawImage( UInt16 x, UInt16 y, pyImage& image, hsBool respectAlpha );
|
||||
virtual void DrawImageClipped( UInt16 x, UInt16 y, pyImage& image, UInt16 cx, UInt16 cy, UInt16 cw, UInt16 ch,
|
||||
virtual void DrawText( int16_t x, int16_t y, const char *text );
|
||||
virtual void DrawTextW( int16_t x, int16_t y, std::wstring text );
|
||||
virtual void DrawImage( uint16_t x, uint16_t y, pyImage& image, hsBool respectAlpha );
|
||||
virtual void DrawImageClipped( uint16_t x, uint16_t y, pyImage& image, uint16_t cx, uint16_t cy, uint16_t cw, uint16_t ch,
|
||||
hsBool respectAlpha );
|
||||
virtual void PurgeImage( void );
|
||||
|
||||
// Actually return the visible width and height, since that's what you want to be drawing to
|
||||
virtual UInt16 GetWidth( void );
|
||||
virtual UInt16 GetHeight( void );
|
||||
virtual uint16_t GetWidth( void );
|
||||
virtual uint16_t GetHeight( void );
|
||||
virtual void CalcTextExtents( std::wstring text, unsigned &width, unsigned &height );
|
||||
|
||||
virtual void SetJustify(UInt8 justify);
|
||||
virtual void SetLineSpacing(Int16 spacing);
|
||||
virtual void SetJustify(uint8_t justify);
|
||||
virtual void SetLineSpacing(int16_t spacing);
|
||||
|
||||
virtual plKey GetImage();
|
||||
};
|
||||
|
@ -345,7 +345,7 @@ PYTHON_METHOD_DEFINITION(ptDynamicMap, calcTextExtents, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
wText = text;
|
||||
|
@ -76,7 +76,7 @@ static PyObject *EnumValue_new(PyTypeObject *type, PyObject *args, PyObject *)
|
||||
|
||||
if (nameTemp) // copy the value if it was passed
|
||||
{
|
||||
self->name = TRACKED_NEW char[strlen(nameTemp) + 1];
|
||||
self->name = new char[strlen(nameTemp) + 1];
|
||||
strcpy(self->name, nameTemp);
|
||||
self->name[strlen(nameTemp)] = '\0';
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
|
||||
#include <Python.h>
|
||||
#include "hsConfig.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pyGlueHelpers.h"
|
||||
|
||||
|
@ -108,7 +108,7 @@ PyObject* pyGUIControl::getObjPyKey()
|
||||
|
||||
|
||||
// interface functions
|
||||
UInt32 pyGUIControl::GetTagID()
|
||||
uint32_t pyGUIControl::GetTagID()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -334,7 +334,7 @@ PyObject* pyGUIControl::GetBackSelColor()
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
UInt32 pyGUIControl::GetFontSize()
|
||||
uint32_t pyGUIControl::GetFontSize()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -351,7 +351,7 @@ UInt32 pyGUIControl::GetFontSize()
|
||||
|
||||
|
||||
// set color scheme
|
||||
void pyGUIControl::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIControl::SetForeColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -371,7 +371,7 @@ void pyGUIControl::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControl::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIControl::SetSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -391,7 +391,7 @@ void pyGUIControl::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControl::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIControl::SetBackColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -411,7 +411,7 @@ void pyGUIControl::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControl::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIControl::SetBackSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -432,7 +432,7 @@ void pyGUIControl::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
|
||||
}
|
||||
|
||||
|
||||
void pyGUIControl::SetFontSize(UInt32 fontsize)
|
||||
void pyGUIControl::SetFontSize(uint32_t fontsize)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -440,7 +440,7 @@ void pyGUIControl::SetFontSize(UInt32 fontsize)
|
||||
if ( pdmod )
|
||||
{
|
||||
pfGUIColorScheme* color = pdmod->GetColorScheme();
|
||||
color->fFontSize = (UInt8)fontsize;
|
||||
color->fFontSize = (uint8_t)fontsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
virtual PyObject* getObjPyKey(); // returns pyKey
|
||||
|
||||
// interface functions
|
||||
virtual UInt32 GetTagID();
|
||||
virtual uint32_t GetTagID();
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual void Enable() { SetEnabled(true); }
|
||||
virtual void Disable() { SetEnabled(false); }
|
||||
@ -120,13 +120,13 @@ public:
|
||||
virtual PyObject* GetSelColor(); // returns pyColor
|
||||
virtual PyObject* GetBackColor(); // returns pyColor
|
||||
virtual PyObject* GetBackSelColor(); // returns pyColor
|
||||
virtual UInt32 GetFontSize();
|
||||
virtual uint32_t GetFontSize();
|
||||
// set color scheme
|
||||
virtual void SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetFontSize(UInt32 fontsize);
|
||||
virtual void SetForeColor( float r, float g, float b, float a );
|
||||
virtual void SetSelColor( float r, float g, float b, float a );
|
||||
virtual void SetBackColor( float r, float g, float b, float a );
|
||||
virtual void SetBackSelColor( float r, float g, float b, float a );
|
||||
virtual void SetFontSize(uint32_t fontsize);
|
||||
|
||||
};
|
||||
|
||||
|
@ -64,7 +64,7 @@ hsBool pyGUIControlButton::IsGUIControlButton(pyKey& gckey)
|
||||
return false;
|
||||
}
|
||||
|
||||
void pyGUIControlButton::SetNotifyType(Int32 kind)
|
||||
void pyGUIControlButton::SetNotifyType(int32_t kind)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -75,7 +75,7 @@ void pyGUIControlButton::SetNotifyType(Int32 kind)
|
||||
}
|
||||
}
|
||||
|
||||
Int32 pyGUIControlButton::GetNotifyType()
|
||||
int32_t pyGUIControlButton::GetNotifyType()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
|
@ -77,8 +77,8 @@ public:
|
||||
|
||||
static hsBool IsGUIControlButton(pyKey& gckey);
|
||||
|
||||
virtual void SetNotifyType(Int32 kind);
|
||||
virtual Int32 GetNotifyType();
|
||||
virtual void SetNotifyType(int32_t kind);
|
||||
virtual int32_t GetNotifyType();
|
||||
virtual hsBool IsButtonDown();
|
||||
};
|
||||
|
||||
|
@ -70,7 +70,7 @@ hsBool pyGUIControlDynamicText::IsGUIControlDynamicText(pyKey& gckey)
|
||||
|
||||
|
||||
//specific interface functions
|
||||
UInt32 pyGUIControlDynamicText::GetNumMaps()
|
||||
uint32_t pyGUIControlDynamicText::GetNumMaps()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -83,7 +83,7 @@ UInt32 pyGUIControlDynamicText::GetNumMaps()
|
||||
}
|
||||
|
||||
|
||||
PyObject* pyGUIControlDynamicText::GetMap(UInt32 i)
|
||||
PyObject* pyGUIControlDynamicText::GetMap(uint32_t i)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
|
@ -78,8 +78,8 @@ public:
|
||||
static hsBool IsGUIControlDynamicText(pyKey& gckey);
|
||||
|
||||
//specific interface functions
|
||||
virtual UInt32 GetNumMaps();
|
||||
virtual PyObject* GetMap(UInt32 i); // returns pyDynamicText
|
||||
virtual uint32_t GetNumMaps();
|
||||
virtual PyObject* GetMap(uint32_t i); // returns pyDynamicText
|
||||
};
|
||||
|
||||
#endif // _pyGUIControlButton_h_
|
||||
|
@ -67,7 +67,7 @@ hsBool pyGUIControlEditBox::IsGUIControlEditBox(pyKey& gckey)
|
||||
return false;
|
||||
}
|
||||
|
||||
void pyGUIControlEditBox::SetBufferSize( UInt32 size )
|
||||
void pyGUIControlEditBox::SetBufferSize( uint32_t size )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -211,7 +211,7 @@ void pyGUIControlEditBox::SetSpecialCaptureKeyMode(hsBool state)
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 pyGUIControlEditBox::GetLastKeyCaptured()
|
||||
uint32_t pyGUIControlEditBox::GetLastKeyCaptured()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -223,26 +223,26 @@ UInt32 pyGUIControlEditBox::GetLastKeyCaptured()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UInt32 pyGUIControlEditBox::GetLastModifiersCaptured()
|
||||
uint32_t pyGUIControlEditBox::GetLastModifiersCaptured()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
// get the pointer to the modifier
|
||||
pfGUIEditBoxMod* pebmod = pfGUIEditBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( pebmod )
|
||||
return (UInt32)(pebmod->GetLastModifiersCaptured());
|
||||
return (uint32_t)(pebmod->GetLastModifiersCaptured());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pyGUIControlEditBox::SetLastKeyCapture(UInt32 key, UInt32 modifiers)
|
||||
void pyGUIControlEditBox::SetLastKeyCapture(uint32_t key, uint32_t modifiers)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
// get the pointer to the modifier
|
||||
pfGUIEditBoxMod* pebmod = pfGUIEditBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( pebmod )
|
||||
pebmod->SetLastKeyCapture(key,(UInt8)modifiers);
|
||||
pebmod->SetLastKeyCapture(key,(uint8_t)modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
|
||||
static hsBool IsGUIControlEditBox(pyKey& gckey);
|
||||
|
||||
virtual void SetBufferSize( UInt32 size );
|
||||
virtual void SetBufferSize( uint32_t size );
|
||||
virtual std::string GetBuffer( void );
|
||||
virtual std::wstring GetBufferW( void );
|
||||
virtual void ClearBuffer( void );
|
||||
@ -92,9 +92,9 @@ public:
|
||||
virtual hsBool WasEscaped();
|
||||
|
||||
virtual void SetSpecialCaptureKeyMode(hsBool state);
|
||||
virtual UInt32 GetLastKeyCaptured();
|
||||
virtual UInt32 GetLastModifiersCaptured();
|
||||
virtual void SetLastKeyCapture(UInt32 key, UInt32 modifiers);
|
||||
virtual uint32_t GetLastKeyCaptured();
|
||||
virtual uint32_t GetLastModifiersCaptured();
|
||||
virtual void SetLastKeyCapture(uint32_t key, uint32_t modifiers);
|
||||
|
||||
virtual void SetChatMode(hsBool state);
|
||||
|
||||
|
@ -118,7 +118,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlEditBox, setStringW, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* text = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
|
||||
text[strLen] = L'\0';
|
||||
self->fThis->SetTextW(text);
|
||||
|
@ -65,8 +65,8 @@ class pfColorListElement : public pfGUIListText
|
||||
hsColorRGBA fTextColor2;
|
||||
wchar_t *fString1;
|
||||
wchar_t *fString2;
|
||||
UInt32 fInheritAlpha;
|
||||
Int32 fOverrideFontSize; // size of font to use (if -1 then just use scheme setting)
|
||||
uint32_t fInheritAlpha;
|
||||
int32_t fOverrideFontSize; // size of font to use (if -1 then just use scheme setting)
|
||||
|
||||
public:
|
||||
enum InheritTypes
|
||||
@ -78,7 +78,7 @@ class pfColorListElement : public pfGUIListText
|
||||
kSelectUseGUIColor,
|
||||
};
|
||||
|
||||
pfColorListElement( const char *string1, hsColorRGBA color1, const char *string2, hsColorRGBA color2, UInt32 inheritalpha, Int32 fontsize=-1 )
|
||||
pfColorListElement( const char *string1, hsColorRGBA color1, const char *string2, hsColorRGBA color2, uint32_t inheritalpha, int32_t fontsize=-1 )
|
||||
{
|
||||
if ( string1 )
|
||||
{
|
||||
@ -101,11 +101,11 @@ class pfColorListElement : public pfGUIListText
|
||||
fOverrideFontSize = fontsize;
|
||||
}
|
||||
|
||||
pfColorListElement( const wchar_t *string1, hsColorRGBA color1, const wchar_t *string2, hsColorRGBA color2, UInt32 inheritalpha, Int32 fontsize=-1 )
|
||||
pfColorListElement( const wchar_t *string1, hsColorRGBA color1, const wchar_t *string2, hsColorRGBA color2, uint32_t inheritalpha, int32_t fontsize=-1 )
|
||||
{
|
||||
if ( string1 )
|
||||
{
|
||||
fString1 = TRACKED_NEW wchar_t[wcslen(string1)+1];
|
||||
fString1 = new wchar_t[wcslen(string1)+1];
|
||||
wcscpy(fString1,string1);
|
||||
fText = nil;
|
||||
}
|
||||
@ -117,7 +117,7 @@ class pfColorListElement : public pfGUIListText
|
||||
fTextColor1 = color1;
|
||||
if (string2)
|
||||
{
|
||||
fString2 = TRACKED_NEW wchar_t[wcslen(string2)+1];
|
||||
fString2 = new wchar_t[wcslen(string2)+1];
|
||||
wcscpy(fString2,string2);
|
||||
}
|
||||
else
|
||||
@ -158,14 +158,14 @@ class pfColorListElement : public pfGUIListText
|
||||
|
||||
if( text != nil )
|
||||
{
|
||||
fString1 = TRACKED_NEW wchar_t[wcslen(text)+1];
|
||||
fString1 = new wchar_t[wcslen(text)+1];
|
||||
wcscpy(fString1,text);
|
||||
}
|
||||
else
|
||||
fString1 = nil;
|
||||
}
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, UInt16 x, UInt16 y, UInt16 maxWidth, UInt16 maxHeight )
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
hsColorRGBA textColor1;
|
||||
textColor1 = fTextColor1;
|
||||
@ -220,10 +220,10 @@ class pfColorListElement : public pfGUIListText
|
||||
if (fString1)
|
||||
{
|
||||
if ( fOverrideFontSize != -1 )
|
||||
textGen->SetFont( fColors->fFontFace, (UInt16)fOverrideFontSize, fColors->fFontFlags );
|
||||
textGen->SetFont( fColors->fFontFace, (uint16_t)fOverrideFontSize, fColors->fFontFlags );
|
||||
textGen->SetTextColor( textColor1, fColors->fTransparent && fColors->fBackColor.a == 0.f );
|
||||
textGen->DrawWrappedString( x + 2, y, fString1, maxWidth - 4, maxHeight );
|
||||
UInt16 width, height;
|
||||
uint16_t width, height;
|
||||
textGen->CalcWrappedStringSize(fString1,&width,&height);
|
||||
x += 2 + width;
|
||||
if ( fString2 == nil )
|
||||
@ -242,14 +242,14 @@ class pfColorListElement : public pfGUIListText
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void GetSize( plDynamicTextMap *textGen, UInt16 *width, UInt16 *height )
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height )
|
||||
{
|
||||
hsBool wemade_string = false;
|
||||
wchar_t* thestring;
|
||||
if ( fString1 && fString2 )
|
||||
{
|
||||
size_t length = wcslen( fString1 ) + wcslen( fString2 ) + 3;
|
||||
thestring = TRACKED_NEW wchar_t[ length ];
|
||||
thestring = new wchar_t[ length ];
|
||||
snwprintf( thestring, length, L"%s %s", fString1, fString2 );
|
||||
wemade_string = true;
|
||||
}
|
||||
@ -262,7 +262,7 @@ class pfColorListElement : public pfGUIListText
|
||||
*width = textGen->GetVisibleWidth() - 4;
|
||||
|
||||
if ( fOverrideFontSize != -1 )
|
||||
textGen->SetFont( fColors->fFontFace, (UInt16)fOverrideFontSize, fColors->fFontFlags );
|
||||
textGen->SetFont( fColors->fFontFace, (uint16_t)fOverrideFontSize, fColors->fFontFlags );
|
||||
textGen->CalcWrappedStringSize( thestring, width, height );
|
||||
if ( fOverrideFontSize != -1 )
|
||||
textGen->SetFont( fColors->fFontFace, fColors->fFontSize, fColors->fFontFlags );
|
||||
@ -285,29 +285,29 @@ class pfColorListElement : public pfGUIListText
|
||||
class pfListTextInBox : public pfGUIListText
|
||||
{
|
||||
protected:
|
||||
UInt32 fMinWidth;
|
||||
UInt32 fMinHeight;
|
||||
uint32_t fMinWidth;
|
||||
uint32_t fMinHeight;
|
||||
|
||||
public:
|
||||
pfListTextInBox( const char *text, UInt32 min_width=0, UInt32 min_height=0 ) : pfGUIListText( text )
|
||||
pfListTextInBox( const char *text, uint32_t min_width=0, uint32_t min_height=0 ) : pfGUIListText( text )
|
||||
{
|
||||
fMinWidth = min_width;
|
||||
fMinHeight = min_height;
|
||||
fJustify = pfGUIListText::kCenter;
|
||||
}
|
||||
|
||||
pfListTextInBox( const wchar_t *text, UInt32 min_width=0, UInt32 min_height=0 ) : pfGUIListText( text )
|
||||
pfListTextInBox( const wchar_t *text, uint32_t min_width=0, uint32_t min_height=0 ) : pfGUIListText( text )
|
||||
{
|
||||
fMinWidth = min_width;
|
||||
fMinHeight = min_height;
|
||||
fJustify = pfGUIListText::kCenter;
|
||||
}
|
||||
|
||||
virtual void GetSize( plDynamicTextMap *textGen, UInt16 *width, UInt16 *height )
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height )
|
||||
{
|
||||
*width = textGen->CalcStringWidth( GetText(), height );
|
||||
if ( *width < fMinWidth )
|
||||
*width = (UInt16)fMinWidth;
|
||||
*width = (uint16_t)fMinWidth;
|
||||
if( height != nil )
|
||||
{
|
||||
if( *height == 0 )
|
||||
@ -315,7 +315,7 @@ class pfListTextInBox : public pfGUIListText
|
||||
else
|
||||
*height += 0; // Add one pixel on each side for padding (or not, 3.21.02 mcn)
|
||||
if ( *height < fMinHeight )
|
||||
*height = (UInt16)fMinHeight;
|
||||
*height = (uint16_t)fMinHeight;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -323,13 +323,13 @@ class pfListTextInBox : public pfGUIListText
|
||||
class pfListPictureInBox : public pfGUIListPicture
|
||||
{
|
||||
protected:
|
||||
UInt32 fSrcX;
|
||||
UInt32 fSrcY;
|
||||
UInt32 fSrcWidth;
|
||||
UInt32 fSrcHeight;
|
||||
uint32_t fSrcX;
|
||||
uint32_t fSrcY;
|
||||
uint32_t fSrcWidth;
|
||||
uint32_t fSrcHeight;
|
||||
|
||||
public:
|
||||
pfListPictureInBox( plKey mipKey, UInt32 x, UInt32 y, UInt32 width, UInt32 height, hsBool respectAlpha ) : pfGUIListPicture( mipKey,respectAlpha )
|
||||
pfListPictureInBox( plKey mipKey, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha ) : pfGUIListPicture( mipKey,respectAlpha )
|
||||
{
|
||||
fSrcX = x;
|
||||
fSrcY = y;
|
||||
@ -337,7 +337,7 @@ class pfListPictureInBox : public pfGUIListPicture
|
||||
fSrcHeight = height;
|
||||
}
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, UInt16 x, UInt16 y, UInt16 maxWidth, UInt16 maxHeight )
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
plMipmap *mip = plMipmap::ConvertNoRef( fMipmapKey->ObjectIsLoaded() );
|
||||
if( mip != nil )
|
||||
@ -346,7 +346,7 @@ class pfListPictureInBox : public pfGUIListPicture
|
||||
return false;
|
||||
|
||||
if( fSelected )
|
||||
textGen->FillRect( x, y, (UInt16)fSrcWidth, (UInt16)fSrcHeight, fColors->fSelForeColor );
|
||||
textGen->FillRect( x, y, (uint16_t)fSrcWidth, (uint16_t)fSrcHeight, fColors->fSelForeColor );
|
||||
// hack!!!! This is to get the non-selected items to show up....
|
||||
// ... they need some kinda background to alpha to <whatever>
|
||||
else
|
||||
@ -355,19 +355,19 @@ class pfListPictureInBox : public pfGUIListPicture
|
||||
{
|
||||
hsColorRGBA backcolor = fColors->fBackColor;
|
||||
backcolor.a = 1.0;
|
||||
textGen->FillRect( x, y, (UInt16)fSrcWidth, (UInt16)fSrcHeight, backcolor );
|
||||
textGen->FillRect( x, y, (uint16_t)fSrcWidth, (uint16_t)fSrcHeight, backcolor );
|
||||
}
|
||||
}
|
||||
// end of hack
|
||||
|
||||
textGen->DrawClippedImage( x + fBorderSize, y + fBorderSize, mip, (UInt16)fSrcX, (UInt16)fSrcY, (UInt16)fSrcWidth, (UInt16)fSrcHeight,
|
||||
textGen->DrawClippedImage( x + fBorderSize, y + fBorderSize, mip, (uint16_t)fSrcX, (uint16_t)fSrcY, (uint16_t)fSrcWidth, (uint16_t)fSrcHeight,
|
||||
fRespectAlpha ? plDynamicTextMap::kImgBlend : plDynamicTextMap::kImgNoAlpha );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void GetSize( plDynamicTextMap *textGen, UInt16 *width, UInt16 *height )
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height )
|
||||
{
|
||||
plMipmap *mip = plMipmap::ConvertNoRef( fMipmapKey->ObjectIsLoaded() );
|
||||
if( mip == nil )
|
||||
@ -378,9 +378,9 @@ class pfListPictureInBox : public pfGUIListPicture
|
||||
}
|
||||
else
|
||||
{
|
||||
*width = (UInt16)(fSrcWidth + fBorderSize + fBorderSize);
|
||||
*width = (uint16_t)(fSrcWidth + fBorderSize + fBorderSize);
|
||||
if( height != nil )
|
||||
*height = (UInt16)(fSrcHeight + fBorderSize + fBorderSize);
|
||||
*height = (uint16_t)(fSrcHeight + fBorderSize + fBorderSize);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -392,10 +392,10 @@ class pfListPictureInBoxWithSwatches : public pfListPictureInBox
|
||||
|
||||
public:
|
||||
|
||||
static UInt16 fSwatchSize, fSwatchOffset;
|
||||
static uint16_t fSwatchSize, fSwatchOffset;
|
||||
|
||||
pfListPictureInBoxWithSwatches( plKey mipKey, UInt32 x, UInt32 y,
|
||||
UInt32 width, UInt32 height,
|
||||
pfListPictureInBoxWithSwatches( plKey mipKey, uint32_t x, uint32_t y,
|
||||
uint32_t width, uint32_t height,
|
||||
hsBool respectAlpha,
|
||||
const hsColorRGBA &primaryColor, const hsColorRGBA &secondaryColor )
|
||||
: pfListPictureInBox( mipKey, x, y, width, height, respectAlpha )
|
||||
@ -404,7 +404,7 @@ class pfListPictureInBoxWithSwatches : public pfListPictureInBox
|
||||
fSColor = secondaryColor;
|
||||
}
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, UInt16 x, UInt16 y, UInt16 maxWidth, UInt16 maxHeight )
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
if( !pfListPictureInBox::Draw( textGen, x, y, maxWidth, maxHeight ) )
|
||||
return false;
|
||||
@ -424,8 +424,8 @@ class pfListPictureInBoxWithSwatches : public pfListPictureInBox
|
||||
return true;
|
||||
}
|
||||
};
|
||||
UInt16 pfListPictureInBoxWithSwatches::fSwatchSize = 16;
|
||||
UInt16 pfListPictureInBoxWithSwatches::fSwatchOffset = 5;
|
||||
uint16_t pfListPictureInBoxWithSwatches::fSwatchSize = 16;
|
||||
uint16_t pfListPictureInBoxWithSwatches::fSwatchOffset = 5;
|
||||
|
||||
|
||||
|
||||
@ -444,7 +444,7 @@ hsBool pyGUIControlListBox::IsGUIControlListBox(pyKey& gckey)
|
||||
return false;
|
||||
}
|
||||
|
||||
Int32 pyGUIControlListBox::GetSelection( void )
|
||||
int32_t pyGUIControlListBox::GetSelection( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -456,7 +456,7 @@ Int32 pyGUIControlListBox::GetSelection( void )
|
||||
return -1;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetSelection( Int32 item )
|
||||
void pyGUIControlListBox::SetSelection( int32_t item )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -478,7 +478,7 @@ void pyGUIControlListBox::Refresh( void )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::RemoveElement( UInt16 index )
|
||||
void pyGUIControlListBox::RemoveElement( uint16_t index )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -500,7 +500,7 @@ void pyGUIControlListBox::ClearAllElements( void )
|
||||
}
|
||||
}
|
||||
|
||||
UInt16 pyGUIControlListBox::GetNumElements( void )
|
||||
uint16_t pyGUIControlListBox::GetNumElements( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -512,14 +512,14 @@ UInt16 pyGUIControlListBox::GetNumElements( void )
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetElement( UInt16 idx, const char* text )
|
||||
void pyGUIControlListBox::SetElement( uint16_t idx, const char* text )
|
||||
{
|
||||
wchar_t *wText = hsStringToWString(text);
|
||||
SetElementW(idx,wText);
|
||||
delete [] wText;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetElementW( UInt16 idx, std::wstring text )
|
||||
void pyGUIControlListBox::SetElementW( uint16_t idx, std::wstring text )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -541,7 +541,7 @@ void pyGUIControlListBox::SetElementW( UInt16 idx, std::wstring text )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetStringJustify( UInt16 idx, UInt32 justify)
|
||||
void pyGUIControlListBox::SetStringJustify( uint16_t idx, uint32_t justify)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -564,7 +564,7 @@ void pyGUIControlListBox::SetStringJustify( UInt16 idx, UInt32 justify)
|
||||
}
|
||||
|
||||
|
||||
std::string pyGUIControlListBox::GetElement( UInt16 idx )
|
||||
std::string pyGUIControlListBox::GetElement( uint16_t idx )
|
||||
{
|
||||
std::wstring wRetVal = GetElementW(idx);
|
||||
char *temp = hsWStringToString(wRetVal.c_str());
|
||||
@ -573,7 +573,7 @@ std::string pyGUIControlListBox::GetElement( UInt16 idx )
|
||||
return retVal;
|
||||
}
|
||||
|
||||
std::wstring pyGUIControlListBox::GetElementW( UInt16 idx )
|
||||
std::wstring pyGUIControlListBox::GetElementW( uint16_t idx )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -601,15 +601,15 @@ std::wstring pyGUIControlListBox::GetElementW( UInt16 idx )
|
||||
return L"";
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddString( const char *string )
|
||||
int16_t pyGUIControlListBox::AddString( const char *string )
|
||||
{
|
||||
wchar_t *wString = hsStringToWString(string);
|
||||
Int16 retVal = AddStringW(wString);
|
||||
int16_t retVal = AddStringW(wString);
|
||||
delete [] wString;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddStringW( std::wstring string )
|
||||
int16_t pyGUIControlListBox::AddStringW( std::wstring string )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -617,7 +617,7 @@ Int16 pyGUIControlListBox::AddStringW( std::wstring string )
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfGUIListText *element = TRACKED_NEW pfGUIListText( string.c_str() );
|
||||
pfGUIListText *element = new pfGUIListText( string.c_str() );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -626,7 +626,7 @@ Int16 pyGUIControlListBox::AddStringW( std::wstring string )
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha )
|
||||
int16_t pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -634,7 +634,7 @@ Int16 pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha )
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfGUIListPicture *element = TRACKED_NEW pfGUIListPicture(image.GetKey(),respectAlpha);
|
||||
pfGUIListPicture *element = new pfGUIListPicture(image.GetKey(),respectAlpha);
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -644,15 +644,15 @@ Int16 pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha )
|
||||
}
|
||||
|
||||
|
||||
Int16 pyGUIControlListBox::FindString( const char *toCompareTo )
|
||||
int16_t pyGUIControlListBox::FindString( const char *toCompareTo )
|
||||
{
|
||||
wchar_t *wToCompareTo = hsStringToWString(toCompareTo);
|
||||
Int16 retVal = FindStringW(wToCompareTo);
|
||||
int16_t retVal = FindStringW(wToCompareTo);
|
||||
delete [] wToCompareTo;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::FindStringW( std::wstring toCompareTo )
|
||||
int16_t pyGUIControlListBox::FindStringW( std::wstring toCompareTo )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -664,15 +664,15 @@ Int16 pyGUIControlListBox::FindStringW( std::wstring toCompareTo )
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddTextWColor( const char *str, pyColor& textcolor, UInt32 inheritalpha)
|
||||
int16_t pyGUIControlListBox::AddTextWColor( const char *str, pyColor& textcolor, uint32_t inheritalpha)
|
||||
{
|
||||
wchar_t *wStr = hsStringToWString(str);
|
||||
Int16 retVal = AddTextWColorW(wStr,textcolor,inheritalpha);
|
||||
int16_t retVal = AddTextWColorW(wStr,textcolor,inheritalpha);
|
||||
delete [] wStr;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddTextWColorW( std::wstring str, pyColor& textcolor, UInt32 inheritalpha)
|
||||
int16_t pyGUIControlListBox::AddTextWColorW( std::wstring str, pyColor& textcolor, uint32_t inheritalpha)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -680,7 +680,7 @@ Int16 pyGUIControlListBox::AddTextWColorW( std::wstring str, pyColor& textcolor,
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfColorListElement *element = TRACKED_NEW pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha );
|
||||
pfColorListElement *element = new pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -689,15 +689,15 @@ Int16 pyGUIControlListBox::AddTextWColorW( std::wstring str, pyColor& textcolor,
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddTextWColorWSize( const char *str, pyColor& textcolor, UInt32 inheritalpha, Int32 fontsize)
|
||||
int16_t pyGUIControlListBox::AddTextWColorWSize( const char *str, pyColor& textcolor, uint32_t inheritalpha, int32_t fontsize)
|
||||
{
|
||||
wchar_t *wStr = hsStringToWString(str);
|
||||
Int16 retVal = AddTextWColorWSizeW(wStr,textcolor,inheritalpha,fontsize);
|
||||
int16_t retVal = AddTextWColorWSizeW(wStr,textcolor,inheritalpha,fontsize);
|
||||
delete [] wStr;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddTextWColorWSizeW( std::wstring str, pyColor& textcolor, UInt32 inheritalpha, Int32 fontsize)
|
||||
int16_t pyGUIControlListBox::AddTextWColorWSizeW( std::wstring str, pyColor& textcolor, uint32_t inheritalpha, int32_t fontsize)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -705,7 +705,7 @@ Int16 pyGUIControlListBox::AddTextWColorWSizeW( std::wstring str, pyColor& textc
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfColorListElement *element = TRACKED_NEW pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha, fontsize );
|
||||
pfColorListElement *element = new pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha, fontsize );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -714,7 +714,7 @@ Int16 pyGUIControlListBox::AddTextWColorWSizeW( std::wstring str, pyColor& textc
|
||||
return -1;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::Add2TextWColor( const char *str1, pyColor& textcolor1,const char *str2, pyColor& textcolor2, UInt32 inheritalpha)
|
||||
void pyGUIControlListBox::Add2TextWColor( const char *str1, pyColor& textcolor1,const char *str2, pyColor& textcolor2, uint32_t inheritalpha)
|
||||
{
|
||||
wchar_t *wStr1 = hsStringToWString(str1);
|
||||
wchar_t *wStr2 = hsStringToWString(str2);
|
||||
@ -723,7 +723,7 @@ void pyGUIControlListBox::Add2TextWColor( const char *str1, pyColor& textcolor1,
|
||||
delete [] wStr1;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::Add2TextWColorW( std::wstring str1, pyColor& textcolor1, std::wstring str2, pyColor& textcolor2, UInt32 inheritalpha)
|
||||
void pyGUIControlListBox::Add2TextWColorW( std::wstring str1, pyColor& textcolor1, std::wstring str2, pyColor& textcolor2, uint32_t inheritalpha)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -731,7 +731,7 @@ void pyGUIControlListBox::Add2TextWColorW( std::wstring str1, pyColor& textcolor
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfColorListElement *element = TRACKED_NEW pfColorListElement(str1.c_str(),textcolor1.getColor(),str2.c_str(),textcolor2.getColor(),inheritalpha );
|
||||
pfColorListElement *element = new pfColorListElement(str1.c_str(),textcolor1.getColor(),str2.c_str(),textcolor2.getColor(),inheritalpha );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
plbmod->AddElement( element );
|
||||
@ -739,7 +739,7 @@ void pyGUIControlListBox::Add2TextWColorW( std::wstring str1, pyColor& textcolor
|
||||
}
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddStringInBox( const char *string, UInt32 min_width, UInt32 min_height )
|
||||
int16_t pyGUIControlListBox::AddStringInBox( const char *string, uint32_t min_width, uint32_t min_height )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -747,7 +747,7 @@ Int16 pyGUIControlListBox::AddStringInBox( const char *string, UInt32 min_width,
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfListTextInBox *element = TRACKED_NEW pfListTextInBox( string, min_width, min_height );
|
||||
pfListTextInBox *element = new pfListTextInBox( string, min_width, min_height );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -756,7 +756,7 @@ Int16 pyGUIControlListBox::AddStringInBox( const char *string, UInt32 min_width,
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddStringInBoxW( std::wstring string, UInt32 min_width, UInt32 min_height )
|
||||
int16_t pyGUIControlListBox::AddStringInBoxW( std::wstring string, uint32_t min_width, uint32_t min_height )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -764,7 +764,7 @@ Int16 pyGUIControlListBox::AddStringInBoxW( std::wstring string, UInt32 min_widt
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfListTextInBox *element = TRACKED_NEW pfListTextInBox( string.c_str(), min_width, min_height );
|
||||
pfListTextInBox *element = new pfListTextInBox( string.c_str(), min_width, min_height );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -773,7 +773,7 @@ Int16 pyGUIControlListBox::AddStringInBoxW( std::wstring string, UInt32 min_widt
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddImageInBox( pyImage& image, UInt32 x, UInt32 y, UInt32 width, UInt32 height, hsBool respectAlpha )
|
||||
int16_t pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -781,7 +781,7 @@ Int16 pyGUIControlListBox::AddImageInBox( pyImage& image, UInt32 x, UInt32 y,
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfListPictureInBox *element = TRACKED_NEW pfListPictureInBox(image.GetKey(),x,y,width,height,respectAlpha);
|
||||
pfListPictureInBox *element = new pfListPictureInBox(image.GetKey(),x,y,width,height,respectAlpha);
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
|
||||
return plbmod->AddElement( element );
|
||||
@ -790,7 +790,7 @@ Int16 pyGUIControlListBox::AddImageInBox( pyImage& image, UInt32 x, UInt32 y,
|
||||
return -1;
|
||||
}
|
||||
|
||||
Int16 pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, UInt32 x, UInt32 y, UInt32 width, UInt32 height, hsBool respectAlpha,
|
||||
int16_t pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha,
|
||||
pyColor &primary, pyColor &secondary )
|
||||
{
|
||||
if ( fGCkey )
|
||||
@ -799,7 +799,7 @@ Int16 pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, UInt32 x,
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfListPictureInBoxWithSwatches *element = TRACKED_NEW pfListPictureInBoxWithSwatches( image.GetKey(),x,y,
|
||||
pfListPictureInBoxWithSwatches *element = new pfListPictureInBoxWithSwatches( image.GetKey(),x,y,
|
||||
width,height,respectAlpha,
|
||||
primary.getColor(), secondary.getColor() );
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
@ -810,14 +810,14 @@ Int16 pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, UInt32 x,
|
||||
return -1;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetSwatchSize( UInt32 size )
|
||||
void pyGUIControlListBox::SetSwatchSize( uint32_t size )
|
||||
{
|
||||
pfListPictureInBoxWithSwatches::fSwatchSize = (UInt16)size;
|
||||
pfListPictureInBoxWithSwatches::fSwatchSize = (uint16_t)size;
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::SetSwatchEdgeOffset( UInt32 set )
|
||||
void pyGUIControlListBox::SetSwatchEdgeOffset( uint32_t set )
|
||||
{
|
||||
pfListPictureInBoxWithSwatches::fSwatchOffset = (UInt16)set;
|
||||
pfListPictureInBoxWithSwatches::fSwatchOffset = (uint16_t)set;
|
||||
}
|
||||
|
||||
|
||||
@ -846,7 +846,7 @@ void pyGUIControlListBox::ScrollToEnd( void )
|
||||
}
|
||||
|
||||
|
||||
void pyGUIControlListBox::SetScrollPos( Int32 pos )
|
||||
void pyGUIControlListBox::SetScrollPos( int32_t pos )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -858,7 +858,7 @@ void pyGUIControlListBox::SetScrollPos( Int32 pos )
|
||||
}
|
||||
|
||||
|
||||
Int32 pyGUIControlListBox::GetScrollPos( void )
|
||||
int32_t pyGUIControlListBox::GetScrollPos( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -871,7 +871,7 @@ Int32 pyGUIControlListBox::GetScrollPos( void )
|
||||
}
|
||||
|
||||
|
||||
Int32 pyGUIControlListBox::GetScrollRange( void )
|
||||
int32_t pyGUIControlListBox::GetScrollRange( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -944,7 +944,7 @@ void pyGUIControlListBox::AddBranchW( std::wstring name, hsBool initiallyOpen
|
||||
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( plbmod )
|
||||
{
|
||||
pfGUIListTreeRoot *root = TRACKED_NEW pfGUIListTreeRoot( name.c_str() );
|
||||
pfGUIListTreeRoot *root = new pfGUIListTreeRoot( name.c_str() );
|
||||
root->ShowChildren( initiallyOpen );
|
||||
|
||||
if( fBuildRoots.GetCount() > 0 )
|
||||
@ -970,7 +970,7 @@ void pyGUIControlListBox::CloseBranch( void )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::RemoveSelection( Int32 item )
|
||||
void pyGUIControlListBox::RemoveSelection( int32_t item )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -981,7 +981,7 @@ void pyGUIControlListBox::RemoveSelection( Int32 item )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlListBox::AddSelection( Int32 item )
|
||||
void pyGUIControlListBox::AddSelection( int32_t item )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -1004,7 +1004,7 @@ PyObject* pyGUIControlListBox::GetSelectionList()
|
||||
if ( plbmod )
|
||||
{
|
||||
int numItems = plbmod->GetNumElements();
|
||||
UInt16 i;
|
||||
uint16_t i;
|
||||
for ( i=0; i<numItems; i++ )
|
||||
{
|
||||
pfGUIListElement* element = plbmod->GetElement(i);
|
||||
@ -1032,7 +1032,7 @@ PyObject* pyGUIControlListBox::GetBranchList()
|
||||
if ( plbmod )
|
||||
{
|
||||
int numItems = plbmod->GetNumElements();
|
||||
UInt16 i;
|
||||
uint16_t i;
|
||||
for ( i=0; i<numItems; i++ )
|
||||
{
|
||||
pfGUIListElement* element = plbmod->GetElement(i);
|
||||
@ -1041,7 +1041,7 @@ PyObject* pyGUIControlListBox::GetBranchList()
|
||||
if ( element->GetType() == pfGUIListElement::kTreeRoot )
|
||||
{
|
||||
pfGUIListTreeRoot* elroot = (pfGUIListTreeRoot*)element;
|
||||
UInt16 showing = elroot->IsShowingChildren();
|
||||
uint16_t showing = elroot->IsShowingChildren();
|
||||
PyObject* element = PyTuple_New(2);
|
||||
PyTuple_SetItem(element, 0, PyInt_FromLong(i));
|
||||
PyTuple_SetItem(element, 1, PyInt_FromLong(showing));
|
||||
|
@ -89,40 +89,40 @@ public:
|
||||
// ...this allows the listbox to be used without being selectable
|
||||
virtual void Clickable( void );
|
||||
virtual void Unclickable( void );
|
||||
virtual Int32 GetSelection( void );
|
||||
virtual void SetSelection( Int32 item );
|
||||
virtual int32_t GetSelection( void );
|
||||
virtual void SetSelection( int32_t item );
|
||||
virtual void Refresh( void );
|
||||
virtual void SetElement( UInt16 idx, const char* text );
|
||||
virtual void SetElementW( UInt16 idx, std::wstring text );
|
||||
virtual void RemoveElement( UInt16 index );
|
||||
virtual void SetElement( uint16_t idx, const char* text );
|
||||
virtual void SetElementW( uint16_t idx, std::wstring text );
|
||||
virtual void RemoveElement( uint16_t index );
|
||||
virtual void ClearAllElements( void );
|
||||
virtual UInt16 GetNumElements( void );
|
||||
virtual std::string GetElement( UInt16 idx );
|
||||
virtual std::wstring GetElementW( UInt16 idx );
|
||||
virtual Int16 AddString( const char *string );
|
||||
virtual Int16 AddStringW( std::wstring string );
|
||||
virtual Int16 AddImage( pyImage& image, hsBool respectAlpha );
|
||||
virtual Int16 AddImageInBox( pyImage& image, UInt32 x, UInt32 y, UInt32 width, UInt32 height, hsBool respectAlpha );
|
||||
virtual Int16 AddImageAndSwatchesInBox( pyImage& image, UInt32 x, UInt32 y, UInt32 width, UInt32 height, hsBool respectAlpha,
|
||||
virtual uint16_t GetNumElements( void );
|
||||
virtual std::string GetElement( uint16_t idx );
|
||||
virtual std::wstring GetElementW( uint16_t idx );
|
||||
virtual int16_t AddString( const char *string );
|
||||
virtual int16_t AddStringW( std::wstring string );
|
||||
virtual int16_t AddImage( pyImage& image, hsBool respectAlpha );
|
||||
virtual int16_t AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha );
|
||||
virtual int16_t AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha,
|
||||
pyColor &primary, pyColor &secondary );
|
||||
virtual void SetSwatchSize( UInt32 size );
|
||||
virtual void SetSwatchEdgeOffset( UInt32 size );
|
||||
virtual void SetStringJustify( UInt16 idx, UInt32 justify);
|
||||
virtual Int16 FindString( const char *toCompareTo );
|
||||
virtual Int16 FindStringW( std::wstring toCompareTo );
|
||||
virtual Int16 AddTextWColor( const char *str, pyColor& textcolor, UInt32 inheritalpha);
|
||||
virtual Int16 AddTextWColorW( std::wstring str, pyColor& textcolor, UInt32 inheritalpha);
|
||||
virtual Int16 AddTextWColorWSize( const char *str, pyColor& textcolor, UInt32 inheritalpha, Int32 fontsize);
|
||||
virtual Int16 AddTextWColorWSizeW( std::wstring str, pyColor& textcolor, UInt32 inheritalpha, Int32 fontsize);
|
||||
virtual void Add2TextWColor( const char *str1, pyColor& textcolor1,const char *str2, pyColor& textcolor2, UInt32 inheritalpha);
|
||||
virtual void Add2TextWColorW( std::wstring str1, pyColor& textcolor1, std::wstring str2, pyColor& textcolor2, UInt32 inheritalpha);
|
||||
virtual Int16 AddStringInBox( const char *string, UInt32 min_width, UInt32 min_height );
|
||||
virtual Int16 AddStringInBoxW( std::wstring string, UInt32 min_width, UInt32 min_height );
|
||||
virtual void SetSwatchSize( uint32_t size );
|
||||
virtual void SetSwatchEdgeOffset( uint32_t size );
|
||||
virtual void SetStringJustify( uint16_t idx, uint32_t justify);
|
||||
virtual int16_t FindString( const char *toCompareTo );
|
||||
virtual int16_t FindStringW( std::wstring toCompareTo );
|
||||
virtual int16_t AddTextWColor( const char *str, pyColor& textcolor, uint32_t inheritalpha);
|
||||
virtual int16_t AddTextWColorW( std::wstring str, pyColor& textcolor, uint32_t inheritalpha);
|
||||
virtual int16_t AddTextWColorWSize( const char *str, pyColor& textcolor, uint32_t inheritalpha, int32_t fontsize);
|
||||
virtual int16_t AddTextWColorWSizeW( std::wstring str, pyColor& textcolor, uint32_t inheritalpha, int32_t fontsize);
|
||||
virtual void Add2TextWColor( const char *str1, pyColor& textcolor1,const char *str2, pyColor& textcolor2, uint32_t inheritalpha);
|
||||
virtual void Add2TextWColorW( std::wstring str1, pyColor& textcolor1, std::wstring str2, pyColor& textcolor2, uint32_t inheritalpha);
|
||||
virtual int16_t AddStringInBox( const char *string, uint32_t min_width, uint32_t min_height );
|
||||
virtual int16_t AddStringInBoxW( std::wstring string, uint32_t min_width, uint32_t min_height );
|
||||
virtual void ScrollToBegin( void );
|
||||
virtual void ScrollToEnd( void );
|
||||
virtual void SetScrollPos( Int32 pos );
|
||||
virtual Int32 GetScrollPos( void );
|
||||
virtual Int32 GetScrollRange( void );
|
||||
virtual void SetScrollPos( int32_t pos );
|
||||
virtual int32_t GetScrollPos( void );
|
||||
virtual int32_t GetScrollRange( void );
|
||||
|
||||
virtual void LockList( void );
|
||||
virtual void UnlockList( void );
|
||||
@ -133,8 +133,8 @@ public:
|
||||
void AddBranchW( std::wstring name, hsBool initiallyOpen );
|
||||
void CloseBranch( void );
|
||||
|
||||
void RemoveSelection( Int32 item );
|
||||
void AddSelection( Int32 item );
|
||||
void RemoveSelection( int32_t item );
|
||||
void AddSelection( int32_t item );
|
||||
PyObject* GetSelectionList();
|
||||
PyObject* GetBranchList();
|
||||
|
||||
|
@ -381,7 +381,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlListBox, addBranchW, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* name = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* name = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, name, strLen);
|
||||
name[strLen] = L'\0';
|
||||
self->fThis->AddBranchW(name, initiallyOpen != 0);
|
||||
|
@ -67,7 +67,7 @@ hsBool pyGUIControlMultiLineEdit::IsGUIControlMultiLineEdit(pyKey& gckey)
|
||||
}
|
||||
|
||||
|
||||
void pyGUIControlMultiLineEdit::SetScrollPosition( Int32 topLine )
|
||||
void pyGUIControlMultiLineEdit::SetScrollPosition( int32_t topLine )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -80,7 +80,7 @@ void pyGUIControlMultiLineEdit::SetScrollPosition( Int32 topLine )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlMultiLineEdit::MoveCursor( Int32 dir)
|
||||
void pyGUIControlMultiLineEdit::MoveCursor( int32_t dir)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -181,13 +181,13 @@ void pyGUIControlMultiLineEdit::SetEncodedBuffer( PyObject* buffer_object )
|
||||
if ( pbmod )
|
||||
{
|
||||
// something to do here... later
|
||||
UInt8* daBuffer = nil;
|
||||
uint8_t* daBuffer = nil;
|
||||
int length;
|
||||
PyObject_AsReadBuffer( buffer_object, (const void**)&daBuffer, &length);
|
||||
if ( daBuffer != nil )
|
||||
{
|
||||
// don't alter the user's buffer... but into a copy of our own
|
||||
UInt8* altBuffer = TRACKED_NEW UInt8[length];
|
||||
uint8_t* altBuffer = new uint8_t[length];
|
||||
// =====> temp>> change 0xFEs back into '\0's
|
||||
int i;
|
||||
for ( i=0 ; i<length ; i++ )
|
||||
@ -217,13 +217,13 @@ void pyGUIControlMultiLineEdit::SetEncodedBufferW( PyObject* buffer_object )
|
||||
if ( pbmod )
|
||||
{
|
||||
// something to do here... later
|
||||
UInt16* daBuffer = nil;
|
||||
uint16_t* daBuffer = nil;
|
||||
int length;
|
||||
PyObject_AsReadBuffer( buffer_object, (const void**)&daBuffer, &length);
|
||||
if ( daBuffer != nil )
|
||||
{
|
||||
// don't alter the user's buffer... but into a copy of our own
|
||||
UInt16* altBuffer = TRACKED_NEW UInt16[length];
|
||||
uint16_t* altBuffer = new uint16_t[length];
|
||||
// =====> temp>> change 0xFFFEs back into '\0's
|
||||
int i;
|
||||
for ( i=0 ; i<length ; i++ )
|
||||
@ -252,11 +252,11 @@ const char* pyGUIControlMultiLineEdit::GetEncodedBuffer()
|
||||
pfGUIMultiLineEditCtrl* pbmod = pfGUIMultiLineEditCtrl::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( pbmod )
|
||||
{
|
||||
UInt32 length;
|
||||
UInt8* daBuffer = pbmod->GetCodedBuffer( length );
|
||||
uint32_t length;
|
||||
uint8_t* daBuffer = pbmod->GetCodedBuffer( length );
|
||||
if ( daBuffer )
|
||||
{
|
||||
UInt8* altBuffer = TRACKED_NEW UInt8[length+1];
|
||||
uint8_t* altBuffer = new uint8_t[length+1];
|
||||
// =====> temp>> to get rid of '\0's (change into 0xFEs)
|
||||
int i;
|
||||
for ( i=0 ; i<length ; i++ )
|
||||
@ -288,11 +288,11 @@ const wchar_t* pyGUIControlMultiLineEdit::GetEncodedBufferW()
|
||||
pfGUIMultiLineEditCtrl* pbmod = pfGUIMultiLineEditCtrl::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( pbmod )
|
||||
{
|
||||
UInt32 length;
|
||||
UInt16* daBuffer = pbmod->GetCodedBufferW( length );
|
||||
uint32_t length;
|
||||
uint16_t* daBuffer = pbmod->GetCodedBufferW( length );
|
||||
if ( daBuffer )
|
||||
{
|
||||
UInt16* altBuffer = TRACKED_NEW UInt16[length+1];
|
||||
uint16_t* altBuffer = new uint16_t[length+1];
|
||||
// =====> temp>> to get rid of '\0's (change into 0xFFFEs)
|
||||
int i;
|
||||
for ( i=0 ; i<length ; i++ )
|
||||
@ -316,7 +316,7 @@ const wchar_t* pyGUIControlMultiLineEdit::GetEncodedBufferW()
|
||||
return nil;
|
||||
}
|
||||
|
||||
UInt32 pyGUIControlMultiLineEdit::GetBufferSize()
|
||||
uint32_t pyGUIControlMultiLineEdit::GetBufferSize()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -397,7 +397,7 @@ void pyGUIControlMultiLineEdit::InsertColor( pyColor& color )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlMultiLineEdit::InsertStyle( UInt8 fontStyle )
|
||||
void pyGUIControlMultiLineEdit::InsertStyle( uint8_t fontStyle )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -480,7 +480,7 @@ void pyGUIControlMultiLineEdit::Unclickable( void )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlMultiLineEdit::SetBufferLimit(Int32 limit)
|
||||
void pyGUIControlMultiLineEdit::SetBufferLimit(int32_t limit)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -491,7 +491,7 @@ void pyGUIControlMultiLineEdit::SetBufferLimit(Int32 limit)
|
||||
}
|
||||
}
|
||||
|
||||
Int32 pyGUIControlMultiLineEdit::GetBufferLimit()
|
||||
int32_t pyGUIControlMultiLineEdit::GetBufferLimit()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -536,7 +536,7 @@ void pyGUIControlMultiLineEdit::DeleteLinesFromTop( int lines )
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 pyGUIControlMultiLineEdit::GetFontSize()
|
||||
uint32_t pyGUIControlMultiLineEdit::GetFontSize()
|
||||
{
|
||||
if (fGCkey)
|
||||
{
|
||||
@ -548,13 +548,13 @@ UInt32 pyGUIControlMultiLineEdit::GetFontSize()
|
||||
return 12; // something relatively sane
|
||||
}
|
||||
|
||||
void pyGUIControlMultiLineEdit::SetFontSize( UInt32 fontsize )
|
||||
void pyGUIControlMultiLineEdit::SetFontSize( uint32_t fontsize )
|
||||
{
|
||||
if (fGCkey)
|
||||
{
|
||||
// get the pointer to the modifier
|
||||
pfGUIMultiLineEditCtrl* pbmod = pfGUIMultiLineEditCtrl::ConvertNoRef(fGCkey->ObjectIsLoaded());
|
||||
if ( pbmod )
|
||||
pbmod->SetFontSize((UInt8)fontsize);
|
||||
pbmod->SetFontSize((uint8_t)fontsize);
|
||||
}
|
||||
}
|
||||
|
@ -79,8 +79,8 @@ public:
|
||||
|
||||
virtual void Clickable( void );
|
||||
virtual void Unclickable( void );
|
||||
virtual void SetScrollPosition( Int32 topLine );
|
||||
virtual void MoveCursor( Int32 dir );
|
||||
virtual void SetScrollPosition( int32_t topLine );
|
||||
virtual void MoveCursor( int32_t dir );
|
||||
virtual void ClearBuffer( void );
|
||||
virtual void SetText( const char *asciiText );
|
||||
virtual void SetTextW( const wchar_t *asciiText );
|
||||
@ -90,17 +90,17 @@ public:
|
||||
virtual void SetEncodedBufferW( PyObject* buffer_object );
|
||||
virtual const char* GetEncodedBuffer();
|
||||
virtual const wchar_t* GetEncodedBufferW();
|
||||
virtual UInt32 GetBufferSize();
|
||||
virtual uint32_t GetBufferSize();
|
||||
|
||||
virtual void SetBufferLimit(Int32 limit);
|
||||
virtual Int32 GetBufferLimit();
|
||||
virtual void SetBufferLimit(int32_t limit);
|
||||
virtual int32_t GetBufferLimit();
|
||||
|
||||
virtual void InsertChar( char c );
|
||||
virtual void InsertCharW( wchar_t c );
|
||||
virtual void InsertString( const char *string );
|
||||
virtual void InsertStringW( const wchar_t *string );
|
||||
virtual void InsertColor( pyColor& color );
|
||||
virtual void InsertStyle( UInt8 fontStyle );
|
||||
virtual void InsertStyle( uint8_t fontStyle );
|
||||
virtual void DeleteChar( void );
|
||||
|
||||
virtual void Lock( void );
|
||||
@ -112,8 +112,8 @@ public:
|
||||
|
||||
virtual void DeleteLinesFromTop( int lines );
|
||||
|
||||
virtual UInt32 GetFontSize();
|
||||
virtual void SetFontSize( UInt32 fontsize );
|
||||
virtual uint32_t GetFontSize();
|
||||
virtual void SetFontSize( uint32_t fontsize );
|
||||
};
|
||||
|
||||
#endif // _pyGUIControlMultiLineEdit_h_
|
||||
|
@ -124,7 +124,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, setStringW, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* temp = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
|
||||
temp[strLen] = L'\0';
|
||||
self->fThis->SetTextW(temp);
|
||||
@ -230,7 +230,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, insertCharW, args)
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* temp = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
|
||||
temp[strLen] = L'\0';
|
||||
self->fThis->InsertCharW(temp[0]);
|
||||
@ -279,7 +279,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, insertStringW, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* temp = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
|
||||
temp[strLen] = L'\0';
|
||||
self->fThis->InsertStringW(temp);
|
||||
|
@ -65,7 +65,7 @@ hsBool pyGUIControlRadioGroup::IsGUIControlRadioGroup(pyKey& gckey)
|
||||
return false;
|
||||
}
|
||||
|
||||
Int32 pyGUIControlRadioGroup::GetValue( void )
|
||||
int32_t pyGUIControlRadioGroup::GetValue( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -77,7 +77,7 @@ Int32 pyGUIControlRadioGroup::GetValue( void )
|
||||
return -1;
|
||||
}
|
||||
|
||||
void pyGUIControlRadioGroup::SetValue( Int32 value )
|
||||
void pyGUIControlRadioGroup::SetValue( int32_t value )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
|
@ -74,8 +74,8 @@ public:
|
||||
|
||||
static hsBool IsGUIControlRadioGroup(pyKey& gckey);
|
||||
|
||||
virtual Int32 GetValue( void );
|
||||
virtual void SetValue( Int32 value );
|
||||
virtual int32_t GetValue( void );
|
||||
virtual void SetValue( int32_t value );
|
||||
|
||||
};
|
||||
|
||||
|
@ -116,7 +116,7 @@ void pyGUIControlTextBox::SetTextW( std::wstring text )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlTextBox::SetFontSize( UInt8 size )
|
||||
void pyGUIControlTextBox::SetFontSize( uint8_t size )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -178,7 +178,7 @@ void pyGUIControlTextBox::SetBackColor( pyColor& color )
|
||||
|
||||
}
|
||||
|
||||
void pyGUIControlTextBox::SetJustify( UInt8 justify )
|
||||
void pyGUIControlTextBox::SetJustify( uint8_t justify )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -198,7 +198,7 @@ void pyGUIControlTextBox::SetJustify( UInt8 justify )
|
||||
}
|
||||
}
|
||||
|
||||
UInt8 pyGUIControlTextBox::GetJustify()
|
||||
uint8_t pyGUIControlTextBox::GetJustify()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
|
@ -84,11 +84,11 @@ public:
|
||||
virtual void SetTextW( std::wstring text );
|
||||
virtual std::string GetText();
|
||||
virtual std::wstring GetTextW();
|
||||
virtual void SetFontSize( UInt8 size );
|
||||
virtual void SetFontSize( uint8_t size );
|
||||
virtual void SetForeColor( pyColor& color );
|
||||
virtual void SetBackColor( pyColor& color );
|
||||
virtual void SetJustify( UInt8 justify );
|
||||
virtual UInt8 GetJustify();
|
||||
virtual void SetJustify( uint8_t justify );
|
||||
virtual uint8_t GetJustify();
|
||||
virtual PyObject* GetForeColor(); // returns pyColor
|
||||
};
|
||||
|
||||
|
@ -93,7 +93,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlTextBox, setStringW, args)
|
||||
if (PyUnicode_Check(textObj))
|
||||
{
|
||||
int strLen = PyUnicode_GetSize(textObj);
|
||||
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
|
||||
wchar_t* temp = new wchar_t[strLen + 1];
|
||||
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
|
||||
temp[strLen] = L'\0';
|
||||
self->fThis->SetTextW(temp);
|
||||
|
@ -69,7 +69,7 @@ hsBool pyGUIControlValue::IsGUIControlValue(pyKey& gckey)
|
||||
}
|
||||
|
||||
|
||||
hsScalar pyGUIControlValue::GetValue()
|
||||
float pyGUIControlValue::GetValue()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -81,7 +81,7 @@ hsScalar pyGUIControlValue::GetValue()
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void pyGUIControlValue::SetValue( hsScalar v )
|
||||
void pyGUIControlValue::SetValue( float v )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -92,7 +92,7 @@ void pyGUIControlValue::SetValue( hsScalar v )
|
||||
}
|
||||
}
|
||||
|
||||
hsScalar pyGUIControlValue::GetMin( void )
|
||||
float pyGUIControlValue::GetMin( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -104,7 +104,7 @@ hsScalar pyGUIControlValue::GetMin( void )
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
hsScalar pyGUIControlValue::GetMax( void )
|
||||
float pyGUIControlValue::GetMax( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -116,7 +116,7 @@ hsScalar pyGUIControlValue::GetMax( void )
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
hsScalar pyGUIControlValue::GetStep( void )
|
||||
float pyGUIControlValue::GetStep( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -128,7 +128,7 @@ hsScalar pyGUIControlValue::GetStep( void )
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void pyGUIControlValue::SetRange( hsScalar min, hsScalar max )
|
||||
void pyGUIControlValue::SetRange( float min, float max )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -139,7 +139,7 @@ void pyGUIControlValue::SetRange( hsScalar min, hsScalar max )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIControlValue::SetStep( hsScalar step )
|
||||
void pyGUIControlValue::SetStep( float step )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
|
@ -75,13 +75,13 @@ public:
|
||||
|
||||
static hsBool IsGUIControlValue(pyKey& gckey);
|
||||
|
||||
virtual hsScalar GetValue();
|
||||
virtual void SetValue( hsScalar v );
|
||||
virtual hsScalar GetMin( void );
|
||||
virtual hsScalar GetMax( void );
|
||||
virtual hsScalar GetStep( void );
|
||||
virtual void SetRange( hsScalar min, hsScalar max );
|
||||
virtual void SetStep( hsScalar step );
|
||||
virtual float GetValue();
|
||||
virtual void SetValue( float v );
|
||||
virtual float GetMin( void );
|
||||
virtual float GetMax( void );
|
||||
virtual float GetStep( void );
|
||||
virtual void SetRange( float min, float max );
|
||||
virtual void SetStep( float step );
|
||||
};
|
||||
|
||||
class pyGUIControlKnob : public pyGUIControlValue
|
||||
|
@ -95,7 +95,7 @@ hsBool pyGUIDialog::IsGUIDialog(pyKey& gckey)
|
||||
}
|
||||
|
||||
|
||||
UInt32 pyGUIDialog::WhatControlType(pyKey& gckey)
|
||||
uint32_t pyGUIDialog::WhatControlType(pyKey& gckey)
|
||||
{
|
||||
// Do the pop-up menu test first, since it's derived from dialog
|
||||
if ( pyGUIPopUpMenu::IsGUIPopUpMenu(gckey) )
|
||||
@ -163,7 +163,7 @@ PyObject* pyGUIDialog::getObjPyKey()
|
||||
|
||||
|
||||
// interface functions
|
||||
UInt32 pyGUIDialog::GetTagID()
|
||||
uint32_t pyGUIDialog::GetTagID()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -208,7 +208,7 @@ const char* pyGUIDialog::GetName( void )
|
||||
}
|
||||
|
||||
|
||||
UInt32 pyGUIDialog::GetVersion(void)
|
||||
uint32_t pyGUIDialog::GetVersion(void)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -220,7 +220,7 @@ UInt32 pyGUIDialog::GetVersion(void)
|
||||
}
|
||||
|
||||
|
||||
UInt32 pyGUIDialog::GetNumControls( void )
|
||||
uint32_t pyGUIDialog::GetNumControls( void )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -231,7 +231,7 @@ UInt32 pyGUIDialog::GetNumControls( void )
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject* pyGUIDialog::GetControl( UInt32 idx )
|
||||
PyObject* pyGUIDialog::GetControl( uint32_t idx )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -298,7 +298,7 @@ void pyGUIDialog::Hide( void )
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* pyGUIDialog::GetControlFromTag( UInt32 tagID )
|
||||
PyObject* pyGUIDialog::GetControlFromTag( uint32_t tagID )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -375,7 +375,7 @@ PyObject* pyGUIDialog::GetBackSelColor()
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
UInt32 pyGUIDialog::GetFontSize()
|
||||
uint32_t pyGUIDialog::GetFontSize()
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -392,7 +392,7 @@ UInt32 pyGUIDialog::GetFontSize()
|
||||
|
||||
|
||||
// set color scheme
|
||||
void pyGUIDialog::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIDialog::SetForeColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -412,7 +412,7 @@ void pyGUIDialog::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIDialog::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIDialog::SetSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -432,7 +432,7 @@ void pyGUIDialog::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIDialog::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIDialog::SetBackColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -452,7 +452,7 @@ void pyGUIDialog::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
}
|
||||
}
|
||||
|
||||
void pyGUIDialog::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIDialog::SetBackSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -473,7 +473,7 @@ void pyGUIDialog::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
|
||||
}
|
||||
|
||||
|
||||
void pyGUIDialog::SetFontSize(UInt32 fontsize)
|
||||
void pyGUIDialog::SetFontSize(uint32_t fontsize)
|
||||
{
|
||||
if ( fGCkey )
|
||||
{
|
||||
@ -481,7 +481,7 @@ void pyGUIDialog::SetFontSize(UInt32 fontsize)
|
||||
if ( pdmod )
|
||||
{
|
||||
pfGUIColorScheme* color = pdmod->GetColorScheme();
|
||||
color->fFontSize = (UInt8)fontsize;
|
||||
color->fFontSize = (uint8_t)fontsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
kPopUpMenu=14,
|
||||
kClickMap=15,
|
||||
};
|
||||
static UInt32 WhatControlType(pyKey& gckey);
|
||||
static uint32_t WhatControlType(pyKey& gckey);
|
||||
static void GUICursorOff();
|
||||
static void GUICursorOn();
|
||||
static void GUICursorDimmed();
|
||||
@ -117,36 +117,36 @@ public:
|
||||
virtual PyObject* getObjPyKey(); // returns pyKey
|
||||
|
||||
// interface functions
|
||||
virtual UInt32 GetTagID();
|
||||
virtual uint32_t GetTagID();
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual void Enable() { SetEnabled(true); }
|
||||
virtual void Disable() { SetEnabled(false); }
|
||||
virtual hsBool IsEnabled( void );
|
||||
virtual const char *GetName( void );
|
||||
virtual UInt32 GetVersion(void);
|
||||
virtual uint32_t GetVersion(void);
|
||||
|
||||
virtual UInt32 GetNumControls( void );
|
||||
virtual PyObject* GetControl( UInt32 idx ); // returns pyKey
|
||||
virtual uint32_t GetNumControls( void );
|
||||
virtual PyObject* GetControl( uint32_t idx ); // returns pyKey
|
||||
virtual void SetFocus( pyKey& gcKey );
|
||||
virtual void NoFocus( );
|
||||
virtual void Show( void );
|
||||
virtual void ShowNoReset( void );
|
||||
virtual void Hide( void );
|
||||
virtual PyObject* GetControlFromTag( UInt32 tagID ); // returns pyKey
|
||||
virtual PyObject* GetControlFromTag( uint32_t tagID ); // returns pyKey
|
||||
|
||||
// get color schemes
|
||||
virtual PyObject* GetForeColor(); // returns pyColor
|
||||
virtual PyObject* GetSelColor(); // returns pyColor
|
||||
virtual PyObject* GetBackColor(); // returns pyColor
|
||||
virtual PyObject* GetBackSelColor(); // returns pyColor
|
||||
virtual UInt32 GetFontSize();
|
||||
virtual uint32_t GetFontSize();
|
||||
// set color scheme
|
||||
virtual void SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetFontSize(UInt32 fontsize);
|
||||
virtual void SetForeColor( float r, float g, float b, float a );
|
||||
virtual void SetSelColor( float r, float g, float b, float a );
|
||||
virtual void SetBackColor( float r, float g, float b, float a );
|
||||
virtual void SetBackSelColor( float r, float g, float b, float a );
|
||||
virtual void SetFontSize(uint32_t fontsize);
|
||||
|
||||
virtual void UpdateAllBounds( void );
|
||||
virtual void RefreshAllControls( void );
|
||||
|
@ -89,7 +89,7 @@ pyGUIPopUpMenu::pyGUIPopUpMenu()
|
||||
fBuiltMenu = nil;
|
||||
}
|
||||
|
||||
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc/* = plLocation::kGlobalFixedLoc */)
|
||||
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc/* = plLocation::kGlobalFixedLoc */)
|
||||
{
|
||||
fBuiltMenu = pfGUIPopUpMenu::Build( name, nil, screenOriginX, screenOriginY, destLoc );
|
||||
if( fBuiltMenu != nil )
|
||||
@ -101,7 +101,7 @@ pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScal
|
||||
fGCkey = nil;
|
||||
}
|
||||
|
||||
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY )
|
||||
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY )
|
||||
{
|
||||
pfGUIPopUpMenu *parentMenu = pfGUIPopUpMenu::ConvertNoRef( parent.fGCkey->ObjectIsLoaded() );
|
||||
|
||||
@ -140,7 +140,7 @@ void pyGUIPopUpMenu::setup(plKey objkey)
|
||||
fGCkey = objkey;
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::setup(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
|
||||
void pyGUIPopUpMenu::setup(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
|
||||
{
|
||||
// kill any previous menu
|
||||
if( fBuiltMenu != nil )
|
||||
@ -160,7 +160,7 @@ void pyGUIPopUpMenu::setup(const char *name, hsScalar screenOriginX, hsScalar sc
|
||||
fGCkey = nil;
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::setup(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY)
|
||||
void pyGUIPopUpMenu::setup(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY)
|
||||
{
|
||||
// kill any previous menu
|
||||
if( fBuiltMenu != nil )
|
||||
@ -220,7 +220,7 @@ PyObject* pyGUIPopUpMenu::getObjPyKey()
|
||||
|
||||
|
||||
// interface functions
|
||||
UInt32 pyGUIPopUpMenu::GetTagID()
|
||||
uint32_t pyGUIPopUpMenu::GetTagID()
|
||||
{
|
||||
kGetMenuPtr( 0 );
|
||||
return menu->GetTagID();
|
||||
@ -246,7 +246,7 @@ const char* pyGUIPopUpMenu::GetName( void )
|
||||
}
|
||||
|
||||
|
||||
UInt32 pyGUIPopUpMenu::GetVersion(void)
|
||||
uint32_t pyGUIPopUpMenu::GetVersion(void)
|
||||
{
|
||||
kGetMenuPtr( 0 );
|
||||
return menu->GetVersion();
|
||||
@ -299,7 +299,7 @@ PyObject* pyGUIPopUpMenu::GetBackSelColor()
|
||||
}
|
||||
|
||||
// set color scheme
|
||||
void pyGUIPopUpMenu::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIPopUpMenu::SetForeColor( float r, float g, float b, float a )
|
||||
{
|
||||
kGetMenuPtr( ; );
|
||||
|
||||
@ -314,7 +314,7 @@ void pyGUIPopUpMenu::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
|
||||
color->fForeColor.a = a;
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIPopUpMenu::SetSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
kGetMenuPtr( ; );
|
||||
|
||||
@ -329,7 +329,7 @@ void pyGUIPopUpMenu::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
|
||||
color->fSelForeColor.a = a;
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIPopUpMenu::SetBackColor( float r, float g, float b, float a )
|
||||
{
|
||||
kGetMenuPtr( ; );
|
||||
|
||||
@ -344,7 +344,7 @@ void pyGUIPopUpMenu::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
|
||||
color->fBackColor.a = a;
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
|
||||
void pyGUIPopUpMenu::SetBackSelColor( float r, float g, float b, float a )
|
||||
{
|
||||
kGetMenuPtr( ; );
|
||||
|
||||
@ -369,7 +369,7 @@ void pyGUIPopUpMenu::AddConsoleCmdItem( const char *name, const char *console
|
||||
void pyGUIPopUpMenu::AddConsoleCmdItemW( std::wstring name, const char *consoleCmd )
|
||||
{
|
||||
kGetMenuPtr( ; );
|
||||
menu->AddItem( name.c_str(), TRACKED_NEW pfGUIConsoleCmdProc( consoleCmd ), nil );
|
||||
menu->AddItem( name.c_str(), new pfGUIConsoleCmdProc( consoleCmd ), nil );
|
||||
}
|
||||
|
||||
void pyGUIPopUpMenu::AddNotifyItem( const char *name )
|
||||
|
@ -70,8 +70,8 @@ protected:
|
||||
pyGUIPopUpMenu(plKey objkey);
|
||||
pyGUIPopUpMenu();
|
||||
// For creating new menus on the fly
|
||||
pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc );
|
||||
pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY );
|
||||
pyGUIPopUpMenu( const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc );
|
||||
pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY );
|
||||
|
||||
public:
|
||||
virtual ~pyGUIPopUpMenu();
|
||||
@ -81,8 +81,8 @@ public:
|
||||
PYTHON_CLASS_NEW_DEFINITION;
|
||||
static PyObject *New(pyKey& gckey);
|
||||
static PyObject *New(plKey objkey);
|
||||
static PyObject *New(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
|
||||
static PyObject *New(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY);
|
||||
static PyObject *New(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
|
||||
static PyObject *New(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY);
|
||||
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyGUIPopUpMenu object
|
||||
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyGUIPopUpMenu); // converts a PyObject to a pyGUIPopUpMenu (throws error if not correct type)
|
||||
|
||||
@ -90,8 +90,8 @@ public:
|
||||
|
||||
// these three are for the python glue only, do NOT call
|
||||
void setup(plKey objkey);
|
||||
void setup(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
|
||||
void setup(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY);
|
||||
void setup(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
|
||||
void setup(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY);
|
||||
|
||||
static hsBool IsGUIPopUpMenu(pyKey& gckey);
|
||||
|
||||
@ -104,14 +104,14 @@ public:
|
||||
virtual PyObject* getObjPyKey(); // returns pyKey
|
||||
|
||||
// interface functions
|
||||
virtual UInt32 GetTagID();
|
||||
virtual uint32_t GetTagID();
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual void Enable() { SetEnabled(true); }
|
||||
virtual void Disable() { SetEnabled(false); }
|
||||
virtual hsBool IsEnabled( void );
|
||||
virtual const char *GetName( void );
|
||||
virtual UInt32 GetVersion(void);
|
||||
virtual uint32_t GetVersion(void);
|
||||
|
||||
virtual void Show( void );
|
||||
virtual void Hide( void );
|
||||
@ -122,10 +122,10 @@ public:
|
||||
virtual PyObject* GetBackColor(); // returns pyColor
|
||||
virtual PyObject* GetBackSelColor(); // returns pyColor
|
||||
// set color scheme
|
||||
virtual void SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
|
||||
virtual void SetForeColor( float r, float g, float b, float a );
|
||||
virtual void SetSelColor( float r, float g, float b, float a );
|
||||
virtual void SetBackColor( float r, float g, float b, float a );
|
||||
virtual void SetBackSelColor( float r, float g, float b, float a );
|
||||
|
||||
// Menu item functions
|
||||
virtual void AddConsoleCmdItem( const char *name, const char *consoleCmd );
|
||||
|
@ -417,14 +417,14 @@ PyObject *pyGUIPopUpMenu::New(plKey objkey)
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
PyObject *pyGUIPopUpMenu::New(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
|
||||
PyObject *pyGUIPopUpMenu::New(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
|
||||
{
|
||||
ptGUIPopUpMenu *newObj = (ptGUIPopUpMenu*)ptGUIPopUpMenu_type.tp_new(&ptGUIPopUpMenu_type, NULL, NULL);
|
||||
newObj->fThis->setup(name, screenOriginX, screenOriginY, destLoc);
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
PyObject *pyGUIPopUpMenu::New(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY)
|
||||
PyObject *pyGUIPopUpMenu::New(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY)
|
||||
{
|
||||
ptGUIPopUpMenu *newObj = (ptGUIPopUpMenu*)ptGUIPopUpMenu_type.tp_new(&ptGUIPopUpMenu_type, NULL, NULL);
|
||||
newObj->fThis->setup(name, parent, screenOriginX, screenOriginY);
|
||||
|
@ -66,7 +66,7 @@ int pyGameScore::GetScoreID()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UInt32 pyGameScore::GetCreatedTime()
|
||||
uint32_t pyGameScore::GetCreatedTime()
|
||||
{
|
||||
if (fScore)
|
||||
return fScore->createdTime;
|
||||
|
@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// PURPOSE: a wrapper class to provide access to a game score
|
||||
//
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
#include <Python.h>
|
||||
@ -76,7 +76,7 @@ public:
|
||||
static void AddPlasmaClasses(PyObject *m);
|
||||
|
||||
int GetScoreID();
|
||||
UInt32 GetCreatedTime();
|
||||
uint32_t GetCreatedTime();
|
||||
int GetOwnerID();
|
||||
int GetGameType();
|
||||
int GetValue();
|
||||
|
@ -57,7 +57,7 @@ class pyPoint3
|
||||
{
|
||||
protected:
|
||||
pyPoint3() : fPoint(0,0,0) {}
|
||||
pyPoint3(hsScalar x, hsScalar y, hsScalar z) : fPoint(x,y,z) {}
|
||||
pyPoint3(float x, float y, float z) : fPoint(x,y,z) {}
|
||||
pyPoint3(hsPoint3 pt) : fPoint(pt.fX,pt.fY,pt.fZ) {}
|
||||
|
||||
public:
|
||||
@ -73,20 +73,20 @@ public:
|
||||
hsPoint3 fPoint;
|
||||
|
||||
// python get attributes helpers
|
||||
hsScalar getX() { return fPoint.fX; }
|
||||
hsScalar getY() { return fPoint.fY; }
|
||||
hsScalar getZ() { return fPoint.fZ; }
|
||||
float getX() { return fPoint.fX; }
|
||||
float getY() { return fPoint.fY; }
|
||||
float getZ() { return fPoint.fZ; }
|
||||
|
||||
// python set attributes helpers
|
||||
void setX(hsScalar x) { fPoint.fX = x; }
|
||||
void setY(hsScalar y) { fPoint.fY = y; }
|
||||
void setZ(hsScalar z) { fPoint.fZ = z; }
|
||||
void setX(float x) { fPoint.fX = x; }
|
||||
void setY(float y) { fPoint.fY = y; }
|
||||
void setZ(float z) { fPoint.fZ = z; }
|
||||
|
||||
// methods to manipulate point3's
|
||||
void Zero() { fPoint.fX=0; fPoint.fY=0; fPoint.fZ=0; }
|
||||
PyObject* Copy() { return pyPoint3::New(fPoint); }
|
||||
hsScalar Distance(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).Magnitude(); }
|
||||
hsScalar DistanceSquared(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).MagnitudeSquared(); }
|
||||
float Distance(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).Magnitude(); }
|
||||
float DistanceSquared(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).MagnitudeSquared(); }
|
||||
};
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ class pyVector3
|
||||
{
|
||||
protected:
|
||||
pyVector3() : fVector(0,0,0) {}
|
||||
pyVector3(hsScalar x, hsScalar y, hsScalar z) : fVector(x,y,z) {}
|
||||
pyVector3(float x, float y, float z) : fVector(x,y,z) {}
|
||||
pyVector3(hsVector3 v) : fVector(v.fX,v.fY,v.fZ) {}
|
||||
|
||||
public:
|
||||
@ -110,14 +110,14 @@ public:
|
||||
hsVector3 fVector;
|
||||
|
||||
// python get attributes helpers
|
||||
hsScalar getX() { return fVector.fX; }
|
||||
hsScalar getY() { return fVector.fY; }
|
||||
hsScalar getZ() { return fVector.fZ; }
|
||||
float getX() { return fVector.fX; }
|
||||
float getY() { return fVector.fY; }
|
||||
float getZ() { return fVector.fZ; }
|
||||
|
||||
// python set attributes helpers
|
||||
void setX(hsScalar x) { fVector.fX = x; }
|
||||
void setY(hsScalar y) { fVector.fY = y; }
|
||||
void setZ(hsScalar z) { fVector.fZ = z; }
|
||||
void setX(float x) { fVector.fX = x; }
|
||||
void setY(float y) { fVector.fY = y; }
|
||||
void setZ(float z) { fVector.fZ = z; }
|
||||
|
||||
// operator methods
|
||||
PyObject* operator+(const pyVector3& b) const { return pyVector3::New(fVector + b.fVector); }
|
||||
@ -125,12 +125,12 @@ public:
|
||||
|
||||
// methods to manipulate vectors
|
||||
void Normalize() { fVector.Normalize(); }
|
||||
hsScalar Dot(pyVector3 other) { return fVector*other.fVector;}
|
||||
float Dot(pyVector3 other) { return fVector*other.fVector;}
|
||||
PyObject* Cross(pyVector3 other) {return pyVector3::New(fVector%other.fVector); }
|
||||
hsScalar Magnitude() { return fVector.Magnitude(); }
|
||||
hsScalar MagnitudeSquared() { return fVector.MagnitudeSquared(); }
|
||||
float Magnitude() { return fVector.Magnitude(); }
|
||||
float MagnitudeSquared() { return fVector.MagnitudeSquared(); }
|
||||
void Zero() { fVector.fX=0; fVector.fY=0; fVector.fZ=0; }
|
||||
PyObject* Scale(hsScalar scale) { return pyVector3::New(fVector * scale); }
|
||||
PyObject* Scale(float scale) { return pyVector3::New(fVector * scale); }
|
||||
PyObject* Add(pyVector3& other) { return pyVector3::New(fVector + other.fVector); }
|
||||
PyObject* Subtract(pyVector3& other) { return pyVector3::New(fVector - other.fVector); }
|
||||
PyObject* Copy() { return pyVector3::New(fVector); }
|
||||
|
@ -112,7 +112,7 @@ PyObject *pythonClassName##_new(PyTypeObject *type, PyObject *, PyObject *) \
|
||||
self = (pythonClassName*)type->tp_alloc(type, 0); \
|
||||
if (self != NULL) \
|
||||
{ \
|
||||
self->fThis = TRACKED_NEW glueClassName(); \
|
||||
self->fThis = new glueClassName(); \
|
||||
if (self->fThis == NULL) \
|
||||
{ \
|
||||
Py_DECREF(self); \
|
||||
|
@ -66,7 +66,7 @@ void pyGrassShader::SetKey(plKey key)
|
||||
// Setter functions
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<hsScalar> & distortion)
|
||||
void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<float> & distortion)
|
||||
{
|
||||
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
|
||||
{
|
||||
@ -95,7 +95,7 @@ void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<hsScalar> &
|
||||
}
|
||||
}
|
||||
|
||||
void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<hsScalar> & direction)
|
||||
void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<float> & direction)
|
||||
{
|
||||
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
|
||||
{
|
||||
@ -123,7 +123,7 @@ void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<hsScalar> &
|
||||
}
|
||||
}
|
||||
|
||||
void pyGrassShader::SetWaveSpeed(int waveNum, hsScalar speed)
|
||||
void pyGrassShader::SetWaveSpeed(int waveNum, float speed)
|
||||
{
|
||||
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
|
||||
{
|
||||
@ -147,9 +147,9 @@ void pyGrassShader::SetWaveSpeed(int waveNum, hsScalar speed)
|
||||
// Getter functions
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::vector<hsScalar> pyGrassShader::GetWaveDistortion(int waveNum) const
|
||||
std::vector<float> pyGrassShader::GetWaveDistortion(int waveNum) const
|
||||
{
|
||||
std::vector<hsScalar> retVal;
|
||||
std::vector<float> retVal;
|
||||
retVal.push_back(-1);
|
||||
retVal.push_back(-1);
|
||||
retVal.push_back(-1);
|
||||
@ -174,9 +174,9 @@ std::vector<hsScalar> pyGrassShader::GetWaveDistortion(int waveNum) const
|
||||
return retVal;
|
||||
}
|
||||
|
||||
std::vector<hsScalar> pyGrassShader::GetWaveDirection(int waveNum) const
|
||||
std::vector<float> pyGrassShader::GetWaveDirection(int waveNum) const
|
||||
{
|
||||
std::vector<hsScalar> retVal;
|
||||
std::vector<float> retVal;
|
||||
retVal.push_back(-1);
|
||||
retVal.push_back(-1);
|
||||
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
|
||||
@ -199,7 +199,7 @@ std::vector<hsScalar> pyGrassShader::GetWaveDirection(int waveNum) const
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsScalar pyGrassShader::GetWaveSpeed(int waveNum) const
|
||||
float pyGrassShader::GetWaveSpeed(int waveNum) const
|
||||
{
|
||||
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
|
||||
{
|
||||
|
@ -77,13 +77,13 @@ public:
|
||||
|
||||
void SetKey(plKey key);
|
||||
|
||||
void SetWaveDistortion(int waveNum, const std::vector<hsScalar> & distortion);
|
||||
void SetWaveDirection(int waveNum, const std::vector<hsScalar> & direction);
|
||||
void SetWaveSpeed(int waveNum, hsScalar speed);
|
||||
void SetWaveDistortion(int waveNum, const std::vector<float> & distortion);
|
||||
void SetWaveDirection(int waveNum, const std::vector<float> & direction);
|
||||
void SetWaveSpeed(int waveNum, float speed);
|
||||
|
||||
std::vector<hsScalar> GetWaveDistortion(int waveNum) const;
|
||||
std::vector<hsScalar> GetWaveDirection(int waveNum) const;
|
||||
hsScalar GetWaveSpeed(int waveNum) const;
|
||||
std::vector<float> GetWaveDistortion(int waveNum) const;
|
||||
std::vector<float> GetWaveDirection(int waveNum) const;
|
||||
float GetWaveSpeed(int waveNum) const;
|
||||
|
||||
void ResetWaves();
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDistortion, args)
|
||||
}
|
||||
|
||||
int len = PyTuple_Size(tupleObject);
|
||||
std::vector<hsScalar> vecArgs;
|
||||
std::vector<float> vecArgs;
|
||||
for (int curArg = 0; curArg < len; curArg++)
|
||||
{
|
||||
PyObject *arg = PyTuple_GetItem(tupleObject, curArg);
|
||||
@ -94,7 +94,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDistortion, args)
|
||||
PyErr_SetString(PyExc_TypeError, "setWaveDistortion expects a integer and tuple of floats");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
vecArgs.push_back((hsScalar)PyFloat_AsDouble(arg));
|
||||
vecArgs.push_back((float)PyFloat_AsDouble(arg));
|
||||
}
|
||||
|
||||
self->fThis->SetWaveDistortion(waveNum, vecArgs);
|
||||
@ -117,7 +117,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDirection, args)
|
||||
}
|
||||
|
||||
int len = PyTuple_Size(tupleObject);
|
||||
std::vector<hsScalar> vecArgs;
|
||||
std::vector<float> vecArgs;
|
||||
for (int curArg = 0; curArg < len; curArg++)
|
||||
{
|
||||
PyObject *arg = PyTuple_GetItem(tupleObject, curArg);
|
||||
@ -126,7 +126,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDirection, args)
|
||||
PyErr_SetString(PyExc_TypeError, "setWaveDirection expects a integer and tuple of floats");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
vecArgs.push_back((hsScalar)PyFloat_AsDouble(arg));
|
||||
vecArgs.push_back((float)PyFloat_AsDouble(arg));
|
||||
}
|
||||
|
||||
self->fThis->SetWaveDirection(waveNum, vecArgs);
|
||||
@ -155,7 +155,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, getWaveDistortion, args)
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
std::vector<hsScalar> vecArgs = self->fThis->GetWaveDistortion(waveNum);
|
||||
std::vector<float> vecArgs = self->fThis->GetWaveDistortion(waveNum);
|
||||
PyObject *retVal = PyTuple_New(vecArgs.size());
|
||||
for (int curArg = 0; curArg < vecArgs.size(); curArg++)
|
||||
PyTuple_SetItem(retVal, curArg, PyFloat_FromDouble((double)vecArgs[curArg]));
|
||||
@ -171,7 +171,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, getWaveDirection, args)
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
std::vector<hsScalar> vecArgs = self->fThis->GetWaveDirection(waveNum);
|
||||
std::vector<float> vecArgs = self->fThis->GetWaveDirection(waveNum);
|
||||
PyObject *retVal = PyTuple_New(vecArgs.size());
|
||||
for (int curArg = 0; curArg < vecArgs.size(); curArg++)
|
||||
PyTuple_SetItem(retVal, curArg, PyFloat_FromDouble((double)vecArgs[curArg]));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user