Browse Source

Fix compile for ancient max versions

Adam Johnson 12 years ago
parent
commit
2b03cd7afe
  1. 25
      Sources/Tools/MaxComponent/Pch.h
  2. 3
      Sources/Tools/MaxComponent/plComponentBase.h
  3. 2
      Sources/Tools/MaxComponent/plMiscComponents.cpp
  4. 2
      Sources/Tools/MaxComponent/plMiscComponents.h
  5. 9
      Sources/Tools/MaxConvert/Pch.h
  6. 6
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp
  7. 3
      Sources/Tools/MaxConvert/hsMaterialConverter.h
  8. 2
      Sources/Tools/MaxExport/Pch.h
  9. 3
      Sources/Tools/MaxMain/MaxCompat.h
  10. 18
      Sources/Tools/MaxMain/Pch.h
  11. 7
      Sources/Tools/MaxMain/plComponentDlg.h
  12. 3
      Sources/Tools/MaxMain/plMaxNodeBase.cpp
  13. 9
      Sources/Tools/MaxPlasmaLights/Pch.h
  14. 1
      Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h
  15. 10
      Sources/Tools/MaxPlasmaMtls/Pch.h

25
Sources/Tools/MaxComponent/Pch.h

@ -79,6 +79,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <shlwapi.h>
#include <windowsx.h>
// 3ds Max SDK
// This stuff should ALWAYS come after hsWindows.h
#include <max.h>
#include <bmmlib.h>
#include <CS/bipexp.h>
#include <decomp.h>
#include <dummy.h>
#include <iparamm2.h>
#include <meshdlib.h>
#include <notetrck.h>
#include <notify.h>
#include <stdmat.h>
// These MaxComponent headers will trigger a rebuild if they are changed
// So it's probably best to precompile them anyway.
// Some of these may include 3dsm headers, so ensure they come after hsWindows.h
@ -103,18 +116,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "MaxMain/plMaxNode.h"
#include "MaxMain/plMaxNodeData.h"
// 3ds Max SDK
// This stuff should ALWAYS come after hsWindows.h
#include <bmmlib.h>
#include <CS/bipexp.h>
#include <decomp.h>
#include <dummy.h>
#include <iparamm2.h>
#include <meshdlib.h>
#include <notetrck.h>
#include <notify.h>
#include <stdmat.h>
#if MAX_VERSION_MAJOR >= 13
# include <INamedSelectionSetManager.h>
#endif

3
Sources/Tools/MaxComponent/plComponentBase.h

@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnKeyedObject/plKey.h"
#include "hsWindows.h"
#include <iparamb2.h>
#include <max.h>
#include <iparamb2.h>
extern TCHAR *GetString(int id);
extern HINSTANCE hInstance;
@ -67,7 +67,6 @@ class INode;
class INodeTab;
class IObjParam;
class ObjectState;
enum IOResult;
class IParamBlock2;
enum RefResult;
class RemapDir;

2
Sources/Tools/MaxComponent/plMiscComponents.cpp

@ -694,7 +694,7 @@ void plPageInfoComponent::IUpdateSeqNumbersFromAgeFile( plErrorMsg *errMsg )
fCompPB->SetValue( kInfoSeqSuffix, 0, (int)page->GetSeqSuffix() );
// Also re-copy the page name, just to make sure the case is correct
fCompPB->SetValue( kInfoPage, 0, (const char *)page->GetName().c_str() );
fCompPB->SetValue( kInfoPage, 0, const_cast<char*>(page->GetName().c_str()) );
return;
}
}

2
Sources/Tools/MaxComponent/plMiscComponents.h

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plMiscComponents_inc
#include "plComponent.h"
#include <notify.h>
#define ROOM_CID Class_ID(0x70a1570d, 0x472f5647)
#define PAGEINFO_CID Class_ID(0x54ee40f1, 0x4de45acc)
@ -55,7 +56,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plFileName;
class plAgeDescription;
class plComponentBase;
struct NotifyInfo;
const char* LocCompGetPage(plComponentBase* comp);

