diff --git a/Sources/Tools/CMakeLists.txt b/Sources/Tools/CMakeLists.txt
index ffc86803..67111a9a 100644
--- a/Sources/Tools/CMakeLists.txt
+++ b/Sources/Tools/CMakeLists.txt
@@ -1,5 +1,3 @@
-#add_subdirectory(Migration)
-#add_subdirectory(plDatMerger)
add_subdirectory(plLocalizationEditor)
add_subdirectory(plResBrowser)
@@ -15,7 +13,6 @@ if(3dsm_BUILD_PLUGIN)
add_subdirectory(MaxConvert)
add_subdirectory(MaxExport)
add_subdirectory(MaxMain)
- #add_subdirectory(MaxMtlUpdate)
add_subdirectory(MaxPlasmaLights)
add_subdirectory(MaxPlasmaMtls)
#add_subdirectory(MaxSceneViewer) # NOTE: Uses Plasma classes that do not exist
diff --git a/Sources/Tools/CheckFolderVar/CheckFolderVar.cpp b/Sources/Tools/CheckFolderVar/CheckFolderVar.cpp
deleted file mode 100644
index 73152195..00000000
--- a/Sources/Tools/CheckFolderVar/CheckFolderVar.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-////////////////////////////////////////////////////////////////////
-// This little app checks to see if the specified envrionment
-// variable exists, creating it if necessary. If the variable
-// doesn't exist, the app prompts the user with the Browse for
-// Folder dialog box then sets the envrionment variable, using the
-// selected folder as the value.
-//
-// Example:
-// C:\>CheckFolderVar maxr4dir "Select the folder where max is installed then click Ok."
-//
-
-
-////////////////////////////////////////////////////////////////////
-
-#include
-#include
-#include
-#include
-
-////////////////////////////////////////////////////////////////////
-
-std::string gCurrentValue;
-
-// get window handle of cancel button so we can disable it.
-BOOL CALLBACK EnumChildWindowsCallbackProc(HWND hwnd,LPARAM lParam)
-{
- char text[256];
- GetWindowText(hwnd,text,256);
- if (stricmp(text,"Cancel")==0)
- {
- *((HWND*)lParam) = hwnd;
- return FALSE;
- }
- return TRUE;
-}
-
-int CALLBACK BrosweForFolderCallbackProc(HWND hwnd,UINT uMsg,LPARAM lp, LPARAM pData)
-{
- switch(uMsg)
- {
- case BFFM_INITIALIZED:
- // disable cancel button
- HWND hCancelBtn = NULL;
- EnumChildWindows(hwnd,EnumChildWindowsCallbackProc,(LPARAM)&hCancelBtn);
- EnableWindow(hCancelBtn,FALSE);
- SendMessage(hwnd,BFFM_SETSELECTION,true,(LPARAM)gCurrentValue.data());
- break;
- }
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////
-int main(int argc, char ** argv)
-{
- if (argc<2)
- {
- fprintf(stderr,"Usage: CheckFolderVar varname [-replace] [\"prompt msg\"]\n");
- return EXIT_FAILURE;
- }
-
- // read cmdline
- char ** args = argv;
- char * varname = NULL;
- bool replace = false;
- char prompt[1024] = "";
- for (int i=1; iFree(itemList);
- shMalloc->Release();
-
- // set environment var
- RegSetValueEx(hEnvKey,varname,0,REG_SZ,(const BYTE*)value,strlen(value));
-
- // close registry key
- RegCloseKey(hEnvKey);
-
- // bubbye
- return EXIT_SUCCESS;
-}
diff --git a/Sources/Tools/MaxAss/ValdezInterface.h b/Sources/Tools/MaxAss/ValdezInterface.h
deleted file mode 100644
index c67f6187..00000000
--- a/Sources/Tools/MaxAss/ValdezInterface.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-/******************************************************************************
- ValdezInterface.h
-
- Eric Ellis
-******************************************************************************/
-
-#ifndef _JV_VALDEZINTERFACE_H_
-#define _JV_VALDEZINTERFACE_H_
-
-#define MAXASS_CLASS_ID Class_ID(0x5c61b5a6, 0x3b298521)
-#define kMaxAssGetValdezInterface 33
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-using std::vector;
-using std::string;
-
-#pragma warning(disable:4786)
-
-
-#define kAssetTypeIdTexure 1
-#define kAssetTypeIdSound 2
-#define kAssetTypeIdMaxFile 4
-#define kAssetTypeIdAge 7
-
-#define kStatusIdDraft 1
-#define kStatusIdStable 2
-
-
-
-class jvValdezInterface
-{
-public:
- // MAX File Replacement Operations
- virtual int ChooseAssetAndOpen() = 0;
- virtual int Save() = 0;
- virtual int SaveAs() = 0;
- virtual int Add() = 0;
- virtual int OpenBitmapDlg(VARIANT* assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
- virtual int OpenSoundDlg(VARIANT* assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
- virtual int NewAgeDlg(VARIANT* assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
- virtual int NewTextureDlg(VARIANT* assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
-
- // Asset Database Operations
- virtual int GetLatestVersionFile(VARIANT& assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
- virtual int GetAssetsByType(int assetTypeId, vector<_variant_t>& assetIds, vector& assetNames) = 0;
- virtual int CheckOutAsset(VARIANT& assetId, TCHAR* localFilenameRet, int localFilenameBufSize) = 0;
- virtual int CheckInAsset(VARIANT& assetId, TCHAR* localFilename, int statusId, TCHAR* comments) = 0;
-
- virtual int FindAndCompareAssetByFilename(const TCHAR* localFilename, VARIANT* assetId, bool* filesMatch) = 0;
- virtual int FindAssetsByFilename(const TCHAR* filename, vector<_variant_t>& assets) = 0;
-
- virtual int IsAssetCheckedOutLocally(VARIANT& assetId, bool& checkedOut) = 0;
-};
-
-
-inline jvValdezInterface* GetValdezInterface()
-{
- GUP* maxAssGup = OpenGupPlugIn(MAXASS_CLASS_ID);
-
- if(!maxAssGup) return NULL;
-
- return (jvValdezInterface*)maxAssGup->Control(kMaxAssGetValdezInterface);
-}
-
-#endif _JV_VALDEZINTERFACE_H_
diff --git a/Sources/Tools/MaxMtlUpdate/DllEntry.cpp b/Sources/Tools/MaxMtlUpdate/DllEntry.cpp
deleted file mode 100644
index 28c3afe2..00000000
--- a/Sources/Tools/MaxMtlUpdate/DllEntry.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-/**********************************************************************
- *<
- FILE: DllEntry.cpp
-
- DESCRIPTION: Contains the Dll Entry stuff
-
- CREATED BY:
-
- HISTORY:
-
- *> Copyright (c) 2000, All Rights Reserved.
- **********************************************************************/
-#include "plMaterialUpdate.h"
-
-extern ClassDesc2* GetMaterialUpdateDesc();
-
-HINSTANCE hInstance;
-int controlsInit = FALSE;
-
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
-{
- hInstance = hinstDLL; // Hang on to this DLL's instance handle.
-
- if (!controlsInit) {
- controlsInit = TRUE;
- InitCustomControls(hInstance); // Initialize MAX's custom controls
- InitCommonControls(); // Initialize Win95 controls
- }
-
- return (TRUE);
-}
-
-__declspec( dllexport ) const TCHAR* LibDescription()
-{
- return GetString(IDS_LIBDESCRIPTION);
-}
-
-//TODO: Must change this number when adding a new class
-__declspec( dllexport ) int LibNumberClasses()
-{
- return 1;
-}
-
-__declspec( dllexport ) ClassDesc* LibClassDesc(int i)
-{
- switch(i) {
- case 0: return GetMaterialUpdateDesc();
- default: return 0;
- }
-}
-
-__declspec( dllexport ) ULONG LibVersion()
-{
- return VERSION_3DSMAX;
-}
-
-TCHAR *GetString(int id)
-{
- static TCHAR buf[256];
-
- if (hInstance)
- return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
- return NULL;
-}
-
diff --git a/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayer.h b/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayer.h
deleted file mode 100644
index 78f973bc..00000000
--- a/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayer.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-#ifndef __HSMAXLAYER_H
-#define __HSMAXLAYER_H
-
-#include
-#include "hsMaxLayerBase.h"
-//#include "hsMaxMtlRes.h"
-
-//=========================================================================================
-// Flags and constants...
-//=========================================================================================
-
-// ParamBlock entries
-#define PB_LAYER_CLIPU 0
-#define PB_LAYER_CLIPV 1
-#define PB_LAYER_CLIPW 2
-#define PB_LAYER_CLIPH 3
-#define PB_LAYER_JITTER 4
-#define PB_LAYER_AMBIENT 5
-#define PB_LAYER_COLOR 6
-#define PB_LAYER_SHININESS 7
-#define PB_LAYER_SHIN_STR 8
-#define PB_LAYER_SELFI 9
-#define PB_LAYER_OPAC 10
-#define PB_LAYER_OPFALL 11
-#define PB_LAYER_FILTER 12
-#define PB_LAYER_WIRESZ 13
-#define PB_LAYER_IOR 14
-#define PB_LAYER_BOUNCE 15
-#define PB_LAYER_STATFRIC 16
-#define PB_LAYER_SLIDFRIC 17
-#define PB_LAYER_DIMLEV 18
-#define PB_LAYER_DIMMULT 19
-#define PB_LAYER_MAPPERCENT 20
-#define PB_LAYER_MIPMAPBLUR 21
-#define PB_LAYER_LODBIAS 22
-#define PB_LAYER_DETAILBIAS 23
-#define PB_LAYER_DETAILMAX 24
-#define PB_LAYER_ENVIRONMAPSIZE 25
-#define LAYER_NPARAMS 26
-
-#define HSMAX_LAYER_LOCK_AD 0x1
-
-class hsMaxLayer;
-class hsMaxLayerDlg;
-
-static LRESULT CALLBACK HiliteWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
-
-// which edit control enum
-enum EditControl {Hc, Sc, Vc, Rc, Gc, Bc};
-
-void GetBMName(BitmapInfo& bi, TSTR &fname);
-
-//=========================================================================================
-// BMSampler
-//=========================================================================================
-
-class BMSampler : public MapSampler {
- Bitmap *bm;
- hsMaxLayer *tex;
- int alphaSource;
- float u0,v0,u1,v1,ufac,vfac,ujit,vjit;
- int bmw,bmh,clipx, clipy, cliph;
- float fclipw,fcliph, fbmh, fbmw;
-public:
- BMSampler() { bm = NULL; }
- void Init(hsMaxLayer *bmt);
- int PlaceUV(ShadeContext& sc, float &u, float &v, int iu, int iv);
- void PlaceUVFilter(ShadeContext& sc, float &u, float &v, int iu, int iv);
- AColor Sample(ShadeContext& sc, float u,float v);
- AColor SampleFilter(ShadeContext& sc, float u,float v, float du, float dv);
- // float SampleMono(ShadeContext& sc, float u,float v);
- // float SampleMonoFilter(ShadeContext& sc, float u,float v, float du, float dv);
-};
-
-//=========================================================================================
-// BM\AlphaSampler
-//=========================================================================================
-class BMAlphaSampler : public MapSampler {
- Bitmap *bm;
- hsMaxLayer *tex;
- float u0,v0,u1,v1,ufac,vfac,ujit,vjit;
- int bmw,bmh,clipx, clipy, cliph;
- float fclipw,fcliph, fbmh, fbmw;
-public:
- BMAlphaSampler() { bm = NULL; }
- void Init(hsMaxLayer *bmt);
- int PlaceUV(ShadeContext &sc, float &u, float &v, int iu, int iv);
- void PlaceUVFilter(ShadeContext &sc, float &u, float &v, int iu, int iv);
- AColor Sample(ShadeContext& sc, float u,float v) { return AColor(0,0,0,0);}
- AColor SampleFilter(ShadeContext& sc, float u,float v, float du, float dv) { return AColor(0,0,0,0);}
- float SampleMono(ShadeContext& sc, float u,float v);
- float SampleMonoFilter(ShadeContext& sc, float u,float v, float du, float dv);
-};
-
-//=========================================================================================
-// hsMaxLayerNotify... this calls hsMaxLayer::NotifyChanged when a bitmap changes
-//=========================================================================================
-
-class hsMaxLayerNotify : public BitmapNotify {
-public:
- void SetTex(hsMaxLayer *tx) { tex = tx; }
- int Changed(ULONG flags);
-
-private:
- hsMaxLayer *tex;
-};
-
-//=========================================================================================
-// hsMaxLayer: a material layer with (possibly) texture info, blending info and shading info
-//=========================================================================================
-
-class hsMaxLayer : public hsMaxLayerBase {
- friend class hsMaxLayerPostLoad;
- friend class hsMaxLayerDlg;
- friend class BMSampler;
- friend class BMAlphaSampler;
- friend class BMCropper;
-public:
- hsMaxLayer();
- ~hsMaxLayer();
-
- ParamDlg* CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp);
- void Update(TimeValue t, Interval& valid);
- void Reset();
- Interval Validity(TimeValue t) { Interval v; Update(t,v); return ivalid; }
- TSTR GetFullName();
-
- void SetOutputLevel(TimeValue t, float v) { }
- void SetFilterType(int ft);
- void SetAlphaSource(int as);
- void SetEndCondition(int endcond) { endCond = endcond; }
- void SetAlphaAsMono(BOOL onoff) { alphaAsMono = onoff; }
- void SetAlphaAsRGB(BOOL onoff) { alphaAsRGB = onoff; }
- void SetPremultAlpha(BOOL onoff) { premultAlpha = onoff; }
- void SetMapName(TCHAR *name) {
- bi.SetName(name);
- FreeBitmap();
- if (paramDlg)
- ReloadBitmap();
- }
- void SetStartTime(TimeValue t) { startTime = t; }
- void SetPlaybackRate(float r) { pbRate = r; }
-
- void SetClipU(TimeValue t, float f) { clipu = f; pblock->SetValue( PB_LAYER_CLIPU, t, f); }
- void SetClipV(TimeValue t, float f) { clipv = f; pblock->SetValue( PB_LAYER_CLIPV, t, f); }
- void SetClipW(TimeValue t, float f) { clipw = f; pblock->SetValue( PB_LAYER_CLIPW, t, f); }
- void SetClipH(TimeValue t, float f) { cliph = f; pblock->SetValue( PB_LAYER_CLIPH, t, f); }
- void SetJitter(TimeValue t, float f) { cliph = f; pblock->SetValue( PB_LAYER_JITTER, t, f); }
-
- int GetFilterType() { return filterType; }
- int GetAlphaSource() { return alphaSource; }
- int GetEndCondition() { return endCond; }
- BOOL GetAlphaAsMono(BOOL onoff) { return alphaAsMono; }
- BOOL GetAlphaAsRGB(BOOL onoff) { return alphaAsRGB; }
- BOOL GetPremultAlpha(BOOL onoff) { return premultAlpha; }
- TCHAR *GetMapName() { return (TCHAR *)bi.Name(); }
- TimeValue GetStartTime() { return startTime; }
- float GetPlaybackRate() { return pbRate; }
- StdUVGen* GetUVGen() { return (StdUVGen*)uvGen; }
- TextureOutput* GetTexout() { return 0; }
- Bitmap *GetBitmap(TimeValue t) { LoadBitmap(t); return thebm; }
- float GetClipU(TimeValue t) { return pblock->GetFloat( PB_LAYER_CLIPU, t); }
- float GetClipV(TimeValue t) { return pblock->GetFloat( PB_LAYER_CLIPV, t); }
- float GetClipW(TimeValue t) { return pblock->GetFloat( PB_LAYER_CLIPW, t); }
- float GetClipH(TimeValue t) { return pblock->GetFloat( PB_LAYER_CLIPH, t); }
- float GetJitter(TimeValue t) { return pblock->GetFloat( PB_LAYER_JITTER, t); }
- void StuffCropValues(); // stuff new values into the cropping VFB
-
- void UpdtSampler() {
- mysamp.Init(this);
- alphasamp.Init(this);
- }
-
- void NotifyChanged();
- Bitmap* BuildBitmap(int size);
- void FreeBitmap();
- BMMRES LoadBitmap(TimeValue t);
- int CalcFrame(TimeValue t);
- void ScaleBitmapBumpAmt(float f);
- void ReloadBitmap();
-
- // Evaluate the color of map for the context.
- RGBA EvalColor(ShadeContext& sc);
- float EvalMono(ShadeContext& sc);
- Point3 EvalNormalPerturb(ShadeContext& sc);
-
- void DiscardTexHandle();
-
- BOOL SupportTexDisplay() { return TRUE; }
- void ActivateTexDisplay(BOOL onoff);
- DWORD GetActiveTexHandle(TimeValue t, TexHandleMaker& thmaker);
- void GetUVTransform(Matrix3 &uvtrans) { uvGen->GetUVTransform(uvtrans); }
- int GetTextureTiling() { return uvGen->GetTextureTiling(); }
- int GetUVWSource() { return uvGen->GetUVWSource(); }
- UVGen *GetTheUVGen() { return uvGen; }
-#ifdef MAXR3
- int GetMapChannel () { return uvGen->GetMapChannel(); }
-#endif // MAXR3
-
- int RenderBegin(TimeValue t, ULONG flags) {
- inRender = TRUE;
- return 1;
- }
- int RenderEnd(TimeValue t) {
- inRender = FALSE;
- return 1;
- }
- int LoadMapFiles(TimeValue t) { LoadBitmap(t); return 1; }
- void RenderBitmap(TimeValue t, Bitmap *bm, float scale3D, BOOL filter);
-
- Class_ID ClassID() { return hsMaxLayerClassID; }
- SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; }
-#ifdef HS_DEBUGGING
- void GetClassName(TSTR& s) { s= GetString(IDS_DS_LAYER_DEBUG); }
-#else
- void GetClassName(TSTR& s) { s= "";}//GetString(IDS_DS_LAYER); }
-#endif
- void DeleteThis() { delete this; }
-
- // Requirements
- ULONG LocalRequirements(int subMtlNum);
-
- int NumSubs() { return 2; }
- Animatable* SubAnim(int i);
- TSTR SubAnimName(int i);
- int SubNumToRefNum(int subNum) { return subNum; }
- void InitSlotType(int sType) { if (uvGen) uvGen->InitSlotType(sType); }
-
- // From ref
- int NumRefs() { return 2; }
- RefTargetHandle GetReference(int i);
- void SetReference(int i, RefTargetHandle rtarg);
-
- RefTargetHandle Clone(RemapDir &remap = NoRemap());
- RefResult NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget,
- PartID& partID, RefMessage message );
-
- // From Animatable
- void EnumAuxFiles(NameEnumCallback& nameEnum, DWORD flags) {
- bi.EnumAuxFiles(nameEnum,flags);
- }
- int SetProperty(ULONG id, void *data);
- void FreeAllBitmaps() {
- FreeBitmap();
- }
-
- int GetFlag(ULONG f) { return (flags&f)?1:0; }
- void SetFlag(ULONG f, ULONG val);
-
- // from hsMaxLayerBase
- BOOL KeyAtTime(int id,TimeValue t) { return pblock->KeyFrameAtTime(id,t); }
- Color GetAmbient(int mtlNum=0, BOOL backFace=FALSE);
- Color GetColor(int mtlNum=0, BOOL backFace=FALSE);
-
- float GetShininess(int mtlNum=0, BOOL backFace=FALSE) { return 0.f; }
- float GetShinStr(int mtlNum=0, BOOL backFace=FALSE) { return 0.f; }
- float GetMapPercent(int mtlNum=0, BOOL backFace=FALSE) { return 0.f; }
- float GetOpacity(int mtlNum=0, BOOL backFace=FALSE) { return 0.f; }
- float GetMipMapBlur(int mtlNum=0, BOOL backFace=FALSE) { return pblock->GetFloat(PB_LAYER_MIPMAPBLUR, 0); }
- float GetLODBias(int mtlNum=0, BOOL backFace=FALSE) { return pblock->GetFloat(PB_LAYER_LODBIAS, 0); }
- int GetEnvironMapSize(int mtlNum=0, BOOL backFace=FALSE) { return 0; }
-
- Color GetAmbient(TimeValue t) const;
- Color GetColor(TimeValue t) const;
-
- float GetShininess(TimeValue t) const;
- float GetShinStr(TimeValue t) const;
- float GetMapPercent(TimeValue t) const;
- float GetOpacity(TimeValue t) const;
- float GetMipMapBlur(TimeValue t) const;
- float GetLODBias(TimeValue t) const;
- float GetDetailDropoffStart(TimeValue t) const;
- float GetDetailDropoffStop(TimeValue t) const;
- float GetDetailMax(TimeValue t) const;
- float GetDetailMin(TimeValue t) const;
- int GetEnvironMapSize(TimeValue t) const;
-
- int GetNumExplicitMipmaps() const { return mipmapInfo.Count(); }
- TCHAR *GetExplicitMipmapName(int i) const { return mipmapOn[i] ? (TCHAR *)mipmapInfo[i].Name() : 0; }
- BOOL ExplicitMipmapEnabled(int i) const { return mipmapOn[i]; }
- int GetExplicitMipmapLevel(int i) const { return mipmapLevel[i]; }
-
- BOOL GetDirty() const { return dirty; }
- ULONG GetBlendFlags() const { return blendFlags; }
- ULONG GetZFlags() const { return zFlags; }
- ULONG GetShadeFlags() const { return shadeFlags; }
- ULONG GetMiscFlags() const { return miscFlags; }
- ProcType GetProcType() const { return procType; }
- hsMatUsage GetUsage() const { return usageType; }
-
- // Setting the things in hsMaxLayerBase
- void SetShininess(float v, TimeValue t);
- void SetShinStr(float v, TimeValue t);
- void SetMapPercent(float v, TimeValue t);
- void SetOpacity(float v, TimeValue t);
- void SetAmbient(Color c, TimeValue t);
- void SetColor(Color c, TimeValue t);
- void SetMipMapBlur(float f, TimeValue t);
- void SetLODBias(float f, TimeValue t);
- void SetDetailDropoffStart(float f, TimeValue t);
- void SetDetailDropoffStop(float f, TimeValue t);
- void SetDetailMax(float f, TimeValue t);
- void SetDetailMin(float f, TimeValue t);
- void SetEnvironMapSize(int i, TimeValue t);
-
- void SetNumExplicitMipmaps(int n);
- void SetExplicitMipmapName(int i, const char *n) { mipmapInfo[i].SetName(n); }
- void EnableExplicitMipmap(int i, BOOL state) { mipmapOn[i] = state; }
- void SetExplicitMipmapLevel(int i, int l) { mipmapLevel[i] = l; }
-
- void SetDirty(BOOL state) { dirty = state; }
- void SetBlendFlag(int i, BOOL state);
- void SetZFlag(int flag, BOOL state);
- void SetShadeFlag(int flag, BOOL state);
- void SetMiscFlag(int flag, BOOL state);
- void SetProcType(ProcType type);
- void SetUsage(hsMatUsage use);
- void GuessUsage();
-
- // IO
- IOResult Save(ISave *isave);
- IOResult Load(ILoad *iload);
-
- // Colin Hack
- BOOL GetApplyCrop() { return applyCrop; }
- BOOL GetPlaceImage() { return placeImage; }
-
-private:
- UVGen *uvGen; // ref #0
- IParamBlock *pblock; // ref #1
- BitmapInfo bi;
- TSTR bmName; // for loading old files only
- Bitmap *thebm;
- hsMaxLayerNotify bmNotify;
- TexHandle *texHandle;
- float pbRate;
- TimeValue startTime;
- Interval ivalid;
-
- // Samplers
- BMSampler mysamp;
- BMAlphaSampler alphasamp;
-
- BOOL applyCrop;
- BOOL loadingOld;
- BOOL placeImage;
- BOOL randPlace;
- int filterType;
- int alphaSource;
- int endCond;
- int alphaAsMono;
- int alphaAsRGB;
- float clipu, clipv, clipw, cliph, jitter;
- BOOL premultAlpha;
- BOOL isNew;
- BOOL loadFailed;
- BOOL inRender;
- hsMaxLayerDlg *paramDlg;
- int texTime;
- Interval texValid;
- Interval clipValid;
- float rumax,rumin,rvmax,rvmin;
-
- // ADDED
- ULONG flags;
-
- Color ambient;
- Color color;
-
- float opacity;
- float shine_str;
- float shininess;
- float mapPercent;
- float mipMapBlur;
- float lodBias;
- float detailDropoffStart;
- float detailDropoffStop;
- float detailMax;
- float detailMin;
- int environMapSize;
-
- BOOL dirty;
-
- ULONG blendFlags;
- ULONG zFlags;
- ULONG shadeFlags;
- ULONG miscFlags;
- ProcType procType;
- hsMatUsage usageType;
-
- Tab mipmapInfo; // references
- Tab mipmapOn;
- Tab mipmapLevel;
-};
-
-#endif
\ No newline at end of file
diff --git a/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayerBase.h b/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayerBase.h
deleted file mode 100644
index 029bd75a..00000000
--- a/Sources/Tools/MaxMtlUpdate/OldMat/hsMaxLayerBase.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-#ifndef __HSMAXLAYERBASE_H
-#define __HSMAXLAYERBASE_H
-
-#include "stdmat.h"
-
-#define HSMAX_LAYER_CLASS_ID 0x41990fe7
-
-const Class_ID hsMaxLayerClassID(HSMAX_LAYER_CLASS_ID, 0x72404998);
-const Class_ID hsMaxMtlClassID(0x2f335902, 0x111d2ea7);
-const Class_ID hsEnvironMapMtlClassID(0x98777b3, 0x5eb270dd);
-
-class hsMaxLayerBase : public BitmapTex {
-public:
- enum hsMatBlendFlags {
- kBlendTest = 0x1, // dev
- // Rest of blends are mutually exclusive
- kBlendAlpha = 0x2, // dev
- kBlendMult = 0x4, // dev
- kBlendAdd = 0x8, // dev
- kBlendMultColorPlusMultAlpha = 0x10, // dev
- kBlendAntiAlias = 0x20,
- kBlendDetail = 0x40,
- kBlendDetailAdd = 0x80,
- kBlendMask = kBlendAlpha
- | kBlendMult
- | kBlendAdd
- | kBlendMultColorPlusMultAlpha
- | kBlendAntiAlias
- | kBlendDetail
- | kBlendDetailAdd,
- kBlendInvertAlpha = 0x1000, // dev
- kBlendInvertColor = 0x2000, // dev
- kBlendAlphaMult = 0x4000,
- kBlendAlphaAdd = 0x8000,
- kBlendNoColor = 0x10000,
- kBlendNoVtxAlpha = 0x20000
- };
-
- enum hsMatZFlags {
- kZIncLayer = 0x1, // dev
- kZOnlyZ = 0x2, // dev
- kZClearZ = 0x4, // dev
- kZNoZRead = 0x8, // dev
- kZNoZWrite = 0x10,
- kZMask = kZNoZWrite | kZClearZ | kZNoZRead,
- kZLODBias = 0x20
- };
-
- enum hsMatShadeFlags {
- kShadeSoftShadow = 0x1, // view, dev
- kShadeNoProjectors = 0x2, // projector
- kShadeVertexShade = 0x20, // dev
- kShadeNoShade = 0x40, // view,dev
- kShadeBlack = kShadeNoShade,
- kShadeSpecular = 0x80, // view, dev
- kShadeNoFog = 0x100, // dev
- kShadeWhite = 0x200,
- kShadeSpecularAlpha = 0x400,
- kShadeSpecularColor = 0x800,
- kShadeSpecularHighlight = 0x1000,
- kShadeVertColShade = 0x2000,
- kShadeInherit = 0x4000
- };
-
- enum hsMatMiscFlags {
- kMiscWireFrame = 0x1, // dev (running out of bits)
- kMiscDrawMeshOutlines = 0x2, // dev, currently unimplemented
- kMiscTwoSided = 0x4, // view,dev
- kMiscDrawAsSplats = 0x8, // dev? bwt
- kMiscMipMap = 0x10,
- kMiscUseBitmap = 0x20,
- kMiscIntensityOnly = 0x40,
- kMiscAutoStart = 0x80,
- kMiscDetailBias = 0x100, // obsolete...
- kMiscDetailMax = 0x200, // obsolete...
- kMiscExplicitMipmap = 0x400,
- kMiscAdjustPlane = 0x800,
- kMiscAdjustCylinder = 0x1000,
- kMiscAdjustSphere = 0x2000,
- kMiscTroubledLoner = 0x4000,
- kMiscBindSkip = 0x8000,
- kMiscBindMask = 0x10000,
- kMiscForceNonCompressed = 0x20000,
- kMiscNoMaxSize = 0x40000,
- kMiscHalfSize = 0x80000,
- kMiscBindNext = 0x100000,
- kMiscBindPrev = 0x200000,
- kMiscReserved = 0x400000
- };
-
- enum ProcType {
- kProcTypeDefault,
- kProcTypeWater
- };
-
- enum hsMatUsage {
- kUseNone = 0x0,
- kUseBase = 0x1,
- kUseDetail = 0x2,
- kUseGrime = 0x4,
- kUseTransition = 0x8,
- kUseHighlight = 0x10,
- kUseMask = 0x20,
- kUseShadowLight = 0x40,
- kUseHelper = 0x80,
-
- kUseGuess = 0x10000000
- };
-
-public:
- // For hsMaxMtl... Special case for higher layers. Sigh.
- virtual void SetDirty(BOOL state) = 0;
- virtual void SetBlendFlag(int i, BOOL state) = 0;
- virtual void SetZFlag(int flag, BOOL state) = 0;
- virtual void SetShadeFlag(int flag, BOOL state) = 0;
- virtual void SetMiscFlag(int flag, BOOL state) = 0;
- virtual void SetProcType(ProcType type) = 0;
- virtual void SetUsage(hsMatUsage use) = 0;
- virtual void GuessUsage() = 0;
-
- // For interactive renderer
- virtual Color GetAmbient(int mtlNum=0, BOOL backFace=FALSE) = 0;
- virtual Color GetColor(int mtlNum=0, BOOL backFace=FALSE) = 0;
-
- virtual float GetShininess(int mtlNum=0, BOOL backFace=FALSE) = 0;
- virtual float GetShinStr(int mtlNum=0, BOOL backFace=FALSE) = 0;
- virtual float GetOpacity(int mtlNum=0, BOOL backFace=FALSE) = 0;
-
- // For exporter
- virtual Color GetAmbient(TimeValue t) const = 0;
- virtual Color GetColor(TimeValue t) const = 0;
-
- virtual float GetShininess(TimeValue t) const = 0;
- virtual float GetShinStr(TimeValue t) const = 0;
- virtual float GetMapPercent(TimeValue t) const = 0;
- virtual float GetOpacity(TimeValue t) const = 0;
- virtual float GetMipMapBlur(TimeValue t) const = 0;
- virtual float GetLODBias(TimeValue t) const = 0;
- virtual float GetDetailDropoffStart(TimeValue t) const = 0;
- virtual float GetDetailDropoffStop(TimeValue t) const = 0;
- virtual float GetDetailMax(TimeValue t) const = 0;
- virtual float GetDetailMin(TimeValue t) const = 0;
- virtual int GetEnvironMapSize(TimeValue t) const = 0;
-
- virtual BOOL GetDirty() const = 0;
- virtual ULONG GetBlendFlags() const = 0;
- virtual ULONG GetZFlags() const = 0;
- virtual ULONG GetShadeFlags() const = 0;
- virtual ULONG GetMiscFlags() const = 0;
- virtual ProcType GetProcType() const = 0;
- virtual hsMatUsage GetUsage() const = 0;
-
- virtual int GetNumExplicitMipmaps() const = 0;
- virtual TCHAR *GetExplicitMipmapName(int i) const = 0;
- virtual BOOL ExplicitMipmapEnabled(int i) const = 0;
- virtual int GetExplicitMipmapLevel(int i) const = 0;
-
-#ifdef MAXR4
- // KLUDGE - Had to do this to compile under MAX4 beta
- virtual void fnReload() {};
- virtual void fnViewImage() {};
-#endif
-};
-
-#endif
diff --git a/Sources/Tools/MaxMtlUpdate/plMaterialUpdate.cpp b/Sources/Tools/MaxMtlUpdate/plMaterialUpdate.cpp
deleted file mode 100644
index 55a9efd6..00000000
--- a/Sources/Tools/MaxMtlUpdate/plMaterialUpdate.cpp
+++ /dev/null
@@ -1,411 +0,0 @@
-/*==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 .
-
-Additional permissions under GNU GPL version 3 section 7
-
-If you modify this Program, or any covered work, by linking or
-combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
-NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
-JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
-(or a modified version of those libraries),
-containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
-PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
-JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
-licensors of this Program grant you additional
-permission to convey the resulting work. Corresponding Source for a
-non-source form of such a combination shall include the source code for
-the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
-work.
-
-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==*/
-#include "plMaterialUpdate.h"
-
-#define MAXR3
-#define MAXR4
-
-//#include "OldMat/hsMaxMtl.h"
-#include "OldMat/hsMaxLayer.h"
-
-#include "../MaxPlasmaMtls/Layers/plLayerTex.h"
-#include "../MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h"
-
-#include "../MaxPlasmaMtls/Materials/plPassMtl.h"
-#include "../MaxPlasmaMtls/Materials/plPassMtlBase.h"
-#include "../MaxPlasmaMtls/Materials/plPassMtlBasicPB.h"
-#include "../MaxPlasmaMtls/Materials/plPassMtlAdvPB.h"
-#include "../MaxPlasmaMtls/Materials/plPassMtlLayersPB.h"
-
-#include "../MaxExport/plExportProgressBar.h"
-
-#define PLMATERIALUPDATE_CLASS_ID Class_ID(0x70acddfe, 0x68f42f3f)
-
-#include