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

Eliminate hsScalar and hsFixed

Modern CPUs support floats just fine... hsFixed was crazy.
This commit is contained in:
2012-01-21 02:03:37 -05:00
parent 5027b5a4ac
commit e020651e4b
584 changed files with 5401 additions and 6399 deletions

View File

@ -245,7 +245,7 @@ void cyAnimation::Resume()
//
// PURPOSE : Play an animation only from specific time start to end
//
void cyAnimation::PlayRange(hsScalar start, hsScalar end)
void cyAnimation::PlayRange(float start, float end)
{
SkipToTime(start);
PlayToTime(end);
@ -258,7 +258,7 @@ void cyAnimation::PlayRange(hsScalar start, hsScalar end)
//
// PURPOSE : Play (continue) an animation until the specified time is reached
//
void cyAnimation::PlayToTime(hsScalar time)
void cyAnimation::PlayToTime(float time)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )
@ -297,7 +297,7 @@ void cyAnimation::PlayToTime(hsScalar time)
//
// PURPOSE : Play (continue) an animation until the specified point is reached
//
void cyAnimation::PlayToPercentage(hsScalar zeroToOne)
void cyAnimation::PlayToPercentage(float zeroToOne)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )
@ -337,7 +337,7 @@ void cyAnimation::PlayToPercentage(hsScalar zeroToOne)
// PURPOSE : Jump the animation to the specified time
// : Doesn't start or stop playing of animation
//
void cyAnimation::SkipToTime(hsScalar time)
void cyAnimation::SkipToTime(float time)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )
@ -458,7 +458,7 @@ void cyAnimation::Backwards(hsBool backwards)
// Function : SetLoopStart and SetLoopEnd
// PARAMETERS : value - sets the start or the end of the animation
//
void cyAnimation::SetLoopStart(hsScalar start)
void cyAnimation::SetLoopStart(float start)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )
@ -490,7 +490,7 @@ void cyAnimation::SetLoopStart(hsScalar start)
}
}
void cyAnimation::SetLoopEnd(hsScalar end)
void cyAnimation::SetLoopEnd(float end)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )
@ -532,7 +532,7 @@ void cyAnimation::SetLoopEnd(hsScalar end)
// PURPOSE : Sets the speed of the animation
// : Doesn't start or stop playing animation
//
void cyAnimation::Speed(hsScalar speed)
void cyAnimation::Speed(float speed)
{
// must have a receiver!
if ( fRecvr.Count() > 0 )

View File

@ -109,20 +109,20 @@ public:
// Play an animation only from specific time start to end
//
virtual void PlayRange(hsScalar start, hsScalar end);
virtual void PlayRange(float start, float end);
// Play (continue) an animation until the specified time is reached
//
virtual void PlayToTime(hsScalar time);
virtual void PlayToTime(float time);
// Play (continue) an animation until the specified point is reached
//
virtual void PlayToPercentage(hsScalar zeroToOne);
virtual void PlayToPercentage(float zeroToOne);
// Jump the animation to the specified time
// Doesn't start or stop playing of animation
//
virtual void SkipToTime(hsScalar time);
virtual void SkipToTime(float time);
// Set whether the animation is to be looped or not
//
@ -135,13 +135,13 @@ public:
// Sets the start and end of the looping points in the animation
//
virtual void SetLoopStart(hsScalar start);
virtual void SetLoopEnd(hsScalar end);
virtual void SetLoopStart(float start);
virtual void SetLoopEnd(float end);
// Sets the speed of the animation
// Doesn't start or stop playing animation
//
virtual void Speed(hsScalar speed);
virtual void Speed(float speed);
// Jump the animation to the specified time

View File

@ -372,7 +372,7 @@ void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netFor
//
// NOTE: only works with multi-stage behaviors
//
void cyAvatar::NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce)
{
// first there is someone to send to and make sure that we an avatar to send this to
@ -411,7 +411,7 @@ void cyAvatar::NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsSc
//
// NOTE: only works with multi-stage behaviors
//
void cyAvatar::PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce)
{
// first there is someone to send to and make sure that we an avatar to send this to
@ -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_t stage, hsScalar transTime, hsBool setTime, hsScalar newTime,
void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce)
{
// first there is someone to send to and make sure that we an avatar to send this to
@ -1847,12 +1847,12 @@ bool cyAvatar::LocalAvatarIsMoving()
return false;
}
void cyAvatar::SetMouseTurnSensitivity(hsScalar val)
void cyAvatar::SetMouseTurnSensitivity(float val)
{
plArmatureMod::SetMouseTurnSensitivity(val);
}
hsScalar cyAvatar::GetMouseTurnSensitivity()
float cyAvatar::GetMouseTurnSensitivity()
{
return plArmatureMod::GetMouseTurnSensitivity();
}

View File

@ -110,11 +110,11 @@ public:
virtual void RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netForce, hsBool netProp);
// for the multistage behaviors
virtual void NextStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
virtual void NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce);
virtual void PreviousStage(pyKey &behKey, hsScalar transTime, hsBool setTime, hsScalar newTime,
virtual void PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce);
virtual void GoToStage(pyKey &behKey, int32_t stage, hsScalar transTime, hsBool setTime, hsScalar newTime,
virtual void GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime,
hsBool setDirection, bool isForward, hsBool netForce);
// static behavior functions:
@ -542,8 +542,8 @@ public:
static bool LocalAvatarRunKeyDown();
static bool LocalAvatarIsMoving();
static void SetMouseTurnSensitivity(hsScalar val);
static hsScalar GetMouseTurnSensitivity();
static void SetMouseTurnSensitivity(float val);
static float GetMouseTurnSensitivity();
static void SpawnNext();
/////////////////////////////////////////////////////////////////////////////

View File

@ -233,7 +233,7 @@ void cyCamera::UndoFirstPerson()
}
hsScalar cyCamera::GetFOV()
float cyCamera::GetFOV()
{
if ( fTheCam )
{
@ -250,7 +250,7 @@ hsScalar cyCamera::GetFOV()
return 0.0;
}
void cyCamera::SetFOV(hsScalar fov, double t)
void cyCamera::SetFOV(float fov, double t)
{
if ( fTheCam )
{

View File

@ -102,8 +102,8 @@ public:
virtual void UndoFirstPerson();
virtual hsScalar GetFOV();
virtual void SetFOV(hsScalar fov, double t);
virtual float GetFOV();
virtual void SetFOV(float fov, double t);
virtual void SetSmootherCam(hsBool state);
virtual hsBool IsSmootherCam();

View File

@ -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_t id)
void cyMisc::TimerCallback(pyKey& selfkey, float time, uint32_t id)
{
// setup the message to come back to whoever the pyKey is pointing to
plTimerCallbackMsg* pTimerMsg = TRACKED_NEW plTimerCallbackMsg(selfkey.getKey(),id);
@ -757,7 +757,7 @@ double cyMisc::GetSysSeconds()
//
// PURPOSE : Return the frame delta seconds
//
hsScalar cyMisc::GetDelSysSeconds()
float cyMisc::GetDelSysSeconds()
{
return hsTimer::GetDelSysSeconds();
}
@ -1061,7 +1061,7 @@ uint32_t cyMisc::GetMaxListenListSize()
return plNetListenList::kMaxListenListSize;
}
hsScalar cyMisc::GetMaxListenDistSq()
float cyMisc::GetMaxListenDistSq()
{
return plNetListenList::kMaxListenDistSq;
}
@ -1157,7 +1157,7 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
//
// RETURNS : nothing
//
void cyMisc::SendKIMessage(uint32_t command, hsScalar value)
void cyMisc::SendKIMessage(uint32_t command, float value)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (uint8_t)command );
@ -1911,7 +1911,7 @@ int cyMisc::GetNumParticles(pyKey& host)
}
void cyMisc::SetLightColorValue(pyKey& light, std::string lightName, hsScalar r, hsScalar g, hsScalar b, hsScalar a)
void cyMisc::SetLightColorValue(pyKey& light, std::string lightName, float r, float g, float b, float a)
{
// lightName is the name of the light object attached to the light that we want to talk to
// for the bug lights, this would be "RTOmni-BugLightTest"
@ -2052,7 +2052,7 @@ 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_t ID, hsScalar xPos, hsScalar yPos, hsScalar distance, int what, int reportType)
bool cyMisc::RequestLOSScreen(pyKey &selfkey, int32_t ID, float xPos, float yPos, float distance, int what, int reportType)
{
plPipeline* pipe = selfkey.GetPipeline();
if (pipe)
@ -2203,7 +2203,7 @@ bool cyMisc::IsEnterChatModeKeyBound()
// PURPOSE : Shoots from screen coordinates, a bullet and makes a mark on objects that know about bullet holes
//
#include "plMessage/plBulletMsg.h"
void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos, hsScalar radius, hsScalar range)
void cyMisc::ShootBulletFromScreen(pyKey &selfkey, float xPos, float yPos, float radius, float range)
{
plPipeline* pipe = selfkey.GetPipeline();
if (pipe)
@ -2234,7 +2234,7 @@ void cyMisc::ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos,
//
// PURPOSE : Shoots from an object, a bullet and makes a mark on objects that know about bullet holes
//
void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, hsScalar radius, hsScalar range)
void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, float radius, float range)
{
plSceneObject* so = plSceneObject::ConvertNoRef(sobj->getObjKey()->ObjectIsLoaded());
if( so )

View File

@ -161,7 +161,7 @@ public:
//
// PURPOSE : Execute a console command from a python script
//
static void TimerCallback(pyKey& selfkey, hsScalar time, uint32_t id);
static void TimerCallback(pyKey& selfkey, float time, uint32_t id);
/////////////////////////////////////////////////////////////////////////////
//
@ -335,7 +335,7 @@ public:
//
// PURPOSE : Return the frame delta seconds
//
static hsScalar GetDelSysSeconds();
static float GetDelSysSeconds();
/////////////////////////////////////////////////////////////////////////////
@ -424,7 +424,7 @@ public:
static std::vector<PyObject*> GetPlayerListDistanceSorted(); // list of pyPlayer
static uint32_t GetMaxListenListSize();
static hsScalar GetMaxListenDistSq();
static float GetMaxListenDistSq();
/////////////////////////////////////////////////////////////////////////////
//
@ -452,7 +452,7 @@ public:
//
// RETURNS : nothing
//
static void SendKIMessage(uint32_t command, hsScalar value);
static void SendKIMessage(uint32_t command, float value);
/////////////////////////////////////////////////////////////////////////////
//
@ -676,7 +676,7 @@ public:
//
// PURPOSE : To request an LOS from a point on the screen
//
static bool RequestLOSScreen(pyKey &selfkey, int32_t ID, hsScalar xPos, hsScalar yPos, hsScalar distance, int what, int reportType);
static bool RequestLOSScreen(pyKey &selfkey, int32_t ID, float xPos, float yPos, float distance, int what, int reportType);
//////////////////////////////////////////////////////////////////////////////
//
@ -697,7 +697,7 @@ public:
static void SetParticleOffset(float x, float y, float z, pyKey& particles);
static void KillParticles(float time, float pct, pyKey& particles);
static int GetNumParticles(pyKey& host);
static void SetLightColorValue(pyKey& light, std::string lightName, hsScalar r, hsScalar g, hsScalar b, hsScalar a);
static void SetLightColorValue(pyKey& light, std::string lightName, float r, float g, float b, float a);
static void SetLightAnimationOn(pyKey& light, std::string lightName, hsBool start);
//////////////////////////////////////////////////////////////////////////////
//
@ -745,7 +745,7 @@ public:
//
// PURPOSE : Shoots from screen coordinates, a bullet and makes a mark on objects that know about bullet holes
//
static void ShootBulletFromScreen(pyKey &selfkey, hsScalar xPos, hsScalar yPos, hsScalar radius, hsScalar range);
static void ShootBulletFromScreen(pyKey &selfkey, float xPos, float yPos, float radius, float range);
//////////////////////////////////////////////////////////////////////////////
//
@ -754,7 +754,7 @@ public:
//
// PURPOSE : Shoots from an object, a bullet and makes a mark on objects that know about bullet holes
//
static void ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, hsScalar radius, hsScalar range);
static void ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, float radius, float range);
//////////////////////////////////////////////////////////////////////////////
//

