Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Unfinished source BMD (3dMesh) to SMD

Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
PHP:
#include <windows.h>

#include <atlbase.h>
#include <shlobj.h>
#pragma comment(lib,"shell32")

BOOL GetFolderW(LPCWSTR szTitle,LPWSTR szPath,LPWSTR szRoot=0,HWND hWndOwner=0);
void GetDirFileListW(const wchar_t *wszDir, const wchar_t *wszMask, vector<wstring>& rFileList);


//BOOL GetFolderW(LPCWSTR szTitle, LPWSTR szPath, LPWSTR szRoot=0, HWND hWndOwner=0);


static int CALLBACK
BrowseCallbackProc (HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
{
    TCHAR szPath[_MAX_PATH];
    switch (uMsg) 
	{
    case BFFM_INITIALIZED:
        if (lpData)
            SendMessage(hWnd,BFFM_SETSELECTION,TRUE,lpData);
        break;
    case BFFM_SELCHANGED:
        SHGetPathFromIDList(LPITEMIDLIST(lParam),szPath);
        SendMessage(hWnd, BFFM_SETSTATUSTEXT, NULL, LPARAM(szPath));
        break;
    }
    return 0;
}

BOOL GetFolderW(LPCWSTR szTitle, LPWSTR szPath, LPWSTR szRoot, HWND hWndOwner)
{
    if (szPath == NULL)
        return false;

    bool result = false;

    LPMALLOC pMalloc;
    if (::SHGetMalloc(&pMalloc) == NOERROR) 
	{
        BROWSEINFO bi;
        ::ZeroMemory(&bi,sizeof bi);
        bi.ulFlags   = BIF_RETURNONLYFSDIRS;

        // дескриптор окна-владельца диалога
        bi.hwndOwner = hWndOwner;

        // добавление заголовка к диалогу
        bi.lpszTitle = szTitle;

        // отображение текущего каталога
        bi.lpfn      = BrowseCallbackProc;
        bi.ulFlags  |= BIF_STATUSTEXT;
		bi.ulFlags  |= BIF_USENEWUI;//BIF_NEWDIALOGSTYLE;

        // установка каталога по умолчанию
        bi.lParam    = LPARAM(szPath);

        // установка корневого каталога
        if (szRoot != NULL) 
		{
            IShellFolder *pDF;
			CoInitialize(NULL);
            if (SHGetDesktopFolder(&pDF) == NOERROR) 
			{
                LPITEMIDLIST pIdl = NULL;
                ULONG        chEaten;
                ULONG        dwAttributes;

                USES_CONVERSION;
                LPOLESTR oleStr = T2OLE(szRoot);

                pDF->ParseDisplayName(NULL,NULL,oleStr,&chEaten,&pIdl,&dwAttributes);
                pDF->Release();

                bi.pidlRoot = pIdl;
            }
        }

        LPITEMIDLIST pidl = ::SHBrowseForFolder(&bi);
        if (pidl != NULL) 
		{
            if (::SHGetPathFromIDList(pidl,szPath))
                result = true;
            pMalloc->Free(pidl);
        }
        if (bi.pidlRoot != NULL)
            pMalloc->Free((void *)bi.pidlRoot);
        pMalloc->Release();
    }
    return result;
}



void GetDirFileListW(const wchar_t *wszDir, const wchar_t *wszMask, vector<wstring>& rFileList)
{
   WIN32_FIND_DATA ffd;
   HANDLE hFind = INVALID_HANDLE_VALUE;
   wchar_t DirSpec[MAX_PATH];

   wsprintfW(DirSpec, L"%s\\%s", wszDir, wszMask);


   hFind = FindFirstFile(DirSpec, &ffd);

   if (hFind == INVALID_HANDLE_VALUE) 
      return;

   do
   {
			if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
			{
				continue;
				//if(strcmp(ffd.cFileName,".") == 0)
				//	continue;

				//if(strcmp(ffd.cFileName,"..") == 0)
				//	continue;

				//char NewDir[MAX_PATH];
				//sprintf(NewDir, "%s\\%s", szDir, ffd.cFileName);
				//ListFilesInDir(NewDir);
				//continue;
			}

			wchar_t File[MAX_PATH];
			wsprintfW(File, L"%s\\%s", wszDir, ffd.cFileName);
//			dwFileCnt++;

			rFileList.push_back(File);

   }
   while (FindNextFile(hFind, &ffd) != 0); 
    
   FindClose(hFind);
}
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
I have this Ducking errors :S

Debug Mode:
Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Debug Win32 ------
1>Compilando...
1>StdAfx.cpp
1>c:\nemesis\converter\mywinutils.h(9) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\mywinutils.h(51) : error C2440: '=' : no se puede realizar la conversión de 'LPCWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(73) : error C2440: '=' : no se puede realizar la conversión de 'LPWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(98) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\mywinutils.h(107) : error C2664: 'FindFirstFileW' : no se puede convertir el parámetro 2 de 'WIN32_FIND_DATA *' a 'LPWIN32_FIND_DATAW'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(133) : error C2065: 'rFileList' : identificador no declarado
1>c:\nemesis\converter\mywinutils.h(133) : error C2228: el operando izquierdo de '.push_back' debe tener class/struct/union
1>        el tipo es ''unknown-type''
1>Creando archivo de información de examen...
1>Utilidad de mantenimiento de información de examen de Microsoft Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : no se puede abrir el archivo '.\bmd___win32_debug\BMDModel.sbr': No such file or directory
1>El registro de generación se guardó en el "file://c:\Nemesis\Converter\BMD___Win32_Debug\BuildLog.htm"
1>BMD - 8 errores, 0 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========

Release Mode:
Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Release Win32 ------
1>Compilando...
1>StdAfx.cpp
1>c:\nemesis\converter\MyWinUtils.h(9) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\MyWinUtils.h(51) : error C2440: '=' : no se puede realizar la conversión de 'LPCWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(73) : error C2440: '=' : no se puede realizar la conversión de 'LPWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(98) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\MyWinUtils.h(107) : error C2664: 'FindFirstFileW' : no se puede convertir el parámetro 2 de 'WIN32_FIND_DATA *' a 'LPWIN32_FIND_DATAW'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(133) : error C2065: 'rFileList' : identificador no declarado
1>c:\nemesis\converter\MyWinUtils.h(133) : error C2228: el operando izquierdo de '.push_back' debe tener class/struct/union
1>        el tipo es ''unknown-type''
1>El registro de generación se guardó en el "file://c:\Nemesis\Converter\Release\BuildLog.htm"
1>BMD - 7 errores, 0 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========

ps: any solution for this?
 
Junior Spellweaver
Joined
Jun 10, 2006
Messages
136
Reaction score
100
I have this Ducking errors :S

Debug Mode:
Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Debug Win32 ------
1>Compilando...
1>StdAfx.cpp
1>c:\nemesis\converter\mywinutils.h(9) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\mywinutils.h(51) : error C2440: '=' : no se puede realizar la conversión de 'LPCWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(73) : error C2440: '=' : no se puede realizar la conversión de 'LPWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(98) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\mywinutils.h(107) : error C2664: 'FindFirstFileW' : no se puede convertir el parámetro 2 de 'WIN32_FIND_DATA *' a 'LPWIN32_FIND_DATAW'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\mywinutils.h(133) : error C2065: 'rFileList' : identificador no declarado
1>c:\nemesis\converter\mywinutils.h(133) : error C2228: el operando izquierdo de '.push_back' debe tener class/struct/union
1>        el tipo es ''unknown-type''
1>Creando archivo de información de examen...
1>Utilidad de mantenimiento de información de examen de Microsoft Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : no se puede abrir el archivo '.\bmd___win32_debug\BMDModel.sbr': No such file or directory
1>El registro de generación se guardó en el "file://c:\Nemesis\Converter\BMD___Win32_Debug\BuildLog.htm"
1>BMD - 8 errores, 0 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========

Release Mode:
Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Release Win32 ------
1>Compilando...
1>StdAfx.cpp
1>c:\nemesis\converter\MyWinUtils.h(9) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\MyWinUtils.h(51) : error C2440: '=' : no se puede realizar la conversión de 'LPCWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(73) : error C2440: '=' : no se puede realizar la conversión de 'LPWSTR' a 'LPCSTR'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(98) : error C2061: error de sintaxis : identificador 'vector'
1>c:\nemesis\converter\MyWinUtils.h(107) : error C2664: 'FindFirstFileW' : no se puede convertir el parámetro 2 de 'WIN32_FIND_DATA *' a 'LPWIN32_FIND_DATAW'
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>c:\nemesis\converter\MyWinUtils.h(133) : error C2065: 'rFileList' : identificador no declarado
1>c:\nemesis\converter\MyWinUtils.h(133) : error C2228: el operando izquierdo de '.push_back' debe tener class/struct/union
1>        el tipo es ''unknown-type''
1>El registro de generación se guardó en el "file://c:\Nemesis\Converter\Release\BuildLog.htm"
1>BMD - 7 errores, 0 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========

ps: any solution for this?

use VS2005, don't need the part of getfolder etc. Use only the 3 last lines( or four )...
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
rodrigobmg: Can you upload your compiled converter?, please.

I fix all, only this:

Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Release Win32 ------
1>Compilando...
1>StdAfx.cpp
1>Compilando...
1>SMDModel.cpp
1>.\SMDModel.cpp(33) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(37) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(49) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(56) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(67) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(75) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(86) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(99) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(129) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(136) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(160) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(161) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(162) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(173) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(194) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(211) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(260) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(267) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(274) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(277) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(291) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(293) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(333) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(340) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(348) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(355) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(358) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(379) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(384) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(327) : warning C4101: 'fnamedat' : variable local sin referencia
1>.\SMDModel.cpp(417) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(424) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(480) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(497) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(514) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(536) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(586) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(590) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(625) : warning C4018: '<' : no coinciden signed/unsigned
1>readscript.cpp
1>.\readscript.cpp(113) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>ModelConverter.cpp
1>.\ModelConverter.cpp(90) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(144) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(145) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(146) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(148) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(149) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(150) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(152) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(153) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(154) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(131) : warning C4101: 'j' : variable local sin referencia
1>.\ModelConverter.cpp(252) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\ModelConverter.cpp(267) : warning C4800: 'unsigned int' : forzando el valor a bool 'true' o 'false' (advertencia de rendimiento)
1>.\ModelConverter.cpp(293) : warning C4018: '<' : no coinciden signed/unsigned
1>.\ModelConverter.cpp(297) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\ModelConverter.cpp(367) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>BMDModel.cpp
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(17) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(17) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(19) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(20) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(20) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(21) : warning C4309: 'inicializando' : truncamiento de valor constante
1>.\BMDModel.cpp(117) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(337) : warning C4996: 'mbstowcs': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdlib.h(527) : vea la declaración de 'mbstowcs'
1>        Mensaje: 'This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(363) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(418) : warning C4996: 'strcpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(73) : vea la declaración de 'strcpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(472) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(513) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(537) : warning C4996: 'sprintf': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(345) : vea la declaración de 'sprintf'
1>        Mensaje: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(589) : warning C4996: 'mbstowcs': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdlib.h(527) : vea la declaración de 'mbstowcs'
1>        Mensaje: 'This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(619) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(768) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>BMD.cpp
[COLOR="Red"]1>.\BMD.cpp(147) : error C2664: 'GetFolder' : no se puede convertir el parámetro 1 de 'const wchar_t [29]' a 'LPCSTR'[/COLOR]
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>Generando código...
1>El registro de generación se guardó en el "file://c:\Documents and Settings\Usuario\Escritorio\BMD - SMD Converter Source\Release\BuildLog.htm"
1>BMD - 1 errores, 75 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ========

PS: Only 1 error of bad conversion
 
Last edited:
Junior Spellweaver
Joined
Jun 10, 2006
Messages
136
Reaction score
100
rodrigobmg: Can you upload your compiled converter?, please.

I fix all, only this:

Code:
1>------ Operación Generar iniciada: proyecto: BMD, configuración: Release Win32 ------
1>Compilando...
1>StdAfx.cpp
1>Compilando...
1>SMDModel.cpp
1>.\SMDModel.cpp(33) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(37) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(49) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(56) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(67) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(75) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(86) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(99) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(129) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(136) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(160) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(161) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(162) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(173) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(194) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(211) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(260) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(267) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(274) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(277) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(291) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(293) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(333) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(340) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(348) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(355) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(358) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(379) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(384) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(327) : warning C4101: 'fnamedat' : variable local sin referencia
1>.\SMDModel.cpp(417) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(424) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(480) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(497) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(514) : warning C4482: se utilizó una extensión no estándar: enumeración 'SMDToken' utilizada en el nombre completo
1>.\SMDModel.cpp(536) : warning C4244: '=' : conversión de 'float' a 'int'; posible pérdida de datos
1>.\SMDModel.cpp(586) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\SMDModel.cpp(590) : warning C4018: '<' : no coinciden signed/unsigned
1>.\SMDModel.cpp(625) : warning C4018: '<' : no coinciden signed/unsigned
1>readscript.cpp
1>.\readscript.cpp(113) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>ModelConverter.cpp
1>.\ModelConverter.cpp(90) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(144) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(145) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(146) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(148) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(149) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(150) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(152) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(153) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(154) : warning C4244: '=' : conversión de 'double' a 'float'; posible pérdida de datos
1>.\ModelConverter.cpp(131) : warning C4101: 'j' : variable local sin referencia
1>.\ModelConverter.cpp(252) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\ModelConverter.cpp(267) : warning C4800: 'unsigned int' : forzando el valor a bool 'true' o 'false' (advertencia de rendimiento)
1>.\ModelConverter.cpp(293) : warning C4018: '<' : no coinciden signed/unsigned
1>.\ModelConverter.cpp(297) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\ModelConverter.cpp(367) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>BMDModel.cpp
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(17) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(17) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(18) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(19) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(20) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(20) : warning C4309: 'inicializando' : truncamiento de valor constante
1>c:\documents and settings\usuario\escritorio\bmd - smd converter source\encdec.h(21) : warning C4309: 'inicializando' : truncamiento de valor constante
1>.\BMDModel.cpp(117) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(337) : warning C4996: 'mbstowcs': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdlib.h(527) : vea la declaración de 'mbstowcs'
1>        Mensaje: 'This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(363) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(418) : warning C4996: 'strcpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(73) : vea la declaración de 'strcpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(472) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(513) : warning C4996: 'strncpy': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\string.h(156) : vea la declaración de 'strncpy'
1>        Mensaje: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(537) : warning C4996: 'sprintf': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(345) : vea la declaración de 'sprintf'
1>        Mensaje: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(589) : warning C4996: 'mbstowcs': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdlib.h(527) : vea la declaración de 'mbstowcs'
1>        Mensaje: 'This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(619) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>.\BMDModel.cpp(768) : warning C4996: '_wfopen': el símbolo se ha declarado como deprecated
1>        c:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(560) : vea la declaración de '_wfopen'
1>        Mensaje: 'This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>BMD.cpp
[COLOR="Red"]1>.\BMD.cpp(147) : error C2664: 'GetFolder' : no se puede convertir el parámetro 1 de 'const wchar_t [29]' a 'LPCSTR'[/COLOR]
1>        Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función
1>Generando código...
1>El registro de generación se guardó en el "file://c:\Documents and Settings\Usuario\Escritorio\BMD - SMD Converter Source\Release\BuildLog.htm"
1>BMD - 1 errores, 75 advertencias
========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ========

PS: Only 1 error of bad conversion

Code:
// BMD.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>

#include "SMDModel.h"

//float RADIAN; //0.01745329f - 0x3C8EFA35
//float TODEG; //57.29578f - 0x42652EE0
//
//
//typedef struct _VERTEX3F
//{
//	_VERTEX3F()
//	{
//		x=y=z=0;
//	};
//	_VERTEX3F(float _x, float _y, float _z)
//	{
//		x = _x;
//		y = _y;
//		z = _z;
//	};
//	_VERTEX3F& operator=(_VERTEX3F& v)
//	{
//		x = v.x;
//		y = v.y;
//		z = v.z;
//		return *this;
//	};
//	_VERTEX3F operator+(_VERTEX3F& v)
//	{
//		return _VERTEX3F(x+v.x, y+v.y, z+v.z);
//	};
//
//	_VERTEX3F operator-(_VERTEX3F& v)
//	{
//		return _VERTEX3F(x-v.x, y-v.y, z-v.z);
//	};
//	float x, y, z;
//}VERTEX3F, *LPVERTEX3F;
//
//typedef struct _VERTEX2F
//{
//	float x, y;
//}VERTEX2F, *LPVERTEX2F;
//
//typedef struct _VERT_IND
//{
//	WORD v[3], trash;
//}VERT_IND;
//
//typedef struct _BMD_HDR
//{
//	BYTE	sign[3]; //BMD
//	BYTE	crypt;
//}BMD_HDR, *LPBMD_HDR;
//
//typedef struct _BMD_HDR_INFO
//{
//	char	sName[32];
//	WORD	tex_cnt;
//	WORD	bone_cnt;
//	WORD	animation_cnt;
//}BMD_HDR_INFO, *LPBMD_HDR_INFO;
//
//
//typedef struct _BMD_TEX
//{
//	WORD	VertPosCnt;
//	WORD	VertNormCnt;
//	WORD	VertTexCnt;
//	WORD	TrnglCnt;
//	WORD	ukn;
//}BMD_TEX, *LPBMD_TEX;
//
//typedef struct _BMD_VERT_POS
//{
//	int	Parent;
//	VERTEX3F VertPos;
//}BMD_VERT_POS, *LPBMD_VERT_POS;
//
//typedef struct _BMD_VERT_NORM
//{
//	int	Parent;
//	VERTEX3F VertNorm;
//	int	Id;
//}BMD_VERT_NORM, *LPBMD_VERT_NORM;
//
//typedef struct _BMD_VERT_TEX
//{
//	VERTEX2F VertTex;	
//}BMD_VERT_TEX, *LPBMD_VERT_TEX;
//
//
//typedef struct _BMD_TRNG
//{
//	BYTE cnt;
//	VERT_IND v[3];
//	char trash[38];
//}BMD_TRNG, *LPBMD_TRNG;
//
//#pragma pack(1)
//typedef struct _BMD_ANIM_HDR
//{
//	WORD	FrameCnt;
//	BYTE	is;
//}BMD_ANIM_HDR, *LPBMD_ANIM_HDR;
//
//
//typedef struct _BMD_BONE_HDR
//{
//	BYTE	IsNull;
//	BYTE	sName[32];
//	short	Parent;
//}BMD_BONE_HDR, *LPBMD_BONE_HDR;
//#pragma pack()
//
//typedef struct _TEX
//{
//	BMD_TEX			tex;
//	LPBMD_VERT_POS	lpVertPos;
//	LPBMD_VERT_NORM	lpVertNorm;
//	LPBMD_VERT_TEX	lpVertTex;
//	LPBMD_TRNG		lpTrng;
//
//	char			texture[32];
//}TEX, *LPTEX;
//
//typedef struct _ANIM
//{
//	BMD_ANIM_HDR	hdr;
//	LPVERTEX3F		lpVert3f;
//}ANIM, *LPANIM;
//
//typedef struct _BONES
//{
//	BMD_BONE_HDR	hdr;
//	LPVERTEX3F		*lpVertPos;
//	LPVERTEX3F		*lpVertRot;
//}BONES, *LPBONES;
//
///*
//typedef struct _MATRIX3x4
//{
//	_MATRIX3x4()
//	{
//		ZeroMemory(this, sizeof(*this));
//	}
//	float	v[3][4];
//}MATRIX3x4, *LPMATRIX3x4;
//*/
//typedef float MATRIX3x4[3][4];
//typedef MATRIX3x4 *LPMATRIX3x4;
//
//typedef struct _TRANSFORM
//{
//	MATRIX3x4	vpos;
//	MATRIX3x4	vnorm;
//	MATRIX3x4	ivpos;
//	MATRIX3x4	xvpos;
//	MATRIX3x4	yvpos;
//	MATRIX3x4	zvpos;
//
//	MATRIX3x4	xnpos;
//	MATRIX3x4	ynpos;
//	MATRIX3x4	znpos;
//
//
//	VERTEX3F	bpos;
////	VERTEX3F	ibpos;
//
//}TRANSFORM, *LPTRANSFORM;
//
//void MakeRotateMatrix(LPMATRIX3x4 lpDstMat, VERTEX3F *lpRot);
//void MakeRotateMatrix2(LPMATRIX3x4 lpDstMat, VERTEX3F *lpRot);
//void MulMatrix(LPMATRIX3x4 lpDstMat, LPMATRIX3x4 lpMat1, LPMATRIX3x4 lpMat2);
//void MulVectMat(float *lpDstVect, float *lpVect, LPMATRIX3x4 lpMat);
//void MatInv(LPMATRIX3x4 lpDstMat, LPMATRIX3x4 lpMat);
//
//
//
#include "BMDModel.h"
//
//void ParseBmd(char* pBMD, DWORD dwSize)
//{
///*
//	char *DecBMD = new char[dwSize];
//	char * eax, ebx, ecx, edx, edi, esi;
//	ebx = 4;
//	edi = pBMD;
//	eax = *(edi+3);
//	if( eax == 0x0C)
//	{
//
//	}
//	eax = dwSize;
//	esi = edi+ebx;
//	ecx = 8;
//	edi = eax;
//*/
//	BYTE keys[16] = {0xD1, 0x73, 0x52, 0xF6,
//	0xD2, 0x9A, 0xCB, 0x27, 0x3E, 0xAF,
//	0x59, 0x31, 0x37, 0xB3, 0xE7, 0xA2};
//	char *pDst = new char[dwSize];
//	ZeroMemory(pDst, dwSize);
//	int i;
//	BYTE j;
//	for(i=0, j=0x5E; i < dwSize; i++)
//	{
//		pDst[i] = (keys[i%16]^pBMD[i])-j;
//		j = pBMD[i]+0x3D;
//	}
//}
//
#include <vector>
using namespace std;


int main(int argc, char* argv[])
{
	CBMDModel b;

	CModelConverter mc;
	CSMDModel m;

	b.LoadFromFileW(L"C:\\test\\player.bmd");
	mc.BmdToSmd(b, m);
	m.SaveToFileW(L"C:\\test\\player.smd");

	getch();


	return 0;
}

Leave your main.cpp like that...
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
Well, friends I worked ... can convert to smd to bmd with animations included!



Credits: Hybrid (Gembrid).

Gembrid, you will not have any material effects on the items?, Such as Shine, Transparency, Blur, etc... thanks in advance
 
Newbie Spellweaver
Joined
Aug 3, 2004
Messages
54
Reaction score
0
I'm having issues trying to convert an SMD that I edited. If I take a model from the game, convert to smd, and back to bmd it works fine, but whenever I make a change to a mesh and try to convert it to bmd the program crashes.
I have a theory as to the transparency part you mentioned though. I think you can assign a tga material to a model and have that converted to ozt for game use. I am going try changing the specularity and gloss to see if it makes any changes.

Since this smd format is different from the valve/source one I think I'll try writing a maxscript to import the mu exported "smd" format instead of cannonfodder's or wunderboy.
 
Last edited:
Experienced Elementalist
Joined
Apr 8, 2008
Messages
218
Reaction score
141
Well, friends I worked ... can convert to smd to bmd with animations included!



Credits: Hybrid (Gembrid).

Gembrid, you will not have any material effects on the items?, Such as Shine, Transparency, Blur, etc... thanks in advance

Good Job boy, btw let me tell u something, someting animations files have .coordenate files, this script u made need btw load thi .coordenate files in order or animations can be buged.

If u can fix this, then this can be very nice :D:, take player.bmd and convert to .smd, you get lots of smd files, all animations for player, with Pentium Tools if u compile back this animations to BMD all works fine, but with this BMD.EXE u made i get buged animations, Test by yourself, i hope u can fix man, this its a very nice release.

I'm having issues trying to convert an SMD that I edited. If I take a model from the game, convert to smd, and back to bmd it works fine, but whenever I make a change to a mesh and try to convert it to bmd the program crashes.
I have a theory as to the transparency part you mentioned though. I think you can assign a tga material to a model and have that converted to ozt for game use. I am going try changing the specularity and gloss to see if it makes any changes.

Since this smd format is different from the valve/source one I think I'll try writing a maxscript to import the mu exported "smd" format instead of cannonfodder's or wunderboy.

In the past i have same problem, if u export direct from max to Smd with valve plugins and then you try converto to bmd u have this problem, to fix only open the smd with Milkshape and export to .smd, then use the BMD.exe and all be fine.
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
Good Job boy, btw let me tell u something, someting animations files have .coordenate files, this script u made need btw load thi .coordenate files in order or animations can be buged.

If u can fix this, then this can be very nice :D:, take player.bmd and convert to .smd, you get lots of smd files, all animations for player, with Pentium Tools if u compile back this animations to BMD all works fine, but with this BMD.EXE u made i get buged animations, Test by yourself, i hope u can fix man, this its a very nice release.



In the past i have same problem, if u export direct from max to Smd with valve plugins and then you try converto to bmd u have this problem, to fix only open the smd with Milkshape and export to .smd, then use the BMD.exe and all be fine.

yes... it's true... I test with: Player.bmd of: 1.03.52 (Eng) - Season 6 Episode 2.. and the original file: Player.bmd weight: 3,16 MB, but the new compilation of: Player.bmd made by: BMD.exe weight: 2,86 MB :(: is bug.

TEST IN: 1.03.52 (Eng) Season 6 Episode 2 Using Original: Player.bmd

aywgQ - Unfinished source BMD (3dMesh) to SMD - RaGEZONE Forums


AeHbv - Unfinished source BMD (3dMesh) to SMD - RaGEZONE Forums


TEST IN: 1.03.52 (Eng) Season 6 Episode 2 Using Generated: Player.bmd

a8CcI - Unfinished source BMD (3dMesh) to SMD - RaGEZONE Forums


0iohG - Unfinished source BMD (3dMesh) to SMD - RaGEZONE Forums


PS: Perhaps it is because of the version, but I think... in any way.. I will see what can be wrong in the code. thanks Rimbros.

PS 2: With normal 3d bmd models like: Bows or Pets.. works well. :):
 

