mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 20:59:09 +00:00
Merge pull request #406 from Deledrius/Max7_VS12
Fix compilation of Max 7 plugin in VisualStudio 12
This commit is contained in:
@ -100,6 +100,12 @@ option(PLASMA_BUILD_RESOURCE_DAT "Do we want to build resource.dat?" ON)
|
||||
option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON)
|
||||
option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON)
|
||||
|
||||
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF)
|
||||
if(3dsm_BUILD_PLUGIN)
|
||||
find_package(MaxSDK REQUIRED)
|
||||
add_definitions(-DBUILDING_MAXPLUGIN)
|
||||
endif(3dsm_BUILD_PLUGIN)
|
||||
|
||||
option(USE_VLD "Build and link with Visual Leak Detector (MSVC only)" OFF)
|
||||
if(USE_VLD)
|
||||
add_definitions(-DUSE_VLD)
|
||||
|
@ -8,12 +8,7 @@ if(PLASMA_BUILD_TOOLS)
|
||||
endif()
|
||||
|
||||
# Max Stuff goes below here...
|
||||
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF)
|
||||
if(3dsm_BUILD_PLUGIN)
|
||||
find_package(MaxSDK REQUIRED)
|
||||
add_definitions(-DBUILDING_MAXPLUGIN)
|
||||
add_definitions(-DMAXPLUGINCODE)
|
||||
|
||||
add_subdirectory(MaxComponent)
|
||||
add_subdirectory(MaxConvert)
|
||||
add_subdirectory(MaxExport)
|
||||
|
@ -362,7 +362,7 @@ static void LoadCombo(HWND hCombo, NameType* nameInt, int size, int curVal)
|
||||
void plStandardStage::IInitDlg()
|
||||
{
|
||||
ICustEdit* edit = GetICustEdit(GetDlgItem(fDlg, IDC_ANIM_NAME));
|
||||
edit->SetText(fAnimName.c_str());
|
||||
edit->SetText(const_cast<SETTEXT_VALUE_TYPE>(fAnimName.c_str()));
|
||||
|
||||
HWND hForward = GetDlgItem(fDlg, IDC_FORWARD_COMBO);
|
||||
LoadCombo(hForward, gForward, sizeof(gForward), fForward);
|
||||
|
@ -92,7 +92,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <modstack.h>
|
||||
#include <notify.h>
|
||||
#include <stdmat.h>
|
||||
#include <texutil.h>
|
||||
|
||||
// MaxComponent
|
||||
#include "MaxComponent/plComponent.h"
|
||||
|
@ -53,7 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <stdmat.h>
|
||||
#include <bmmlib.h>
|
||||
#include <istdplug.h>
|
||||
#include <texutil.h>
|
||||
#include <iparamb2.h>
|
||||
#include <modstack.h>
|
||||
#include <keyreduc.h>
|
||||
|
@ -57,7 +57,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <istdplug.h>
|
||||
#include <pbbitmap.h>
|
||||
#include <stdmat.h>
|
||||
#include <texutil.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "hsMaterialConverter.h"
|
||||
|
@ -86,8 +86,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 10 // Max 2008
|
||||
# define GETNAME_RETURN_TYPE TCHAR*
|
||||
# define SETTEXT_VALUE_TYPE MCHAR*
|
||||
#else
|
||||
# define GETNAME_RETURN_TYPE const TCHAR*
|
||||
# define SETTEXT_VALUE_TYPE const MCHAR*
|
||||
#endif
|
||||
|
||||
// Old versions of Max define this as an integer, not a Class_ID
|
||||
|
@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
class ActionCallback;
|
||||
struct ActionDescription;
|
||||
struct NotifyInfo;
|
||||
|
||||
typedef bool(*ActionCallbackFunc)(int);
|
||||
|
||||
|
@ -44,14 +44,6 @@ 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
|
||||
{
|
||||
protected:
|
||||
|
@ -68,7 +68,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <notetrck.h>
|
||||
#include <notify.h>
|
||||
#include <stdmat.h>
|
||||
#include <texutil.h>
|
||||
#include <triobj.h>
|
||||
|
||||
// MaxMain
|
||||
|
@ -45,7 +45,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include <bmmlib.h>
|
||||
#include <max.h>
|
||||
#include <texutil.h>
|
||||
#include <iparamb2.h>
|
||||
#pragma hdrstop
|
||||
|
||||
@ -105,9 +104,9 @@ AColor plBMSampler::Sample(ShadeContext& sc, float u,float v)
|
||||
|
||||
BMM_Color_64 c;
|
||||
int x,y;
|
||||
float fu,fv;
|
||||
fu = frac(u);
|
||||
fv = 1.0f-frac(v);
|
||||
float fu,fv, intpart;
|
||||
fu = modf(u, &intpart);
|
||||
fv = 1.0f - modf(v, &intpart);
|
||||
if (fData.fEnableCrop)
|
||||
{
|
||||
if (fData.fCropPlacement)
|
||||
@ -119,8 +118,8 @@ AColor plBMSampler::Sample(ShadeContext& sc, float u,float v)
|
||||
}
|
||||
else
|
||||
{
|
||||
x = mod(clipx + (int)(fu*fclipw+0.5f),bmw);
|
||||
y = mod(clipy + (int)(fv*fcliph+0.5f),bmh);
|
||||
x = clipx + static_cast<int>(fu * fclipw + 0.5f) % bmw;
|
||||
y = clipy + static_cast<int>(fv * fcliph + 0.5f) % bmh;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -156,9 +155,9 @@ AColor plBMSampler::SampleFilter(ShadeContext& sc, float u,float v, float du, fl
|
||||
fBM->SetFilter(BMM_FILTER_PYRAMID);
|
||||
|
||||
BMM_Color_64 c;
|
||||
float fu,fv;
|
||||
fu = frac(u);
|
||||
fv = 1.0f-frac(v);
|
||||
float fu, fv, intpart;
|
||||
fu = modf(u, &intpart);
|
||||
fv = 1.0f - modf(v, &intpart);
|
||||
if (fData.fEnableCrop)
|
||||
{
|
||||
if (fData.fCropPlacement)
|
||||
|
Reference in New Issue
Block a user