View File

@ -79,7 +79,7 @@ void cyParticleSys::SetNetForce(hsBool state)
//
// PURPOSE : send the message to the Particle System
//
void cyParticleSys::ISendParticleSysMsg(uint32_t param, hsScalar value)
void cyParticleSys::ISendParticleSysMsg(uint32_t param, float value)
{
plParticleUpdateMsg* pMsg = TRACKED_NEW plParticleUpdateMsg(fSender, nil, nil, param, value);
// check if this needs to be network forced to all clients
@ -103,62 +103,62 @@ void cyParticleSys::ISendParticleSysMsg(uint32_t param, hsScalar value)
//
// All these methods just call the IsendParticleSysMsg to do the real work
//
void cyParticleSys::SetParticlesPerSecond(hsScalar value)
void cyParticleSys::SetParticlesPerSecond(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamParticlesPerSecond,value);
}
void cyParticleSys::SetInitPitchRange(hsScalar value)
void cyParticleSys::SetInitPitchRange(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamInitPitchRange,value);
}
void cyParticleSys::SetInitYawRange(hsScalar value)
void cyParticleSys::SetInitYawRange(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamInitYawRange,value);
}
void cyParticleSys::SetVelMin(hsScalar value)
void cyParticleSys::SetVelMin(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamVelMin,value);
}
void cyParticleSys::SetVelMax(hsScalar value)
void cyParticleSys::SetVelMax(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamVelMax,value);
}
void cyParticleSys::SetXSize(hsScalar value)
void cyParticleSys::SetXSize(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamXSize,value);
}
void cyParticleSys::SetYSize(hsScalar value)
void cyParticleSys::SetYSize(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamYSize,value);
}
void cyParticleSys::SetScaleMin(hsScalar value)
void cyParticleSys::SetScaleMin(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamScaleMin,value);
}
void cyParticleSys::SetScaleMax(hsScalar value)
void cyParticleSys::SetScaleMax(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamScaleMax,value);
}
void cyParticleSys::SetGenLife(hsScalar value)
void cyParticleSys::SetGenLife(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamGenLife,value);
}
void cyParticleSys::SetPartLifeMin(hsScalar value)
void cyParticleSys::SetPartLifeMin(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamPartLifeMin,value);
}
void cyParticleSys::SetPartLifeMax(hsScalar value)
void cyParticleSys::SetPartLifeMax(float value)
{
ISendParticleSysMsg(plParticleUpdateMsg::kParamPartLifeMax,value);
}

View File

@ -63,7 +63,7 @@ protected:
hsTArray<plKey> fRecvr;
hsBool fNetForce;
virtual void ISendParticleSysMsg(uint32_t param, hsScalar value);
virtual void ISendParticleSysMsg(uint32_t param, float value);
cyParticleSys(const plKey sender=nil,const plKey recvr=nil);
@ -81,18 +81,18 @@ public:
virtual void AddRecvr(plKey &recvr);
virtual void SetNetForce(hsBool state);
virtual void SetParticlesPerSecond(hsScalar value);
virtual void SetInitPitchRange(hsScalar value);
virtual void SetInitYawRange(hsScalar value);
virtual void SetVelMin(hsScalar value);
virtual void SetVelMax(hsScalar value);
virtual void SetXSize(hsScalar value);
virtual void SetYSize(hsScalar value);
virtual void SetScaleMin(hsScalar value);
virtual void SetScaleMax(hsScalar value);
virtual void SetGenLife(hsScalar value);
virtual void SetPartLifeMin(hsScalar value);
virtual void SetPartLifeMax(hsScalar value);
virtual void SetParticlesPerSecond(float value);
virtual void SetInitPitchRange(float value);
virtual void SetInitYawRange(float value);
virtual void SetVelMin(float value);
virtual void SetVelMax(float value);
virtual void SetXSize(float value);
virtual void SetYSize(float value);
virtual void SetScaleMin(float value);
virtual void SetScaleMax(float value);
virtual void SetGenLife(float value);
virtual void SetPartLifeMin(float value);
virtual void SetPartLifeMax(float value);
};

View File

@ -283,7 +283,7 @@ void cyPhysics::WarpMat(pyMatrix44& mat)
// : if the object is physical then warp it
// : otherwise just use the coordinate interface and set the transform
//
void cyPhysics::Move(pyVector3& direction, hsScalar distance)
void cyPhysics::Move(pyVector3& direction, float distance)
{
//move each receiver (object) separately
int i;
@ -352,7 +352,7 @@ void cyPhysics::Move(pyVector3& direction, hsScalar distance)
// : if the object is physical then warp it
// : otherwise just use the coordinate interface and set the transform
//
void cyPhysics::Rotate(hsScalar rad, pyVector3& axis)
void cyPhysics::Rotate(float rad, pyVector3& axis)
{
// rotate each receiver (object) separately
int i;
@ -655,7 +655,7 @@ void cyPhysics::AngularImpulse(pyVector3& impulse)
// : A damp factor of 1 leaves them alone.
//
//
void cyPhysics::Damp(hsScalar damp)
void cyPhysics::Damp(float damp)
{
hsAssert(0, "Who uses this?");
// must have a receiver!

View File

@ -102,12 +102,12 @@ public:
// Move the object in a direction and distance
// if the object is physical then warp it
// otherwise just use the coordinate interface and set the transform
virtual void Move(pyVector3& direction, hsScalar distance);
virtual void Move(pyVector3& direction, float distance);
// Rotate the object
// if the object is physical then warp it
// otherwise just use the coordinate interface and set the transform
virtual void Rotate(hsScalar rad, pyVector3& axis);
virtual void Rotate(float rad, pyVector3& axis);
// apply a force to the center of mass of the receiver
virtual void Force(pyVector3& force);
@ -133,7 +133,7 @@ public:
// Decrease all velocities on the given object.
// A damp factor of 0 nulls them all entirely;
// A damp factor of 1 leaves them alone.
virtual void Damp(hsScalar damp);
virtual void Damp(float damp);
// Shift the center of mass of the given object by the given
// amount in the given direction.

View File

@ -1131,7 +1131,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const char *activatorName, int32_t id
// Tasks:
// - Call the Python code's Update function (if there)
//
hsBool plPythonFileMod::IEval(double secs, hsScalar del, uint32_t dirty)
hsBool plPythonFileMod::IEval(double secs, float del, uint32_t dirty)
{
if ( fModule )
{

View File

@ -72,7 +72,7 @@ protected:
plPythonSDLModifier* fSDLMod;
hsBool IEval(double secs, hsScalar del, uint32_t dirty);
hsBool IEval(double secs, float del, uint32_t dirty);
void IMakeModuleName(char* modulename,plSceneObject* sobj);

View File

@ -96,7 +96,7 @@ public:
{
int32_t fIntNumber;
hsScalar fFloatNumber;
float fFloatNumber;
hsBool fBool;
@ -227,7 +227,7 @@ public:
fValueType = kInt;
datarecord.fIntNumber = number;
}
void SetToFloat(hsScalar number)
void SetToFloat(float number)
{
SetToNone();
fValueType = kFloat;

View File

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAudio/plAudioCaps.h"
// Sets the master volume of a given audio channel
void pyAudioControl::SetSoundFXVolume( hsScalar volume )
void pyAudioControl::SetSoundFXVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kSoundFX;
@ -68,7 +68,7 @@ void pyAudioControl::SetSoundFXVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
void pyAudioControl::SetMusicVolume( hsScalar volume )
void pyAudioControl::SetMusicVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kBgndMusic;
@ -82,7 +82,7 @@ void pyAudioControl::SetMusicVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
void pyAudioControl::SetVoiceVolume( hsScalar volume )
void pyAudioControl::SetVoiceVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kVoice;
@ -96,7 +96,7 @@ void pyAudioControl::SetVoiceVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
void pyAudioControl::SetAmbienceVolume( hsScalar volume )
void pyAudioControl::SetAmbienceVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kAmbience;
@ -110,7 +110,7 @@ void pyAudioControl::SetAmbienceVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
void pyAudioControl::SetGUIVolume( hsScalar volume )
void pyAudioControl::SetGUIVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kGUI;
@ -124,7 +124,7 @@ void pyAudioControl::SetGUIVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
void pyAudioControl::SetNPCVoiceVolume( hsScalar volume )
void pyAudioControl::SetNPCVoiceVolume( float volume )
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kNPCVoice;
@ -138,42 +138,42 @@ void pyAudioControl::SetNPCVoiceVolume( hsScalar volume )
plgAudioSys::SetChannelVolume( chan, volume );
}
hsScalar pyAudioControl::GetSoundFXVolume()
float pyAudioControl::GetSoundFXVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kSoundFX;
return plgAudioSys::GetChannelVolume(chan);
}
hsScalar pyAudioControl::GetMusicVolume()
float pyAudioControl::GetMusicVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kBgndMusic;
return plgAudioSys::GetChannelVolume(chan);
}
hsScalar pyAudioControl::GetVoiceVolume()
float pyAudioControl::GetVoiceVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kVoice;
return plgAudioSys::GetChannelVolume(chan);
}
hsScalar pyAudioControl::GetAmbienceVolume()
float pyAudioControl::GetAmbienceVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kAmbience;
return plgAudioSys::GetChannelVolume(chan);
}
hsScalar pyAudioControl::GetGUIVolume()
float pyAudioControl::GetGUIVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kGUI;
return plgAudioSys::GetChannelVolume(chan);
}
hsScalar pyAudioControl::GetNPCVoiceVolume()
float pyAudioControl::GetNPCVoiceVolume()
{
plgAudioSys::ASChannel chan;
chan = plgAudioSys::kNPCVoice;
@ -271,7 +271,7 @@ hsBool pyAudioControl::CanSetMicLevel()
return plWinMicLevel::CanSetLevel();
}
void pyAudioControl::SetMicLevel( hsScalar level )
void pyAudioControl::SetMicLevel( float level )
{
// make sure the volume is within range
if( level > 1.f )
@ -282,7 +282,7 @@ void pyAudioControl::SetMicLevel( hsScalar level )
plWinMicLevel::SetLevel( level );
}
hsScalar pyAudioControl::GetMicLevel()
float pyAudioControl::GetMicLevel()
{
return plWinMicLevel::GetLevel();
}
@ -348,7 +348,7 @@ void pyAudioControl::PushToTalk( hsBool state )
}
// Set the squelch level
void pyAudioControl::SquelchLevel( hsScalar level )
void pyAudioControl::SquelchLevel( float level )
{
plVoiceRecorder::SetSquelch(level);
}

