2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Convert custom HeadSpin integer types to standard types from stdint.h

This commit is contained in:
2012-01-19 21:19:26 -05:00
parent a0d54e2644
commit 5027b5a4ac
1301 changed files with 14497 additions and 14532 deletions

View File

@ -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());
}
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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, hsScalar transTime, hsBool setTime, hsScalar 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
@ -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());
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);
@ -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();
@ -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();

View File

@ -114,11 +114,11 @@ public:
hsBool setDirection, bool isForward, hsBool netForce);
virtual void PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar 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, hsScalar transTime, hsBool setTime, hsScalar 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);
/////////////////////////////////////////////////////////////////////////////
//

View File

@ -140,7 +140,7 @@ 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 )

View File

@ -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);
/////////////////////////////////////////////////////////////////////////////

View File

@ -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;
}
@ -272,7 +272,7 @@ 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, hsScalar 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);
@ -397,7 +397,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);
}
@ -409,7 +409,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);
}
@ -612,7 +612,7 @@ PyObject* cyMisc::GetPrevAgeInfo()
}
// current time in current age
UInt32 cyMisc::GetAgeTime( void )
uint32_t cyMisc::GetAgeTime( void )
{
return VaultAgeGetAgeTime();
}
@ -639,9 +639,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)
{
@ -686,7 +686,7 @@ 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;
@ -704,7 +704,7 @@ 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;
@ -872,7 +872,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 )
@ -1056,7 +1056,7 @@ std::vector<PyObject*> cyMisc::GetPlayerListDistanceSorted()
return pyPL;
}
UInt32 cyMisc::GetMaxListenListSize()
uint32_t cyMisc::GetMaxListenListSize()
{
return plNetListenList::kMaxListenListSize;
}
@ -1080,7 +1080,7 @@ 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 );
@ -1106,7 +1106,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();
@ -1114,7 +1114,7 @@ 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 );
@ -1139,7 +1139,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();
@ -1157,10 +1157,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, hsScalar value)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (UInt8)command );
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (uint8_t)command );
// check to see if the value makes any sense
if ( command == pfKIMsg::kSetChatFadeDelay )
@ -1185,10 +1185,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 = TRACKED_NEW pfKIMsg( (uint8_t)command );
msg->SetString( value );
@ -1200,16 +1200,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 = TRACKED_NEW pfKIMsg( (uint8_t)command );
msg->SetIntValue(value);
@ -1221,13 +1221,13 @@ 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 );
@ -1368,7 +1368,7 @@ 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();
@ -1388,7 +1388,7 @@ 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();
@ -1608,7 +1608,7 @@ void cyMisc::DisableOfferBookMode()
pMsg->Send();
}
void cyMisc::NotifyOffererPublicLinkCompleted(UInt32 offerer)
void cyMisc::NotifyOffererPublicLinkCompleted(uint32_t offerer)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferCompleted, plNetClientMgr::GetInstance()->GetPlayerID());
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
@ -1623,7 +1623,7 @@ 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);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
@ -1639,7 +1639,7 @@ 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);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
@ -2052,13 +2052,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, hsScalar xPos, hsScalar yPos, hsScalar 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;
@ -2208,8 +2208,8 @@ void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos,
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;
@ -2276,9 +2276,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;
@ -2301,10 +2301,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?" );
@ -2315,7 +2315,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);
@ -2423,7 +2423,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);
@ -2564,7 +2564,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 );
}
@ -2604,7 +2604,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);
}
@ -2642,7 +2642,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;
@ -2814,7 +2814,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())
{

View File

@ -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, hsScalar 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);
/////////////////////////////////////////////////////////////////////////////
@ -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,7 +423,7 @@ public:
static std::vector<PyObject*> GetPlayerList(); // list of pyPlayer
static std::vector<PyObject*> GetPlayerListDistanceSorted(); // list of pyPlayer
static UInt32 GetMaxListenListSize();
static uint32_t GetMaxListenListSize();
static hsScalar 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, hsScalar 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, hsScalar xPos, hsScalar yPos, hsScalar distance, int what, int reportType);
//////////////////////////////////////////////////////////////////////////////
//
@ -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);

View File

@ -258,7 +258,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendRTChat, args, "Params: fromPlayer,toPlayer
int size = PyUnicode_GetSize(message);
wchar_t* msg = TRACKED_NEW wchar_t[size + 1]; msg[size] = 0;
PyUnicode_AsWideChar((PyUnicodeObject*)message, msg, size);
UInt32 retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
uint32_t retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
DEL(msg);
return PyLong_FromUnsignedLong(retval);
}
@ -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;

View File

@ -678,10 +678,10 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendFriendInvite, args, "Params: emailAddress,
PYTHON_RETURN_ERROR;
}
wchar emailAddr[kMaxEmailAddressLength];
wchar_t emailAddr[kMaxEmailAddressLength];
MemSet(emailAddr, 0, sizeof(emailAddr));
wchar toName[kMaxPlayerNameLength];
wchar_t toName[kMaxPlayerNameLength];
MemSet(toName, 0, sizeof(toName));
// Check and see if the email address is ok

View File

@ -79,7 +79,7 @@ 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, hsScalar value)
{
plParticleUpdateMsg* pMsg = TRACKED_NEW plParticleUpdateMsg(fSender, nil, nil, param, value);
// check if this needs to be network forced to all clients

View File

@ -63,7 +63,7 @@ protected:
hsTArray<plKey> fRecvr;
hsBool fNetForce;
virtual void ISendParticleSysMsg(UInt32 param, hsScalar value);
virtual void ISendParticleSysMsg(uint32_t param, hsScalar value);
cyParticleSys(const plKey sender=nil,const plKey recvr=nil);

View File

@ -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
@ -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;
@ -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);
}

View File

@ -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);
/////////////////////////////////////////////////////////////////////////////

View File

@ -436,7 +436,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)
@ -609,7 +609,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:
@ -963,8 +963,8 @@ void plPythonFileMod::IMakeModuleName(char* modulename,plSceneObject* sobj)
const char* pKeyName = pKey->GetName();
const char* pSobjName = sKey->GetName();
UInt16 len = hsStrlen(pKeyName);
UInt16 slen = hsStrlen(pSobjName);
uint16_t len = hsStrlen(pKeyName);
uint16_t slen = hsStrlen(pSobjName);
hsAssert(len+slen < 256, "Warning: String length exceeds 256 characters.");
@ -991,7 +991,7 @@ void plPythonFileMod::IMakeModuleName(char* modulename,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();
sprintf(modulename,"%s%d",modulename,cloneID);
fAmIAttachedToClone = true;
}
@ -1000,7 +1000,7 @@ void plPythonFileMod::IMakeModuleName(char* modulename,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();
sprintf(modulename,"%s%d",modulename,seqID);
}
}
@ -1013,7 +1013,7 @@ void plPythonFileMod::IMakeModuleName(char* modulename,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);
@ -1047,7 +1047,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 char *responderName, Int32 id)
void plPythonFileMod::IFindResponderAndAdd(const char *responderName, int32_t id)
{
if ( responderName != nil )
{
@ -1075,7 +1075,7 @@ void plPythonFileMod::IFindResponderAndAdd(const char *responderName, Int32 id)
// PURPOSE : find a responder by name in all age and page locations
// : and add to the Parameter list
//
void plPythonFileMod::IFindActivatorAndAdd(const char *activatorName, Int32 id)
void plPythonFileMod::IFindActivatorAndAdd(const char *activatorName, int32_t id)
{
if ( activatorName != nil )
{
@ -1131,7 +1131,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const char *activatorName, Int32 id)
// Tasks:
// - Call the Python code's Update function (if there)
//
hsBool plPythonFileMod::IEval(double secs, hsScalar del, UInt32 dirty)
hsBool plPythonFileMod::IEval(double secs, hsScalar del, uint32_t dirty)
{
if ( fModule )
{
@ -1267,7 +1267,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++ )
{
@ -1490,7 +1490,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
@ -1625,7 +1625,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)
@ -1688,7 +1688,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
@ -2343,7 +2343,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
@ -2501,7 +2501,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

View File

@ -72,7 +72,7 @@ protected:
plPythonSDLModifier* fSDLMod;
hsBool IEval(double secs, hsScalar del, UInt32 dirty);
hsBool IEval(double secs, hsScalar del, uint32_t dirty);
void IMakeModuleName(char* modulename,plSceneObject* sobj);
@ -105,15 +105,15 @@ protected:
struct NamedComponent
{
char* name;
Int32 id;
int32_t id;
bool isActivator;
};
hsTArray<NamedComponent> fNamedCompQueue;
virtual void IFindResponderAndAdd(const char *responderName, Int32 id);
virtual void IFindActivatorAndAdd(const char *activatorName, Int32 id);
void ISetKeyValue(const plKey& key, Int32 id);
virtual void IFindResponderAndAdd(const char *responderName, int32_t id);
virtual void IFindActivatorAndAdd(const char *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);

View File

@ -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);
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());

View File

@ -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,12 +89,12 @@ 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;
@ -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,7 +221,7 @@ public:
fValueType = kNone;
}
void SetToInt(Int32 number)
void SetToInt(int32_t number)
{
SetToNone();
fValueType = kInt;
@ -233,10 +233,10 @@ public:
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;
@ -424,7 +424,7 @@ public:
stream->WriteLE(datarecord.fFloatNumber);
break;
case kBoolean:
case kbool:
stream->WriteLE32(datarecord.fBool);
break;

View File

@ -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)

View File

@ -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 )
xtl::format( fDisplayName, "%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 )
xtl::format( fDisplayName, "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
else

View File

@ -99,10 +99,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;
};
@ -142,8 +142,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;
};

View File

