1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Differentiate between float and int types in plNotify

This commit is contained in:
Bartek Bok
2012-04-07 23:04:12 +02:00
parent c70bb776ba
commit 82e4c81303
6 changed files with 176 additions and 17 deletions

View File

@ -87,8 +87,10 @@ public:
enum dataType
{
kNumber=1,
kFloat=1,
kKey,
kInt,
kNull,
kNotta
};
@ -181,9 +183,12 @@ proEventType(Variable)
int32_t fDataType; // type of data
// Can't be a union, sadly, but it isn't that much of a waste of space...
float fNumber; // if its a number
plKey fKey; // if its a plKey (pointer to something)
union {
float f;
int32_t i;
} fNumber;
protected:
virtual void IInit();
@ -193,6 +198,9 @@ protected:
virtual void IReadVersion(hsStream* s, hsResMgr* mgr);
virtual void IWriteVersion(hsStream* s, hsResMgr* mgr);
virtual void IReadNumber(hsStream * stream);
virtual void IWriteNumber(hsStream * stream);
};
proEventType(Facing)
@ -368,7 +376,9 @@ public:
void AddPickEvent( const plKey &other, const plKey& self, hsBool enabled, hsPoint3 hitPoint );
void AddControlKeyEvent( int32_t key, hsBool down );
void AddVariableEvent( const char* name, float number );
void AddVariableEvent( const char *name, const plKey &key);
void AddVariableEvent( const char* name, int number );
void AddVariableEvent( const char* name );
void AddVariableEvent( const char *name, const plKey &key );
void AddFacingEvent( const plKey &other, const plKey &self, float dot, hsBool enabled);
void AddContainerEvent( const plKey &container, const plKey &contained, hsBool entering);
void AddActivateEvent( hsBool activate );