View File

@ -71,18 +71,18 @@ public:
// Audio settings
// Sets the master volume of a given audio channel
virtual void SetSoundFXVolume( hsScalar volume );
virtual void SetMusicVolume( hsScalar volume );
virtual void SetVoiceVolume( hsScalar volume );
virtual void SetAmbienceVolume( hsScalar volume );
virtual void SetGUIVolume( hsScalar volume );
virtual void SetNPCVoiceVolume( hsScalar volume );
virtual hsScalar GetSoundFXVolume();
virtual hsScalar GetMusicVolume();
virtual hsScalar GetVoiceVolume();
virtual hsScalar GetAmbienceVolume();
virtual hsScalar GetGUIVolume();
virtual hsScalar GetNPCVoiceVolume();
virtual void SetSoundFXVolume( float volume );
virtual void SetMusicVolume( float volume );
virtual void SetVoiceVolume( float volume );
virtual void SetAmbienceVolume( float volume );
virtual void SetGUIVolume( float volume );
virtual void SetNPCVoiceVolume( float volume );
virtual float GetSoundFXVolume();
virtual float GetMusicVolume();
virtual float GetVoiceVolume();
virtual float GetAmbienceVolume();
virtual float GetGUIVolume();
virtual float GetNPCVoiceVolume();
// Switch DirectX Audio on or off at runtime
virtual void Enable();
@ -124,8 +124,8 @@ public:
// Sets the microphone volume, in the range of 0 to 1
virtual hsBool CanSetMicLevel();
virtual void SetMicLevel( hsScalar level );
virtual hsScalar GetMicLevel();
virtual void SetMicLevel( float level );
virtual float GetMicLevel();
// turn voice recording on or off
virtual void EnableVoiceRecording( hsBool state );
@ -149,7 +149,7 @@ public:
virtual void PushToTalk( hsBool state );
// Set the squelch level
virtual void SquelchLevel( hsScalar level );
virtual void SquelchLevel( float level );
// Adjust voice packet frame size
virtual void RecordFrame( int32_t size );

View File

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "pyColor.h"
pyColor::pyColor(hsScalar r, hsScalar g, hsScalar b, hsScalar a)
pyColor::pyColor(float r, float g, float b, float a)
{
fColor.Set(r, g, b ,a);
}

View File

@ -59,14 +59,14 @@ private:
hsColorRGBA fColor;
protected:
pyColor(hsScalar r=0.0f, hsScalar g=0.0f, hsScalar b=0.0f, hsScalar a=0.0f);
pyColor(float r=0.0f, float g=0.0f, float b=0.0f, float a=0.0f);
pyColor(hsColorRGBA color);
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptColor);
PYTHON_CLASS_NEW_DEFINITION;
static PyObject *New(hsScalar red, hsScalar green, hsScalar blue, hsScalar alpha = 0.0f);
static PyObject *New(float red, float green, float blue, float alpha = 0.0f);
static PyObject *New(const hsColorRGBA & color);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyColor object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyColor); // converts a PyObject to a pyColor (throws error if not correct type)
@ -78,16 +78,16 @@ public:
void setColor(hsColorRGBA color) { fColor = color; }
// python get attributes helpers
hsScalar getRed() const { return fColor.r; }
hsScalar getGreen() const { return fColor.g; }
hsScalar getBlue() const { return fColor.b; }
hsScalar getAlpha() const { return fColor.a; }
float getRed() const { return fColor.r; }
float getGreen() const { return fColor.g; }
float getBlue() const { return fColor.b; }
float getAlpha() const { return fColor.a; }
// python set attributes helpers
void setRed(hsScalar red) { fColor.r = red; }
void setGreen(hsScalar green) { fColor.g = green; }
void setBlue(hsScalar blue) { fColor.b = blue; }
void setAlpha(hsScalar alpha) { fColor.a = alpha; }
void setRed(float red) { fColor.r = red; }
void setGreen(float green) { fColor.g = green; }
void setBlue(float blue) { fColor.b = blue; }
void setAlpha(float alpha) { fColor.a = alpha; }
// override the equals to operator
hsBool operator==(const pyColor &color) const

View File

