Browse Source

Make the Max 2011 SDK happy and fix a cmake issue

Adam Johnson 14 years ago
parent
commit
32039938df
  1. 6
      Sources/Tools/MaxComponent/CMakeLists.txt
  2. 2
      Sources/Tools/MaxComponent/pfGUISkinComp.cpp
  3. 2
      Sources/Tools/MaxComponent/plAutoUIParams.cpp
  4. 2
      Sources/Tools/MaxComponent/plCameraComponent.cpp
  5. 4
      Sources/Tools/MaxComponent/plPythonFileComponent.cpp
  6. 4
      Sources/Tools/MaxComponent/plResponderLink.cpp
  7. 2
      Sources/Tools/MaxComponent/plResponderWait.cpp
  8. 2
      Sources/Tools/MaxComponent/plWaterComponent.cpp
  9. 5
      Sources/Tools/MaxComponent/resource.h
  10. 2
      Sources/Tools/MaxConvert/hsConverterUtils.cpp
  11. 18
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp

6
Sources/Tools/MaxComponent/CMakeLists.txt

@ -192,7 +192,7 @@ add_library(MaxComponent
${MaxComponent_SOURCES} ${MaxComponent_SOURCES}
) )
source_group("Header Files" FILES ${MaxComponents_HEADERS}) source_group("Header Files" FILES ${MaxComponent_HEADERS})
source_group("Resource Files" FILES ${MaxComponents_RESOURCES}) source_group("Resource Files" FILES ${MaxComponent_RESOURCES})
source_group("Source Files" FILES ${MaxComponents_SOURCES}) source_group("Source Files" FILES ${MaxComponent_SOURCES})

2
Sources/Tools/MaxComponent/pfGUISkinComp.cpp

@ -173,7 +173,7 @@ void pfGUISkinEditProc::IRefreshImageBuffer( void )
bi.SetHeight( fDblHeight ); bi.SetHeight( fDblHeight );
newBM = TheManager->Create( &bi ); newBM = TheManager->Create( &bi );
BMM_Color_64 foo = { 0, 0, 0, 0 }; BMM_Color_64 foo(0, 0, 0, 0 );
newBM->CopyImage( pbBMap->bm, COPY_IMAGE_RESIZE_LO_QUALITY, foo, nil ); newBM->CopyImage( pbBMap->bm, COPY_IMAGE_RESIZE_LO_QUALITY, foo, nil );
// Now copy from our newly created bitmap into our DC....way slow :( // Now copy from our newly created bitmap into our DC....way slow :(

2
Sources/Tools/MaxComponent/plAutoUIParams.cpp

@ -1728,7 +1728,7 @@ void plDropDownListParam::IUpdateList(IParamBlock2 *pb)
if (pb) if (pb)
{ {
char* bob = pb->GetStr(fID); const char* bob = pb->GetStr(fID);
if (bob) if (bob)
val = bob; val = bob;
} }

2
Sources/Tools/MaxComponent/plCameraComponent.cpp

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "MaxConvert/plConvert.h" #include "MaxConvert/plConvert.h"
#include "MaxMain/plPhysicalProps.h" #include "MaxMain/plPhysicalProps.h"
#include "plHavok1/plHKPhysicsGroups.h" //#include "plHavok1/plHKPhysicsGroups.h"
void DummyCodeIncludeFuncCamera() {} void DummyCodeIncludeFuncCamera() {}

4
Sources/Tools/MaxComponent/plPythonFileComponent.cpp