@ -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,10 +213,10 @@ 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);
@ -226,12 +226,12 @@ void pyAgeVault::AddChronicleEntry( const char * name, UInt32 type, const char *
// 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)) {

View File

@ -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

View File

@ -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,7 +127,7 @@ 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 ) );

View File

@ -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();
};

View File

@ -355,22 +355,22 @@ void pyAudioControl::SquelchLevel( hsScalar 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 );
}

View File

@ -152,13 +152,13 @@ public:
virtual void SquelchLevel( hsScalar 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);

View File

@ -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();

View File

@ -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

View File

@ -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)

View File

@ -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();
};

View File

@ -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 )
{
@ -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;
}
}
}

View File

@ -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 SetFontSize(uint32_t fontsize);
};

View File

@ -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 )
{

View File

@ -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();
};

View File

@ -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 )
{

View File

@ -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_

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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,7 +101,7 @@ 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 )
{
@ -165,7 +165,7 @@ class pfColorListElement : public pfGUIListText
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,7 +242,7 @@ 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;
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
{
@ -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 )
@ -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 )
{
@ -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));

View File

@ -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();

View File

@ -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 = TRACKED_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 = TRACKED_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 = TRACKED_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 = TRACKED_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);
}
}

View File

@ -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_

View File

@ -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 )
{

View File

@ -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 );
};

View File

@ -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 )
{

View File

@ -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
};

View File

@ -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 )
{
@ -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;
}
}
}

View File

@ -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 SetFontSize(uint32_t fontsize);
virtual void UpdateAllBounds( void );
virtual void RefreshAllControls( void );

View File

@ -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();

View File

@ -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 );

View File

