mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 14:56:13 +00:00
Changed: Use _T macro and TCHAR to support UNICODE
This commit is contained in:
parent
888b27f87a
commit
079e7bdc6b
9 changed files with 35 additions and 41 deletions
|
@ -3667,8 +3667,8 @@ float CObjectViewer::getGlobalWindPower() const
|
||||||
|
|
||||||
void CObjectViewer::shootScene()
|
void CObjectViewer::shootScene()
|
||||||
{
|
{
|
||||||
static const char BASED_CODE szFilter[] = "Targa Files (*.tga)|*.tga|Jpeg Files (*.jpg)|*.jpg|All Files (*.*)|*.*||";
|
static const TCHAR BASED_CODE szFilter[] = _T("PNG Files (*.png)|*.png|Targa Files (*.tga)|*.tga|Jpeg Files (*.jpg)|*.jpg|All Files (*.*)|*.*||");
|
||||||
CFileDialog fileDlg ( FALSE, ".tga", "*.tga", OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
CFileDialog fileDlg ( FALSE, _T(".tga"), _T("*.tga"), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
||||||
if (fileDlg.DoModal () == IDOK)
|
if (fileDlg.DoModal () == IDOK)
|
||||||
{
|
{
|
||||||
// Choose the size
|
// Choose the size
|
||||||
|
|
|
@ -216,8 +216,8 @@ void CSoundAnimView::save()
|
||||||
filename.append(anim->getName()).append(".sound_anim");
|
filename.append(anim->getName()).append(".sound_anim");
|
||||||
|
|
||||||
// Create a dialog
|
// Create a dialog
|
||||||
char BASED_CODE szFilter[] = "NeL Sound Animations (*.sound_anim)|*.sound_anim|All Files (*.*)|*.*||";
|
TCHAR BASED_CODE szFilter[] = _T("NeL Sound Animations (*.sound_anim)|*.sound_anim|All Files (*.*)|*.*||");
|
||||||
CFileDialog fileDlg( FALSE, ".sound_anim", filename.c_str(), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
CFileDialog fileDlg( FALSE, _T(".sound_anim"), utf8ToTStr(filename), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
||||||
|
|
||||||
if (fileDlg.DoModal() == IDOK)
|
if (fileDlg.DoModal() == IDOK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -364,7 +364,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// Error message
|
// Error message
|
||||||
char sErrorMsg[512];
|
char sErrorMsg[512];
|
||||||
sprintf (sErrorMsg, "Error exporting the vegetable %s in the file\n%s", pNode->GetName(), sSavePath);
|
sprintf (sErrorMsg, "Error exporting the vegetable %s in the file\n%s", pNode->GetName(), sSavePath);
|
||||||
MessageBox (hWnd, sErrorMsg, "NeL export", MB_OK|MB_ICONEXCLAMATION);
|
MessageBox (hWnd, sErrorMsg, _T("NeL export"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ class PO2RPO : public Modifier {
|
||||||
HWND hRollup;
|
HWND hRollup;
|
||||||
|
|
||||||
// From Animatable
|
// From Animatable
|
||||||
TCHAR *GetObjectName() { return GetString(IDS_CLASS_NAME); }
|
MCHAR *GetObjectName() { return GetString(IDS_CLASS_NAME); }
|
||||||
|
|
||||||
//From Modifier
|
//From Modifier
|
||||||
//TODO: Add the channels that the modifier needs to perform its modification
|
//TODO: Add the channels that the modifier needs to perform its modification
|
||||||
|
|
|
@ -83,14 +83,14 @@ class RPO : public PatchObject
|
||||||
int HitTest(TimeValue t, INode* inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt);
|
int HitTest(TimeValue t, INode* inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt);
|
||||||
void Snap(TimeValue t, INode* inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt);
|
void Snap(TimeValue t, INode* inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt);
|
||||||
//TODO: Return the name that will appear in the history browser (modifier stack)
|
//TODO: Return the name that will appear in the history browser (modifier stack)
|
||||||
TCHAR *GetObjectName() { return "Rykol Patch Object";}
|
const MCHAR *GetObjectName() { return _T("Rykol Patch Object");}
|
||||||
|
|
||||||
void GetWorldBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
|
void GetWorldBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
|
||||||
void GetLocalBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
|
void GetLocalBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
|
||||||
|
|
||||||
void GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel );
|
void GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel );
|
||||||
//TODO: Return the default name of the node when it is created.
|
//TODO: Return the default name of the node when it is created.
|
||||||
void InitNodeName(TSTR& s) { s = "Rykol Patch Object"; }
|
void InitNodeName(TSTR& s) { s.FromUTF8("Rykol Patch Object"); }
|
||||||
|
|
||||||
// From Object
|
// From Object
|
||||||
BOOL HasUVW();
|
BOOL HasUVW();
|
||||||
|
@ -206,7 +206,7 @@ class RPO : public PatchObject
|
||||||
? true : PatchObject::IsSubClassOf(classID);
|
? true : PatchObject::IsSubClassOf(classID);
|
||||||
}
|
}
|
||||||
SClass_ID SuperClassID() { return GEOMOBJECT_CLASS_ID; }
|
SClass_ID SuperClassID() { return GEOMOBJECT_CLASS_ID; }
|
||||||
void GetClassName(TSTR& s) {s = "Rykol Patch Object";}
|
void GetClassName(TSTR& s) {s.FromUTF8("Rykol Patch Object");}
|
||||||
|
|
||||||
RefTargetHandle Clone ( RemapDir &remap );
|
RefTargetHandle Clone ( RemapDir &remap );
|
||||||
RefResult NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message);
|
RefResult NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message);
|
||||||
|
|
|
@ -193,7 +193,7 @@ bool RPatchMesh::exportZone(INode* pNode, PatchMesh* pPM, NL3D::CZone& zone, CZo
|
||||||
}
|
}
|
||||||
catch (EStream& stream)
|
catch (EStream& stream)
|
||||||
{
|
{
|
||||||
MessageBox (NULL, stream.what(), "Error", MB_OK|MB_ICONEXCLAMATION);
|
MessageBox (NULL, stream.what(), _T("Error"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ bool RPatchMesh::exportZone(INode* pNode, PatchMesh* pPM, NL3D::CZone& zone, CZo
|
||||||
icv=getCommonVertex(pPM,idstpatch,isrcpatch,&orderdstvtx);
|
icv=getCommonVertex(pPM,idstpatch,isrcpatch,&orderdstvtx);
|
||||||
if (icv==-1)
|
if (icv==-1)
|
||||||
{
|
{
|
||||||
mprintf ("Invalid bind");
|
mprintf (_T("Invalid bind"));
|
||||||
nlwarning ("Invalid bind");
|
nlwarning ("Invalid bind");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ void SelectionTerritoire::OnAddTerritoire()
|
||||||
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
||||||
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
||||||
{
|
{
|
||||||
MessageBox("Ce nom existe deja","Error",MB_ICONERROR);
|
MessageBox(_T("Ce nom existe deja","Error"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@ void SelectionTerritoire::OnEditTerritoire()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ void SelectionTerritoire::OnRemoveTerritoire()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ void SelectionTerritoire::OnAddTileSet()
|
||||||
CListBox *list=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
CListBox *list=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
||||||
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
||||||
{
|
{
|
||||||
MessageBox("Ce nom existe deja","Error",MB_ICONERROR);
|
MessageBox(_T("Ce nom existe deja") , _T("Error"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -268,7 +268,7 @@ void SelectionTerritoire::OnEditTileSet()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ void SelectionTerritoire::OnRemoveTileSet()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ void SelectionTerritoire::OnMonter()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ void SelectionTerritoire::OnDescendre()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,9 +355,8 @@ void SelectionTerritoire::OnSelect()
|
||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
||||||
CListBox *list2=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
CListBox *list2=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
||||||
static char BASED_CODE szFilter[] =
|
static TCHAR BASED_CODE szFilter[] = _T("NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||");
|
||||||
"NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||";
|
CFileDialog sFile(true, _T("bank"), _T("main.bank"), 0, szFilter, this);
|
||||||
CFileDialog sFile(true, "bank", "main.bank",0, szFilter, this);
|
|
||||||
if (sFile.DoModal()==IDOK)
|
if (sFile.DoModal()==IDOK)
|
||||||
{
|
{
|
||||||
POSITION p = sFile.GetStartPosition();
|
POSITION p = sFile.GetStartPosition();
|
||||||
|
@ -425,7 +424,7 @@ LRESULT SelectionTerritoire::WindowProc(UINT message, WPARAM wParam, LPARAM lPar
|
||||||
void SelectionTerritoire::OnOK()
|
void SelectionTerritoire::OnOK()
|
||||||
{
|
{
|
||||||
// TODO: Add extra validation here
|
// TODO: Add extra validation here
|
||||||
if (::MessageBox (NULL, "Are you sure you want to quit?", "Quit", MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
if (::MessageBox (NULL, _T("Are you sure you want to quit?"), _T("Quit"), MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
||||||
{
|
{
|
||||||
CDialog::OnOK();
|
CDialog::OnOK();
|
||||||
}
|
}
|
||||||
|
@ -453,9 +452,8 @@ void SelectionTerritoire::Save(const char* path, CTileBank &toSave)
|
||||||
void SelectionTerritoire::OnSaveAs()
|
void SelectionTerritoire::OnSaveAs()
|
||||||
{
|
{
|
||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
static char BASED_CODE szFilter[] =
|
static TCHAR BASED_CODE szFilter[] = _T("NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||");
|
||||||
"NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||";
|
CFileDialog sFile(false, _T("bank"), DefautPath+MainFileName, 0, szFilter, this);
|
||||||
CFileDialog sFile(false, "bank", DefautPath+MainFileName, 0, szFilter, this);
|
|
||||||
if (sFile.DoModal()==IDOK)
|
if (sFile.DoModal()==IDOK)
|
||||||
{
|
{
|
||||||
Save (sFile.GetPathName(), tileBank);
|
Save (sFile.GetPathName(), tileBank);
|
||||||
|
@ -482,7 +480,7 @@ void SelectionTerritoire::OnSaveAs()
|
||||||
void SelectionTerritoire::OnCancel()
|
void SelectionTerritoire::OnCancel()
|
||||||
{
|
{
|
||||||
// TODO: Add extra cleanup here
|
// TODO: Add extra cleanup here
|
||||||
if (::MessageBox (NULL, "Are you sure you want to quit?", "Quit", MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
if (::MessageBox (NULL, _T("Are you sure you want to quit?"), _T("Quit"), MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
||||||
{
|
{
|
||||||
CDialog::OnCancel();
|
CDialog::OnCancel();
|
||||||
}
|
}
|
||||||
|
@ -543,7 +541,7 @@ void SelectionTerritoire::OnPath()
|
||||||
// Last check
|
// Last check
|
||||||
char msg[512];
|
char msg[512];
|
||||||
sprintf (msg, "Do you really want to set %s as base path of the bank ?", path);
|
sprintf (msg, "Do you really want to set %s as base path of the bank ?", path);
|
||||||
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDYES)
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDYES)
|
||||||
{
|
{
|
||||||
// Set as default path..
|
// Set as default path..
|
||||||
|
|
||||||
|
@ -591,7 +589,7 @@ void SelectionTerritoire::OnPath()
|
||||||
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath.c_str());
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath.c_str());
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDNO)
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDNO)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -620,7 +618,7 @@ void SelectionTerritoire::OnPath()
|
||||||
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath);
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath);
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDNO)
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDNO)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,7 +681,7 @@ void SelectionTerritoire::OnPath()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Info message
|
// Info message
|
||||||
MessageBox ("Can't set the path.", "TileEdit", MB_OK|MB_ICONINFORMATION);
|
MessageBox (_T("Can't set the path."), _T("TileEdit"), MB_OK|MB_ICONINFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -706,9 +704,9 @@ void SelectionTerritoire::OnPath()
|
||||||
void SelectionTerritoire::OnExport()
|
void SelectionTerritoire::OnExport()
|
||||||
{
|
{
|
||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
static char BASED_CODE szFilter[] =
|
static TCHAR BASED_CODE szFilter[] =
|
||||||
"NeL tile bank files (*.smallbank)|*.smallbank|All Files (*.*)|*.*||";
|
_T("NeL tile bank files (*.smallbank)|*.smallbank|All Files (*.*)|*.*||");
|
||||||
CFileDialog sFile(false, "*.smallbank", DefautPath+"*.smallbank", 0, szFilter, this);
|
CFileDialog sFile(false, _T("*.smallbank"), DefautPath+ _T("*.smallbank"), 0, szFilter, this);
|
||||||
if (sFile.DoModal()==IDOK)
|
if (sFile.DoModal()==IDOK)
|
||||||
{
|
{
|
||||||
// Copy the bank
|
// Copy the bank
|
||||||
|
@ -737,7 +735,7 @@ void SelectionTerritoire::OnChooseVeget()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -864,12 +864,8 @@ BOOL CFormDialog::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||||
CGeorgesEditDoc *doc = View->GetDocument ();
|
CGeorgesEditDoc *doc = View->GetDocument ();
|
||||||
if (doc)
|
if (doc)
|
||||||
{
|
{
|
||||||
// Build the filter string
|
|
||||||
char filter[512];
|
|
||||||
smprintf (filter, 512, "Dfn Files (*.dfn)|*.dfn|All Files(*.*)|*.*|");
|
|
||||||
|
|
||||||
// Open the dialog
|
// Open the dialog
|
||||||
CFileDialog dlgFile (TRUE, "*.dfn", "*.dfn", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter, theApp.m_pMainWnd);
|
CFileDialog dlgFile (TRUE, _T("*.dfn"), _T("*.dfn"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Dfn Files (*.dfn)|*.dfn|All Files(*.*)|*.*|"), theApp.m_pMainWnd);
|
||||||
if (dlgFile.DoModal () == IDOK)
|
if (dlgFile.DoModal () == IDOK)
|
||||||
{
|
{
|
||||||
combo->Combo.UpdateData ();
|
combo->Combo.UpdateData ();
|
||||||
|
|
|
@ -1532,7 +1532,7 @@ const NLLIGO::IPrimitive *CWorldEditorDoc::createPrimitive (const CDatabaseLocat
|
||||||
if (primClass->Type == CPrimitiveClass::Bitmap)
|
if (primClass->Type == CPrimitiveClass::Bitmap)
|
||||||
{
|
{
|
||||||
// Create a dialog file
|
// Create a dialog file
|
||||||
CFileDialogEx dialog (BASE_REGISTRY_KEY, "image", TRUE, primClass->FileExtension.c_str (), NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
|
CFileDialogEx dialog (BASE_REGISTRY_KEY, _T("image"), TRUE, primClass->FileExtension.c_str (), NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
|
||||||
(primClass->FileType+" (*."+primClass->FileExtension+")|*."+primClass->FileExtension+"|All Files (*.*)|*.*||").c_str (), getMainFrame ());
|
(primClass->FileType+" (*."+primClass->FileExtension+")|*."+primClass->FileExtension+"|All Files (*.*)|*.*||").c_str (), getMainFrame ());
|
||||||
if (dialog.DoModal() == IDOK)
|
if (dialog.DoModal() == IDOK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue