2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04: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

@ -81,7 +81,7 @@ char *StringTokenizer::next() {
};
hsBool StringTokenizer::isSep(char c) {
if (!qAsTok || !inQuote) {
for (Int32 i=0; i<numSeps; i++) {
for (int32_t i=0; i<numSeps; i++) {
if (seps[i] == c) return true;
}
}

View File

@ -50,7 +50,7 @@ private:
char *seps;
char *tok;
hsBool isSep(char c);
Int32 numSeps;
int32_t numSeps;
hsBool qAsTok;
hsBool inQuote;
public:

View File

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define REFMSG_USERPROP (REFMSG_USER + 1)
const UInt32 UserPropMgr::kQuickSize = 150001;//199999;
const uint32_t UserPropMgr::kQuickSize = 150001;//199999;
UserPropMgr gUserPropMgr(GetCOREInterface());
@ -69,13 +69,13 @@ UserPropMgr::~UserPropMgr()
CloseQuickTable();
}
void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const Int32 hFlag)
void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag)
{
if (setFlag) SetUserProp(node,name,NULL,hFlag);
else ClearUserProp(node,name,hFlag);
}
void UserPropMgr::ClearUserPropALL(const char *name, const Int32 hFlag)
void UserPropMgr::ClearUserPropALL(const char *name, const int32_t hFlag)
{
for (int i=0; i<GetSelNodeCount(); i++)
{
@ -304,14 +304,14 @@ void UserPropMgr::SetUserPropBuffer(INode *node, const TSTR &buf)
}
}
void UserPropMgr::SetUserPropFlagALL(const char *name, const BOOL setFlag, const Int32 hFlag)
void UserPropMgr::SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag)
{
for (int i=0; i<GetSelNodeCount();i++)
{
SetUserPropFlag(GetSelNode(i),name,setFlag,hFlag);
}
}
BOOL UserPropMgr::GetUserPropFlagALL(const char *name, BOOL &isSet, const Int32 hFlag)
BOOL UserPropMgr::GetUserPropFlagALL(const char *name, BOOL &isSet, const int32_t hFlag)
{
isSet = UserPropMgr::UserPropExists(GetSelNode(0),name,hFlag);
@ -321,7 +321,7 @@ BOOL UserPropMgr::GetUserPropFlagALL(const char *name, BOOL &isSet, const Int32
return TRUE;
}
INode* UserPropMgr::GetAncestorIfNeeded(INode* node, const Int32 hFlag)
INode* UserPropMgr::GetAncestorIfNeeded(INode* node, const int32_t hFlag)
{
if (hFlag == kParent)
{
@ -338,7 +338,7 @@ INode* UserPropMgr::GetAncestorIfNeeded(INode* node, const Int32 hFlag)
}
void UserPropMgr::ClearUserProp(INode *node, const char *name, const Int32 hFlag)
void UserPropMgr::ClearUserProp(INode *node, const char *name, const int32_t hFlag)
{
node = GetAncestorIfNeeded(node,hFlag);
@ -419,7 +419,7 @@ void UserPropMgr::ClearUserProp(INode *node, const char *name, const Int32 hFlag
}
};
BOOL UserPropMgr::GetUserProp(INode *node, const char *name, TSTR &value, const Int32 hFlag)
BOOL UserPropMgr::GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag)
{
node = GetAncestorIfNeeded(node,hFlag);
@ -472,7 +472,7 @@ BOOL UserPropMgr::GetUserProp(INode *node, const char *name, TSTR &value, const
return false;
}
void UserPropMgr::SetUserProp(INode *node, const char *name, const char *value, const Int32 hFlag)
void UserPropMgr::SetUserProp(INode *node, const char *name, const char *value, const int32_t hFlag)
{
node = GetAncestorIfNeeded(node,hFlag);
@ -575,15 +575,15 @@ void UserPropMgr::SetUserProp(INode *node, const char *name, const char *value,
}
BOOL UserPropMgr::GetUserPropString(INode *node, const char *name, TSTR &value, const Int32 hFlag)
BOOL UserPropMgr::GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag)
{
return GetUserProp(node,name,value,hFlag);
}
void UserPropMgr::SetUserPropString(INode *node, const char *name, const char *value, const Int32 hFlag)
void UserPropMgr::SetUserPropString(INode *node, const char *name, const char *value, const int32_t hFlag)
{
SetUserProp(node,name,value,hFlag);
}
BOOL UserPropMgr::GetUserPropFloat(INode *node, const char *name, float &value, const Int32 hFlag)
BOOL UserPropMgr::GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag)
{
TSTR valStr;
if (GetUserProp(node,name,valStr,hFlag))
@ -593,12 +593,12 @@ BOOL UserPropMgr::GetUserPropFloat(INode *node, const char *name, float &value,
}
return FALSE;
}
void UserPropMgr::SetUserPropFloat(INode *node, const char *name, const float value, const Int32 hFlag)
void UserPropMgr::SetUserPropFloat(INode *node, const char *name, const float value, const int32_t hFlag)
{
char valStr[50];
if (sprintf(valStr,"%g",value)) SetUserProp(node,name,valStr,hFlag);
}
BOOL UserPropMgr::GetUserPropInt(INode *node, const char *name, int &value, const Int32 hFlag)
BOOL UserPropMgr::GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag)
{
TSTR valStr;
if (GetUserProp(node,name,valStr,hFlag)) {
@ -607,13 +607,13 @@ BOOL UserPropMgr::GetUserPropInt(INode *node, const char *name, int &value, cons
}
return FALSE;
}
void UserPropMgr::SetUserPropInt(INode *node, const char *name, const int value, const Int32 hFlag)
void UserPropMgr::SetUserPropInt(INode *node, const char *name, const int value, const int32_t hFlag)
{
char valStr[50];
if (sprintf(valStr,"%d",value)) SetUserProp(node,name,valStr,hFlag);
}
BOOL UserPropMgr::UserPropExists(INode *node, const char *name, const Int32 hFlag)
BOOL UserPropMgr::UserPropExists(INode *node, const char *name, const int32_t hFlag)
{
TSTR value;
return GetUserProp(node,name,value,hFlag);
@ -661,7 +661,7 @@ BOOL UserPropMgr::GetUserPropFloatList(INode *node, const char *name, int &num,
} else return false;
}
BOOL UserPropMgr::GetUserPropStringALL(const char *name, TSTR &value, const Int32 hFlag)
BOOL UserPropMgr::GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag)
{
BOOL propSet = UserPropMgr::GetUserPropString(GetSelNode(0),name,value,hFlag);
@ -676,7 +676,7 @@ BOOL UserPropMgr::GetUserPropStringALL(const char *name, TSTR &value, const Int3
return (!propMixed);
}
void UserPropMgr::SetUserPropStringALL(const char *name, const char *value, const Int32 hFlag)
void UserPropMgr::SetUserPropStringALL(const char *name, const char *value, const int32_t hFlag)
{
for (int i=0; i<GetSelNodeCount(); i++) {
UserPropMgr::SetUserPropString(GetSelNode(i),name,value,hFlag);
@ -854,7 +854,7 @@ void UserPropMgr::QuickPair::SetBuffer(char* buf)
fBuffer = buf;
}
UInt32 UserPropMgr::QuickPair::GetHash() const
uint32_t UserPropMgr::QuickPair::GetHash() const
{
const char * k = fKey;
int len = k ? strlen(k) : 0;

View File

@ -64,30 +64,30 @@ public:
NameMaker *nm;
void SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const Int32 hFlag=kMe);
void SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag=kMe);
void SelectUserPropFlagALL(INode *node, const char *name, const BOOL flag);
void ClearUserProp(INode *node, const char *name, const Int32 hFlag=kMe);
void ClearUserPropALL(const char *name, const Int32 hFlag=kMe);
void SetUserPropFlagALL(const char *name, const BOOL setFlag, const Int32 hFlag=kMe);
BOOL GetUserPropFlagALL(const char *name, BOOL &isSet, const Int32 hFlag=kMe);
void ClearUserProp(INode *node, const char *name, const int32_t hFlag=kMe);
void ClearUserPropALL(const char *name, const int32_t hFlag=kMe);
void SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag=kMe);
BOOL GetUserPropFlagALL(const char *name, BOOL &isSet, const int32_t hFlag=kMe);
BOOL GetUserProp(INode *node, const char *name, TSTR &value, const Int32 hFlag=kMe);
void SetUserProp(INode *node, const char *name, const char *value, const Int32 hFlag=kMe);
BOOL UserPropExists(INode *node, const char *name, const Int32 hFlag=kMe);
BOOL GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
void SetUserProp(INode *node, const char *name, const char *value, const int32_t hFlag=kMe);
BOOL UserPropExists(INode *node, const char *name, const int32_t hFlag=kMe);
BOOL GetUserPropString(INode *node, const char *name, TSTR &value, const Int32 hFlag=kMe);
void SetUserPropString(INode *node, const char *name, const char *value, const Int32 hFlag=kMe);
BOOL GetUserPropFloat(INode *node, const char *name, float &value, const Int32 hFlag=kMe);
void SetUserPropFloat(INode *node, const char *name, const float value, const Int32 hFlag=kMe);
BOOL GetUserPropInt(INode *node, const char *name, int &value, const Int32 hFlag=kMe);
void SetUserPropInt(INode *node, const char *name, const int value, const Int32 hFlag=kMe);
BOOL GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
void SetUserPropString(INode *node, const char *name, const char *value, const int32_t hFlag=kMe);
BOOL GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag=kMe);
void SetUserPropFloat(INode *node, const char *name, const float value, const int32_t hFlag=kMe);
BOOL GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag=kMe);
void SetUserPropInt(INode *node, const char *name, const int value, const int32_t hFlag=kMe);
BOOL GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]);
BOOL GetUserPropIntList(INode *node, const char *name, int &num, int list[]);
BOOL GetUserPropFloatList(INode *node, const char *name, int &num, float list[]);
BOOL GetUserPropStringALL(const char *name, TSTR &value, const Int32 hFlag=kMe);
void SetUserPropStringALL(const char *name, const char *value, const Int32 hFlag=kMe);
BOOL GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag=kMe);
void SetUserPropStringALL(const char *name, const char *value, const int32_t hFlag=kMe);
BOOL GetUserPropStringListALL(const char *name, int &num, TSTR list[]);
BOOL GetUserPropIntListALL(const char *name, int &num, int *list);
BOOL GetUserPropFloatListALL(const char *name, int &num, float *list);
@ -116,7 +116,7 @@ public:
void CloseQuickTable();
private:
INode* GetAncestorIfNeeded(INode* node, const Int32 hFlag);
INode* GetAncestorIfNeeded(INode* node, const int32_t hFlag);
void DeSelectWithOut(const char *name, const char *value);
void RecursiveSelectAll(INode *node = NULL);
int RecursiveCountAlike(INode *node = NULL, BOOL MatchAll=true);
@ -140,14 +140,14 @@ private:
void SetKey(const char* k) { fKey = k; }
void SetVal(const char* v) { fVal = v; }
UInt32 GetHash() const;
uint32_t GetHash() const;
hsBool GetVal(TSTR& value);
bool operator==(const QuickPair& other) const;
};
hsHashTable<QuickPair>* fQuickTable;
static const UInt32 kQuickSize;
static const uint32_t kQuickSize;
INode* fQuickNode;
void IBuildQuickTable(INode* node);
BOOL ICheckQuickEntry(const char *key, TSTR &value);

View File

