TCHAR -> MCHAR

This commit is contained in:
rdb 2013-10-07 19:41:20 +00:00
parent d7c76b2bc3
commit 91f6b9503e
4 changed files with 22 additions and 22 deletions

View File

@ -279,12 +279,12 @@ class MaxEggPluginClassDesc : public ClassDesc
public:
int IsPublic() { return TRUE; }
void *Create(BOOL loading = FALSE) { return new MaxEggPlugin(); }
const TCHAR *ClassName() { return GetString(IDS_CLASS_NAME); }
const MCHAR *ClassName() { return GetString(IDS_CLASS_NAME); }
SClass_ID SuperClassID() { return HELPER_CLASS_ID; }
Class_ID ClassID() { return MaxEggPlugin_CLASS_ID; }
const TCHAR *Category() { return GetString(IDS_CATEGORY); }
const MCHAR *Category() { return GetString(IDS_CATEGORY); }
// returns fixed parsable name (scripter-visible name)
const TCHAR *InternalName() { return _T("MaxEggPlugin"); }
const MCHAR *InternalName() { return _M("MaxEggPlugin"); }
};
// Our private global instance of the above class
@ -821,7 +821,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
// This function returns a string that describes the DLL and where the user
// could purchase the DLL if they don't have it.
__declspec( dllexport ) const TCHAR* LibDescription()
__declspec( dllexport ) const MCHAR* LibDescription()
{
return GetString(IDS_LIBDESCRIPTION);
}
@ -850,9 +850,9 @@ __declspec( dllexport ) ULONG LibVersion()
return VERSION_3DSMAX;
}
TCHAR *GetString(int id)
MCHAR *GetString(int id)
{
static TCHAR buf[256];
static MCHAR buf[256];
if (hInstance)
return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;

View File

@ -75,7 +75,7 @@ extern HINSTANCE hInstance;
/* Global Functions
*/
extern TCHAR *GetString(int id);
extern MCHAR *GetString(int id);
/* This class defines the 3D Studio Max exporter itself. It is basically a
shell that is invoked by 3D Studio Max's export API. It then sets up
@ -132,11 +132,11 @@ class MaxEggPlugin : public HelperObject
CreateMouseCallBack* GetCreateMouseCallBack();
void BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev);
void EndEditParams( IObjParam *ip, ULONG flags,Animatable *next);
TCHAR *GetObjectName() { return GetString(IDS_LIBDESCRIPTION); }
MCHAR *GetObjectName() { return GetString(IDS_LIBDESCRIPTION); }
// From Object
ObjectState Eval(TimeValue time);
void InitNodeName(TSTR& s) { s = GetString(IDS_CLASS_NAME); }
void InitNodeName(MSTR& s) { s = GetString(IDS_CLASS_NAME); }
Interval ObjectValidity(TimeValue time);
void Invalidate();
int DoOwnSelectHilite() { return 1; }
@ -150,9 +150,9 @@ class MaxEggPlugin : public HelperObject
// Animatable methods
void DeleteThis() { delete this; }
Class_ID ClassID() { return MaxEggPlugin_CLASS_ID; }
void GetClassName(TSTR& s) { s = TSTR(GetString(IDS_CLASS_NAME)); }
TSTR SubAnimName(int i) { return TSTR(GetString(IDS_CLASS_NAME)); }
void GetClassName(MSTR& s) { s = MSTR(GetString(IDS_CLASS_NAME)); }
MSTR SubAnimName(int i) { return MSTR(GetString(IDS_CLASS_NAME)); }
// From ref
RefTargetHandle Clone(RemapDir& remap = DefaultRemapDir());

View File

@ -103,7 +103,7 @@ MaxEggTex *MaxEggLoader::GetTex(const string &fn)
return _tex_tab[fn];
BitmapTex *bmt = NewDefaultBitmapTex();
bmt->SetMapName((TCHAR*)(fn.c_str()));
bmt->SetMapName(_M(fn.c_str()));
StdMat *mat = NewDefaultStdMat();
mat->SetSubTexmap(ID_DI, bmt);
mat->SetTexmapAmt(ID_DI, 1.0, 0);
@ -275,7 +275,7 @@ void MaxEggJoint::CreateMaxBone(void)
_node->SetNodeTM(0, Matrix3(xv, yv, zv, pos));
IParamBlock2 *blk = _bone->pblock2;
for (int i=0; i<blk->NumParams(); i++) {
TSTR n = blk->GetLocalName(i);
MSTR n = blk->GetLocalName(i);
if (strcmp(n, "Length")==0) blk->SetValue(i,0,(PN_stdfloat)len);
else if (strcmp(n, "Width")==0) blk->SetValue(i,0,(PN_stdfloat)_thickness);
else if (strcmp(n, "Height")==0) blk->SetValue(i,0,(PN_stdfloat)_thickness);
@ -284,7 +284,7 @@ void MaxEggJoint::CreateMaxBone(void)
_node->SetWireColor(RGB(int(boneColor.x*255.0f), int(boneColor.y*255.0f), int(boneColor.z*255.0f) ));
_node->SetBoneNodeOnOff(TRUE, 0);
_node->SetRenderable(FALSE);
_node->SetName((TCHAR*)(_egg_joint->get_name().c_str()));
_node->SetName(_M(_egg_joint->get_name().c_str()));
_node->SetObjOffsetRot(ooquat);
if (_parent) {
_node->Detach(0, 1);
@ -454,7 +454,7 @@ MaxEggMesh *MaxEggLoader::GetMesh(EggVertexPool *pool)
result->_tvert_count = 0;
result->_cvert_count = 0;
result->_face_count = 0;
result->_node->SetName((TCHAR*)(name.c_str()));
result->_node->SetName(_M(name.c_str()));
_mesh_tab[pool] = result;
}
return result;
@ -672,7 +672,7 @@ bool MaxEggLoader::ConvertEggData(EggData *data, bool merge, bool model, bool an
}
if (_next_tex) {
TSTR name;
MSTR name;
MultiMtl *mtl = NewDefaultMultiMtl();
mtl->SetNumSubMtls(_next_tex);
for (ti = _tex_tab.begin(); ti != _tex_tab.end(); ++ti) {

View File

@ -164,8 +164,8 @@ public:
AddNodeCB (MaxOptionsDialog *instance, HWND wnd) :
ph(instance), hWnd(wnd) {}
virtual TCHAR *dialogTitle() {return _T("Objects to Export");}
virtual TCHAR *buttonText() {return _T("Select");}
virtual MCHAR *dialogTitle() {return _M("Objects to Export");}
virtual MCHAR *buttonText() {return _M("Select");}
virtual int filter(INode *node);
virtual void proc(INodeTab &nodeTab);
};
@ -217,8 +217,8 @@ public:
RemoveNodeCB (MaxOptionsDialog *instance, HWND wnd) :
ph(instance), hWnd(wnd) {}
virtual TCHAR *dialogTitle() {return _T("Objects to Remove");}
virtual TCHAR *buttonText() {return _T("Remove");}
virtual MCHAR *dialogTitle() {return _M("Objects to Remove");}
virtual MCHAR *buttonText() {return _M("Remove");}
virtual int filter(INode *node) {return (node && ph->FindNode(node->GetHandle()));}
virtual void proc(INodeTab &nodeTab);
};
@ -511,7 +511,7 @@ void MaxOptionsDialog::RefreshNodeList(HWND hWnd) {
SendMessage(nodeLB, LB_RESETCONTENT, 0, 0);
for (int i = 0; i < _node_list.size(); i++) {
INode *temp = _max_interface->GetINodeByHandle(_node_list[i]);
TCHAR *name = _T("Unknown Node");
MCHAR *name = _M("Unknown Node");
if (temp) name = temp->GetName();
SendMessage(nodeLB, LB_ADDSTRING, 0, (LPARAM)name);
}