From a6939bb14f0ff2c4d53f4d23b23457e052ecbcf6 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 15 Apr 2011 18:32:20 -0400 Subject: [PATCH] MaxPlasmaMtls mostly compiles. Weird issue with plDynamicEncLayer[BitmapPB].cpp is stumping me. --- .../Tools/MaxConvert/hsMaterialConverter.cpp | 4 +- .../Tools/MaxConvert/hsMaterialConverter.h | 1 + .../Layers/plDynamicEnvLayer.cpp | 1 - .../Layers/plDynamicEnvLayerBitmapPB.cpp | 3 +- .../Layers/plLayerTexBasicPB.cpp | 1 + .../Layers/plLayerTexBitmapPB.cpp | 2 +- .../MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp | 17 ++++++++- .../MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h | 1 + .../MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp | 6 +-- .../Materials/plAnimStealthNode.cpp | 37 ++++++++++--------- .../MaxPlasmaMtls/Materials/plBumpMtl.cpp | 10 ++--- .../Tools/MaxPlasmaMtls/Materials/plBumpMtl.h | 8 ++-- .../Materials/plBumpMtlAnimPBDec.h | 2 +- .../MaxPlasmaMtls/Materials/plClothingMtl.cpp | 2 +- .../Materials/plClothingMtlPBDec.h | 6 +++ .../MaxPlasmaMtls/Materials/plDecalMtl.cpp | 6 +-- .../MaxPlasmaMtls/Materials/plDecalMtl.h | 6 +-- .../MaxPlasmaMtls/Materials/plPassMtl.cpp | 6 +-- .../Tools/MaxPlasmaMtls/Materials/plPassMtl.h | 28 +++++++------- .../MaxPlasmaMtls/Materials/plPassMtlBase.h | 28 +++++++------- 20 files changed, 97 insertions(+), 78 deletions(-) diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index 7a81f840..73b23353 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -2041,7 +2041,7 @@ plLayerInterface* IProcessLayerAnimation(plPassMtlBase* mtl, plLayerTex* layTex, TSTR animName = TSTR(name) + TSTR("_anim_") + TSTR(mtl->GetGlobalVarName()); hsgResMgr::ResMgr()->NewKey(animName, SDLLayer, node->GetLocation()); - SDLLayer->SetVarName(mtl->GetGlobalVarName()); + SDLLayer->SetVarName((char*)mtl->GetGlobalVarName()); SDLLayer->SetTransformCtl(xfmCtl); SDLLayer->AttachViaNotify(layerIFace); node->CheckSynchOptions(SDLLayer); @@ -2141,7 +2141,7 @@ plLayerInterface* IProcessAnimation(plPassMtlBase *mtl, plMaxNode *node, const c TSTR animName = TSTR(name) + TSTR("_anim_") + TSTR(mtl->GetGlobalVarName()); hsgResMgr::ResMgr()->NewKey(animName, SDLLayer, node->GetLocation()); - SDLLayer->SetVarName(mtl->GetGlobalVarName()); + SDLLayer->SetVarName((char*)mtl->GetGlobalVarName()); node->CheckSynchOptions(SDLLayer); if (colCtl) diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.h b/Sources/Tools/MaxConvert/hsMaterialConverter.h index bcaa3109..978da572 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.h +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.h @@ -59,6 +59,7 @@ class Animatable; class Bitmap; class plLocation; + class plLayerTex; class plBitmapData; class plCubicRenderTarget; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp index e438050c..3e69627d 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp @@ -40,7 +40,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "iparamb2.h" #include "iparamm2.h" #include "stdmat.h" -#include "../resource.h" #include "../plBMSampler.h" #include "MaxMain/plPlasmaRefMsgs.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayerBitmapPB.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayerBitmapPB.cpp index e6b561e7..c084b69d 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayerBitmapPB.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayerBitmapPB.cpp @@ -248,5 +248,4 @@ static ParamBlockDesc2 gBitmapParamBlk end, end -); - +); \ No newline at end of file diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp index 0ba7d999..79d951bf 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp @@ -26,6 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTypes.h" #include "plLayerTex.h" #include "plLayerTexBasicPB.h" +#include "../resource.h" class BasicDlgProc; extern BasicDlgProc gBasicDlgProc; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp index b356bbd9..caacd62c 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp @@ -26,7 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTypes.h" #include "plLayerTex.h" #include "plLayerTexBitmapPB.h" -#include "plDetailCurveCtrl.h" +#include "../plDetailCurveCtrl.h" #if 1 class BMTexPBAccessor; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp index ecce6ff9..0832c67a 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp @@ -45,7 +45,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "iparamb2.h" #include "iparamm2.h" #include "../resource.h" +#ifdef MAXASS_AVAILABLE #include "../../AssetMan/PublicInterface/MaxAssInterface.h" +#endif #include "hsUtils.h" #include "pnKeyedObject/hsKeyedObject.h" @@ -210,6 +212,7 @@ plLayerInterface *plPlasmaMAXLayer::GetConversionTarget( int index ) //// Asset Management, and textures /////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// +#ifdef MAXASS_AVAILABLE void plPlasmaMAXLayer::SetBitmapAssetId(jvUniqueId& assetId, int index /* = 0 */) { PBBitmap *pbbm = GetPBBitmap(index); @@ -229,11 +232,14 @@ void plPlasmaMAXLayer::GetBitmapAssetId(jvUniqueId& assetId, int index /* = 0 */ else assetId.SetEmpty(); } +#endif void plPlasmaMAXLayer::SetBitmap(BitmapInfo *bi, int index) { +#ifdef MAXASS_AVAILABLE jvUniqueId targetAssetId; GetBitmapAssetId(targetAssetId, index); +#endif Bitmap *BM = GetMaxBitmap(index); if (BM) @@ -244,6 +250,7 @@ void plPlasmaMAXLayer::SetBitmap(BitmapInfo *bi, int index) if (bi) { +#ifdef MAXASS_AVAILABLE if (!targetAssetId.IsEmpty()) { // If this texture has an assetId, we will check the @@ -267,6 +274,7 @@ void plPlasmaMAXLayer::SetBitmap(BitmapInfo *bi, int index) } } } +#endif BMMRES result; BM = TheManager->Load(bi, &result); @@ -361,6 +369,7 @@ void plPlasmaMAXLayer::RefreshBitmaps() hsBool plPlasmaMAXLayer::GetBitmapFileName( char *destFilename, int maxLength, int index /* = 0 */ ) { +#ifdef MAXASS_AVAILABLE jvUniqueId targetAssetId; GetBitmapAssetId(targetAssetId, index); @@ -371,6 +380,7 @@ hsBool plPlasmaMAXLayer::GetBitmapFileName( char *destFilename, int maxLength, if (maxAssInterface->GetLatestVersionFile(targetAssetId, destFilename, maxLength)) return true; } +#endif // Normal return if( GetPBBitmap( index ) == nil ) @@ -386,7 +396,9 @@ BOOL plPlasmaMAXLayer::HandleBitmapSelection(int index /* = 0 */) PBBitmap *pbbm = GetPBBitmap( index ); +#ifdef MAXASS_AVAILABLE MaxAssInterface* maxAssInterface = GetMaxAssInterface(); +#endif // If the control key is held, we want to get rid of this texture if ((GetKeyState(VK_CONTROL) & 0x8000) && pbbm != nil) @@ -401,6 +413,7 @@ BOOL plPlasmaMAXLayer::HandleBitmapSelection(int index /* = 0 */) return FALSE; } // if we have the assetman plug-in, then try to use it, unless shift is held down +#ifdef MAXASS_AVAILABLE else if(maxAssInterface && !(GetKeyState(VK_SHIFT) & 0x8000)) { jvUniqueId assetId; @@ -417,6 +430,7 @@ BOOL plPlasmaMAXLayer::HandleBitmapSelection(int index /* = 0 */) return TRUE; } } +#endif else { BitmapInfo bi; @@ -426,12 +440,13 @@ BOOL plPlasmaMAXLayer::HandleBitmapSelection(int index /* = 0 */) BOOL selectedNewBitmap = TheManager->SelectFileInput(&bi, GetCOREInterface()->GetMAXHWnd(), _T("Select Bitmap Image File")); - if (selectedNewBitmap) { +#ifdef MAXASS_AVAILABLE // Set the assetId to empty so our new, unmanaged texture will take jvUniqueId emptyId; SetBitmapAssetId(emptyId, index); +#endif SetBitmap(&bi, index); return TRUE; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h index f3b7221d..f30a19c9 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h @@ -47,6 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define _plPlasmaMAXLayer_h #include "Max.h" +#include "iparamm2.h" #include "hsTypes.h" //// Derived Type Class IDs /////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp index cec0c644..686a4576 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp @@ -525,11 +525,7 @@ void plStaticEnvLayer::SetBaseFilename( const TCHAR *name, TimeValue t ) const TCHAR *plStaticEnvLayer::GetBaseFilename( TimeValue t ) { - Interval valid; - TCHAR *buffer; - - fBitmapPB->GetValue( kBmpBaseFilename, t, buffer, valid ); - return (const TCHAR *)buffer; + return (const TCHAR*)fBitmapPB->GetStr(kBmpBaseFilename, t); } //// IGetViewTM /////////////////////////////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp index 841b765d..312c9672 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp @@ -419,44 +419,45 @@ hsBool plAnimStealthNode::IsParentUsedInScene( void ) //// What really actually finds something is the enum dependents loop below const char *mtlName = GetParentMtl()->GetName(); - RefList &refList = GetRefList(); - RefListItem *item = refList.FirstItem(); + DependentIterator di(this); + ReferenceMaker* item = di.Next(); while( item != nil ) { TSTR s; - item->maker->GetClassName( s ); + item->GetClassName( s ); - if( item->maker->SuperClassID() == BASENODE_CLASS_ID && !CanConvertToStealth( (INode *)( item->maker ) ) ) + if( item->SuperClassID() == BASENODE_CLASS_ID && !CanConvertToStealth( (INode *)( item ) ) ) return true; // Horray, a node has a ref to us! - else if( item->maker->ClassID() == Class_ID(MULTI_CLASS_ID,0) ) + else if( item->ClassID() == Class_ID(MULTI_CLASS_ID,0) ) { // Multi-sub, run the refs on that guy (we only go one up) - Mtl *multisub = (Mtl *)item->maker; - RefList &refList2 = multisub->GetRefList(); - RefListItem *item2 = refList.FirstItem(); + Mtl *multisub = (Mtl *)item; + + DependentIterator sub(multisub); + ReferenceMaker* item2 = sub.Next(); while( item2 != nil ) { - if( item2->maker->SuperClassID() == BASENODE_CLASS_ID ) + if( item2->SuperClassID() == BASENODE_CLASS_ID ) return true; // Horray, a node has a ref to us! - item2 = item2->next; + item2 = sub.Next(); } // No go, keep trying } - else if( item->maker->SuperClassID() == MATERIAL_CLASS_ID ) + else if( item->SuperClassID() == MATERIAL_CLASS_ID ) { int q = 0; } - item = item->next; + item = di.Next(); } // Enum dependents int i; plGetRefs callback; - GetParentMtl()->EnumDependents( &callback ); + GetParentMtl()->DoEnumDependents( &callback ); for( i = 0; i < callback.fList.GetCount(); i++ ) { ReferenceMaker *maker = callback.fList[ i ]; @@ -474,14 +475,14 @@ INode *plAnimStealthNode::GetINode() { // Go through the reflist looking for RefMakers with a ref to this component. // There should only be one INode in this list. - RefList &refList = GetRefList(); - RefListItem *item = refList.FirstItem(); + DependentIterator di(this); + ReferenceMaker* item = di.Next(); while( item ) { - if( item->maker->SuperClassID() == BASENODE_CLASS_ID ) - return (INode *)item->maker; + if( item->SuperClassID() == BASENODE_CLASS_ID ) + return (INode *)item; - item = item->next; + item = di.Next(); } return nil; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp index 6e6d261b..6b6056ea 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp @@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plBumpMtl.h" #include "../resource.h" //extern ClassDesc2* GetMaxLayerDesc(); -#include "Shaders.h" +#include "../Shaders.h" #include "plBumpMtlBasicPB.h" @@ -629,10 +629,10 @@ int plBumpMtl::GetZInc() { return 0; } int plBumpMtl::GetAlphaTestHigh() { return 0; } // Animation block -char * plBumpMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } -int plBumpMtl::GetAutoStart() { return fAnimPB->GetInt(kPBAnimAutoStart); } -int plBumpMtl::GetLoop() { return fAnimPB->GetInt(kPBAnimLoop); } -char * plBumpMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } +const char* plBumpMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } +int plBumpMtl::GetAutoStart() { return fAnimPB->GetInt(kPBAnimAutoStart); } +int plBumpMtl::GetLoop() { return fAnimPB->GetInt(kPBAnimLoop); } +const char* plBumpMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } // Basic block int plBumpMtl::GetColorLock() { return 0; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h index 6c173e61..6fa0fe37 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.h @@ -144,10 +144,10 @@ public: virtual int GetAlphaTestHigh(); // Animation block - virtual char * GetAnimName(); - virtual int GetAutoStart(); - virtual int GetLoop(); - virtual char * GetAnimLoopName(); + virtual const char * GetAnimName(); + virtual int GetAutoStart(); + virtual int GetLoop(); + virtual const char * GetAnimLoopName(); // Basic block virtual int GetColorLock(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h index 107239cf..5b8af775 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlAnimPBDec.h @@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plBumpMtl.h" #include "plPassBaseParamIDs.h" -#include "resource.h" +#include "../resource.h" #include "iparamm2.h" #include "plPassAnimDlgProc.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp index 6423abe6..55c87a90 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp @@ -26,7 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsUtils.h" #include "plClothingMtl.h" #include "../resource.h" -#include "Shaders.h" +#include "../Shaders.h" #include "iparamm2.h" diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h index 155f03fb..4366d7eb 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h @@ -24,7 +24,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ //#include "plClothingMtl.h" +#ifdef MAXASS_AVAILABLE #include "../../AssetMan/PublicInterface/AssManBaseTypes.h" +#endif #include "max.h" class plClothingEditBox @@ -365,8 +367,10 @@ public: pb->SetValue(ParamID(layerIdx), 0, layer, buttonIdx); } +#ifdef MAXASS_AVAILABLE jvUniqueId oldId; layer->GetBitmapAssetId(oldId); +#endif BitmapInfo bi; bi.SetName(layer->GetPBBitmap() == nil ? "" : layer->GetPBBitmap()->bi.Name()); @@ -404,8 +408,10 @@ public: } if (!choiceOk) { +#ifdef MAXASS_AVAILABLE layer->SetBitmapAssetId(oldId); layer->SetBitmap(&bi); +#endif } else { diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp index c06aa596..0ffc3ed1 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp @@ -742,10 +742,10 @@ int plDecalMtl::GetZInc() { return fAdvPB->GetInt(kPBAdvZInc); } int plDecalMtl::GetAlphaTestHigh() { return fAdvPB->GetInt(kPBAdvAlphaTestHigh); } // Animation block -char * plDecalMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } +const char * plDecalMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } int plDecalMtl::GetAutoStart() { return fAnimPB->GetInt(kPBAnimAutoStart); } int plDecalMtl::GetLoop() { return fAnimPB->GetInt(kPBAnimLoop); } -char * plDecalMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } +const char * plDecalMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } int plDecalMtl::GetEaseInType() { return fAnimPB->GetInt(kPBAnimEaseInType); } float plDecalMtl::GetEaseInNormLength() { return fAnimPB->GetFloat(kPBAnimEaseInLength); } float plDecalMtl::GetEaseInMinLength() { return fAnimPB->GetFloat(kPBAnimEaseInMin); } @@ -755,7 +755,7 @@ float plDecalMtl::GetEaseOutNormLength() { return fAnimPB->GetFloat(kPBAnimEas float plDecalMtl::GetEaseOutMinLength() { return fAnimPB->GetFloat(kPBAnimEaseOutMin); } float plDecalMtl::GetEaseOutMaxLength() { return fAnimPB->GetFloat(kPBAnimEaseOutMax); } int plDecalMtl::GetUseGlobal() { return fAnimPB->GetInt(ParamID(kPBAnimUseGlobal)); } -char * plDecalMtl::GetGlobalVarName() { return fAnimPB->GetStr(ParamID(kPBAnimGlobalName)); } +const char * plDecalMtl::GetGlobalVarName() { return fAnimPB->GetStr(ParamID(kPBAnimGlobalName)); } // Basic block int plDecalMtl::GetColorLock() { return fBasicPB->GetInt(kDecalBasColorLock); } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h index 23fc6eca..7e82f562 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.h @@ -149,10 +149,10 @@ public: virtual int GetAlphaTestHigh(); // Animation block - virtual char * GetAnimName(); + virtual const char* GetAnimName(); virtual int GetAutoStart(); virtual int GetLoop(); - virtual char * GetAnimLoopName(); + virtual const char* GetAnimLoopName(); virtual int GetEaseInType(); virtual float GetEaseInMinLength(); virtual float GetEaseInMaxLength(); @@ -162,7 +162,7 @@ public: virtual float GetEaseOutMaxLength(); virtual float GetEaseOutNormLength(); virtual int GetUseGlobal(); - virtual char * GetGlobalVarName(); + virtual const char* GetGlobalVarName(); // Basic block virtual int GetColorLock(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp index 1addfc6c..1ba7b628 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp @@ -805,10 +805,10 @@ int plPassMtl::GetZInc() { return fAdvPB->GetInt(kPBAdvZInc); } int plPassMtl::GetAlphaTestHigh() { return fAdvPB->GetInt(kPBAdvAlphaTestHigh); } // Animation block -char * plPassMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } +const char* plPassMtl::GetAnimName() { return fAnimPB->GetStr(kPBAnimName); } int plPassMtl::GetAutoStart() { return fAnimPB->GetInt(kPBAnimAutoStart); } int plPassMtl::GetLoop() { return fAnimPB->GetInt(kPBAnimLoop); } -char * plPassMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } +const char* plPassMtl::GetAnimLoopName() { return fAnimPB->GetStr(kPBAnimLoopName); } int plPassMtl::GetEaseInType() { return fAnimPB->GetInt(kPBAnimEaseInType); } float plPassMtl::GetEaseInNormLength() { return fAnimPB->GetFloat(kPBAnimEaseInLength); } float plPassMtl::GetEaseInMinLength() { return fAnimPB->GetFloat(kPBAnimEaseInMin); } @@ -818,7 +818,7 @@ float plPassMtl::GetEaseOutNormLength() { return fAnimPB->GetFloat(kPBAnimEase float plPassMtl::GetEaseOutMinLength() { return fAnimPB->GetFloat(kPBAnimEaseOutMin); } float plPassMtl::GetEaseOutMaxLength() { return fAnimPB->GetFloat(kPBAnimEaseOutMax); } int plPassMtl::GetUseGlobal() { return fAnimPB->GetInt(ParamID(kPBAnimUseGlobal)); } -char * plPassMtl::GetGlobalVarName() { return fAnimPB->GetStr(ParamID(kPBAnimGlobalName)); } +const char* plPassMtl::GetGlobalVarName() { return fAnimPB->GetStr(ParamID(kPBAnimGlobalName)); } // Basic block int plPassMtl::GetColorLock() { return fBasicPB->GetInt(kPassBasColorLock); } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h index 883c3f07..f26cb93b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.h @@ -153,20 +153,20 @@ public: virtual int GetAlphaTestHigh(); // Animation block - virtual char * GetAnimName(); - virtual int GetAutoStart(); - virtual int GetLoop(); - virtual char * GetAnimLoopName(); - virtual int GetEaseInType(); - virtual float GetEaseInMinLength(); - virtual float GetEaseInMaxLength(); - virtual float GetEaseInNormLength(); - virtual int GetEaseOutType(); - virtual float GetEaseOutMinLength(); - virtual float GetEaseOutMaxLength(); - virtual float GetEaseOutNormLength(); - virtual int GetUseGlobal(); - virtual char * GetGlobalVarName(); + virtual const char* GetAnimName(); + virtual int GetAutoStart(); + virtual int GetLoop(); + virtual const char* GetAnimLoopName(); + virtual int GetEaseInType(); + virtual float GetEaseInMinLength(); + virtual float GetEaseInMaxLength(); + virtual float GetEaseInNormLength(); + virtual int GetEaseOutType(); + virtual float GetEaseOutMinLength(); + virtual float GetEaseOutMaxLength(); + virtual float GetEaseOutNormLength(); + virtual int GetUseGlobal(); + virtual const char* GetGlobalVarName(); // Basic block virtual int GetColorLock(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h index 9fd70b52..e19b6f52 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h @@ -161,20 +161,20 @@ public: virtual int GetAlphaTestHigh() = 0; // Animation block - virtual char * GetAnimName() = 0; - virtual int GetAutoStart() = 0; - virtual int GetLoop() = 0; - virtual char * GetAnimLoopName() = 0; - virtual int GetEaseInType() { return plAnimEaseTypes::kNoEase; } - virtual float GetEaseInMinLength() { return 1; } - virtual float GetEaseInMaxLength() { return 1; } - virtual float GetEaseInNormLength() { return 1; } - virtual int GetEaseOutType() { return plAnimEaseTypes::kNoEase; } - virtual float GetEaseOutMinLength() { return 1; } - virtual float GetEaseOutMaxLength() { return 1; } - virtual float GetEaseOutNormLength() { return 1; } - virtual char * GetGlobalVarName() { return NULL; } - virtual int GetUseGlobal() { return 0; } + virtual const char* GetAnimName() = 0; + virtual int GetAutoStart() = 0; + virtual int GetLoop() = 0; + virtual const char* GetAnimLoopName() = 0; + virtual int GetEaseInType() { return plAnimEaseTypes::kNoEase; } + virtual float GetEaseInMinLength() { return 1; } + virtual float GetEaseInMaxLength() { return 1; } + virtual float GetEaseInNormLength() { return 1; } + virtual int GetEaseOutType() { return plAnimEaseTypes::kNoEase; } + virtual float GetEaseOutMinLength() { return 1; } + virtual float GetEaseOutMaxLength() { return 1; } + virtual float GetEaseOutNormLength() { return 1; } + virtual const char* GetGlobalVarName() { return NULL; } + virtual int GetUseGlobal() { return 0; } // Basic block virtual int GetColorLock() = 0;