Browse Source

Get rid of refereces to obsolete PB

Branan Purvine-Riley 13 years ago
parent
commit
b9b72e060a
  1. 1
      Sources/Tools/MaxConvert/plLayerConverter.cpp
  2. 12
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp
  3. 3
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h
  4. 122
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp
  5. 68
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.h

1
Sources/Tools/MaxConvert/plLayerConverter.cpp

@ -101,7 +101,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h"
#include "MaxPlasmaMtls/Layers/plLayerTex.h"
#include "MaxPlasmaMtls/Layers/plLayerTexBasicPB.h"
#include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h"
#include "MaxPlasmaMtls/Layers/plStaticEnvLayer.h"
#include "MaxPlasmaMtls/Layers/plDynamicEnvLayer.h"

12
Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp

@ -69,10 +69,8 @@ ClassDesc2* GetLayerTexDesc() { return &plLayerTexDesc; }
ParamDlg* plLayerTex::fUVGenDlg = NULL;
// For initializing paramblock descriptor
//ParamBlockDesc2 *GetBasicBlk();
ParamBlockDesc2 *GetBitmapBlk();
//#include "plLayerTexBasicPB.cpp"
#include "plLayerTexBitmapPB.cpp"
void plLayerTex::GetClassName( TSTR &s )
@ -82,7 +80,6 @@ void plLayerTex::GetClassName( TSTR &s )
plLayerTex::plLayerTex() :
fBitmapPB(NULL),
//fBasicPB(NULL),
fUVGen(NULL),
fTexHandle(NULL),
fTexTime(0),
@ -95,7 +92,6 @@ plLayerTex::plLayerTex() :
if (!descInit)
{
descInit = true;
//GetBasicBlk()->SetClassDesc(GetLayerTexDesc());
GetBitmapBlk()->SetClassDesc(GetLayerTexDesc());
}
#endif
@ -159,7 +155,6 @@ Interval plLayerTex::Validity(TimeValue t)
// No warranty on this not being stupid.
Interval v = FOREVER;
fBitmapPB->GetValidity(t, v);
//fBasicPB->GetValidity(t, v);
v &= fUVGen->Validity(t);
return v;
}
@ -199,7 +194,6 @@ RefTargetHandle plLayerTex::GetReference(int i)
{
case kRefUVGen: return fUVGen;
case kRefBitmap: return fBitmapPB;
//case kRefBasic: return fBasicPB;
default: return NULL;
}
}
@ -235,7 +229,6 @@ IParamBlock2* plLayerTex::GetParamBlock(int i)
switch (i)
{
case 0: return fBitmapPB;
//case 1: return fBasicPB;
default: return NULL;
}
}
@ -244,8 +237,6 @@ IParamBlock2* plLayerTex::GetParamBlockByID(BlockID id)
{
if (fBitmapPB->ID() == id)
return fBitmapPB;
//else if (fBasicPB->ID() == id)
// return fBasicPB;
else
return NULL;
}
@ -255,7 +246,6 @@ RefTargetHandle plLayerTex::Clone(RemapDir &remap)
{
plLayerTex *mnew = TRACKED_NEW plLayerTex();
*((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff
//mnew->ReplaceReference(kRefBasic, remap.CloneRef(fBasicPB));
mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB));
mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen));
BaseClone(this, mnew, remap);
@ -274,7 +264,6 @@ Animatable* plLayerTex::SubAnim(int i)
{
case kRefUVGen: return fUVGen;
case kRefBitmap: return fBitmapPB;
//case kRefBasic: return fBasicPB;
default: return NULL;
}
}
@ -285,7 +274,6 @@ TSTR plLayerTex::SubAnimName(int i)
{
case kRefUVGen: return "UVGen";
case kRefBitmap: return fBitmapPB->GetLocalName();
//case kRefBasic: return fBasicPB->GetLocalName();
default: return "";
}
}

3
Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.h

@ -59,7 +59,6 @@ class plLayerTex : public plPlasmaMAXLayer
protected:
// Parameter block
IParamBlock2 *fBitmapPB;
IParamBlock2 *fBasicPB;
UVGen *fUVGen;
IMtlParams *fMtlParams;
@ -78,14 +77,12 @@ public:
enum
{
kRefUVGen,
kRefBasic, // DEAD, but left in for backwards compatability
kRefBitmap,
};
// Block ID's
enum
{
kBlkBasic, // DEAD
kBlkBitmap,
};

122
Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.cpp

@ -1,122 +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 <http://www.gnu.org/licenses/>.
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 "hsTypes.h"
#include "plLayerTex.h"
#include "plLayerTexBasicPB.h"
#include "../resource.h"
class BasicDlgProc;
extern BasicDlgProc gBasicDlgProc;
static ParamBlockDesc2 gBasicParamBlk
(
plLayerTex::kBlkBasic, _T("basicLayer"), 0, GetLayerTexDesc(),//NULL,
P_AUTO_CONSTRUCT + P_AUTO_UI, plLayerTex::kRefBasic,
// UI
IDD_LAYER_BASIC, IDS_LAYER_BASIC, 0, 0, &gBasicDlgProc,
// Usage
kBasicUsage, _T("usage"), TYPE_INT, 0, 0,
end,
end
);
ParamBlockDesc2 *GetBasicBlk() { return &gBasicParamBlk; }
static const char *kUsageTypes[] =
{
"None",
"Base Texture",
"Detail",
"Grime",
"Map Blend",
"Highlight/Specular",
"Alpha Mask",
"Shadow/Light Map",
"Helper Object",
"Best Guess"
};
class BasicDlgProc : public ParamMap2UserDlgProc
{
public:
virtual BOOL DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
IParamBlock2 *pb = map->GetParamBlock();
switch (msg)
{
case WM_INITDIALOG:
{
HWND hUsage = GetDlgItem(hWnd, IDC_USAGE_TYPE);
for (int i = 0; i < kUsageNumTypes; i++)
SendMessage(hUsage, CB_ADDSTRING, 0, (LPARAM)kUsageTypes[i]);
SendMessage(hUsage, CB_SETCURSEL, pb->GetInt(kBasicUsage), 0);
}
break;
case WM_COMMAND:
switch (HIWORD(wParam))
{
case CBN_SELCHANGE:
switch (LOWORD(wParam))
{
case IDC_USAGE_TYPE:
{
int cur = SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0);
if (LOWORD(wParam) == IDC_USAGE_TYPE)
pb->SetValue(kBasicUsage, t, cur);
return true;
}
break;
}
break;
}
break;
}
return false;
}
virtual void DeleteThis() {};
};
static BasicDlgProc gBasicDlgProc;

68
Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBasicPB.h

@ -1,68 +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 <http://www.gnu.org/licenses/>.
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 PL_LAYERTEXBASICPB_H
#define PL_LAYERTEXBASICPB_H
// Param ID's
enum
{
kBasicUsage,
};
// Usage types
enum
{
kUsageNone,
kUsageBase,
kUsageDetail,
kUsageGrime,
kUsageTransition,
kUsageHighlight,
kUsageAlphaMask,
kUsageShadowLight,
kUsageHelper,
kUsageGuess,
kUsageNumTypes
};
#endif //PL_LAYERTEXBASICPB_H
Loading…
Cancel
Save