Fixed: 3dsmax plugins compilation (64 bits and STLport)
This commit is contained in:
parent
ca710cdac4
commit
aceaccc3c0
33 changed files with 138 additions and 123 deletions
|
@ -14,6 +14,7 @@
|
|||
#ifndef __PLUGIN_MAX__H
|
||||
#define __PLUGIN_MAX__H
|
||||
|
||||
#include <assert.h>
|
||||
#include "Max.h"
|
||||
#include <Max.h>
|
||||
#include <istdplug.h>
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// From MAXSDK
|
||||
#include <MaxScrpt/maxscrpt.h>
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#define EXPORT_GET_ALLOCATOR
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// Various MAX and MXS includes
|
||||
#include <MaxScrpt/MAXScrpt.h>
|
||||
#include <MaxScrpt/3dmath.h>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
// Insert your headers here
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <assert.h>
|
||||
#include <max.h>
|
||||
#include <iparamb2.h>
|
||||
#include <istdplug.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "..\nel_patch_lib\rpo.h"
|
||||
#include "../nel_patch_lib/rpo.h"
|
||||
#include "nel_3dsmax_shared.h"
|
||||
#include "nel/misc/app_context.h"
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void *CNelExportClassDesc::Create(BOOL loading)
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK OptionsDialogCallback (
|
||||
INT_PTR CALLBACK OptionsDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
|
@ -217,7 +217,7 @@ int CALLBACK OptionsDialogCallback (
|
|||
}
|
||||
|
||||
extern HINSTANCE hInstance;
|
||||
static BOOL CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// Set locale to english
|
||||
setlocale (LC_NUMERIC, "English");
|
||||
|
|
|
@ -309,22 +309,22 @@ public:
|
|||
HWND SubVPDlg[VP_COUNT];
|
||||
};
|
||||
|
||||
int CALLBACK MRMDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK AccelDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK InstanceDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK LightmapDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK Lightmap2DialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK VegetableDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK VertexProgramDialogCallBack (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK MiscDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK AnimationDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK MRMDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK AccelDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK InstanceDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK LightmapDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK Lightmap2DialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VegetableDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VertexProgramDialogCallBack (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK MiscDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK AnimationDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
const char *SubText[TAB_COUNT] = {"LOD & MRM", "Accelerator", "Instance", "Lighting", "LMC", "Vegetable", "VertexProgram", "Misc", "Animation"};
|
||||
const int SubTab[TAB_COUNT] = {IDD_LOD, IDD_ACCEL, IDD_INSTANCE, IDD_LIGHTMAP, IDD_LIGHTMAP2, IDD_VEGETABLE, IDD_VERTEX_PROGRAM, IDD_MISC, IDD_ANIM};
|
||||
DLGPROC SubProc[TAB_COUNT] = {MRMDialogCallback, AccelDialogCallback, InstanceDialogCallback, LightmapDialogCallback, Lightmap2DialogCallback, VegetableDialogCallback, VertexProgramDialogCallBack, MiscDialogCallback, AnimationDialogCallback};
|
||||
|
||||
// VertexPrograms.
|
||||
int CALLBACK VPWindTreeCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VPWindTreeCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
const int SubVPTab[VP_COUNT] = {IDD_VP_WINDTREE};
|
||||
DLGPROC SubVPProc[VP_COUNT] = {VPWindTreeCallback};
|
||||
|
||||
|
@ -417,7 +417,7 @@ void VegetableStateChanged (HWND hwndDlg)
|
|||
|
||||
void AccelStateChanged (HWND hwndDlg)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
bool cluster = (currentParam->AcceleratorType&NEL3D_APPDATA_ACCEL_TYPE) == NEL3D_APPDATA_ACCEL_CLUSTER;
|
||||
bool portal = (currentParam->AcceleratorType&NEL3D_APPDATA_ACCEL_TYPE) == NEL3D_APPDATA_ACCEL_PORTAL;
|
||||
|
@ -464,22 +464,22 @@ void exploreNode(INode *node)
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK AccelDialogCallback (
|
||||
INT_PTR CALLBACK AccelDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Fill the known sound groups by parsing the max node tree.
|
||||
{
|
||||
|
@ -635,22 +635,22 @@ int CALLBACK AccelDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK MRMDialogCallback (
|
||||
INT_PTR CALLBACK MRMDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Window text
|
||||
std::string winName=(*(currentParam->ListNode->begin()))->GetName();
|
||||
|
@ -903,22 +903,22 @@ int CALLBACK MRMDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK InstanceDialogCallback (
|
||||
INT_PTR CALLBACK InstanceDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_INSTANCE_GROUP_SHAPE), currentParam->InstanceShape.c_str());
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_INSTANCE_NAME), currentParam->InstanceName.c_str());
|
||||
|
@ -1019,22 +1019,22 @@ int CALLBACK InstanceDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LightmapDialogCallback (
|
||||
INT_PTR CALLBACK LightmapDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_LUMELSIZEMUL), currentParam->LumelSizeMul.c_str());
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_SOFTSHADOW_RADIUS), currentParam->SoftShadowRadius.c_str());
|
||||
|
@ -1298,14 +1298,14 @@ struct CLMCParamFrom
|
|||
};
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LMCCopyFromDialogCallback(
|
||||
INT_PTR CALLBACK LMCCopyFromDialogCallback(
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLMCParamFrom *lmcParam=(CLMCParamFrom *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLMCParamFrom *lmcParam=(CLMCParamFrom *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
uint i;
|
||||
|
||||
switch (uMsg)
|
||||
|
@ -1313,8 +1313,8 @@ int CALLBACK LMCCopyFromDialogCallback(
|
|||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
lmcParam=(CLMCParamFrom *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
lmcParam=(CLMCParamFrom *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// init the colors
|
||||
nlctassert(CLodDialogBoxParam::NumLightGroup==3);
|
||||
|
@ -1519,22 +1519,22 @@ void lmcCopyFrom(CLodDialogBoxParam *currentParam, HWND parentDlg)
|
|||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK Lightmap2DialogCallback (
|
||||
INT_PTR CALLBACK Lightmap2DialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// retrieve the color choosing Ctrl
|
||||
nlctassert(CLodDialogBoxParam::NumLightGroup==3);
|
||||
|
@ -1642,22 +1642,22 @@ int CALLBACK Lightmap2DialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK VegetableDialogCallback (
|
||||
INT_PTR CALLBACK VegetableDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_VEGETABLE), BM_SETCHECK, currentParam->Vegetable, 0);
|
||||
|
||||
|
@ -1762,22 +1762,22 @@ int CALLBACK VegetableDialogCallback (
|
|||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK VertexProgramDialogCallBack (
|
||||
INT_PTR CALLBACK VertexProgramDialogCallBack (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// test wether v.p are bypassed for that object (this may happen when a v.p is needed by a material of this mesh)
|
||||
if (!currentParam->VertexProgramBypassed)
|
||||
|
@ -2028,22 +2028,22 @@ static void updateVPWTStaticForControl(HWND hwndDlg, HWND ctrlWnd, CVPWindTreeAp
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK VPWindTreeCallback (
|
||||
INT_PTR CALLBACK VPWindTreeCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Init controls
|
||||
CVPWindTreeAppData &vpwt= currentParam->VertexProgramWindTree;
|
||||
|
@ -2266,22 +2266,22 @@ int CALLBACK VPWindTreeCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK MiscDialogCallback (
|
||||
INT_PTR CALLBACK MiscDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_FLOATING_OBJECT), BM_SETCHECK, currentParam->FloatingObject, 0);
|
||||
|
||||
// Ligoscape
|
||||
|
@ -2399,22 +2399,22 @@ int CALLBACK MiscDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK AnimationDialogCallback (
|
||||
INT_PTR CALLBACK AnimationDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_NOTE_TRACK), BM_SETCHECK, currentParam->ExportNoteTrack, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_SSS_TRACK), BM_SETCHECK, currentParam->ExportSSSTrack, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_ANIMATED_MATERIALS), BM_SETCHECK, currentParam->ExportAnimatedMaterials, 0);
|
||||
|
@ -2468,22 +2468,22 @@ int CALLBACK AnimationDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LodDialogCallback (
|
||||
INT_PTR CALLBACK LodDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Window text
|
||||
std::string winName=(*(currentParam->ListNode->begin()))->GetName();
|
||||
|
@ -2602,7 +2602,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
|||
{
|
||||
|
||||
// Get
|
||||
uint nNumSelNode=listNode.size();
|
||||
uint nNumSelNode=(uint)listNode.size();
|
||||
|
||||
if (nNumSelNode)
|
||||
{
|
||||
|
@ -3220,7 +3220,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
|||
if (param.ListActived)
|
||||
{
|
||||
// Write size of the list
|
||||
uint sizeList=std::min (param.ListLodName.size(), (uint)NEL3D_APPDATA_LOD_NAME_COUNT_MAX);
|
||||
uint sizeList=std::min ((uint)param.ListLodName.size(), (uint)NEL3D_APPDATA_LOD_NAME_COUNT_MAX);
|
||||
CExportNel::setScriptAppData (node, NEL3D_APPDATA_LOD_NAME_COUNT, (int)sizeList);
|
||||
|
||||
// Write the strings
|
||||
|
|
|
@ -26,7 +26,7 @@ using namespace NLMISC;
|
|||
// -----------------------------------------------------------------------------------------------
|
||||
// Window dialog callback
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
int CALLBACK CalculatingDialogCallback (
|
||||
INT_PTR CALLBACK CalculatingDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
|
@ -34,14 +34,14 @@ int CALLBACK CalculatingDialogCallback (
|
|||
)
|
||||
{
|
||||
double TimeCurrent = CTime::ticksToSecond( CTime::getPerformanceTime() );
|
||||
CProgressBar *pClass = (CProgressBar*)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
CProgressBar *pClass = (CProgressBar*)GetWindowLongPtr (hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
pClass = (CProgressBar*)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
LONG res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
pClass = (CProgressBar*)GetWindowLongPtr (hwndDlg, GWLP_USERDATA);
|
||||
|
||||
CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() );
|
||||
ShowWindow( hwndDlg, SW_SHOWNORMAL );
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <assert.h>
|
||||
#include <windows.h>
|
||||
#include <locale.h>
|
||||
#include <windowsx.h>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
//#include "nel/misc/types_nl.h"
|
||||
// Max SDK includes
|
||||
//#define NOMINMAX
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <max.h>
|
||||
#include <stdmat.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#ifndef __PMESH2RKLPMESH__H
|
||||
#define __PMESH2RKLPMESH__H
|
||||
|
||||
#include <assert.h>
|
||||
#include "Max.h"
|
||||
#include "resource.h"
|
||||
#include "istdplug.h"
|
||||
|
|
|
@ -121,7 +121,7 @@ void PO2RPO::ModifyObject(TimeValue t, ModContext &mc, ObjectState * os, INode *
|
|||
|
||||
// -----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern HINSTANCE hInstance;
|
||||
BOOL CALLBACK DlgProc_Panel(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK DlgProc_Panel(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include <assert.h>
|
||||
#include <MaxScrpt/maxscrpt.h>
|
||||
#include <MaxScrpt/3dmath.h>
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ void EditPatchMod::NewSetByOperator(TSTR &newName, Tab < int> &sets, int op)
|
|||
|
||||
// Named selection set copy/paste methods follow...
|
||||
|
||||
static BOOL CALLBACK PickSetNameDlgProc(
|
||||
static INT_PTR CALLBACK PickSetNameDlgProc(
|
||||
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static TSTR *name;
|
||||
|
@ -328,7 +328,7 @@ BOOL EditPatchMod::GetUniqueSetName(TSTR &name)
|
|||
|
||||
|
||||
|
||||
static BOOL CALLBACK PickSetDlgProc(
|
||||
static INT_PTR CALLBACK PickSetDlgProc(
|
||||
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg)
|
||||
|
|
|
@ -50,7 +50,7 @@ EPTempData::EPTempData(EditPatchMod *m,EditPatchData *pd)
|
|||
mod = m;
|
||||
}
|
||||
|
||||
void EPTempData::Invalidate(DWORD part,BOOL patchValid)
|
||||
void EPTempData::Invalidate(PartID part,BOOL patchValid)
|
||||
{
|
||||
if ( !patchValid )
|
||||
{
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#define PROMPT_TIME 2000
|
||||
|
||||
BOOL CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern void ChangePatchType(PatchMesh *patch, int index, int type);
|
||||
extern BOOL filterVerts;
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -15,7 +15,7 @@ extern int sbmParams[4];
|
|||
extern DWORD sbsParams[3];
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK SelectByMatDlgProc(
|
||||
INT_PTR CALLBACK SelectByMatDlgProc(
|
||||
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int *param;
|
||||
|
@ -84,7 +84,7 @@ void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static DWORD *param;
|
||||
switch (msg)
|
||||
|
@ -137,9 +137,9 @@ BOOL CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -150,7 +150,7 @@ BOOL CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
ep =(EditPatchMod *)lParam;
|
||||
ep->hTilePanel = hDlg;
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
ep->tileNum = SetupIntSpinner(hDlg, IDC_TILE_MAT_SPIN, IDC_TILE_MAT, 0, 65535, 0);
|
||||
ep->tileRot = SetupIntSpinner(hDlg, IDC_TILE_ROT_SPIN, IDC_TILE_ROT, 0, 3, 0);
|
||||
ep->SetTileDlgEnables();
|
||||
|
@ -249,9 +249,9 @@ BOOL CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -262,7 +262,7 @@ BOOL CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
ep =(EditPatchMod *)lParam;
|
||||
ep->hEdgePanel = hDlg;
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
ep->SetEdgeDlgEnables();
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -324,9 +324,9 @@ BOOL CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -339,7 +339,7 @@ BOOL CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
||||
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
ep->matSpin = SetupIntSpinner(hDlg, IDC_MAT_IDSPIN, IDC_MAT_ID, 1, MAX_MATID, 0);
|
||||
ep->tessUSpin = SetupIntSpinner(hDlg, IDC_TESS_U_SPIN, IDC_TESS_U2, 1, 4, RPO_DEFAULT_TESSEL);
|
||||
ep->tessVSpin = SetupIntSpinner(hDlg, IDC_TESS_V_SPIN, IDC_TESS_V2, 1, 4, RPO_DEFAULT_TESSEL);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define PROMPT_TIME 2000
|
||||
|
||||
extern AdvParams sParams;
|
||||
BOOL CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -212,7 +212,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
|||
|
||||
BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -223,7 +223,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
|
||||
ep =(EditPatchMod *)lParam;
|
||||
ep->hSurfPanel = hDlg;
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG)ep);
|
||||
if (!ep->settingViewportTess && ep->settingDisp && ep->GetProdTess().type == TESS_SET)
|
||||
ep->settingDisp = FALSE;
|
||||
TessApprox t;
|
||||
|
@ -599,7 +599,7 @@ static ISpinnerControl* psMaxTrisSpin = NULL;
|
|||
// this max matches the MI max.
|
||||
#define MAX_SUBDIV 7
|
||||
static BOOL initing = FALSE; // this is a hack but CenterWindow causes bad commands
|
||||
BOOL CALLBACK
|
||||
INT_PTR CALLBACK
|
||||
AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
#define PROMPT_TIME 2000
|
||||
|
||||
BOOL CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
extern void CancelEditPatchModes(IObjParam *ip);
|
||||
|
||||
|
|
|
@ -96,12 +96,12 @@ __declspec( dllexport ) ULONG CanAutoDefer()
|
|||
|
||||
BOOL CALLBACK DefaultSOTProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
IObjParam *ip = (IObjParam*)GetWindowLong(hWnd,GWL_USERDATA);
|
||||
IObjParam *ip = (IObjParam*)GetWindowLongPtr(hWnd,GWLP_USERDATA);
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
SetWindowLong(hWnd,GWL_USERDATA,lParam);
|
||||
SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
|
|
|
@ -33,10 +33,10 @@ extern void CancelEditPatchModes(IObjParam *ip);
|
|||
|
||||
extern void LoadImages();
|
||||
|
||||
BOOL CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static char string[64];
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
ICustToolbar *iToolbar;
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
@ -104,7 +104,7 @@ BOOL CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
|
||||
ep =(EditPatchMod *)lParam;
|
||||
ep->hSelectPanel = hDlg;
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
// Set up the editing level selector
|
||||
LoadImages();
|
||||
iToolbar = GetICustToolbar(GetDlgItem(hDlg, IDC_SELTYPE));
|
||||
|
@ -349,9 +349,9 @@ void EditPatchMod::SetOpsDlgEnables()
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -367,7 +367,7 @@ BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
|
|||
ep->hOpsPanel = hDlg;
|
||||
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
||||
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
ICustButton *but = GetICustButton(GetDlgItem(hDlg, IDC_ATTACH));
|
||||
but->SetHighlightColor(GREEN_WASH);
|
||||
but->SetType(CBT_CHECK);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma warning (disable : 4786)
|
||||
#include <assert.h>
|
||||
#include <max.h>
|
||||
#include <decomp.h>
|
||||
#include <buildver.h>
|
||||
|
|
|
@ -521,7 +521,7 @@ public:
|
|||
// Get map hit size
|
||||
uint getMapHitSize () const
|
||||
{
|
||||
return _Data._MapHitToTileIndex->size ();
|
||||
return (uint)_Data._MapHitToTileIndex->size ();
|
||||
}
|
||||
|
||||
// Remap a triangle
|
||||
|
@ -534,7 +534,7 @@ public:
|
|||
// Get the patch user info size
|
||||
uint getUIPatchSize () const
|
||||
{
|
||||
return _Data._UIPatch->size();
|
||||
return (uint)_Data._UIPatch->size();
|
||||
}
|
||||
|
||||
// Get a patch user info
|
||||
|
@ -558,7 +558,7 @@ public:
|
|||
// Get vertex user info size
|
||||
uint getUIVertexSize () const
|
||||
{
|
||||
return _Data._UIVertex->size();
|
||||
return (uint)_Data._UIVertex->size();
|
||||
}
|
||||
|
||||
// Get a vertex user info
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#pragma warning (disable : 4786)
|
||||
#include <assert.h>
|
||||
#include <Max.h>
|
||||
#include <istdplug.h>
|
||||
#include <meshadj.h>
|
||||
|
|
|
@ -112,11 +112,11 @@ __declspec( dllexport ) ULONG CanAutoDefer()
|
|||
BOOL CALLBACK DefaultSOTProc(
|
||||
HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
IObjParam *ip = (IObjParam*)GetWindowLong(hWnd,GWL_USERDATA);
|
||||
IObjParam *ip = (IObjParam*)GetWindowLongPtr(hWnd,GWLP_USERDATA);
|
||||
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
SetWindowLong(hWnd,GWL_USERDATA,lParam);
|
||||
SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
extern void CancelEditPatchModes(IObjParam *ip);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ EPTempData::EPTempData(PaintPatchMod *m,PaintPatchData *pd)
|
|||
mod = m;
|
||||
}
|
||||
|
||||
void EPTempData::Invalidate(DWORD part,BOOL patchValid)
|
||||
void EPTempData::Invalidate(PartID part,BOOL patchValid)
|
||||
{
|
||||
if ( !patchValid )
|
||||
{
|
||||
|
|
|
@ -44,9 +44,9 @@ void PaintPatchMod::SetOpsDlgEnables()
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PaintPatchMod *ep =(PaintPatchMod *)GetWindowLong(hDlg, GWL_USERDATA);
|
||||
PaintPatchMod *ep =(PaintPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
if (!ep && message != WM_INITDIALOG)
|
||||
return FALSE;
|
||||
|
||||
|
@ -57,7 +57,7 @@ BOOL CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
|
|||
ep =(PaintPatchMod *)lParam;
|
||||
ep->hOpsPanel = hDlg;
|
||||
|
||||
SetWindowLong(hDlg, GWL_USERDATA, (LONG)ep);
|
||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||
|
||||
CheckDlgButton(hDlg, IDC_INCLUDE_MESHES, ep->includeMeshes);
|
||||
CheckDlgButton(hDlg, IDC_PRELOAD_TILES, ep->preloadTiles);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma warning (disable : 4786)
|
||||
|
||||
// max.h include uses min/max in 3dsmax 2010 sdk
|
||||
#include <assert.h>
|
||||
#include "Max.h"
|
||||
#ifdef min
|
||||
# undef min
|
||||
|
|
|
@ -49,11 +49,11 @@ class VertexPaintClassDesc:public ClassDesc {
|
|||
static VertexPaintClassDesc VertexPaintDesc;
|
||||
ClassDesc* GetVertexPaintDesc() {return &VertexPaintDesc;}
|
||||
|
||||
static BOOL CALLBACK VertexPaintDlgProc(
|
||||
static INT_PTR CALLBACK VertexPaintDlgProc(
|
||||
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int numPoints;
|
||||
VertexPaint *mod = (VertexPaint*)GetWindowLong(hWnd,GWL_USERDATA);
|
||||
VertexPaint *mod = (VertexPaint*)GetWindowLongPtr(hWnd,GWLP_USERDATA);
|
||||
if (!mod && msg!=WM_INITDIALOG) return FALSE;
|
||||
int comboResult;
|
||||
|
||||
|
@ -86,7 +86,7 @@ static BOOL CALLBACK VertexPaintDlgProc(
|
|||
case WM_INITDIALOG:
|
||||
LoadImages();
|
||||
mod = (VertexPaint*)lParam;
|
||||
SetWindowLong(hWnd,GWL_USERDATA,lParam);
|
||||
SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);
|
||||
mod->hParams = hWnd;
|
||||
mod->iPaintButton = GetICustButton(GetDlgItem(hWnd, IDC_PAINT));
|
||||
mod->iPaintButton->SetType(CBT_CHECK);
|
||||
|
@ -217,14 +217,14 @@ LRESULT APIENTRY colorSwatchSubclassWndProc(
|
|||
case WM_LBUTTONUP:
|
||||
case WM_LBUTTONDBLCLK: {
|
||||
HWND hPanel = GetParent(hwnd);
|
||||
LONG mod = GetWindowLong(hPanel,GWL_USERDATA);
|
||||
LONG mod = GetWindowLongPtr(hPanel,GWLP_USERDATA);
|
||||
if (mod) {
|
||||
((VertexPaint*)mod)->PaletteButton(hwnd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
SetWindowLong(hwnd, GWL_WNDPROC, (LONG) colorSwatchOriginalWndProc);
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) colorSwatchOriginalWndProc);
|
||||
// Fallthrough...
|
||||
default:
|
||||
return CallWindowProc(colorSwatchOriginalWndProc, hwnd, uMsg, wParam, lParam);
|
||||
|
@ -419,13 +419,13 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
|
|||
|
||||
int i;
|
||||
for (i=0; i<NUMPALETTES; i++) {
|
||||
colorSwatchOriginalWndProc = (WNDPROC) SetWindowLong(hPaletteWnd[i], GWL_WNDPROC, (LONG) colorSwatchSubclassWndProc);
|
||||
colorSwatchOriginalWndProc = (WNDPROC) SetWindowLongPtr(hPaletteWnd[i], GWLP_WNDPROC, (LONG_PTR) colorSwatchSubclassWndProc);
|
||||
}
|
||||
|
||||
SendMessage(hParams, WM_POSTINIT, 0, 0);
|
||||
}
|
||||
else {
|
||||
SetWindowLong(hParams,GWL_USERDATA,(LONG)this);
|
||||
SetWindowLongPtr(hParams,GWLP_USERDATA,(LONG_PTR)this);
|
||||
}
|
||||
|
||||
iTint = SetupIntSpinner (hParams, IDC_TINT_SPIN, IDC_TINT, 0, 100, (int) (fTint*100.0f));
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#ifndef __VERTEXPAINT__H
|
||||
#define __VERTEXPAINT__H
|
||||
|
||||
#include <assert.h>
|
||||
#include "Max.h"
|
||||
#include "resource.h"
|
||||
#include "istdplug.h"
|
||||
|
@ -101,7 +102,7 @@ public:
|
|||
class VertexPaint : public Modifier {
|
||||
|
||||
friend class PaintMouseProc;
|
||||
friend BOOL CALLBACK VertexPaintDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
friend INT_PTR CALLBACK VertexPaintDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
public:
|
||||
|
||||
static IObjParam* ip;
|
||||
|
|
|
@ -83,7 +83,7 @@ class Tile_utilityClassDesc:public ClassDesc2
|
|||
static Tile_utilityClassDesc Tile_utilityDesc;
|
||||
ClassDesc2* GetTile_utilityDesc() {return &Tile_utilityDesc;}
|
||||
|
||||
static BOOL CALLBACK Tile_utilityDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK Tile_utilityDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include <assert.h>
|
||||
#include <Max.h>
|
||||
#include <istdplug.h>
|
||||
#include <iparamb2.h>
|
||||
|
|
Loading…
Reference in a new issue