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

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

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

View File

@ -66,16 +66,16 @@ public:
hsBounds3Ext fWorldBounds;
UInt16 fFlags; // mostly for alignment;
Int16 fParent;
uint16_t fFlags; // mostly for alignment;
int16_t fParent;
union {
Int16 fChildren[2]; // Children are actually in same array as parent
Int16 fLeafIndex;
int16_t fChildren[2]; // Children are actually in same array as parent
int16_t fLeafIndex;
};
Int16 GetChild(int w) const { hsAssert(!(fFlags & kIsLeaf), "Getting Child of leaf node"); return fChildren[w]; }
Int16 GetParent() const { return fParent; }
Int16 GetLeaf() const { hsAssert(fFlags & kIsLeaf, "Getting leaf idx off interior node"); return fLeafIndex; }
int16_t GetChild(int w) const { hsAssert(!(fFlags & kIsLeaf), "Getting Child of leaf node"); return fChildren[w]; }
int16_t GetParent() const { return fParent; }
int16_t GetLeaf() const { hsAssert(fFlags & kIsLeaf, "Getting leaf idx off interior node"); return fLeafIndex; }
hsBool IsLeaf() const { return 0 != (fFlags & kIsLeaf); }
const hsBounds3Ext& GetWorldBounds() const { return fWorldBounds; }
@ -101,30 +101,30 @@ private:
hsTArray<plSpaceTreeNode> fTree;
const hsBitVector* fCache;
Int16 fRoot;
Int16 fNumLeaves;
int16_t fRoot;
int16_t fNumLeaves;
UInt16 fHarvestFlags;
uint16_t fHarvestFlags;
mutable plVolumeIsect* fCullFunc;
hsPoint3 fViewPos;
void IRefreshRecur(Int16 which);
void IRefreshRecur(int16_t which);
void IHarvestAndCullLeaves(const plSpaceTreeNode& subRoot, hsTArray<Int16>& list) const;
void IHarvestLeaves(const plSpaceTreeNode& subRoot, hsTArray<Int16>& list) const;
void IHarvestAndCullLeaves(const plSpaceTreeNode& subRoot, hsTArray<int16_t>& list) const;
void IHarvestLeaves(const plSpaceTreeNode& subRoot, hsTArray<int16_t>& list) const;
void IHarvestAndCullLeaves(const plSpaceTreeNode& subRoot, hsBitVector& totList, hsBitVector& list) const;
void IHarvestLeaves(const plSpaceTreeNode& subRoot, hsBitVector& totList, hsBitVector& list) const;
void IHarvestLevel(Int16 subRoot, int level, int currLevel, hsTArray<Int16>& list) const;
void IHarvestLevel(int16_t subRoot, int level, int currLevel, hsTArray<int16_t>& list) const;
void IHarvestAndCullEnabledLeaves(Int16 subRoot, const hsBitVector& cache, hsTArray<Int16>& list) const;
void IHarvestEnabledLeaves(Int16 subRoot, const hsBitVector& cache, hsTArray<Int16>& list) const;
void IHarvestEnabledLeaves(Int16 subIdx, const hsBitVector& cache, hsBitVector& totList, hsBitVector& list) const;
void IHarvestAndCullEnabledLeaves(int16_t subRoot, const hsBitVector& cache, hsTArray<int16_t>& list) const;
void IHarvestEnabledLeaves(int16_t subRoot, const hsBitVector& cache, hsTArray<int16_t>& list) const;
void IHarvestEnabledLeaves(int16_t subIdx, const hsBitVector& cache, hsBitVector& totList, hsBitVector& list) const;
void IEnableLeaf(Int16 idx, hsBitVector& cache) const;
void IEnableLeaf(int16_t idx, hsBitVector& cache) const;
public:
plSpaceTree();
@ -136,54 +136,54 @@ public:
void SetViewPos(const hsPoint3& p) { fViewPos = p; }
const hsPoint3& GetViewPos() const { return fViewPos; }
const plSpaceTreeNode& GetNode(Int16 w) const { return fTree[w]; }
Int16 GetRoot() const { return fRoot; }
hsBool IsRoot(Int16 w) const { return fRoot == w; }
hsBool IsLeaf(Int16 w) const { return GetNode(w).IsLeaf(); }
const plSpaceTreeNode& GetNode(int16_t w) const { return fTree[w]; }
int16_t GetRoot() const { return fRoot; }
hsBool IsRoot(int16_t w) const { return fRoot == w; }
hsBool IsLeaf(int16_t w) const { return GetNode(w).IsLeaf(); }
void HarvestLeaves(hsBitVector& totList, hsBitVector& list) const;
void HarvestLeaves(hsBitVector& list) const;
void HarvestLeaves(plVolumeIsect* cullFunc, hsBitVector& list) const;
void HarvestLeaves(Int16 subRoot, hsBitVector& list) const;
void HarvestLeaves(Int16 subRoot, hsBitVector& totList, hsBitVector& list) const;
void HarvestLeaves(int16_t subRoot, hsBitVector& list) const;
void HarvestLeaves(int16_t subRoot, hsBitVector& totList, hsBitVector& list) const;
void HarvestLeaves(hsTArray<Int16>& list) const;
void HarvestLeaves(plVolumeIsect* cullFunc, hsTArray<Int16>& list) const;
void HarvestLeaves(Int16 subRoot, hsTArray<Int16>& list) const;
void HarvestLeaves(hsTArray<int16_t>& list) const;
void HarvestLeaves(plVolumeIsect* cullFunc, hsTArray<int16_t>& list) const;
void HarvestLeaves(int16_t subRoot, hsTArray<int16_t>& list) const;
void EnableLeaf(Int16 idx, hsBitVector& cache) const;
void EnableLeaves(const hsTArray<Int16>& list, hsBitVector& cache) const;
void HarvestEnabledLeaves(plVolumeIsect* cullFunc, const hsBitVector& cache, hsTArray<Int16>& list) const;
void EnableLeaf(int16_t idx, hsBitVector& cache) const;
void EnableLeaves(const hsTArray<int16_t>& list, hsBitVector& cache) const;
void HarvestEnabledLeaves(plVolumeIsect* cullFunc, const hsBitVector& cache, hsTArray<int16_t>& list) const;
void SetCache(const hsBitVector* cache) { fCache = cache; }
void BitVectorToList(hsTArray<Int16>& list, const hsBitVector& bitVec) const;
void BitVectorToList(hsTArray<int16_t>& list, const hsBitVector& bitVec) const;
void SetHarvestFlags(plHarvestFlags f) { fHarvestFlags = f; }
UInt16 GetHarvestFlags() const { return fHarvestFlags; }
uint16_t GetHarvestFlags() const { return fHarvestFlags; }
UInt16 HasLeafFlag(Int16 w, UInt16 f) const { return GetNode(w).fFlags & f; }
void SetLeafFlag(Int16 w, UInt16 f, hsBool on=true);
void ClearLeafFlag(Int16 w, UInt16 f);
void ClearTreeFlag(UInt16 f);
void SetTreeFlag(UInt16 f, hsBool on=true);
uint16_t HasLeafFlag(int16_t w, uint16_t f) const { return GetNode(w).fFlags & f; }
void SetLeafFlag(int16_t w, uint16_t f, hsBool on=true);
void ClearLeafFlag(int16_t w, uint16_t f);
void ClearTreeFlag(uint16_t f);
void SetTreeFlag(uint16_t f, hsBool on=true);
hsBool IsDisabled(UInt16 w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); }
hsBool IsDisabled(uint16_t w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); }
// Should GetWorldBounds check and refresh if needed?
const hsBounds3Ext& GetWorldBounds() const { return GetNode(GetRoot()).fWorldBounds; }
void MoveLeaf(Int16 idx, const hsBounds3Ext& newWorldBnd);
void MoveLeaf(int16_t idx, const hsBounds3Ext& newWorldBnd);
void Refresh();
hsBool IsEmpty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kEmpty); }
hsBool IsDirty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kDirty); }
void MakeDirty() { fTree[GetRoot()].fFlags |= plSpaceTreeNode::kDirty; }
Int16 GetNumLeaves() const { return fNumLeaves; }
int16_t GetNumLeaves() const { return fNumLeaves; }
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
void HarvestLevel(int level, hsTArray<Int16>& list) const;
void HarvestLevel(int level, hsTArray<int16_t>& list) const;
friend class plSpaceTreeMaker;
};