@ -280,7 +280,7 @@ PLASMA_CUSTOM_TYPE(ptColor, "Params: red=0, green=0, blue=0, alpha=0\nPlasma col
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_IMPL(ptColor, pyColor)
PyObject *pyColor::New(hsScalar red, hsScalar green, hsScalar blue, hsScalar alpha)
PyObject *pyColor::New(float red, float green, float blue, float alpha)
{
ptColor *newObj = (ptColor*)ptColor_type.tp_new(&ptColor_type, NULL, NULL);
newObj->fThis->setRed(red);

View File

@ -172,56 +172,56 @@ bool pyCritterBrain::AtGoal() const
return fBrain->AtGoal();
}
void pyCritterBrain::StopDistance(hsScalar stopDistance)
void pyCritterBrain::StopDistance(float stopDistance)
{
if (!fBrain)
return;
fBrain->StopDistance(stopDistance);
}
hsScalar pyCritterBrain::StopDistance() const
float pyCritterBrain::StopDistance() const
{
if (!fBrain)
return 0;
return fBrain->StopDistance();
}
void pyCritterBrain::SightCone(hsScalar coneRad)
void pyCritterBrain::SightCone(float coneRad)
{
if (!fBrain)
return;
fBrain->SightCone(coneRad);
}
hsScalar pyCritterBrain::SightCone() const
float pyCritterBrain::SightCone() const
{
if (!fBrain)
return 0;
return fBrain->SightCone();
}
void pyCritterBrain::SightDistance(hsScalar sightDis)
void pyCritterBrain::SightDistance(float sightDis)
{
if (!fBrain)
return;
fBrain->SightDistance(sightDis);
}
hsScalar pyCritterBrain::SightDistance() const
float pyCritterBrain::SightDistance() const
{
if (!fBrain)
return 0;
return fBrain->SightDistance();
}
void pyCritterBrain::HearingDistance(hsScalar hearDis)
void pyCritterBrain::HearingDistance(float hearDis)
{
if (!fBrain)
return;
fBrain->HearingDistance(hearDis);
}
hsScalar pyCritterBrain::HearingDistance() const
float pyCritterBrain::HearingDistance() const
{
if (!fBrain)
return 0;

View File

@ -104,15 +104,15 @@ public:
bool AvoidingAvatars() const;
bool AtGoal() const;
void StopDistance(hsScalar stopDistance);
hsScalar StopDistance() const;
void StopDistance(float stopDistance);
float StopDistance() const;
void SightCone(hsScalar coneRad);
hsScalar SightCone() const;
void SightDistance(hsScalar sightDis);
hsScalar SightDistance() const;
void HearingDistance(hsScalar hearDis);
hsScalar HearingDistance() const;
void SightCone(float coneRad);
float SightCone() const;
void SightDistance(float sightDis);
float SightDistance() const;
void HearingDistance(float hearDis);
float HearingDistance() const;
bool CanSeeAvatar(unsigned long id) const;
bool CanHearAvatar(unsigned long id) const;

View File

@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAvatar/plArmatureMod.h"
#endif
void pyDrawControl::SetGamma2(hsScalar gamma)
void pyDrawControl::SetGamma2(float gamma)
{
#ifndef BUILDING_PYPLASMA
char command[256];
@ -77,14 +77,14 @@ void pyDrawControl::SetGamma2(hsScalar gamma)
#include "plGLight/plShadowMaster.h"
#endif
void pyDrawControl::SetShadowVisDistance(hsScalar distance)
void pyDrawControl::SetShadowVisDistance(float distance)
{
#ifndef BUILDING_PYPLASMA
plShadowMaster::SetGlobalShadowQuality(distance);
#endif
}
hsScalar pyDrawControl::GetShadowVisDistance()
float pyDrawControl::GetShadowVisDistance()
{
#ifndef BUILDING_PYPLASMA
return plShadowMaster::GetGlobalShadowQuality();

View File

@ -65,9 +65,9 @@ public:
//static void AddPlasmaConstantsClasses(PyObject* m);
// static python functions
static void SetGamma2(hsScalar gamma);
static void SetShadowVisDistance(hsScalar distance);
static hsScalar GetShadowVisDistance();
static void SetGamma2(float gamma);
static void SetShadowVisDistance(float distance);
static float GetShadowVisDistance();
static void EnableShadows();
static void DisableShadows();
static hsBool IsShadowsEnabled();

View File

@ -351,7 +351,7 @@ uint32_t pyGUIControl::GetFontSize()
// set color scheme
void pyGUIControl::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIControl::SetForeColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -371,7 +371,7 @@ void pyGUIControl::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
}
}
void pyGUIControl::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIControl::SetSelColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -391,7 +391,7 @@ void pyGUIControl::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
}
}
void pyGUIControl::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIControl::SetBackColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -411,7 +411,7 @@ void pyGUIControl::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
}
}
void pyGUIControl::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIControl::SetBackSelColor( float r, float g, float b, float a )
{
if ( fGCkey )
{

View File

@ -122,10 +122,10 @@ public:
virtual PyObject* GetBackSelColor(); // returns pyColor
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 SetForeColor( float r, float g, float b, float a );
virtual void SetSelColor( float r, float g, float b, float a );
virtual void SetBackColor( float r, float g, float b, float a );
virtual void SetBackSelColor( float r, float g, float b, float a );
virtual void SetFontSize(uint32_t fontsize);
};

View File

@ -69,7 +69,7 @@ hsBool pyGUIControlValue::IsGUIControlValue(pyKey& gckey)
}
hsScalar pyGUIControlValue::GetValue()
float pyGUIControlValue::GetValue()
{
if ( fGCkey )
{
@ -81,7 +81,7 @@ hsScalar pyGUIControlValue::GetValue()
return 0.0;
}
void pyGUIControlValue::SetValue( hsScalar v )
void pyGUIControlValue::SetValue( float v )
{
if ( fGCkey )
{
@ -92,7 +92,7 @@ void pyGUIControlValue::SetValue( hsScalar v )
}
}
hsScalar pyGUIControlValue::GetMin( void )
float pyGUIControlValue::GetMin( void )
{
if ( fGCkey )
{
@ -104,7 +104,7 @@ hsScalar pyGUIControlValue::GetMin( void )
return 0.0;
}
hsScalar pyGUIControlValue::GetMax( void )
float pyGUIControlValue::GetMax( void )
{
if ( fGCkey )
{
@ -116,7 +116,7 @@ hsScalar pyGUIControlValue::GetMax( void )
return 0.0;
}
hsScalar pyGUIControlValue::GetStep( void )
float pyGUIControlValue::GetStep( void )
{
if ( fGCkey )
{
@ -128,7 +128,7 @@ hsScalar pyGUIControlValue::GetStep( void )
return 0.0;
}
void pyGUIControlValue::SetRange( hsScalar min, hsScalar max )
void pyGUIControlValue::SetRange( float min, float max )
{
if ( fGCkey )
{
@ -139,7 +139,7 @@ void pyGUIControlValue::SetRange( hsScalar min, hsScalar max )
}
}
void pyGUIControlValue::SetStep( hsScalar step )
void pyGUIControlValue::SetStep( float step )
{
if ( fGCkey )
{

View File

@ -75,13 +75,13 @@ public:
static hsBool IsGUIControlValue(pyKey& gckey);
virtual hsScalar GetValue();
virtual void SetValue( hsScalar v );
virtual hsScalar GetMin( void );
virtual hsScalar GetMax( void );
virtual hsScalar GetStep( void );
virtual void SetRange( hsScalar min, hsScalar max );
virtual void SetStep( hsScalar step );
virtual float GetValue();
virtual void SetValue( float v );
virtual float GetMin( void );
virtual float GetMax( void );
virtual float GetStep( void );
virtual void SetRange( float min, float max );
virtual void SetStep( float step );
};
class pyGUIControlKnob : public pyGUIControlValue

View File

@ -392,7 +392,7 @@ uint32_t pyGUIDialog::GetFontSize()
// set color scheme
void pyGUIDialog::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIDialog::SetForeColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -412,7 +412,7 @@ void pyGUIDialog::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
}
}
void pyGUIDialog::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIDialog::SetSelColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -432,7 +432,7 @@ void pyGUIDialog::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
}
}
void pyGUIDialog::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIDialog::SetBackColor( float r, float g, float b, float a )
{
if ( fGCkey )
{
@ -452,7 +452,7 @@ void pyGUIDialog::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
}
}
void pyGUIDialog::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIDialog::SetBackSelColor( float r, float g, float b, float a )
{
if ( fGCkey )
{

View File

@ -142,10 +142,10 @@ public:
virtual PyObject* GetBackSelColor(); // returns pyColor
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 SetForeColor( float r, float g, float b, float a );
virtual void SetSelColor( float r, float g, float b, float a );
virtual void SetBackColor( float r, float g, float b, float a );
virtual void SetBackSelColor( float r, float g, float b, float a );
virtual void SetFontSize(uint32_t fontsize);
virtual void UpdateAllBounds( void );

View File

@ -89,7 +89,7 @@ pyGUIPopUpMenu::pyGUIPopUpMenu()
fBuiltMenu = nil;
}
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc/* = plLocation::kGlobalFixedLoc */)
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc/* = plLocation::kGlobalFixedLoc */)
{
fBuiltMenu = pfGUIPopUpMenu::Build( name, nil, screenOriginX, screenOriginY, destLoc );
if( fBuiltMenu != nil )
@ -101,7 +101,7 @@ pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScal
fGCkey = nil;
}
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY )
pyGUIPopUpMenu::pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY )
{
pfGUIPopUpMenu *parentMenu = pfGUIPopUpMenu::ConvertNoRef( parent.fGCkey->ObjectIsLoaded() );
@ -140,7 +140,7 @@ void pyGUIPopUpMenu::setup(plKey objkey)
fGCkey = objkey;
}
void pyGUIPopUpMenu::setup(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
void pyGUIPopUpMenu::setup(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
{
// kill any previous menu
if( fBuiltMenu != nil )
@ -160,7 +160,7 @@ void pyGUIPopUpMenu::setup(const char *name, hsScalar screenOriginX, hsScalar sc
fGCkey = nil;
}
void pyGUIPopUpMenu::setup(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY)
void pyGUIPopUpMenu::setup(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY)
{
// kill any previous menu
if( fBuiltMenu != nil )
@ -299,7 +299,7 @@ PyObject* pyGUIPopUpMenu::GetBackSelColor()
}
// set color scheme
void pyGUIPopUpMenu::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIPopUpMenu::SetForeColor( float r, float g, float b, float a )
{
kGetMenuPtr( ; );
@ -314,7 +314,7 @@ void pyGUIPopUpMenu::SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
color->fForeColor.a = a;
}
void pyGUIPopUpMenu::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIPopUpMenu::SetSelColor( float r, float g, float b, float a )
{
kGetMenuPtr( ; );
@ -329,7 +329,7 @@ void pyGUIPopUpMenu::SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a
color->fSelForeColor.a = a;
}
void pyGUIPopUpMenu::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIPopUpMenu::SetBackColor( float r, float g, float b, float a )
{
kGetMenuPtr( ; );
@ -344,7 +344,7 @@ void pyGUIPopUpMenu::SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar
color->fBackColor.a = a;
}
void pyGUIPopUpMenu::SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a )
void pyGUIPopUpMenu::SetBackSelColor( float r, float g, float b, float a )
{
kGetMenuPtr( ; );

View File

@ -70,8 +70,8 @@ protected:
pyGUIPopUpMenu(plKey objkey);
pyGUIPopUpMenu();
// For creating new menus on the fly
pyGUIPopUpMenu( const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc );
pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY );
pyGUIPopUpMenu( const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc );
pyGUIPopUpMenu( const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY );
public:
virtual ~pyGUIPopUpMenu();
@ -81,8 +81,8 @@ public:
PYTHON_CLASS_NEW_DEFINITION;
static PyObject *New(pyKey& gckey);
static PyObject *New(plKey objkey);
static PyObject *New(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
static PyObject *New(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY);
static PyObject *New(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
static PyObject *New(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY);
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyGUIPopUpMenu object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyGUIPopUpMenu); // converts a PyObject to a pyGUIPopUpMenu (throws error if not correct type)
@ -90,8 +90,8 @@ public:
// these three are for the python glue only, do NOT call
void setup(plKey objkey);
void setup(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
void setup(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY);
void setup(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc);
void setup(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY);
static hsBool IsGUIPopUpMenu(pyKey& gckey);
@ -122,10 +122,10 @@ public:
virtual PyObject* GetBackColor(); // returns pyColor
virtual PyObject* GetBackSelColor(); // returns pyColor
// set color scheme
virtual void SetForeColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
virtual void SetSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
virtual void SetBackColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
virtual void SetBackSelColor( hsScalar r, hsScalar g, hsScalar b, hsScalar a );
virtual void SetForeColor( float r, float g, float b, float a );
virtual void SetSelColor( float r, float g, float b, float a );
virtual void SetBackColor( float r, float g, float b, float a );
virtual void SetBackSelColor( float r, float g, float b, float a );
// Menu item functions
virtual void AddConsoleCmdItem( const char *name, const char *consoleCmd );

View File

@ -417,14 +417,14 @@ PyObject *pyGUIPopUpMenu::New(plKey objkey)
return (PyObject*)newObj;
}
PyObject *pyGUIPopUpMenu::New(const char *name, hsScalar screenOriginX, hsScalar screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
PyObject *pyGUIPopUpMenu::New(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc /* = plLocation::kGlobalFixedLoc */)
{
ptGUIPopUpMenu *newObj = (ptGUIPopUpMenu*)ptGUIPopUpMenu_type.tp_new(&ptGUIPopUpMenu_type, NULL, NULL);
newObj->fThis->setup(name, screenOriginX, screenOriginY, destLoc);
return (PyObject*)newObj;
}
PyObject *pyGUIPopUpMenu::New(const char *name, pyGUIPopUpMenu &parent, hsScalar screenOriginX, hsScalar screenOriginY)
PyObject *pyGUIPopUpMenu::New(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY)
{
ptGUIPopUpMenu *newObj = (ptGUIPopUpMenu*)ptGUIPopUpMenu_type.tp_new(&ptGUIPopUpMenu_type, NULL, NULL);
newObj->fThis->setup(name, parent, screenOriginX, screenOriginY);

View File

@ -57,7 +57,7 @@ class pyPoint3
{
protected:
pyPoint3() : fPoint(0,0,0) {}
pyPoint3(hsScalar x, hsScalar y, hsScalar z) : fPoint(x,y,z) {}
pyPoint3(float x, float y, float z) : fPoint(x,y,z) {}
pyPoint3(hsPoint3 pt) : fPoint(pt.fX,pt.fY,pt.fZ) {}
public:
@ -73,20 +73,20 @@ public:
hsPoint3 fPoint;
// python get attributes helpers
hsScalar getX() { return fPoint.fX; }
hsScalar getY() { return fPoint.fY; }
hsScalar getZ() { return fPoint.fZ; }
float getX() { return fPoint.fX; }
float getY() { return fPoint.fY; }
float getZ() { return fPoint.fZ; }
// python set attributes helpers
void setX(hsScalar x) { fPoint.fX = x; }
void setY(hsScalar y) { fPoint.fY = y; }
void setZ(hsScalar z) { fPoint.fZ = z; }
void setX(float x) { fPoint.fX = x; }
void setY(float y) { fPoint.fY = y; }
void setZ(float z) { fPoint.fZ = z; }
// methods to manipulate point3's
void Zero() { fPoint.fX=0; fPoint.fY=0; fPoint.fZ=0; }
PyObject* Copy() { return pyPoint3::New(fPoint); }
hsScalar Distance(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).Magnitude(); }
hsScalar DistanceSquared(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).MagnitudeSquared(); }
float Distance(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).Magnitude(); }
float DistanceSquared(pyPoint3 other) { return hsVector3(&fPoint,&other.fPoint).MagnitudeSquared(); }
};
@ -94,7 +94,7 @@ class pyVector3
{
protected:
pyVector3() : fVector(0,0,0) {}
pyVector3(hsScalar x, hsScalar y, hsScalar z) : fVector(x,y,z) {}
pyVector3(float x, float y, float z) : fVector(x,y,z) {}
pyVector3(hsVector3 v) : fVector(v.fX,v.fY,v.fZ) {}
public:
@ -110,14 +110,14 @@ public:
hsVector3 fVector;
// python get attributes helpers
hsScalar getX() { return fVector.fX; }
hsScalar getY() { return fVector.fY; }
hsScalar getZ() { return fVector.fZ; }
float getX() { return fVector.fX; }
float getY() { return fVector.fY; }
float getZ() { return fVector.fZ; }
// python set attributes helpers
void setX(hsScalar x) { fVector.fX = x; }
void setY(hsScalar y) { fVector.fY = y; }
void setZ(hsScalar z) { fVector.fZ = z; }
void setX(float x) { fVector.fX = x; }
void setY(float y) { fVector.fY = y; }
void setZ(float z) { fVector.fZ = z; }
// operator methods
PyObject* operator+(const pyVector3& b) const { return pyVector3::New(fVector + b.fVector); }
@ -125,12 +125,12 @@ public:
// methods to manipulate vectors
void Normalize() { fVector.Normalize(); }
hsScalar Dot(pyVector3 other) { return fVector*other.fVector;}
float Dot(pyVector3 other) { return fVector*other.fVector;}
PyObject* Cross(pyVector3 other) {return pyVector3::New(fVector%other.fVector); }
hsScalar Magnitude() { return fVector.Magnitude(); }
hsScalar MagnitudeSquared() { return fVector.MagnitudeSquared(); }
float Magnitude() { return fVector.Magnitude(); }
float MagnitudeSquared() { return fVector.MagnitudeSquared(); }
void Zero() { fVector.fX=0; fVector.fY=0; fVector.fZ=0; }
PyObject* Scale(hsScalar scale) { return pyVector3::New(fVector * scale); }
PyObject* Scale(float scale) { return pyVector3::New(fVector * scale); }
PyObject* Add(pyVector3& other) { return pyVector3::New(fVector + other.fVector); }
PyObject* Subtract(pyVector3& other) { return pyVector3::New(fVector - other.fVector); }
PyObject* Copy() { return pyVector3::New(fVector); }

View File

@ -66,7 +66,7 @@ void pyGrassShader::SetKey(plKey key)
// Setter functions
//////////////////////////////////////////////////////////////////////
void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<hsScalar> & distortion)
void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<float> & distortion)
{
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
{
@ -95,7 +95,7 @@ void pyGrassShader::SetWaveDistortion(int waveNum, const std::vector<hsScalar> &
}
}
void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<hsScalar> & direction)
void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<float> & direction)
{
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
{
@ -123,7 +123,7 @@ void pyGrassShader::SetWaveDirection(int waveNum, const std::vector<hsScalar> &
}
}
void pyGrassShader::SetWaveSpeed(int waveNum, hsScalar speed)
void pyGrassShader::SetWaveSpeed(int waveNum, float speed)
{
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
{
@ -147,9 +147,9 @@ void pyGrassShader::SetWaveSpeed(int waveNum, hsScalar speed)
// Getter functions
//////////////////////////////////////////////////////////////////////
std::vector<hsScalar> pyGrassShader::GetWaveDistortion(int waveNum) const
std::vector<float> pyGrassShader::GetWaveDistortion(int waveNum) const
{
std::vector<hsScalar> retVal;
std::vector<float> retVal;
retVal.push_back(-1);
retVal.push_back(-1);
retVal.push_back(-1);
@ -174,9 +174,9 @@ std::vector<hsScalar> pyGrassShader::GetWaveDistortion(int waveNum) const
return retVal;
}
std::vector<hsScalar> pyGrassShader::GetWaveDirection(int waveNum) const
std::vector<float> pyGrassShader::GetWaveDirection(int waveNum) const
{
std::vector<hsScalar> retVal;
std::vector<float> retVal;
retVal.push_back(-1);
retVal.push_back(-1);
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
@ -199,7 +199,7 @@ std::vector<hsScalar> pyGrassShader::GetWaveDirection(int waveNum) const
return retVal;
}
hsScalar pyGrassShader::GetWaveSpeed(int waveNum) const
float pyGrassShader::GetWaveSpeed(int waveNum) const
{
if ((waveNum < 0)||(waveNum >= plGrassShaderMod::kNumWaves))
{

View File

@ -77,13 +77,13 @@ public:
void SetKey(plKey key);
void SetWaveDistortion(int waveNum, const std::vector<hsScalar> & distortion);
void SetWaveDirection(int waveNum, const std::vector<hsScalar> & direction);
void SetWaveSpeed(int waveNum, hsScalar speed);
void SetWaveDistortion(int waveNum, const std::vector<float> & distortion);
void SetWaveDirection(int waveNum, const std::vector<float> & direction);
void SetWaveSpeed(int waveNum, float speed);
std::vector<hsScalar> GetWaveDistortion(int waveNum) const;
std::vector<hsScalar> GetWaveDirection(int waveNum) const;
hsScalar GetWaveSpeed(int waveNum) const;
std::vector<float> GetWaveDistortion(int waveNum) const;
std::vector<float> GetWaveDirection(int waveNum) const;
float GetWaveSpeed(int waveNum) const;
void ResetWaves();
};

View File

@ -85,7 +85,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDistortion, args)
}
int len = PyTuple_Size(tupleObject);
std::vector<hsScalar> vecArgs;
std::vector<float> vecArgs;
for (int curArg = 0; curArg < len; curArg++)
{
PyObject *arg = PyTuple_GetItem(tupleObject, curArg);
@ -94,7 +94,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDistortion, args)
PyErr_SetString(PyExc_TypeError, "setWaveDistortion expects a integer and tuple of floats");
PYTHON_RETURN_ERROR;
}
vecArgs.push_back((hsScalar)PyFloat_AsDouble(arg));
vecArgs.push_back((float)PyFloat_AsDouble(arg));
}
self->fThis->SetWaveDistortion(waveNum, vecArgs);
@ -117,7 +117,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDirection, args)
}
int len = PyTuple_Size(tupleObject);
std::vector<hsScalar> vecArgs;
std::vector<float> vecArgs;
for (int curArg = 0; curArg < len; curArg++)
{
PyObject *arg = PyTuple_GetItem(tupleObject, curArg);
@ -126,7 +126,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, setWaveDirection, args)
PyErr_SetString(PyExc_TypeError, "setWaveDirection expects a integer and tuple of floats");
PYTHON_RETURN_ERROR;
}
vecArgs.push_back((hsScalar)PyFloat_AsDouble(arg));
vecArgs.push_back((float)PyFloat_AsDouble(arg));
}
self->fThis->SetWaveDirection(waveNum, vecArgs);
@ -155,7 +155,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, getWaveDistortion, args)
PYTHON_RETURN_ERROR;
}
std::vector<hsScalar> vecArgs = self->fThis->GetWaveDistortion(waveNum);
std::vector<float> vecArgs = self->fThis->GetWaveDistortion(waveNum);
PyObject *retVal = PyTuple_New(vecArgs.size());
for (int curArg = 0; curArg < vecArgs.size(); curArg++)
PyTuple_SetItem(retVal, curArg, PyFloat_FromDouble((double)vecArgs[curArg]));
@ -171,7 +171,7 @@ PYTHON_METHOD_DEFINITION(ptGrassShader, getWaveDirection, args)
PYTHON_RETURN_ERROR;
}
std::vector<hsScalar> vecArgs = self->fThis->GetWaveDirection(waveNum);
std::vector<float> vecArgs = self->fThis->GetWaveDirection(waveNum);
PyObject *retVal = PyTuple_New(vecArgs.size());
for (int curArg = 0; curArg < vecArgs.size(); curArg++)
PyTuple_SetItem(retVal, curArg, PyFloat_FromDouble((double)vecArgs[curArg]));