Attachments

You must be registered for see attachments list
Last edited:
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
Good Job boy, btw let me tell u something, someting animations files have .coordenate files, this script u made need btw load thi .coordenate files in order or animations can be buged.

it generates .dat files and loads them back, and i really don't know if this data is used, tried to hardware bp and no results.


Player.bmd of: 1.03.52 (Eng) - Season 6 Episode 2..

upload player.bmd, i'll convert with my build.
or if you converted to smd with penitium tools, then it didn't load those ".coor.." files, cause it loads .dat =)
 
Last edited:
Experienced Elementalist
Joined
Apr 8, 2008
Messages
218
Reaction score
141
Link player file in smd format.

Thank Gembrid, hope can be fixed i still to put customized animations here.
 
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
Link player file in smd format.

Thank Gembrid, hope can be fixed i still to put customized animations here.




also, FileList function requires 1st file to be reference file(load reference, append animations), so if there is only animation smds need to add additional file "???_000.smd" or "???.smd" (just copy 1st animation file and rename it)

also in code need to change

PHP:
typedef struct _BMD_FILE_VERTEX_POS
{
//	int	iParent;
	short iParent;
	short ukn;    // maybe trash
	CVector3 vPos;
}BMD_FILE_VERTEX_POS, *LPBMD_FILE_VERTEX_POS;

