1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

proVariableEventData name => plString

This commit is contained in:
2014-01-09 21:40:38 -08:00
parent 5b6b886b55
commit ec70590c5b
3 changed files with 19 additions and 21 deletions

View File

@ -589,11 +589,11 @@ void plNotifyMsg::AddControlKeyEvent( int32_t key, bool down )
//
// PURPOSE : Add a variable event record to this notify message
//
void plNotifyMsg::AddVariableEvent( const char* name, float number )
void plNotifyMsg::AddVariableEvent(const plString& name, float number)
{
// create the control key event record
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
pED->fName = name;
pED->fDataType = proEventData::kFloat;
pED->fNumber.f = number;
fEvents.Append(pED); // then add it to the list of event records
@ -607,11 +607,11 @@ void plNotifyMsg::AddVariableEvent( const char* name, float number )
//
// PURPOSE : Add a variable event record to this notify message
//
void plNotifyMsg::AddVariableEvent( const char* name, int32_t number )
void plNotifyMsg::AddVariableEvent(const plString& name, int32_t number)
{
// create the control key event record
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
pED->fName = name;
pED->fDataType = proEventData::kInt;
pED->fNumber.i = number;
fEvents.Append(pED); // then add it to the list of event records
@ -624,11 +624,11 @@ void plNotifyMsg::AddVariableEvent( const char* name, int32_t number )
//
// PURPOSE : Add a variable event record to this notify message
//
void plNotifyMsg::AddVariableEvent( const char* name)
void plNotifyMsg::AddVariableEvent(const plString& name)
{
// create the control key event record
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
pED->fName = name;
pED->fDataType = proEventData::kNull;
fEvents.Append(pED); // then add it to the list of event records
}
@ -641,12 +641,11 @@ void plNotifyMsg::AddVariableEvent( const char* name)
//
// PURPOSE : Add a variable event record to this notify message
//
void plNotifyMsg::AddVariableEvent( const char* name, const plKey &key )
void plNotifyMsg::AddVariableEvent(const plString& name, const plKey &key)
{
// create the control key event record
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
// pED->fName = (char*)name;
pED->fName = name;
pED->fDataType = proEventData::kKey;
pED->fKey = key;
fEvents.Append(pED); // then add it to the list of event records
@ -1312,13 +1311,12 @@ void proControlKeyEventData::IWriteVersion(hsStream* s, hsResMgr* mgr)
void proVariableEventData::IInit()
{
fName = nil;
fName = plString::Null;
}
void proVariableEventData::IDestruct()
{
if ( fName != nil )
delete [] fName;
fName = nil;
fName = plString::Null;
}
void proVariableEventData::IReadNumber(hsStream * stream) {
@ -1353,7 +1351,7 @@ void proVariableEventData::IWriteNumber(hsStream * stream) {
void proVariableEventData::IRead(hsStream* stream, hsResMgr* mgr)
{
fName = stream->ReadSafeString();
fName = stream->ReadSafeString_TEMP();
fDataType = stream->ReadLE32();
IReadNumber(stream);
fKey = mgr->ReadKey(stream);
@ -1381,7 +1379,7 @@ void proVariableEventData::IReadVersion(hsStream* s, hsResMgr* mgr)
contentFlags.Read(s);
if (contentFlags.IsBitSet(kProVariableName))
fName = s->ReadSafeString();
fName = s->ReadSafeString_TEMP();
if (contentFlags.IsBitSet(kProVariableDataType))
fDataType = s->ReadLE32();
if (contentFlags.IsBitSet(kProVariableNumber))

View File

@ -179,7 +179,7 @@ protected:
};
proEventType(Variable)
char* fName; // name of variable
plString fName; // name of variable
int32_t fDataType; // type of data
// Can't be a union, sadly, but it isn't that much of a waste of space...
@ -375,10 +375,10 @@ public:
void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true );
void AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint );
void AddControlKeyEvent( int32_t key, bool down );
void AddVariableEvent( const char* name, float number );
void AddVariableEvent( const char* name, int32_t number );
void AddVariableEvent( const char* name );
void AddVariableEvent( const char *name, const plKey &key );
void AddVariableEvent( const plString& name, float number );
void AddVariableEvent( const plString& name, int32_t number );
void AddVariableEvent( const plString& name );
void AddVariableEvent( const plString& name, const plKey &key );
void AddFacingEvent( const plKey &other, const plKey &self, float dot, bool enabled);
void AddContainerEvent( const plKey &container, const plKey &contained, bool entering);
void AddActivateEvent( bool activate );