View File

@ -209,7 +209,7 @@ void pyJournalBook::GoToPage( uint32_t page )
fBook->GoToPage( page );
}
void pyJournalBook::SetSize( hsScalar width, hsScalar height )
void pyJournalBook::SetSize( float width, float height )
{
if( fBook != nil )
fBook->SetBookSize( width, height );

View File

@ -115,7 +115,7 @@ public:
virtual void SetPageMargin( uint32_t margin );
virtual void AllowPageTurning( bool allow );
virtual void SetSize( hsScalar width, hsScalar height );
virtual void SetSize( float width, float height );
virtual void SetGUI( const char *guiName );

View File

@ -83,9 +83,9 @@ PyObject* pyMatrix44::GetTranslate(PyObject* pt)
return pt;
}
hsScalar* pyMatrix44::GetData()
float* pyMatrix44::GetData()
{
hsScalar *res = new hsScalar[4*4];
float *res = new float[4*4];
res[0] = fMatrix.fMap[0][0]; res[1] = fMatrix.fMap[0][1]; res[2] = fMatrix.fMap[0][2]; res[3] = fMatrix.fMap[0][3];
res[4] = fMatrix.fMap[1][0]; res[5] = fMatrix.fMap[1][1]; res[6] = fMatrix.fMap[1][2]; res[7] = fMatrix.fMap[1][3];
res[8] = fMatrix.fMap[2][0]; res[9] = fMatrix.fMap[2][1]; res[10] = fMatrix.fMap[2][2]; res[11] = fMatrix.fMap[2][3];
@ -94,7 +94,7 @@ hsScalar* pyMatrix44::GetData()
return res;
}
void pyMatrix44::SetData(const hsScalar mat[])
void pyMatrix44::SetData(const float mat[])
{
fMatrix.fMap[0][0] = mat[0];
fMatrix.fMap[0][1] = mat[1];

View File

@ -78,15 +78,15 @@ public:
PyObject* Copy() { return pyMatrix44::New(fMatrix); } // returns pyMatrix44
void Translate(pyVector3 v) { fMatrix.Translate(&v.fVector); }
void Scale(pyVector3 v) { fMatrix.Scale(&v.fVector); }
void Rotate(int axis, hsScalar radians) { fMatrix.Rotate(axis,radians); }
void Rotate(int axis, float radians) { fMatrix.Rotate(axis,radians); }
void Reset() { fMatrix.Reset(); }
void MakeTranslateMat(pyVector3 trans) { fMatrix.MakeTranslateMat(&trans.fVector); }
void MakeScaleMat(pyVector3 scale) { fMatrix.MakeScaleMat(&scale.fVector); }
void MakeRotateMat(int axis, hsScalar radians) { fMatrix.MakeRotateMat(axis,radians); }
void MakeRotateMat(int axis, float radians) { fMatrix.MakeRotateMat(axis,radians); }
void Make(pyPoint3 from,pyPoint3 at,pyVector3 up) { fMatrix.Make(&from.fPoint,&at.fPoint,&up.fVector); }
void MakeUpPreserving(pyPoint3 from,pyPoint3 at,pyVector3 up) { fMatrix.MakeUpPreserving(&from.fPoint,&at.fPoint,&up.fVector); }
hsBool GetParity() { return fMatrix.GetParity(); }
hsScalar GetDeterminant() { return fMatrix.GetDeterminant(); }
float GetDeterminant() { return fMatrix.GetDeterminant(); }
PyObject* GetInverse(PyObject* inverse); // returns (and accepts) pyMatrix44
PyObject* GetTranspose(PyObject* inverse); // returns (and accepts) pyMatrix44
PyObject* GetAdjoint(PyObject* adjoint); // returns (and accepts) pyMatrix44
@ -95,8 +95,8 @@ public:
PyObject* GetUpAxis() { return pyVector3::New(fMatrix.GetAxis(hsMatrix44::kUp)); } // returns pyVector3
PyObject* GetRightAxis() { return pyVector3::New(fMatrix.GetAxis(hsMatrix44::kRight)); } // returns pyVector3
hsScalar* GetData();
void SetData(const hsScalar mat[]);
float* GetData();
void SetData(const float mat[]);
};

View File