@ -66,7 +66,7 @@ int pyGameScore::GetScoreID()
return 0;
}
UInt32 pyGameScore::GetCreatedTime()
uint32_t pyGameScore::GetCreatedTime()
{
if (fScore)
return fScore->createdTime;

View File

@ -76,7 +76,7 @@ public:
static void AddPlasmaClasses(PyObject *m);
int GetScoreID();
UInt32 GetCreatedTime();
uint32_t GetCreatedTime();
int GetOwnerID();
int GetGameType();
int GetValue();

View File

@ -71,13 +71,13 @@ PyObject* pyImage::GetPixelColor(float x, float y)
image = plMipmap::ConvertNoRef(fMipMapKey->ObjectIsLoaded());
if (image)
{
UInt32 height = image->GetHeight();
UInt32 width = image->GetWidth();
UInt32 iX = (UInt32)((float)width * x);
UInt32 iY = (UInt32)((float)height * y);
uint32_t height = image->GetHeight();
uint32_t width = image->GetWidth();
uint32_t iX = (uint32_t)((float)width * x);
uint32_t iY = (uint32_t)((float)height * y);
hsColorRGBA pixColor;
image->SetCurrLevel(0);
UInt32 *color = image->GetAddr32(iX,iY);
uint32_t *color = image->GetAddr32(iX,iY);
pixColor.FromARGB32(*color);
return pyColor::New(pixColor);
}
@ -97,8 +97,8 @@ PyObject* pyImage::GetColorLoc(const pyColor &color)
image = plMipmap::ConvertNoRef(fMipMapKey->ObjectIsLoaded());
if (image)
{
UInt32 height = image->GetHeight();
UInt32 width = image->GetWidth();
uint32_t height = image->GetHeight();
uint32_t width = image->GetWidth();
double minSqrDist = 9999999;
hsPoint3 closestMatch;
image->SetCurrLevel(0);
@ -138,7 +138,7 @@ PyObject* pyImage::GetColorLoc(const pyColor &color)
// GetWidth
// returns the width of the image
UInt32 pyImage::GetWidth()
uint32_t pyImage::GetWidth()
{
plMipmap* image;
if (fMipmap)
@ -152,7 +152,7 @@ UInt32 pyImage::GetWidth()
// GetHeight
// returns the height of the image
UInt32 pyImage::GetHeight()
uint32_t pyImage::GetHeight()
{
plMipmap* image;
if (fMipmap)
@ -165,7 +165,7 @@ UInt32 pyImage::GetHeight()
}
#include "plJPEG/plJPEG.h"
void pyImage::SaveAsJPEG(const wchar* fileName, UInt8 quality)
void pyImage::SaveAsJPEG(const wchar_t* fileName, uint8_t quality)
{
if (quality <= 0 || quality > 100)
{
@ -177,7 +177,7 @@ void pyImage::SaveAsJPEG(const wchar* fileName, UInt8 quality)
}
#include "plGImage/plPNG.h"
void pyImage::SaveAsPNG(const wchar* fileName)
void pyImage::SaveAsPNG(const wchar_t* fileName)
{
plPNG::Instance().WriteToFile( fileName, this->GetImage() );
@ -185,7 +185,7 @@ void pyImage::SaveAsPNG(const wchar* fileName)
#include "hsResMgr.h"
#include "pnKeyedObject/plUoid.h"
PyObject* pyImage::LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16 height)
PyObject* pyImage::LoadJPEGFromDisk(const wchar_t* filename, uint16_t width, uint16_t height)
{
plMipmap* theMipmap = plJPEG::Instance().ReadFromFile(filename);
if (theMipmap)
@ -201,7 +201,7 @@ PyObject* pyImage::LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16
// let's create a nice name for this thing based on the filename
std::string name = "PtImageFromDisk_";
const wchar* i = filename;
const wchar_t* i = filename;
int charsChecked = 0;
while (*i != '\\' && *i != '\0' && charsChecked < 1024)

View File

@ -163,11 +163,11 @@ public:
// for python access
PyObject *GetPixelColor(float x, float y); // returns the color at a specific x,y position (x and y from 0 to 1) - returns pyColor
PyObject *GetColorLoc(const pyColor &color); // returns the x,y position of a color (x and y from 0 to 1) - returns pyPoint3
UInt32 GetWidth(); // returns the width of the image
UInt32 GetHeight(); // returns the height of the image
void SaveAsJPEG(const wchar* fileName, UInt8 quality = 75);
void SaveAsPNG(const wchar* fileName);
static PyObject* LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16 height); // returns pyImage
uint32_t GetWidth(); // returns the width of the image
uint32_t GetHeight(); // returns the height of the image
void SaveAsJPEG(const wchar_t* fileName, uint8_t quality = 75);
void SaveAsPNG(const wchar_t* fileName);
static PyObject* LoadJPEGFromDisk(const wchar_t* filename, uint16_t width, uint16_t height); // returns pyImage
#endif
};

View File

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsResMgr.h"
#include "pnKeyedObject/plUoid.h"
UInt32 pyJournalBook::fNextKeyID = 0;
uint32_t pyJournalBook::fNextKeyID = 0;
void pyJournalBook::IMakeNewKey( void )
{
@ -173,7 +173,7 @@ void pyJournalBook::Hide( void )
fBook->Hide();
}
void pyJournalBook::Open( UInt32 startingPage )
void pyJournalBook::Open( uint32_t startingPage )
{
if( fBook != nil )
fBook->Open( startingPage );
@ -203,7 +203,7 @@ void pyJournalBook::PreviousPage( void )
fBook->PreviousPage();
}
void pyJournalBook::GoToPage( UInt32 page )
void pyJournalBook::GoToPage( uint32_t page )
{
if( fBook != nil )
fBook->GoToPage( page );
@ -215,7 +215,7 @@ void pyJournalBook::SetSize( hsScalar width, hsScalar height )
fBook->SetBookSize( width, height );
}
UInt32 pyJournalBook::GetCurrentPage( void ) const
uint32_t pyJournalBook::GetCurrentPage( void ) const
{
if( fBook != nil )
return fBook->GetCurrentPage();
@ -223,7 +223,7 @@ UInt32 pyJournalBook::GetCurrentPage( void ) const
return 0;
}
void pyJournalBook::SetPageMargin( UInt32 margin )
void pyJournalBook::SetPageMargin( uint32_t margin )
{
if( fBook != nil )
fBook->SetPageMargin( margin );
@ -256,7 +256,7 @@ void pyJournalBook::UnloadAllGUIs()
pfJournalBook::UnloadAllGUIs();
}
PyObject *pyJournalBook::GetMovie(UInt8 index)
PyObject *pyJournalBook::GetMovie(uint8_t index)
{
if (fBook != nil)
{

View File

@ -67,7 +67,7 @@ protected:
pfJournalBook *fBook;
static UInt32 fNextKeyID;
static uint32_t fNextKeyID;
void IMakeNewKey( void );
@ -104,15 +104,15 @@ public:
// Interface functions per book
virtual void Show( hsBool startOpened );
virtual void Hide( void );
virtual void Open( UInt32 startingPage );
virtual void Open( uint32_t startingPage );
virtual void Close( void );
virtual void CloseAndHide( void );
virtual void NextPage( void );
virtual void PreviousPage( void );
virtual void GoToPage( UInt32 page );
virtual UInt32 GetCurrentPage( void ) const;
virtual void SetPageMargin( UInt32 margin );
virtual void GoToPage( uint32_t page );
virtual uint32_t GetCurrentPage( void ) const;
virtual void SetPageMargin( uint32_t margin );
virtual void AllowPageTurning( bool allow );
virtual void SetSize( hsScalar width, hsScalar height );
@ -123,7 +123,7 @@ public:
static void UnloadGUI( const char *guiName );
static void UnloadAllGUIs();
virtual PyObject *GetMovie( UInt8 index ); // returns cyAnimation
virtual PyObject *GetMovie( uint8_t index ); // returns cyAnimation
virtual void SetEditable( hsBool editable );
virtual std::string GetEditableText( void ) const;

View File

@ -198,7 +198,7 @@ plPipeline* pyKey::GetPipeline()
}
// get the notify list count
Int32 pyKey::NotifyListCount()
int32_t pyKey::NotifyListCount()
{
// see if we have a PythonFileModifier pointer
if ( fPyFileMod )
@ -208,7 +208,7 @@ Int32 pyKey::NotifyListCount()
}
// get a notify list item
plKey pyKey::GetNotifyListItem(Int32 i)
plKey pyKey::GetNotifyListItem(int32_t i)
{
// see if we have a PythonFileModifier pointer
if ( fPyFileMod )
@ -219,7 +219,7 @@ plKey pyKey::GetNotifyListItem(Int32 i)
// Set the dirty state on the PythonModifier
void pyKey::DirtySynchState(const char* SDLStateName, UInt32 sendFlags)
void pyKey::DirtySynchState(const char* SDLStateName, uint32_t sendFlags)
{
// see if we have a PythonFileModifier pointer
if ( fPyFileMod )

View File

@ -121,12 +121,12 @@ public:
virtual hsBool IsAttachedToClone();
// (old style - Used in pyNotify)
// get the notify list count
virtual Int32 NotifyListCount();
virtual int32_t NotifyListCount();
// (old style - Used in pyNotify)
// get a notify list item
virtual plKey GetNotifyListItem(Int32 i);
virtual plKey GetNotifyListItem(int32_t i);
// Set the dirty state on the PythonModifier
virtual void DirtySynchState(const char* SDLStateName, UInt32 sendFlags);
virtual void DirtySynchState(const char* SDLStateName, uint32_t sendFlags);
// register and unregister for control key envents
virtual void EnableControlKeyEvents();

View File

@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnInputCore/plKeyMap.h"
// conversion functions
const char* pyKeyMap::ConvertVKeyToChar( UInt32 vk, UInt32 flags )
const char* pyKeyMap::ConvertVKeyToChar( uint32_t vk, uint32_t flags )
{
const char *key = plKeyMap::ConvertVKeyToChar( vk );
static char shortKey[ 2 ];
@ -78,7 +78,7 @@ const char* pyKeyMap::ConvertVKeyToChar( UInt32 vk, UInt32 flags )
return newKey;
}
UInt32 pyKeyMap::ConvertCharToVKey( const char* charVKey )
uint32_t pyKeyMap::ConvertCharToVKey( const char* charVKey )
{
char str[ 16 ];
int i;
@ -96,13 +96,13 @@ UInt32 pyKeyMap::ConvertCharToVKey( const char* charVKey )
return plKeyMap::ConvertCharToVKey( str );
}
UInt32 pyKeyMap::ConvertCharToFlags( const char *charVKey )
uint32_t pyKeyMap::ConvertCharToFlags( const char *charVKey )
{
char str[ 16 ];
strcpy( str, charVKey );
// Find modifiers to set flags with
UInt32 keyFlags = 0;
uint32_t keyFlags = 0;
if( strstr( str, "_S" ) || strstr( str, "_s" ) )
keyFlags |= plKeyCombo::kShift;
if( strstr( str, "_C" ) || strstr( str, "_c" ) )
@ -112,13 +112,13 @@ UInt32 pyKeyMap::ConvertCharToFlags( const char *charVKey )
}
UInt32 pyKeyMap::ConvertCharToControlCode(const char* charCode)
uint32_t pyKeyMap::ConvertCharToControlCode(const char* charCode)
{
ControlEventCode code = plInputMap::ConvertCharToControlCode(charCode);
return (UInt32)code;
return (uint32_t)code;
}
const char* pyKeyMap::ConvertControlCodeToString( UInt32 code )
const char* pyKeyMap::ConvertControlCodeToString( uint32_t code )
{
return plInputMap::ConvertControlCodeToString((ControlEventCode)code);
}
@ -193,7 +193,7 @@ plKeyCombo pyKeyMap::IBindKeyToVKey( const char *keyStr )
return combo;
}
UInt32 pyKeyMap::GetBindingKey1(UInt32 code)
uint32_t pyKeyMap::GetBindingKey1(uint32_t code)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -201,13 +201,13 @@ UInt32 pyKeyMap::GetBindingKey1(UInt32 code)
if ( keymap )
{
plKeyCombo key = keymap->GetKey1();
return (UInt32)(key.fKey);
return (uint32_t)(key.fKey);
}
}
return 0;
}
UInt32 pyKeyMap::GetBindingFlags1(UInt32 code)
uint32_t pyKeyMap::GetBindingFlags1(uint32_t code)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -215,13 +215,13 @@ UInt32 pyKeyMap::GetBindingFlags1(UInt32 code)
if ( keymap )
{
plKeyCombo key = keymap->GetKey1();
return (UInt32)(key.fFlags);
return (uint32_t)(key.fFlags);
}
}
return 0;
}
UInt32 pyKeyMap::GetBindingKey2(UInt32 code)
uint32_t pyKeyMap::GetBindingKey2(uint32_t code)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -229,13 +229,13 @@ UInt32 pyKeyMap::GetBindingKey2(UInt32 code)
if ( keymap )
{
plKeyCombo key = keymap->GetKey2();
return (UInt32)(key.fKey);
return (uint32_t)(key.fKey);
}
}
return 0;
}
UInt32 pyKeyMap::GetBindingFlags2(UInt32 code)
uint32_t pyKeyMap::GetBindingFlags2(uint32_t code)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -243,13 +243,13 @@ UInt32 pyKeyMap::GetBindingFlags2(UInt32 code)
if ( keymap )
{
plKeyCombo key = keymap->GetKey2();
return (UInt32)(key.fFlags);
return (uint32_t)(key.fFlags);
}
}
return 0;
}
UInt32 pyKeyMap::GetBindingKeyConsole(const char* command)
uint32_t pyKeyMap::GetBindingKeyConsole(const char* command)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -257,13 +257,13 @@ UInt32 pyKeyMap::GetBindingKeyConsole(const char* command)
if ( keymap )
{
plKeyCombo key = keymap->GetKey1();
return (UInt32)(key.fKey);
return (uint32_t)(key.fKey);
}
}
return 0;
}
UInt32 pyKeyMap::GetBindingFlagsConsole(const char* command)
uint32_t pyKeyMap::GetBindingFlagsConsole(const char* command)
{
if( plInputInterfaceMgr::GetInstance() != nil )
{
@ -271,7 +271,7 @@ UInt32 pyKeyMap::GetBindingFlagsConsole(const char* command)
if ( keymap )
{
plKeyCombo key = keymap->GetKey1();
return (UInt32)(key.fFlags);
return (uint32_t)(key.fFlags);
}
}
return 0;

View File

@ -79,25 +79,25 @@ public:
static void AddPlasmaClasses(PyObject *m);
// conversion functions
const char* ConvertVKeyToChar( UInt32 vk, UInt32 flags );
UInt32 ConvertCharToVKey( const char *charVKey );
UInt32 ConvertCharToFlags( const char *charVKey );
const char* ConvertVKeyToChar( uint32_t vk, uint32_t flags );
uint32_t ConvertCharToVKey( const char *charVKey );
uint32_t ConvertCharToFlags( const char *charVKey );
UInt32 ConvertCharToControlCode(const char* charCode);
const char* ConvertControlCodeToString( UInt32 code );
uint32_t ConvertCharToControlCode(const char* charCode);
const char* ConvertControlCodeToString( uint32_t code );
// bind a key to an action
void BindKey( const char* keyStr1, const char* keyStr2, const char* act);
void BindKeyToConsoleCommand( const char* keyStr1, const char* command);
UInt32 GetBindingKey1(UInt32 code);
UInt32 GetBindingFlags1(UInt32 code);
UInt32 GetBindingKey2(UInt32 code);
UInt32 GetBindingFlags2(UInt32 code);
uint32_t GetBindingKey1(uint32_t code);
uint32_t GetBindingFlags1(uint32_t code);
uint32_t GetBindingKey2(uint32_t code);
uint32_t GetBindingFlags2(uint32_t code);
UInt32 GetBindingKeyConsole(const char* command);
UInt32 GetBindingFlagsConsole(const char* command);
uint32_t GetBindingKeyConsole(const char* command);
uint32_t GetBindingFlagsConsole(const char* command);
void WriteKeyMap();

View File

@ -49,14 +49,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pfCharacter/pfMarkerMgr.h"
void pyMarkerMgr::AddMarker(double x, double y, double z, UInt32 id, bool justCreated)
void pyMarkerMgr::AddMarker(double x, double y, double z, uint32_t id, bool justCreated)
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)
mmi->AddMarker(x, y, z, id, justCreated);
}
void pyMarkerMgr::RemoveMarker(UInt32 id)
void pyMarkerMgr::RemoveMarker(uint32_t id)
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)
@ -70,14 +70,14 @@ void pyMarkerMgr::RemoveAllMarkers()
mmi->RemoveAllMarkers();
}
void pyMarkerMgr::SetSelectedMarker(UInt32 markerID)
void pyMarkerMgr::SetSelectedMarker(uint32_t markerID)
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)
mmi->SetSelectedMarker(markerID);
}
UInt32 pyMarkerMgr::GetSelectedMarker()
uint32_t pyMarkerMgr::GetSelectedMarker()
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)
@ -107,14 +107,14 @@ bool pyMarkerMgr::GetMarkersRespawn()
return false;
}
void pyMarkerMgr::CaptureQuestMarker(UInt32 id, bool captured)
void pyMarkerMgr::CaptureQuestMarker(uint32_t id, bool captured)
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)
mmi->CaptureMarker(id, captured);
}
void pyMarkerMgr::CaptureTeamMarker(UInt32 id, int team)
void pyMarkerMgr::CaptureTeamMarker(uint32_t id, int team)
{
pfMarkerMgr* mmi = pfMarkerMgr::Instance();
if (mmi)

View File

@ -68,19 +68,19 @@ public:
static void AddPlasmaClasses(PyObject *m);
static void AddPlasmaConstantsClasses(PyObject *m);
void AddMarker(double x, double y, double z, UInt32 id, bool justCreated);
void RemoveMarker(UInt32 id);
void AddMarker(double x, double y, double z, uint32_t id, bool justCreated);
void RemoveMarker(uint32_t id);
void RemoveAllMarkers();
void SetSelectedMarker(UInt32 markerID);
UInt32 GetSelectedMarker();
void SetSelectedMarker(uint32_t markerID);
uint32_t GetSelectedMarker();
void ClearSelectedMarker();
void SetMarkersRespawn(bool respawn);
bool GetMarkersRespawn();
void CaptureQuestMarker(UInt32 id, bool captured); // for QUEST games (no teams)
void CaptureTeamMarker(UInt32 id, int team); // for TEAM games (0 = not captured)
void CaptureQuestMarker(uint32_t id, bool captured); // for QUEST games (no teams)
void CaptureTeamMarker(uint32_t id, int team); // for TEAM games (0 = not captured)
// Shows your markers locally, so you can see where they are
void ShowMarkersLocal();

View File

@ -60,7 +60,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerMgr, addMarker, args)
{
double x, y, z;
unsigned long id;
byte justCreated;
uint8_t justCreated;
if (!PyArg_ParseTuple(args, "dddlb", &x, &y, &z, &id, &justCreated))
{
PyErr_SetString(PyExc_TypeError, "addMarker expects three doubles, an unsigned long, and a bool");
@ -105,7 +105,7 @@ PYTHON_BASIC_METHOD_DEFINITION(ptMarkerMgr, clearSelectedMarker, ClearSelectedMa
PYTHON_METHOD_DEFINITION(ptMarkerMgr, setMarkersRespawn, args)
{
byte respawn;
uint8_t respawn;
if (!PyArg_ParseTuple(args, "b", &respawn))
{
PyErr_SetString(PyExc_TypeError, "setMarkersRespawn expects a boolean");
@ -123,7 +123,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptMarkerMgr, getMarkersRespawn)
PYTHON_METHOD_DEFINITION(ptMarkerMgr, captureQuestMarker, args)
{
unsigned long id;
byte captured;
uint8_t captured;
if (!PyArg_ParseTuple(args, "lb", &id, &captured))
{
PyErr_SetString(PyExc_TypeError, "captureQuestMarker expects an unsigned long and a bool");

View File

@ -86,17 +86,17 @@ void pyNetLinkingMgr::LinkToMyNeighborhoodAge()
plNetLinkingMgr::GetInstance()->LinkToMyNeighborhoodAge();
}
void pyNetLinkingMgr::LinkPlayerHere( UInt32 playerID )
void pyNetLinkingMgr::LinkPlayerHere( uint32_t playerID )
{
plNetLinkingMgr::GetInstance()->LinkPlayerHere( playerID );
}
void pyNetLinkingMgr::LinkPlayerToAge( pyAgeLinkStruct & link, UInt32 playerID )
void pyNetLinkingMgr::LinkPlayerToAge( pyAgeLinkStruct & link, uint32_t playerID )
{
plNetLinkingMgr::GetInstance()->LinkPlayerToAge( link.GetAgeLink(), playerID );
}
void pyNetLinkingMgr::LinkToPlayersAge( UInt32 playerID )
void pyNetLinkingMgr::LinkToPlayersAge( uint32_t playerID )
{
plNetLinkingMgr::GetInstance()->LinkToPlayersAge( playerID );
}

View File

@ -91,11 +91,11 @@ public:
// Link to my Neighborhood Age
void LinkToMyNeighborhoodAge();
// Link player to my current age
void LinkPlayerHere( UInt32 playerID );
void LinkPlayerHere( uint32_t playerID );
// Link player to specified age
void LinkPlayerToAge( pyAgeLinkStruct & link, UInt32 playerID );
void LinkPlayerToAge( pyAgeLinkStruct & link, uint32_t playerID );
// Link to player's current age
void LinkToPlayersAge( UInt32 playerID );
void LinkToPlayersAge( uint32_t playerID );
PyObject* GetCurrAgeLink(); // returns pyAgeLinkStructRef
PyObject* GetPrevAgeLink(); // returns pyAgeLinkStructRef

View File

@ -79,9 +79,9 @@ public:
plNetServerSessionInfo & ServerInfo() { return fInfo; }
void SetServerName(const char * val) { fInfo.SetServerName( val ); }
void SetServerType(UInt8 val) { fInfo.SetServerType( val ); }
void SetServerType(uint8_t val) { fInfo.SetServerType( val ); }
void SetServerAddr(const char * val) { fInfo.SetServerAddr( val ); }
void SetServerPort(UInt16 val) { fInfo.SetServerPort( val ); }
void SetServerPort(uint16_t val) { fInfo.SetServerPort( val ); }
void SetServerGuid(const char * val) { fServerGuid.FromString( val ); fInfo.SetServerGuid( &fServerGuid ); }
bool HasServerName() const { return fInfo.HasServerName(); }
bool HasServerType() const { return fInfo.HasServerType(); }
@ -89,9 +89,9 @@ public:
bool HasServerPort() const { return fInfo.HasServerPort(); }
bool HasServerGuid() const { return fInfo.HasServerGuid(); }
const char * GetServerName() const { return fInfo.GetServerName(); }
UInt8 GetServerType() const { return fInfo.GetServerType(); }
uint8_t GetServerType() const { return fInfo.GetServerType(); }
const char * GetServerAddr() const { return fInfo.GetServerAddr(); }
UInt16 GetServerPort() const { return fInfo.GetServerPort(); }
uint16_t GetServerPort() const { return fInfo.GetServerPort(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString(); }
};
@ -119,9 +119,9 @@ public:
static void AddPlasmaClasses(PyObject *m);
void SetServerName(const char * val) { fInfo.SetServerName( val ); }
void SetServerType(UInt8 val) { fInfo.SetServerType( val ); }
void SetServerType(uint8_t val) { fInfo.SetServerType( val ); }
void SetServerAddr(const char * val) { fInfo.SetServerAddr( val ); }
void SetServerPort(UInt16 val) { fInfo.SetServerPort( val ); }
void SetServerPort(uint16_t val) { fInfo.SetServerPort( val ); }
void SetServerGuid(const char * val) { fServerGuid.FromString( val ); fInfo.SetServerGuid( &fServerGuid ); }
bool HasServerName() const { return fInfo.HasServerName(); }
bool HasServerType() const { return fInfo.HasServerType(); }
@ -129,9 +129,9 @@ public:
bool HasServerPort() const { return fInfo.HasServerPort(); }
bool HasServerGuid() const { return fInfo.HasServerGuid(); }
const char * GetServerName() const { return fInfo.GetServerName(); }
UInt8 GetServerType() const { return fInfo.GetServerType(); }
uint8_t GetServerType() const { return fInfo.GetServerType(); }
const char * GetServerAddr() const { return fInfo.GetServerAddr(); }
UInt16 GetServerPort() const { return fInfo.GetServerPort(); }
uint16_t GetServerPort() const { return fInfo.GetServerPort(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString(); }
};

View File

@ -117,7 +117,7 @@ void pyNotify::SetActivateState(hsScalar state)
fBuildMsg.SetState(state);
}
void pyNotify::SetType(Int32 type)
void pyNotify::SetType(int32_t type)
{
fBuildMsg.fType = type;
}
@ -141,7 +141,7 @@ void pyNotify::AddPickEvent( hsBool enabled, pyKey* other, pyKey* self, pyPoint3
hitPoint.fPoint );
}
void pyNotify::AddControlKeyEvent( Int32 key, hsBool down )
void pyNotify::AddControlKeyEvent( int32_t key, hsBool down )
{
fBuildMsg.AddControlKeyEvent(key,down);
}
@ -175,12 +175,12 @@ void pyNotify::AddActivateEvent( hsBool active, hsBool activate )
fBuildMsg.AddActivateEvent(activate);
}
void pyNotify::AddCallbackEvent( Int32 event )
void pyNotify::AddCallbackEvent( int32_t event )
{
fBuildMsg.AddCallbackEvent(event);
}
void pyNotify::AddResponderState(Int32 state)
void pyNotify::AddResponderState(int32_t state)
{
fBuildMsg.AddResponderStateEvent(state);
}

View File

@ -93,19 +93,19 @@ public:
virtual void SetNetPropagate(hsBool propagate);
virtual void SetNetForce(hsBool state);
virtual void SetActivateState(hsScalar state);
virtual void SetType(Int32 type);
virtual void SetType(int32_t type);
// add event record helpers
virtual void AddCollisionEvent( hsBool enter, pyKey* other, pyKey* self );
virtual void AddPickEvent(hsBool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint);
virtual void AddControlKeyEvent( Int32 key, hsBool down );
virtual void AddControlKeyEvent( int32_t key, hsBool down );
virtual void AddVarNumber(const char* name, hsScalar number);
virtual void AddVarKey(const char* name, pyKey* key);
virtual void AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, hsScalar dot);
virtual void AddContainerEvent( hsBool entering, pyKey* container, pyKey* contained);
virtual void AddActivateEvent( hsBool active, hsBool activate );
virtual void AddCallbackEvent( Int32 event );
virtual void AddResponderState(Int32 state);
virtual void AddCallbackEvent( int32_t event );
virtual void AddResponderState(int32_t state);
virtual void Send();

View File

@ -51,7 +51,7 @@ pyPlayer::pyPlayer() // only used by python glue, do NOT call
fIsServer = false;
}
pyPlayer::pyPlayer(pyKey& avKey, const char* pname, UInt32 pid, hsScalar distsq)
pyPlayer::pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, hsScalar distsq)
{
fAvatarKey = avKey.getKey();
fPlayerName = pname;
@ -61,7 +61,7 @@ pyPlayer::pyPlayer(pyKey& avKey, const char* pname, UInt32 pid, hsScalar distsq)
fIsServer = false;
}
pyPlayer::pyPlayer(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq)
pyPlayer::pyPlayer(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq)
{
fAvatarKey = avKey;
fPlayerName = pname;
@ -72,7 +72,7 @@ pyPlayer::pyPlayer(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq)
}
// another way to create a player with just a name and number
pyPlayer::pyPlayer(const char* pname, UInt32 pid)
pyPlayer::pyPlayer(const char* pname, uint32_t pid)
{
fAvatarKey = nil;
fPlayerName = pname;
@ -82,7 +82,7 @@ pyPlayer::pyPlayer(const char* pname, UInt32 pid)
fIsServer = false;
}
void pyPlayer::Init(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq) // used by python glue, do NOT call
void pyPlayer::Init(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq) // used by python glue, do NOT call
{
fAvatarKey = avKey;
fPlayerName = pname;

View File

@ -62,24 +62,24 @@ class pyPlayer
protected:
plKey fAvatarKey;
std::string fPlayerName;
UInt32 fPlayerID;
uint32_t fPlayerID;
hsScalar fDistSq; // from local player, temp
hsBool fIsCCR;
hsBool fIsServer;
pyPlayer(); // only used by python glue, do NOT call
pyPlayer(pyKey& avKey, const char* pname, UInt32 pid, hsScalar distsq);
pyPlayer(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq);
pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, hsScalar distsq);
pyPlayer(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq);
// another way to create a player with just a name and number
pyPlayer(const char* pname, UInt32 pid);
pyPlayer(const char* pname, uint32_t pid);
public:
void Init(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq); // used by python glue, do NOT call
void Init(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq); // used by python glue, do NOT call
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptPlayer);
static PyObject *New(pyKey& avKey, const char* pname, UInt32 pid, hsScalar distsq);
static PyObject *New(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq);
static PyObject *New(const char* pname, UInt32 pid);
static PyObject *New(pyKey& avKey, const char* pname, uint32_t pid, hsScalar distsq);
static PyObject *New(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq);
static PyObject *New(const char* pname, uint32_t pid);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyPlayer object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyPlayer); // converts a PyObject to a pyPlayer (throws error if not correct type)
@ -101,7 +101,7 @@ public:
// for python access
const char * GetPlayerName() const { return fPlayerName.c_str();}
UInt32 GetPlayerID() const
uint32_t GetPlayerID() const
{
return fPlayerID;
}