// BMD Vertex's Normal vector
typedef struct _BMD_FILE_VERTEX_NORM
{
//	int	iParent;
	short iParent;
	short ukn;
	CVector3 vNorm;
	int	id;
}BMD_FILE_VERTEX_NORM, *LPBMD_FILE_VERTEX_NORM;


and
these functions don't close opened files
PHP:
BOOL CSMDModel::LoadFromFileW(const wchar_t* wszFileName)
BOOL CSMDModel::AppendAnimation(const wchar_t* wszFileName)

need to add
PHP:
	fclose(SMDFile);
 
Last edited:
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
The Gembrid converter, generated: .coords files how: .dat file.. but the info into the file is very similar..

Look this:

player_001.coords (of Pentium Tools):

Code:
0.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 0.0

player_001.dat (of BMD.exe converter of Gembrid):

Code:
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000

Info in file is the same, but type file: .dat of .coords is the difference. :):

PS: I can generate 1 "Player.bmd" for: Season 6 Episode 2 of: 3.20 MB (Original Player.bmd of: 1.03.52 Eng is --> 3.16 MB) :D: this difference of: 4 kb is for different cant of: 0.000000 only must be: open .dat files with: notepad and save file how: .coords
 
Last edited:
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
The Gembrid converter, generated: .coords files how: .dat file.. but the info into the file is very similar..