@ -300,7 +300,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, right)
PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, getData)
{
hsScalar *mat = self->fThis->GetData();
float *mat = self->fThis->GetData();
PyObject *retVal = Py_BuildValue("(ffff)(ffff)(ffff)(ffff)",
mat[0], mat[1], mat[2], mat[3],
@ -320,7 +320,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, getData)
PYTHON_METHOD_DEFINITION(ptMatrix44, setData, args)
{
hsScalar mat[4*4];
float mat[4*4];
if (!PyArg_ParseTuple(args, "((ffff)(ffff)(ffff)(ffff))",
&mat[0], &mat[1], &mat[2], &mat[3],

View File

@ -93,7 +93,7 @@ void pyMoviePlayer::MakeMovie(const char* movieName, pyKey& selfKey)
}
}
void pyMoviePlayer::SetCenter(hsScalar x, hsScalar y)
void pyMoviePlayer::SetCenter(float x, float y)
{
if ( fMovieName)
{
@ -105,7 +105,7 @@ void pyMoviePlayer::SetCenter(hsScalar x, hsScalar y)
}
}
void pyMoviePlayer::SetScale(hsScalar width, hsScalar height)
void pyMoviePlayer::SetScale(float width, float height)
{
if ( fMovieName)
{
@ -128,7 +128,7 @@ void pyMoviePlayer::SetColor(pyColor color)
}
}
void pyMoviePlayer::SetVolume(hsScalar volume)
void pyMoviePlayer::SetVolume(float volume)
{
if ( fMovieName)
{
@ -139,7 +139,7 @@ void pyMoviePlayer::SetVolume(hsScalar volume)
}
}
void pyMoviePlayer::SetOpacity(hsScalar opacity)
void pyMoviePlayer::SetOpacity(float opacity)
{
if ( fMovieName)
{

View File

@ -77,11 +77,11 @@ public:
void MakeMovie(const char* movieName, pyKey& selfKey); // only used by python glue, do NOT call
// getters and setters
virtual void SetCenter(hsScalar x, hsScalar y);
virtual void SetScale(hsScalar width, hsScalar height);
virtual void SetCenter(float x, float y);
virtual void SetScale(float width, float height);
virtual void SetColor(pyColor color);
virtual void SetVolume(hsScalar volume);
virtual void SetOpacity(hsScalar opacity);
virtual void SetVolume(float volume);
virtual void SetOpacity(float opacity);
// actions
virtual void Play(); // kStart

View File

@ -112,7 +112,7 @@ void pyNotify::SetNetForce(hsBool state)
}
void pyNotify::SetActivateState(hsScalar state)
void pyNotify::SetActivateState(float state)
{
fBuildMsg.SetState(state);
}
@ -146,7 +146,7 @@ void pyNotify::AddControlKeyEvent( int32_t key, hsBool down )
fBuildMsg.AddControlKeyEvent(key,down);
}
void pyNotify::AddVarNumber(const char* name, hsScalar number)
void pyNotify::AddVarNumber(const char* name, float number)
{
fBuildMsg.AddVariableEvent(name,number);
}
@ -156,7 +156,7 @@ void pyNotify::AddVarKey(const char* name, pyKey* key)
fBuildMsg.AddVariableEvent(name, key ? key->getKey() : plKey() );
}
void pyNotify::AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, hsScalar dot)
void pyNotify::AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, float dot)
{
fBuildMsg.AddFacingEvent( other ? other->getKey() : plKey(),
self ? self->getKey() : plKey(),

View File

@ -92,16 +92,16 @@ public:
virtual void AddReceiver(pyKey* key);
virtual void SetNetPropagate(hsBool propagate);
virtual void SetNetForce(hsBool state);
virtual void SetActivateState(hsScalar state);
virtual void SetActivateState(float state);
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_t key, hsBool down );
virtual void AddVarNumber(const char* name, hsScalar number);
virtual void AddVarNumber(const char* name, float number);
virtual void AddVarKey(const char* name, pyKey* key);
virtual void AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, hsScalar dot);
virtual void AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, float dot);
virtual void AddContainerEvent( hsBool entering, pyKey* container, pyKey* contained);
virtual void AddActivateEvent( hsBool active, hsBool activate );
virtual void AddCallbackEvent( int32_t event );

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_t pid, hsScalar distsq)
pyPlayer::pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, float distsq)
{
fAvatarKey = avKey.getKey();
fPlayerName = pname;
@ -61,7 +61,7 @@ pyPlayer::pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, hsScalar dists
fIsServer = false;
}
pyPlayer::pyPlayer(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq)
pyPlayer::pyPlayer(plKey avKey, const char* pname, uint32_t pid, float distsq)
{
fAvatarKey = avKey;
fPlayerName = pname;
@ -82,7 +82,7 @@ pyPlayer::pyPlayer(const char* pname, uint32_t pid)
fIsServer = false;
}
void pyPlayer::Init(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq) // used by python glue, do NOT call
void pyPlayer::Init(plKey avKey, const char* pname, uint32_t pid, float distsq) // used by python glue, do NOT call
{
fAvatarKey = avKey;
fPlayerName = pname;

View File

@ -63,22 +63,22 @@ protected:
plKey fAvatarKey;
std::string fPlayerName;
uint32_t fPlayerID;
hsScalar fDistSq; // from local player, temp
float 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_t pid, hsScalar distsq);
pyPlayer(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq);
pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, float distsq);
pyPlayer(plKey avKey, const char* pname, uint32_t pid, float distsq);
// another way to create a player with just a name and number
pyPlayer(const char* pname, uint32_t pid);
public:
void Init(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq); // used by python glue, do NOT call
void Init(plKey avKey, const char* pname, uint32_t pid, float 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_t pid, hsScalar distsq);
static PyObject *New(plKey avKey, const char* pname, uint32_t pid, hsScalar distsq);
static PyObject *New(pyKey& avKey, const char* pname, uint32_t pid, float distsq);
static PyObject *New(plKey avKey, const char* pname, uint32_t pid, float 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)
@ -106,7 +106,7 @@ public:
return fPlayerID;
}
hsScalar GetDistSq() const { return fDistSq; }
float GetDistSq() const { return fDistSq; }
void SetCCRFlag(hsBool state);
hsBool IsCCR();

View File