9
Sources/Tools/MaxConvert/Pch.h

@ -77,18 +77,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <CommCtrl.h>
#include <commdlg.h>
// MaxComponent
#include "MaxComponent/plComponent.h"
// 3ds Max SDK
// This stuff should ALWAYS come after hsWindows.h
#include <max.h>
#include <bmmlib.h>
#include <dummy.h>
#include <keyreduc.h>
#include <INode.h>
#include <iparamm2.h> // needs to be above ISkin.h for Max 7
#include <ISkin.h>
#include <istdplug.h>
#include <iparamm2.h>
#include <maxversion.h>
#include <meshdlib.h>
#include <modstack.h>
@ -96,6 +94,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <stdmat.h>
#include <texutil.h>
// MaxComponent
#include "MaxComponent/plComponent.h"
#if MAX_VERSION_MAJOR >= 13
# include <INamedSelectionSetManager.h>
#endif

6
Sources/Tools/MaxConvert/hsMaterialConverter.cpp

@ -3944,7 +3944,7 @@ bool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node)
static BMM_Color_64 green64 = BMMCOLOR(0, (1<<16)-1, 0, (1<<16)-1)
BMM_Color_64 hsMaterialConverter::ICubeSample(Bitmap *bitmap[6], double phi, double theta)
static BMM_Color_64 ICubeSample(plErrorMsg* const msg, Bitmap *bitmap[6], double phi, double theta)
{
hsGuardBegin("hsMaterialConverter::ICubeSample");
@ -4024,7 +4024,7 @@ BMM_Color_64 hsMaterialConverter::ICubeSample(Bitmap *bitmap[6], double phi, dou
iMap = (int)(xMap * (map->Width()-1));
jMap = (int)(yMap * (map->Height()-1));
fErrorMsg->Set(!map, "CubeSample", "Bad fallthrough in spherefromcube").Check();
msg->Set(!map, "CubeSample", "Bad fallthrough in spherefromcube").Check();
BMM_Color_64 c;
map->GetLinearPixels(iMap,jMap,1,&c);
return c;
@ -4050,7 +4050,7 @@ void hsMaterialConverter::IBuildSphereMap(Bitmap *bitmap[6], Bitmap *bm)
phi = (0.5 + j) * delPhi;
theta = PI - (0.5 + i) * delThe;
pb[i] = ICubeSample(bitmap, phi, theta);
pb[i] = ICubeSample(fErrorMsg, bitmap, phi, theta);
}
bm->PutPixels(0,j, bm->Width(), pb);
}

3
Sources/Tools/MaxConvert/hsMaterialConverter.h

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define __HSMATERIALCONVERTER_H
#include "HeadSpin.h"
#include <maxtypes.h>
class hsStream;
class hsScene;
@ -62,7 +63,6 @@ class plString;
class plLocation;
class Animatable;
struct BMM_Color_64;
class Bitmap;
class BitmapTex;
class Color;
@ -306,7 +306,6 @@ private:
hsGMaterial *ICheckForProjectedTexture(plMaxNode *node);
hsGMaterial *IWrapTextureInMaterial(Texmap *texMap, plMaxNode *node);
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_t texFlags, uint32_t procFlags);

2
Sources/Tools/MaxExport/Pch.h

@ -66,10 +66,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// 3ds Max SDK
// This stuff should ALWAYS come after hsWindows.h
#include <max.h>
#include <bmmlib.h>
#include <guplib.h>
#include <iparamb2.h>
#include <max.h>
#include <notify.h>
#endif // _MaxExport_Pch_inc_

3
Sources/Tools/MaxMain/MaxCompat.h

@ -90,4 +90,7 @@ typedef TCHAR MCHAR;
# define GETNAME_RETURN_TYPE const TCHAR*
#endif
// Old versions of Max define this as an integer, not a Class_ID
#define XREFOBJ_COMPAT_CLASS_ID Class_ID(0x92aab38c, 0)
#endif // _PLASMA_MAXCOMPAT_H