Look this:

player_001.coords (of Pentium Tools):

Code:
0.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 0.0

player_001.dat (of BMD.exe converter of Gembrid):

Code:
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000

Info in file is the same, but type file: .dat of .coords is the difference. :):

PS: I can generate 1 "Player.bmd" for: Season 6 Episode 2 of: 3.20 MB (Original Player.bmd of: 1.03.52 Eng is --> 3.16 MB) :D: this difference of: 4 kb is for different cont of: 0.000000 only must be: open .dat files with: notepad and save file how: .coords


well, those values are the same, float is stored in 4 byte.
you have the source, you can change code to generate/read ".coord" files, not ".dat" files
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
well, those values are the same, float is stored in 4 byte.
you have the source, you can change code to generate/read ".coord" files, not ".dat" files

Well, I for one am very busy with things at work now.. and honestly I have no time, but I leave the code compilable in: Visual C++ 2005 .NET + Solution + Compiled exe

:thumbup1:

Credits: Gembrid (me only made some changes and compile his code)

PS: Gembrid You have some material on some OpenGL effects in main.exe such as Shine, Blur, Transparency, etc... to put them on certain items?
 
Last edited:
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
PS: Gembrid You have some material on some OpenGL effects in main.exe such as Shine, Blur, Transparency, etc... to put them on certain items?

