mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix compile for ancient max versions
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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_
|
||||
|
@ -51,43 +51,46 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <maxversion.h>
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 9
|
||||
#define BMMCOLOR(x, y, z, w) \
|
||||
{x, y, x, w};
|
||||
# define BMMCOLOR(x, y, z, w) \
|
||||
{x, y, x, w};
|
||||
|
||||
#define DEFAULTREMAP NoRemap()
|
||||
# define DEFAULTREMAP NoRemap()
|
||||
|
||||
#define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->EnumDependents(proc);
|
||||
# define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->EnumDependents(proc);
|
||||
|
||||
typedef TCHAR MCHAR;
|
||||
typedef TCHAR MCHAR;
|
||||
#else
|
||||
#define BMMCOLOR(x, y, z, w) \
|
||||
BMM_Color_64(x, y, z, w);
|
||||
# define BMMCOLOR(x, y, z, w) \
|
||||
BMM_Color_64(x, y, z, w);
|
||||
|
||||
#define DEFAULTREMAP DefaultRemapDir()
|
||||
# define DEFAULTREMAP DefaultRemapDir()
|
||||
|
||||
#define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->DoEnumDependents(proc);
|
||||
# define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->DoEnumDependents(proc);
|
||||
#endif //MAX_VERSION_MAJOR
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 13
|
||||
#define GetParamBlock2Controller(pb, id) pb->GetController(id)
|
||||
#define SetParamBlock2Controller(pb, id, tab, ctl) pb->SetController(id, tab, ctl)
|
||||
# define GetParamBlock2Controller(pb, id) pb->GetController(id)
|
||||
# define SetParamBlock2Controller(pb, id, tab, ctl) pb->SetController(id, tab, ctl)
|
||||
#else
|
||||
#define GetParamBlock2Controller(pb, id) pb->GetControllerByID(id)
|
||||
#define SetParamBlock2Controller(pb, id, tab, ctl) pb->SetControllerByID(id, tab, ctl)
|
||||
# define GetParamBlock2Controller(pb, id) pb->GetControllerByID(id)
|
||||
# define SetParamBlock2Controller(pb, id, tab, ctl) pb->SetControllerByID(id, tab, ctl)
|
||||
#endif // MAX_VERSION_MAJOR
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 11 // max 2009. Just a guess, really. 2010 doesn't need this function.
|
||||
#define INIT_CUSTOM_CONTROLS(instance) InitCustomControls(instance)
|
||||
# define INIT_CUSTOM_CONTROLS(instance) InitCustomControls(instance)
|
||||
#else
|
||||
#define INIT_CUSTOM_CONTROLS(instance)
|
||||
# define INIT_CUSTOM_CONTROLS(instance)
|
||||
#endif
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 10 // Max 2008
|
||||
#define GETNAME_RETURN_TYPE TCHAR*
|
||||
# define GETNAME_RETURN_TYPE TCHAR*
|
||||
#else
|
||||
#define GETNAME_RETURN_TYPE const TCHAR*
|
||||
# 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
|
@ -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"
|
||||
|
@ -43,7 +43,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
class Class_ID;
|
||||
class Interface;
|
||||
class plMaxNode;
|
||||
struct NotifyInfo;
|
||||
|
||||
#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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
//
|
||||
|
@ -54,14 +54,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// Windows
|
||||
#include "hsWindows.h"
|
||||
|
||||
// Max SDK
|
||||
#include <max.h>
|
||||
#include <decomp.h>
|
||||
#include <hsv.h>
|
||||
|
||||
// Base MaxPlasmaLights stuff...
|
||||
#include "plRealTimeLightBase.h"
|
||||
#include "plRealTimeLights.h"
|
||||
|
||||
// Max SDK
|
||||
#include <decomp.h>
|
||||
#include <hsv.h>
|
||||
|
||||
// Utility
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
#include "resource.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;
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user