mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Now we can compile on Max 8 as well as 2011
This commit is contained in:
@ -32,6 +32,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plGUICompClassIDs.h"
|
||||
|
||||
#include "MaxMain/plMaxNodeBase.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
|
||||
pfGUISkinEditProc *pfGUISkinEditProc::fInstance = nil;
|
||||
@ -173,7 +174,7 @@ void pfGUISkinEditProc::IRefreshImageBuffer( void )
|
||||
bi.SetHeight( fDblHeight );
|
||||
newBM = TheManager->Create( &bi );
|
||||
|
||||
BMM_Color_64 foo(0, 0, 0, 0 );
|
||||
BMM_Color_64 foo = BMMCOLOR(0, 0, 0, 0);
|
||||
newBM->CopyImage( pbBMap->bm, COPY_IMAGE_RESIZE_LO_QUALITY, foo, nil );
|
||||
|
||||
// Now copy from our newly created bitmap into our DC....way slow :(
|
||||
|
@ -149,9 +149,9 @@ void plResponderCmdLink::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg, I
|
||||
{
|
||||
// set default title, or make same as name.
|
||||
if ( strcmp( spawnPtName, kDefaultSpawnPtName )==0 )
|
||||
pb->SetValue( kLinkAgeSpawnPointTitle, 0, kDefaultSpawnPtTitle );
|
||||
pb->SetValue( kLinkAgeSpawnPointTitle, 0, _T(kDefaultSpawnPtTitle));
|
||||
else
|
||||
pb->SetValue( kLinkAgeSpawnPointTitle, 0, spawnPtName );
|
||||
pb->SetValue( kLinkAgeSpawnPointTitle, 0, (TCHAR*)_T(spawnPtName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plResponderComponentPriv.h"
|
||||
#include "resource.h"
|
||||
#include "plModifier/plResponderModifier.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "plResponderLink.h"
|
||||
|
||||
@ -81,8 +82,8 @@ void ResponderWait::FixupWaitBlock(IParamBlock2 *waitPB)
|
||||
|
||||
if (waitPB->Count(kWaitPointOld) > 0)
|
||||
{
|
||||
const char* point = waitPB->GetStr(kWaitPointOld, 0, 0);
|
||||
waitPB->SetValue(kWaitPoint, 0, point);
|
||||
MCHAR* point = (MCHAR*)waitPB->GetStr(kWaitPointOld, 0, 0);
|
||||
waitPB->SetValue(kWaitPoint, 0, _T(point));
|
||||
waitPB->Delete(kWaitPointOld, 0, 1);
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsTypes.h"
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
|
||||
@ -419,7 +420,7 @@ hsBool hsConverterUtils::IsInstanced(Object* maxObject)
|
||||
}
|
||||
|
||||
ObjectInstancedEnumProc instProc;
|
||||
maxObject->DoEnumDependents(&instProc);
|
||||
ENUMDEPENDENTS(maxObject, &instProc);
|
||||
|
||||
return (instProc.GetInstanceCount() > 1);
|
||||
hsGuardEnd;
|
||||
|
@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "plInterp/plController.h"
|
||||
#include "hsExceptionStack.h"
|
||||
@ -3932,7 +3933,7 @@ hsBool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node)
|
||||
#define VIEW_BK 5
|
||||
|
||||
|
||||
static BMM_Color_64 green64 = BMM_Color_64(0, (1<<16)-1, 0, (1<<16)-1);
|
||||
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)
|
||||
{
|
||||
|
@ -16,6 +16,7 @@ set(MaxMain_HEADERS
|
||||
GlobalUtility.h
|
||||
main.def
|
||||
MaxAllocDll.h
|
||||
MaxCompat.h
|
||||
plActionTableMgr.h
|
||||
plAgeDescInterface.h
|
||||
plCommonObjLib.h
|
||||
|
57
Sources/Tools/MaxMain/MaxCompat.h
Normal file
57
Sources/Tools/MaxMain/MaxCompat.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
/* AUTHOR: Adam Johnson
|
||||
* DATE: April 16, 2011
|
||||
* SUMMARY: Cool helpers that let us target MANY versions of 3ds Max
|
||||
*/
|
||||
|
||||
#ifndef _PLASMA_MAXCOMPAT_H
|
||||
#define _PLASMA_MAXCOMPAT_H
|
||||
|
||||
#include "maxversion.h"
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 9
|
||||
#define BMMCOLOR(x, y, z, w) \
|
||||
{x, y, x, w};
|
||||
|
||||
#define DEFAULTREMAP NoRemap()
|
||||
|
||||
#define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->EnumDependents(proc);
|
||||
|
||||
typedef TCHAR MCHAR;
|
||||
#else
|
||||
#define BMMCOLOR(x, y, z, w) \
|
||||
BMM_Color_64(x, y, z, w);
|
||||
|
||||
#define DEFAULTREMAP DefaultRemapDir()
|
||||
|
||||
#define ENUMDEPENDENTS(maxObject, proc) \
|
||||
maxObject->DoEnumDependents(proc);
|
||||
#endif //MAX_VERSION_MAJOR
|
||||
|
||||
#endif // _PLASMA_MAXCOMPAT_H
|
@ -32,6 +32,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include "MaxExport/SimpleExport.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "MaxComponent/plComponentMgr.h"
|
||||
#include "MaxPlasmaMtls/plMtlImport.h"
|
||||
@ -211,10 +212,10 @@ public:
|
||||
SClass_ID SuperClassID() {return CUST_ATTRIB_CLASS_ID;}
|
||||
Class_ID ClassID() {return fClassDesc->ClassID();}
|
||||
|
||||
ReferenceTarget *Clone(RemapDir &remap = DefaultRemapDir());
|
||||
ReferenceTarget *Clone(RemapDir &remap = DEFAULTREMAP);
|
||||
virtual bool CheckCopyAttribTo(ICustAttribContainer *to) { return true; }
|
||||
|
||||
const char* GetName() { return (TCHAR*)fClassDesc->ClassName(); }
|
||||
const TCHAR* GetName() { return (const TCHAR*)_T(fClassDesc->ClassName()); }
|
||||
void DeleteThis() { delete this; }
|
||||
};
|
||||
|
||||
|
@ -34,6 +34,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// Our generic headers
|
||||
#include "hsTypes.h"
|
||||
#include "MaxPlasmaMtls/Layers/plLayerTex.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
|
||||
extern TCHAR *GetString(int id);
|
||||
@ -328,7 +329,7 @@ public:
|
||||
|
||||
// plug-in mouse creation callback
|
||||
CreateMouseCallBack* GetCreateMouseCallBack();
|
||||
RefTargetHandle Clone(RemapDir &remap = DefaultRemapDir()){ plRTLightBase* thisObj = TRACKED_NEW plRTLightBase(); BaseClone(this, thisObj, remap); return thisObj;}
|
||||
RefTargetHandle Clone(RemapDir &remap = DEFAULTREMAP){ plRTLightBase* thisObj = TRACKED_NEW plRTLightBase(); BaseClone(this, thisObj, remap); return thisObj;}
|
||||
|
||||
virtual void BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev);
|
||||
virtual void EndEditParams(IObjParam *ip, ULONG flags, Animatable *next);
|
||||
|
@ -97,7 +97,7 @@ class TargetObject: public GeomObject {
|
||||
WPARAM wParam, LPARAM lParam ){return(0);}
|
||||
|
||||
// From ref.h
|
||||
RefTargetHandle Clone(RemapDir& remap = DefaultRemapDir());
|
||||
RefTargetHandle Clone(RemapDir& remap = DEFAULTREMAP);
|
||||
|
||||
// IO
|
||||
IOResult Save(ISave *isave);
|
||||
|
@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "MaxComponent/plMaxAnimUtils.h"
|
||||
#include "MaxComponent/plPickNodeBase.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "iparamm2.h"
|
||||
|
||||
@ -454,11 +455,9 @@ hsBool plAnimStealthNode::IsParentUsedInScene( void )
|
||||
}
|
||||
|
||||
// Enum dependents
|
||||
int i;
|
||||
|
||||
plGetRefs callback;
|
||||
GetParentMtl()->DoEnumDependents( &callback );
|
||||
for( i = 0; i < callback.fList.GetCount(); i++ )
|
||||
ENUMDEPENDENTS(GetParentMtl(), &callback);
|
||||
for(int i = 0; i < callback.fList.GetCount(); i++ )
|
||||
{
|
||||
ReferenceMaker *maker = callback.fList[ i ];
|
||||
|
||||
|
Reference in New Issue
Block a user