18
Sources/Tools/MaxMain/Pch.h

@ -78,14 +78,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <comutil.h>
#include <direct.h>
// PlasmaMax Stuff included everywhere
// Some of these files may pull in Max SDK headers, so put this below hsWindows.h!
#include "plMaxNode.h"
#include "plMaxNodeData.h"
#include "MaxComponent/plComponent.h"
#include "MaxComponent/plComponentReg.h"
// Misc Max SDK
#include <max.h>
#include <bmmlib.h>
#include <CustAttrib.h>
#include <ICustAttribContainer.h>
@ -93,7 +87,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <guplib.h>
#include <iMenuMan.h>
#include <IMtlEdit.h>
#include <iskin.h>
#include <iparamb2.h> // above ISkin.h for Max 7
#include <ISkin.h>
#include <istdplug.h>
#include <maxversion.h>
#include <mnmath.h>
@ -101,6 +96,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <notify.h>
#include <pbbitmap.h>
// PlasmaMax Stuff included everywhere
// Some of these files may pull in Max SDK headers, so put this below hsWindows.h!
#include "plMaxNode.h"
#include "plMaxNodeData.h"
#include "MaxComponent/plComponent.h"
#include "MaxComponent/plComponentReg.h"
// Utility
#include "MaxCompat.h"
#include "resource.h"

7
Sources/Tools/MaxMain/plComponentDlg.h

@ -43,7 +43,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class Class_ID;
class Interface;
class plMaxNode;
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 9
struct NotifyInfo;
#else
// Max headers are more minimalistic in pre-9 maxes
# include <notify.h>
#endif
class plComponentDlg
{

3
Sources/Tools/MaxMain/plMaxNodeBase.cpp

@ -48,6 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMaxNodeBase.h"
#include "plMaxNodeData.h"
#include "MaxComponent/plComponentBase.h"
#include "MaxCompat.h"
#include <guplib.h>
#include <iparamm2.h>
@ -483,7 +484,7 @@ bool plMaxNodeBase::IsXRef()
{
// Is this an XRef'd object?
Object *obj = GetObjectRef();
if (obj->SuperClassID() == SYSTEM_CLASS_ID && obj->ClassID() == XREFOBJ_CLASS_ID)
if (obj->SuperClassID() == SYSTEM_CLASS_ID && obj->ClassID() == XREFOBJ_COMPAT_CLASS_ID)
return true;
//

9
Sources/Tools/MaxPlasmaLights/Pch.h

@ -54,14 +54,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// Windows
#include "hsWindows.h"
// Base MaxPlasmaLights stuff...
#include "plRealTimeLightBase.h"
#include "plRealTimeLights.h"
// Max SDK
#include <max.h>
#include <decomp.h>
#include <hsv.h>
// Base MaxPlasmaLights stuff...
#include "plRealTimeLightBase.h"
#include "plRealTimeLights.h"
// Utility
#include "MaxMain/MaxCompat.h"
#include "resource.h"

1
Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h

@ -56,7 +56,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class Class_ID;
class IParamBlock2;
struct PB2Value;
class ReferenceMaker;

10
Sources/Tools/MaxPlasmaMtls/Pch.h

@ -59,15 +59,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <commdlg.h>
#include <windowsx.h>
// MaxMain
#include "MaxMain/plMaxNode.h"
#include "MaxMain/MaxCompat.h"
// Misc 3dsm SDK
#include <max.h>
#include <bmmlib.h>
#include <iparamm2.h>
#include <istdplug.h>
#include <max.h>
#include <maxicon.h>
#include <notetrck.h>
#include <notify.h>
@ -75,6 +71,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <texutil.h>
#include <triobj.h>
// MaxMain
#include "MaxMain/plMaxNode.h"
#include "MaxMain/MaxCompat.h"
// Local
#include "resource.h"

Loading…
Cancel
Save