00001
00002
00003
00004 #pragma once
00005 #include "afxwin.h"
00006 #include <vector>
00007 #include <algorithm>
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010 #include <iostream>
00011 #include <fstream.h>
00012 #include <string.h>
00013
00014
00015 class CAsc2MapDlg : public CDialog
00016 {
00017
00018 public:
00019 CAsc2MapDlg(CWnd* pParent = NULL);
00020
00021
00022 enum { IDD = IDD_ASC2MAP_DIALOG };
00023
00024 protected:
00025 virtual void DoDataExchange(CDataExchange* pDX);
00026
00027
00028
00029 protected:
00030 HICON m_hIcon;
00031
00032
00033 virtual BOOL OnInitDialog();
00034 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00035 afx_msg void OnPaint();
00036 afx_msg HCURSOR OnQueryDragIcon();
00037 DECLARE_MESSAGE_MAP()
00038 public:
00039 CString m_SAscFileName;
00040 CString m_SMapFile;
00041
00042 FILE *AscFile;
00043 FILE *MapFile;
00044 bool FindAllTexture;
00045 afx_msg void OnBnClickedOk();
00046 afx_msg void OnBnClickedButbrowseasc();
00047 afx_msg void OnBnClickedButbrowsetexttop();
00048 afx_msg void OnBnClickedButbrowsetextbottom();
00049 afx_msg void OnBnClickedButbrowsetextfront();
00050 afx_msg void OnBnClickedButbrowsetextback();
00051 afx_msg void OnBnClickedButbrowsetextleft();
00052 afx_msg void OnBnClickedButbrowsetextright();
00053 CEdit m_CAscFile;
00054
00055 CString m_STextureName;
00056 CString m_STextureNameBottom;
00057 CString m_STextureNameFront;
00058 CString m_STextureNameBack;
00059 CString m_STextureNameLeft;
00060 CString m_STextureNameRight;
00061 afx_msg void OnBnClickedButbrowsemapfile();
00062 void CreateMapFile(void);
00063
00064 struct SVertex
00065 {
00066 double x,y,z,u,v;
00067 };
00068 struct SMesh
00069 {
00070 int A,B,C;
00071 int AB,CA,BC;
00072 int S;
00073 char Texture[255];
00074 };
00075 };