From 2af0a7f56ea5e8b32473108a147bc58ce3403c45 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 5 Jan 2013 21:48:03 -0800 Subject: [PATCH 01/12] Get rid of clang warnings in plAvatar. --- .../PubUtilLib/plAvatar/plAGMasterMod.cpp | 37 ++++++++++--------- .../PubUtilLib/plAvatar/plArmatureMod.cpp | 4 +- .../PubUtilLib/plAvatar/plArmatureMod.h | 4 +- .../PubUtilLib/plAvatar/plAvBrainClimb.cpp | 19 ++++++---- .../PubUtilLib/plAvatar/plAvBrainGeneric.cpp | 13 +++---- .../PubUtilLib/plAvatar/plAvBrainHuman.cpp | 6 +++ .../PubUtilLib/plAvatar/plAvBrainSwim.cpp | 4 ++ .../plAvatar/plAvLadderModifier.cpp | 2 +- .../PubUtilLib/plAvatar/plAvTaskSeek.cpp | 4 +- .../Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h | 6 +-- .../PubUtilLib/plAvatar/plAvatarClothing.cpp | 7 ++-- .../PubUtilLib/plAvatar/plAvatarClothing.h | 2 +- .../PubUtilLib/plAvatar/plAvatarTasks.cpp | 18 ++++----- .../PubUtilLib/plAvatar/plAvatarTasks.h | 4 +- .../PubUtilLib/plAvatar/plClothingLayout.h | 2 +- .../PubUtilLib/plAvatar/plCoopCoordinator.cpp | 3 +- .../plAvatar/plMultistageBehMod.cpp | 12 +++--- .../PubUtilLib/plAvatar/plSittingModifier.cpp | 16 +++++--- .../PubUtilLib/plAvatar/plSittingModifier.h | 2 +- .../PubUtilLib/plMessage/plAvatarMsg.cpp | 4 +- .../Plasma/PubUtilLib/plMessage/plAvatarMsg.h | 5 +-- 21 files changed, 95 insertions(+), 79 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp index 42ff1d66..7fb747d9 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp @@ -614,10 +614,6 @@ void plAGMasterMod::DumpCurrentAnims(const char *header) // receive trigger messages bool plAGMasterMod::MsgReceive(plMessage* msg) { - plAnimCmdMsg* cmdMsg; - plAGCmdMsg* agMsg; - int i; - plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg); if (nMsg) { @@ -626,7 +622,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) return true; } - if (cmdMsg = plAnimCmdMsg::ConvertNoRef(msg)) + plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg); + if (cmdMsg) { plString targetName = cmdMsg->GetAnimName(); @@ -638,7 +635,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) { if (cmdMsg->CmdChangesAnimTime()) { - for (i = 0; i < GetNumAnimations(); i++) + for (int i = 0; i < GetNumAnimations(); i++) { plAGAnimInstance *currInst = GetAnimInstance(i); if (currInst != inst && currInst->GetAnimation()->SharesPinsWith(inst->GetAnimation())) @@ -653,7 +650,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) return true; } - if (agMsg = plAGCmdMsg::ConvertNoRef(msg)) + plAGCmdMsg* agMsg = plAGCmdMsg::ConvertNoRef(msg); + if (agMsg) { if (agMsg->Cmd(plAGCmdMsg::kSetAnimTime)) { @@ -678,7 +676,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) } plAGInstanceCallbackMsg *agicMsg = plAGInstanceCallbackMsg::ConvertNoRef(msg); - if (agicMsg != nil) + if (agicMsg) { if (agicMsg->fEvent == kStart) { @@ -697,16 +695,16 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) } plAGDetachCallbackMsg *detachMsg = plAGDetachCallbackMsg::ConvertNoRef(msg); - if (detachMsg != nil) + if (detachMsg) { DetachAnimation(detachMsg->GetAnimName()); } - plGenRefMsg *genRefMsg; - if (genRefMsg = plGenRefMsg::ConvertNoRef(msg)) + plGenRefMsg *genRefMsg = plGenRefMsg::ConvertNoRef(msg); + if (genRefMsg) { - plAGAnim *anim; - if (anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef())) + plAGAnim *anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef()); + if (anim) { if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest)) { @@ -733,8 +731,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) return true; } - plAGModifier *agmod; - if (agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef())) + + plAGModifier *agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef()); + if (agmod) { if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest)) fChannelMods[agmod->GetChannelName()] = agmod; @@ -743,8 +742,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) return true; } - plMsgForwarder *msgfwd; - if (msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef())) + + plMsgForwarder *msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef()); + if (msgfwd) { if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest)) fMsgForwarder = msgfwd; @@ -754,8 +754,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg) return true; } } + plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg); - if( refMsg ) + if (refMsg) { if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) ) AddTarget(plSceneObject::ConvertNoRef(refMsg->GetRef())); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index 655e4a76..f22bc9ff 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -2380,7 +2380,7 @@ bool plArmatureMod::FindMatchingGenericBrain(const char *names[], int count) return false; } -plString plArmatureMod::MakeAnimationName(const char *baseName) const +plString plArmatureMod::MakeAnimationName(const plString& baseName) const { return fAnimationPrefix + baseName; } @@ -2395,7 +2395,7 @@ void plArmatureMod::SetRootName(const plString &name) fRootName = name; } -plAGAnim *plArmatureMod::FindCustomAnim(const char *baseName) const +plAGAnim *plArmatureMod::FindCustomAnim(const plString& baseName) const { plString customName = MakeAnimationName(baseName); plAGAnim *result = plAGAnim::FindAnim(customName); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h index 4f2a69c4..1a35be23 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h @@ -226,7 +226,7 @@ public: virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone); plAGModifier *GetRootAGMod(); - plAGAnim *FindCustomAnim(const char *baseName) const; + plAGAnim *FindCustomAnim(const plString& baseName) const; virtual void Spawn(double timeNow); virtual void SpawnAt(int which, double timeNow); @@ -305,7 +305,7 @@ public: int GetBodyType(int type) { return fBodyType; } int GetCurrentGenericType(); bool FindMatchingGenericBrain(const char *names[], int count); - plString MakeAnimationName(const char * baseName) const; + plString MakeAnimationName(const plString& baseName) const; plString GetRootName(); void SetRootName(const plString &name); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp index 5bf9747c..026c1a02 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp @@ -244,18 +244,19 @@ bool plAvBrainClimb::Apply(double time, float elapsed) // MSGRECEIVE bool plAvBrainClimb::MsgReceive(plMessage *msg) { - plClimbMsg *climbMsg; - plLOSHitMsg *losMsg; - - if(climbMsg = plClimbMsg::ConvertNoRef(msg)) + plClimbMsg* climbMsg = plClimbMsg::ConvertNoRef(msg); + if (climbMsg) { return IHandleClimbMsg(climbMsg); - } else if(losMsg = plLOSHitMsg::ConvertNoRef(msg)) + } + + plLOSHitMsg *losMsg = plLOSHitMsg::ConvertNoRef(msg); + if (losMsg) { return IHandleLOSMsg(losMsg); - } else { - return plArmatureBrain::MsgReceive(msg); } + + return plArmatureBrain::MsgReceive(msg); } // IHANDLECLIMBMSG @@ -296,6 +297,8 @@ bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg) break; } + default: + break; } return true; } @@ -1047,6 +1050,6 @@ const char *plAvBrainClimb::ModeStr(Mode mode) case kFallingOff: return "FallingOff"; default: - return "WTF???!!!"; + return "WTF?!"; } } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp index a014e977..ec0eab50 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp @@ -259,6 +259,8 @@ bool plAvBrainGeneric::Apply(double time, float elapsed) case kNormal: result = IProcessNormal(time, elapsed); break; + default: + break; } plArmatureBrain::Apply(time, elapsed); return result; @@ -653,15 +655,15 @@ bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg) } } break; -#ifdef DEBUG_MULTISTAGE default: +#ifdef DEBUG_MULTISTAGE { char sbuf[256]; sprintf(sbuf,"GenericMsg - Unknown command %d ",msg->fType); plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf); } - break; #endif + break; } return true; } @@ -731,24 +733,21 @@ bool plAvBrainGeneric::IBrainIsCompatible(plAvBrainGeneric *otherBrain) { case plAGAnim::kBodyUnknown: return false; - break; case plAGAnim::kBodyFull: return false; - break; case plAGAnim::kBodyUpper: if(otherUsage == plAGAnim::kBodyLower) return true; else return false; - break; case plAGAnim::kBodyLower: if(otherUsage == plAGAnim::kBodyUpper) return true; else return false; - break; + default: + return false; } - return false; } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp index 98c6ffad..20fc9cc7 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp @@ -389,6 +389,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg) IChatOn(); return true; break; + default: + break; } } else { switch(moveCode) @@ -398,6 +400,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg) IChatOff(); return true; break; + default: + break; } } return false; @@ -515,6 +519,8 @@ bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg) case plClimbMsg::kRight: startMode = plAvBrainClimb::kMountingRight; break; + default: + break; } plAvBrainClimb *brain = new plAvBrainClimb(startMode); plAvTaskBrain *brainTask = new plAvTaskBrain(brain); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp index 2805de77..4adf219b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp @@ -586,6 +586,8 @@ bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg) return true; } break; + default: + break; } } return false; @@ -611,6 +613,8 @@ void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str case kAbort: sprintf(strBuf, "Mode: Abort (you should never see this)"); break; + default: + break; } debugTxt.DrawString(x, y, strBuf); y += lineHeight; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp index b1fc2478..ba8ec78a 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp @@ -255,7 +255,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver) plSceneObject *seekObj = GetTarget(); plKey seekKey = seekObj->GetKey(); // this modifier's target is the seek object - char *mountName, *dismountName, *traverseName; + const char *mountName, *dismountName, *traverseName; if(fGoingUp) { diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp index f834ddb1..0704eef0 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp @@ -104,7 +104,7 @@ void plAvTaskSeek::IInitDefaults() fSeekObject = nil; fMovingTarget = false; fAlign = kAlignHandle; - fAnimName = nil; + fAnimName = ""; fPosGoalHit = false; fRotGoalHit = false; fStillPositioning = true; @@ -171,7 +171,7 @@ plAvTaskSeek::plAvTaskSeek(plKey target) // plAvTaskSeek ------------------------------------------------------------------------------------------- // ------------- -plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving) +plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving) { IInitDefaults(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h index 5a0012da..7640ec01 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h @@ -75,7 +75,7 @@ public: plAvTaskSeek(); plAvTaskSeek(plKey target); plAvTaskSeek(plAvSeekMsg *msg); - plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving); + plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving); void SetTarget(plKey target); void SetTarget(hsPoint3 &pos, hsPoint3 &lookAt); @@ -153,7 +153,7 @@ protected: // for example, you can say "find a good start point so that you can play this animation // and have your handle wind up here" i.e: aligntype = "kAlignHandleAnimEnd" plAvAlignment fAlign; // how to line up with the seek point - const char * fAnimName; // an (optional) anim to use to line up our target + plString fAnimName; // an (optional) anim to use to line up our target // so you can say "seek to a place where your hand // will be here after you play animation foo" @@ -187,4 +187,4 @@ protected: plKey fNotifyFinishedKey; // Send a message to this key when we're done. }; -#endif \ No newline at end of file +#endif diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp index 8dc7df66..b1001043 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp @@ -632,10 +632,11 @@ void plClothingOutfit::IAddItem(plClothingItem *item) for (i = 0; i < num; i++) { - if (soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i))) + soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i)); + if (soundEffect) break; } - + if (soundEffect) { if (!strcmp(item->fName, "03_MLFoot04_01") || !strcmp(item->fName, "03_FLFoot04_01")) @@ -1533,7 +1534,7 @@ plClothingLayout *plClothingMgr::GetLayout(char *name) return nil; } -plClothingElement *plClothingMgr::FindElementByName(char *name) +plClothingElement *plClothingMgr::FindElementByName(const char *name) { int i; for (i = 0; i < fElements.GetCount(); i++) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h index 46ab2588..94c22927 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h @@ -259,7 +259,7 @@ public: GETINTERFACE_ANY( plClothingMgr, hsKeyedObject ); plClothingLayout *GetLayout(char *name); - plClothingElement *FindElementByName(char *name); + plClothingElement *FindElementByName(const char *name); // Functions that just relate to the clothing you have permission to wear (closet) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp index 14ed7926..9d809231 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp @@ -169,7 +169,7 @@ plAvSeekTask::plAvSeekTask() } // CTOR target, align, animName -plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animName) +plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const plString& animName) : fAlign(align), fDuration(0.25), fTarget(target), @@ -178,19 +178,17 @@ plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animNa fPhysicalAtStart(false), fCleanup(false) { - fAnimName = hsStrcpy(animName); } // CTOR target plAvSeekTask::plAvSeekTask(plKey target) -: fAnimName(nil), -fAlign(kAlignHandle), -fDuration(0.25), -fTarget(target), -fAnimInstance(nil), -fTargetTime(0), -fPhysicalAtStart(false), -fCleanup(false) +: fAlign(kAlignHandle), + fDuration(0.25), + fTarget(target), + fAnimInstance(nil), + fTargetTime(0), + fPhysicalAtStart(false), + fCleanup(false) { } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h index 1cc0846e..db0c96d5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h @@ -132,7 +132,7 @@ public: plAvSeekTask(plKey target); /** Constructor form for calculated seek points: uses aligment type and (optionally) animation The animation is used if we're trying to align some future pose with a seek target. */ - plAvSeekTask(plKey target, plAvAlignment alignType, const char *animName); + plAvSeekTask(plKey target, plAvAlignment alignType, const plString& animName); // task protocol virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); @@ -146,7 +146,7 @@ public: // *** implement reader and writer if needed for network propagation protected: // -- specification members -- - char * fAnimName; // the animation we're using, if any; + plString fAnimName; // the animation we're using, if any; plAvAlignment fAlign; // how to line up with the seek point double fDuration; // the time we want the task to take plKey fTarget; // the thing we're seeking towards diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h index b1a9bf24..bc477bb2 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h @@ -127,7 +127,7 @@ public: class plClothingLayout { public: - plClothingLayout(char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; } + plClothingLayout(const char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; } ~plClothingLayout() { delete [] fName; } char *fName; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp index 46a31e4e..73c46b7c 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp @@ -227,7 +227,8 @@ bool plCoopCoordinator::MsgReceive(plMessage *msg) fGuestLinked = true; IAdvanceParticipant(true); // advance the host break; - + default: + break; } } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp index c54cdc30..22178ffa 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp @@ -120,7 +120,6 @@ void plMultistageBehMod::IDeleteStageVec() bool plMultistageBehMod::MsgReceive(plMessage* msg) { - plMultistageModMsg *multiMsg = nil; plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg); if (notifyMsg) { @@ -187,8 +186,10 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg) } return true; - } - else if (multiMsg = plMultistageModMsg::ConvertNoRef(msg)) + } + + plMultistageModMsg *multiMsg = plMultistageModMsg::ConvertNoRef(msg); + if (multiMsg) { if (multiMsg->GetCommand(plMultistageModMsg::kSetLoopCount)) { @@ -196,9 +197,8 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg) } return true; } - else { - return plSingleModifier::MsgReceive(msg); - } + + return plSingleModifier::MsgReceive(msg); } void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp index 8fd488f9..870cf867 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp @@ -220,8 +220,8 @@ void plSittingModifier::Trigger(const plArmatureMod *avMod, plNotifyMsg *enterNo // send the SEEK message - char *animName = nil; // this will be the name of our sit animation, which we - // need to know so we can seek properly. + const char *animName = nil; // this will be the name of our sit animation, which we + // need to know so we can seek properly. plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify); if(brain) @@ -298,7 +298,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis // IBuildSitBrain --------------------------------------------------------------------- // ---------------- plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKey, - char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify) + const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify) { plArmatureMod *avatar = plArmatureMod::ConvertNoRef(avModKey->ObjectIsLoaded()); plSceneObject *seekObj = plSceneObject::ConvertNoRef(seekKey->ObjectIsLoaded()); @@ -308,8 +308,8 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe float closestDist = 0.0f; uint8_t closestApproach = 0; hsPoint3 curPosition = avatar->GetTarget(0)->GetLocalToWorld().GetTranslate(); - char * sitAnimName = nil; - char * standAnimName = "StandUpFront"; // always prefer to stand facing front + const char* sitAnimName = nil; + const char* standAnimName = "StandUpFront"; // always prefer to stand facing front bool frontClear = fMiscFlags & kApproachFront; plAvBrainGeneric *brain = nil; @@ -353,7 +353,11 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe brain->AddStage(sitStage); brain->AddStage(idleStage); brain->AddStage(standStage); - *pAnimName = sitAnimName; +#if HS_BUILD_FOR_WIN32 + *pAnimName = _strdup(sitAnimName); +#else + *pAnimName = strdup(sitAnimName); +#endif brain->SetType(plAvBrainGeneric::kSit); brain->SetRecipient(GetKey()); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h index df67b42b..4d45cae3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h @@ -110,7 +110,7 @@ protected: /** Figure out which approach we should use to the sit target, and add the relevant stages to the brain. */ - plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey,char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify); + plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey, const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify); /** Unused. */ virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp index dcf558ac..1b8879f1 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp @@ -249,7 +249,7 @@ plAvSeekMsg::plAvSeekMsg() // CTOR(sender, receiver, seekKey, time) plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek, - plAvAlignment alignType, char *animName, bool noSeek, + plAvAlignment alignType, const plString& animName, bool noSeek, uint8_t flags, plKey finishKey) : plAvTaskMsg(sender, receiver), fSeekPoint(seekKey), @@ -359,7 +359,7 @@ plAvOneShotMsg::plAvOneShotMsg() plAvOneShotMsg::plAvOneShotMsg(const plKey &sender, const plKey& receiver, const plKey& seekKey, float duration, bool smartSeek, const plString &animName, bool drivable, bool reversible) -: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek), fAnimName(animName), +: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek, kAlignHandle, animName), fDrivable(drivable), fReversible(reversible), fCallbacks(nil) { } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h index fe5017db..ffa9f8dd 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h @@ -189,7 +189,7 @@ public: // tors plAvSeekMsg(); plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek, - plAvAlignment align = kAlignHandle, char *animName = nil, bool noSeek = false, + plAvAlignment align = kAlignHandle, const plString& animName = "", bool noSeek = false, uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil); // plasma protocol @@ -212,7 +212,7 @@ public: float fDuration; // take this much time to do the move (only if smartSeek is false) bool fSmartSeek; // seek by walking rather than floating bool fNoSeek; - char *fAnimName; + plString fAnimName; plAvAlignment fAlignType; uint8_t fFlags; plKey fFinishKey; @@ -257,7 +257,6 @@ public: virtual void Write(hsStream *stream, hsResMgr *mgr); // public members - plString fAnimName; // the name of the animation we're going to use bool fDrivable; // are we animated by time or by mouse movement? bool fReversible; // can we play backwards? plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier From c71bff3f21842ae022965adb64f1d64b23f15af6 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 5 Jan 2013 22:02:29 -0800 Subject: [PATCH 02/12] Fix more clang warnings. --- Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp | 1 + Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp | 11 +++++------ .../Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp | 2 +- .../Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp | 3 ++- .../Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp | 6 +++--- .../PubUtilLib/plNetClient/plNetClientMgrSend.cpp | 2 +- .../Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp | 5 ++++- .../PubUtilLib/plNetClient/plNetObjectDebugger.cpp | 6 +++--- .../PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp | 2 +- 9 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index 8ef8fea4..942b68d7 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -785,6 +785,7 @@ void plAudioSystem::IUpdateSoftSounds( const hsPoint3 &newPosition ) case plSound::kStreamFromDisk: color = plStatusLog::kYellow; break; case plSound::kStreamFromRAM: color = plStatusLog::kWhite; break; case plSound::kStreamCompressed: color = plStatusLog::kRed; break; + default: break; } if(sound->GetType() == plgAudioSys::kVoice) color = 0xffff8800; if(sound->IsPropertySet(plSound::kPropIncidental)) color = 0xff00ffff; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp index 85ce334e..5f2ecffb 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp @@ -190,10 +190,9 @@ plSoundEvent::Types plSoundEvent::GetTypeFromCallbackMsg( plEventCallbackMsg *ms switch( msg->fEvent ) { case ::kStart: return kStart; - case ::kTime: return kTime; - case ::kStop: return kStop; - case ::kLoop: return kLoop; + case ::kTime: return kTime; + case ::kStop: return kStop; + case ::kLoop: return kLoop; + default: return kStop; } - - return kStop; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp index cf171989..bd94e798 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp @@ -737,7 +737,7 @@ void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_ uint16_t* dataPtr = nil; grp->ReserveIndexStorage(maxNumIdx, &aux->fIBufferIdx, &aux->fIStartIdx, &dataPtr); - aux->fIStartIdx /* should be assigning something? */; + //aux->fIStartIdx /* should be assigning something? */; aux->fILength = 0; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp index 37741dae..1fb22f83 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp @@ -960,7 +960,6 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h IEnsureSurfaceUpdated(); #if HS_BUILD_FOR_WIN32 - SIZE size; ::GetTextExtentPoint32( fRGBSurface.fDC, text, strlen( text ), &size ); @@ -968,6 +967,8 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h *height = (uint16_t)size.cy; return (uint16_t)size.cx; +#else + return 0; #endif } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index 649fbb2b..9aaeb366 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -608,7 +608,7 @@ int plNetClientMgr::Update(double secs) // void plNetClientMgr::ICheckPendingStateLoad(double secs) { - if (!fPendingLoads.empty() && GetFlagsBit( kPlayingGame ) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount))) + if ((!fPendingLoads.empty() && GetFlagsBit(kPlayingGame)) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount))) { PendingLoadsList::iterator it = fPendingLoads.begin(); while ( it!=fPendingLoads.end() ) @@ -1198,8 +1198,8 @@ plString plNetClientMgr::GetPlayerNameById (unsigned playerId) const { unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const { // local case if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi)) - NetCommGetPlayer()->playerInt; - + return NetCommGetPlayer()->playerInt; + unsigned n = TransportMgr().GetNumMembers(); for (unsigned i = 0; i < n; ++i) if (plNetTransportMember * member = TransportMgr().GetMember(i)) diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp index c578688a..a274d397 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp @@ -157,7 +157,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg) info.AddValue( "Petition", "Language", plLocalization::GetLanguageName( plLocalization::GetLanguage() ) ); info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi ); char buffy[20]; - sprintf( buffy, "%lu", GetPlayerID() ); + sprintf(buffy, "%u", GetPlayerID()); info.AddValue( "Petition", "PlayerID", buffy ); info.AddValue( "Petition", "PlayerName", GetPlayerName() ); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp index 7a767f5d..a8072fca 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp @@ -263,6 +263,9 @@ void plNetLinkingMgr::ExecNextOp () { ); } break; + + default: + break; } s_opqueue.remove(op); @@ -1091,7 +1094,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void) info, &childLink)) { - case hsFail: + case static_cast(hsFail): success = kLinkFailed; break; case false: diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp index d5fbdbb2..0231cc54 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp @@ -286,14 +286,14 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const char objName[128]; int i=0; - + // copy objName token while(*c && *c != ',' && *c != ' ' && i<127) - objName[i++] = *c++; + objName[i++] = *c++; objName[i]=0; DebugObjectList::const_iterator it = fDebugObjects.begin(); - for( objName[0]; it != fDebugObjects.end(); it++) + for(; it != fDebugObjects.end(); it++) { if ((*it) && (*it)->StringMatches(objName)) { diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp index 2827daf0..79c9f8bb 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp @@ -319,7 +319,7 @@ void plAgeInfoStruct::SetAgeDescription( const char * v ) void plAgeInfoStruct::SetAgeLanguage( uint32_t v ) { - if ( v >= 0 ) + if (v != static_cast(-1)) { SetFlag( kHasAgeLanguage ); fAgeLanguage = v; From c7eba65e13424c30da593acaf9637753d2ce1948 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 18 Jan 2013 22:25:29 -0800 Subject: [PATCH 03/12] Fix a clang warning. --- Sources/Plasma/CoreLib/HeadSpin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/CoreLib/HeadSpin.cpp b/Sources/Plasma/CoreLib/HeadSpin.cpp index b103a326..125af369 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.cpp +++ b/Sources/Plasma/CoreLib/HeadSpin.cpp @@ -442,7 +442,7 @@ char *hsWStringToString( const wchar_t *str ) for (i = 0; i < len; i++) { char temp = wctob(str[i]); - if (temp == WEOF) + if (temp == EOF) { sStr[i] = '\0'; i = len; From 2e14d707767f7f372155f5a746dc113cb2513a27 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 19 Jan 2013 22:59:13 -0800 Subject: [PATCH 04/12] Fix some compiler errors. --- Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h | 1 + .../Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h index be2360c5..29e3c42e 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h @@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define OBJECT_FLOCKER_H #include "pnModifier/plSingleModifier.h" +#include class hsStream; class hsResMgr; diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h index 4ce1175f..7b2e8c6e 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h @@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include +#include #include "pfLocalizedString.h" #include "plFileSystem.h" From 690490afa6d27dda20ec06baf025cfbea250699d Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sun, 20 Jan 2013 12:51:07 -0800 Subject: [PATCH 05/12] Remove unneeded wstring code in pfLocalizationMgr. --- .../FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h index 7b2e8c6e..f1e90034 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.h @@ -51,7 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include -#include #include "pfLocalizedString.h" #include "plFileSystem.h" @@ -64,9 +63,6 @@ struct LocElementInfo; struct LocSetInfo; struct LocAgeInfo; -// Temporary helper (until everything is plString-ized) -typedef std::vector WStringVector; - class pfLocalizationDataMgr { private: From c7e2b7a90f7ae83f2aebac93d7b4efa1aac4c164 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:14:23 -0800 Subject: [PATCH 06/12] Correct plAvatar fixes. --- Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp | 6 +++--- Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp | 2 +- Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp | 6 +----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp index 9d809231..f92b0ccd 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp @@ -157,8 +157,7 @@ void plAvTask::IUndoLimitPlayersInput(plArmatureMod *avatar) // CTOR default plAvSeekTask::plAvSeekTask() -: fAnimName(nil), - fAlign(kAlignHandle), +: fAlign(kAlignHandle), fDuration(0.25), fTarget(nil), fAnimInstance(nil), @@ -170,7 +169,8 @@ plAvSeekTask::plAvSeekTask() // CTOR target, align, animName plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const plString& animName) -: fAlign(align), +: fAnimName(animName), + fAlign(align), fDuration(0.25), fTarget(target), fAnimInstance(nil), diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp index 73c46b7c..a1671e36 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp @@ -327,7 +327,7 @@ void plCoopCoordinator::IStartGuest() const plSceneObject *targetBone = hostAv->FindBone(fSynchBone); if(targetBone) { - plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey()); + plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, "", false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey()); plAvTaskSeek *seekT = new plAvTaskSeek(seekMsg); plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT); seekM->SetBCastFlag(plMessage::kPropagateToModifiers); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp index 870cf867..c644f815 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp @@ -353,11 +353,7 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe brain->AddStage(sitStage); brain->AddStage(idleStage); brain->AddStage(standStage); -#if HS_BUILD_FOR_WIN32 - *pAnimName = _strdup(sitAnimName); -#else - *pAnimName = strdup(sitAnimName); -#endif + *pAnimName = sitAnimName; brain->SetType(plAvBrainGeneric::kSit); brain->SetRecipient(GetKey()); From 43ca24e167fc77e392b0ac19e829fa7c731645b0 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:15:11 -0800 Subject: [PATCH 07/12] Fix some plString/plFileSystem issues for *nix. --- Sources/Plasma/CoreLib/HeadSpin.h | 15 --------------- Sources/Plasma/CoreLib/plFileSystem.cpp | 11 ++++++----- Sources/Plasma/CoreLib/plString.h | 20 +++++++++++++++++++- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index d6817cb8..2560bd72 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -341,21 +341,6 @@ void hsStrLower(char *s); char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory. char * hsFormatStrV(const char * fmt, va_list args); // You are responsible for returned memory. -// Use "correct" stricmp based on the selected compiler / library -#if _MSC_VER -# define stricmp _stricmp -# define strnicmp _strnicmp -# define wcsicmp _wcsicmp -# define wcsnicmp _wcsnicmp -# define strlwr _strlwr -#else -# define stricmp strcasecmp -# define strnicmp strncasecmp -# define wcsicmp wcscasecmp -# define wcsnicmp wcsncasecmp -# define strlwr hsStrLower -#endif - inline char* hsStrcpy(const char src[]) { return hsStrcpy(nil, src); diff --git a/Sources/Plasma/CoreLib/plFileSystem.cpp b/Sources/Plasma/CoreLib/plFileSystem.cpp index 9c1ac1ff..d791f959 100644 --- a/Sources/Plasma/CoreLib/plFileSystem.cpp +++ b/Sources/Plasma/CoreLib/plFileSystem.cpp @@ -380,15 +380,16 @@ std::vector plFileSystem::ListDir(const plFileName &path, const char struct dirent *de; while (de = readdir(dir)) { - if (plFileInfo(de->d_name).IsDirectory()) { + plFileName dir_name = plFileName::Join(path, de->d_name); + if (plFileInfo(dir_name).IsDirectory()) { // Should also handle . and .. continue; } - if (pattern && pattern[0] && fnmatch(pattern, de->d_name)) - contents.push_back(plFileName::Join(path, de->d_name)); + if (pattern && pattern[0] && fnmatch(pattern, de->d_name, 0)) + contents.push_back(dir_name); else if (!pattern || !pattern[0]) - contents.push_back(plFileName::Join(path, de->d_name)); + contents.push_back(dir_name); } closedir(dir); @@ -428,7 +429,7 @@ std::vector plFileSystem::ListSubdirs(const plFileName &path) if (plFileInfo(de->d_name).IsDirectory()) { plFileName name = de->d_name; if (name != "." && name != "..") - contents.push_back(plFileName::Join(path, name); + contents.push_back(plFileName::Join(path, name)); } } diff --git a/Sources/Plasma/CoreLib/plString.h b/Sources/Plasma/CoreLib/plString.h index acdeb0ed..d5e39e4f 100644 --- a/Sources/Plasma/CoreLib/plString.h +++ b/Sources/Plasma/CoreLib/plString.h @@ -43,8 +43,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plString_Defined #define plString_Defined -#include #include +#include +#include +#include +#include /** Single Unicode character code unit */ typedef unsigned int UniChar; @@ -53,6 +56,21 @@ typedef unsigned int UniChar; #define STRING_STACK_SIZE (256) #define WHITESPACE_CHARS " \t\n\r" +// Use "correct" stricmp based on the selected compiler / library +#if _MSC_VER +# define stricmp _stricmp +# define strnicmp _strnicmp +# define wcsicmp _wcsicmp +# define wcsnicmp _wcsnicmp +# define strlwr _strlwr +#else +# define stricmp strcasecmp +# define strnicmp strncasecmp +# define wcsicmp wcscasecmp +# define wcsnicmp wcsncasecmp +# define strlwr hsStrLower +#endif + /** Ref-counted string data buffer. * This is used to store actual string data in any (unchecked) encoding format, * including both the internal UTF-8 data of plString itself as well as the From b01aab4a3964aa699a316fe847c5594a9b9f8741 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:15:54 -0800 Subject: [PATCH 08/12] Standardize on C++ headers. Also removes a bunch of duplicate #includes of stuff that's already pulled in by HeadSpin.h. --- Sources/Plasma/Apps/plClient/winmain.cpp | 1 - Sources/Plasma/CoreLib/HeadSpin.h | 6 +++--- Sources/Plasma/CoreLib/hsBitVector.cpp | 2 -- Sources/Plasma/CoreLib/hsMemory.cpp | 2 -- Sources/Plasma/CoreLib/hsStream.cpp | 3 --- Sources/Plasma/CoreLib/hsStream.h | 2 -- Sources/Plasma/CoreLib/hsTemplates.h | 3 +-- Sources/Plasma/CoreLib/hsThread_Unix.cpp | 10 +++++----- Sources/Plasma/CoreLib/plProduct.h | 2 +- .../FeatureLib/pfAnimation/plRandomCommandMod.cpp | 1 - .../Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp | 1 - Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp | 1 - Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp | 1 - Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h | 5 +---- Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp | 2 +- .../PubUtilLib/plAudioCore/plAudioFileReader.cpp | 1 - .../PubUtilLib/plAudioCore/plBufferedFileReader.cpp | 3 --- .../Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp | 3 --- .../PubUtilLib/plAudioCore/plSoundDeswizzler.cpp | 1 - Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp | 3 --- .../Plasma/PubUtilLib/plContainer/hsStringTable.cpp | 5 +++-- Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp | 1 - Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h | 1 - Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h | 4 ++-- .../Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h | 1 - .../Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp | 3 --- .../PubUtilLib/plSockets/plBufferedSocketReader.cpp | 2 +- .../Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp | 2 -- Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h | 1 - Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp | 4 ++-- Sources/Tools/MaxConvert/Pch.h | 2 +- Sources/Tools/MaxConvert/StringTokenizer.cpp | 2 +- .../plLocalizationEditor/plLocalizationEditor.cpp | 1 - 33 files changed, 22 insertions(+), 60 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index a4c0e5a7..4b73806c 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsWindows.h" -#include #include // windows directory handling fxns (for chdir) #include #include // ShellExecuteA diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index 2560bd72..ba1c21bb 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -54,8 +54,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include -#include -#include +#include +#include //====================================== // Winblows Hacks @@ -77,7 +77,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // even more bloated than before! struct HWND__; typedef struct HWND__ *HWND; struct HINSTANCE__; typedef struct HINSTANCE__ *HINSTANCE; - + typedef HWND hsWindowHndl; typedef HINSTANCE hsWindowInst; typedef HINSTANCE HMODULE; diff --git a/Sources/Plasma/CoreLib/hsBitVector.cpp b/Sources/Plasma/CoreLib/hsBitVector.cpp index c3194b2c..e0fbdff8 100644 --- a/Sources/Plasma/CoreLib/hsBitVector.cpp +++ b/Sources/Plasma/CoreLib/hsBitVector.cpp @@ -45,8 +45,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsBitVector.h" #include "hsTemplates.h" -#include - hsBitVector::hsBitVector(int b, ...) : fBitVectors(nil), fNumBitVectors(0) diff --git a/Sources/Plasma/CoreLib/hsMemory.cpp b/Sources/Plasma/CoreLib/hsMemory.cpp index 324569da..38388f51 100644 --- a/Sources/Plasma/CoreLib/hsMemory.cpp +++ b/Sources/Plasma/CoreLib/hsMemory.cpp @@ -40,8 +40,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include - #include "hsMemory.h" #include "hsExceptions.h" diff --git a/Sources/Plasma/CoreLib/hsStream.cpp b/Sources/Plasma/CoreLib/hsStream.cpp index c7971b74..a0efb2b4 100644 --- a/Sources/Plasma/CoreLib/hsStream.cpp +++ b/Sources/Plasma/CoreLib/hsStream.cpp @@ -39,18 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include #include "hsStream.h" #include "hsMemory.h" - #include "hsTemplates.h" #if HS_BUILD_FOR_UNIX #include #endif - #if HS_BUILD_FOR_WIN32 #include #endif diff --git a/Sources/Plasma/CoreLib/hsStream.h b/Sources/Plasma/CoreLib/hsStream.h index 83351954..b0caf96c 100644 --- a/Sources/Plasma/CoreLib/hsStream.h +++ b/Sources/Plasma/CoreLib/hsStream.h @@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef hsStream_Defined #define hsStream_Defined -#include // Included for GCC 3.2.2+ - #include "HeadSpin.h" #include "hsMemory.h" #include "plFileSystem.h" diff --git a/Sources/Plasma/CoreLib/hsTemplates.h b/Sources/Plasma/CoreLib/hsTemplates.h index 76bb6b96..56a1e6b5 100644 --- a/Sources/Plasma/CoreLib/hsTemplates.h +++ b/Sources/Plasma/CoreLib/hsTemplates.h @@ -46,8 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMemory.h" #include "hsRefCnt.h" - -#include +#include #ifdef HS_DEBUGGING diff --git a/Sources/Plasma/CoreLib/hsThread_Unix.cpp b/Sources/Plasma/CoreLib/hsThread_Unix.cpp index d42c0593..4c3deb54 100644 --- a/Sources/Plasma/CoreLib/hsThread_Unix.cpp +++ b/Sources/Plasma/CoreLib/hsThread_Unix.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include -#include +#include #define NO_POSIX_CLOCK 1 @@ -146,8 +146,8 @@ void hsThread::ThreadYield() //#define MUTEX_TIMING #ifdef MUTEX_TIMING -#include -#include +#include +#include #include #include "hsWide.h" @@ -168,8 +168,8 @@ static void InitMutexTimerFile() //#define EVENT_LOGGING #ifdef EVENT_LOGGING -#include -#include +#include +#include #include #include "NucleusLib/inc/hsTimer.h" diff --git a/Sources/Plasma/CoreLib/plProduct.h b/Sources/Plasma/CoreLib/plProduct.h index 16fc395c..740170a8 100644 --- a/Sources/Plasma/CoreLib/plProduct.h +++ b/Sources/Plasma/CoreLib/plProduct.h @@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include +#include class plString; diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp index cc555c37..2fb9a44f 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp @@ -40,7 +40,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include #include #include "HeadSpin.h" diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp index 75243a71..482d670d 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp @@ -49,7 +49,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include #include "hsTimer.h" #include "HeadSpin.h" #include "pfGameGUIMgr.h" diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp index 491dac96..8bc01a9e 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp @@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plUoid.h" -#include #include "plFixedKey.h" #include "plCreatableIndex.h" diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp index a45012ec..9f40017b 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp @@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plKey.h" #include "plUoid.h" -#include #include "hsResMgr.h" #define TRACK_REFS 0 // MEMLEAKFISH diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h b/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h index 6e5fb76e..5c0a2d6e 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h @@ -46,14 +46,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsBitVector.h" #include "plNetGroup.h" -#include "pnKeyedObject/hsKeyedObject.h" +#include "pnKeyedObject/hsKeyedObject.h" #include "pnKeyedObject/plUoid.h" - #include "plStatusLog/plLoggable.h" -#include - #define plVerifyConditionRet(NetApp,cond,ret,str) \ do { \ if (!(cond)) { \ diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp index 8c34e98a..4b9215a5 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/pnNetCommon.cpp @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com # include # include # include -# include // for memcpy +# include // for memcpy #elif !defined(HS_BUILD_FOR_WIN32) #error "Not implemented for this platform" #endif diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp index db125f4b..006b2c4b 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp @@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // 3.5.2001 - Created by mcn. // // // ////////////////////////////////////////////////////////////////////////////// -#include #include "HeadSpin.h" #include "plAudioFileReader.h" diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp index 6b08fb69..eac9d729 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp @@ -52,9 +52,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include -#include -#include #include "HeadSpin.h" #include "plBufferedFileReader.h" #include "plFileSystem.h" diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp index d19615fb..02057614 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp @@ -51,9 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include -#include -#include #include "HeadSpin.h" #include "plFastWavReader.h" diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp index 9ea85ea2..3a57f5df 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp @@ -48,7 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plSoundDeswizzler.h" -#include plSoundDeswizzler::plSoundDeswizzler( void *srcPtr, uint32_t srcLength, uint8_t numChannels, uint32_t sampleSize ) diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp index c858c211..573451f2 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp @@ -39,7 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include #include "plWavFile.h" #ifdef BUILDING_MAXPLUGIN @@ -52,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include -#include - #pragma comment(lib, "winmm.lib") #ifdef PATCHER #define DXTRACE_ERR(str,hr) hr // I'm not linking in directx stuff to the just for this diff --git a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp index 68daf023..e1cc2e26 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp +++ b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp @@ -40,10 +40,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsStringTable.h" -#include + #if HS_BUILD_FOR_UNIX -#include +#include #endif + // // hsStringTable // diff --git a/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp b/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp index bb2137bd..b068a6ff 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp +++ b/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.cpp @@ -44,7 +44,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include #include -#include #include const plString& plConfigInfo::GlobalSection() diff --git a/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h b/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h index f7b23293..9391baa1 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h +++ b/Sources/Plasma/PubUtilLib/plContainer/plConfigInfo.h @@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define plConfigInfo_h_inc #include "plKeysAndValues.h" -#include ///////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h index 170ed011..506fe239 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h @@ -170,7 +170,7 @@ protected: #define SIM_VERBOSE #ifdef SIM_VERBOSE -#include // only include when we need to call plSimulationMgr::Log +#include // only include when we need to call plSimulationMgr::Log inline void SimLog(const char *str, ...) { @@ -189,4 +189,4 @@ inline void SimLog(const char *str, ...) #endif -#endif \ No newline at end of file +#endif diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h index dd006b55..d8cc159e 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h @@ -447,7 +447,6 @@ public: // /////////////////////////////////////////////////////////////////////////////// -#include #include "HeadSpin.h" class plDemoDebugFile diff --git a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp index d98d813b..a3ac71f2 100644 --- a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp @@ -49,15 +49,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include #include "HeadSpin.h" #include "plProgressMgr.h" #include "hsTimer.h" #include "plPipeline/plPlates.h" -#include - ////////////////////////////////////////////////////////////////////////////// //// plProgressMgr Functions ///////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp b/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp index 03de5760..93c4d617 100644 --- a/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp +++ b/Sources/Plasma/PubUtilLib/plSockets/plBufferedSocketReader.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plBufferedSocketReader.h" #include "plTcpSocket.h" -#include +#include plBufferedSocketReader::plBufferedSocketReader(int size) diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp index 22cd112a..36a6564d 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plEncryptLogLine.cpp @@ -51,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plEncryptLogLine.h" -#include - void plStatusEncrypt::Decrypt( uint8_t *line, int32_t len, uint8_t hint ) { // Da reverse, of course! diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h b/Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h index 204b0c3a..091e3dd0 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.h @@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plLoggable_inc #define plLoggable_inc -#include #include "HeadSpin.h" #include "plString.h" diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index 12a65185..4cade27e 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -55,8 +55,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include "hsThread.h" #include "hsTemplates.h" #include "hsTimer.h" diff --git a/Sources/Tools/MaxConvert/Pch.h b/Sources/Tools/MaxConvert/Pch.h index 475e7a59..9d34ff19 100644 --- a/Sources/Tools/MaxConvert/Pch.h +++ b/Sources/Tools/MaxConvert/Pch.h @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include -#include +#include #include // Core Plasma diff --git a/Sources/Tools/MaxConvert/StringTokenizer.cpp b/Sources/Tools/MaxConvert/StringTokenizer.cpp index 04b8ea76..ca700d5e 100644 --- a/Sources/Tools/MaxConvert/StringTokenizer.cpp +++ b/Sources/Tools/MaxConvert/StringTokenizer.cpp @@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include +#include #pragma hdrstop #include "StringTokenizer.h" diff --git a/Sources/Tools/plLocalizationEditor/plLocalizationEditor.cpp b/Sources/Tools/plLocalizationEditor/plLocalizationEditor.cpp index 8f31009f..d1177912 100644 --- a/Sources/Tools/plLocalizationEditor/plLocalizationEditor.cpp +++ b/Sources/Tools/plLocalizationEditor/plLocalizationEditor.cpp @@ -66,7 +66,6 @@ REGISTER_CREATABLE(plInitialAgeStateLoadedMsg); #include "HeadSpin.h" #include -#include #include #include #include From 29bc092cfffcd44ab00bc4805b07e21065bf9854 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:23:07 -0800 Subject: [PATCH 09/12] math.h -> cmath --- Sources/Plasma/CoreLib/hsGeometry3.cpp | 2 +- Sources/Plasma/CoreLib/hsMatrix44.cpp | 2 +- Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp | 2 +- Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp | 4 ++-- Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp | 2 +- Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp | 2 +- Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp | 2 +- Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp | 2 +- Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp | 2 +- Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp | 2 +- Sources/Plasma/PubUtilLib/plMath/plAvg.cpp | 2 +- Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp | 4 ++-- Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp | 2 +- Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp | 2 +- Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp | 4 ++-- Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp | 2 +- Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp | 2 +- Sources/Tools/MaxConvert/Pch.h | 2 +- Sources/Tools/MaxConvert/hsControlConverter.cpp | 2 +- Sources/Tools/MaxConvert/hsConverterUtils.cpp | 2 +- Sources/Tools/MaxConvert/hsMaterialConverter.cpp | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Sources/Plasma/CoreLib/hsGeometry3.cpp b/Sources/Plasma/CoreLib/hsGeometry3.cpp index c9cbeb17..8c080962 100644 --- a/Sources/Plasma/CoreLib/hsGeometry3.cpp +++ b/Sources/Plasma/CoreLib/hsGeometry3.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsGeometry3.h" #include "hsStream.h" -#include +#include hsVector3 operator%(const hsVector3& t, const hsVector3& s) { diff --git a/Sources/Plasma/CoreLib/hsMatrix44.cpp b/Sources/Plasma/CoreLib/hsMatrix44.cpp index 679a6d6d..511ff0ad 100644 --- a/Sources/Plasma/CoreLib/hsMatrix44.cpp +++ b/Sources/Plasma/CoreLib/hsMatrix44.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsQuat.h" #include "hsMatrix44.h" #include "hsStream.h" -#include +#include #ifdef HS_SIMD_INCLUDE # include HS_SIMD_INCLUDE diff --git a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp index 302a919b..bff52eae 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp @@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //#include "../plPipeline/plDebugGeometry.h" -#include +#include #include #include "pfObjectFlocker.h" diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp index 796d4036..cf6bd519 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ -#include +#include #include "HeadSpin.h" @@ -307,4 +307,4 @@ bool plStereizer::CheckForMaster() } } return false; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp index 41db9c4e..1da877a0 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include diff --git a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp index 7824adce..f92495c0 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp @@ -60,7 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPipeline/hsGDeviceRef.h" #include "plProfile.h" #include "plJPEG.h" -#include +#include plProfile_CreateMemCounter("Mipmaps", "Memory", MemMipmaps); diff --git a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp index 8f543ccd..fda4d392 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPerspDirSlave.h" #include -#include +#include #ifdef HS_BUILD_FOR_WIN32 #define isnan _isnan diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp index 61817a24..071702a7 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plTweak.h" #include -#include +#include #ifdef HS_BUILD_FOR_WIN32 #define isnan _isnan diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp index 1c3d71bf..054b48fa 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsKeys.h" #include "hsStream.h" -#include +#include const int hsKeyFrame::kMaxFrameNumber = 65535; diff --git a/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp b/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp index 6abb6d30..d921772e 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plController.h" #include "hsFastMath.h" #include "hsResMgr.h" -#include +#include const float kSmallDelTime = 1.e-2f; const float kInvSmallDelTime = 1.f / kSmallDelTime; diff --git a/Sources/Plasma/PubUtilLib/plMath/plAvg.cpp b/Sources/Plasma/PubUtilLib/plMath/plAvg.cpp index f760f5db..58baceeb 100644 --- a/Sources/Plasma/PubUtilLib/plMath/plAvg.cpp +++ b/Sources/Plasma/PubUtilLib/plMath/plAvg.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plAvg.h" -#include +#include template class TimeBasedAvgRing; template class TimeBasedAvgRing; diff --git a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp index dbc0b25a..e9d3aadb 100644 --- a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsGeometry3.h" -#include +#include #include "plTriUtils.h" static const float kAlmostZero = 1.e-5f; @@ -328,4 +328,4 @@ bool plTriUtils::ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3& float dist = norm.InnerProduct(p0 - p); return ProjectOntoPlaneAlongVector(norm, dist, vec, p); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp index 381349ea..39d7c987 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plFogEnvironment.cpp @@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plFogEnvironment.h" -#include +#include #include "plTweak.h" //// Constructors & Destructor /////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp index 7f05b975..f798a663 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plVertCoder.h" #include "hsStream.h" -#include +#include #include "plGBufferGroup.h" const float kPosQuantum = 1.f / float(1 << 10); diff --git a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp index b5ef858b..d3c097de 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsGMaterial.h" -#include +#include #include "HeadSpin.h" #include "hsMemory.h" @@ -334,4 +334,4 @@ bool hsGMaterial::MsgReceive(plMessage* msg) return true; } return plSynchedObject::MsgReceive(msg); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp b/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp index 5ec7471d..5849e3b2 100644 --- a/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp +++ b/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////// // #include // for FLT_EPSILON -#include +#include #include "hsEuler.h" #include "hsQuat.h" #include "hsMatrix44.h" diff --git a/Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp b/Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp index 385eceab..73c275e2 100644 --- a/Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp +++ b/Sources/Plasma/PubUtilLib/plTransform/mat_decomp.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // Gems IV. Polar Decomp // -#include +#include #include "mat_decomp.h" /******* Matrix Preliminaries *******/ diff --git a/Sources/Tools/MaxConvert/Pch.h b/Sources/Tools/MaxConvert/Pch.h index 9d34ff19..6dac95f8 100644 --- a/Sources/Tools/MaxConvert/Pch.h +++ b/Sources/Tools/MaxConvert/Pch.h @@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Standard Library #include #include -#include +#include #include #include diff --git a/Sources/Tools/MaxConvert/hsControlConverter.cpp b/Sources/Tools/MaxConvert/hsControlConverter.cpp index a8c81b15..7eb70351 100644 --- a/Sources/Tools/MaxConvert/hsControlConverter.cpp +++ b/Sources/Tools/MaxConvert/hsControlConverter.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTemplates.h" #include "hsWindows.h" #include -#include +#include #include #include #include diff --git a/Sources/Tools/MaxConvert/hsConverterUtils.cpp b/Sources/Tools/MaxConvert/hsConverterUtils.cpp index 5302a148..a0439190 100644 --- a/Sources/Tools/MaxConvert/hsConverterUtils.cpp +++ b/Sources/Tools/MaxConvert/hsConverterUtils.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsHashTable.h" #include "hsStringTokenizer.h" #include "hsResMgr.h" -#include +#include #include #include diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index 0c7f7356..d3f59a7c 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxComponent/plComponent.h" -#include +#include #include #include From 2967635ce21866aaf5efb5b0633bafeaf040fb5f Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:25:00 -0800 Subject: [PATCH 10/12] float.h -> cfloat --- Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h | 2 +- Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp | 2 +- Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp | 2 +- Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp | 2 +- Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp | 2 +- Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp | 2 +- Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp | 2 +- Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp | 2 +- Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp | 2 +- Sources/Tools/MaxConvert/Pch.h | 2 +- Sources/Tools/MaxConvert/hsMaterialConverter.cpp | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h index 1a35be23..5fb2cbd8 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h @@ -66,7 +66,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMatrix44.h" #include "plNetCommon/plNetCommon.h" -#include +#include ///////////////////////////////////////////////////////////////////////////////////////// // diff --git a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp index fda4d392..8fff1ee6 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp @@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPerspDirSlave.h" -#include +#include #include #ifdef HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp index 071702a7..bf95e40d 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plShadowSlave.h" #include "plTweak.h" -#include +#include #include #ifdef HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp index b0977979..214043fe 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include -#include +#include #include "hsMatrix44.h" #include "hsGeometry3.h" #include "plNetClientMgr.h" diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp index be2f0e5c..4b01add1 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp @@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plNetMessage/plNetMessage.h" #include "plNetClient/plNetClientMgr.h" #include -#include +#include plNetTransport::~plNetTransport() { diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index 8045566f..8d53532c 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp @@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include +#include #include "hsStream.h" #include "hsTimer.h" #include "plSDL.h" diff --git a/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp b/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp index 5849e3b2..06675878 100644 --- a/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp +++ b/Sources/Plasma/PubUtilLib/plTransform/hsEuler.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // See Gems IV, Ken Shoemake ////////////////////////////////////////////////////////////////////////// // -#include // for FLT_EPSILON +#include // for FLT_EPSILON #include #include "hsEuler.h" #include "hsQuat.h" diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp index 937f1cd2..1eebd9ee 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plClientUnifiedTime.cpp @@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include +#include #include "hsTimer.h" #include "hsTemplates.h" #include "plClientUnifiedTime.h" diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index 6910ba7e..5245411b 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include +#include #include #include "plUnifiedTime.h" #include "hsWindows.h" diff --git a/Sources/Tools/MaxConvert/Pch.h b/Sources/Tools/MaxConvert/Pch.h index 6dac95f8..b27b4903 100644 --- a/Sources/Tools/MaxConvert/Pch.h +++ b/Sources/Tools/MaxConvert/Pch.h @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Standard Library #include -#include +#include #include #include #include diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index d3f59a7c..ca4e18c1 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxComponent/plComponent.h" #include -#include +#include #include #include From e4af3aff16ee2ac977fbfab28bf3b7279008f8a1 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 28 Jan 2013 23:28:06 -0800 Subject: [PATCH 11/12] time.h -> ctime --- Sources/Plasma/Apps/plClientPatcher/Pch.h | 2 +- Sources/Plasma/Apps/plFileSecure/main.cpp | 2 +- Sources/Plasma/Apps/plUruLauncher/Pch.h | 2 +- Sources/Plasma/FeatureLib/pfPython/Pch.h | 2 +- Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp | 2 +- Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp | 2 +- Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp | 2 +- Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp | 3 +-- .../Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp | 2 +- Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp | 8 ++------ Sources/Tools/plFontConverter/plFontConverterProc.cpp | 2 +- 11 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Sources/Plasma/Apps/plClientPatcher/Pch.h b/Sources/Plasma/Apps/plClientPatcher/Pch.h index a351e75e..39eb2515 100644 --- a/Sources/Plasma/Apps/plClientPatcher/Pch.h +++ b/Sources/Plasma/Apps/plClientPatcher/Pch.h @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsWindows.h" #include -#include +#include #include "pnUtils/pnUtils.h" #include "pnNetBase/pnNetBase.h" #include "pnAsyncCore/pnAsyncCore.h" diff --git a/Sources/Plasma/Apps/plFileSecure/main.cpp b/Sources/Plasma/Apps/plFileSecure/main.cpp index bbe5fbda..8ba44267 100644 --- a/Sources/Plasma/Apps/plFileSecure/main.cpp +++ b/Sources/Plasma/Apps/plFileSecure/main.cpp @@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plProduct.h" -#include +#include #include void print_version() { diff --git a/Sources/Plasma/Apps/plUruLauncher/Pch.h b/Sources/Plasma/Apps/plUruLauncher/Pch.h index 2df3767d..262b5071 100644 --- a/Sources/Plasma/Apps/plUruLauncher/Pch.h +++ b/Sources/Plasma/Apps/plUruLauncher/Pch.h @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsWindows.h" #include -#include +#include #include diff --git a/Sources/Plasma/FeatureLib/pfPython/Pch.h b/Sources/Plasma/FeatureLib/pfPython/Pch.h index 324fccfc..bf347db6 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Pch.h +++ b/Sources/Plasma/FeatureLib/pfPython/Pch.h @@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include // Platform Library Includes -#include +#include #include #include diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp index 7e943fb9..ae697f0c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include -#include +#include #include #include "HeadSpin.h" diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp b/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp index 9735b04a..9d54580c 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnUtTime.h" #if HS_BUILD_FOR_UNIX -#include +#include #include #endif diff --git a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp index 3dd3a4d9..217aafab 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp @@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsSTLStream.h" -#include +#include #include static const uint32_t kDefaultKey[4] = { 0x6c0a5452, 0x3827d0f, 0x3a170b92, 0x16db7fc2 }; diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp index 44e211b9..87bf0f15 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp @@ -40,14 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include +#include #include "plSecureStream.h" #include "hsWindows.h" #include "hsSTLStream.h" -#include - #if !HS_BUILD_FOR_WIN32 #define INVALID_HANDLE_VALUE 0 #endif diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index 4fd64e35..b6bf7127 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsWindows.h" -#include +#include diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index 5245411b..91b5819e 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -41,9 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include #include +#include #include "plUnifiedTime.h" #include "hsWindows.h" - +#include "hsStream.h" #if HS_BUILD_FOR_UNIX #include @@ -55,11 +56,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif - -#include -#include "hsStream.h" - - #if HS_BUILD_FOR_WIN32 // // Converts Windows Time to Unified Time diff --git a/Sources/Tools/plFontConverter/plFontConverterProc.cpp b/Sources/Tools/plFontConverter/plFontConverterProc.cpp index 85d34a43..5fb5a6ca 100644 --- a/Sources/Tools/plFontConverter/plFontConverterProc.cpp +++ b/Sources/Tools/plFontConverter/plFontConverterProc.cpp @@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include -#include +#include #include "hsStream.h" #include "hsResMgr.h" From e98a95fc94d12e0b50bdae16e0b95a1487d724df Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 30 Jan 2013 22:52:20 -0800 Subject: [PATCH 12/12] Fix a compilation issue. --- Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp index 1b8879f1..bbc02cf6 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp @@ -240,7 +240,6 @@ plAvSeekMsg::plAvSeekMsg() fDuration(0), fSmartSeek(true), fAlignType(kAlignHandle), - fAnimName(nil), fNoSeek(false), fFlags(kSeekFlagForce3rdPersonOnStart) {