@ -1042,7 +1042,7 @@ static BOOL CALLBACK WarnDialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
ErrorSet::iterator it = badNodes->begin(); ErrorSet::iterator it = badNodes->begin();
for (; it != badNodes->end(); it++) for (; it != badNodes->end(); it++)
{ {
plPythonError& err = *it; const plPythonError err = *it;
plMaxNode* node = err.node; plMaxNode* node = err.node;
plPythonFileComponent* comp = (plPythonFileComponent*)node->ConvertToComponent(); plPythonFileComponent* comp = (plPythonFileComponent*)node->ConvertToComponent();
@ -1093,7 +1093,7 @@ static void WriteBadPythonText(ErrorSet& badNodes)
ErrorSet::iterator it = badNodes.begin(); ErrorSet::iterator it = badNodes.begin();
for (; it != badNodes.end(); it++) for (; it != badNodes.end(); it++)
{ {
plPythonError& err = *it; const plPythonError err = *it;
const char* compName = err.node->GetName(); const char* compName = err.node->GetName();
const char* pythonFile = err.pythonName; const char* pythonFile = err.pythonName;

4
Sources/Tools/MaxComponent/plResponderLink.cpp

@ -135,7 +135,7 @@ const char *plResponderCmdLink::GetInstanceName(IParamBlock2 *pb)
void plResponderCmdLink::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg, IParamBlock2* pb) void plResponderCmdLink::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg, IParamBlock2* pb)
{ {
char * spawnPtName = pb->GetStr( kLinkAgeSpawnPointName ); const char * spawnPtName = pb->GetStr( kLinkAgeSpawnPointName );
if ( !spawnPtName ) if ( !spawnPtName )
{ {
// set defaults // set defaults
@ -144,7 +144,7 @@ void plResponderCmdLink::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg, I
} }
else else
{ {
char * spawnPtTitle = pb->GetStr( kLinkAgeSpawnPointTitle ); const char * spawnPtTitle = pb->GetStr( kLinkAgeSpawnPointTitle );
if ( !spawnPtTitle ) if ( !spawnPtTitle )
{ {
// set default title, or make same as name. // set default title, or make same as name.

2
Sources/Tools/MaxComponent/plResponderWait.cpp

@ -81,7 +81,7 @@ void ResponderWait::FixupWaitBlock(IParamBlock2 *waitPB)
if (waitPB->Count(kWaitPointOld) > 0) if (waitPB->Count(kWaitPointOld) > 0)
{ {
TCHAR* point = waitPB->GetStr(kWaitPointOld, 0, 0); const char* point = waitPB->GetStr(kWaitPointOld, 0, 0);
waitPB->SetValue(kWaitPoint, 0, point); waitPB->SetValue(kWaitPoint, 0, point);
waitPB->Delete(kWaitPointOld, 0, 1); waitPB->Delete(kWaitPointOld, 0, 1);
} }

2
Sources/Tools/MaxComponent/plWaterComponent.cpp

@ -1323,7 +1323,7 @@ plRenderTarget* plEnvMapComponent::IGetMap()
int numVisNames = fCompPB->Count(kVisSetNames); int numVisNames = fCompPB->Count(kVisSetNames);
for( i = 0; i < numVisNames; i++) for( i = 0; i < numVisNames; i++)
{ {
fMap->SetVisRegionName(fCompPB->GetStr(kVisSetNames, 0, i)); fMap->SetVisRegionName((char*)fCompPB->GetStr(kVisSetNames, 0, i));
} }
if (visGot) if (visGot)

5
Sources/Tools/MaxComponent/resource.h

@ -1891,3 +1891,8 @@
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif
// Hack -- don't ask.
#if(WINVER < 0x0500)
#define IDC_HAND IDC_CROSS
#endif

2
Sources/Tools/MaxConvert/hsConverterUtils.cpp

@ -419,7 +419,7 @@ hsBool hsConverterUtils::IsInstanced(Object* maxObject)
} }
ObjectInstancedEnumProc instProc; ObjectInstancedEnumProc instProc;
maxObject->EnumDependents(&instProc); maxObject->DoEnumDependents(&instProc);
return (instProc.GetInstanceCount() > 1); return (instProc.GetInstanceCount() > 1);
hsGuardEnd; hsGuardEnd;

18
Sources/Tools/MaxConvert/hsMaterialConverter.cpp

@ -3932,7 +3932,7 @@ hsBool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node)
#define VIEW_BK 5 #define VIEW_BK 5
static BMM_Color_64 green64 = {0,(1<<16)-1,0,(1<<16)-1}; static BMM_Color_64 green64 = BMM_Color_64(0, (1<<16)-1, 0, (1<<16)-1);
BMM_Color_64 hsMaterialConverter::ICubeSample(Bitmap *bitmap[6], double phi, double theta) BMM_Color_64 hsMaterialConverter::ICubeSample(Bitmap *bitmap[6], double phi, double theta)
{ {
@ -4466,18 +4466,22 @@ static void GetMtlNodes(Mtl *mtl, INodeTab& nodes)
if (!mtl) if (!mtl)
return; return;
RefList& refs = mtl->GetRefList(); DependentIterator di(mtl);
RefListItem *item = refs.FirstItem(); ReferenceMaker *rm = di.Next();
while (item) while (rm != nil)
{ {
if (item->maker->SuperClassID() == BASENODE_CLASS_ID) for (int i = 0; i < rm->NumRefs(); i++)
{ {
INode *node = (INode*)item->maker; RefTargetHandle item = rm->GetReference(i);
if (item->SuperClassID() == BASENODE_CLASS_ID)
{
INode *node = (INode*)item;
if (node->GetMtl() == mtl) if (node->GetMtl() == mtl)
nodes.Append(1, &node); nodes.Append(1, &node);
} }
}
item = item->next; rm = di.Next();
} }
} }

Loading…
Cancel
Save