no i don't, and what's the point of these? if you want new items to look like other cool items added by webzen, then there is no need to know smth about those effects.
 
Experienced Elementalist
Joined
Apr 8, 2008
Messages
218
Reaction score
141
Well, I for one am very busy with things at work now.. and honestly I have no time, but I leave the code compilable in: Visual C++ 2005 .NET + Solution + Compiled exe

:thumbup1:

Credits: Gembrid (me only made some changes and compile his code)

PS: Gembrid You have some material on some OpenGL effects in main.exe such as Shine, Blur, Transparency, etc... to put them on certain items?

Well hope you or grembrid can fix this. of course if this its the reazon coz something animations are bugged.

PS: Interesting Question abouth effects in main.exe, i see the one can do this its your old friend Sobieh, he can give you info abouth this i think, coz he already put effects in items, but i have another question, new weapons like a something DL scepter have rotation animation



how its posible allow animations for other items? where this can be activated? and its posible also activate animations in Armors Parts?.
 
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
but i have another question, new weapons like a something DL scepter have rotation animation

how its posible allow animations for other items? where this can be activated? and its posible also activate animations in Armors Parts?.

elf bows also have animations, and it's old. and if you want to replace existing bow with new model with added animation, it certainly should work if you do all correct.

probably there is a way to add such things for all weapons, need to check main.

weapons/wings have their own skeleton, but pants, boots, gloves, etc. use player skeleton, and they "copy" all player animation - you fly = pants fly :D

PS, but you can make player skeleton more complicated and change animations:
add new bones, create item that uses these bones, and you have your own animated armor part.
for example take a look on the dragon armor and bronze armor, dragon armor uses more bones and have additional animation =)
The only problem - as i remember, weapons/wings/other link to player by hard coded bone numbers, so if there is a way to add new bones by keeping bone numbers from original player.bmd you can try to implement this thing.
 
Back
Top