View File

@ -52,11 +52,11 @@ PYTHON_DEFAULT_DEALLOC_DEFINITION(ptPlayer)
PYTHON_INIT_DEFINITION(ptPlayer, args, keywords)
{
// we have two sets of arguments we can use, hence the generic PyObject* pointers
// argument set 1: pyKey, string, UInt32, hsScalar
// argument set 2: string, UInt32
// argument set 1: pyKey, string, uint32_t, hsScalar
// argument set 2: string, uint32_t
PyObject* firstObj = NULL; // can be a pyKey or a string
PyObject* secondObj = NULL; // can be a string or a UInt32
PyObject* thirdObj = NULL; // UInt32
PyObject* secondObj = NULL; // can be a string or a uint32_t
PyObject* thirdObj = NULL; // uint32_t
PyObject* fourthObj = NULL; // hsScalar
if (!PyArg_ParseTuple(args, "OO|OO", &firstObj, &secondObj, &thirdObj, &fourthObj))
{
@ -193,21 +193,21 @@ PYTHON_END_METHODS_TABLE;
PLASMA_CUSTOM_TYPE(ptPlayer, "Params: avkey,name,playerID,distanceSq\nAnd optionally __init__(name,playerID)");
// required functions for PyObject interoperability
PyObject *pyPlayer::New(pyKey& avKey, const char* pname, UInt32 pid, hsScalar distsq)
PyObject *pyPlayer::New(pyKey& avKey, const char* pname, uint32_t pid, hsScalar distsq)
{
ptPlayer *newObj = (ptPlayer*)ptPlayer_type.tp_new(&ptPlayer_type, NULL, NULL);
newObj->fThis->Init(avKey.getKey(), pname, pid, distsq);
return (PyObject*)newObj;
}
PyObject *pyPlayer::New(plKey avKey, const char* pname, UInt32 pid, hsScalar distsq)
PyObject *pyPlayer::New(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq)
{
ptPlayer *newObj = (ptPlayer*)ptPlayer_type.tp_new(&ptPlayer_type, NULL, NULL);
newObj->fThis->Init(avKey, pname, pid, distsq);
return (PyObject*)newObj;
}
PyObject *pyPlayer::New(const char* pname, UInt32 pid)
PyObject *pyPlayer::New(const char* pname, uint32_t pid)
{
ptPlayer *newObj = (ptPlayer*)ptPlayer_type.tp_new(&ptPlayer_type, NULL, NULL);
newObj->fThis->Init(nil, pname, pid, -1);

View File

@ -125,7 +125,7 @@ plSimpleStateVariable * pySimpleStateVariable::GetVar() const
return fVar;
}
bool pySimpleStateVariable::SetByte( byte v, int idx )
bool pySimpleStateVariable::SetByte( uint8_t v, int idx )
{
if ( !fVar )
return false;
@ -174,9 +174,9 @@ bool pySimpleStateVariable::SetBool( bool v, int idx )
return fVar->Set( v, idx );
}
byte pySimpleStateVariable::GetByte( int idx ) const
uint8_t pySimpleStateVariable::GetByte( int idx ) const
{
byte v = 0;
uint8_t v = 0;
if ( fVar )
fVar->Get( &v, idx );
return v;

View File

@ -98,7 +98,6 @@ public:
void SetFromDefaults(bool timeStampNow);
};
typedef unsigned char byte;
// pySimpleStateVariable
class pySimpleStateVariable
{
@ -123,14 +122,14 @@ public:
plSimpleStateVariable * GetVar() const;
/////////////////////
bool SetByte( byte v, int idx=0 );
bool SetByte( uint8_t v, int idx=0 );
bool SetShort( short v, int idx=0 );
bool SetFloat( float v, int idx=0 );
bool SetDouble( double v, int idx=0 );
bool SetInt( int v, int idx=0 );
bool SetString( const char * v, int idx=0 );
bool SetBool(bool v, int idx=0 );
byte GetByte( int idx=0 ) const;
uint8_t GetByte( int idx=0 ) const;
short GetShort( int idx=0 ) const;
int GetInt( int idx=0 ) const;
float GetFloat( int idx=0 ) const;

View File

@ -197,7 +197,7 @@ PYTHON_METHOD_DEFINITION(ptSimpleStateVariable, funcName, args) \
return pythonReturnFunc(self->fThis->cFuncName(idx)); \
}
STATEVAR_SET(setByte, SetByte, byte, char, b)
STATEVAR_SET(setByte, SetByte, uint8_t, uint8_t, b)
STATEVAR_SET(setShort, SetShort, short, short, h)
STATEVAR_SET(setFloat, SetFloat, float, float, f)
STATEVAR_SET(setDouble, SetDouble, double, double, d)

View File

@ -841,7 +841,7 @@ void pySceneObject::Animate()
}
}
Int8 pySceneObject::GetResponderState()
int8_t pySceneObject::GetResponderState()
{
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )

