Browse Source

Fix some stupid stuff that would have crashed the plugin...

Adam Johnson 13 years ago
parent
commit
205105ef23
  1. 8
      Sources/Tools/MaxComponent/plAudioComponents.cpp
  2. 8
      Sources/Tools/MaxComponent/plComponentBase.cpp
  3. 16
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp
  4. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h
  5. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp
  6. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp
  7. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h
  8. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp
  9. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp
  10. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp
  11. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h

8
Sources/Tools/MaxComponent/plAudioComponents.cpp

@ -1015,15 +1015,15 @@ protected:
void IGetNewLocalFileName( plBaseSoundEmitterComponent *soundComponent, plBaseSoundEmitterComponent::WhichSound which )
{
char* fileName[ MAX_PATH ], dirName[ MAX_PATH ];
char fileName[ MAX_PATH ], dirName[ MAX_PATH ];
const char* name = soundComponent->GetSoundFileName( which );
if( name != nil )
strcpy( (char*)fileName, name );
strcpy( fileName, name );
else
strcpy( (char*)fileName, _T( "" ) );
strcpy( fileName, _T( "" ) );
strcpy( dirName, (const char*)fileName );
strcpy( dirName, fileName );
::PathRemoveFileSpec( dirName );
OPENFILENAME ofn = {0};

8
Sources/Tools/MaxComponent/plComponentBase.cpp

@ -304,12 +304,8 @@ plMaxNodeBase *plComponentBase::GetINode()
ReferenceMaker* rm = di.Next();
while (rm != nil)
{
for (int i = 0; i < rm->NumRefs(); i++)
{
RefTargetHandle h = rm->GetReference(i);
if (h->SuperClassID() == BASENODE_CLASS_ID)
return (plMaxNodeBase*)h;
}
if (rm->SuperClassID() == BASENODE_CLASS_ID)
return (plMaxNodeBase*)rm;
rm = di.Next();
}

16
Sources/Tools/MaxConvert/hsMaterialConverter.cpp

@ -4470,19 +4470,15 @@ static void GetMtlNodes(Mtl *mtl, INodeTab& nodes)
ReferenceMaker *rm = di.Next();
while (rm != nil)
{
for (int i = 0; i < rm->NumRefs(); i++)
if (rm->SuperClassID() == BASENODE_CLASS_ID)
{
RefTargetHandle item = rm->GetReference(i);
if (item->SuperClassID() == BASENODE_CLASS_ID)
{
INode *node = (INode*)item;
if (node->GetMtl() == mtl)
nodes.Append(1, &node);
}
INode *node = (INode*)rm;
if (node->GetMtl() == mtl)
nodes.Append(1, &node);
}
rm = di.Next();
}
rm = di.Next();
}
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, UInt32 multiIndex /* = 0 */)

2
Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtlBasicPBDec.h

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plBumpMtl.h"
#include "plBumpMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class BumpBasicDlgProc;

2
Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtlDlg.cpp

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "max.h"
#include "MaxIcon.h"
#include "resource.h"
#include "../resource.h"
#include "plCompositeMtl.h"
//#include "plCompositeMtlPB.h"
//#include "plMaxLayer.h"

2
Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDecalMtl.h"
#include "../resource.h"
//extern ClassDesc2* GetMaxLayerDesc();
#include "Shaders.h"
#include "../Shaders.h"
#include "MaxComponent/plMaxAnimUtils.h"
#include "plPassBaseParamIDs.h"

2
Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtlBasicPBDec.h

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plDecalMtl.h"
#include "plDecalMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class DecalBasicPBAccessor;

2
Sources/Tools/MaxPlasmaMtls/Materials/plNoteTrackWatcher.cpp

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
plNoteTrackWatcher::plNoteTrackWatcher( plPassMtlBase *parentMtl ) : fParentMtl(nil)
{
fNoteTrackCount = parentMtl->NumNoteTracks();
MakeRefByID( FOREVER, kRefParentMtl, parentMtl );
ReplaceReference(kRefParentMtl, parentMtl);
}
plNoteTrackWatcher::~plNoteTrackWatcher()

2
Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plParticleMtl.h"
#include "../resource.h"
//extern ClassDesc2* GetMaxLayerDesc();
#include "Shaders.h"
#include "../Shaders.h"
#include "iparamm2.h"

2
Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp

@ -333,7 +333,7 @@ void plPassMtlBase::NoteTrackAdded( void )
if( fNotetracks.Find( track ) == fNotetracks.kMissingIndex )
{
MakeRefByID( FOREVER, kRefNotetracks + fNotetracks.GetCount(), track );
ReplaceReference(kRefNotetracks + fNotetracks.GetCount(), track);
break;
}
}

2
Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBasicPBDec.h

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plPassMtl.h"
#include "plPassMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class PassBasicPBAccessor;

Loading…
Cancel
Save