@ -134,8 +134,8 @@ void hsControlConverter::ReduceKeys(Control *control, hsScalar threshold)
IKeyControl *keyCont = GetKeyControlInterface(control);
if (keyCont->GetNumKeys() > 2)
{
IKey *key1 = (IKey*)TRACKED_NEW UInt8[keyCont->GetKeySize()];
IKey *key2 = (IKey*)TRACKED_NEW UInt8[keyCont->GetKeySize()];
IKey *key1 = (IKey*)TRACKED_NEW uint8_t[keyCont->GetKeySize()];
IKey *key2 = (IKey*)TRACKED_NEW uint8_t[keyCont->GetKeySize()];
keyCont->GetKey(0, key1);
keyCont->GetKey(keyCont->GetNumKeys() - 1, key2);
@ -158,8 +158,8 @@ void hsControlConverter::ReduceKeys(Control *control, hsScalar threshold)
Interval interval(start, end);
ApplyKeyReduction(control, interval, threshold, GetTicksPerFrame(), &status);
}
delete [] (UInt8*)key1;
delete [] (UInt8*)key2;
delete [] (uint8_t*)key1;
delete [] (uint8_t*)key2;
}
}
}
@ -748,7 +748,7 @@ plLeafController* hsControlConverter::ICreateQuatController(plMaxNode* node, Con
{
hsGuardBegin("hsControlConverter::ICreateQuatController");
Int32 startIdx, endIdx;
int32_t startIdx, endIdx;
IKeyControl* ikeys = GetKeyControlInterface(control);
if ( ikeys && IGetRangeCoverKeyIndices(node ? node->GetName() : nil, control, startIdx, endIdx)>1 )
{
@ -759,11 +759,11 @@ plLeafController* hsControlConverter::ICreateQuatController(plMaxNode* node, Con
return NULL;
}
IKey* key=(IKey*)(new byte[ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t[ikeys->GetKeySize()]);
plLeafController* pc = TRACKED_NEW plLeafController;
UInt8 compressLevel = node->GetAnimCompress();
UInt8 keyType;
uint8_t compressLevel = node->GetAnimCompress();
uint8_t keyType;
if (compressLevel == plAnimCompressComp::kCompressionHigh)
keyType = hsKeyFrame::kCompressedQuatKeyFrame32;
else if (compressLevel == plAnimCompressComp::kCompressionLow)
@ -828,7 +828,7 @@ plLeafController* hsControlConverter::ICreateScaleValueController(plMaxNode* nod
hsGuardBegin("hsControlConverter::ICreateScaleValueController");
//plMaxNode* xformParent = GetXformParent(node);
Int32 startIdx, endIdx;
int32_t startIdx, endIdx;
IKeyControl* ikeys = GetKeyControlInterface(control);
if ( ikeys && IGetRangeCoverKeyIndices(node ? node->GetName() : nil, control, startIdx, endIdx)>1 )
{
@ -839,7 +839,7 @@ plLeafController* hsControlConverter::ICreateScaleValueController(plMaxNode* nod
return NULL;
}
IKey* key=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
plLeafController* pc = TRACKED_NEW plLeafController;
pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control));
for(int i = startIdx; i <= endIdx; i++)
@ -869,7 +869,7 @@ plLeafController* hsControlConverter::ICreateScalarController(plMaxNode* node, C
{
hsGuardBegin("hsControlConverter::ICreateScalarController");
Int32 startIdx, endIdx;
int32_t startIdx, endIdx;
IKeyControl* ikeys = GetKeyControlInterface(control);
if ( ikeys && IGetRangeCoverKeyIndices(node ? node->GetName() : nil, control, startIdx, endIdx)>1 )
{
@ -880,7 +880,7 @@ plLeafController* hsControlConverter::ICreateScalarController(plMaxNode* node, C
return NULL;
}
IKey* key=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
plLeafController* pc = TRACKED_NEW plLeafController;
pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control));
for(int i = startIdx; i <= endIdx; i++)
@ -912,7 +912,7 @@ plLeafController* hsControlConverter::ICreateSimplePosController(plMaxNode* node
hsGuardBegin("hsControlConverter::ICreateSimplePosController");
IKeyControl* ikeys = GetKeyControlInterface(control);
Int32 startIdx, endIdx;
int32_t startIdx, endIdx;
if ( ikeys && IGetRangeCoverKeyIndices(node ? node->GetName() : nil, control, startIdx, endIdx)>1 )
{
if(!(control->IsKeyable()))
@ -922,7 +922,7 @@ plLeafController* hsControlConverter::ICreateSimplePosController(plMaxNode* node
return NULL;
}
IKey* key=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
plLeafController* pc = TRACKED_NEW plLeafController;
pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control));
for(int i = startIdx; i <= endIdx; i++)
@ -955,7 +955,7 @@ int hsControlConverter::IAddPartsKeys(Control* control,
{
hsGuardBegin("hsControlConverter::IAddPartsKeys");
Int32 startIdx, endIdx;
int32_t startIdx, endIdx;
if (control->IsLeaf())
{
IKeyControl* ikeys = GetKeyControlInterface(control);
@ -978,7 +978,7 @@ int hsControlConverter::IAddPartsKeys(Control* control,
//
// Traverse all keys of controller
//
IKey* key=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
hsBool mb=false;
plMaxNode* xformParent = GetXformParent(node);
for(i = startIdx; i <= endIdx; i++)
@ -1098,8 +1098,8 @@ void hsControlConverter::IGetControlSampleTimes(Control* control, int iLo, int i
IKeyControl* ikeys = GetKeyControlInterface(control);
IKey* key=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* lastKey=(IKey*)(new byte [ikeys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
IKey* lastKey=(IKey*)(new uint8_t [ikeys->GetKeySize()]);
int i;
for( i = iLo; i < iHi; i++ )
@ -1244,7 +1244,7 @@ void hsControlConverter::IGetControlSampleTimes(Control* control, int iLo, int i
//
// Create an hsKeyFrame from a 3DSMax key
//
Int32 hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node, hsBool rotQuat)
int32_t hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node, hsBool rotQuat)
{
hsGuardBegin("hsControlConverter::ICreateHSInterpKey");
@ -1371,7 +1371,7 @@ Int32 hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, TimeV
hsGuardEnd;
}
UInt8 hsControlConverter::GetKeyType(Control* control, hsBool rotQuat)
uint8_t hsControlConverter::GetKeyType(Control* control, hsBool rotQuat)
{
Class_ID cID = control->ClassID();
SClass_ID sID = control->SuperClassID();
@ -1428,7 +1428,7 @@ UInt8 hsControlConverter::GetKeyType(Control* control, hsBool rotQuat)
//
//
//
Int32 hsControlConverter::IGetRangeCoverKeyIndices(char* nodeName, Control* cont, Int32 &start, Int32 &end)
int32_t hsControlConverter::IGetRangeCoverKeyIndices(char* nodeName, Control* cont, int32_t &start, int32_t &end)
{
hsGuardBegin("hsControlConverter::IGetRangeCoverKeyIndices");
@ -1442,7 +1442,7 @@ Int32 hsControlConverter::IGetRangeCoverKeyIndices(char* nodeName, Control* cont
if (numKeys == 0)
return 0;
IKey* key=(IKey*)(new byte [keys->GetKeySize()]);
IKey* key=(IKey*)(new uint8_t [keys->GetKeySize()]);
start = numKeys;
for (int i=0; i<numKeys; i++)

View File

@ -129,7 +129,7 @@ public:
void ReduceKeys(Control *control, hsScalar threshold);
hsBool HasKeyTimes(Control* ctl);
UInt8 GetKeyType(Control* ctl, hsBool rotQuat = false);
uint8_t GetKeyType(Control* ctl, hsBool rotQuat = false);
plMaxNode* GetXformParent(plMaxNode* node);
hsBool ForceWorldSpace(plMaxNode* node);
@ -163,8 +163,8 @@ private:
void IEnableEaseCurves(Animatable* control, bool enable);
void IGetControlSampleTimes(Control* control, int iLo, int iHi, Tab<TimeValue>& kTimes, float maxRads);
int IAddPartsKeys(Control* control, hsTArray <hsG3DSMaxKeyFrame>* kfArray, plMaxNode* node);
Int32 ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node=nil, hsBool rotQuat = false);
Int32 IGetRangeCoverKeyIndices(char* nodeName, Control* cont, Int32 &start, Int32 &end);
int32_t ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node=nil, hsBool rotQuat = false);
int32_t IGetRangeCoverKeyIndices(char* nodeName, Control* cont, int32_t &start, int32_t &end);
ControllerType IGetControlType(TSTR ctrlName);
bool IIsKeyTimeInRange(TimeValue time);
bool IIsKeyInRange(IKey* key);
@ -183,12 +183,12 @@ private:
hsConverterUtils& fConverterUtils;
plErrorMsg * fErrorMsg;
Int32 fTicksPerFrame;
Int32 fFrameRate;
Int32 fTicksPerSec;
Int32 fStartFrame;
Int32 fEndFrame;
Int32 fNumFrames;
int32_t fTicksPerFrame;
int32_t fFrameRate;
int32_t fTicksPerSec;
int32_t fStartFrame;
int32_t fEndFrame;
int32_t fNumFrames;
hsScalar fAnimLength;
hsBool fWarned;

View File

@ -93,10 +93,10 @@ namespace {
hsGuardEnd;
}
Int32 GetInstanceCount() { return fInstanceCount; }
int32_t GetInstanceCount() { return fInstanceCount; }
private:
Int32 fInstanceCount;
int32_t fInstanceCount;
};
}
@ -418,19 +418,19 @@ char* hsConverterUtils::StripMangledReference(char* dest, const char* name)
hsGuardEnd;
}
Int32 hsConverterUtils::FindNamedSelSetFromName(const char *name)
int32_t hsConverterUtils::FindNamedSelSetFromName(const char *name)
{
hsGuardBegin("hsConverterUtils::FindNamedSelSetFromName");
#if MAX_VERSION_MAJOR <= 12
for (Int32 i=0; i<fInterface->GetNumNamedSelSets(); i++)
for (int32_t i=0; i<fInterface->GetNumNamedSelSets(); i++)
{
if (!_stricmp(name, fInterface->GetNamedSelSetName(i)))
return (i);
}
#else
INamedSelectionSetManager* selSetMgr = INamedSelectionSetManager::GetInstance();
for (Int32 i=0; i<selSetMgr->GetNumNamedSelSets(); i++)
for (int32_t i=0; i<selSetMgr->GetNumNamedSelSets(); i++)
{
if (!_stricmp(name, selSetMgr->GetNamedSelSetName(i)))
return (i);
@ -555,7 +555,7 @@ void hsConverterUtils::IBuildNodeSearchCacheRecur(INode* node)
}
}
UInt32 hsConverterUtils::CacheNode::GetHash() const
uint32_t hsConverterUtils::CacheNode::GetHash() const
{
const char* k = GetName();
int len = k ? strlen(k) : 0;

View File

@ -95,7 +95,7 @@ public:
char* MangleRefWithRoom(char *mangName, const char *nodeName, const char* roomName);
char* UnMangleReference(char *dest, const char *name);
hsBool IsMangled(const char *name);
Int32 FindNamedSelSetFromName(const char *name);
int32_t FindNamedSelSetFromName(const char *name);
char* StripMangledReference(char* dest, const char* name);
hsBool IsInstanced(Object* maxObject);
@ -120,7 +120,7 @@ private:
plErrorMsg *fErrorMsg;
hsBool fSuppressMangling;
UInt32 fWarned;
uint32_t fWarned;
hsBool fSave;
struct CacheNode
@ -140,7 +140,7 @@ private:
void SetCaseSensitive(hsBool b) { fCaseSensitive = b; }
hsBool GetCaseSensitive() { return fCaseSensitive; }
UInt32 GetHash() const;
uint32_t GetHash() const;
bool operator==(const CacheNode& other) const;
};
hsHashTable<CacheNode>* fNodeSearchCache;

View File

@ -126,7 +126,7 @@ namespace {
void CopyMaterialLODToTextures(hsGMaterial* mat)
{
Int32 i;
int32_t i;
for (i = 0; i < mat->GetNumLayers(); ++i)
{
plLayerInterface* layer = mat->GetLayer(i);
@ -149,12 +149,12 @@ namespace {
"This is not supported in the engine, so the upper layer will be disabled.";
}
static UInt32 MakeUInt32Color(float r, float g, float b, float a)
static uint32_t MakeUInt32Color(float r, float g, float b, float a)
{
return (UInt32(a * 255.9f) << 24)
|(UInt32(r * 255.9f) << 16)
|(UInt32(g * 255.9f) << 8)
|(UInt32(b * 255.9f) << 0);
return (uint32_t(a * 255.9f) << 24)
|(uint32_t(r * 255.9f) << 16)
|(uint32_t(g * 255.9f) << 8)
|(uint32_t(b * 255.9f) << 0);
}
static bool failedRT = false;
@ -324,9 +324,9 @@ void AttachLinkMtlAnims(plMaxNode *node, hsGMaterial *mat)
}
}
UInt32 hsMaterialConverter::ColorChannelsUseMask(plMaxNode* node, int iSubMtl)
uint32_t hsMaterialConverter::ColorChannelsUseMask(plMaxNode* node, int iSubMtl)
{
UInt32 usedChan = 0;
uint32_t usedChan = 0;
hsBool deleteIt = false;
TriObject* triObj = node->GetTriObject(deleteIt);
@ -412,9 +412,9 @@ UInt32 hsMaterialConverter::ColorChannelsUseMask(plMaxNode* node, int iSubMtl)
return usedChan;
}
UInt32 hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2,
uint32_t hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2,
int chan,
UInt32 mBlack, UInt32 mGrey, UInt32 mWhite)
uint32_t mBlack, uint32_t mGrey, uint32_t mWhite)
{
const float kSmall = 1.e-3f;
if( (p0[chan] < kSmall) && (p1[chan] < kSmall) && (p2[chan] < kSmall) )
@ -426,9 +426,9 @@ UInt32 hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, con
return mGrey;
}
UInt32 hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2, const Point3& p3,
uint32_t hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2, const Point3& p3,
int chan,
UInt32 mBlack, UInt32 mGrey, UInt32 mWhite)
uint32_t mBlack, uint32_t mGrey, uint32_t mWhite)
{
const float kSmall = 1.e-3f;
if( (p0[chan] < kSmall) && (p1[chan] < kSmall) && (p2[chan] < kSmall) && (p3[chan] < kSmall) )
@ -443,7 +443,7 @@ UInt32 hsMaterialConverter::ICheckPoints(const Point3& p0, const Point3& p1, con
int hsMaterialConverter::NumVertexOpacityChannelsRequired(plMaxNode* node, int iSubMtl)
{
UInt32 vtxChanMask = VertexChannelsRequiredMask(node, iSubMtl);
uint32_t vtxChanMask = VertexChannelsRequiredMask(node, iSubMtl);
// Now count the bits.
int numChan;
@ -454,7 +454,7 @@ int hsMaterialConverter::NumVertexOpacityChannelsRequired(plMaxNode* node, int i
return numChan;
}
UInt32 hsMaterialConverter::VertexChannelsRequiredMask(plMaxNode* node, int iSubMtl)
uint32_t hsMaterialConverter::VertexChannelsRequiredMask(plMaxNode* node, int iSubMtl)
{
Mtl* mtl = node->GetMtl();
if( !mtl )
@ -480,7 +480,7 @@ UInt32 hsMaterialConverter::VertexChannelsRequiredMask(plMaxNode* node, int iSub
// Get the channels our materials will look at. These should all
// be of the grey variety, since a solid opaque can be drawn as is,
// and a solid transparent can be pitched.
UInt32 vtxChanReq = VertexChannelsRequestMask(node, iSubMtl, mtl);
uint32_t vtxChanReq = VertexChannelsRequestMask(node, iSubMtl, mtl);
// Or in vtx alpha. If it's been set, we need to respect it, if it hasn't,
// it'll and out to zero anyway when we & with the vtxChanUsed.
@ -488,19 +488,19 @@ UInt32 hsMaterialConverter::VertexChannelsRequiredMask(plMaxNode* node, int iSub
// Now figure out what's in all the channels, which are solid black, which
// actually have interesting values etc.
UInt32 vtxChanUsed = ColorChannelsUseMask(node, iSubMtl);
uint32_t vtxChanUsed = ColorChannelsUseMask(node, iSubMtl);
UInt32 vtxChanMask = vtxChanReq & vtxChanUsed;
uint32_t vtxChanMask = vtxChanReq & vtxChanUsed;
return vtxChanMask;
}
UInt32 hsMaterialConverter::VertexChannelsRequestMask(plMaxNode* node, int iSubMtl, Mtl* mtl)
uint32_t hsMaterialConverter::VertexChannelsRequestMask(plMaxNode* node, int iSubMtl, Mtl* mtl)
{
if( !mtl )
return 0;
UInt32 vtxChanMask = 0;
uint32_t vtxChanMask = 0;
if( IsMultiMat(mtl) && (iSubMtl >= 0) )
{
@ -747,7 +747,7 @@ void hsMaterialConverter::GetNodesByMaterial(Mtl *mtl, hsTArray<plMaxNode*> &out
// wants to generate several materials from it (like composites).
hsTArray<plExportMaterialData> *
hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, UInt32 multiIndex)
hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint32_t multiIndex)
{
hsTArray<plExportMaterialData> *ourMaterials = TRACKED_NEW hsTArray<plExportMaterialData>;
@ -899,7 +899,7 @@ int hsMaterialConverter::MaxUsedUVWSrc(plMaxNode* node, Mtl* mtl)
return 0;
}
hsGMaterial* hsMaterialConverter::NonAlphaHackPrint(plMaxNode* node, Texmap* baseTex, UInt32 blendFlags)
hsGMaterial* hsMaterialConverter::NonAlphaHackPrint(plMaxNode* node, Texmap* baseTex, uint32_t blendFlags)
{
// Bogus input, I hope they choke on the nil pointer I'm returning.
if( !(baseTex && node) )
@ -942,7 +942,7 @@ hsGMaterial* hsMaterialConverter::NonAlphaHackPrint(plMaxNode* node, Texmap* bas
return mat;
}
hsGMaterial* hsMaterialConverter::AlphaHackPrint(plMaxNode* node, Texmap* baseTex, UInt32 blendFlags)
hsGMaterial* hsMaterialConverter::AlphaHackPrint(plMaxNode* node, Texmap* baseTex, uint32_t blendFlags)
{
// Bogus input, I hope they choke on the nil pointer I'm returning.
if( !(baseTex && node) )
@ -1062,8 +1062,8 @@ hsGMaterial *hsMaterialConverter::ICreateMaterial(Mtl *mtl, plMaxNode *node, con
return mat;
}
Int32 i;
Int32 index(-1);
int32_t i;
int32_t index(-1);
for (i = 0; i < fDoneMaterials.Count(); i++)
{
if (IsMatchingDoneMaterial(&fDoneMaterials[i], mtl, isMultiMat, subIndex, forceCopy, runtimeLit,
@ -1210,7 +1210,7 @@ hsGMaterial *hsMaterialConverter::IProcessMaterial(Mtl *mtl, plMaxNode *node, co
}
hsBool hsMaterialConverter::IsMatchingDoneMaterial(DoneMaterialData *dmd,
Mtl *mtl, hsBool isMultiMat, UInt32 subMtlFlags, hsBool forceCopy, hsBool runtimeLit,
Mtl *mtl, hsBool isMultiMat, uint32_t subMtlFlags, hsBool forceCopy, hsBool runtimeLit,
plMaxNode *node, int numUVChannels, hsBool makeAlphaLayer)
{
if (!((dmd->fMaxMaterial == mtl) &&
@ -1281,7 +1281,7 @@ hsBool hsMaterialConverter::IsMatchingDoneMaterial(DoneMaterialData *dmd,
hsGMaterial* hsMaterialConverter::IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, hsBool isMultiMat,
hsBool forceCopy, hsBool runtimeLit, UInt32 subMtlFlags, int numUVChannels,
hsBool forceCopy, hsBool runtimeLit, uint32_t subMtlFlags, int numUVChannels,
hsBool makeAlphaLayer)
{
if( failedRT )
@ -1369,7 +1369,7 @@ plMipmap *hsMaterialConverter::IGetUVTransTexture(plMaxNode *node, hsBool useU /
plMipmap *texture = plBitmapCreator::Instance().CreateBlankMipmap( w, h, plMipmap::kARGB32Config, 1, texName, node->GetLocation() );
// set the color data
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
int x, y;
for (y = 0; y < h; y++)
{
@ -1422,7 +1422,7 @@ void hsMaterialConverter::IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial
// The inclayer prop probably wouldn't hurt here, because this layer should only get drawn as
// an upper layer, but I'm nuking it out for consistency. mf
layer->SetZFlags(hsGMatState::kZNoZWrite);
UInt32 blendFlags = hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult | hsGMatState::kBlendAlpha;
uint32_t blendFlags = hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult | hsGMatState::kBlendAlpha;
layer->SetBlendFlags(blendFlags);
layer->SetClampFlags(hsGMatState::kClampTexture);
layer->SetUVWSrc(UVChan);
@ -1574,7 +1574,7 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node
{
if (!mtl || mtl->ClassID() != COMP_MTL_CLASS_ID)
return nil;
UInt32 *layerCounts = TRACKED_NEW UInt32[mtl->NumSubMtls()];
uint32_t *layerCounts = TRACKED_NEW uint32_t[mtl->NumSubMtls()];
IParamBlock2 *pb = mtl->GetParamBlockByID(plCompositeMtl::kBlkPasses);
char suff[10];
sprintf(suff, "_%d", subMtlFlags);
@ -1610,7 +1610,7 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node
{
for (j = mat->GetNumLayers() - 1; j >= (int)layerCounts[i - 1]; j--)
{
UInt32 blendFlags = mat->GetLayer(j)->GetBlendFlags();
uint32_t blendFlags = mat->GetLayer(j)->GetBlendFlags();
if ((blendFlags & hsGMatState::kBlendMask) != hsGMatState::kBlendAlpha)
{
hsBool ignore = fErrorMsg->Set(!(fWarned & kWarnedCompMtlBadBlend), node->GetName(),
@ -1679,7 +1679,7 @@ hsGMaterial *hsMaterialConverter::IProcessMultipassMtl(Mtl *mtl, plMaxNode *node
return nil;
hsGMaterial *mat = TRACKED_NEW hsGMaterial;
UInt32 *layerCounts = TRACKED_NEW UInt32[mtl->NumSubMtls()];
uint32_t *layerCounts = TRACKED_NEW uint32_t[mtl->NumSubMtls()];
hsgResMgr::ResMgr()->NewKey(name, mat, node->GetLocation());
IParamBlock2 *pb = mtl->GetParamBlockByID(plMultipassMtl::kBlkPasses);
@ -1742,12 +1742,12 @@ hsGMaterial *hsMaterialConverter::IProcessParticleMtl(Mtl *mtl, plMaxNode *node,
//
// Blend flags
//
UInt32 blendFlags = 0;
uint32_t blendFlags = 0;
//
// Shade flags
//
UInt32 shadeFlags = 0;
uint32_t shadeFlags = 0;
if (basicPB->GetInt(plParticleMtl::kNormal) == plParticleMtl::kEmissive)
shadeFlags |= hsGMatState::kShadeEmissive;
@ -1761,12 +1761,12 @@ hsGMaterial *hsMaterialConverter::IProcessParticleMtl(Mtl *mtl, plMaxNode *node,
//
// Misc flags...
//
UInt32 miscFlags = 0;
uint32_t miscFlags = 0;
//
// Z flags
//
UInt32 zFlags = 0;
uint32_t zFlags = 0;
zFlags |= hsGMatState::kZNoZWrite;
hsBool preserveUVOffset = false;//PreserveUVOffset(mtl);
@ -1798,7 +1798,7 @@ hsGMaterial *hsMaterialConverter::IProcessParticleMtl(Mtl *mtl, plMaxNode *node,
baseLay->SetPreshadeColor(hsColorRGBA().Set(0.f,0.f,0.f,1.f));
baseLay->SetOpacity( opac ); // Don't scale the material color by this if we're add blending; do that later
UInt32 blendType = 0;
uint32_t blendType = 0;
switch (basicPB->GetInt(plParticleMtl::kBlend))
{
case plParticleMtl::kBlendAlpha: blendType |= hsGMatState::kBlendAlpha; break;
@ -2329,7 +2329,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
//
// Blend flags
//
UInt32 blendFlags = 0;
uint32_t blendFlags = 0;
if( node->GetAlphaTestHigh() || passBase->GetAlphaTestHigh() )
blendFlags |= hsGMatState::kBlendAlphaTestHigh;
@ -2340,7 +2340,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
//
// Shade flags
//
UInt32 shadeFlags = 0;
uint32_t shadeFlags = 0;
if (passBase->GetSoftShadow())
shadeFlags |= hsGMatState::kShadeSoftShadow;
if (passBase->GetNoProj())
@ -2380,7 +2380,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
//
// Misc flags...
//
UInt32 miscFlags = 0;
uint32_t miscFlags = 0;
if (passBase->GetBasicWire())
miscFlags |= hsGMatState::kMiscWireFrame;
if (passBase->GetMeshOutlines())
@ -2391,7 +2391,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
//
// Z flags
//
UInt32 zFlags = 0;
uint32_t zFlags = 0;
if (passBase->GetZClear())
zFlags |= hsGMatState::kZClearZ;
if (passBase->GetZNoRead())
@ -2438,7 +2438,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
// we have to set kMiscRestartPassHere on this layer
if( mat->GetNumLayers() > 0 )
{
UInt32 lastShades = mat->GetLayer( mat->GetNumLayers() - 1 )->GetShadeFlags();
uint32_t lastShades = mat->GetLayer( mat->GetNumLayers() - 1 )->GetShadeFlags();
if( ( lastShades ^ shadeFlags ) & hsGMatState::kShadeEmissive )
baseLay->SetMiscFlags( baseLay->GetMiscFlags() | hsGMatState::kMiscRestartPassHere );
@ -2460,7 +2460,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
baseLay->SetRuntimeColor(hsColorRGBA().Set(runDif.r, runDif.g, runDif.b, hsScalar1));
baseLay->SetOpacity( opac ); // Don't scale the material color by this if we're add blending; do that later
UInt32 blendType = 0;
uint32_t blendType = 0;
switch (passBase->GetOutputBlend())
{
case plPassMtlBase::kBlendAlpha: blendType |= hsGMatState::kBlendAlpha; break;
@ -2499,7 +2499,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
if (texMap && ( plasmaTopLayer = plPlasmaMAXLayer::GetPlasmaMAXLayer( baseTex ) ) != nil )
{
// Blend flags (do this first so we can pass it to IProcessPlasmaLayer())
UInt32 blendIndex = passBase->GetLayerBlend();
uint32_t blendIndex = passBase->GetLayerBlend();
if( needAlphaHack
&&(passBase->GetOutputBlend() == plPassMtlBase::kBlendAlpha)
&&(blendIndex == plPassMtlBase::kBlendAdd || blendIndex == plPassMtlBase::kBlendMult) )
@ -2513,7 +2513,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs
fWarned |= kWarnedAlphaAddCombo;
}
UInt32 blendType = 0;
uint32_t blendType = 0;
switch (blendIndex)
{
case plPassMtlBase::kBlendAlpha:
@ -2823,7 +2823,7 @@ hsGMaterial *hsMaterialConverter::IWrapTextureInMaterial(Texmap *texMap, plMaxNo
hLay->SetPreshadeColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f));
hLay->SetOpacity(1.f);
UInt32 autoStart = 0;
uint32_t autoStart = 0;
char *nodeName = node->GetName();
char *texName = bitmapTex->GetName();
// BEGIN OVERRIDE
@ -2894,7 +2894,7 @@ static float IClampToRange(float v, float lo, float hi)
return v;
}
UInt32 hsMaterialConverter::IGetOpacityRanges(plMaxNode* node, Texmap* texMap, hsScalar& tr0, hsScalar& op0, hsScalar& op1, hsScalar& tr1)
uint32_t hsMaterialConverter::IGetOpacityRanges(plMaxNode* node, Texmap* texMap, hsScalar& tr0, hsScalar& op0, hsScalar& op1, hsScalar& tr1)
{
if( node->HasFade() )
{
@ -2904,7 +2904,7 @@ UInt32 hsMaterialConverter::IGetOpacityRanges(plMaxNode* node, Texmap* texMap, h
op1 = fade.Max()[1];
tr1 = fade.Max()[0];
UInt32 funkyType = kFunkyDistance;
uint32_t funkyType = kFunkyDistance;
if( (tr0 == op0) && (op1 == tr1) )
{
@ -2959,7 +2959,7 @@ UInt32 hsMaterialConverter::IGetOpacityRanges(plMaxNode* node, Texmap* texMap, h
return kFunkyNone;
}
UInt32 funkyType = IGetFunkyType(texMap);
uint32_t funkyType = IGetFunkyType(texMap);
switch( funkyType & kFunkyMask )
{
case kFunkyDistance:
@ -3025,7 +3025,7 @@ UInt32 hsMaterialConverter::IGetOpacityRanges(plMaxNode* node, Texmap* texMap, h
return funkyType;
}
UInt32 hsMaterialConverter::IGetFunkyType(Texmap* texMap)
uint32_t hsMaterialConverter::IGetFunkyType(Texmap* texMap)
{
if( texMap && texMap->GetName() && *texMap->GetName() )
{
@ -3058,7 +3058,7 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG
prevLay->SetMiscFlags(prevLay->GetMiscFlags() | hsGMatState::kMiscBindNext);
float tr0, op0, op1, tr1;
UInt32 funkyType = IGetOpacityRanges(node, texMap, tr0, op0, op1, tr1);
uint32_t funkyType = IGetOpacityRanges(node, texMap, tr0, op0, op1, tr1);
if( funkyType == kFunkyNone )
return;
@ -3103,7 +3103,7 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG
layer->SetRuntimeColor(hsColorRGBA().Set(0, 0, 0, 1.f));
layer->SetZFlags(hsGMatState::kZNoZWrite);
UInt32 blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
uint32_t blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
layer->SetBlendFlags(blendFlags);
layer->SetClampFlags(hsGMatState::kClampTexture);
@ -3132,7 +3132,7 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG
}
plBitmap* hsMaterialConverter::IGetFunkyRamp(plMaxNode* node, UInt32 funkyType)
plBitmap* hsMaterialConverter::IGetFunkyRamp(plMaxNode* node, uint32_t funkyType)
{
const char* funkName = funkyType & kFunkyAdd ? "FunkyRampAdd" : "FunkyRampMult";
@ -3145,7 +3145,7 @@ plBitmap* hsMaterialConverter::IGetFunkyRamp(plMaxNode* node, UInt32 funkyType)
// necessary. -mcn
plMipmap *texture = plBitmapCreator::Instance().CreateBlankMipmap( kLUTWidth, kLUTHeight, plMipmap::kARGB32Config, 1, funkName, node->GetLocation() );
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
if( funkyType & kFunkyAdd )
{
@ -3253,7 +3253,7 @@ void hsMaterialConverter::IAppendWetLayer(plMaxNode* node, hsGMaterial* mat)
layer->SetRuntimeColor(hsColorRGBA().Set(0, 0, 0, 1.f));
layer->SetZFlags(hsGMatState::kZNoZWrite);
UInt32 blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
uint32_t blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
layer->SetBlendFlags(blendFlags);
layer->SetClampFlags(hsGMatState::kClampTexture);
@ -3329,7 +3329,7 @@ hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, Mtl* mtl, hsScalar& min
hsBool topFunky = true;
plPassMtl* passMtl = (plPassMtl*)mtl;
hsScalar tr0, op0, op1, tr1;
UInt32 funkyType = IGetOpacityRanges(node, mtl->GetSubTexmap(0), tr0, op0, op1, tr1);
uint32_t funkyType = IGetOpacityRanges(node, mtl->GetSubTexmap(0), tr0, op0, op1, tr1);
if( kFunkyDistance == (funkyType & kFunkyMask) )
{
@ -3536,7 +3536,7 @@ plMipmap *hsMaterialConverter::IGetBumpLutTexture(plMaxNode *node)
int doneH = 0;
// set the color data
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
int i;
// Red ramps, one with G,B = 0,0, one with G,B = 127,127
@ -3619,7 +3619,7 @@ plMipmap *hsMaterialConverter::IGetBumpLutTexture(plMaxNode *node)
int doneH = 0;
// set the color data
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
int i;
const float kWScale = 1.f;
@ -3697,7 +3697,7 @@ plMipmap *hsMaterialConverter::IGetBumpLutTexture(plMaxNode *node)
return texture;
}
plLayer* hsMaterialConverter::IMakeBumpLayer(plMaxNode* node, const char* nameBase, hsGMaterial* mat, UInt32 miscFlag)
plLayer* hsMaterialConverter::IMakeBumpLayer(plMaxNode* node, const char* nameBase, hsGMaterial* mat, uint32_t miscFlag)
{
char name[256];
switch( miscFlag & hsGMatState::kMiscBumpChans )
@ -3728,7 +3728,7 @@ plLayer* hsMaterialConverter::IMakeBumpLayer(plMaxNode* node, const char* nameBa
layer->SetRuntimeColor(hsColorRGBA().Set(0, 0, 0, 1.f));
layer->SetZFlags(hsGMatState::kZNoZWrite);
UInt32 blendFlags = miscFlag & hsGMatState::kMiscBumpDu ? hsGMatState::kBlendMADD : hsGMatState::kBlendAdd;
uint32_t blendFlags = miscFlag & hsGMatState::kMiscBumpDu ? hsGMatState::kBlendMADD : hsGMatState::kBlendAdd;
layer->SetBlendFlags(blendFlags);
layer->SetClampFlags(hsGMatState::kClampTexture);
layer->SetMiscFlags(miscFlag);
@ -3896,7 +3896,7 @@ hsBool hsMaterialConverter::ClearDoneMaterials(plMaxNode* node)
if (isMultiMat)
{
hsBool retVal = false;
Int32 i;
int32_t i;
for (i = 0; i < mtl->NumSubMtls(); i++)
{
retVal = retVal || IClearDoneMaterial(mtl->GetSubMtl(i), node);
@ -3926,7 +3926,7 @@ hsBool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node)
fLastMaterial.fOwnedCopy = false;
}
Int32 i;
int32_t i;
for (i = fDoneMaterials.Count() - 1; i >= 0; --i)
{
if (fDoneMaterials[i].fMaxMaterial == mtl)
@ -4464,7 +4464,7 @@ Mtl* hsMaterialConverter::FindSceneMtlByName(TSTR& name)
hsGuardEnd;
}
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, plMaxNode* node, hsTArray<hsGMaterial*>& out, UInt32 multiIndex /* = 0 */)
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, plMaxNode* node, hsTArray<hsGMaterial*>& out, uint32_t multiIndex /* = 0 */)
{
hsTArray<plExportMaterialData>* arGh = CreateMaterialArray(mtl, node, multiIndex);
int i;
@ -4498,7 +4498,7 @@ static void GetMtlNodes(Mtl *mtl, INodeTab& nodes)
rm = di.Next();
}
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, UInt32 multiIndex /* = 0 */)
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, uint32_t multiIndex /* = 0 */)
{
INodeTab nodes;
GetMtlNodes(mtl, nodes);
@ -4565,8 +4565,8 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co
{
for (j = 0; j < plClothingElement::kLayerMax; j++)
{
UInt32 clipLevels;
UInt32 startWidth;
uint32_t clipLevels;
uint32_t startWidth;
char *elementName = tileset->fElements.Get(i)->fName;
plPlasmaMAXLayer *layer = (plPlasmaMAXLayer *)mtl->GetTexmap(i, j);
if (layer == nil || layer->GetPBBitmap() == nil)
@ -4693,31 +4693,31 @@ static int ICompareDoneLayers(const plLayerInterface* one, const plLayerInterfac
return 1;
}
retVal = Int32(one->GetBlendFlags()) - Int32(two->GetBlendFlags());
retVal = int32_t(one->GetBlendFlags()) - int32_t(two->GetBlendFlags());
if( retVal < 0 )
return -1;
else if( retVal > 0 )
return 1;
retVal = Int32(one->GetZFlags()) - Int32(two->GetZFlags());
retVal = int32_t(one->GetZFlags()) - int32_t(two->GetZFlags());
if( retVal < 0 )
return -1;
else if( retVal > 0 )
return 1;
retVal = Int32(one->GetClampFlags()) - Int32(two->GetClampFlags());
retVal = int32_t(one->GetClampFlags()) - int32_t(two->GetClampFlags());
if( retVal < 0 )
return -1;
else if( retVal > 0 )
return 1;
retVal = Int32(one->GetMiscFlags()) - Int32(two->GetMiscFlags());
retVal = int32_t(one->GetMiscFlags()) - int32_t(two->GetMiscFlags());
if( retVal < 0 )
return -1;
else if( retVal > 0 )
return 1;
retVal = Int32(one->GetShadeFlags()) - Int32(two->GetShadeFlags());
retVal = int32_t(one->GetShadeFlags()) - int32_t(two->GetShadeFlags());
if( retVal < 0 )
return -1;
else if( retVal > 0 )
@ -5140,7 +5140,7 @@ hsMaterialConverter::DoneMaterialData* hsMaterialConverter::IFindDoneMaterial(Do
plMipmap *hsMaterialConverter::GetStaticColorTexture(Color c, plLocation &loc)
{
char texName[256];
UInt32 colorHex = MakeUInt32Color(c.r, c.g, c.b, 1.f);
uint32_t colorHex = MakeUInt32Color(c.r, c.g, c.b, 1.f);
sprintf(texName, "StaticColorTex_4x4_%X", colorHex);
int w = 4;
@ -5149,7 +5149,7 @@ plMipmap *hsMaterialConverter::GetStaticColorTexture(Color c, plLocation &loc)
plMipmap *texture = plBitmapCreator::Instance().CreateBlankMipmap(w, h, plMipmap::kARGB32Config, 1, texName, loc );
// set the color data
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
int x, y;
for (y = 0; y < h; y++)

View File

@ -90,7 +90,7 @@ class hsBitVector;
class plExportMaterialData
{
public:
UInt32 fNumBlendChannels;
uint32_t fNumBlendChannels;
hsGMaterial *fMaterial;
};
@ -138,10 +138,10 @@ public:
static int GetCoordMapping(StdUVGen *uvgen);
static void GetNodesByMaterial(Mtl *mtl, hsTArray<plMaxNode*> &out);
static UInt32 VertexChannelsRequestMask(plMaxNode* node, int iSubMtl, Mtl* mtl);
static UInt32 VertexChannelsRequiredMask(plMaxNode* node, int iSubMtl);
static uint32_t VertexChannelsRequestMask(plMaxNode* node, int iSubMtl, Mtl* mtl);
static uint32_t VertexChannelsRequiredMask(plMaxNode* node, int iSubMtl);
static int NumVertexOpacityChannelsRequired(plMaxNode* node, int iSubMtl);
static UInt32 ColorChannelsUseMask(plMaxNode* node, int iSubMtl);
static uint32_t ColorChannelsUseMask(plMaxNode* node, int iSubMtl);
static int MaxUsedUVWSrc(plMaxNode* node, Mtl* mtl);
@ -159,7 +159,7 @@ public:
static Mtl* FindSubMtlByName(TSTR& name, Animatable* anim);
Mtl* FindSceneMtlByName(TSTR& name);
hsTArray<plExportMaterialData> *CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, UInt32 multiIndex);
hsTArray<plExportMaterialData> *CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint32_t multiIndex);
// true if last material creation changed MAX time, invalidating current mesh
hsBool ChangedTimes() { return fChangedTimes; }
@ -168,15 +168,15 @@ public:
hsBool ClearDoneMaterials(plMaxNode* node);
int GetMaterialArray(Mtl *mtl, plMaxNode* node, hsTArray<hsGMaterial*>& out, UInt32 multiIndex = 0 );
int GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, UInt32 multiIndex = 0);
int GetMaterialArray(Mtl *mtl, plMaxNode* node, hsTArray<hsGMaterial*>& out, uint32_t multiIndex = 0 );
int GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, uint32_t multiIndex = 0);
void CollectConvertedMaterials(Mtl *mtl, hsTArray<hsGMaterial *> &out);
plClothingItem *GenerateClothingItem(plClothingMtl *mtl, const plLocation &loc);
hsGMaterial* AlphaHackVersion(plMaxNode* node, Mtl* mtl, int subIndex); // used by DynamicDecals
hsGMaterial* NonAlphaHackVersion(plMaxNode* node, Mtl* mtl, int subIndex);
hsGMaterial* AlphaHackPrint(plMaxNode* node, Texmap* baseTex, UInt32 blendFlags);
hsGMaterial* NonAlphaHackPrint(plMaxNode* node, Texmap* baseTex, UInt32 blendFlags);
hsGMaterial* AlphaHackPrint(plMaxNode* node, Texmap* baseTex, uint32_t blendFlags);
hsGMaterial* NonAlphaHackPrint(plMaxNode* node, Texmap* baseTex, uint32_t blendFlags);
plMipmap* GetStaticColorTexture(Color c, plLocation &loc); // Creates a 4x4 texture of the specified solid color;
@ -235,7 +235,7 @@ enum {
hsBool fSubMultiMat;
hsBool fOwnedCopy;
hsBool fRuntimeLit;
UInt32 fSubMtlFlags;
uint32_t fSubMtlFlags;
int fNumUVChannels;
hsBool fMakeAlphaLayer;
};
@ -275,11 +275,11 @@ private:
hsBool IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, const char* namePrefix);
hsGMaterial* IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, hsBool isMultiMat,
hsBool forceCopy, hsBool runtimeLit, UInt32 subMtlFlags, int numUVChannels, hsBool makeAlphaLayer);
hsBool forceCopy, hsBool runtimeLit, uint32_t subMtlFlags, int numUVChannels, hsBool makeAlphaLayer);
void IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat, int bumpLayerIdx);
void IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat);
plLayer* IMakeBumpLayer(plMaxNode* node, const char* nameBase, hsGMaterial* mat, UInt32 miscFlag);
plLayer* IMakeBumpLayer(plMaxNode* node, const char* nameBase, hsGMaterial* mat, uint32_t miscFlag);
plMipmap* IGetBumpLutTexture(plMaxNode* node);
hsBool IHasSubMtl(Mtl* base, Mtl* sub);
@ -311,43 +311,43 @@ private:
BMM_Color_64 ICubeSample(Bitmap *bitmap[6], double phi, double theta);
void IBuildSphereMap(Bitmap *bitmap[6], Bitmap *bm);
#if 0 // DEFER_ANIM_MAT
void IProcessAnimMaterial(BitmapTex *bitmapTex, hsGAnimLayer* at, UInt32 texFlags, UInt32 procFlags);
void IProcessAnimMaterial(BitmapTex *bitmapTex, hsGAnimLayer* at, uint32_t texFlags, uint32_t procFlags);
#endif // DEFER_ANIM_MAT
static hsBool ITextureTransformIsAnimated(Texmap *texmap);
static hsBool IHasAnimatedControllers(Animatable* anim);
static hsBool IIsAnimatedTexmap(Texmap* texmap);
static UInt32 ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2, const Point3& p3,
static uint32_t ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2, const Point3& p3,
int chan,
UInt32 mBlack, UInt32 mGrey, UInt32 mWhite);
static UInt32 ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2,
uint32_t mBlack, uint32_t mGrey, uint32_t mWhite);
static uint32_t ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2,
int chan,
UInt32 mBlack, UInt32 mGrey, UInt32 mWhite);
uint32_t mBlack, uint32_t mGrey, uint32_t mWhite);
void IAppendWetLayer(plMaxNode* node, hsGMaterial* mat);
static plBitmap* IGetFunkyRamp(plMaxNode* node, UInt32 funkyType);
static plBitmap* IGetFunkyRamp(plMaxNode* node, uint32_t funkyType);
static void IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsGMaterial* mat);
static hsBool IHasFunkyOpacity(plMaxNode* node, Texmap* texMap);
static UInt32 IGetFunkyType(Texmap* texMap);
static UInt32 IGetOpacityRanges(plMaxNode* node, Texmap* texMap, hsScalar& tr0, hsScalar& op0, hsScalar& op1, hsScalar& tr1);
static uint32_t IGetFunkyType(Texmap* texMap);
static uint32_t IGetOpacityRanges(plMaxNode* node, Texmap* texMap, hsScalar& tr0, hsScalar& op0, hsScalar& op1, hsScalar& tr1);
Interface *fInterface;
hsConverterUtils& fConverterUtils;
hsBool fSave;
plErrorMsg *fErrorMsg;
Int32 fSubIndex;
int32_t fSubIndex;
hsBool fChangedTimes;
char *fNodeName;
UInt32 fWarned;
uint32_t fWarned;
DoneMaterialData fLastMaterial;
hsTArray<DoneMaterialData> fDoneMaterials;
hsBool IsMatchingDoneMaterial(DoneMaterialData *dmd,
Mtl *mtl, hsBool isMultiMat, UInt32 subMtlFlags, hsBool forceCopy, hsBool runtimeLit,
Mtl *mtl, hsBool isMultiMat, uint32_t subMtlFlags, hsBool forceCopy, hsBool runtimeLit,
plMaxNode *node, int numUVChannels, hsBool makeAlphaLayer);
void ISortDoneMaterials(hsTArray<DoneMaterialData*>& doneMats);

View File

@ -220,7 +220,7 @@ plMipmap *plBitmapCreator::ICreateBitmap(plBitmapData *bd)
hBitmap = hMipmap;
UInt32 flagsToSet = 0;
uint32_t flagsToSet = 0;
if( bd->texFlags & plMipmap::kNoMaxSize )
flagsToSet |= plMipmap::kNoMaxSize;
@ -671,7 +671,7 @@ void plBitmapCreator::IAddBitmap( plBitmap *bitmap, hsBool dontRef )
// Simple mipmap creator, but importantly, it also adds the mipmap to the list
// of "converted" maps to clean up at the end of export.
plMipmap *plBitmapCreator::CreateBlankMipmap( UInt32 width, UInt32 height, unsigned config, UInt8 numLevels,
plMipmap *plBitmapCreator::CreateBlankMipmap( uint32_t width, uint32_t height, unsigned config, uint8_t numLevels,
const char *keyName, const plLocation &keyLocation )
{
hsGuardBegin( "plBitmapCreator::CreateBlankMipmap" );

View File

@ -61,8 +61,8 @@ public:
};
const char *fileName;
UInt32 texFlags;
UInt32 createFlags;
uint32_t texFlags;
uint32_t createFlags;
hsScalar detailDropoffStart;
hsScalar detailDropoffStop;
hsScalar detailMax;
@ -71,8 +71,8 @@ public:
hsBool isStaticCubicEnvMap;
hsBool invertAlpha;
const char *faceNames[ 6 ];
UInt32 maxDimension;
UInt8 clampFlags;
uint32_t maxDimension;
uint8_t clampFlags;
bool useJPEG;
plBitmapData()
@ -100,7 +100,7 @@ class plBitmapCreator
static plBitmapCreator &Instance();
plBitmap *CreateTexture( plBitmapData *bd, const plLocation &loc, int clipID = -1 );
plMipmap *CreateBlankMipmap( UInt32 width, UInt32 height, unsigned config, UInt8 numLevels, const char *keyName, const plLocation &keyLocation );
plMipmap *CreateBlankMipmap( uint32_t width, uint32_t height, unsigned config, uint8_t numLevels, const char *keyName, const plLocation &keyLocation );
void Init( hsBool save, plErrorMsg *msg );
void DeInit( void );

View File

@ -194,13 +194,13 @@ void plClusterUtil::ISetupGroupFromTemplate(plMaxNode* templ)
class sortData
{
public:
UInt16 fIdx0;
UInt16 fIdx1;
UInt16 fIdx2;
uint16_t fIdx0;
uint16_t fIdx1;
uint16_t fIdx2;
hsScalar fDist;
sortData() {}
sortData(UInt16 idx0, UInt16 idx1, UInt16 idx2, hsScalar dist)
sortData(uint16_t idx0, uint16_t idx1, uint16_t idx2, hsScalar dist)
: fIdx0(idx0), fIdx1(idx1), fIdx2(idx2), fDist(dist)
{
}
@ -213,7 +213,7 @@ public:
void plClusterUtil::ISortTemplate(plSpanTemplateB* templ) const
{
UInt16* indexData = templ->fIndices;
uint16_t* indexData = templ->fIndices;
const int numTris = templ->NumTris();
typedef std::vector<sortData> sortVec;
sortVec vec;
@ -258,7 +258,7 @@ void plClusterUtil::ISortTemplate(plSpanTemplateB* templ) const
void plClusterUtil::ITemplateFromGeo(plSpanTemplateB* templ, plGeometrySpan* geo)
{
UInt16 format = plSpanTemplate::MakeFormat(
uint16_t format = plSpanTemplate::MakeFormat(
true, // hasColor
geo->GetNumUVs(), // UVW count
geo->fFormat & plGeometrySpan::kSkinIndices, // hasWgtIdx
@ -268,20 +268,20 @@ void plClusterUtil::ITemplateFromGeo(plSpanTemplateB* templ, plGeometrySpan* geo
);
UInt32 numVerts = geo->fNumVerts;
UInt32 numTris = geo->fNumIndices / 3;
uint32_t numVerts = geo->fNumVerts;
uint32_t numTris = geo->fNumIndices / 3;
// Alloc it.
templ->Alloc(format, numVerts, numTris);
templ->AllocColors();
UInt32 numPos = templ->NumPos();
UInt32 numNorm = templ->NumNorm();
UInt32 numUVWs = templ->NumUVWs();
UInt32 numWeights = templ->NumWeights();
UInt32 numColor = templ->NumColor();
UInt32 numColor2 = templ->NumColor2();
UInt32 numWgtIdx = templ->NumWgtIdx();
uint32_t numPos = templ->NumPos();
uint32_t numNorm = templ->NumNorm();
uint32_t numUVWs = templ->NumUVWs();
uint32_t numWeights = templ->NumWeights();
uint32_t numColor = templ->NumColor();
uint32_t numColor2 = templ->NumColor2();
uint32_t numWgtIdx = templ->NumWgtIdx();
// Fill in the data.
memcpy(templ->fIndices, geo->fIndexData, templ->IndexSize());
@ -290,7 +290,7 @@ void plClusterUtil::ITemplateFromGeo(plSpanTemplateB* templ, plGeometrySpan* geo
for( i = 0; i < templ->NumVerts(); i++ )
{
float wgt[4];
UInt32 wgtIdx;
uint32_t wgtIdx;
geo->ExtractInitColor(i, templ->MultColor(i), templ->AddColor(i));
@ -520,7 +520,7 @@ void plClusterUtil::IFreeClustersRecur(plL2WTabTab& dst) const
delete dst[i];
}
inline hsScalar inlGetAlpha(UInt32* color)
inline hsScalar inlGetAlpha(uint32_t* color)
{
return hsScalar(*color >> 24) / 255.99f;
}
@ -563,7 +563,7 @@ plSpanEncoding plClusterUtil::ISelectEncoding(plPoint3TabTab& delPosTab, plColor
plColorTab& color = *colorsTab[i];
for( j = 0; j < color.Count(); j++ )
{
UInt32 col = color[j];
uint32_t col = color[j];
if( (col & 0x00ffffff) != 0x00ffffff )
hasColor = true;
if( (col & 0xff000000) != 0xff000000 )
@ -572,7 +572,7 @@ plSpanEncoding plClusterUtil::ISelectEncoding(plPoint3TabTab& delPosTab, plColor
}
}
UInt32 code = 0;
uint32_t code = 0;
hsScalar posScale = 1.f;
if( hasColor && hasAlpha )
@ -770,7 +770,7 @@ void plClusterUtil::IDelPosAndColor(plSpanTemplateB* templ,
// Make the stored colors the actual output UInt32.
// Make the stored colors the actual output uint32_t.
// templ has the mult and add colors, apply them here.
if( doCol )
{

View File

@ -84,7 +84,7 @@ class plL2WTabTab : public Tab<plL2WTab*> {};
class plPoint3Tab : public Tab<hsVector3> {};
class plPoint3TabTab : public Tab<plPoint3Tab*> {};
class plColorTab : public Tab<UInt32> {};
class plColorTab : public Tab<uint32_t> {};
class plColorTabTab : public Tab<plColorTab*> {};
class plSpanTemplTab : public Tab<plSpanTemplateB*> {};
@ -92,7 +92,7 @@ class plSpanTemplTab : public Tab<plSpanTemplateB*> {};
class plClusterUtil
{
protected:
UInt32 fIdx;
uint32_t fIdx;
plClusterGroup* fGroup;
plMaxNode* fTemplNode;
plSpanTemplateB* fTemplate;

View File

@ -88,7 +88,7 @@ protected:
public:
static plConvert& Instance();
UInt32 fWarned;
uint32_t fWarned;
enum {
kWarnedDecalOnBlendObj = 0x1,
kWarnedBadMaterialOnParticle = 0x2,

View File

@ -61,7 +61,7 @@ void plDistTree::Reset()
fNodes.Reset();
}
void plDistTree::AddBoxIData(const Box3& box, const Box3& fade, UInt32 iData)
void plDistTree::AddBoxIData(const Box3& box, const Box3& fade, uint32_t iData)
{
fRoot = IAddNodeRecur(fRoot, box, fade, iData);
}
@ -139,7 +139,7 @@ BOOL plDistTree::IBoxesClear(const Box3& box0, const Box3& box1) const
||(box0.Max()[2] < box1.Min()[2]);
}
BOOL plDistTree::IBoxClearRecur(Int32 iNode, const Box3& box, const Box3& fade) const
BOOL plDistTree::IBoxClearRecur(int32_t iNode, const Box3& box, const Box3& fade) const
{
if( iNode < 0 )
return true;
@ -162,7 +162,7 @@ BOOL plDistTree::IBoxClearRecur(Int32 iNode, const Box3& box, const Box3& fade)
return true;
}
BOOL plDistTree::IPointClearRecur(Int32 iNode, const Point3& pt, const Box3& fade) const
BOOL plDistTree::IPointClearRecur(int32_t iNode, const Point3& pt, const Box3& fade) const
{
if( iNode < 0 )
return true;
@ -186,7 +186,7 @@ BOOL plDistTree::IPointClearRecur(Int32 iNode, const Point3& pt, const Box3& fad
}
Int32 plDistTree::IAddNodeRecur(Int32 iNode, const Box3& box, const Box3& fade, UInt32 iData)
int32_t plDistTree::IAddNodeRecur(int32_t iNode, const Box3& box, const Box3& fade, uint32_t iData)
{
// if iNode < 0, make a node for box and return that.
if( iNode < 0 )
@ -218,9 +218,9 @@ Int32 plDistTree::IAddNodeRecur(Int32 iNode, const Box3& box, const Box3& fade,
{
#endif
{
Int32 iChild = IGetChild(fNodes[iNode].fBox, box);
int32_t iChild = IGetChild(fNodes[iNode].fBox, box);
Int32 iChildNode = IAddNodeRecur(fNodes[iNode].fChildren[iChild], box, fade, iData);
int32_t iChildNode = IAddNodeRecur(fNodes[iNode].fChildren[iChild], box, fade, iData);
fNodes[iNode].fChildren[iChild] = iChildNode;
fNodes[iNode].fBox += fNodes[fNodes[iNode].fChildren[iChild]].fBox;
@ -233,15 +233,15 @@ Int32 plDistTree::IAddNodeRecur(Int32 iNode, const Box3& box, const Box3& fade,
}
}
Int32 plDistTree::IMergeNodes(Int32 iNode, const Box3& box, const Box3& fade, UInt32 iData)
int32_t plDistTree::IMergeNodes(int32_t iNode, const Box3& box, const Box3& fade, uint32_t iData)
{
Box3 parBox = box;
parBox += fNodes[iNode].fBox;
Int32 pNode = INextNode(parBox, NonFade(), UInt32(-1));
Int32 iChild = IGetChild(parBox, box);
int32_t pNode = INextNode(parBox, NonFade(), uint32_t(-1));
int32_t iChild = IGetChild(parBox, box);
Int32 cNode = INextNode(box, fade, iData);
int32_t cNode = INextNode(box, fade, iData);
fNodes[pNode].fChildren[iChild] = cNode;
@ -258,20 +258,20 @@ Int32 plDistTree::IMergeNodes(Int32 iNode, const Box3& box, const Box3& fade, UI
return pNode;
}
Int32 plDistTree::IGetChild(const Box3& parent, const Box3& child) const
int32_t plDistTree::IGetChild(const Box3& parent, const Box3& child) const
{
Point3 parCenter = parent.Center();
Point3 chiCenter = child.Center();
Int32 idx = ((parCenter[0] < chiCenter[0]) << 0)
int32_t idx = ((parCenter[0] < chiCenter[0]) << 0)
| ((parCenter[1] < chiCenter[1]) << 1)
| ((parCenter[2] < chiCenter[2]) << 2);
return idx;
}
Int32 plDistTree::INextNode(const Box3& box, const Box3& fade, UInt32 iData)
int32_t plDistTree::INextNode(const Box3& box, const Box3& fade, uint32_t iData)
{
Int32 iNode = fNodes.GetCount();
int32_t iNode = fNodes.GetCount();
fNodes.Push();
@ -291,12 +291,12 @@ Int32 plDistTree::INextNode(const Box3& box, const Box3& fade, UInt32 iData)
return iNode;
}
void plDistTree::HarvestBox(const Box3& box, Tab<Int32>& out) const
void plDistTree::HarvestBox(const Box3& box, Tab<int32_t>& out) const
{
IHarvestBoxRecur(fRoot, box, out);
}
void plDistTree::IHarvestBoxRecur(Int32 iNode, const Box3& box, Tab<Int32>& out) const
void plDistTree::IHarvestBoxRecur(int32_t iNode, const Box3& box, Tab<int32_t>& out) const
{
if( iNode < 0 )
return;

View File

@ -51,16 +51,16 @@ public:
enum {
kIsLeaf = 0x1
};
UInt32 fFlags;
uint32_t fFlags;
Int32 fChildren[8];
int32_t fChildren[8];
Box3 fBox;
Box3 fFade;
union
{
void* fPData;
UInt32 fIData;
uint32_t fIData;
};
const Box3& GetBox() const { return fBox; }
@ -73,26 +73,26 @@ class plDistTree
{
protected:
Int32 fRoot;
int32_t fRoot;
hsLargeArray<plDistNode> fNodes;
Int32 IAddNodeRecur(Int32 iNode, const Box3& box, const Box3& fade, UInt32 iData);
int32_t IAddNodeRecur(int32_t iNode, const Box3& box, const Box3& fade, uint32_t iData);
Int32 IMergeNodes(Int32 iNode, const Box3& box, const Box3& fade, UInt32 iData);
Int32 INextNode(const Box3& box, const Box3& fade, UInt32 iData);
int32_t IMergeNodes(int32_t iNode, const Box3& box, const Box3& fade, uint32_t iData);
int32_t INextNode(const Box3& box, const Box3& fade, uint32_t iData);
Int32 IGetChild(const Box3& parent, const Box3& child) const;
int32_t IGetChild(const Box3& parent, const Box3& child) const;
inline BOOL IBoxesClear(const Box3& box0, const Box3& box1) const;
inline BOOL IFadesClear(const Box3& fade0, const Box3& fade1) const;
BOOL IBox0ContainsBox1(const Box3& box0, const Box3& box1, const Box3& fade0, const Box3& fade1) const;
BOOL IBoxClearRecur(Int32 iNode, const Box3& box, const Box3& fade) const;
BOOL IPointClearRecur(Int32 iNode, const Point3& pt, const Box3& fade) const;
BOOL IBoxClearRecur(int32_t iNode, const Box3& box, const Box3& fade) const;
BOOL IPointClearRecur(int32_t iNode, const Point3& pt, const Box3& fade) const;
void IHarvestBoxRecur(Int32 iNode, const Box3& box, Tab<Int32>& out) const;
void IHarvestBoxRecur(int32_t iNode, const Box3& box, Tab<int32_t>& out) const;
public:
plDistTree();
@ -100,8 +100,8 @@ public:
void Reset();
void AddBoxPData(const Box3& box, const Box3& fade, void* pData=nil) { AddBoxIData(box, fade, UInt32(pData)); }
void AddBoxIData(const Box3& box, const Box3& fade, UInt32 iData=0);
void AddBoxPData(const Box3& box, const Box3& fade, void* pData=nil) { AddBoxIData(box, fade, uint32_t(pData)); }
void AddBoxIData(const Box3& box, const Box3& fade, uint32_t iData=0);
void AddBox(const Box3& box, const Box3& fade=NonFade()) { AddBoxIData(box, fade, 0); }
BOOL BoxClear(const Box3& box, const Box3& fade) const;
@ -111,9 +111,9 @@ public:
static Box3 NonFade() { return Box3(Point3(0,0,0), Point3(0,0,0)); }
void HarvestBox(const Box3& box, Tab<Int32>& out) const;
void HarvestBox(const Box3& box, Tab<int32_t>& out) const;
const plDistNode& GetBox(Int32 i) const { return fNodes[i]; }
const plDistNode& GetBox(int32_t i) const { return fNodes[i]; }
};
#endif // plDistTree_inc

View File

@ -92,7 +92,7 @@ static inline Matrix3 Transpose(const Matrix3& m)
plDistributor::plDistributor()
{
IClear();
fRand.SetSeed(UInt32(this));
fRand.SetSeed(uint32_t(this));
}
plDistributor::~plDistributor()
@ -303,14 +303,14 @@ void plDistributor::IMakeMeshTree() const
}
}
void plDistributor::IFindFaceSet(const Box3& box, Tab<Int32>& faces) const
void plDistributor::IFindFaceSet(const Box3& box, Tab<int32_t>& faces) const
{
Tab<Int32> distNodes;
Tab<int32_t> distNodes;
fMeshTree.HarvestBox(box, distNodes);
int i;
for( i = 0; i < distNodes.Count(); i++ )
{
Int32 iFace = Int32(fMeshTree.GetBox(distNodes[i]).fIData);
int32_t iFace = int32_t(fMeshTree.GetBox(distNodes[i]).fIData);
faces.Append(1, &iFace);
}
}
@ -1001,7 +1001,7 @@ void plDistributor::AddReplicateNode(INode* node)
fRepNodes.Append(1, &node);
}
BOOL plDistributor::IProjectVertex(const Point3& pt, const Point3& dir, float maxDist, Tab<Int32>&faces, Point3& projPt) const
BOOL plDistributor::IProjectVertex(const Point3& pt, const Point3& dir, float maxDist, Tab<int32_t>&faces, Point3& projPt) const
{
BOOL retVal = false;
plTriUtils triUtil;
@ -1050,7 +1050,7 @@ BOOL plDistributor::IConformCheck(Matrix3& l2w, int iRepNode, plMeshCacheTab& ca
Box3 bnd = mesh->getBoundingBox() * OTM;
bnd = Box3(Point3(bnd.Min().x, bnd.Min().y, -bnd.Max().z), bnd.Max());
bnd = bnd * l2w;
Tab<Int32> faces;
Tab<int32_t> faces;
IFindFaceSet(bnd, faces);
int i;
@ -1084,7 +1084,7 @@ BOOL plDistributor::IConformAll(Matrix3& l2w, int iRepNode, plMeshCacheTab& cach
Box3 bnd = mesh->getBoundingBox() * OTM;
bnd = Box3(Point3(bnd.Min().x, bnd.Min().y, -bnd.Max().z), bnd.Max());
bnd = bnd * l2w;
Tab<Int32> faces;
Tab<int32_t> faces;
IFindFaceSet(bnd, faces);
// l2w, iRepNode, cache, &iCache, maxScaledDist, dir
@ -1143,7 +1143,7 @@ BOOL plDistributor::IConformHeight(Matrix3& l2w, int iRepNode, plMeshCacheTab& c
Box3 bnd = mesh->getBoundingBox() * OTM;
bnd = Box3(Point3(bnd.Min().x, bnd.Min().y, -bnd.Max().z), bnd.Max());
bnd = bnd * l2w;
Tab<Int32> faces;
Tab<int32_t> faces;
IFindFaceSet(bnd, faces);
// l2w, iRepNode, cache, &iCache, maxScaledDist, dir
@ -1212,7 +1212,7 @@ BOOL plDistributor::IConformBase(Matrix3& l2w, int iRepNode, plMeshCacheTab& cac
Box3 bnd = mesh->getBoundingBox() * OTM;
bnd = Box3(Point3(bnd.Min().x, bnd.Min().y, -bnd.Max().z), bnd.Max());
bnd = bnd * l2w;
Tab<Int32> faces;
Tab<int32_t> faces;
IFindFaceSet(bnd, faces);
// l2w, iRepNode, cache, &iCache, maxScaledDist, dir
@ -1452,7 +1452,7 @@ void plDistributor::IReserveSpace(const Box3& clearBox) const
fDistTree->AddBox(clearBox, fFade);
}
UInt32 plDistributor::GetRandSeed() const
uint32_t plDistributor::GetRandSeed() const
{
return fRand.GetSeed();
}

View File

@ -255,8 +255,8 @@ protected:
BOOL INeedMeshTree() const;
void IMakeMeshTree() const;
void IFindFaceSet(const Box3& box, Tab<Int32>& faces) const;
BOOL IProjectVertex(const Point3& pt, const Point3& dir, float maxDist, Tab<Int32>&faces, Point3& projPt) const;
void IFindFaceSet(const Box3& box, Tab<int32_t>& faces) const;
BOOL IProjectVertex(const Point3& pt, const Point3& dir, float maxDist, Tab<int32_t>&faces, Point3& projPt) const;
BOOL IConform(Matrix3& l2w, int iRepNode, plMeshCacheTab& cache, int& iCache) const;
BOOL IConformHeight(Matrix3& l2w, int iRepNode, plMeshCacheTab& cache, int& iCache) const;
BOOL IConformAll(Matrix3& l2w, int iRepNode, plMeshCacheTab& cache, int& iCache) const;
@ -302,7 +302,7 @@ public:
BOOL Distribute(INode* surfNode, plDistribInstTab& replicants, plMeshCacheTab& cache, plExportProgressBar& bar) const;
void Reset();
UInt32 GetRandSeed() const;
uint32_t GetRandSeed() const;
void SetRandSeed(int seed);
void ClearReplicateNodes();

View File

@ -198,7 +198,7 @@ void plLayerConverter::UnmuteWarnings( void )
plLayerInterface *plLayerConverter::ConvertTexmap( Texmap *texmap,
plMaxNode *maxNode,
UInt32 blendFlags, hsBool preserveUVOffset,
uint32_t blendFlags, hsBool preserveUVOffset,
hsBool upperLayer )
{
hsGuardBegin( "plLayerConverter::ConvertTexmap" );
@ -275,7 +275,7 @@ void plLayerConverter::IRegisterConversion( plPlasmaMAXLayer *origLayer, plLa
//// IConvertLayerTex /////////////////////////////////////////////////////////
plLayerInterface *plLayerConverter::IConvertLayerTex( plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer )
{
hsGuardBegin( "plLayerConverter::IConvertLayerTex" );
@ -332,7 +332,7 @@ plLayerInterface *plLayerConverter::IConvertLayerTex( plPlasmaMAXLayer *layer
bd.fileName = bi->Name();
// Create texture and add it to list if unique
Int32 texFlags = 0;//hsGTexture::kMipMap;
int32_t texFlags = 0;//hsGTexture::kMipMap;
// Texture Alpha/Color
if( bitmapPB->GetInt( kBmpInvertColor ) )
@ -411,7 +411,7 @@ plLayerInterface *plLayerConverter::IConvertLayerTex( plPlasmaMAXLayer *layer
//// IConvertStaticEnvLayer ///////////////////////////////////////////////////
plLayerInterface *plLayerConverter::IConvertStaticEnvLayer( plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer )
{
hsGuardBegin( "plLayerConverter::IConvertStaticEnvLayer" );
@ -451,7 +451,7 @@ plLayerInterface *plLayerConverter::IConvertStaticEnvLayer( plPlasmaMAXLayer
bd.fileName = bi->Name();
// Create texture and add it to list if unique
Int32 texFlags = 0;
int32_t texFlags = 0;
// Texture Alpha/Color
if( bitmapPB->GetInt( plStaticEnvLayer::kBmpInvertColor ) )
@ -521,7 +521,7 @@ plLayerInterface *plLayerConverter::IConvertStaticEnvLayer( plPlasmaMAXLayer
//// IConvertDynamicEnvLayer //////////////////////////////////////////////////
plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer )
{
hsGuardBegin( "plLayerConverter::IConvertDynamicEnvLayer" );
@ -556,7 +556,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer
}
// Create texture and add it to list if unique
Int32 texFlags = 0;
int32_t texFlags = 0;
/// Since we're a cubic environMap, we don't care about the UV transform nor the uvwSrc
plasmaLayer->SetUVWSrc( 0 );
@ -588,7 +588,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer
}
plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer)
{
hsGuardBegin( "plLayerConverter::IConvertCameraLayer" );
@ -612,7 +612,7 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay
plDynamicCamMap *map = plEnvMapComponent::GetCamMap(rootNode ? rootNode : maxNode);
if (map)
{
Int32 texFlags = 0;
int32_t texFlags = 0;
if (!pb->GetInt(ParamID(plMAXCameraLayer::kExplicitCam)))
{
plasmaLayer->SetUVWSrc(plLayerInterface::kUVWPosition);
@ -657,7 +657,7 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay
//// IConvertDynamicTextLayer /////////////////////////////////////////////////
plLayerInterface *plLayerConverter::IConvertDynamicTextLayer( plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer )
{
hsGuardBegin( "plLayerConverter::IConvertDynamicTextLayer" );
@ -692,7 +692,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicTextLayer( plPlasmaMAXLaye
maxNode );
// Set the initial bitmap if necessary
UInt32 *initBuffer = IGetInitBitmapBuffer( maxLayer );
uint32_t *initBuffer = IGetInitBitmapBuffer( maxLayer );
if( initBuffer != nil )
{
texture->SetInitBuffer( initBuffer );
@ -712,11 +712,11 @@ plLayerInterface *plLayerConverter::IConvertDynamicTextLayer( plPlasmaMAXLaye
// Called to get a 32-bit uncompressed ARGB version of the init bitmap of
// a dynamic text layer
UInt32 *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) const
uint32_t *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) const
{
UInt32 *buffer;
uint32_t *buffer;
hsRGBAColor32 *buffPtr;
UInt16 width, height;
uint16_t width, height;
IParamBlock2 *bitmapPB = layer->GetParamBlockByID( plDynamicTextLayer::kBlkBitmap );
@ -728,7 +728,7 @@ UInt32 *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) con
width = bitmapPB->GetInt( (ParamID)plDynamicTextLayer::kBmpExportWidth );
height = bitmapPB->GetInt( (ParamID)plDynamicTextLayer::kBmpExportHeight );
buffer = TRACKED_NEW UInt32[ width * height ];
buffer = TRACKED_NEW uint32_t[ width * height ];
if( buffer == nil )
return nil;
@ -762,12 +762,12 @@ UInt32 *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) con
return buffer;
}
static UInt32 MakeUInt32Color(float r, float g, float b, float a)
static uint32_t MakeUInt32Color(float r, float g, float b, float a)
{
return (UInt32(a * 255.9f) << 24)
|(UInt32(r * 255.9f) << 16)
|(UInt32(g * 255.9f) << 8)
|(UInt32(b * 255.9f) << 0);
return (uint32_t(a * 255.9f) << 24)
|(uint32_t(r * 255.9f) << 16)
|(uint32_t(g * 255.9f) << 8)
|(uint32_t(b * 255.9f) << 0);
}
plBitmap* plLayerConverter::IGetAttenRamp(plMaxNode *node, BOOL isAdd, int loClamp, int hiClamp)
@ -789,7 +789,7 @@ plBitmap* plLayerConverter::IGetAttenRamp(plMaxNode *node, BOOL isAdd, int loCla
// necessary. -mcn
plMipmap *texture = plBitmapCreator::Instance().CreateBlankMipmap( kLUTWidth, kLUTHeight, plMipmap::kARGB32Config, 1, funkName, node->GetLocation() );
UInt32* pix = (UInt32*)texture->GetImage();
uint32_t* pix = (uint32_t*)texture->GetImage();
if( isAdd )
{
@ -883,7 +883,7 @@ plLayer* plLayerConverter::ICreateAttenuationLayer(const char* name, plMaxNode *
layer->SetRuntimeColor(hsColorRGBA().Set(0, 0, 0, 1.f));
layer->SetZFlags(hsGMatState::kZNoZWrite);
UInt32 blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
uint32_t blendFlags = hsGMatState::kBlendAlpha | hsGMatState::kBlendNoTexColor | hsGMatState::kBlendAlphaMult;
layer->SetBlendFlags(blendFlags);
layer->SetClampFlags(hsGMatState::kClampTexture);
@ -895,7 +895,7 @@ plLayer* plLayerConverter::ICreateAttenuationLayer(const char* name, plMaxNode *
}
plLayerInterface* plLayerConverter::IConvertAngleAttenLayer(plPlasmaMAXLayer *layer,
plMaxNode *maxNode, UInt32 blendFlags,
plMaxNode *maxNode, uint32_t blendFlags,
hsBool preserveUVOffset, hsBool upperLayer)
{
hsGuardBegin( "plPlasmaMAXLayer::IConvertAngleAttenLayer" );
@ -967,7 +967,7 @@ void plLayerConverter::IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *de
}
// UVW Src
Int32 uvwSrc = srcLayer->GetMapChannel() - 1;
int32_t uvwSrc = srcLayer->GetMapChannel() - 1;
if( fErrorMsg->Set( !( fWarned & kWarnedTooManyUVs ) &&
( ( uvwSrc < 0 ) || ( uvwSrc >= plGeometrySpan::kMaxNumUVChannels ) ),
@ -989,7 +989,7 @@ void plLayerConverter::IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *de
//// ICreateDynTextMap ////////////////////////////////////////////////////////
plDynamicTextMap *plLayerConverter::ICreateDynTextMap( const char *layerName, UInt32 width, UInt32 height,
plDynamicTextMap *plLayerConverter::ICreateDynTextMap( const char *layerName, uint32_t width, uint32_t height,
hsBool includeAlphaChannel, plMaxNode *node )
{
hsGuardBegin( "plPlasmaMAXLayer::ICreateDynTextMap" );
@ -1030,7 +1030,7 @@ plDynamicTextMap *plLayerConverter::ICreateDynTextMap( const char *layerName,
///////////////////////////////////////////////////////////////////////////////
plBitmap *plLayerConverter::CreateSimpleTexture(const char *fileName, const plLocation &loc,
UInt32 clipID /* = 0 */, UInt32 texFlags /* = 0 */, bool useJPEG /* = false */)
uint32_t clipID /* = 0 */, uint32_t texFlags /* = 0 */, bool useJPEG /* = false */)
{
plBitmapData bd;
bd.fileName = fileName;

View File

@ -92,8 +92,8 @@ class plLayerConverter
void DeInit( void );
plLayerInterface *ConvertTexmap( Texmap *texmap, plMaxNode *maxNode,
UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plBitmap *CreateSimpleTexture(const char *fileName, const plLocation &loc, UInt32 clipID = 0, UInt32 texFlags = 0, bool useJPEG = false);
uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plBitmap *CreateSimpleTexture(const char *fileName, const plLocation &loc, uint32_t clipID = 0, uint32_t texFlags = 0, bool useJPEG = false);
void MuteWarnings( void );
void UnmuteWarnings( void );
@ -101,7 +101,7 @@ class plLayerConverter
protected:
plErrorMsg *fErrorMsg;
UInt32 fWarned, fSavedWarned;
uint32_t fWarned, fSavedWarned;
hsBool fSaving;
Interface *fInterface;
@ -114,25 +114,25 @@ class plLayerConverter
plLayer *ICreateLayer( const char *name, hsBool upperLayer, plLocation &loc );
void IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *destLayer, plBitmapData *bitmapData, hsBool preserveUVOffset );
plDynamicTextMap *ICreateDynTextMap( const char *layerName, UInt32 width, UInt32 height, hsBool includeAlpha, plMaxNode *node );
plDynamicTextMap *ICreateDynTextMap( const char *layerName, uint32_t width, uint32_t height, hsBool includeAlpha, plMaxNode *node );
plLayer *IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, plLayer *destLayer, hsBool upperLayer, int clipID = -1 );
plCubicRenderTarget *IMakeCubicRenderTarget( const char *name, plMaxNode *maxNode, plMaxNode *anchor );
// Add your function to process your layer type here
plLayerInterface *IConvertLayerTex( plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertStaticEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertCameraLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertDynamicTextLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertLayerTex( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertStaticEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertCameraLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plLayerInterface *IConvertDynamicTextLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer );
plBitmap* IGetAttenRamp( plMaxNode *maxNode, BOOL isAdd, int loClamp, int hiClamp);
plLayer* ICreateAttenuationLayer(const char* name, plMaxNode *maxNode, int uvwSrc, float tr0, float op0, float tr1, float op1, int loClamp, int hiClamp);
plLayerInterface* IConvertAngleAttenLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, UInt32 blendFlags, hsBool preserveUVOffset, hsBool upperLayer);
plLayerInterface* IConvertAngleAttenLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer);
void IRegisterConversion( plPlasmaMAXLayer *origLayer, plLayerInterface *convertedLayer );
UInt32 *IGetInitBitmapBuffer( plDynamicTextLayer *layer ) const;
uint32_t *IGetInitBitmapBuffer( plDynamicTextLayer *layer ) const;
};

View File

@ -117,12 +117,12 @@ public:
static int kDefaultSize = 64;
static UInt32 MakeUInt32Color(float r, float g, float b, float a)
static uint32_t MakeUInt32Color(float r, float g, float b, float a)
{
return (UInt32(a * 255.9f) << 24)
|(UInt32(r * 255.9f) << 16)
|(UInt32(g * 255.9f) << 8)
|(UInt32(b * 255.9f) << 0);
return (uint32_t(a * 255.9f) << 24)
|(uint32_t(r * 255.9f) << 16)
|(uint32_t(g * 255.9f) << 8)
|(uint32_t(b * 255.9f) << 0);
}
plLightMapGen& plLightMapGen::Instance()
@ -308,8 +308,8 @@ void DumpMipmap(plMipmap* mipmap, const char* prefix)
{
mipmap->SetCurrLevel(i);
UInt32 width = mipmap->GetCurrWidth();
UInt32 height = mipmap->GetCurrHeight();
uint32_t width = mipmap->GetCurrWidth();
uint32_t height = mipmap->GetCurrHeight();
sprintf(buf, "----- Level %d (%dx%d) -----\n", i, width, height);
dump.WriteString(buf);
@ -318,11 +318,11 @@ void DumpMipmap(plMipmap* mipmap, const char* prefix)
{
for (int x = 0; x < width; x++)
{
UInt32 color = *(mipmap->GetAddr32(x, y));
UInt8 r = ((UInt8)((color)>>16));
UInt8 g = ((UInt8)((color)>>8));
UInt8 b = ((UInt8)((color)>>0));
UInt8 a = ((UInt8)((color)>>24));
uint32_t color = *(mipmap->GetAddr32(x, y));
uint8_t r = ((uint8_t)((color)>>16));
uint8_t g = ((uint8_t)((color)>>8));
uint8_t b = ((uint8_t)((color)>>0));
uint8_t a = ((uint8_t)((color)>>24));
sprintf(buf, "[%3d,%3d,%3d,%3d]", r, g, b, a);
dump.WriteString(buf);
}
@ -596,24 +596,24 @@ hsBool plLightMapGen::IAddToLightMap(plLayerInterface* lay, plMipmap* src) const
{
for( i = 0; i < dst->GetWidth(); i++ )
{
UInt32 srcRed = (*src->GetAddr32(i, j) >> 16) & 0xff;
UInt32 dstRed = (*dst->GetAddr32(i, j) >> 16) & 0xff;
uint32_t srcRed = (*src->GetAddr32(i, j) >> 16) & 0xff;
uint32_t dstRed = (*dst->GetAddr32(i, j) >> 16) & 0xff;
// dstRed += srcRed;
if( dstRed < srcRed )
dstRed = srcRed;
if( dstRed > 0xff )
dstRed = 0xff;
UInt32 srcGreen = (*src->GetAddr32(i, j) >> 8) & 0xff;
UInt32 dstGreen = (*dst->GetAddr32(i, j) >> 8) & 0xff;
uint32_t srcGreen = (*src->GetAddr32(i, j) >> 8) & 0xff;
uint32_t dstGreen = (*dst->GetAddr32(i, j) >> 8) & 0xff;
// dstGreen += srcGreen;
if( dstGreen < srcGreen )
dstGreen = srcGreen;
if( dstGreen > 0xff )
dstGreen = 0xff;
UInt32 srcBlue = (*src->GetAddr32(i, j) >> 0) & 0xff;
UInt32 dstBlue = (*dst->GetAddr32(i, j) >> 0) & 0xff;
uint32_t srcBlue = (*src->GetAddr32(i, j) >> 0) & 0xff;
uint32_t dstBlue = (*dst->GetAddr32(i, j) >> 0) & 0xff;
// dstBlue += srcBlue;
if( dstBlue < srcBlue )
dstBlue = srcBlue;
@ -785,7 +785,7 @@ hsBool plLightMapGen::IShadeVerts(plMaxLightContext& ctx, const Color& amb, cons
hsFastMath::NormalizeAppr(n);
UInt32 color = IShadePoint(ctx, amb, p, n);
uint32_t color = IShadePoint(ctx, amb, p, n);
*bitmap->GetAddr32(uMid, i) = color;
}
@ -1208,9 +1208,9 @@ hsBool plLightMapGen::IValidateUVWSrc(hsTArray<plGeometrySpan *>& spans) const
void plLightMapGen::IInitBitmapColor(plMipmap* bitmap, const hsColorRGBA& col) const
{
UInt32 initColor = MakeUInt32Color(col.r, col.g, col.b, col.a);
UInt32* pix = (UInt32*)bitmap->GetImage();
UInt32* pixEnd = ((UInt32*)bitmap->GetImage()) + bitmap->GetWidth() * bitmap->GetHeight();
uint32_t initColor = MakeUInt32Color(col.r, col.g, col.b, col.a);
uint32_t* pix = (uint32_t*)bitmap->GetImage();
uint32_t* pixEnd = ((uint32_t*)bitmap->GetImage()) + bitmap->GetWidth() * bitmap->GetHeight();
while( pix < pixEnd )
*pix++ = initColor;
}
@ -1450,7 +1450,7 @@ Color plLightMapGen::ShadePoint(plMaxLightContext& ctx, const hsPoint3& p, const
}
UInt32 plLightMapGen::IShadePoint(plMaxLightContext& ctx, const Color& amb, const hsPoint3& p, const hsVector3& n)
uint32_t plLightMapGen::IShadePoint(plMaxLightContext& ctx, const Color& amb, const hsPoint3& p, const hsVector3& n)
{
ctx.globContext = fRGC;
ctx.SetPoint(p, n);
@ -1459,7 +1459,7 @@ UInt32 plLightMapGen::IShadePoint(plMaxLightContext& ctx, const Color& amb, cons
accum += amb;
accum.ClampMinMax();
UInt32 retVal;
uint32_t retVal;
retVal = MakeUInt32Color(accum.r, accum.g, accum.b, 1.f);

View File

@ -135,7 +135,7 @@ protected:
plLayerInterface* IMakeLightMapLayer(plMaxNode* node, plGeometrySpan& span);
int IGetUVWSrc() const { return fUVWSrc; }
UInt32 IShadePoint(plMaxLightContext& ctx, const Color& amb, const hsPoint3& p, const hsVector3& n);
uint32_t IShadePoint(plMaxLightContext& ctx, const Color& amb, const hsPoint3& p, const hsVector3& n);
hsBool IShadeVerts(plMaxLightContext& ctx, const Color& amb, const hsPoint3 pt[3], const hsVector3 norm[3], const hsPoint3 uv[3], plMipmap* bitmap);
hsBool IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span, int iFace, plMipmap* bitmap);
hsBool IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& spans);

View File

@ -115,7 +115,7 @@ class TempWeightInfo
{
public:
float fWeights[ 4 ];
UInt32 fIndices;
uint32_t fIndices;
};
@ -125,13 +125,13 @@ class plMAXVertexAccNode
hsPoint3 fPoint; // Inefficient space-wise, I know, but it makes this a lot simpler...
hsVector3 fNormal;
hsColorRGBA fColor, fIllum;
UInt32 fIndex;
uint32_t fIndex;
hsPoint3 fUVs[ plGeometrySpan::kMaxNumUVChannels ];
UInt32 fNumChannels;
uint32_t fNumChannels;
plMAXVertexAccNode *fNext;
plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, int numChannels, const hsPoint3 *uvs, UInt32 index );
plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, int numChannels, const hsPoint3 *uvs, uint32_t index );
hsBool IsEqual( const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, const hsPoint3 *uvs );
};
@ -145,11 +145,11 @@ class plMAXVertexAccumulator
int fNumPoints, fNumChannels, fNumVertices;
plMAXVertexAccNode **fPointList;
hsTArray<UInt32> fIndices;
hsTArray<UInt32> fInverseVertTable;
hsTArray<uint32_t> fIndices;
hsTArray<uint32_t> fInverseVertTable;
void IFindSkinWeights( ISkinContextData *skinData, int vertex, float *weights, UInt32 *indices );
void IFindUserSkinWeights( plMaxNode* node, Mesh* mesh, int vertex, float *weights, UInt32 *indices );
void IFindSkinWeights( ISkinContextData *skinData, int vertex, float *weights, uint32_t *indices );
void IFindUserSkinWeights( plMaxNode* node, Mesh* mesh, int vertex, float *weights, uint32_t *indices );
void IFindAllUserSkinWeights( plMaxNode* node, Mesh* mesh, TempWeightInfo weights[]);
public:
@ -161,7 +161,7 @@ class plMAXVertexAccumulator
void StuffMyData( plMaxNode* node, plGeometrySpan *span, Mesh* mesh, ISkinContextData* skinData );
int GetVertexCount();
UInt32 GetIndexCount( void ) { return fIndices.GetCount(); }
uint32_t GetIndexCount( void ) { return fIndices.GetCount(); }
};
class plMAXVertNormal
@ -299,7 +299,7 @@ void plMeshConverter::StuffPositionsAndNormals(plMaxNode *node, hsTArray<hsPoint
const char* dbgNodeName = node->GetName();
Mesh *mesh;
Int32 numVerts;
int32_t numVerts;
hsMatrix44 l2wMatrix, vert2LMatrix, vertInvTransMatrix, tempMatrix;
/// Get da mesh
@ -346,7 +346,7 @@ plConvexVolume *plMeshConverter::CreateConvexVolume(plMaxNode *node)
const char* dbgNodeName = node->GetName();
Mesh *mesh;
Int32 numFaces, i, j, numVerts;
int32_t numFaces, i, j, numVerts;
hsMatrix44 l2wMatrix, vert2LMatrix, vertInvTransMatrix, tempMatrix;
hsBool flipOrder, checkForOverflow = false;
@ -379,7 +379,7 @@ plConvexVolume *plMeshConverter::CreateConvexVolume(plMaxNode *node)
hsPoint3 pos[ 3 ];
hsPoint3 testPt1, testPt2, testPt3;
hsVector3 normal;
UInt32 vertIdx[ 3 ];
uint32_t vertIdx[ 3 ];
/// Add the 3 vertices to the correct vertex accumulator object
@ -520,15 +520,15 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
const char* dbgNodeName = node->GetName();
Mesh *mesh;
Int32 numFaces, i, j, k, numVerts, maxNumBones, maxUVWSrc;
Int32 numMaterials = 1, numSubMaterials = 1;
int32_t numFaces, i, j, k, numVerts, maxNumBones, maxUVWSrc;
int32_t numMaterials = 1, numSubMaterials = 1;
hsMatrix44 l2wMatrix, vert2LMatrix, vertInvTransMatrix, tempMatrix;
Mtl *maxMaterial = nil;
hsBool isComposite, isMultiMat, flipOrder, checkForOverflow = false, includesComp;
UInt8 ourFormat, numChannels, maxBlendChannels;
uint8_t ourFormat, numChannels, maxBlendChannels;
hsColorRGBA *colorArray = nil;
hsColorRGBA *illumArray = nil;
UInt32 sharedSpanProps = 0;
uint32_t sharedSpanProps = 0;
hsBitVector usedSubMtls;
hsBool makeAlphaLayer = node->VtxAlphaNotAvailable();
@ -860,7 +860,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
Face *maxFace = &mesh->faces[ i ];
Point3 v0, v1, v2, norm;
UInt32 smGroup = smoothAll ? 1 : maxFace->getSmGroup();
uint32_t smGroup = smoothAll ? 1 : maxFace->getSmGroup();
v0 = mesh->verts[ maxFace->v[ 0 ] ];
v1 = mesh->verts[ maxFace->v[ 1 ] ];
@ -876,10 +876,10 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
vertDPosDuCache = TRACKED_NEW hsTArray<plMAXVertNormal>[numMaterials];
vertDPosDvCache = TRACKED_NEW hsTArray<plMAXVertNormal>[numMaterials];
hsTArray<Int16> bumpLayIdx;
hsTArray<Int16> bumpLayChan;
hsTArray<Int16> bumpDuChan;
hsTArray<Int16> bumpDvChan;
hsTArray<int16_t> bumpLayIdx;
hsTArray<int16_t> bumpLayChan;
hsTArray<int16_t> bumpDuChan;
hsTArray<int16_t> bumpDvChan;
ISetBumpUvSrcs(ourMaterials, bumpLayIdx, bumpLayChan, bumpDuChan, bumpDvChan);
if( node->GetWaterDecEnv() )
ISetWaterDecEnvUvSrcs(ourMaterials, bumpLayIdx, bumpLayChan, bumpDuChan, bumpDvChan);
@ -901,7 +901,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
hsPoint3 testPt1, testPt2, testPt3;
hsVector3 normals[ 3 ];
hsColorRGBA colors[ 3 ], illums[ 3 ];
UInt32 smGroup, vertIdx[ 3 ];
uint32_t smGroup, vertIdx[ 3 ];
hsPoint3 uvs1[ plGeometrySpan::kMaxNumUVChannels + 1];
hsPoint3 uvs2[ plGeometrySpan::kMaxNumUVChannels + 1];
hsPoint3 uvs3[ plGeometrySpan::kMaxNumUVChannels + 1];
@ -1345,9 +1345,9 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
//// ICreateHexColor /////////////////////////////////////////////////////////
UInt32 plMeshConverter::ICreateHexColor( float r, float g, float b )
uint32_t plMeshConverter::ICreateHexColor( float r, float g, float b )
{
UInt32 ru, gu, bu, au;
uint32_t ru, gu, bu, au;
au = 0xff000000;
@ -1357,9 +1357,9 @@ UInt32 plMeshConverter::ICreateHexColor( float r, float g, float b )
return au | ( ru << 16 ) | ( gu << 8 ) | ( bu );
}
UInt32 plMeshConverter::ISetHexAlpha( UInt32 color, float alpha)
uint32_t plMeshConverter::ISetHexAlpha( uint32_t color, float alpha)
{
UInt32 alphaBits = alpha * 255;
uint32_t alphaBits = alpha * 255;
alphaBits <<= 24;
return color & 0x00ffffff | alphaBits;
}
@ -1624,10 +1624,10 @@ int plMeshConverter::IGenerateUVs( plMaxNode *node, Mtl *maxMtl, Mesh *mesh,
}
void plMeshConverter::ISetWaterDecEnvUvSrcs(hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx,
hsTArray<Int16>& bumpLayChan,
hsTArray<Int16>& bumpDuChan,
hsTArray<Int16>& bumpDvChan)
hsTArray<int16_t>& bumpLayIdx,
hsTArray<int16_t>& bumpLayChan,
hsTArray<int16_t>& bumpDuChan,
hsTArray<int16_t>& bumpDvChan)
{
bumpLayIdx.SetCount(ourMaterials.GetCount());
bumpLayChan.SetCount(ourMaterials.GetCount());
@ -1645,10 +1645,10 @@ void plMeshConverter::ISetWaterDecEnvUvSrcs(hsTArray<hsTArray<plExportMaterialDa
}
void plMeshConverter::ISetBumpUvSrcs(hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx,
hsTArray<Int16>& bumpLayChan,
hsTArray<Int16>& bumpDuChan,
hsTArray<Int16>& bumpDvChan)
hsTArray<int16_t>& bumpLayIdx,
hsTArray<int16_t>& bumpLayChan,
hsTArray<int16_t>& bumpDuChan,
hsTArray<int16_t>& bumpDvChan)
{
bumpLayIdx.SetCount(ourMaterials.GetCount());
bumpLayChan.SetCount(ourMaterials.GetCount());
@ -1690,7 +1690,7 @@ void plMeshConverter::ISetBumpUvSrcs(hsTArray<hsTArray<plExportMaterialData> *>&
}
}
void plMeshConverter::ISetBumpUvs(Int16 uvChan, hsTArray<plMAXVertNormal>& vertDPosDuvCache, TVFace* tvFace, UInt32 smGroup,
void plMeshConverter::ISetBumpUvs(int16_t uvChan, hsTArray<plMAXVertNormal>& vertDPosDuvCache, TVFace* tvFace, uint32_t smGroup,
hsPoint3* uvs1, hsPoint3* uvs2, hsPoint3* uvs3)
{
if( uvChan < 0 )
@ -1708,7 +1708,7 @@ void plMeshConverter::ISetBumpUvs(Int16 uvChan, hsTArray<plMAXVertNormal>& vertD
// If we decided we needed them, they are in the output arrays, otherwise the output arrays are made empty.
void plMeshConverter::ISmoothUVGradients(plMaxNode* node, Mesh* mesh,
hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx, hsTArray<Int16>& bumpLayChan,
hsTArray<int16_t>& bumpLayIdx, hsTArray<int16_t>& bumpLayChan,
hsTArray<plMAXVertNormal>* vertDPosDuCache, hsTArray<plMAXVertNormal>* vertDPosDvCache)
{
const char* dbgNodeName = node->GetName();
@ -1724,7 +1724,7 @@ void plMeshConverter::ISmoothUVGradients(plMaxNode* node, Mesh* mesh,
{
if( bumpLayIdx[matIdx] >= 0 )
{
UInt32 uvwSrc = bumpLayChan[matIdx];
uint32_t uvwSrc = bumpLayChan[matIdx];
if( mesh->getNumMapVerts(uvwSrc+1) && mesh->mapVerts(uvwSrc+1) )
{
vertDPosDuCache[matIdx].SetCount(mesh->getNumMapVerts(uvwSrc+1));
@ -1823,7 +1823,7 @@ void plMeshConverter::ISmoothUVGradients(plMaxNode* node, Mesh* mesh,
// Get dPos/du into uvws[0], and dPos/dv into uvws[1]. dPos should be in the object's local space.
Point3 plMeshConverter::IGetUvGradient(plMaxNode* node,
const hsMatrix44& uvXform44, Int16 bmpUvwSrc, // Transform and uvwSrc of layer to gradient
const hsMatrix44& uvXform44, int16_t bmpUvwSrc, // Transform and uvwSrc of layer to gradient
Mesh *mesh, int faceIdx,
int iUV) // 0 = uvw.x, 1 = uv2.y
{
@ -1988,7 +1988,7 @@ void plMeshConverter::IGetUVTransform( plMaxNode *node, Mtl *mtl, Matrix3 *uv
//// plMAXVertexAccNode Constructor //////////////////////////////////////////
plMAXVertexAccNode::plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, int numChannels, const hsPoint3 *uvs, UInt32 index )
plMAXVertexAccNode::plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, int numChannels, const hsPoint3 *uvs, uint32_t index )
{
int i;
@ -2152,7 +2152,7 @@ void plMAXVertexAccumulator::StuffMyData( plMaxNode* maxNode, plGeometrySpan
{
for (i = 0; i < fNumPoints; i++)
{
UInt8 indices[4];
uint8_t indices[4];
indices[0] = (weights[i].fIndices) & 0xff;
indices[1] = (weights[i].fIndices >> 8) & 0xff;
indices[2] = (weights[i].fIndices >> 16) & 0xff;
@ -2179,8 +2179,8 @@ void plMAXVertexAccumulator::StuffMyData( plMaxNode* maxNode, plGeometrySpan
hsScalar maxWgt = 0;
hsScalar penWgt = 0;
Int16 maxIdx = -1;
Int16 penIdx = -1;
int16_t maxIdx = -1;
int16_t penIdx = -1;
// Find the highest two weighted bones. We'll use just these two to calculate our bounds.
for( i = 0; i < fNumPoints; i++ )
{
@ -2310,14 +2310,14 @@ void plMAXVertexAccumulator::IFindAllUserSkinWeights( plMaxNode* node, Mesh* mes
//// IFindSkinWeights ////////////////////////////////////////////////////////
// Finds the biggest weights (up to 4) for the given vertex index and returns
// them, along with a dword specifying the indices for each.
// them, along with a uint32_t specifying the indices for each.
void plMAXVertexAccumulator::IFindSkinWeights( ISkinContextData *skinData,
int vertex,
float *weights, UInt32 *indices )
float *weights, uint32_t *indices )
{
float tempWs[ 4 ], tempW, t;
UInt32 idxs[ 4 ], tempIdx, tI;
uint32_t idxs[ 4 ], tempIdx, tI;
int i, j;
tempWs[ 0 ] = tempWs[ 1 ] = tempWs[ 2 ] = tempWs[ 3 ] = 0;

View File

@ -106,17 +106,17 @@ public:
private:
bool IValidateUVs(plMaxNode* node);
void ISetBumpUvs(Int16 uvChan, hsTArray<plMAXVertNormal>& vertDPosDuvCache, TVFace* tvFace, UInt32 smGroup,
void ISetBumpUvs(int16_t uvChan, hsTArray<plMAXVertNormal>& vertDPosDuvCache, TVFace* tvFace, uint32_t smGroup,
hsPoint3* uvs1, hsPoint3* uvs2, hsPoint3* uvs3);
void ISetBumpUvSrcs(hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx, hsTArray<Int16>& bumpLayChan, hsTArray<Int16>& bumpDuChan, hsTArray<Int16>& bumpDvChan);
hsTArray<int16_t>& bumpLayIdx, hsTArray<int16_t>& bumpLayChan, hsTArray<int16_t>& bumpDuChan, hsTArray<int16_t>& bumpDvChan);
void ISetWaterDecEnvUvSrcs(hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx, hsTArray<Int16>& bumpLayChan, hsTArray<Int16>& bumpDuChan, hsTArray<Int16>& bumpDvChan);
hsTArray<int16_t>& bumpLayIdx, hsTArray<int16_t>& bumpLayChan, hsTArray<int16_t>& bumpDuChan, hsTArray<int16_t>& bumpDvChan);
void ISmoothUVGradients(plMaxNode* node, Mesh* mesh,
hsTArray<hsTArray<plExportMaterialData> *>& ourMaterials,
hsTArray<Int16>& bumpLayIdx, hsTArray<Int16>& bumpLayChan,
hsTArray<int16_t>& bumpLayIdx, hsTArray<int16_t>& bumpLayChan,
hsTArray<plMAXVertNormal>* vertDPosDuCache, hsTArray<plMAXVertNormal>* vertDPosDvCache);
Point3 IGetUvGradient(plMaxNode* node, const hsMatrix44& uvXform44, Int16 bmpUvwSrc,
Point3 IGetUvGradient(plMaxNode* node, const hsMatrix44& uvXform44, int16_t bmpUvwSrc,
Mesh *mesh, int faceIdx,
int iUV);
@ -124,8 +124,8 @@ private:
hsPoint3 *uvs1, hsPoint3 *uvs2, hsPoint3 *uvs3 );
void IGetUVTransform( plMaxNode *node, Mtl *mtl, Matrix3 *uvTransform, int which );
UInt32 ICreateHexColor( float r, float g, float b );
UInt32 ISetHexAlpha( UInt32 color, float alpha );
uint32_t ICreateHexColor( float r, float g, float b );
uint32_t ISetHexAlpha( uint32_t color, float alpha );
Mesh* IGetNodeMesh(plMaxNode *node);
void IDeleteTempGeometry();