View File

@ -184,7 +184,7 @@ public:
void Animate();
// return responder state (if responder modifier found)
Int8 GetResponderState();
int8_t GetResponderState();
// some animation commands for s.o.'s w/ multiple animations attached

View File

@ -62,14 +62,14 @@ pyStatusLog::~pyStatusLog()
}
hsBool pyStatusLog::Open(const char* logName, UInt32 numLines, UInt32 flags)
hsBool pyStatusLog::Open(const char* logName, uint32_t numLines, uint32_t flags)
{
// make sure its closed first
Close();
// create a status log guy for this
fICreatedLog = true;
fLog = plStatusLogMgr::GetInstance().CreateStatusLog( (UInt8)numLines, logName, flags );
fLog = plStatusLogMgr::GetInstance().CreateStatusLog( (uint8_t)numLines, logName, flags );
if (fLog)
{
fLog->SetForceLog(true);
@ -93,10 +93,10 @@ hsBool pyStatusLog::WriteColor(const char* text, pyColor& color)
{
if (fLog)
{
UInt32 st_color = ((UInt32)(color.getAlpha()*255)<<24) +
((UInt32)(color.getRed()*255)<<16) +
((UInt32)(color.getGreen()*255)<<8) +
((UInt32)(color.getBlue()*255));
uint32_t st_color = ((uint32_t)(color.getAlpha()*255)<<24) +
((uint32_t)(color.getRed()*255)<<16) +
((uint32_t)(color.getGreen()*255)<<8) +
((uint32_t)(color.getBlue()*255));
fLog->AddLine( text, st_color );
return true;
}

View File

@ -80,7 +80,7 @@ public:
static void AddPlasmaClasses(PyObject *m);
static void AddPlasmaConstantsClasses(PyObject *m);
virtual hsBool Open(const char* logName, UInt32 numLines, UInt32 flags);
virtual hsBool Open(const char* logName, uint32_t numLines, uint32_t flags);
virtual hsBool Write(const char* text);
virtual hsBool WriteColor(const char* text, pyColor& color);
virtual void Close();

View File

@ -60,7 +60,7 @@ pyStream::~pyStream()
}
hsBool pyStream::Open(const wchar* fileName, const wchar* flags)
hsBool pyStream::Open(const wchar_t* fileName, const wchar_t* flags)
{
// make sure its closed first
Close();

View File

@ -76,7 +76,7 @@ public:
static void AddPlasmaClasses(PyObject *m);
virtual hsBool Open(const wchar* fileName, const wchar* flags);
virtual hsBool Open(const wchar_t* fileName, const wchar_t* flags);
virtual std::vector<std::string> ReadLines();
virtual hsBool WriteLines(const std::vector<std::string> & lines);
virtual void Close();

View File

@ -201,9 +201,9 @@ PyObject* pyVault::GetAgeJournalsFolder( void )
// ...such as how many pictures, notes and markers they have
PyObject* pyVault::GetKIUsage(void)
{
UInt32 pictures = 0;
UInt32 notes = 0;
UInt32 markerGames = 0;
uint32_t pictures = 0;
uint32_t notes = 0;
uint32_t markerGames = 0;
for (;;) {
RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef();
@ -346,7 +346,7 @@ PyObject* pyVault::GetVisitAgeLink( const pyAgeInfoStruct & info)
// Chronicle
PyObject* pyVault::FindChronicleEntry( const char * entryName )
{
wchar wEntryName[kMaxVaultNodeStringLength];
wchar_t wEntryName[kMaxVaultNodeStringLength];
StrToUnicode(wEntryName, entryName, arrsize(wEntryName));
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wEntryName)) {
@ -359,10 +359,10 @@ PyObject* pyVault::FindChronicleEntry( const char * entryName )
PYTHON_RETURN_NONE;
}
void pyVault::AddChronicleEntry( const char * name, UInt32 type, const char * value )
void pyVault::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);
// FIXME: We should ideally not block, but for now, the Python assumes that when
// we return, the chronicle exists and can be found with findChronicleEntry.
@ -379,7 +379,7 @@ void pyVault::SendToDevice( pyVaultNode& node, const char * deviceName )
if (!node.GetNode())
return;
wchar wDevName[256];
wchar_t wDevName[256];
StrToUnicode(wDevName, deviceName, arrsize(wDevName));
// Note: This actually blocks (~Hoikas)
@ -437,7 +437,7 @@ PyObject* pyVault::GetPsnlAgeSDL() const
templateNode->fieldFlags = 0;
templateNode->SetNodeType(plVault::kNodeType_AgeInfo);
VaultAgeInfoNode ageInfo(templateNode);
wchar str[MAX_PATH];
wchar_t str[MAX_PATH];
StrToUnicode(str, kPersonalAgeFilename, arrsize(str));
ageInfo.SetAgeFilename(str);
@ -482,7 +482,7 @@ void pyVault::UpdatePsnlAgeSDL( pySDLStateDataRecord & pyrec )
templateNode->fieldFlags = 0;
templateNode->SetNodeType(plVault::kNodeType_AgeInfo);
VaultAgeInfoNode ageInfo(templateNode);
wchar str[MAX_PATH];
wchar_t str[MAX_PATH];
StrToUnicode(str, kPersonalAgeFilename, arrsize(str));
ageInfo.SetAgeFilename(str);
@ -544,8 +544,8 @@ bool pyVault::AmAgeCzar( const pyAgeInfoStruct * ageInfo )
void pyVault::RegisterMTStation( const char * stationName, const char * backLinkSpawnPtObjName )
{
wchar wStationName[256];
wchar wSpawnPt[256];
wchar_t wStationName[256];
wchar_t wSpawnPt[256];
StrToUnicode(wStationName, stationName, arrsize(wStationName));
StrToUnicode(wSpawnPt, backLinkSpawnPtObjName, arrsize(wSpawnPt));
@ -583,10 +583,10 @@ void pyVault::UnRegisterVisitAge( const char * guidstr )
void _InvitePlayerToAge(ENetError result, void* state, void* param, RelVaultNode* node)
{
if (result == kNetSuccess)
VaultSendNode(node, (UInt32)param);
VaultSendNode(node, (uint32_t)param);
}
void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, UInt32 playerID )
void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, uint32_t playerID )
{
NetVaultNode * templateNode = NEWZERO(NetVaultNode);
templateNode->IncRef();
@ -602,10 +602,10 @@ void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, UInt32 playerID )
void _UninvitePlayerToAge(ENetError result, void* state, void* param, RelVaultNode* node)
{
if (result == kNetSuccess)
VaultSendNode(node, (UInt32)param);
VaultSendNode(node, (uint32_t)param);
}
void pyVault::UnInvitePlayerToAge( const char * str, UInt32 playerID )
void pyVault::UnInvitePlayerToAge( const char * str, uint32_t playerID )
{
plAgeInfoStruct info;
info.SetAgeInstanceGuid(&plUUID(str));
@ -631,7 +631,7 @@ void pyVault::UnInvitePlayerToAge( const char * str, UInt32 playerID )
}
//============================================================================
void pyVault::OfferLinkToPlayer( const pyAgeLinkStruct & link, UInt32 playerID )
void pyVault::OfferLinkToPlayer( const pyAgeLinkStruct & link, uint32_t playerID )
{
hsAssert(false, "eric, port me");
}

View File

@ -130,7 +130,7 @@ public:
///////////////
// 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 );
///////////////
// publishing
void SendToDevice( pyVaultNode& node, const char * deviceName );
@ -165,10 +165,10 @@ public:
///////////////
// Invite player to visit an age.
void InvitePlayerToAge( const pyAgeLinkStruct & link, UInt32 playerID );
void UnInvitePlayerToAge( const char * guid, UInt32 playerID );
void InvitePlayerToAge( const pyAgeLinkStruct & link, uint32_t playerID );
void UnInvitePlayerToAge( const char * guid, uint32_t playerID );
// Offer link to player
void OfferLinkToPlayer( const pyAgeLinkStruct & link, UInt32 playerID );
void OfferLinkToPlayer( const pyAgeLinkStruct & link, uint32_t playerID );
///////////////
// Creates neighborhood and joins the player to it as the mayor/czar.

View File

@ -67,7 +67,7 @@ pyVaultAgeInfoListNode::pyVaultAgeInfoListNode(int n)
//==================================================================
// class RelVaultNode : public plVaultFolderNode
//
hsBool pyVaultAgeInfoListNode::HasAge(UInt32 ageID)
hsBool pyVaultAgeInfoListNode::HasAge(uint32_t ageID)
{
if (!fNode)
return false;
@ -76,7 +76,7 @@ hsBool pyVaultAgeInfoListNode::HasAge(UInt32 ageID)
return false;
}
hsBool pyVaultAgeInfoListNode::AddAge( UInt32 ageID )
hsBool pyVaultAgeInfoListNode::AddAge( uint32_t ageID )
{
if (!fNode)
return false;
@ -85,7 +85,7 @@ hsBool pyVaultAgeInfoListNode::AddAge( UInt32 ageID )
return false;
}
void pyVaultAgeInfoListNode::RemoveAge( UInt32 ageID )
void pyVaultAgeInfoListNode::RemoveAge( uint32_t ageID )
{
if (!fNode)
return;

View File

@ -81,9 +81,9 @@ public:
//==================================================================
// class RelVaultNode : public plVaultFolderNode
//
hsBool HasAge( UInt32 ageID );
hsBool AddAge( UInt32 ageID );
void RemoveAge( UInt32 ageID );
hsBool HasAge( uint32_t ageID );
hsBool AddAge( uint32_t ageID );
void RemoveAge( uint32_t ageID );
};
#endif // _pyVaultAgeInfoListNode_h_

View File

@ -257,7 +257,7 @@ void pyVaultAgeInfoNode::SetAgeDescription( const char * v )
{
}
Int32 pyVaultAgeInfoNode::GetSequenceNumber() const
int32_t pyVaultAgeInfoNode::GetSequenceNumber() const
{
if (!fNode)
return -1;
@ -266,11 +266,11 @@ Int32 pyVaultAgeInfoNode::GetSequenceNumber() const
return access.ageSequenceNumber;
}
void pyVaultAgeInfoNode::SetSequenceNumber( Int32 v )
void pyVaultAgeInfoNode::SetSequenceNumber( int32_t v )
{
}
Int32 pyVaultAgeInfoNode::GetAgeLanguage() const
int32_t pyVaultAgeInfoNode::GetAgeLanguage() const
{
if (!fNode)
return -1;
@ -279,20 +279,20 @@ Int32 pyVaultAgeInfoNode::GetAgeLanguage() const
return access.ageLanguage;
}
void pyVaultAgeInfoNode::SetAgeLanguage( Int32 v )
void pyVaultAgeInfoNode::SetAgeLanguage( int32_t v )
{
}
UInt32 pyVaultAgeInfoNode::GetAgeID() const
uint32_t pyVaultAgeInfoNode::GetAgeID() const
{
return 0;
}
void pyVaultAgeInfoNode::SetAgeID( UInt32 v )
void pyVaultAgeInfoNode::SetAgeID( uint32_t v )
{
}
UInt32 pyVaultAgeInfoNode::GetCzarID() const
uint32_t pyVaultAgeInfoNode::GetCzarID() const
{
hsAssert(false, "eric, port me");
return 0;

View File

@ -114,16 +114,16 @@ public:
const char * GetAgeDescription() const;
void SetAgeDescription( const char * v );
Int32 GetSequenceNumber() const;
void SetSequenceNumber( Int32 v );
int32_t GetSequenceNumber() const;
void SetSequenceNumber( int32_t v );
Int32 GetAgeLanguage() const;
void SetAgeLanguage( Int32 v );
int32_t GetAgeLanguage() const;
void SetAgeLanguage( int32_t v );
UInt32 GetAgeID() const;
void SetAgeID( UInt32 v );
uint32_t GetAgeID() const;
void SetAgeID( uint32_t v );
UInt32 GetCzarID() const;
uint32_t GetCzarID() const;
bool IsPublic() const;

View File

@ -83,7 +83,7 @@ void pyVaultChronicleNode::Chronicle_SetName( const char * text )
if (!fNode)
return;
wchar * wStr = StrDupToUnicode(text);
wchar_t * wStr = StrDupToUnicode(text);
VaultChronicleNode chron(fNode);
chron.SetEntryName(wStr);
FREE(wStr);
@ -106,7 +106,7 @@ void pyVaultChronicleNode::Chronicle_SetValue( const char * text )
if (!fNode)
return;
wchar * wStr = StrDupToUnicode(text);
wchar_t * wStr = StrDupToUnicode(text);
VaultChronicleNode chron(fNode);
chron.SetEntryValue(wStr);
FREE(wStr);
@ -129,7 +129,7 @@ const char * pyVaultChronicleNode::Chronicle_GetValue( void )
return ansiValue;
}
void pyVaultChronicleNode::Chronicle_SetType( UInt32 type )
void pyVaultChronicleNode::Chronicle_SetType( uint32_t type )
{
if (!fNode)
return;
@ -138,7 +138,7 @@ void pyVaultChronicleNode::Chronicle_SetType( UInt32 type )
chron.SetEntryType(type);
}
UInt32 pyVaultChronicleNode::Chronicle_GetType( void )
uint32_t pyVaultChronicleNode::Chronicle_GetType( void )
{
if (!fNode)
return 0;

View File

@ -90,8 +90,8 @@ public:
const char * Chronicle_GetName( void );
void Chronicle_SetValue( const char * text );
const char * Chronicle_GetValue( void );
void Chronicle_SetType( UInt32 type );
UInt32 Chronicle_GetType( void );
void Chronicle_SetType( uint32_t type );
uint32_t Chronicle_GetType( void );
};
#endif // _pyVaultChronicleNode_h_

View File

@ -114,7 +114,7 @@ void pyVaultImageNode::Image_SetTitle( const char * text )
if (!fNode)
return;
wchar * wStr = hsStringToWString(text);
wchar_t * wStr = hsStringToWString(text);
VaultImageNode image(fNode);
image.SetImageTitle(wStr);
@ -210,7 +210,7 @@ void pyVaultImageNode::SetImageFromBuf( PyObject * pybuf )
fMipmap = nil;
}
byte * buffer = nil;
uint8_t * buffer = nil;
int bytes;
PyObject_AsReadBuffer(pybuf, (const void **)&buffer, &bytes);
if (buffer) {

View File

@ -83,7 +83,7 @@ void pyVaultMarkerGameNode::SetGameName (const char v[])
{
if (fNode) {
VaultMarkerGameNode access(fNode);
wchar unicode[kMaxVaultNodeStringLength];
wchar_t unicode[kMaxVaultNodeStringLength];
StrToUnicode(unicode, v, arrsize(unicode));
access.SetGameName(unicode);
}

View File

@ -84,7 +84,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
static void __cdecl LogDumpProc (
void * ,
const wchar fmt[],
const wchar_t fmt[],
...
) {
va_list args;
@ -106,7 +106,7 @@ pyVaultNode::pyVaultNodeOperationCallback::~pyVaultNodeOperationCallback()
Py_XDECREF( fCbObject );
}
void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationStarted( UInt32 context )
void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationStarted( uint32_t context )
{
fContext = context;
if ( fCbObject )
@ -129,7 +129,7 @@ void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationStarted( UInt32 co
}
void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationComplete( UInt32 context, int resultCode )
void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationComplete( uint32_t context, int resultCode )
{
if ( fCbObject )
{
@ -217,21 +217,21 @@ bool pyVaultNode::operator==(const pyVaultNode &vaultNode) const
}
// public getters
UInt32 pyVaultNode::GetID( void )
uint32_t pyVaultNode::GetID( void )
{
if (fNode)
return fNode->nodeId;
return 0;
}
UInt32 pyVaultNode::GetType( void )
uint32_t pyVaultNode::GetType( void )
{
if (fNode)
return fNode->nodeType;
return 0;
}
UInt32 pyVaultNode::GetOwnerNodeID( void )
uint32_t pyVaultNode::GetOwnerNodeID( void )
{
hsAssert(false, "eric, port?");
// if (fNode)
@ -254,14 +254,14 @@ PyObject* pyVaultNode::GetOwnerNode( void )
PYTHON_RETURN_NONE;
}
UInt32 pyVaultNode::GetModifyTime( void )
uint32_t pyVaultNode::GetModifyTime( void )
{
if (fNode)
return fNode->modifyTime;
return 0;
}
UInt32 pyVaultNode::GetCreatorNodeID( void )
uint32_t pyVaultNode::GetCreatorNodeID( void )
{
if (fNode)
return fNode->creatorId;
@ -293,14 +293,14 @@ PyObject* pyVaultNode::GetCreatorNode( void )
PYTHON_RETURN_NONE;
}
UInt32 pyVaultNode::GetCreateTime( void )
uint32_t pyVaultNode::GetCreateTime( void )
{
if (fNode)
return fNode->createTime;
return 0;
}
UInt32 pyVaultNode::GetCreateAgeTime( void )
uint32_t pyVaultNode::GetCreateAgeTime( void )
{
hsAssert(false, "eric, port?");
@ -349,7 +349,7 @@ PyObject* pyVaultNode::GetCreateAgeCoords () {
return pyDniCoordinates::New(nil);
}
void pyVaultNode::SetID( UInt32 v )
void pyVaultNode::SetID( uint32_t v )
{
hsAssert(false, "Why are you changing the node id?");
}
@ -365,12 +365,12 @@ void pyVaultNode::SetType( int v )
fNode->SetNodeType(v);
}
void pyVaultNode::SetOwnerNodeID( UInt32 v )
void pyVaultNode::SetOwnerNodeID( uint32_t v )
{
hsAssert(false, "eric, implement me.");
}
void pyVaultNode::SetCreatorNodeID( UInt32 v )
void pyVaultNode::SetCreatorNodeID( uint32_t v )
{
ASSERT(fNode);
if (fNode->nodeId) {
@ -387,7 +387,7 @@ void pyVaultNode::SetCreateAgeName( const char * v )
fCreateAgeName = nil;
ASSERT(fNode);
wchar str[MAX_PATH];
wchar_t str[MAX_PATH];
StrToUnicode(str, v, arrsize(str));
fNode->SetCreateAgeName(str);
}
@ -416,7 +416,7 @@ void _AddNodeCallback(ENetError result, void* param) {
cb->VaultOperationComplete(hsFail);
}
PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, UInt32 cbContext)
PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, uint32_t cbContext)
{
pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)(cbObject);
@ -473,7 +473,7 @@ PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, UInt32 c
}
// Link a node to this one
void pyVaultNode::LinkToNode(int nodeID, PyObject* cbObject, UInt32 cbContext)
void pyVaultNode::LinkToNode(int nodeID, PyObject* cbObject, uint32_t cbContext)
{
pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)( cbObject );
@ -504,7 +504,7 @@ void pyVaultNode::LinkToNode(int nodeID, PyObject* cbObject, UInt32 cbContext)
}
// Remove child node
hsBool pyVaultNode::RemoveNode( pyVaultNode& pynode, PyObject* cbObject, UInt32 cbContext )
hsBool pyVaultNode::RemoveNode( pyVaultNode& pynode, PyObject* cbObject, uint32_t cbContext )
{
pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)( cbObject );
@ -543,7 +543,7 @@ void pyVaultNode::RemoveAllNodes( void )
}
// Add/Save this node to vault
void pyVaultNode::Save(PyObject* cbObject, UInt32 cbContext)
void pyVaultNode::Save(PyObject* cbObject, uint32_t cbContext)
{
// If the node doesn't have an id, then use it as a template to create the node in the vault,
// otherwise just ignore the save request since vault nodes are now auto-saved.
@ -561,7 +561,7 @@ void pyVaultNode::Save(PyObject* cbObject, UInt32 cbContext)
}
// Save this node and all child nodes that need saving.
void pyVaultNode::SaveAll(PyObject* cbObject, UInt32 cbContext)
void pyVaultNode::SaveAll(PyObject* cbObject, uint32_t cbContext)
{
// Nodes are now auto-saved
pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)( cbObject );
@ -583,7 +583,7 @@ void pyVaultNode::ForceSave()
}
// Send this node to the destination client node. will be received in it's inbox folder.
void pyVaultNode::SendTo(UInt32 destClientNodeID, PyObject* cbObject, UInt32 cbContext )
void pyVaultNode::SendTo(uint32_t destClientNodeID, PyObject* cbObject, uint32_t cbContext )
{
pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)( cbObject );
@ -651,21 +651,21 @@ int pyVaultNode::GetChildNodeCount()
}
// Get the client ID from my Vault client.
UInt32 pyVaultNode::GetClientID()
uint32_t pyVaultNode::GetClientID()
{
hsAssert(false, "eric, port me");
return 0;
}
bool pyVaultNode::HasNode( UInt32 nodeID )
bool pyVaultNode::HasNode( uint32_t nodeID )
{
if ( fNode )
return fNode->IsParentOf( nodeID, 1 );
return false;
}
PyObject * pyVaultNode::GetNode2( UInt32 nodeID ) const
PyObject * pyVaultNode::GetNode2( uint32_t nodeID ) const
{
PyObject * result = nil;
if ( fNode )

View File

@ -85,13 +85,13 @@ public:
PyObject * fCbObject;
RelVaultNode * fNode;
PyObject * fPyNodeRef;
UInt32 fContext;
uint32_t fContext;
pyVaultNodeOperationCallback(PyObject * cbObject);
~pyVaultNodeOperationCallback();
void VaultOperationStarted(UInt32 context);
void VaultOperationComplete(UInt32 context, int resultCode);
void VaultOperationStarted(uint32_t context);
void VaultOperationComplete(uint32_t context, int resultCode);
void VaultOperationComplete(int resultCode) { VaultOperationComplete(fContext, resultCode); }
void SetNode (RelVaultNode * rvn);
@ -127,27 +127,27 @@ public:
bool operator!=(const pyVaultNode &vaultNode) const { return !(vaultNode == *this); }
// public getters
UInt32 GetID( void );
virtual UInt32 GetType( void );
UInt32 GetPermissions( void );
UInt32 GetOwnerNodeID( void );
uint32_t GetID( void );
virtual uint32_t GetType( void );
uint32_t GetPermissions( void );
uint32_t GetOwnerNodeID( void );
PyObject* GetOwnerNode( void ); // returns pyVaultPlayerInfoNode
UInt32 GetGroupNodeID( void );
uint32_t GetGroupNodeID( void );
PyObject* GetGroupNode( void ); // returns pyVaultNode
UInt32 GetModifyTime( void );
UInt32 GetCreatorNodeID( void );
uint32_t GetModifyTime( void );
uint32_t GetCreatorNodeID( void );
PyObject* GetCreatorNode( void ); // returns pyVaultPlayerInfoNode
UInt32 GetCreateTime( void );
UInt32 GetCreateAgeTime( void );
uint32_t GetCreateTime( void );
uint32_t GetCreateAgeTime( void );
const char * GetCreateAgeName( void );
const char * GetCreateAgeGuid( void );
PyObject* GetCreateAgeCoords ();
// public setters
void SetID( UInt32 v );
void SetID( uint32_t v );
void SetType( int v );
void SetOwnerNodeID( UInt32 v );
void SetCreatorNodeID( UInt32 v );
void SetOwnerNodeID( uint32_t v );
void SetCreatorNodeID( uint32_t v );
void SetCreateAgeName( const char * v );
void SetCreateAgeGuid( const char * v );
@ -156,28 +156,28 @@ public:
// Vault Node API
// Add child node
PyObject* AddNode(pyVaultNode* pynode, PyObject* cbObject=nil, UInt32 cbContext=0 );
PyObject* AddNode(pyVaultNode* pynode, PyObject* cbObject=nil, uint32_t cbContext=0 );
// Link node to this one
void LinkToNode(int nodeID, PyObject* cbObject=nil, UInt32 cbContext=0 );
void LinkToNode(int nodeID, PyObject* cbObject=nil, uint32_t cbContext=0 );
// Remove child node
hsBool RemoveNode( pyVaultNode& pynode, PyObject* cbObject=nil, UInt32 cbContext=0 );
hsBool RemoveNode( pyVaultNode& pynode, PyObject* cbObject=nil, uint32_t cbContext=0 );
// Remove all child nodes
void RemoveAllNodes( void );
// Add/Save this node to vault
void Save( PyObject* cbObject=nil, UInt32 cbContext=0 );
void Save( PyObject* cbObject=nil, uint32_t cbContext=0 );
// Save this node and all child nodes that need saving.
// NOTE: Currently, the cb object is called back for
// each node saved.
void SaveAll( PyObject* cbObject=nil, UInt32 cbContext=0 );
void SaveAll( PyObject* cbObject=nil, uint32_t cbContext=0 );
// Force a save on this node because currently Save doesn't do anything because dirty
// nodes are periodically saved automatically - call this to force a save immediately
void ForceSave();
// Send this node to the destination client node. will be received in it's inbox folder.
void SendTo(UInt32 destClientNodeID, PyObject* cbObject=nil, UInt32 cbContext=0 );
void SendTo(uint32_t destClientNodeID, PyObject* cbObject=nil, uint32_t cbContext=0 );
// Returns true if is a child node of ours.
bool HasNode( UInt32 nodeID );
bool HasNode( uint32_t nodeID );
// Returns a ptVaultNodeRef or nil
PyObject* GetNode2( UInt32 nodeID ) const; // returns pyVaultNodeRef, for legacy compatibility
PyObject* GetNode2( uint32_t nodeID ) const; // returns pyVaultNodeRef, for legacy compatibility
// Get child node matching template node
PyObject* FindNode( pyVaultNode * templateNode ); // returns pyVaultNode
@ -188,7 +188,7 @@ public:
virtual int GetChildNodeCount();
// Get the client ID from my Vault client.
UInt32 GetClientID( void );
uint32_t GetClientID( void );
// all the upcasting stuff...
PyObject* UpcastToFolderNode(); // returns pyVaultFolderNode

View File

@ -73,7 +73,7 @@ pyVaultPlayerInfoListNode::pyVaultPlayerInfoListNode(int n)
//==================================================================
// class RelVaultNode : public plVaultFolderNode
//
hsBool pyVaultPlayerInfoListNode::HasPlayer( UInt32 playerID )
hsBool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID )
{
if (!fNode)
return false;
@ -92,7 +92,7 @@ hsBool pyVaultPlayerInfoListNode::HasPlayer( UInt32 playerID )
return (rvn != nil);
}
hsBool pyVaultPlayerInfoListNode::AddPlayer( UInt32 playerID )
hsBool pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
{
if (HasPlayer(playerID))
return true;
@ -119,7 +119,7 @@ hsBool pyVaultPlayerInfoListNode::AddPlayer( UInt32 playerID )
return nodeIds.Count() != 0;
}
void pyVaultPlayerInfoListNode::RemovePlayer( UInt32 playerID )
void pyVaultPlayerInfoListNode::RemovePlayer( uint32_t playerID )
{
if (!fNode)
return;
@ -138,7 +138,7 @@ void pyVaultPlayerInfoListNode::RemovePlayer( UInt32 playerID )
templateNode->DecRef();
}
PyObject * pyVaultPlayerInfoListNode::GetPlayer( UInt32 playerID )
PyObject * pyVaultPlayerInfoListNode::GetPlayer( uint32_t playerID )
{
if (!fNode)
PYTHON_RETURN_NONE;

View File

@ -82,10 +82,10 @@ public:
//==================================================================
// class RelVaultNode : public plVaultFolderNode
//
virtual hsBool HasPlayer( UInt32 playerID );
hsBool AddPlayer( UInt32 playerID );
void RemovePlayer( UInt32 playerID );
PyObject * GetPlayer( UInt32 playerID ); // returns pyVaultPlayerInfoNode
virtual hsBool HasPlayer( uint32_t playerID );
hsBool AddPlayer( uint32_t playerID );
void RemovePlayer( uint32_t playerID );
PyObject * GetPlayer( uint32_t playerID ); // returns pyVaultPlayerInfoNode
void Sort();

View File

@ -77,7 +77,7 @@ pyVaultPlayerInfoNode::~pyVaultPlayerInfoNode () {
//==================================================================
// class RelVaultNode : public plVaultNode
//
void pyVaultPlayerInfoNode::Player_SetPlayerID( UInt32 plyrid )
void pyVaultPlayerInfoNode::Player_SetPlayerID( uint32_t plyrid )
{
if (!fNode)
return;
@ -86,7 +86,7 @@ void pyVaultPlayerInfoNode::Player_SetPlayerID( UInt32 plyrid )
playerInfo.SetPlayerId(plyrid);
}
UInt32 pyVaultPlayerInfoNode::Player_GetPlayerID( void )
uint32_t pyVaultPlayerInfoNode::Player_GetPlayerID( void )
{
if (!fNode)
return 0;
@ -100,7 +100,7 @@ void pyVaultPlayerInfoNode::Player_SetPlayerName( const char * name )
if (!fNode)
return;
wchar * wStr = StrDupToUnicode(name);
wchar_t * wStr = StrDupToUnicode(name);
VaultPlayerInfoNode playerInfo(fNode);
playerInfo.SetPlayerName(wStr);
FREE(wStr);
@ -126,7 +126,7 @@ void pyVaultPlayerInfoNode::Player_SetAgeInstanceName( const char * agename )
if (!fNode)
return;
wchar * wStr = StrDupToUnicode(agename);
wchar_t * wStr = StrDupToUnicode(agename);
VaultPlayerInfoNode playerInfo(fNode);
playerInfo.SetAgeInstName(wStr);
FREE(wStr);

View File

@ -80,8 +80,8 @@ public:
//==================================================================
// class plVaultPlayerInfoNode : public plVaultNode
//
void Player_SetPlayerID( UInt32 plyrid );
UInt32 Player_GetPlayerID( void );
void Player_SetPlayerID( uint32_t plyrid );
uint32_t Player_GetPlayerID( void );
void Player_SetPlayerName( const char * name );
const char * Player_GetPlayerName( void );

View File

@ -244,7 +244,7 @@ void pyVaultPlayerNode::RemoveVisitAgeLink(const char *guidstr)
PyObject *pyVaultPlayerNode::FindChronicleEntry(const char *entryName)
{
wchar wStr[MAX_PATH];
wchar_t wStr[MAX_PATH];
StrToUnicode(wStr, entryName, arrsize(wStr));
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wStr)) {
PyObject * result = pyVaultChronicleNode::New(rvn);
@ -301,12 +301,12 @@ bool pyVaultPlayerNode::IsDisabled()
return player.disabled;
}
void pyVaultPlayerNode::SetOnlineTime(UInt32 value)
void pyVaultPlayerNode::SetOnlineTime(uint32_t value)
{
hsAssert(false, "python may not change a player's online time this way");
}
UInt32 pyVaultPlayerNode::GetOnlineTime()
uint32_t pyVaultPlayerNode::GetOnlineTime()
{
if (!fNode)
return 0;

View File

@ -114,8 +114,8 @@ public:
void SetDisabled(bool value);
bool IsDisabled();
void SetOnlineTime(UInt32 value);
UInt32 GetOnlineTime();
void SetOnlineTime(uint32_t value);
uint32_t GetOnlineTime();
void SetExplorer (bool b);
hsBool IsExplorer ();

Some files were not shown because too many files have changed in this diff Show More