@ -52,12 +52,12 @@ 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_t, hsScalar
// argument set 1: pyKey, string, uint32_t, float
// 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_t
PyObject* thirdObj = NULL; // uint32_t
PyObject* fourthObj = NULL; // hsScalar
PyObject* fourthObj = NULL; // float
if (!PyArg_ParseTuple(args, "OO|OO", &firstObj, &secondObj, &thirdObj, &fourthObj))
{
PyErr_SetString(PyExc_TypeError, "__init__ expects one of two argument lists: (ptKey, string, unsigned long, float) or (string, unsigned long)");
@ -193,14 +193,14 @@ 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_t pid, hsScalar distsq)
PyObject *pyPlayer::New(pyKey& avKey, const char* pname, uint32_t pid, float 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_t pid, hsScalar distsq)
PyObject *pyPlayer::New(plKey avKey, const char* pname, uint32_t pid, float distsq)
{
ptPlayer *newObj = (ptPlayer*)ptPlayer_type.tp_new(&ptPlayer_type, NULL, NULL);
newObj->fThis->Init(avKey, pname, pid, distsq);

View File

@ -52,7 +52,7 @@ pySwimCurrentInterface::pySwimCurrentInterface(pyKey& key)
fSwimCurrentKey = key.getKey();
}
hsScalar pySwimCurrentInterface::getNearDist()
float pySwimCurrentInterface::getNearDist()
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -70,7 +70,7 @@ hsScalar pySwimCurrentInterface::getNearDist()
}
}
void pySwimCurrentInterface::setNearDist(hsScalar val)
void pySwimCurrentInterface::setNearDist(float val)
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -84,7 +84,7 @@ void pySwimCurrentInterface::setNearDist(hsScalar val)
}
}
hsScalar pySwimCurrentInterface::getFarDist()
float pySwimCurrentInterface::getFarDist()
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -102,7 +102,7 @@ hsScalar pySwimCurrentInterface::getFarDist()
}
}
void pySwimCurrentInterface::setFarDist(hsScalar val)
void pySwimCurrentInterface::setFarDist(float val)
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -116,7 +116,7 @@ void pySwimCurrentInterface::setFarDist(hsScalar val)
}
}
hsScalar pySwimCurrentInterface::getNearVel()
float pySwimCurrentInterface::getNearVel()
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -134,7 +134,7 @@ hsScalar pySwimCurrentInterface::getNearVel()
}
}
void pySwimCurrentInterface::setNearVel(hsScalar val)
void pySwimCurrentInterface::setNearVel(float val)
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -148,7 +148,7 @@ void pySwimCurrentInterface::setNearVel(hsScalar val)
}
}
hsScalar pySwimCurrentInterface::getFarVel()
float pySwimCurrentInterface::getFarVel()
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -166,7 +166,7 @@ hsScalar pySwimCurrentInterface::getFarVel()
}
}
void pySwimCurrentInterface::setFarVel(hsScalar val)
void pySwimCurrentInterface::setFarVel(float val)
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -180,7 +180,7 @@ void pySwimCurrentInterface::setFarVel(hsScalar val)
}
}
hsScalar pySwimCurrentInterface::getRotation()
float pySwimCurrentInterface::getRotation()
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();
@ -194,7 +194,7 @@ hsScalar pySwimCurrentInterface::getRotation()
}
}
void pySwimCurrentInterface::setRotation(hsScalar val)
void pySwimCurrentInterface::setRotation(float val)
{
hsKeyedObject* obj = fSwimCurrentKey->ObjectIsLoaded();

View File

@ -69,20 +69,20 @@ public:
void setKey(pyKey& key) {fSwimCurrentKey = key.getKey();} // for python glue only, do NOT call
hsScalar getNearDist();
void setNearDist(hsScalar val);
float getNearDist();
void setNearDist(float val);
hsScalar getFarDist();
void setFarDist(hsScalar val);
float getFarDist();
void setFarDist(float val);
hsScalar getNearVel();
void setNearVel(hsScalar val);
float getNearVel();
void setNearVel(float val);
hsScalar getFarVel();
void setFarVel(hsScalar val);
float getFarVel();
void setFarVel(float val);
hsScalar getRotation();
void setRotation(hsScalar val);
float getRotation();
void setRotation(float val);
void enable();
void disable();

View File

@ -56,7 +56,7 @@ pyWaveSet::pyWaveSet(pyKey& key)
// Geometric wave parameters. These are all safe to twiddle at any time or speed.
// The new settings take effect as new waves are spawned.
void pyWaveSet::SetGeoMaxLength(hsScalar s, hsScalar secs)
void pyWaveSet::SetGeoMaxLength(float s, float secs)
{
if (fWaterKey)
{
@ -68,7 +68,7 @@ void pyWaveSet::SetGeoMaxLength(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetGeoMinLength(hsScalar s, hsScalar secs)
void pyWaveSet::SetGeoMinLength(float s, float secs)
{
if (fWaterKey)
{
@ -80,7 +80,7 @@ void pyWaveSet::SetGeoMinLength(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetGeoAmpOverLen(hsScalar s, hsScalar secs)
void pyWaveSet::SetGeoAmpOverLen(float s, float secs)
{
if (fWaterKey)
{
@ -92,7 +92,7 @@ void pyWaveSet::SetGeoAmpOverLen(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetGeoChop(hsScalar s, hsScalar secs)
void pyWaveSet::SetGeoChop(float s, float secs)
{
if (fWaterKey)
{
@ -104,7 +104,7 @@ void pyWaveSet::SetGeoChop(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetGeoAngleDev(hsScalar s, hsScalar secs)
void pyWaveSet::SetGeoAngleDev(float s, float secs)
{
if (fWaterKey)
{
@ -120,7 +120,7 @@ void pyWaveSet::SetGeoAngleDev(hsScalar s, hsScalar secs)
// Texture wave parameters. Safe to twiddle any time or speed.
// The new settings take effect as new waves are spawned.
void pyWaveSet::SetTexMaxLength(hsScalar s, hsScalar secs)
void pyWaveSet::SetTexMaxLength(float s, float secs)
{
if (fWaterKey)
{
@ -132,7 +132,7 @@ void pyWaveSet::SetTexMaxLength(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetTexMinLength(hsScalar s, hsScalar secs)
void pyWaveSet::SetTexMinLength(float s, float secs)
{
if (fWaterKey)
{
@ -144,7 +144,7 @@ void pyWaveSet::SetTexMinLength(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetTexAmpOverLen(hsScalar s, hsScalar secs)
void pyWaveSet::SetTexAmpOverLen(float s, float secs)
{
if (fWaterKey)
{
@ -156,7 +156,7 @@ void pyWaveSet::SetTexAmpOverLen(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetTexChop(hsScalar s, hsScalar secs)
void pyWaveSet::SetTexChop(float s, float secs)
{
if (fWaterKey)
{
@ -168,7 +168,7 @@ void pyWaveSet::SetTexChop(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetTexAngleDev(hsScalar s, hsScalar secs)
void pyWaveSet::SetTexAngleDev(float s, float secs)
{
if (fWaterKey)
{
@ -183,7 +183,7 @@ void pyWaveSet::SetTexAngleDev(hsScalar s, hsScalar secs)
// The size in feet of one tile of the ripple texture. If you change this (I don't
// recommend it), you need to change it very slowly or it will look very stupid.
void pyWaveSet::SetRippleScale(hsScalar s, hsScalar secs)
void pyWaveSet::SetRippleScale(float s, float secs)
{
if (fWaterKey)
{
@ -199,7 +199,7 @@ void pyWaveSet::SetRippleScale(hsScalar s, hsScalar secs)
// The direction the wind is blowing (waves will be more or less perpindicular to wind dir).
// Change somewhat slowly, like over 30 seconds.
void pyWaveSet::SetWindDir(const pyVector3& s, hsScalar secs)
void pyWaveSet::SetWindDir(const pyVector3& s, float secs)
{
if (fWaterKey)
{
@ -214,7 +214,7 @@ void pyWaveSet::SetWindDir(const pyVector3& s, hsScalar secs)
// --------------------------------------------------------------------------------
// Change these gently, effect is immediate.
void pyWaveSet::SetSpecularNoise(hsScalar s, hsScalar secs)
void pyWaveSet::SetSpecularNoise(float s, float secs)
{
if (fWaterKey)
{
@ -226,7 +226,7 @@ void pyWaveSet::SetSpecularNoise(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetSpecularStart(hsScalar s, hsScalar secs)
void pyWaveSet::SetSpecularStart(float s, float secs)
{
if (fWaterKey)
{
@ -238,7 +238,7 @@ void pyWaveSet::SetSpecularStart(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetSpecularEnd(hsScalar s, hsScalar secs)
void pyWaveSet::SetSpecularEnd(float s, float secs)
{
if (fWaterKey)
{
@ -253,7 +253,7 @@ void pyWaveSet::SetSpecularEnd(hsScalar s, hsScalar secs)
// --------------------------------------------------------------------------------
// Water Height is overriden if the ref object is animated.
void pyWaveSet::SetWaterHeight(hsScalar s, hsScalar secs)
void pyWaveSet::SetWaterHeight(float s, float secs)
{
if (fWaterKey)
{
@ -268,7 +268,7 @@ void pyWaveSet::SetWaterHeight(hsScalar s, hsScalar secs)
// --------------------------------------------------------------------------------
// Water Offset and DepthFalloff are complicated, and not immediately interesting to animate.
void pyWaveSet::SetWaterOffset(const pyVector3& s, hsScalar secs)
void pyWaveSet::SetWaterOffset(const pyVector3& s, float secs)
{
if (fWaterKey)
{
@ -280,7 +280,7 @@ void pyWaveSet::SetWaterOffset(const pyVector3& s, hsScalar secs)
}
}
void pyWaveSet::SetOpacOffset(hsScalar s, hsScalar secs)
void pyWaveSet::SetOpacOffset(float s, float secs)
{
if (fWaterKey)
{
@ -292,7 +292,7 @@ void pyWaveSet::SetOpacOffset(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetReflOffset(hsScalar s, hsScalar secs)
void pyWaveSet::SetReflOffset(float s, float secs)
{
if (fWaterKey)
{
@ -304,7 +304,7 @@ void pyWaveSet::SetReflOffset(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetWaveOffset(hsScalar s, hsScalar secs)
void pyWaveSet::SetWaveOffset(float s, float secs)
{
if (fWaterKey)
{
@ -316,7 +316,7 @@ void pyWaveSet::SetWaveOffset(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetDepthFalloff(const pyVector3& s, hsScalar secs)
void pyWaveSet::SetDepthFalloff(const pyVector3& s, float secs)
{
if (fWaterKey)
{
@ -328,7 +328,7 @@ void pyWaveSet::SetDepthFalloff(const pyVector3& s, hsScalar secs)
}
}
void pyWaveSet::SetOpacFalloff(hsScalar s, hsScalar secs)
void pyWaveSet::SetOpacFalloff(float s, float secs)
{
if (fWaterKey)
{
@ -340,7 +340,7 @@ void pyWaveSet::SetOpacFalloff(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetReflFalloff(hsScalar s, hsScalar secs)
void pyWaveSet::SetReflFalloff(float s, float secs)
{
if (fWaterKey)
{
@ -352,7 +352,7 @@ void pyWaveSet::SetReflFalloff(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetWaveFalloff(hsScalar s, hsScalar secs)
void pyWaveSet::SetWaveFalloff(float s, float secs)
{
if (fWaterKey)
{
@ -367,7 +367,7 @@ void pyWaveSet::SetWaveFalloff(hsScalar s, hsScalar secs)
// --------------------------------------------------------------------------------
// Max and Min Atten aren't very interesting, and will probably go away.
void pyWaveSet::SetMaxAtten(const pyVector3& s, hsScalar secs)
void pyWaveSet::SetMaxAtten(const pyVector3& s, float secs)
{
if (fWaterKey)
{
@ -379,7 +379,7 @@ void pyWaveSet::SetMaxAtten(const pyVector3& s, hsScalar secs)
}
}
void pyWaveSet::SetMinAtten(const pyVector3& s, hsScalar secs)
void pyWaveSet::SetMinAtten(const pyVector3& s, float secs)
{
if (fWaterKey)
{
@ -394,7 +394,7 @@ void pyWaveSet::SetMinAtten(const pyVector3& s, hsScalar secs)
// --------------------------------------------------------------------------------
// Water colors, adjust slowly, effect is immediate.
void pyWaveSet::SetWaterTint(pyColor& s, hsScalar secs)
void pyWaveSet::SetWaterTint(pyColor& s, float secs)
{
if (fWaterKey)
{
@ -406,7 +406,7 @@ void pyWaveSet::SetWaterTint(pyColor& s, hsScalar secs)
}
}
void pyWaveSet::SetWaterOpacity(hsScalar s, hsScalar secs)
void pyWaveSet::SetWaterOpacity(float s, float secs)
{
if (fWaterKey)
{
@ -418,7 +418,7 @@ void pyWaveSet::SetWaterOpacity(hsScalar s, hsScalar secs)
}
}
void pyWaveSet::SetSpecularTint(pyColor& s, hsScalar secs)
void pyWaveSet::SetSpecularTint(pyColor& s, float secs)
{
if (fWaterKey)
{
@ -430,7 +430,7 @@ void pyWaveSet::SetSpecularTint(pyColor& s, hsScalar secs)
}
}
void pyWaveSet::SetSpecularMute(hsScalar s, hsScalar secs)
void pyWaveSet::SetSpecularMute(float s, float secs)
{
if (fWaterKey)
{
@ -447,7 +447,7 @@ void pyWaveSet::SetSpecularMute(hsScalar s, hsScalar secs)
// the sphere north will move the reflections north, changing the radius of the
// sphere effects parallax in the obvious way.
void pyWaveSet::SetEnvCenter(const pyPoint3& s, hsScalar secs)
void pyWaveSet::SetEnvCenter(const pyPoint3& s, float secs)
{
if (fWaterKey)
{
@ -459,7 +459,7 @@ void pyWaveSet::SetEnvCenter(const pyPoint3& s, hsScalar secs)
}
}
void pyWaveSet::SetEnvRadius(hsScalar s, hsScalar secs)
void pyWaveSet::SetEnvRadius(float s, float secs)
{
if (fWaterKey)
{
@ -478,7 +478,7 @@ void pyWaveSet::SetEnvRadius(hsScalar s, hsScalar secs)
// ================================================================================
// --------------------------------------------------------------------------------
hsScalar pyWaveSet::GetGeoMaxLength() const
float pyWaveSet::GetGeoMaxLength() const
{
if (fWaterKey)
{
@ -492,7 +492,7 @@ hsScalar pyWaveSet::GetGeoMaxLength() const
return -1;
}
hsScalar pyWaveSet::GetGeoMinLength() const
float pyWaveSet::GetGeoMinLength() const
{
if (fWaterKey)
{
@ -506,7 +506,7 @@ hsScalar pyWaveSet::GetGeoMinLength() const
return -1;
}
hsScalar pyWaveSet::GetGeoAmpOverLen() const
float pyWaveSet::GetGeoAmpOverLen() const
{
if (fWaterKey)
{
@ -520,7 +520,7 @@ hsScalar pyWaveSet::GetGeoAmpOverLen() const
return -1;
}
hsScalar pyWaveSet::GetGeoChop() const
float pyWaveSet::GetGeoChop() const
{
if (fWaterKey)
{
@ -534,7 +534,7 @@ hsScalar pyWaveSet::GetGeoChop() const
return -1;
}
hsScalar pyWaveSet::GetGeoAngleDev() const
float pyWaveSet::GetGeoAngleDev() const
{
if (fWaterKey)
{
@ -550,7 +550,7 @@ hsScalar pyWaveSet::GetGeoAngleDev() const
// --------------------------------------------------------------------------------
hsScalar pyWaveSet::GetTexMaxLength() const
float pyWaveSet::GetTexMaxLength() const
{
if (fWaterKey)
{
@ -564,7 +564,7 @@ hsScalar pyWaveSet::GetTexMaxLength() const
return -1;
}
hsScalar pyWaveSet::GetTexMinLength() const
float pyWaveSet::GetTexMinLength() const
{
if (fWaterKey)
{
@ -578,7 +578,7 @@ hsScalar pyWaveSet::GetTexMinLength() const
return -1;
}
hsScalar pyWaveSet::GetTexAmpOverLen() const
float pyWaveSet::GetTexAmpOverLen() const
{
if (fWaterKey)
{
@ -592,7 +592,7 @@ hsScalar pyWaveSet::GetTexAmpOverLen() const
return -1;
}
hsScalar pyWaveSet::GetTexChop() const
float pyWaveSet::GetTexChop() const
{
if (fWaterKey)
{
@ -606,7 +606,7 @@ hsScalar pyWaveSet::GetTexChop() const
return -1;
}
hsScalar pyWaveSet::GetTexAngleDev() const
float pyWaveSet::GetTexAngleDev() const
{
if (fWaterKey)
{
@ -622,7 +622,7 @@ hsScalar pyWaveSet::GetTexAngleDev() const
// --------------------------------------------------------------------------------
hsScalar pyWaveSet::GetRippleScale() const
float pyWaveSet::GetRippleScale() const
{
if (fWaterKey)
{
@ -654,7 +654,7 @@ PyObject* pyWaveSet::GetWindDir() const
// --------------------------------------------------------------------------------
hsScalar pyWaveSet::GetSpecularNoise() const
float pyWaveSet::GetSpecularNoise() const
{
if (fWaterKey)
{
@ -668,7 +668,7 @@ hsScalar pyWaveSet::GetSpecularNoise() const
return -1;
}
hsScalar pyWaveSet::GetSpecularStart() const
float pyWaveSet::GetSpecularStart() const
{
if (fWaterKey)
{
@ -682,7 +682,7 @@ hsScalar pyWaveSet::GetSpecularStart() const
return -1;
}
hsScalar pyWaveSet::GetSpecularEnd() const
float pyWaveSet::GetSpecularEnd() const
{
if (fWaterKey)
{
@ -698,7 +698,7 @@ hsScalar pyWaveSet::GetSpecularEnd() const
// --------------------------------------------------------------------------------
hsScalar pyWaveSet::GetWaterHeight() const
float pyWaveSet::GetWaterHeight() const
{
if (fWaterKey)
{
@ -728,7 +728,7 @@ PyObject* pyWaveSet::GetWaterOffset() const
PYTHON_RETURN_NONE;
}
hsScalar pyWaveSet::GetOpacOffset() const
float pyWaveSet::GetOpacOffset() const
{
if (fWaterKey)
{
@ -742,7 +742,7 @@ hsScalar pyWaveSet::GetOpacOffset() const
return -1;
}
hsScalar pyWaveSet::GetReflOffset() const
float pyWaveSet::GetReflOffset() const
{
if (fWaterKey)
{
@ -756,7 +756,7 @@ hsScalar pyWaveSet::GetReflOffset() const
return -1;
}
hsScalar pyWaveSet::GetWaveOffset() const
float pyWaveSet::GetWaveOffset() const
{
if (fWaterKey)
{
@ -784,7 +784,7 @@ PyObject* pyWaveSet::GetDepthFalloff() const
PYTHON_RETURN_NONE;
}
hsScalar pyWaveSet::GetOpacFalloff() const
float pyWaveSet::GetOpacFalloff() const
{
if (fWaterKey)
{
@ -798,7 +798,7 @@ hsScalar pyWaveSet::GetOpacFalloff() const
return -1;
}
hsScalar pyWaveSet::GetReflFalloff() const
float pyWaveSet::GetReflFalloff() const
{
if (fWaterKey)
{
@ -812,7 +812,7 @@ hsScalar pyWaveSet::GetReflFalloff() const
return -1;
}
hsScalar pyWaveSet::GetWaveFalloff() const
float pyWaveSet::GetWaveFalloff() const
{
if (fWaterKey)
{
@ -872,7 +872,7 @@ PyObject* pyWaveSet::GetWaterTint() const
PYTHON_RETURN_NONE;
}
hsScalar pyWaveSet::GetWaterOpacity() const
float pyWaveSet::GetWaterOpacity() const
{
if (fWaterKey)
{
@ -900,7 +900,7 @@ PyObject* pyWaveSet::GetSpecularTint() const
PYTHON_RETURN_NONE;
}
hsScalar pyWaveSet::GetSpecularMute() const
float pyWaveSet::GetSpecularMute() const
{
if (fWaterKey)
{
@ -930,7 +930,7 @@ PyObject* pyWaveSet::GetEnvCenter() const
PYTHON_RETURN_NONE;
}
hsScalar pyWaveSet::GetEnvRadius() const
float pyWaveSet::GetEnvRadius() const
{
if (fWaterKey)
{

View File

@ -111,108 +111,108 @@ public:
// Geometric wave parameters. These are all safe to twiddle at any time or speed.
// The new settings take effect as new waves are spawned.
void SetGeoMaxLength(hsScalar s, hsScalar secs=0);
void SetGeoMinLength(hsScalar s, hsScalar secs=0);
void SetGeoAmpOverLen(hsScalar s, hsScalar secs=0);
void SetGeoChop(hsScalar s, hsScalar secs=0);
void SetGeoAngleDev(hsScalar s, hsScalar secs=0);
void SetGeoMaxLength(float s, float secs=0);
void SetGeoMinLength(float s, float secs=0);
void SetGeoAmpOverLen(float s, float secs=0);
void SetGeoChop(float s, float secs=0);
void SetGeoAngleDev(float s, float secs=0);
// Texture wave parameters. Safe to twiddle any time or speed.
// The new settings take effect as new waves are spawned.
void SetTexMaxLength(hsScalar s, hsScalar secs=0);
void SetTexMinLength(hsScalar s, hsScalar secs=0);
void SetTexAmpOverLen(hsScalar s, hsScalar secs=0);
void SetTexChop(hsScalar s, hsScalar secs=0);
void SetTexAngleDev(hsScalar s, hsScalar secs=0);
void SetTexMaxLength(float s, float secs=0);
void SetTexMinLength(float s, float secs=0);
void SetTexAmpOverLen(float s, float secs=0);
void SetTexChop(float s, float secs=0);
void SetTexAngleDev(float s, float secs=0);
// The size in feet of one tile of the ripple texture. If you change this (I don't
// recommend it), you need to change it very slowly or it will look very stupid.
void SetRippleScale(hsScalar s, hsScalar secs=0);
void SetRippleScale(float s, float secs=0);
// The direction the wind is blowing (waves will be more or less perpindicular to wind dir).
// Change somewhat slowly, like over 30 seconds.
void SetWindDir(const pyVector3& s, hsScalar secs=0);
void SetWindDir(const pyVector3& s, float secs=0);
// Change these gently, effect is immediate.
void SetSpecularNoise(hsScalar s, hsScalar secs=0);
void SetSpecularStart(hsScalar s, hsScalar secs=0);
void SetSpecularEnd(hsScalar s, hsScalar secs=0);
void SetSpecularNoise(float s, float secs=0);
void SetSpecularStart(float s, float secs=0);
void SetSpecularEnd(float s, float secs=0);
// Water Height is overriden if the ref object is animated.
void SetWaterHeight(hsScalar s, hsScalar secs=0);
void SetWaterHeight(float s, float secs=0);
// Water Offset and DepthFalloff are complicated, and not immediately interesting to animate.
void SetWaterOffset(const pyVector3& s, hsScalar secs=0);
void SetOpacOffset(hsScalar s, hsScalar secs=0);
void SetReflOffset(hsScalar s, hsScalar secs=0);
void SetWaveOffset(hsScalar s, hsScalar secs=0);
void SetDepthFalloff(const pyVector3& s, hsScalar secs=0);
void SetOpacFalloff(hsScalar s, hsScalar secs=0);
void SetReflFalloff(hsScalar s, hsScalar secs=0);
void SetWaveFalloff(hsScalar s, hsScalar secs=0);
void SetWaterOffset(const pyVector3& s, float secs=0);
void SetOpacOffset(float s, float secs=0);
void SetReflOffset(float s, float secs=0);
void SetWaveOffset(float s, float secs=0);
void SetDepthFalloff(const pyVector3& s, float secs=0);
void SetOpacFalloff(float s, float secs=0);
void SetReflFalloff(float s, float secs=0);
void SetWaveFalloff(float s, float secs=0);
// Max and Min Atten aren't very interesting, and will probably go away.
void SetMaxAtten(const pyVector3& s, hsScalar secs=0);
void SetMinAtten(const pyVector3& s, hsScalar secs=0);
void SetMaxAtten(const pyVector3& s, float secs=0);
void SetMinAtten(const pyVector3& s, float secs=0);
// Water colors, adjust slowly, effect is immediate.
void SetWaterTint(pyColor& s, hsScalar secs=0);
void SetWaterOpacity(hsScalar s, hsScalar secs=0);
void SetSpecularTint(pyColor& s, hsScalar secs=0);
void SetSpecularMute(hsScalar s, hsScalar secs=0);
void SetWaterTint(pyColor& s, float secs=0);
void SetWaterOpacity(float s, float secs=0);
void SetSpecularTint(pyColor& s, float secs=0);
void SetSpecularMute(float s, float secs=0);
// The environment map is essentially projected onto a sphere. Moving the center of
// the sphere north will move the reflections north, changing the radius of the
// sphere effects parallax in the obvious way.
void SetEnvCenter(const pyPoint3& s, hsScalar secs=0);
void SetEnvRadius(hsScalar s, hsScalar secs=0);
void SetEnvCenter(const pyPoint3& s, float secs=0);
void SetEnvRadius(float s, float secs=0);
// ==============================================================================
// Get functions
// ==============================================================================
hsScalar GetGeoMaxLength() const;
hsScalar GetGeoMinLength() const;
hsScalar GetGeoAmpOverLen() const;
hsScalar GetGeoChop() const;
hsScalar GetGeoAngleDev() const;
float GetGeoMaxLength() const;
float GetGeoMinLength() const;
float GetGeoAmpOverLen() const;
float GetGeoChop() const;
float GetGeoAngleDev() const;
hsScalar GetTexMaxLength() const;
hsScalar GetTexMinLength() const;
hsScalar GetTexAmpOverLen() const;
hsScalar GetTexChop() const;
hsScalar GetTexAngleDev() const;
float GetTexMaxLength() const;
float GetTexMinLength() const;
float GetTexAmpOverLen() const;
float GetTexChop() const;
float GetTexAngleDev() const;
hsScalar GetRippleScale() const;
float GetRippleScale() const;
PyObject* GetWindDir() const; // returns pyVector3
hsScalar GetSpecularNoise() const;
hsScalar GetSpecularStart() const;
hsScalar GetSpecularEnd() const;
float GetSpecularNoise() const;
float GetSpecularStart() const;
float GetSpecularEnd() const;
hsScalar GetWaterHeight() const;
float GetWaterHeight() const;
PyObject* GetWaterOffset() const; // returns pyVector3
hsScalar GetOpacOffset() const;
hsScalar GetReflOffset() const;
hsScalar GetWaveOffset() const;
float GetOpacOffset() const;
float GetReflOffset() const;
float GetWaveOffset() const;
PyObject* GetDepthFalloff() const; // returns pyVector3
hsScalar GetOpacFalloff() const;
hsScalar GetReflFalloff() const;
hsScalar GetWaveFalloff() const;
float GetOpacFalloff() const;
float GetReflFalloff() const;
float GetWaveFalloff() const;
PyObject* GetMaxAtten() const; // returns pyVector3
PyObject* GetMinAtten() const; // returns pyVector3
PyObject* GetWaterTint() const; // returns pyColor
hsScalar GetWaterOpacity() const;
float GetWaterOpacity() const;
PyObject* GetSpecularTint() const; // returns pyColor
hsScalar GetSpecularMute() const;
float GetSpecularMute() const;
PyObject* GetEnvCenter() const; // returns pyPoint3
hsScalar GetEnvRadius() const;
float GetEnvRadius() const;
};