sphere-axis-commits Mailing List for Axis for Sphere (Page 5)
Brought to you by:
pesterle
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(71) |
Jun
(4) |
Jul
(26) |
Aug
(23) |
Sep
(6) |
Oct
(2) |
Nov
(74) |
Dec
(89) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(88) |
Feb
(51) |
Mar
(26) |
Apr
(8) |
May
(55) |
Jun
(67) |
Jul
(37) |
Aug
(46) |
Sep
(12) |
Oct
(6) |
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(13) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Philip E. <pes...@us...> - 2003-07-16 22:02:01
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv31150/S_Sphere52 Modified Files: MapScriptEditDlg.cpp ScriptsMain.cpp ScriptsMain.h XMLConfig.cpp XMLConfig.h Log Message: no message Index: MapScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** MapScriptEditDlg.cpp 10 Jul 2003 05:13:37 -0000 1.5 --- MapScriptEditDlg.cpp 16 Jul 2003 22:01:58 -0000 1.6 *************** *** 160,178 **** FillValues(); ! ! m_map.SetClientPath(Main->m_config.MulPath()); ! ! if ( Main->m_config.MulFile(Map0) != _T("") ) ! m_map.SetCustomMulPath(Map0, Main->m_config.MulFile(Map0)); ! if ( Main->m_config.MulFile(Map2) != _T("") ) ! m_map.SetCustomMulPath(Map2, Main->m_config.MulFile(Map2)); ! if ( Main->m_config.MulFile(StaIdx0) != _T("") ) ! m_map.SetCustomMulPath(StaIdx0, Main->m_config.MulFile(StaIdx0)); ! if ( Main->m_config.MulFile(Statics0) != _T("") ) ! m_map.SetCustomMulPath(Statics0, Main->m_config.MulFile(Statics0)); ! if ( Main->m_config.MulFile(StaIdx2) != _T("") ) ! m_map.SetCustomMulPath(StaIdx2, Main->m_config.MulFile(StaIdx2)); ! if ( Main->m_config.MulFile(Statics2) != _T("") ) ! m_map.SetCustomMulPath(Statics2, Main->m_config.MulFile(Statics2)); GetRects(); --- 160,170 ---- FillValues(); ! m_map.SetClientPath(Main->m_pScripts->MulPath()); ! for ( ULONG i = Map0; i < MulCount; i++ ) ! { ! CString s = Main->m_pScripts->MulFile(i); ! if ( s != _T("") ) ! m_map.SetCustomMulPath((short) i, s); ! } GetRects(); Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ScriptsMain.cpp 15 Jul 2003 21:45:01 -0000 1.25 --- ScriptsMain.cpp 16 Jul 2003 22:01:59 -0000 1.26 *************** *** 3473,3480 **** void CScriptsMain::SetMulFile(ULONG index, CString sFile) { ! if ( index >= VERFILE_ENDOFTABLE ) return; if ( index > m_vFiles.size() ) m_vMulFiles.resize(index, _T("") ); m_vMulFiles[index] = sFile; } --- 3473,3488 ---- void CScriptsMain::SetMulFile(ULONG index, CString sFile) { ! if ( index >= MulCount ) return; if ( index > m_vFiles.size() ) m_vMulFiles.resize(index, _T("") ); m_vMulFiles[index] = sFile; + } + + CString CScriptsMain::MulFile(ULONG index) + { + if ( index < 0 || index > m_vMulFiles.size() ) + return _T(""); + else + return m_vMulFiles[index]; } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** ScriptsMain.h 15 Jul 2003 21:45:01 -0000 1.16 --- ScriptsMain.h 16 Jul 2003 22:01:59 -0000 1.17 *************** *** 79,142 **** #define PROFILE_REMOTE 3 ! #define VERFILE_MAP0 0x00 ! #define VERFILE_STAIDX0 0x01 ! #define VERFILE_STATICS0 0x02 ! #define VERFILE_ARTIDX 0x03 ! #define VERFILE_ART 0x04 ! #define VERFILE_ANIMIDX 0x05 ! #define VERFILE_ANIM 0x06 ! #define VERFILE_SOUNDIDX 0x07 ! #define VERFILE_SOUND 0x08 ! #define VERFILE_TEXIDX 0x09 ! #define VERFILE_TEXMAPS 0x0a ! #define VERFILE_GUMPIDX 0x0b ! #define VERFILE_GUMPART 0x0c ! #define VERFILE_MULTIIDX 0x0d ! #define VERFILE_MULTI 0x0e ! #define VERFILE_SKILLSIDX 0x0f ! #define VERFILE_SKILLS 0x10 ! #define VERFILE_LIGHTIDX 0x11 // ??? ! #define VERFILE_LIGHT 0x12 // ??? ! #define VERFILE_TILEDATA 0x1e ! #define VERFILE_ANIMDATA 0x1f ! #define VERFILE_HUES 0x20 ! // don't know about these...so we'll assign them numbers for now ! #define VERFILE_ANIMINFO 0x21 ! #define VERFILE_FONTS 0x22 ! #define VERFILE_RADARCOL 0x23 ! #define VERFILE_VERDATA 0x24 ! #define VERFILE_MAP2 0x25 ! #define VERFILE_STAIDX2 0x26 ! #define VERFILE_STATICS2 0x27 ! #define VERFILE_ANIM2 0x28 ! #define VERFILE_ANIMIDX2 0x29 ! ! #define VERFILE_MAP3 0x30 ! #define VERFILE_STAIDX3 0x31 ! #define VERFILE_STATICS3 0x32 ! #define VERFILE_ANIM3 0x33 ! #define VERFILE_ANIMIDX3 0x34 ! #define VERFILE_MAPDIF3 0x35 ! #define VERFILE_MAPDIFL3 0x36 ! #define VERFILE_STADIF3 0x37 ! #define VERFILE_STADIFI3 0x38 ! #define VERFILE_STADIFL3 0x39 ! ! #define VERFILE_MAPDIF0 0x40 ! #define VERFILE_MAPDIF1 0x41 ! #define VERFILE_MAPDIF2 0x42 ! #define VERFILE_MAPDIFL0 0x43 ! #define VERFILE_MAPDIFL1 0x44 ! #define VERFILE_MAPDIFL2 0x45 ! #define VERFILE_STADIF0 0x46 ! #define VERFILE_STADIF1 0x47 ! #define VERFILE_STADIF2 0x48 ! #define VERFILE_STADIFI0 0x49 ! #define VERFILE_STADIFI1 0x4a ! #define VERFILE_STADIFI2 0x4b ! #define VERFILE_STADIFL0 0x4c ! #define VERFILE_STADIFL1 0x4d ! #define VERFILE_STADIFL2 0x4e ! #define VERFILE_ENDOFTABLE 0x4f CString TranslateFilename(CString sFile); --- 79,143 ---- #define PROFILE_REMOTE 3 ! enum Muls ! { ! Map0 = 0, ! StaIdx0, ! Statics0, ! ArtIdx, ! Art, ! AnimIdx, ! Anim, ! SoundIdx, ! Sound, ! TexIdx, ! Texmaps, // 0x0A ! GumpIdx, ! Gump, ! MultiIdx, ! Multi, ! SkillsIdx, ! Skills, // 0x10 ! LightIdx, ! Lights, ! Tiledata = 0x1e, ! Animdata = 0x1f, ! Hues, ! Animinfo, ! Fonts, ! Radarcol, ! Verdata, ! Map2, ! StaIdx2, ! Statics2, ! Anim2, ! Anim2Idx, ! Map3, ! StaIdx3, ! Statics3, ! Anim3, ! Anim3Idx, ! // For some reason, the diff files are out of order in the ActiveX controls. ! MapDif3, ! MapDifl3, ! StaDif3, ! StaDifi3, ! StaDifl3, ! MapDif0, ! MapDif1, ! MapDif2, ! MapDifl0, ! MapDifl1, ! MapDifl2, ! StaDif0, ! StaDif1, ! StaDif2, ! StaDifi0, ! StaDifi1, ! StaDifi2, ! StaDifl0, ! StaDifl1, ! StaDifl2, ! MulCount ! }; CString TranslateFilename(CString sFile); *************** *** 200,203 **** --- 201,207 ---- bool WriteTeleporters(CString sTargetFile, CStdioFile &csfOutput); bool WriteMoongates(CString sTargetFile, CStdioFile &csfOutput); + + CString MulPath() { return m_sMulPath; } + CString MulFile(ULONG index); #define TEMPLATE_INDEX_BASE 101500 Index: XMLConfig.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/XMLConfig.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** XMLConfig.cpp 2 Jul 2003 13:54:17 -0000 1.5 --- XMLConfig.cpp 16 Jul 2003 22:01:59 -0000 1.6 *************** *** 23,27 **** { m_iProfileCount = 0; - m_sMulFiles.resize(MulCount, _T("")); } --- 23,26 ---- Index: XMLConfig.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/XMLConfig.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** XMLConfig.h 2 Jul 2003 13:54:17 -0000 1.5 --- XMLConfig.h 16 Jul 2003 22:01:59 -0000 1.6 *************** *** 16,80 **** #endif - enum Muls - { - Map0 = 0, - StaIdx0, - Statics0, - ArtIdx, - Art, - AnimIdx, - Anim, - SoundIdx, - Sound, - TexIdx, - Texmaps, // 0x0A - GumpIdx, - Gump, - MultiIdx, - Multi, - SkillsIdx, - Skills, // 0x10 - LightIdx, - Lights, - Tiledata = 0x1e, - Animdata = 0x1f, - Hues, - Animinfo, - Fonts, - Radarcol, - Verdata, - Map2, - StaIdx2, - Statics2, - Anim2, - Anim2Idx, - Map3, - StaIdx3, - Statics3, - Anim3, - Anim3Idx, - // For some reason, the diff files are out of order in the ActiveX controls. - MapDif3, - MapDifl3, - StaDif3, - StaDifi3, - StaDifl3, - MapDif0, - MapDif1, - MapDif2, - MapDifl0, - MapDifl1, - MapDifl2, - StaDif0, - StaDif1, - StaDif2, - StaDifi0, - StaDifi1, - StaDifi2, - StaDifl0, - StaDifl1, - StaDifl2, - MulCount - }; class CXMLConfig : public CXMLBase --- 16,19 ---- *************** *** 92,99 **** void AddProfile(CScriptProfile * pNewProfile); void DeleteProfile(CScriptProfile * pProfile); - CString MulPath() { return m_sMulPath; } - CString MulFile(int index) { if ( index < MulCount && index >= Map0 ) return m_sMulFiles[index]; else return _T(""); } - void MulPath(CString s) { m_sMulPath = s; } - void MulFile(int index, CString s) { if ( index < MulCount && index >= Map0 ) m_sMulFiles[index] = s; } protected: --- 31,34 ---- *************** *** 102,107 **** xmlDocPtr m_pXMLDoc; CString m_sLocaleFile; - CString m_sMulPath; - vector<CString> m_sMulFiles; bool LoadFromRegistry(); --- 37,40 ---- |
From: Philip E. <pes...@us...> - 2003-07-15 21:45:04
|
Update of /cvsroot/sphere-axis/Axis/Scripts In directory sc8-pr-cvs1:/tmp/cvs-serv13498/Scripts Modified Files: Scripts.idl Sphere.cpp Sphere.h Log Message: no message Index: Scripts.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Scripts.idl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Scripts.idl 30 May 2003 20:06:15 -0000 1.5 --- Scripts.idl 15 Jul 2003 21:45:01 -0000 1.6 *************** *** 124,127 **** --- 124,129 ---- [id(73), helpstring("method ExportCategories")] HRESULT ExportCategories([in] BSTR filename); [id(74), helpstring("method InvokeRemoteConsole")] HRESULT InvokeRemoteConsole(void); + [id(75), helpstring("method SetMulPath")] HRESULT SetMulPath([in] BSTR path); + [id(76), helpstring("method SetMulFile")] HRESULT SetMulFile([in] ULONG index, [in] BSTR file); }; Index: Sphere.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Sphere.cpp 30 May 2003 20:06:15 -0000 1.5 --- Sphere.cpp 15 Jul 2003 21:45:01 -0000 1.6 *************** *** 710,711 **** --- 710,729 ---- return S_OK; } + + STDMETHODIMP CSphere::SetMulPath(BSTR path) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } + + STDMETHODIMP CSphere::SetMulFile(ULONG index, BSTR file) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } Index: Sphere.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Sphere.h 30 May 2003 20:06:15 -0000 1.5 --- Sphere.h 15 Jul 2003 21:45:01 -0000 1.6 *************** *** 152,155 **** --- 152,157 ---- STDMETHOD(ExportCategories)(BSTR filename); STDMETHOD(InvokeRemoteConsole)(void); + STDMETHOD(SetMulPath)(BSTR path); + STDMETHOD(SetMulFile)(ULONG index, BSTR file); }; |
From: Philip E. <pes...@us...> - 2003-07-15 21:45:04
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv13498/S_Sphere52 Modified Files: S_Sphere52.idl Scripts.cpp Scripts.h ScriptsMain.cpp ScriptsMain.h Log Message: no message Index: S_Sphere52.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.idl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** S_Sphere52.idl 30 May 2003 20:06:14 -0000 1.5 --- S_Sphere52.idl 15 Jul 2003 21:45:01 -0000 1.6 *************** *** 120,123 **** --- 120,125 ---- [id(73), helpstring("method ExportCategories")] HRESULT ExportCategories([in] BSTR filename); [id(74), helpstring("method InvokeRemoteConsole")] HRESULT InvokeRemoteConsole(void); + [id(75), helpstring("method SetMulPath")] HRESULT SetMulPath([in] BSTR path); + [id(76), helpstring("method SetMulFile")] HRESULT SetMulFile([in] ULONG index, [in] BSTR file); }; [ Index: Scripts.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** Scripts.cpp 13 Jun 2003 19:58:09 -0000 1.7 --- Scripts.cpp 15 Jul 2003 21:45:01 -0000 1.8 *************** *** 745,750 **** AFX_MANAGE_STATE(AfxGetStaticModuleState()); ! // TODO: Add your implementation code here return S_OK; } --- 745,782 ---- AFX_MANAGE_STATE(AfxGetStaticModuleState()); ! m_pScripts->InvokeRemoteConsole(); return S_OK; } + + STDMETHODIMP CScripts::SetMulPath(BSTR path) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + CString s; + #ifdef _UNICODE + s.Format(_T("%s"), path); + #else + s.Format(_T("%S"), path); + #endif + + m_pScripts->SetMulPath(s); + + return S_OK; + } + + STDMETHODIMP CScripts::SetMulFile(ULONG index, BSTR file) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + CString s; + #ifdef _UNICODE + s.Format(_T("%s"), file); + #else + s.Format(_T("%S"), file); + #endif + + m_pScripts->SetMulFile(index, s); + + return S_OK; + } \ No newline at end of file Index: Scripts.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** Scripts.h 13 Jun 2003 19:58:09 -0000 1.7 --- Scripts.h 15 Jul 2003 21:45:01 -0000 1.8 *************** *** 143,146 **** --- 143,148 ---- STDMETHOD(ExportCategories)(BSTR filename); STDMETHOD(InvokeRemoteConsole)(void); + STDMETHOD(SetMulPath)(BSTR path); + STDMETHOD(SetMulFile)(ULONG index, BSTR file); }; Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** ScriptsMain.cpp 10 Jul 2003 21:49:37 -0000 1.24 --- ScriptsMain.cpp 15 Jul 2003 21:45:01 -0000 1.25 *************** *** 3461,3462 **** --- 3461,3480 ---- return _T("S_Sphere52 version 1.0 alpha"); } + + void CScriptsMain::InvokeRemoteConsole() + { + } + + void CScriptsMain::SetMulPath(CString sPath) + { + m_sMulPath = sPath; + } + + void CScriptsMain::SetMulFile(ULONG index, CString sFile) + { + if ( index >= VERFILE_ENDOFTABLE ) + return; + if ( index > m_vFiles.size() ) + m_vMulFiles.resize(index, _T("") ); + m_vMulFiles[index] = sFile; + } \ No newline at end of file Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** ScriptsMain.h 10 Jul 2003 21:49:37 -0000 1.15 --- ScriptsMain.h 15 Jul 2003 21:45:01 -0000 1.16 *************** *** 79,82 **** --- 79,143 ---- #define PROFILE_REMOTE 3 + #define VERFILE_MAP0 0x00 + #define VERFILE_STAIDX0 0x01 + #define VERFILE_STATICS0 0x02 + #define VERFILE_ARTIDX 0x03 + #define VERFILE_ART 0x04 + #define VERFILE_ANIMIDX 0x05 + #define VERFILE_ANIM 0x06 + #define VERFILE_SOUNDIDX 0x07 + #define VERFILE_SOUND 0x08 + #define VERFILE_TEXIDX 0x09 + #define VERFILE_TEXMAPS 0x0a + #define VERFILE_GUMPIDX 0x0b + #define VERFILE_GUMPART 0x0c + #define VERFILE_MULTIIDX 0x0d + #define VERFILE_MULTI 0x0e + #define VERFILE_SKILLSIDX 0x0f + #define VERFILE_SKILLS 0x10 + #define VERFILE_LIGHTIDX 0x11 // ??? + #define VERFILE_LIGHT 0x12 // ??? + #define VERFILE_TILEDATA 0x1e + #define VERFILE_ANIMDATA 0x1f + #define VERFILE_HUES 0x20 + // don't know about these...so we'll assign them numbers for now + #define VERFILE_ANIMINFO 0x21 + #define VERFILE_FONTS 0x22 + #define VERFILE_RADARCOL 0x23 + #define VERFILE_VERDATA 0x24 + #define VERFILE_MAP2 0x25 + #define VERFILE_STAIDX2 0x26 + #define VERFILE_STATICS2 0x27 + #define VERFILE_ANIM2 0x28 + #define VERFILE_ANIMIDX2 0x29 + + #define VERFILE_MAP3 0x30 + #define VERFILE_STAIDX3 0x31 + #define VERFILE_STATICS3 0x32 + #define VERFILE_ANIM3 0x33 + #define VERFILE_ANIMIDX3 0x34 + #define VERFILE_MAPDIF3 0x35 + #define VERFILE_MAPDIFL3 0x36 + #define VERFILE_STADIF3 0x37 + #define VERFILE_STADIFI3 0x38 + #define VERFILE_STADIFL3 0x39 + + #define VERFILE_MAPDIF0 0x40 + #define VERFILE_MAPDIF1 0x41 + #define VERFILE_MAPDIF2 0x42 + #define VERFILE_MAPDIFL0 0x43 + #define VERFILE_MAPDIFL1 0x44 + #define VERFILE_MAPDIFL2 0x45 + #define VERFILE_STADIF0 0x46 + #define VERFILE_STADIF1 0x47 + #define VERFILE_STADIF2 0x48 + #define VERFILE_STADIFI0 0x49 + #define VERFILE_STADIFI1 0x4a + #define VERFILE_STADIFI2 0x4b + #define VERFILE_STADIFL0 0x4c + #define VERFILE_STADIFL1 0x4d + #define VERFILE_STADIFL2 0x4e + #define VERFILE_ENDOFTABLE 0x4f + CString TranslateFilename(CString sFile); *************** *** 263,266 **** --- 324,332 ---- void ExportCategories(CString sFilename); + void InvokeRemoteConsole(); + + void SetMulPath(CString sPath); + void SetMulFile(ULONG index, CString sFile); + protected: bool m_bDefsLoaded; *************** *** 339,342 **** --- 405,410 ---- }; + + static const char * m_pszFiles [File_QTY]; static const char * m_Editors[Editor_QTY]; *************** *** 352,354 **** --- 420,424 ---- void FindMidis(); CString Version(); + CString m_sMulPath; + vector<CString> m_vMulFiles; }; |
From: Philip E. <pes...@us...> - 2003-07-11 17:25:29
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv21560 Modified Files: NameEditDlg.cpp NameEditDlg.h NotoTitleEditDlg.cpp NotoTitleEditDlg.h npceditdlg.cpp OreEditDlg.cpp PotionEdit.cpp S_Sphere52.rc SkillTableEditDlg.cpp SpawnGroupEditDlg.cpp SpawnGroupEditDlg.h SpellEditDlg.cpp StatRateEditDlg.cpp TemplateEditDlg.cpp TriggerEditDlg.cpp Log Message: no message Index: NameEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/NameEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** NameEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- NameEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 59,63 **** DDX_Control(pDX, IDC_NAMEENTRY, m_ceNameEntry); DDX_Control(pDX, IDC_NAMEGROUPLIST, m_ccbGroupNames); - DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_ADDNAMEGROUP, m_bAddGroup); --- 59,62 ---- *************** *** 170,175 **** Localize(); - Main->m_pScripts->LoadNames(); - for ( int i = 0; i < (int) Main->m_pScripts->m_aNames.GetSize(); i++ ) { --- 169,172 ---- *************** *** 258,262 **** void CNameEditDlg::OnCancel() { - Main->m_pScripts->ReloadNames(); CDialog::OnCancel(); } --- 255,258 ---- *************** *** 269,273 **** locale->LocalizeWindow(IDD, IDC_NAMEENTRY, (CWnd*)&m_ceNameEntry, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NAMEGROUPLIST, (CWnd*)&m_ccbGroupNames, (CWnd*)this); - locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ADDNAMEGROUP, (CWnd*)&m_bAddGroup, (CWnd*)this); --- 265,268 ---- Index: NameEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/NameEditDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** NameEditDlg.h 3 Jul 2003 18:09:29 -0000 1.1 --- NameEditDlg.h 11 Jul 2003 17:25:25 -0000 1.2 *************** *** 48,52 **** CEdit m_ceNameEntry; CComboBox m_ccbGroupNames; - CButton m_bOK; CButton m_bCancel; CButton m_bAddGroup; --- 48,51 ---- Index: NotoTitleEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/NotoTitleEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** NotoTitleEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- NotoTitleEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 162,166 **** DDX_Text(pDX, IDC_NOTO_8, m_csNoto8); DDX_Text(pDX, IDC_NOTO_9, m_csNoto9); - DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_NTE_STATIC1, m_sStatic1); --- 162,165 ---- *************** *** 394,399 **** CDialog::OnInitDialog(); - Main->m_pScripts->LoadTables(); - int index = 0; for ( int i = 0; i < Main->m_pScripts->m_tables.m_notoTitles.GetSize(); i++ ) --- 393,396 ---- *************** *** 471,475 **** locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_cbSave, (CWnd*)this); - locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NTE_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); --- 468,471 ---- Index: NotoTitleEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/NotoTitleEditDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** NotoTitleEditDlg.h 3 Jul 2003 18:09:29 -0000 1.1 --- NotoTitleEditDlg.h 11 Jul 2003 17:25:25 -0000 1.2 *************** *** 99,103 **** CString m_csNoto8; CString m_csNoto9; - CButton m_bOK; CButton m_bCancel; CStatic m_sStatic1; --- 99,102 ---- Index: npceditdlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/npceditdlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** npceditdlg.cpp 10 Jul 2003 21:49:36 -0000 1.3 --- npceditdlg.cpp 11 Jul 2003 17:25:25 -0000 1.4 *************** *** 235,246 **** m_iEdits = 0; - Main->m_pScripts->LoadDefs(); - Main->m_pScripts->LoadNPCs(); - Main->m_pScripts->LoadTables(); - Main->m_pScripts->LoadItems(); - Main->m_pScripts->LoadTemplates(); - Main->m_pScripts->LoadSpeechBlocks(); - Main->m_pScripts->LoadNames(); - // Fill in the Combo Boxes with data from the Defs file --- 235,238 ---- Index: OreEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/OreEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** OreEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- OreEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 259,264 **** CDialog::OnInitDialog(); Localize(); ! Main->m_pScripts->LoadTables(); ! this->m_clcOreList.InsertColumn(0, locale->String(IDS_GENERIC_NAME), LVCFMT_LEFT, 80); this->m_clcOreList.InsertColumn(1, locale->String(IDS_GENERIC_COLOUR), LVCFMT_LEFT, 60); --- 259,263 ---- CDialog::OnInitDialog(); Localize(); ! this->m_clcOreList.InsertColumn(0, locale->String(IDS_GENERIC_NAME), LVCFMT_LEFT, 80); this->m_clcOreList.InsertColumn(1, locale->String(IDS_GENERIC_COLOUR), LVCFMT_LEFT, 60); *************** *** 328,332 **** void COreEditDlg::OnCancel() { - Main->m_pScripts->ReloadTables(); CDialog::OnCancel(); } --- 327,330 ---- Index: PotionEdit.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/PotionEdit.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** PotionEdit.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- PotionEdit.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 91,96 **** m_pCurrentPotion = NULL; - Main->m_pScripts->LoadDefs(); - Main->m_pScripts->LoadTables(); for ( int i = 0; i < (int) Main->m_pScripts->m_tables.m_potions.GetSize(); i++ ) { --- 91,94 ---- *************** *** 222,226 **** void CPotionEdit::OnCancel() { - Main->m_pScripts->ReloadTables(); CDialog::OnCancel(); } --- 220,223 ---- Index: S_Sphere52.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.rc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** S_Sphere52.rc 10 Jul 2003 21:49:36 -0000 1.11 --- S_Sphere52.rc 11 Jul 2003 17:25:25 -0000 1.12 *************** *** 654,674 **** DEFPUSHBUTTON "OK",IDOK,180,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,180,24,50,14 ! LTEXT "Potion Entry",1716,23,9,39,8 COMBOBOX IDC_POTIONENTRY,65,7,98,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Name",1717,41,33,20,8 EDITTEXT IDC_POTIONNAME,65,31,98,12,ES_AUTOHSCROLL ! LTEXT "Item",1718,47,48,14,8 COMBOBOX IDC_POTIONITEM,65,46,98,68,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Reagent",1719,33,63,28,8 COMBOBOX IDC_POTIONREAGENT,65,61,98,68,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Reagent Amount",1720,7,78,54,8 EDITTEXT IDC_POTIONREAGENTAMOUNT,65,76,52,13,ES_AUTOHSCROLL | ES_NUMBER ! LTEXT "Skill Required",1721,17,94,44,8 EDITTEXT IDC_POTIONSKILLREQUIRED,65,92,52,13,ES_AUTOHSCROLL ! LTEXT "Colour",1722,41,110,21,8 EDITTEXT IDC_POTIONCOLOUR,65,108,52,13,ES_AUTOHSCROLL CONTROL "",IDC_POTIONCOLOURPALETTE,"Static",SS_BITMAP | --- 654,674 ---- DEFPUSHBUTTON "OK",IDOK,180,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,180,24,50,14 ! LTEXT "Potion Entry",IDC_PE_STATIC1,23,9,39,8 COMBOBOX IDC_POTIONENTRY,65,7,98,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Name",IDC_PE_STATIC2,41,33,20,8 EDITTEXT IDC_POTIONNAME,65,31,98,12,ES_AUTOHSCROLL ! LTEXT "Item",IDC_PE_STATIC3,47,48,14,8 COMBOBOX IDC_POTIONITEM,65,46,98,68,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Reagent",IDC_PE_STATIC4,33,63,28,8 COMBOBOX IDC_POTIONREAGENT,65,61,98,68,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Reagent Amount",IDC_PE_STATIC5,7,78,54,8 EDITTEXT IDC_POTIONREAGENTAMOUNT,65,76,52,13,ES_AUTOHSCROLL | ES_NUMBER ! LTEXT "Skill Required",IDC_PE_STATIC6,17,94,44,8 EDITTEXT IDC_POTIONSKILLREQUIRED,65,92,52,13,ES_AUTOHSCROLL ! LTEXT "Colour",IDC_PE_STATIC7,41,110,21,8 EDITTEXT IDC_POTIONCOLOUR,65,108,52,13,ES_AUTOHSCROLL CONTROL "",IDC_POTIONCOLOURPALETTE,"Static",SS_BITMAP | Index: SkillTableEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/SkillTableEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SkillTableEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- SkillTableEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 126,130 **** CWaitCursor hourglass; - Main->m_pScripts->LoadTables(); // Throw the skills into the combo box for (int i = 0; i < (int) Main->m_pScripts->m_tables.m_skills.GetSize(); i++) --- 126,129 ---- *************** *** 351,355 **** void CSkillTableEditDlg::OnCancel() { - Main->m_pScripts->ReloadTables(); CDialog::OnCancel(); } --- 350,353 ---- Index: SpawnGroupEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/SpawnGroupEditDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SpawnGroupEditDlg.cpp 10 Jul 2003 21:49:37 -0000 1.1 --- SpawnGroupEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.2 *************** *** 75,79 **** DDX_Control(pDX, IDC_SGE_STATIC2, m_sStatic2); DDX_Control(pDX, IDC_SGE_STATIC3, m_sStatic3); - DDX_Control(pDX, IDC_SGE_STATIC4, m_sStatic4); DDX_Control(pDX, IDC_SGE_STATIC5, m_sStatic5); DDX_Control(pDX, IDC_SGE_STATIC6, m_sStatic6); --- 75,78 ---- *************** *** 339,342 **** --- 338,342 ---- void CSpawnGroupEditDlg::OnCancel() { + CDialog::OnCancel(); } *************** *** 518,522 **** locale->LocalizeWindow(IDD, IDC_SGE_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC3, (CWnd*)&m_sStatic3, (CWnd*)this); - locale->LocalizeWindow(IDD, IDC_SGE_STATIC4, (CWnd*)&m_sStatic4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC5, (CWnd*)&m_sStatic5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC6, (CWnd*)&m_sStatic6, (CWnd*)this); --- 518,521 ---- Index: SpawnGroupEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/SpawnGroupEditDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SpawnGroupEditDlg.h 10 Jul 2003 21:49:37 -0000 1.1 --- SpawnGroupEditDlg.h 11 Jul 2003 17:25:25 -0000 1.2 *************** *** 77,81 **** CStatic m_sStatic2; CStatic m_sStatic3; - CStatic m_sStatic4; CStatic m_sStatic5; CStatic m_sStatic6; --- 77,80 ---- Index: SpellEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/SpellEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SpellEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- SpellEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 162,168 **** Localize(); - Main->m_pScripts->LoadDefs(); - Main->m_pScripts->LoadTables(); - FillData(); FillReagents(); --- 162,165 ---- *************** *** 406,410 **** void CSpellEditDlg::OnCancel() { - Main->m_pScripts->ReloadTables(); CDialog::OnCancel(); } --- 403,406 ---- Index: StatRateEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/StatRateEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** StatRateEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- StatRateEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 135,140 **** Localize(); - Main->m_pScripts->LoadTables(); - CString csAdv; csAdv.Format(_T("%ld"), Main->m_pScripts->m_tables.m_statAdvance[STAT_STR].m_Rate[0]); --- 135,138 ---- Index: TemplateEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/TemplateEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** TemplateEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- TemplateEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.3 *************** *** 74,78 **** DDX_Control(pDX, IDC_TMPL_ITEM, m_ccbItem); DDX_Control(pDX, IDC_TMPL_CONTAINER, m_ccbContainer); - DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_TPLE_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_TPLE_STATIC2, m_sStatic2); --- 74,77 ---- *************** *** 258,261 **** --- 257,262 ---- { // Show the values for the new selection + if ( m_ccbID.GetCurSel() == LB_ERR ) + return; this->m_pSelectedTemplate = ( CTemplate * ) this->m_ccbID.GetItemData( this->m_ccbID.GetCurSel() ); CopyItems(&(m_pSelectedTemplate->m_olItemList), &m_olItems); *************** *** 505,509 **** locale->LocalizeWindow(IDD, IDC_TMPL_ITEM, (CWnd*)&m_ccbItem, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TMPL_CONTAINER, (CWnd*)&m_ccbContainer, (CWnd*)this); - locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TPLE_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TPLE_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); --- 506,509 ---- Index: TriggerEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/TriggerEditDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TriggerEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.1 --- TriggerEditDlg.cpp 11 Jul 2003 17:25:25 -0000 1.2 *************** *** 48,51 **** --- 48,52 ---- m_dwNextRegion = 65000; m_dwNextTrig = 1400; + m_pCurrentTrigger = NULL; } |
From: Philip E. <pes...@us...> - 2003-07-10 21:49:56
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv24976 Modified Files: EditorTab.cpp Log Message: no message Index: EditorTab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/EditorTab.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** EditorTab.cpp 12 Jun 2003 03:15:31 -0000 1.8 --- EditorTab.cpp 10 Jul 2003 21:49:53 -0000 1.9 *************** *** 219,398 **** void CEditorTab::OnEditor1() { ! Main->m_pScripts->InvokeEditor(1); } void CEditorTab::OnEditor2() { ! Main->m_pScripts->InvokeEditor(2); } void CEditorTab::OnEditor3() { ! Main->m_pScripts->InvokeEditor(3); } void CEditorTab::OnEditor4() { ! Main->m_pScripts->InvokeEditor(4); } void CEditorTab::OnEditor5() { ! Main->m_pScripts->InvokeEditor(5); } void CEditorTab::OnEditor6() { ! Main->m_pScripts->InvokeEditor(6); } void CEditorTab::OnEditor7() { ! Main->m_pScripts->InvokeEditor(7); } void CEditorTab::OnEditor8() { ! Main->m_pScripts->InvokeEditor(8); } void CEditorTab::OnEditor9() { ! Main->m_pScripts->InvokeEditor(9); } void CEditorTab::OnEditor10() { ! Main->m_pScripts->InvokeEditor(10); } void CEditorTab::OnEditor11() { ! Main->m_pScripts->InvokeEditor(11); } void CEditorTab::OnEditor12() { ! Main->m_pScripts->InvokeEditor(12); } void CEditorTab::OnEditor13() { ! Main->m_pScripts->InvokeEditor(13); } void CEditorTab::OnEditor14() { ! Main->m_pScripts->InvokeEditor(14); } void CEditorTab::OnEditor15() { ! Main->m_pScripts->InvokeEditor(15); } void CEditorTab::OnEditor16() { ! Main->m_pScripts->InvokeEditor(16); } void CEditorTab::OnEditor17() { ! Main->m_pScripts->InvokeEditor(17); } void CEditorTab::OnEditor18() { ! Main->m_pScripts->InvokeEditor(18); } void CEditorTab::OnEditor19() { ! Main->m_pScripts->InvokeEditor(19); } void CEditorTab::OnEditor20() { ! Main->m_pScripts->InvokeEditor(20); } void CEditorTab::OnEditor21() { ! Main->m_pScripts->InvokeEditor(21); } void CEditorTab::OnEditor22() { ! Main->m_pScripts->InvokeEditor(22); } void CEditorTab::OnEditor23() { ! Main->m_pScripts->InvokeEditor(23); } void CEditorTab::OnEditor24() { ! Main->m_pScripts->InvokeEditor(24); } void CEditorTab::OnEditor25() { ! Main->m_pScripts->InvokeEditor(25); } void CEditorTab::OnEditor26() { ! Main->m_pScripts->InvokeEditor(26); } void CEditorTab::OnEditor27() { ! Main->m_pScripts->InvokeEditor(27); } void CEditorTab::OnEditor28() { ! Main->m_pScripts->InvokeEditor(28); } void CEditorTab::OnEditor29() { ! Main->m_pScripts->InvokeEditor(29); } void CEditorTab::OnEditor30() { ! Main->m_pScripts->InvokeEditor(30); } void CEditorTab::OnEditor31() { ! Main->m_pScripts->InvokeEditor(31); } void CEditorTab::OnEditor32() { ! Main->m_pScripts->InvokeEditor(32); } void CEditorTab::OnEditor33() { ! Main->m_pScripts->InvokeEditor(33); } void CEditorTab::OnEditor34() { ! Main->m_pScripts->InvokeEditor(34); } void CEditorTab::OnEditor35() { ! Main->m_pScripts->InvokeEditor(35); } void CEditorTab::OnEditor36() { ! Main->m_pScripts->InvokeEditor(36); } --- 219,398 ---- void CEditorTab::OnEditor1() { ! Main->m_pScripts->InvokeEditor(0); } void CEditorTab::OnEditor2() { ! Main->m_pScripts->InvokeEditor(1); } void CEditorTab::OnEditor3() { ! Main->m_pScripts->InvokeEditor(2); } void CEditorTab::OnEditor4() { ! Main->m_pScripts->InvokeEditor(3); } void CEditorTab::OnEditor5() { ! Main->m_pScripts->InvokeEditor(4); } void CEditorTab::OnEditor6() { ! Main->m_pScripts->InvokeEditor(5); } void CEditorTab::OnEditor7() { ! Main->m_pScripts->InvokeEditor(6); } void CEditorTab::OnEditor8() { ! Main->m_pScripts->InvokeEditor(7); } void CEditorTab::OnEditor9() { ! Main->m_pScripts->InvokeEditor(8); } void CEditorTab::OnEditor10() { ! Main->m_pScripts->InvokeEditor(9); } void CEditorTab::OnEditor11() { ! Main->m_pScripts->InvokeEditor(10); } void CEditorTab::OnEditor12() { ! Main->m_pScripts->InvokeEditor(11); } void CEditorTab::OnEditor13() { ! Main->m_pScripts->InvokeEditor(12); } void CEditorTab::OnEditor14() { ! Main->m_pScripts->InvokeEditor(13); } void CEditorTab::OnEditor15() { ! Main->m_pScripts->InvokeEditor(14); } void CEditorTab::OnEditor16() { ! Main->m_pScripts->InvokeEditor(15); } void CEditorTab::OnEditor17() { ! Main->m_pScripts->InvokeEditor(16); } void CEditorTab::OnEditor18() { ! Main->m_pScripts->InvokeEditor(17); } void CEditorTab::OnEditor19() { ! Main->m_pScripts->InvokeEditor(18); } void CEditorTab::OnEditor20() { ! Main->m_pScripts->InvokeEditor(19); } void CEditorTab::OnEditor21() { ! Main->m_pScripts->InvokeEditor(20); } void CEditorTab::OnEditor22() { ! Main->m_pScripts->InvokeEditor(21); } void CEditorTab::OnEditor23() { ! Main->m_pScripts->InvokeEditor(22); } void CEditorTab::OnEditor24() { ! Main->m_pScripts->InvokeEditor(23); } void CEditorTab::OnEditor25() { ! Main->m_pScripts->InvokeEditor(24); } void CEditorTab::OnEditor26() { ! Main->m_pScripts->InvokeEditor(25); } void CEditorTab::OnEditor27() { ! Main->m_pScripts->InvokeEditor(26); } void CEditorTab::OnEditor28() { ! Main->m_pScripts->InvokeEditor(27); } void CEditorTab::OnEditor29() { ! Main->m_pScripts->InvokeEditor(28); } void CEditorTab::OnEditor30() { ! Main->m_pScripts->InvokeEditor(29); } void CEditorTab::OnEditor31() { ! Main->m_pScripts->InvokeEditor(30); } void CEditorTab::OnEditor32() { ! Main->m_pScripts->InvokeEditor(31); } void CEditorTab::OnEditor33() { ! Main->m_pScripts->InvokeEditor(32); } void CEditorTab::OnEditor34() { ! Main->m_pScripts->InvokeEditor(33); } void CEditorTab::OnEditor35() { ! Main->m_pScripts->InvokeEditor(34); } void CEditorTab::OnEditor36() { ! Main->m_pScripts->InvokeEditor(35); } |
From: Philip E. <pes...@us...> - 2003-07-10 21:49:40
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv24912 Modified Files: itemeditdlg.cpp itemeditdlg.h npceditdlg.cpp Resource.h S_Sphere52.rc S_Sphere52.vcproj ScriptsMain.cpp ScriptsMain.h strings.h types.cpp Added Files: SpawnGroupEditDlg.cpp SpawnGroupEditDlg.h Log Message: no message --- NEW FILE: SpawnGroupEditDlg.cpp --- /* $Id: SpawnGroupEditDlg.cpp,v 1.1 2003/07/10 21:49:37 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // SpawnGroupEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "SpawnGroupEditDlg.h" #include "NPC.h" #include "AddValueDialog.h" #include "FileReadProgress.h" #include "EditValue.h" #include "SpawnRec.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CSpawnGroupEditDlg dialog int CSpawnGroupEditDlg::iIDSort = 1; int CSpawnGroupEditDlg::iNameSort = 1; CSpawnGroupEditDlg::CSpawnGroupEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CSpawnGroupEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CSpawnGroupEditDlg) //}}AFX_DATA_INIT m_pSpawn = NULL; m_pNPCCategories = NULL; } void CSpawnGroupEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CSpawnGroupEditDlg) DDX_Control(pDX, IDC_SGNAME, m_ceName); DDX_Control(pDX, IDC_SGENTRY, m_ccbSpawnGroupEntry); DDX_Control(pDX, IDC_SGDESCRIPTION, m_ceDescription); DDX_Control(pDX, IDC_SGCATEGORY, m_ccbCategory); DDX_Control(pDX, IDC_SGWEIGHT, m_ceWeight); DDX_Control(pDX, IDC_SPAWNGROUPLIST, m_clcSpawnGroupList); DDX_Control(pDX, IDC_SGNPCLIST, m_clcNPCList); DDX_Control(pDX, IDC_SGCATEGORYTREE, m_ctcCategoryTree); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_SGADDCATEGORY, m_bAddCat); DDX_Control(pDX, IDC_SGADD, m_bAddSG); DDX_Control(pDX, IDC_SGREMOVE, m_bRemoveSG); DDX_Control(pDX, IDC_SGE_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_SGE_STATIC2, m_sStatic2); DDX_Control(pDX, IDC_SGE_STATIC3, m_sStatic3); DDX_Control(pDX, IDC_SGE_STATIC4, m_sStatic4); DDX_Control(pDX, IDC_SGE_STATIC5, m_sStatic5); DDX_Control(pDX, IDC_SGE_STATIC6, m_sStatic6); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CSpawnGroupEditDlg, CDialog) //{{AFX_MSG_MAP(CSpawnGroupEditDlg) ON_CBN_SELCHANGE(IDC_SGCATEGORY, OnSelchangeSgcategory) ON_NOTIFY(TVN_SELCHANGED, IDC_SGCATEGORYTREE, OnSelchangedSgcategorytree) ON_BN_CLICKED(IDC_SGADDCATEGORY, OnSgaddcategory) ON_BN_CLICKED(IDC_SGADD, OnSgadd) ON_BN_CLICKED(IDC_SGREMOVE, OnSgremove) ON_NOTIFY(NM_CLICK, IDC_SGNPCLIST, OnClickSgnpclist) ON_NOTIFY(NM_DBLCLK, IDC_SGNPCLIST, OnDblclkSgnpclist) ON_NOTIFY(LVN_KEYDOWN, IDC_SPAWNGROUPLIST, OnKeydownSpawngrouplist) ON_CBN_SELCHANGE(IDC_SGENTRY, OnSelchangeSgname) ON_BN_CLICKED(IDC_NEWSPAWNGROUP, OnNewspawngroup) ON_NOTIFY(NM_DBLCLK, IDC_SPAWNGROUPLIST, OnDblclkSpawngrouplist) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CSpawnGroupEditDlg message handlers BOOL CSpawnGroupEditDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); CFileReadProgress dlg; dlg.Create(IDD_FILEREAD_PROGRESS); CategorizeNPCs(); CString csTitle; this->SetWindowText(csTitle); this->m_clcSpawnGroupList.InsertColumn(0, locale->String(IDS_GENERIC_CREATURE), LVCFMT_LEFT, 175); this->m_clcSpawnGroupList.InsertColumn(1, locale->String(IDS_GENERIC_WEIGHT), LVCFMT_LEFT, 75); this->m_clcNPCList.InsertColumn(0, locale->String(IDS_GENERIC_CREATURE), LVCFMT_LEFT, 125); this->m_clcNPCList.InsertColumn(1, locale->String(IDS_ITEMGEN_ID), LVCFMT_LEFT, 50); FillCategoryList(); FillCategoryTree(); int iSel = -1; for ( int i = 0; i < (int) Main->m_pScripts->m_tables.m_spawns.GetSize(); i++ ) { CCategorizedScriptBase * pBase = (CCategorizedScriptBase *) Main->m_pScripts->m_tables.m_spawns.GetAt(i); if ( !pBase ) continue; CString csId; csId.Format(_T("%s [%s]"), pBase->m_csDescription, pBase->m_csValue); int index = this->m_ccbSpawnGroupEntry.AddString(csId); this->m_ccbSpawnGroupEntry.SetItemDataPtr(index, (void *) pBase); if ( m_pSpawn && m_pSpawn->m_csValue == pBase->m_csValue ) iSel = index; } if ( iSel != -1 ) { this->m_ccbSpawnGroupEntry.SetCurSel(iSel); PopulateFields(); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CSpawnGroupEditDlg::FillCategoryTree() { m_ctcCategoryTree.DeleteAllItems(); FillCategoryNode(m_pNPCCategories, NULL); } void CSpawnGroupEditDlg::FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent) { HTREEITEM hItem; if ( m_pNPCCategories != pCategory ) { // Insert this guy first TV_INSERTSTRUCT InsertItem; InsertItem.item.mask = TVIF_TEXT; InsertItem.item.pszText = (TCHAR*)LPCTSTR(pCategory->GetName()); InsertItem.item.cchTextMax = pCategory->GetName().GetLength(); InsertItem.hParent = hParent; InsertItem.hInsertAfter = TVI_SORT; hItem = m_ctcCategoryTree.InsertItem(&InsertItem); m_ctcCategoryTree.SetItemData(hItem, (DWORD_PTR) pCategory); } else hItem = hParent; // Now insert all of its children for ( int i = 0; i < pCategory->ChildCount(); i++ ) { CCategoryTree * pTree = pCategory->GetChild(i); if ( pTree ) FillCategoryNode(pTree, hItem); } } void CSpawnGroupEditDlg::FillCategoryList() { } void CSpawnGroupEditDlg::CategorizeNPCs() { if ( m_pNPCCategories ) delete m_pNPCCategories; CFileReadProgress progress; progress.Create(IDD_FILEREAD_PROGRESS); progress.SetWindowText(_T("Categorizing...")); progress.m_csMessage.SetWindowText(locale->String(IDS_CATNPCS)); progress.SetRange32(0, Main->m_pScripts->CharCount()); progress.SetPos(0); m_pNPCCategories = new CCategoryTree; for ( int i = 0; i < (int) Main->m_pScripts->CharCount(); i++ ) { if ( Main->m_pScripts->CharDontCategorize(i) ) continue; CString sCategory; sCategory = Main->m_pScripts->CharCategory(i); if ( sCategory == _T("") ) sCategory = _T("<none>"); CCategoryTree * pCategory = m_pNPCCategories->FindNode(sCategory); pCategory->AddEntry(i); if ( i % 5 == 0 ) progress.SetPos(i); } } void CSpawnGroupEditDlg::OnSelchangeSgcategory() { CString csCategory; m_ccbCategory.GetLBText(m_ccbCategory.GetCurSel(), csCategory); if ( (csCategory != _T(""))) { int iSel = m_ccbCategory.GetCurSel(); if (iSel == -1) return; CCategory * pCategory = (CCategory *) m_ccbCategory.GetItemData(iSel); if (pCategory == NULL) return; } } void CSpawnGroupEditDlg::OnSelchangedSgcategorytree(NMHDR* pNMHDR, LRESULT* pResult) { } int CALLBACK CSpawnGroupEditDlg::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { CCategorizedScriptBase * pItem1 = (CCategorizedScriptBase *)lParam1; if (pItem1 == NULL) return 0; CCategorizedScriptBase * pItem2 = (CCategorizedScriptBase *)lParam2; if (pItem2 == NULL) return 0; if (lParamSort == 0) { if (iNameSort == 0) return (lParam1 < lParam2 ? 1 : -1); if (iNameSort == 1) return (pItem1->m_csDescription < pItem2->m_csDescription ? -1 : 1); if (iNameSort == -1) return (pItem1->m_csDescription < pItem2->m_csDescription ? 1 : -1); } else { if (iIDSort == 0) return (lParam1 < lParam2 ? 1 : -1); if (iIDSort == 1) return (pItem1->m_csDescription < pItem2->m_csDescription ? -1 : 1); if (iIDSort == -1) return (pItem1->m_csDescription < pItem2->m_csDescription ? 1 : -1); } return 0; } void CSpawnGroupEditDlg::OnSgaddcategory() { CAddValueDialog dlg; CCategoryTree * pCategory; if (dlg.DoModal() == IDOK) { if (m_ccbCategory.FindStringExact(0, dlg.m_csValue) != CB_ERR) { AfxMessageBox(locale->String(IDS_CATEXISTS), MB_OK | MB_ICONEXCLAMATION); return; } else pCategory = m_pNPCCategories->FindNode(dlg.m_csValue); int iIndex = m_ccbCategory.AddString(dlg.m_csValue); m_ccbCategory.SetItemData(iIndex, (DWORD_PTR) pCategory); m_ccbCategory.SetCurSel(iIndex); this->OnSelchangeSgcategory(); } return; } void CSpawnGroupEditDlg::OnSgadd() { int iSel = this->m_clcNPCList.GetNextItem(-1, LVNI_SELECTED); if (iSel != -1) { CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) this->m_clcNPCList.GetItemData(iSel); if ( pObject ) { CString csCreature = this->m_clcNPCList.GetItemText(iSel, 0); CString csWeight; this->m_ceWeight.GetWindowText(csWeight); if ((csWeight == _T("")) || (csWeight == _T("0"))) csWeight = _T("1"); int iCount = this->m_clcSpawnGroupList.GetItemCount(); this->m_clcSpawnGroupList.InsertItem(iCount, csCreature); this->m_clcSpawnGroupList.SetItemText(iCount, 1, csWeight); this->m_clcSpawnGroupList.SetItemData(iCount, ahextoi(pObject->m_csValue)); } } } void CSpawnGroupEditDlg::OnSgremove() { int iSel = this->m_clcSpawnGroupList.GetNextItem(-1, LVNI_SELECTED); if (iSel != -1) this->m_clcSpawnGroupList.DeleteItem(iSel); } void CSpawnGroupEditDlg::OnOK() { CWaitCursor hourglass; RetrieveFields(); if ( Main->m_pScripts->SaveTables() ) { CFileReadProgress dlg; dlg.Create(IDD_FILEREAD_PROGRESS); CDialog::OnOK(); } } void CSpawnGroupEditDlg::OnClickSgnpclist(NMHDR* pNMHDR, LRESULT* pResult) { int iSelIndex = this->m_clcNPCList.GetNextItem(-1, LVNI_SELECTED); this->m_clcNPCList.SetHotItem(iSelIndex); *pResult = 0; } void CSpawnGroupEditDlg::OnDblclkSgnpclist(NMHDR* pNMHDR, LRESULT* pResult) { this->OnSgadd(); *pResult = 0; } void CSpawnGroupEditDlg::OnKeydownSpawngrouplist(NMHDR* pNMHDR, LRESULT* pResult) { LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pNMHDR; // Looking for the delete key if (pLVKeyDow->wVKey == VK_DELETE) this->OnSgremove(); *pResult = 0; } void CSpawnGroupEditDlg::OnCancel() { } void CSpawnGroupEditDlg::OnSelchangeSgname() { RetrieveFields(); int iSel = this->m_ccbSpawnGroupEntry.GetCurSel(); if ( iSel == -1 ) return; if ( m_pSpawn ) delete m_pSpawn; CScriptBase * pBase = (CScriptBase *) m_ccbSpawnGroupEntry.GetItemDataPtr(iSel); m_pSpawn = new CTSpawnDef; m_pSpawn->m_csFilename = pBase->m_csFilename; m_pSpawn->m_csValue = pBase->m_csValue; m_pSpawn->Load(_T("SPAWN ")); PopulateFields(); } void CSpawnGroupEditDlg::OnNewspawngroup() { CAddValueDialog dlg; dlg.m_csTitle = _T("New Spawn Group"); if ( dlg.DoModal() == IDOK ) { CTSpawnDef * pSpawn = new (CTSpawnDef); if ( !pSpawn ) return; pSpawn->m_csName = dlg.m_csValue; pSpawn->m_iIndex = Main->m_pScripts->m_tables.m_spawns.Add(pSpawn) + 0x8000; CString csID; csID.Format(_T("%04x"), pSpawn->m_iIndex); pSpawn->m_csDescription = dlg.m_csValue; pSpawn->m_csCategory = _T("Spawn Groups"); int index = this->m_ccbSpawnGroupEntry.AddString(csID); this->m_ccbSpawnGroupEntry.SetItemDataPtr(index, (void *) pSpawn); this->m_ccbSpawnGroupEntry.SetCurSel(index); OnSelchangeSgname(); } } void CSpawnGroupEditDlg::PopulateFields() { if ( m_pSpawn ) { // Populate the dialog with the current parameters this->m_clcSpawnGroupList.DeleteAllItems(); this->m_ceName.SetWindowText(m_pSpawn->m_csName); this->m_ccbCategory.SelectString(-1, m_pSpawn->m_csCategory); this->OnSelchangeSgcategory(); this->m_ceDescription.SetWindowText(m_pSpawn->m_csDescription); this->m_ceWeight.SetWindowText(_T("1")); CString csTitle; csTitle.Format(locale->String(IDS_SGEDIT_CAPTION), m_pSpawn->m_iIndex); this->SetWindowText(csTitle); int index = 0; for ( int i = 0; i < m_pSpawn->m_Members.GetSize(); i++ ) { CSpawnRec * pRec = (CSpawnRec *) m_pSpawn->m_Members.GetAt(i); if ( !pRec ) continue; int iDef = Main->m_pScripts->m_aDefs.Find(pRec->m_csID); if ( iDef != -1) { this->m_clcSpawnGroupList.InsertItem(index, pRec->m_csID); this->m_clcSpawnGroupList.SetItemData(index, 0); } else { DWORD dwID = ahextoi(pRec->m_csID); CString csID; csID.Format(_T("%04x"), dwID); int iIndex = Main->m_pScripts->m_aNPCs.Find(csID); if ( iIndex != -1 ) { CNPC * pNPC = (CNPC *) Main->m_pScripts->m_aNPCs.GetAt(iIndex); if ( pNPC ) this->m_clcSpawnGroupList.InsertItem(index, pNPC->m_csDescription); else this->m_clcSpawnGroupList.InsertItem(index, pRec->m_csID); this->m_clcSpawnGroupList.SetItemData(index, dwID); } } CString csWeight; csWeight.Format(_T("%ld"), pRec->m_iWeight); this->m_clcSpawnGroupList.SetItemText(index, 1, csWeight); index++; } } else { // Clear them all out. this->m_ccbCategory.SetWindowText(_T("")); this->m_ceDescription.SetWindowText(_T("")); this->m_ceWeight.SetWindowText(_T("1")); this->m_clcSpawnGroupList.DeleteAllItems(); this->SetWindowText(_T("Spawn Group Editor")); } } void CSpawnGroupEditDlg::RetrieveFields() { if ( m_pSpawn ) { // Save the current data this->m_ccbCategory.GetWindowText(m_pSpawn->m_csCategory); this->m_ccbCategory.GetWindowText(m_csCategory); this->m_ceName.GetWindowText(m_pSpawn->m_csName); this->m_ceDescription.GetWindowText(m_pSpawn->m_csDescription); for (int i = 0; i < m_pSpawn->m_Members.GetSize(); i++) { CSpawnRec * pRec = (CSpawnRec *) m_pSpawn->m_Members.GetAt(i); if ( pRec ) delete pRec; } m_pSpawn->m_Members.RemoveAll(); m_pSpawn->m_iTotalWeight = 0; for (i = 0; i < m_clcSpawnGroupList.GetItemCount(); i++) { CSpawnRec * pRec = new (CSpawnRec); int iData = (int) m_clcSpawnGroupList.GetItemData(i); if ( !iData ) pRec->m_csID = m_clcSpawnGroupList.GetItemText(i, 0); else pRec->m_csID.Format(_T("%05x"), iData); pRec->m_iWeight = _tstoi(m_clcSpawnGroupList.GetItemText(i, 1)); if ( !pRec->m_iWeight ) { delete pRec; continue; } m_pSpawn->m_Members.Add(pRec); m_pSpawn->m_iTotalWeight += pRec->m_iWeight; } } } void CSpawnGroupEditDlg::OnDblclkSpawngrouplist(NMHDR* pNMHDR, LRESULT* pResult) { int iSel = this->m_clcSpawnGroupList.GetNextItem(-1, LVNI_SELECTED); if ( iSel == -1 ) return; CEditValueDlg dlg; dlg.m_csTextValue = this->m_clcSpawnGroupList.GetItemText(iSel, 1); dlg.m_csCaption.Format(_T("Spawn Weight")); if ( dlg.DoModal() != IDOK ) return; this->m_clcSpawnGroupList.SetItemText(iSel, 1, dlg.m_csTextValue); *pResult = 0; } CSpawnGroupEditDlg::~CSpawnGroupEditDlg() { if ( m_pSpawn ) delete m_pSpawn; if ( m_pNPCCategories ) delete m_pNPCCategories; } void CSpawnGroupEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGNAME, (CWnd*)&m_ceName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGENTRY, (CWnd*)&m_ccbSpawnGroupEntry, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGDESCRIPTION, (CWnd*)&m_ceDescription, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGCATEGORY, (CWnd*)&m_ccbCategory, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGWEIGHT, (CWnd*)&m_ceWeight, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SPAWNGROUPLIST, (CWnd*)&m_clcSpawnGroupList, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGNPCLIST, (CWnd*)&m_clcNPCList, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGCATEGORYTREE, (CWnd*)&m_ctcCategoryTree, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGADDCATEGORY, (CWnd*)&m_bAddCat, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGADD, (CWnd*)&m_bAddSG, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGREMOVE, (CWnd*)&m_bRemoveSG, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC3, (CWnd*)&m_sStatic3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC4, (CWnd*)&m_sStatic4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC5, (CWnd*)&m_sStatic5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SGE_STATIC6, (CWnd*)&m_sStatic6, (CWnd*)this); } --- NEW FILE: SpawnGroupEditDlg.h --- /* $Id: SpawnGroupEditDlg.h,v 1.1 2003/07/10 21:49:37 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_SPAWNGROUPEDITDLG_H__EEB0DC51_1DB8_11D3_871F_00805FD91B8C__INCLUDED_) #define AFX_SPAWNGROUPEDITDLG_H__EEB0DC51_1DB8_11D3_871F_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // SpawnGroupEditDlg.h : header file // #include "TSpawnDef.h" #include "CategoryTree.h" ///////////////////////////////////////////////////////////////////////////// // CSpawnGroupEditDlg dialog class CSpawnGroupEditDlg : public CDialog { // Construction public: CString m_csName; CString m_csDescription; CString m_csSubsection; CString m_csCategory; DWORD m_dwID; CSpawnGroupEditDlg(CWnd* pParent = NULL); // standard constructor ~CSpawnGroupEditDlg(); static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); static int iIDSort; static int iNameSort; CTSpawnDef * m_pSpawn; protected: void CategorizeNPCs(); CCategoryTree * m_pNPCCategories; void FillCategoryTree(); void FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent); // Dialog Data //{{AFX_DATA(CSpawnGroupEditDlg) enum { IDD = IDD_SPAWNGROUP_EDIT_DLG }; CEdit m_ceName; CComboBox m_ccbSpawnGroupEntry; CEdit m_ceDescription; CComboBox m_ccbCategory; CEdit m_ceWeight; CListCtrl m_clcSpawnGroupList; CListCtrl m_clcNPCList; CTreeCtrl m_ctcCategoryTree; CButton m_bOK; CButton m_bCancel; CButton m_bAddCat; CButton m_bAddSG; CButton m_bRemoveSG; CStatic m_sStatic1; CStatic m_sStatic2; CStatic m_sStatic3; CStatic m_sStatic4; CStatic m_sStatic5; CStatic m_sStatic6; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSpawnGroupEditDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: void RetrieveFields(); void PopulateFields(); void FillCategoryList(); // Generated message map functions //{{AFX_MSG(CSpawnGroupEditDlg) virtual BOOL OnInitDialog(); afx_msg void OnSelchangeSgcategory(); afx_msg void OnSelchangedSgcategorytree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnSgaddcategory(); afx_msg void OnSgadd(); afx_msg void OnSgremove(); virtual void OnOK(); afx_msg void OnClickSgnpclist(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDblclkSgnpclist(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnKeydownSpawngrouplist(NMHDR* pNMHDR, LRESULT* pResult); virtual void OnCancel(); afx_msg void OnSelchangeSgname(); afx_msg void OnNewspawngroup(); afx_msg void OnDblclkSpawngrouplist(NMHDR* pNMHDR, LRESULT* pResult); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SPAWNGROUPEDITDLG_H__EEB0DC51_1DB8_11D3_871F_00805FD91B8C__INCLUDED_) Index: itemeditdlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/itemeditdlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** itemeditdlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- itemeditdlg.cpp 10 Jul 2003 21:49:36 -0000 1.3 *************** *** 52,57 **** --- 52,63 ---- m_iEdits = 0; m_csDispID = _T(""); + m_pCategories = NULL; } + CItemEditDlg::~CItemEditDlg() + { + if ( m_pCategories ) + delete m_pCategories; + } void CItemEditDlg::DoDataExchange(CDataExchange* pDX) *************** *** 59,63 **** CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CItemEditDlg) - DDX_Control(pDX, IDC_ITEMDISPLAY, m_csDisplay); DDX_Control(pDX, IDC_ITEMENTRY, m_ccbEntry); DDX_Control(pDX, IDOK, m_cbOK); --- 65,68 ---- *************** *** 69,73 **** DDX_Control(pDX, IDC_ITEM_APPLY, m_cbApply); DDX_Control(pDX, IDC_IEPALETTE, m_cbPalette); - DDX_Control(pDX, IDC_ADDSUBSECTION, m_cbAddSubsection); DDX_Control(pDX, IDC_ADDCATEGORY, m_cbAddCategory); DDX_Control(pDX, IDC_TRIGGERS, m_ceTriggers); --- 74,77 ---- *************** *** 81,85 **** DDX_Control(pDX, IDC_MAGICAL, m_cbMagical); DDX_Control(pDX, IDC_WEIGHT, m_ceWeight); - DDX_Control(pDX, IDC_SUBSECTION, m_ccbSubsection); DDX_Control(pDX, IDC_SPELLID, m_ccbSpell); DDX_Control(pDX, IDC_SKILL, m_ccbSkill); --- 85,88 ---- *************** *** 121,125 **** DDX_Control(pDX, IDC_EI_GCLASS, m_sGClass); DDX_Control(pDX, IDC_EI_SCAT, m_sCat); - DDX_Control(pDX, IDC_EI_SSUB, m_sSub); DDX_Control(pDX, IDC_EI_SDESC, m_sDesc); DDX_Control(pDX, IDC_EI_STRIG, m_sTrig); --- 124,127 ---- *************** *** 130,133 **** --- 132,136 ---- DDX_Control(pDX, IDC_EI_STATIC5, m_sStatic5); //}}AFX_DATA_MAP + DDX_Control(pDX, IDC_ITEMDISPLAY, m_Display); } *************** *** 140,144 **** ON_CBN_SELCHANGE(IDC_DUPEITEM, OnSelchangeDupeitem) ON_BN_CLICKED(IDC_ADDCATEGORY, OnAddcategory) - ON_BN_CLICKED(IDC_ADDSUBSECTION, OnAddsubsection) ON_BN_CLICKED(IDC_NOINDEX, OnNoindex) ON_EN_CHANGE(IDC_NAME, OnChangeName) --- 143,146 ---- *************** *** 165,171 **** Localize(); - - Main->m_pScripts->LoadItems(); - Main->m_pScripts->LoadTemplates(); CategorizeItems(); --- 167,170 ---- *************** *** 253,278 **** if ( (csCategory != _T(""))) { ! m_ccbSubsection.ResetContent(); ! CCategory * pCategory = (CCategory *) m_ccbCategory.GetItemData(m_ccbCategory.GetCurSel()); if (pCategory == NULL) return; - if (!pCategory->m_SubsectionList.IsEmpty()) - { - POSITION pos = pCategory->m_SubsectionList.GetHeadPosition(); - while (pos != NULL) - { - CSubsection * pSubsection = (CSubsection *) pCategory->m_SubsectionList.GetNext(pos); - int iIndex = m_ccbSubsection.AddString(pSubsection->m_csName); - m_ccbSubsection.SetItemData(iIndex, (DWORD_PTR) pSubsection); - } - } - m_ccbSubsection.SetCurSel(0); } ! else ! { ! m_ccbSubsection.ResetContent(); ! m_ccbSubsection.SetCurSel(-1); ! } ! } --- 252,260 ---- if ( (csCategory != _T(""))) { ! CCategoryTree * pCategory = (CCategoryTree *) m_ccbCategory.GetItemData(m_ccbCategory.GetCurSel()); if (pCategory == NULL) return; } ! } *************** *** 284,288 **** m_ceWeight.EnableWindow(bEnable); //m_ccbSubsection.EnableWindow(bEnable); - m_csBase.EnableWindow(bEnable); m_ccbSpell.EnableWindow(bEnable); m_ccbSkill.EnableWindow(bEnable); --- 266,269 ---- *************** *** 378,382 **** m_ccbSkill.SetCurSel(-1); m_ccbCategory.SetCurSel(-1); - m_ccbSubsection.SetCurSel(-1); m_ceDescription.SetWindowText(_T("")); --- 359,362 ---- *************** *** 599,603 **** AfxMessageBox(locale->String(IDS_ITEMEDIT_CATSLOST), MB_OK | MB_ICONEXCLAMATION); m_ccbCategory.SetCurSel(0); - m_ccbSubsection.SetCurSel(0); m_ceDescription.SetWindowText(_T("")); } --- 579,582 ---- *************** *** 609,616 **** m_ccbCategory.SetCurSel(m_ccbCategory.FindStringExact(-1, m_pItem->m_csCategory)); this->OnSelchangeCategory(); - if (pItem->m_csSubsection == _T("")) - m_ccbSubsection.SetCurSel(m_ccbSubsection.FindStringExact(-1, pDupe->m_csSubsection)); - else - m_ccbSubsection.SetCurSel(m_ccbSubsection.FindStringExact(-1, m_pItem->m_csSubsection)); if (pItem->m_csDescription == _T("")) m_ceDescription.SetWindowText(pDupe->m_csDescription); --- 588,591 ---- *************** *** 624,628 **** m_ccbCategory.SetCurSel(m_ccbCategory.FindStringExact(-1, pItem->m_csCategory)); this->OnSelchangeCategory(); - m_ccbSubsection.SetCurSel(m_ccbSubsection.FindStringExact(-1, pItem->m_csSubsection)); m_ceDescription.SetWindowText(pItem->m_csDescription); } --- 599,602 ---- *************** *** 702,709 **** } - void CItemEditDlg::OnAddsubsection() - { - } - void CItemEditDlg::OnNoindex() { --- 676,679 ---- *************** *** 713,717 **** // The button is unchecked this->m_ccbCategory.EnableWindow(!m_cbEdit.IsWindowEnabled()); - this->m_ccbSubsection.EnableWindow(!m_cbEdit.IsWindowEnabled()); this->m_ceDescription.EnableWindow(!m_cbEdit.IsWindowEnabled()); } --- 683,686 ---- *************** *** 720,724 **** // The button is checked this->m_ccbCategory.EnableWindow(m_cbEdit.IsWindowEnabled()); - this->m_ccbSubsection.EnableWindow(m_cbEdit.IsWindowEnabled()); this->m_ceDescription.EnableWindow(m_cbEdit.IsWindowEnabled()); } --- 689,692 ---- *************** *** 770,774 **** void CItemEditDlg::FillSpells() { - Main->m_pScripts->LoadTables(); for ( int i = 1; i < (int) Main->m_pScripts->m_tables.m_spells.GetSize(); i++ ) { --- 738,741 ---- *************** *** 789,793 **** void CItemEditDlg::FillColors() { - Main->m_pScripts->LoadDefs(); for (int i = 0; i < (int) Main->m_pScripts->m_aDefs.GetSize(); i++) { --- 756,759 ---- *************** *** 803,807 **** void CItemEditDlg::FillDupeItems() { - Main->m_pScripts->LoadItems(); for (int i = 0; i < (int) Main->m_pScripts->m_aItems.GetSize(); i++) { --- 769,772 ---- *************** *** 818,822 **** { this->m_cbAddCategory.EnableWindow(bEnable); - this->m_cbAddSubsection.EnableWindow(bEnable); this->m_cbApply.ShowWindow(bEnable ? SW_SHOW : SW_HIDE); this->m_cbCancel.EnableWindow(!bEnable); --- 783,786 ---- *************** *** 851,855 **** } - this->m_ccbSubsection.EnableWindow(bEnable); this->m_ceArmourMax.EnableWindow(bEnable); this->m_ceArmourMin.EnableWindow(bEnable); --- 815,818 ---- *************** *** 1096,1100 **** this->m_ceDescription.GetWindowText(m_pItem->m_csDescription); this->m_ccbSkill.GetWindowText(m_pItem->m_csSkill); - this->m_ccbSubsection.GetWindowText(m_pItem->m_csSubsection); this->m_ccbColor.GetWindowText(csVal); m_pItem->m_csColor = csVal; --- 1059,1062 ---- *************** *** 1154,1158 **** this->m_ccbCategory.GetWindowText(csCategory); this->m_ceDescription.GetWindowText(csDescription); - this->m_ccbSubsection.GetWindowText(csSubsection); int iDupe = Main->m_pScripts->m_aItems.Find(csDupeItem); if ( iDupe != -1 ) --- 1116,1119 ---- *************** *** 1163,1170 **** else m_pItem->m_csCategory = _T(""); - if (csSubsection != pDupe->m_csSubsection) - m_pItem->m_csSubsection = pDupe->m_csSubsection; - else - m_pItem->m_csSubsection = _T(""); if (csDescription != pDupe->m_csDescription) m_pItem->m_csDescription = pDupe->m_csDescription; --- 1124,1127 ---- *************** *** 1324,1327 **** --- 1281,1285 ---- progress.SetPos(i); } + progress.DestroyWindow(); } *************** *** 1363,1367 **** { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_ITEMDISPLAY, (CWnd*)&m_csDisplay, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ITEMENTRY, (CWnd*)&m_ccbEntry, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_cbOK, (CWnd*)this); --- 1321,1325 ---- { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_ITEMDISPLAY, (CWnd*)&m_Display, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ITEMENTRY, (CWnd*)&m_ccbEntry, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_cbOK, (CWnd*)this); *************** *** 1373,1377 **** locale->LocalizeWindow(IDD, IDC_ITEM_APPLY, (CWnd*)&m_cbApply, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_IEPALETTE, (CWnd*)&m_cbPalette, (CWnd*)this); - locale->LocalizeWindow(IDD, IDC_ADDSUBSECTION, (CWnd*)&m_cbAddSubsection, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ADDCATEGORY, (CWnd*)&m_cbAddCategory, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGGERS, (CWnd*)&m_ceTriggers, (CWnd*)this); --- 1331,1334 ---- *************** *** 1385,1389 **** locale->LocalizeWindow(IDD, IDC_MAGICAL, (CWnd*)&m_cbMagical, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WEIGHT, (CWnd*)&m_ceWeight, (CWnd*)this); - locale->LocalizeWindow(IDD, IDC_SUBSECTION, (CWnd*)&m_ccbSubsection, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SPELLID, (CWnd*)&m_ccbSpell, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SKILL, (CWnd*)&m_ccbSkill, (CWnd*)this); --- 1342,1345 ---- *************** *** 1425,1429 **** locale->LocalizeWindow(IDD, IDC_EI_GCLASS, (CWnd*)&m_sGClass, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SCAT, (CWnd*)&m_sCat, (CWnd*)this); - locale->LocalizeWindow(IDD, IDC_EI_SSUB, (CWnd*)&m_sSub, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SDESC, (CWnd*)&m_sDesc, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STRIG, (CWnd*)&m_sTrig, (CWnd*)this); --- 1381,1384 ---- Index: itemeditdlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/itemeditdlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** itemeditdlg.h 9 Jul 2003 19:57:25 -0000 1.2 --- itemeditdlg.h 10 Jul 2003 21:49:36 -0000 1.3 *************** *** 33,36 **** --- 33,37 ---- #include "Item.h" #include "CategoryTree.h" + #include "uoart.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 48,56 **** CString m_csCaption; CItemEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CItemEditDlg) enum { IDD = IDD_ITEMEDIT }; - CStatic m_csDisplay; CComboBox m_ccbEntry; CButton m_cbOK; --- 49,57 ---- CString m_csCaption; CItemEditDlg(CWnd* pParent = NULL); // standard constructor + ~CItemEditDlg(); // Dialog Data //{{AFX_DATA(CItemEditDlg) enum { IDD = IDD_ITEMEDIT }; CComboBox m_ccbEntry; CButton m_cbOK; *************** *** 62,66 **** CButton m_cbApply; CButton m_cbPalette; - CButton m_cbAddSubsection; CButton m_cbAddCategory; CEdit m_ceTriggers; --- 63,66 ---- *************** *** 74,79 **** CButton m_cbMagical; CEdit m_ceWeight; - CComboBox m_ccbSubsection; - CStatic m_csBase; CComboBox m_ccbSpell; CComboBox m_ccbSkill; --- 74,77 ---- *************** *** 115,119 **** CStatic m_sGClass; CStatic m_sCat; - CStatic m_sSub; CStatic m_sDesc; CStatic m_sTrig; --- 113,116 ---- *************** *** 155,159 **** virtual void OnOK(); afx_msg void OnAddcategory(); - afx_msg void OnAddsubsection(); afx_msg void OnNoindex(); afx_msg void OnChangeName(); --- 152,155 ---- *************** *** 178,181 **** --- 174,178 ---- public: void Localize(void); + CUOArt m_Display; }; Index: npceditdlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/npceditdlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** npceditdlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 --- npceditdlg.cpp 10 Jul 2003 21:49:36 -0000 1.3 *************** *** 108,111 **** --- 108,113 ---- m_dwTmpMore1 = 0; m_dwTmpMore2 = 0; + m_pItemCategories = NULL; + m_pNPCCategories = NULL; } Index: Resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Resource.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** Resource.h 10 Jul 2003 05:13:37 -0000 1.8 --- Resource.h 10 Jul 2003 21:49:36 -0000 1.9 *************** *** 19,22 **** --- 19,23 ---- #define IDD_SERVERCONFIG_DLG 163 #define IDD_ADDSERVER_DLG 164 + #define IDD_SPAWNGROUP_EDIT_DLG 165 #define IDD_NAMEEDITORDLG 168 #define IDD_SKILLTABLEEDITDLG 169 *************** *** 87,90 **** --- 88,92 ---- #define IDC_DELETEENTRY 1001 #define IDC_NEWTRIGGER 1001 + #define IDC_SGADD 1001 #define IDC_NPCATTRREMOVE 1002 #define IDC_OREREMOVE 1002 *************** *** 95,98 **** --- 97,101 ---- #define IDC_REMOVERESOURCE 1002 #define IDC_NEWREGIONTRIG 1002 + #define IDC_SGREMOVE 1002 #define IDC_IEPALETTE 1003 #define IDC_NEWNPC 1003 *************** *** 101,104 **** --- 104,108 ---- #define IDC_TMPL_EDIT 1003 #define IDC_REMOVESKILL 1003 + #define IDC_SGADDCATEGORY 1003 #define IDC_ITEM_NEW 1004 #define IDC_EDITNPC 1004 *************** *** 111,114 **** --- 115,119 ---- #define IDC_TMPL_CANCEL 1005 #define IDC_EDITENTRY 1005 + #define IDC_NEWSPAWNGROUP 1005 #define IDC_ITEM_APPLY 1006 #define IDC_CANCELNPCEDITS 1006 *************** *** 142,145 **** --- 147,151 ---- #define IDC_TMPL_ITEMLIST 1031 #define IDC_RESOURCELIST 1031 + #define IDC_SGNPCLIST 1031 #define IDC_NPCATTRSELECTION 1032 #define IDC_MAPVALS 1032 *************** *** 148,151 **** --- 154,158 ---- #define IDC_WEIGHTEDLIST 1032 #define IDC_SKILLLIST 1032 + #define IDC_SPAWNGROUPLIST 1032 #define IDC_DYEABLE 1033 #define IDC_NPCATTRCHOICES 1033 *************** *** 182,185 **** --- 189,193 ---- #define IDC_NEWSERVERNAME 1059 #define IDC_FOODTYPE_NAME 1059 + #define IDC_SGENTRY 1059 #define IDC_NPCDEFNAME 1060 #define IDC_ORECOLOUR 1060 *************** *** 201,204 **** --- 209,213 ---- #define IDC_NEWSERVERIP 1060 #define IDC_FOODTYPE_AMOUNT 1060 + #define IDC_SGWEIGHT 1060 #define IDC_COLORCOMBO 1061 #define IDC_SKILLS 1061 *************** *** 221,224 **** --- 230,234 ---- #define IDC_NEWSERVERPORT 1061 #define IDC_FOODTYPE_BITES 1061 + #define IDC_SGDESCRIPTION 1061 #define IDC_ITEMTYPE 1062 #define IDC_NPCDESIRES 1062 *************** *** 239,242 **** --- 249,253 ---- #define IDC_SKILLEDITLIST 1062 #define IDC_TRIG_ID 1062 + #define IDC_SGCATEGORY 1062 #define IDC_BUYVALUE 1063 #define IDC_NPCSPEECH 1063 *************** *** 369,372 **** --- 380,384 ---- #define IDC_MAPCENTER 1246 #define IDC_CURSORCOORDS 1247 + #define IDC_SGCATEGORYTREE 1252 #define IDC_SKILLDELAY 1255 #define IDC_SKILLSTATSTR 1256 *************** *** 413,416 **** --- 425,429 ---- #define IDC_SME_STATIC 1332 #define IDC_NPCATTRAMOUNT 1334 + #define IDC_SGNAME 1334 #define IDC_NPCENTRY 1335 #define IDC_NPCATTRIBUTES 1337 *************** *** 530,533 **** --- 543,552 ---- #define IDC_AS_STATIC2 1576 #define IDC_AS_STATIC3 1577 + #define IDC_SGE_STATIC1 1578 + #define IDC_SGE_STATIC2 1579 + #define IDC_SGE_STATIC3 1580 + #define IDC_SGE_STATIC4 1581 + #define IDC_SGE_STATIC5 1582 + #define IDC_SGE_STATIC6 1583 #define IDC_STE_STATIC1 1584 #define IDC_STE_STATIC2 1585 *************** *** 669,673 **** #define _APS_NEXT_RESOURCE_VALUE 205 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 233 #define _APS_NEXT_SYMED_VALUE 104 #endif --- 688,692 ---- #define _APS_NEXT_RESOURCE_VALUE 205 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 234 #define _APS_NEXT_SYMED_VALUE 104 #endif Index: S_Sphere52.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.rc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** S_Sphere52.rc 10 Jul 2003 05:13:37 -0000 1.10 --- S_Sphere52.rc 10 Jul 2003 21:49:36 -0000 1.11 *************** *** 199,209 **** WS_DISABLED | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add",IDC_ADDCATEGORY,163,216,22,13,WS_DISABLED ! COMBOBOX IDC_SUBSECTION,56,229,102,33,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Add",IDC_ADDSUBSECTION,163,230,22,13,WS_DISABLED ! EDITTEXT IDC_DESCRIPTION,56,242,102,12,ES_AUTOHSCROLL | WS_DISABLED CONTROL "Don't Index this Item",IDC_NOINDEX,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,255,88,11 EDITTEXT IDC_BUYVALUE,173,75,17,13,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED --- 199,206 ---- WS_DISABLED | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add",IDC_ADDCATEGORY,163,216,22,13,WS_DISABLED ! EDITTEXT IDC_DESCRIPTION,56,231,102,12,ES_AUTOHSCROLL | WS_DISABLED CONTROL "Don't Index this Item",IDC_NOINDEX,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,244,88,11 EDITTEXT IDC_BUYVALUE,173,75,17,13,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED *************** *** 227,232 **** EDITTEXT IDC_ARMOURBONUS,198,187,33,13,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED ! PUSHBUTTON "Edit",IDC_TRIGEDIT,368,254,22,13,WS_DISABLED ! EDITTEXT IDC_TRIGGERS,7,269,383,67,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED | WS_VSCROLL DEFPUSHBUTTON "OK",IDOK,340,7,50,14 --- 224,229 ---- EDITTEXT IDC_ARMOURBONUS,198,187,33,13,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED ! PUSHBUTTON "Edit",IDC_TRIGEDIT,368,243,22,13,WS_DISABLED ! EDITTEXT IDC_TRIGGERS,7,261,383,75,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED | WS_VSCROLL DEFPUSHBUTTON "OK",IDOK,340,7,50,14 *************** *** 239,245 **** LTEXT "Weight",IDC_EI_SWEIGHT,131,105,24,8 LTEXT "Category",IDC_EI_SCAT,13,218,29,8 ! LTEXT "Subsection",IDC_EI_SSUB,13,233,36,8 ! LTEXT "Description",IDC_EI_SDESC,14,245,36,8 ! GROUPBOX "Axis Classifications",IDC_EI_GCLASS,7,206,183,61 GROUPBOX "Armour / Weapon Attributes",IDC_EI_GATTR,7,131,121,72 LTEXT "Skill",IDC_EI_SSKILL,16,143,14,8 --- 236,241 ---- LTEXT "Weight",IDC_EI_SWEIGHT,131,105,24,8 LTEXT "Category",IDC_EI_SCAT,13,218,29,8 ! LTEXT "Description",IDC_EI_SDESC,14,234,36,8 ! GROUPBOX "Axis Classifications",IDC_EI_GCLASS,7,206,183,52 GROUPBOX "Armour / Weapon Attributes",IDC_EI_GATTR,7,131,121,72 LTEXT "Skill",IDC_EI_SSKILL,16,143,14,8 *************** *** 255,259 **** LTEXT "DupeItem",IDC_EI_SDUPE,83,49,32,8 LTEXT "---",IDC_EI_STATIC1,194,77,8,8,0,WS_EX_TRANSPARENT ! LTEXT "Triggers",IDC_EI_STRIG,336,259,26,8 LTEXT "---",IDC_EI_STATIC2,194,91,8,8,0,WS_EX_TRANSPARENT LTEXT "---",IDC_EI_STATIC4,81,158,8,8,0,WS_EX_TRANSPARENT --- 251,255 ---- LTEXT "DupeItem",IDC_EI_SDUPE,83,49,32,8 LTEXT "---",IDC_EI_STATIC1,194,77,8,8,0,WS_EX_TRANSPARENT ! LTEXT "Triggers",IDC_EI_STRIG,336,248,26,8 LTEXT "---",IDC_EI_STATIC2,194,91,8,8,0,WS_EX_TRANSPARENT LTEXT "---",IDC_EI_STATIC4,81,158,8,8,0,WS_EX_TRANSPARENT *************** *** 267,272 **** PUSHBUTTON "Apply",IDC_ITEM_APPLY,103,26,40,12,NOT WS_VISIBLE PUSHBUTTON "Cancel",IDC_ITEM_CANCEL,147,26,40,12,NOT WS_VISIBLE ! CONTROL "",IDC_ITEMDISPLAY,"Static",SS_BITMAP | SS_CENTERIMAGE | ! SS_SUNKEN,250,38,140,140 END --- 263,269 ---- PUSHBUTTON "Apply",IDC_ITEM_APPLY,103,26,40,12,NOT WS_VISIBLE PUSHBUTTON "Cancel",IDC_ITEM_CANCEL,147,26,40,12,NOT WS_VISIBLE ! CONTROL "",IDC_ITEMDISPLAY, ! "{0904F7B3-2339-44C9-857C-6EB6CFEFA3B6}",WS_TABSTOP,238, ! 43,152,161 END *************** *** 1168,1171 **** --- 1165,1202 ---- END + IDD_SPAWNGROUP_EDIT_DLG DIALOGEX 0, 0, 288, 295 + STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Spawn Group Editor" + FONT 8, "MS Sans Serif", 0, 0, 0x0 + BEGIN + COMBOBOX IDC_SGENTRY,80,15,119,104,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "New",IDC_NEWSPAWNGROUP,200,14,25,12 + COMBOBOX IDC_SGCATEGORY,62,74,101,60,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Add",IDC_SGADDCATEGORY,164,74,22,12 + EDITTEXT IDC_SGDESCRIPTION,62,88,101,12,ES_AUTOHSCROLL + CONTROL "Tree1",IDC_SGCATEGORYTREE,"SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,102,128,98 + CONTROL "List1",IDC_SGNPCLIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | + WS_BORDER | WS_TABSTOP,138,102,143,98 + EDITTEXT IDC_SGWEIGHT,69,220,32,13,ES_AUTOHSCROLL | ES_NUMBER + PUSHBUTTON "Add",IDC_SGADD,65,251,36,12 + PUSHBUTTON "Remove",IDC_SGREMOVE,65,265,36,12 + CONTROL "List2",IDC_SPAWNGROUPLIST,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,104,203,177, + 85 + DEFPUSHBUTTON "OK",IDOK,231,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,231,24,50,14 + LTEXT "Name",IDC_SGE_STATIC2,13,60,20,8 + LTEXT "Weight",IDC_SGE_STATIC6,35,223,24,8 + LTEXT "Category",IDC_SGE_STATIC3,13,75,29,8 + LTEXT "Description",IDC_SGE_STATIC5,13,89,36,8 + LTEXT "Spawn Group Entry",IDC_SGE_STATIC1,13,17,62,8 + EDITTEXT IDC_SGNAME,62,61,101,12,ES_AUTOHSCROLL + END + ///////////////////////////////////////////////////////////////////////////// *************** *** 1415,1418 **** --- 1446,1457 ---- BOTTOMMARGIN, 40 END + + IDD_SPAWNGROUP_EDIT_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 281 + TOPMARGIN, 7 + BOTTOMMARGIN, 288 + END END #endif // APSTUDIO_INVOKED *************** *** 1449,1452 **** --- 1488,1494 ---- IDC_SKILL, 0x403, 14, 0 0x7753, 0x726f, 0x7364, 0x616d, 0x736e, 0x6968, 0x0070, + IDC_ITEMDISPLAY, 0x376, 28, 0 + 0x0000, 0x0000, 0x0000, 0x0001, 0x1791, 0x0000, 0x1b14, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0 END Index: S_Sphere52.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.vcproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** S_Sphere52.vcproj 10 Jul 2003 05:13:37 -0000 1.14 --- S_Sphere52.vcproj 10 Jul 2003 21:49:36 -0000 1.15 *************** *** 263,266 **** --- 263,269 ---- </File> <File + RelativePath="SpawnGroupEditDlg.cpp"> + </File> + <File RelativePath="SpawnRec.cpp"> </File> *************** *** 502,505 **** --- 505,511 ---- <File RelativePath="SkillTableEditDlg.h"> + </File> + <File + RelativePath="SpawnGroupEditDlg.h"> </File> <File Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** ScriptsMain.cpp 10 Jul 2003 05:13:37 -0000 1.23 --- ScriptsMain.cpp 10 Jul 2003 21:49:37 -0000 1.24 *************** *** 22,25 **** --- 22,43 ---- #include "worlditem.h" + #include "AccountDlg.h" + #include "DefEditDlg.h" + #include "MapScriptEditDlg.h" + #include "NameEditDlg.h" + #include "NotoTitleEditDlg.h" + #include "OreEditDlg.h" + #include "PotionEdit.h" + #include "SkillMenuEditDlg.h" + #include "SkillTableEditDlg.h" + #include "SpawnGroupEditDlg.h" + #include "SpellEditDlg.h" + #include "StatRateEditDlg.h" + #include "TemplateEditDlg.h" + #include "TriggerEditDlg.h" + #include "itemeditdlg.h" + #include "npceditdlg.h" + #include "serverconfigdlg.h" + #include <direct.h> #include "MD5Hash.h" *************** *** 69,72 **** --- 87,111 ---- }; + const char * CScriptsMain::m_Editors [] = + { + _T("Accounts"), + _T("Defs"), + _T("Items"), + _T("Map Script"), + _T("Names"), + _T("Notoriety Titles"), + _T("NPCs"), + _T("Ores"), + _T("Potions"), + _T("Server Configuration"), + _T("Skill Menus"), + _T("Skills"), + _T("Spawn Groups"), + _T("Spells"), + _T("Stat Gain Rates"), + _T("Templates"), + _T("Triggers") + }; + CScriptsMain::CScriptsMain() { *************** *** 3213,3226 **** ULONG CScriptsMain::EditorCount() { ! return 0; } CString CScriptsMain::EditorDescription(ULONG index) { ! return _T(""); } void CScriptsMain::InvokeEditor(ULONG index) { return; } --- 3252,3332 ---- ULONG CScriptsMain::EditorCount() { ! return Editor_QTY; } CString CScriptsMain::EditorDescription(ULONG index) { ! if ( index > Editor_QTY ) ! return _T(""); ! else ! return m_Editors[index]; } void CScriptsMain::InvokeEditor(ULONG index) { + if ( index > Editor_QTY ) + return; + CDialog * pDlg = NULL; + switch ( index ) + { + case Editor_Account: + pDlg = new CAccountDlg; + break; + case Editor_Def: + pDlg = new CDefEditDlg; + break; + case Editor_Item: + pDlg = new CItemEditDlg; + break; + case Editor_MapScript: + pDlg = new CMapScriptEditDlg; + break; + case Editor_Names: + pDlg = new CNameEditDlg; + break; + case Editor_NotoTitle: + pDlg = new CNotoTitleEditDlg; + break; + case Editor_NPC: + pDlg = new CNPCEditDlg; + break; + case Editor_Ore: + pDlg = new COreEditDlg; + break; + case Editor_Potion: + pDlg = new CPotionEdit; + break; + case Editor_ServerConfig: + pDlg = new CServerConfigDlg; + break; + case Editor_SkillMenu: + pDlg = new CSkillMenuEditDlg; + break; + case Editor_Skills: + pDlg = new CSkillTableEditDlg; + break; + case Editor_SpawnGroups: + pDlg = new CSpawnGroupEditDlg; + break; + case Editor_Spells: + pDlg = new CSpellEditDlg; + break; + case Editor_StatRate: + pDlg = new CStatRateEditDlg; + break; + case Editor_Template: + pDlg = new CTemplateEditDlg; + break; + case Editor_Trigger: + pDlg = new CTriggerEditDlg; + break; + default: + break; + } + if ( pDlg != NULL ) + { + pDlg->DoModal(); + delete pDlg; + } return; } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** ScriptsMain.h 10 Jul 2003 05:13:37 -0000 1.14 --- ScriptsMain.h 10 Jul 2003 21:49:37 -0000 1.15 *************** *** 317,321 **** --- 317,344 ---- }; + enum Editors + { + Editor_Account, + Editor_Def, + Editor_Item, + Editor_MapScript, + Editor_Names, + Editor_NotoTitle, + Editor_NPC, + Editor_Ore, + Editor_Potion, + Editor_ServerConfig, + Editor_SkillMenu, + Editor_Skills, + Editor_SpawnGroups, + Editor_Spells, + Editor_StatRate, + Editor_Template, + Editor_Trigger, + Editor_QTY + }; + static const char * m_pszFiles [File_QTY]; + static const char * m_Editors[Editor_QTY]; vector<CString> m_vFiles; int MapFile(CString s); Index: strings.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/strings.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** strings.h 9 Jul 2003 19:57:25 -0000 1.6 --- strings.h 10 Jul 2003 21:49:37 -0000 1.7 *************** *** 180,182 **** #define IDS_ACCTEDIT_CHANGESQUEUED 229 #define IDS_ACCTEDIT_CLOSEWARN 230 ! #define IDS_ACCTEDIT_CANTOPEN 231 \ No newline at end of file --- 180,184 ---- #define IDS_ACCTEDIT_CHANGESQUEUED 229 #define IDS_ACCTEDIT_CLOSEWARN 230 ! #define IDS_ACCTEDIT_CANTOPEN 231 ! #define IDS_ITEMGEN_ID 511 ! #define IDS_SGEDIT_CAPTION 428 \ No newline at end of file Index: types.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/types.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** types.cpp 3 Jun 2003 21:28:49 -0000 1.1 --- types.cpp 10 Jul 2003 21:49:37 -0000 1.2 *************** *** 126,130 **** _T("Beehive"), // 117 _T("Archery butte"), // 118 ! _T("Murder Count Object") // 119 = my murder count flag. _T("Vendor Stock"), // 120 _T("Inactive Trap"), // 121 = a safe trap. --- 126,130 ---- _T("Beehive"), // 117 _T("Archery butte"), // 118 ! _T("Murder Count Object"), // 119 = my murder count flag. _T("Vendor Stock"), // 120 _T("Inactive Trap"), // 121 = a safe trap. |
From: Philip E. <pes...@us...> - 2003-07-10 05:13:39
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv13259 Modified Files: Area.cpp Area.h MapScriptEditDlg.cpp MapScriptEditDlg.h Resource.h S_Sphere52.rc S_Sphere52.vcproj ScriptsMain.cpp ScriptsMain.h Log Message: no message Index: Area.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Area.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Area.cpp 23 May 2003 05:46:53 -0000 1.2 --- Area.cpp 10 Jul 2003 05:13:37 -0000 1.3 *************** *** 241,281 **** } ! bool CArea::Write(CStdioFile &csfOutput, int iVersion) { // We assume that the output file is already open. WriteHeader(csfOutput); ! switch (iVersion) ! { ! case 0: // 51a ! WriteTag(_T("TITLE"), csfOutput, iVersion); ! WriteTag(_T("GROUP"), csfOutput, iVersion); ! WriteTag(_T("P"), csfOutput, iVersion); ! WriteTag(_T("RECT"), csfOutput, iVersion); ! WriteTag(_T("GUARDOWNER"), csfOutput, iVersion); ! WriteTag(_T("RAINCHANCE"), csfOutput, iVersion); ! WriteTag(_T("COLDCHANCE"), csfOutput, iVersion); ! WriteTag(_T("LOCAL"), csfOutput, iVersion); ! WriteTag(_T("SOUNDS"), csfOutput, iVersion); ! WriteTag(_T("ANNOUNCEMENT"), csfOutput, iVersion); ! WriteTag(_T("FLAGS"), csfOutput, iVersion); ! WriteTag(_T("TRIGGER"), csfOutput, iVersion); ! WriteTag(_T("TRIGPERIODIC"), csfOutput, iVersion); ! break; ! case 1: // 55i ! WriteTag(_T("CLASS"), csfOutput, iVersion); ! WriteTag(_T("FLAGS"), csfOutput, iVersion); ! WriteTag(_T("RECT"), csfOutput, iVersion); ! WriteTag(_T("P"), csfOutput, iVersion); ! WriteTag(_T("DEFNAME"), csfOutput, iVersion); ! WriteTag(_T("GROUP"), csfOutput, iVersion); ! WriteTag(_T("TITLE"), csfOutput, iVersion); ! WriteTag(_T("TAG.ANNOUNCEMENT"), csfOutput, iVersion); ! WriteTag(_T("TAG.GUARDOWNER"), csfOutput, iVersion); ! WriteTag(_T("RESOURCES"), csfOutput, iVersion); ! WriteTag(_T("RAINCHANCE"), csfOutput, iVersion); ! WriteTag(_T("EVENTS"), csfOutput, iVersion); ! WriteTag(_T("COLDCHANCE"), csfOutput, iVersion); ! break; ! } csfOutput.WriteString(_T("\n")); return true; --- 241,261 ---- } ! bool CArea::Write(CStdioFile &csfOutput) { // We assume that the output file is already open. WriteHeader(csfOutput); ! WriteTag(_T("TITLE"), csfOutput); ! WriteTag(_T("GROUP"), csfOutput); ! WriteTag(_T("P"), csfOutput); ! WriteTag(_T("RECT"), csfOutput); ! WriteTag(_T("GUARDOWNER"), csfOutput); ! WriteTag(_T("RAINCHANCE"), csfOutput); ! WriteTag(_T("COLDCHANCE"), csfOutput); ! WriteTag(_T("LOCAL"), csfOutput); ! WriteTag(_T("SOUNDS"), csfOutput); ! WriteTag(_T("ANNOUNCEMENT"), csfOutput); ! WriteTag(_T("FLAGS"), csfOutput); ! WriteTag(_T("TRIGGER"), csfOutput); ! WriteTag(_T("TRIGPERIODIC"), csfOutput); csfOutput.WriteString(_T("\n")); return true; *************** *** 289,298 **** csTemp.Format(_T("[AREA %s]\n"), this->m_csName); csfOutput.WriteString(csTemp); ! WriteTag(_T("GROUP"), csfOutput, 0); ! WriteTag(_T("P"), csfOutput, 0); return true; } ! void CArea::WriteTag(CString csTag, CStdioFile &csfOutput, int iVersion) { CString csValue = _T(""); --- 269,278 ---- csTemp.Format(_T("[AREA %s]\n"), this->m_csName); csfOutput.WriteString(csTemp); ! WriteTag(_T("GROUP"), csfOutput); ! WriteTag(_T("P"), csfOutput); return true; } ! void CArea::WriteTag(CString csTag, CStdioFile &csfOutput) { CString csValue = _T(""); *************** *** 348,362 **** case 17: // RAINCHANCE if (this->m_iRainChance != -1) ! if ( iVersion == 0 ) ! csValue.Format(_T("RAINCHANCE %ld\n"), this->m_iRainChance); ! else ! csValue.Format(_T("RAINCHANCE=0%x\n"), this->m_iRainChance); break; case 18: // COLDCHANCE if (this->m_iSnowChance != -1) ! if ( iVersion == 0 ) ! csValue.Format(_T("COLDCHANCE %ld\n"), this->m_iSnowChance); ! else ! csValue.Format(_T("COLDCHANCE=0%x\n"), this->m_iSnowChance); break; case 19: // LOCAL --- 328,336 ---- case 17: // RAINCHANCE if (this->m_iRainChance != -1) ! csValue.Format(_T("RAINCHANCE %ld\n"), this->m_iRainChance); break; case 18: // COLDCHANCE if (this->m_iSnowChance != -1) ! csValue.Format(_T("COLDCHANCE %ld\n"), this->m_iSnowChance); break; case 19: // LOCAL *************** *** 379,386 **** if ( m_wFlags ) { ! if ( iVersion == 0 ) ! csValue.Format(_T("FLAGS=%05x\n"), this->m_wFlags ); ! else ! csValue.Format(_T("FLAGS=0%x\n"), this->m_wFlags ); } break; --- 353,357 ---- if ( m_wFlags ) { ! csValue.Format(_T("FLAGS=%05x\n"), this->m_wFlags ); } break; Index: Area.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Area.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Area.h 23 May 2003 05:46:53 -0000 1.2 --- Area.h 10 Jul 2003 05:13:37 -0000 1.3 *************** *** 53,57 **** virtual ~CArea(); void ReadFromFile(CStdioFile &csfInput); ! bool Write(CStdioFile &csfOutput, int iVersion); bool WriteBasic(CStdioFile &csfOutput); void Copy(CArea *pCopy); --- 53,57 ---- virtual ~CArea(); void ReadFromFile(CStdioFile &csfInput); ! bool Write(CStdioFile &csfOutput); bool WriteBasic(CStdioFile &csfOutput); void Copy(CArea *pCopy); *************** *** 61,65 **** protected: void ReadTag(CString csLine); ! void WriteTag(CString csTag, CStdioFile &csfOutput, int iVersion); virtual void WriteHeader(CStdioFile &csfOutput); }; --- 61,65 ---- protected: void ReadTag(CString csLine); ! void WriteTag(CString csTag, CStdioFile &csfOutput); virtual void WriteHeader(CStdioFile &csfOutput); }; Index: MapScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MapScriptEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.4 --- MapScriptEditDlg.cpp 10 Jul 2003 05:13:37 -0000 1.5 *************** *** 98,102 **** DDX_Control(pDX, IDC_MAPCENTER, m_csCoords); DDX_Control(pDX, IDC_MAPDISPLAY, m_map); - DDX_Control(pDX, IDC_VERSION, m_ccbVersion); //}}AFX_DATA_MAP } --- 98,101 ---- *************** *** 126,130 **** ON_WM_SIZE() //}}AFX_MSG_MAP - ON_CBN_SELCHANGE(IDC_VERSION, OnCbnSelchangeVersion) END_MESSAGE_MAP() --- 125,128 ---- *************** *** 142,155 **** Main->m_pScripts->LoadMap(); - m_ccbVersion.InsertString(0, _T("0.52")); - m_ccbVersion.InsertString(1, _T("0.55")); - //m_ccbVersion.InsertString(2, "0.99m+"); - for ( int i = 0; i < 2; i++ ) - m_ccbVersion.SetItemData(i, i); - //if ( Main->m_pScripts->m_bNewFormat ) - // m_ccbVersion.SetCurSel(1); - //else - // m_ccbVersion.SetCurSel(0); - // Now we need to build the tree view POSITION areaPos = Main->m_pScripts->m_olAreas.GetHeadPosition(); --- 140,143 ---- *************** *** 189,193 **** GetRects(); ! return TRUE; // return TRUE unless you set the focus to a control --- 177,182 ---- GetRects(); ! m_cbMoveDown.SetIcon(AfxGetApp()->LoadIcon(IDI_DOWNARROW)); ! m_cbMoveUp.SetIcon(AfxGetApp()->LoadIcon(IDI_UPARROW)); return TRUE; // return TRUE unless you set the focus to a control *************** *** 257,261 **** { TV_KEYDOWN* pTVKeyDown = (TV_KEYDOWN*)pNMHDR; - int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if (pTVKeyDown->wVKey == VK_DELETE) { --- 246,249 ---- *************** *** 265,269 **** { CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData(hItem); ! if ( iVersion == 0 && pArea->m_bCustom == false ) { AfxMessageBox(locale->String(IDS_MAPSEDIT_CANTDELETE), MB_OK | MB_ICONINFORMATION ); --- 253,257 ---- { CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData(hItem); ! if ( pArea->m_bCustom == false ) { AfxMessageBox(locale->String(IDS_MAPSEDIT_CANTDELETE), MB_OK | MB_ICONINFORMATION ); *************** *** 291,295 **** void CMapScriptEditDlg::OnNewroom() { - int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); HTREEITEM hParent = NULL; HTREEITEM hTestItem = this->m_ctcRegionTree.GetRootItem(); --- 279,282 ---- *************** *** 304,312 **** } CAddValueDialog dlg; - if ( iVersion ) - { - dlg.SetFilename(m_sLastCustomFile.c_str()); - dlg.EnableFilename(true); - } dlg.m_csTitle = _T("New Room"); if (dlg.DoModal() == IDOK) --- 291,294 ---- *************** *** 315,323 **** pRoom->m_csName = dlg.m_csValue; pRoom->m_bCustom = true; - if ( iVersion ) - { - pRoom->m_csFilename = dlg.GetFilename(); - m_sLastCustomFile.assign((LPCTSTR)pRoom->m_csFilename); - } HTREEITEM hNewItem = this->m_ctcRegionTree.InsertItem(pRoom->m_csName, 0, 0, hParent, TVI_LAST); if ( Main->m_pScripts->m_olAreas.IsEmpty() ) --- 297,300 ---- *************** *** 337,347 **** void CMapScriptEditDlg::OnNewarea() { - int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); CAddValueDialog dlg; - if ( iVersion ) - { - dlg.SetFilename(m_sLastCustomFile.c_str()); - dlg.EnableFilename(true); - } dlg.m_csTitle = _T("New Area"); HTREEITEM hParent = NULL; --- 314,318 ---- *************** *** 361,369 **** pArea->m_bCustom = true; pArea->m_csName = dlg.m_csValue; - if ( iVersion ) - { - pArea->m_csFilename = dlg.GetFilename(); - m_sLastCustomFile.assign((LPCTSTR)pArea->m_csFilename); - } HTREEITEM hNewItem = this->m_ctcRegionTree.InsertItem(pArea->m_csName, 0, 0, hParent, TVI_LAST); if ( Main->m_pScripts->m_olAreas.IsEmpty() ) --- 332,335 ---- *************** *** 385,396 **** // Save everything CWaitCursor hourglass; ! int iSel = m_ccbVersion.GetCurSel(); ! if ( iSel == -1 ) ! { ! AfxMessageBox(locale->String(IDS_MAPSEDIT_CHOOSEVERSION), MB_OK); ! return; ! } ! int version = (int) m_ccbVersion.GetItemData(iSel); ! Main->m_pScripts->SaveMap(version); m_bIsActive = false; CDialog::OnOK(); --- 351,355 ---- // Save everything CWaitCursor hourglass; ! Main->m_pScripts->SaveMap(); m_bIsActive = false; CDialog::OnOK(); *************** *** 480,484 **** CString csCoords; this->m_csCoords.GetWindowText(csCoords); ! int x, y; if ( csCoords.Find(_T(",")) != -1 ) { --- 439,443 ---- CString csCoords; this->m_csCoords.GetWindowText(csCoords); ! short x, y; if ( csCoords.Find(_T(",")) != -1 ) { *************** *** 488,492 **** x = _tstoi(csX); y = _tstoi(csY); ! m_map.SetCenter((short) x, (short) y); } } --- 447,457 ---- x = _tstoi(csX); y = _tstoi(csY); ! m_map.SetCenter(x, y); ! } ! else ! { ! m_map.GetCenter(&x, &y); ! csCoords.Format(_T("%sd,%sd"), x, y); ! m_csCoords.SetWindowText(csCoords); } } *************** *** 606,611 **** return; - int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); - // Do the common ones first CString csText; --- 571,574 ---- *************** *** 627,660 **** this->m_clcValues.SetItemText( 6, 1, csText ); this->m_clcValues.SetItemText( 7, 1, pArea->m_csAnnouncement ); ! switch (iVersion) ! { ! case 0: ! { ! this->m_clcValues.SetItemText( 8, 1, pArea->m_csLocal ); ! if ( pArea->m_dwTriggerID == 0xFFFFFFFF ) ! csText = _T(""); ! else ! csText.Format(_T("%05x"), pArea->m_dwTriggerID ); ! this->m_clcValues.SetItemText( 9, 1, csText ); ! if ( pArea->m_dwTrigPeriodic == 0xFFFFFFFF ) ! csText = _T(""); ! else ! csText.Format(_T("%05x"), pArea->m_dwTrigPeriodic ); ! this->m_clcValues.SetItemText( 10, 1, csText ); ! } ! break; ! case 1: ! { ! m_clcValues.SetItemText( 8, 1, pArea->m_csEvents ); ! m_clcValues.SetItemText( 9, 1, pArea->m_csDefname ); ! if ( pArea->m_iClass ) ! csText.Format(_T("%ld"), pArea->m_iClass ); ! else ! csText = _T(""); ! m_clcValues.SetItemText( 10, 1, csText ); ! m_clcValues.SetItemText( 11, 1, pArea->m_csResources ); ! } ! break; ! } this->m_clbRectList.ResetContent(); --- 590,604 ---- this->m_clcValues.SetItemText( 6, 1, csText ); this->m_clcValues.SetItemText( 7, 1, pArea->m_csAnnouncement ); ! this->m_clcValues.SetItemText( 8, 1, pArea->m_csLocal ); ! if ( pArea->m_dwTriggerID == 0xFFFFFFFF ) ! csText = _T(""); ! else ! csText.Format(_T("%05x"), pArea->m_dwTriggerID ); ! this->m_clcValues.SetItemText( 9, 1, csText ); ! if ( pArea->m_dwTrigPeriodic == 0xFFFFFFFF ) ! csText = _T(""); ! else ! csText.Format(_T("%05x"), pArea->m_dwTrigPeriodic ); ! this->m_clcValues.SetItemText( 10, 1, csText ); this->m_clbRectList.ResetContent(); *************** *** 697,705 **** m = m_iMapPlane; CString csCoords; ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); ! if ( iVersion == 0 ) ! csCoords.Format(_T("%d, %d, %d"), x, y, z); ! else ! csCoords.Format(_T("%d, %d, %d, %d"), x, y, z, m); this->m_csCoords.SetWindowText(csCoords); --- 641,645 ---- m = m_iMapPlane; CString csCoords; ! csCoords.Format(_T("%d, %d, %d"), x, y, z); this->m_csCoords.SetWindowText(csCoords); *************** *** 711,720 **** CArea * CMapScriptEditDlg::SetCustomArea(CArea *pArea) { ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); ! if ( iVersion ) ! { ! pArea->m_bCustom = true; ! return pArea; ! } if ( pArea->m_bCustom ) return pArea; --- 651,656 ---- CArea * CMapScriptEditDlg::SetCustomArea(CArea *pArea) { ! if ( pArea == NULL ) ! return NULL; if ( pArea->m_bCustom ) return pArea; *************** *** 776,780 **** CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData( hSelItem ); CString csVal = this->m_clcValues.GetItemText( iSel, 1 ); - int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); CString sCaption, sValue; bool bSimple = true; --- 712,715 ---- *************** *** 789,804 **** break; case 8: ! if ( iVersion > 0 ) ! { ! // Events handled later ! bSimple = false; ! break; ! } ! else ! { ! // Name of locals ! sCaption =_T("Name for locals"); ! sValue = pArea->m_csLocal; ! } break; case 0: --- 724,730 ---- break; case 8: ! // Name of locals ! sCaption =_T("Name for locals"); ! sValue = pArea->m_csLocal; break; case 0: *************** *** 831,856 **** break; case 9: ! if ( iVersion == 0 ) ! { ! sCaption = _T("Region Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTriggerID); ! } ! else ! { ! sCaption = _T("Defname"); ! sValue = pArea->m_csDefname; ! } break; case 10: ! if ( iVersion == 0 ) ! { ! sCaption = _T("Periodic Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTrigPeriodic); ! } ! else ! { ! sCaption = _T("Class"); ! sValue.Format(_T("%ld"), pArea->m_iClass); ! } break; } --- 757,766 ---- break; case 9: ! sCaption = _T("Region Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTriggerID); break; case 10: ! sCaption = _T("Periodic Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTrigPeriodic); break; } *************** *** 882,896 **** pArea->m_csAnnouncement = csVal; break; case 8: ! if ( iVersion == 0 ) ! pArea->m_csLocal = csVal; ! break; case 9: ! if ( iVersion == 0 ) ! pArea->m_dwTriggerID = _tstoi(csVal); ! break; case 10: ! if ( iVersion == 0 ) ! pArea->m_dwTrigPeriodic = _tstoi(csVal); ! break; default: break; --- 792,800 ---- pArea->m_csAnnouncement = csVal; break; case 8: ! pArea->m_csLocal = csVal; case 9: ! pArea->m_dwTriggerID = _tstoi(csVal); case 10: ! pArea->m_dwTrigPeriodic = _tstoi(csVal); default: break; *************** *** 913,936 **** } } - if ( iSel == 8 && iVersion == 1 ) - { - // Events - CRegionSelectDlg dlg; - dlg.RegionType(0); - dlg.Selections((LPCTSTR)pArea->m_csEvents); - if ( dlg.DoModal() == IDOK ) - pArea->m_csEvents = dlg.Selections().c_str(); - m_clcValues.SetItemText(8, 1, dlg.Selections().c_str()); - } - if ( iSel == 11 && iVersion == 1 ) - { - // Resources - CRegionSelectDlg dlg; - dlg.RegionType(1); - dlg.Selections((LPCTSTR)pArea->m_csResources); - if ( dlg.DoModal() == IDOK ) - pArea->m_csResources = dlg.Selections().c_str(); - m_clcValues.SetItemText(11, 1, dlg.Selections().c_str()); - } return; *pResult = 0; --- 817,820 ---- *************** *** 1182,1185 **** --- 1066,1071 ---- CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData(hItem); pArea = this->SetCustomArea( pArea ); + if ( pArea == NULL ) + return; CString csNewRect; csNewRect.Format(_T("%ld,%ld,%ld,%ld"), rect.left, rect.top, rect.right, rect.bottom); *************** *** 1336,1379 **** } - void CMapScriptEditDlg::OnCbnSelchangeVersion() - { - FillValues(); - } - void CMapScriptEditDlg::FillValues(void) { m_clcValues.DeleteAllItems(); // Change the options in the values box ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); ! switch (iVersion) ! { ! case 0: ! this->m_clcValues.InsertItem( 0, _T("Title of the region") ); ! this->m_clcValues.InsertItem( 1, _T("Axis classification group") ); ! this->m_clcValues.InsertItem( 2, _T("Teleport Point") ); ! this->m_clcValues.InsertItem( 3, _T("Map Flags") ); ! this->m_clcValues.InsertItem( 4, _T("Guard owner title") ); ! this->m_clcValues.InsertItem( 5, _T("Chance of weather") ); ! this->m_clcValues.InsertItem( 6, _T("Chance of snow") ); ! this->m_clcValues.InsertItem( 7, _T("Announcement") ); ! this->m_clcValues.InsertItem( 8, _T("Name of locals") ); ! this->m_clcValues.InsertItem( 9, _T("Region Trigger") ); ! this->m_clcValues.InsertItem( 10, _T("Periodic Trigger") ); ! break; ! case 1: ! this->m_clcValues.InsertItem( 0, _T("Title of the region") ); ! this->m_clcValues.InsertItem( 1, _T("Axis classification group") ); ! this->m_clcValues.InsertItem( 2, _T("Teleport Point") ); ! this->m_clcValues.InsertItem( 3, _T("Map Flags") ); ! this->m_clcValues.InsertItem( 4, _T("Guard owner title") ); ! this->m_clcValues.InsertItem( 5, _T("Chance of weather") ); ! this->m_clcValues.InsertItem( 6, _T("Chance of snow") ); ! this->m_clcValues.InsertItem( 7, _T("Announcement") ); ! this->m_clcValues.InsertItem( 8, _T("Events") ); ! this->m_clcValues.InsertItem( 9, _T("Defname") ); ! this->m_clcValues.InsertItem( 10, _T("Class") ); ! this->m_clcValues.InsertItem( 11, _T("Resources") ); ! break; ! } HTREEITEM hItem = m_ctcRegionTree.GetSelectedItem(); --- 1222,1240 ---- } void CMapScriptEditDlg::FillValues(void) { m_clcValues.DeleteAllItems(); // Change the options in the values box ! this->m_clcValues.InsertItem( 0, _T("Title of the region") ); ! this->m_clcValues.InsertItem( 1, _T("Axis classification group") ); ! this->m_clcValues.InsertItem( 2, _T("Teleport Point") ); ! this->m_clcValues.InsertItem( 3, _T("Map Flags") ); ! this->m_clcValues.InsertItem( 4, _T("Guard owner title") ); ! this->m_clcValues.InsertItem( 5, _T("Chance of weather") ); ! this->m_clcValues.InsertItem( 6, _T("Chance of snow") ); ! this->m_clcValues.InsertItem( 7, _T("Announcement") ); ! this->m_clcValues.InsertItem( 8, _T("Name of locals") ); ! this->m_clcValues.InsertItem( 9, _T("Region Trigger") ); ! this->m_clcValues.InsertItem( 10, _T("Periodic Trigger") ); HTREEITEM hItem = m_ctcRegionTree.GetSelectedItem(); *************** *** 1411,1414 **** locale->LocalizeWindow(IDD, IDC_MAPCENTER, (CWnd*)&m_csCoords, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MAPDISPLAY, (CWnd*)&m_map, (CWnd*)this); - locale->LocalizeWindow(IDD, IDC_VERSION, (CWnd*)&m_ccbVersion, (CWnd*)this); } --- 1272,1274 ---- Index: MapScriptEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MapScriptEditDlg.h 2 Jul 2003 17:20:08 -0000 1.3 --- MapScriptEditDlg.h 10 Jul 2003 05:13:37 -0000 1.4 *************** *** 60,65 **** CPoint m_pTopLeft; void LoadMap(); - CByteArray m_bMapArray; - DWORD m_dwColorMap[65536]; virtual ~CMapScriptEditDlg(); CMapScriptEditDlg(CWnd* pParent = NULL); // standard constructor --- 60,63 ---- *************** *** 166,171 **** DECLARE_MESSAGE_MAP() public: - CComboBox m_ccbVersion; - afx_msg void OnCbnSelchangeVersion(); protected: void FillValues(void); --- 164,167 ---- Index: Resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Resource.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** Resource.h 9 Jul 2003 19:57:25 -0000 1.7 --- Resource.h 10 Jul 2003 05:13:37 -0000 1.8 *************** *** 53,57 **** --- 53,59 ---- #define IDC_PROFILE_SPHEREIP 214 #define IDC_PROFILE_SPHEREPORT 215 + #define IDI_ZOOMOUT 215 #define IDC_PROFILE_BASEPATH 216 + #define IDI_ZOOMIN 216 #define IDC_PROFILE_REMOTESPAWNS 217 #define IDI_FOLDER 217 *************** *** 73,76 **** --- 75,80 ---- #define IDC_PROFILE_DISCARD 232 #define IDC_UOMAPCTRL1 232 + #define IDI_UPARROW 237 + #define IDI_DOWNARROW 238 #define IDC_TRIGEDIT 1001 #define IDC_NPCATTRADD 1001 Index: S_Sphere52.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.rc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** S_Sphere52.rc 9 Jul 2003 19:57:25 -0000 1.9 --- S_Sphere52.rc 10 Jul 2003 05:13:37 -0000 1.10 *************** *** 437,442 **** PUSHBUTTON "Locate Room",IDC_LOCATEROOM,285,22,54,14 PUSHBUTTON "Set as new TelePoint",IDC_SETPOINT,343,7,73,14 - COMBOBOX IDC_VERSION,372,23,44,40,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP LISTBOX IDC_REGIONRECTLIST,7,119,108,45,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP --- 437,440 ---- *************** *** 457,466 **** CONTROL "",IDC_MAPDISPLAY,"{2AC21540-4C63-4663-BF24-D1DBD9205223}", WS_TABSTOP,205,57,276,252 ! ICON 215,IDC_ZOOMOUT,207,42,20,20,SS_NOTIFY | SS_REALSIZEIMAGE - ICON 216,IDC_ZOOMIN,224,42,20,20,SS_NOTIFY | SS_REALSIZEIMAGE LTEXT "Plane",IDC_STATIC_PLANE,445,47,19,8 LTEXT "0",IDC_PLANE,466,47,12,8 - LTEXT "Version",IDC_STATIC_VER,345,22,24,14,SS_CENTERIMAGE END --- 455,464 ---- CONTROL "",IDC_MAPDISPLAY,"{2AC21540-4C63-4663-BF24-D1DBD9205223}", WS_TABSTOP,205,57,276,252 ! ICON IDI_ZOOMOUT,IDC_ZOOMOUT,207,42,21,20,SS_NOTIFY | ! SS_REALSIZEIMAGE ! ICON IDI_ZOOMIN,IDC_ZOOMIN,224,42,20,20,SS_NOTIFY | SS_REALSIZEIMAGE LTEXT "Plane",IDC_STATIC_PLANE,445,47,19,8 LTEXT "0",IDC_PLANE,466,47,12,8 END *************** *** 1431,1434 **** --- 1429,1436 ---- IDI_DOC ICON "res\\doc.ico" IDI_FOLDER ICON "res\\folder.ico" + IDI_ZOOMOUT ICON "res\\zoomout.ico" + IDI_ZOOMIN ICON "res\\zoomin.ico" + IDI_DOWNARROW ICON "res\\downarro.ico" + IDI_UPARROW ICON "res\\uparrow.ico" ///////////////////////////////////////////////////////////////////////////// Index: S_Sphere52.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.vcproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** S_Sphere52.vcproj 9 Jul 2003 19:57:25 -0000 1.13 --- S_Sphere52.vcproj 10 Jul 2003 05:13:37 -0000 1.14 *************** *** 631,638 **** --- 631,650 ---- </File> <File + RelativePath="res\downarro.ico"> + </File> + <File RelativePath="res\folder.ico"> </File> <File RelativePath="res\icon1.ico"> + </File> + <File + RelativePath="res\uparrow.ico"> + </File> + <File + RelativePath="res\zoomin.ico"> + </File> + <File + RelativePath="res\zoomout.ico"> </File> </Filter> Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** ScriptsMain.cpp 2 Jul 2003 17:20:08 -0000 1.22 --- ScriptsMain.cpp 10 Jul 2003 05:13:37 -0000 1.23 *************** *** 797,801 **** } ! bool CScriptsMain::SaveMap(int iVersion) { LOG(locale->String(IDS_SCRIPTS_SAVING), locale->String(IDS_SCRIPTS_TMAP)); --- 797,801 ---- } ! bool CScriptsMain::SaveMap() { LOG(locale->String(IDS_SCRIPTS_SAVING), locale->String(IDS_SCRIPTS_TMAP)); *************** *** 803,940 **** bool bSaveStatus = false; ! switch (iVersion) { ! case 0: { ! // In 0.52, all customizations are saved in the map2 file. The original map file is left alone ! LOG(locale->String(IDS_SCRIPTS_SAVINGMAP), "0.52"); ! CStdioFile csfOutput; ! if ( ! csfOutput.Open(TMP_MAP_FILE, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite | CFile::typeText) ) ! { ! CString sMsg, s; ! s.Format(locale->String(IDS_SCRIPTS_TMAP)); ! sMsg.Format(locale->String(IDS_SCRIPTS_CANTOPENTEMP), TMP_MAP_FILE, s); ! LOG(sMsg); ! AfxMessageBox(sMsg, MB_OK | MB_ICONSTOP); ! return false; ! } ! Main->WriteFileHeader(&csfOutput, USER_MAP_FILE); ! // Go through this twice....once for areas and once for rooms ! for ( int iPass = 0; iPass < 2; iPass++ ) { ! POSITION pos = m_olAreas.GetHeadPosition(); ! while ( pos ) { ! CArea * pArea = (CArea *) m_olAreas.GetNext(pos); ! if ( pArea && pArea->m_bCustom ) { ! CRoom * pRoom = dynamic_cast <CRoom*> (pArea); ! switch(iPass) ! { ! case 0: ! if ( pRoom ) ! { ! // don't do anything ! } ! else ! pArea->Write(csfOutput, iVersion); ! break; ! case 1: ! if ( !pRoom ) ! { ! pRoom->Write(csfOutput, iVersion); ! } ! break; ! } } ! } ! } ! csfOutput.Close(); ! bSaveStatus = UpdateFiles( TMP_MAP_FILE, USER_MAP_FILE, RMT_MAP_FILE, _T("graymap") ); ! } ! break; ! case 1: ! { ! // In Sphere 0.55, things are done slightly differently ! LOG(locale->String(IDS_SCRIPTS_SAVINGMAP), "0.55"); ! // Each object can be stored in a separate file ! // Make a list of all of the files that we need to update ! vector<CString> vFiles; ! POSITION pos = m_olAreas.GetHeadPosition(); ! while ( pos ) ! { ! CArea * pArea = (CArea *) m_olAreas.GetNext(pos); ! if ( !pArea || !pArea->m_bCustom ) ! continue; ! CString s = pArea->m_csFilename; ! vector<CString>::iterator p = find(vFiles.begin(), vFiles.end(), s); ! if ( p == vFiles.end() ) ! vFiles.push_back(s); ! } ! // Check the moongates ! for ( int i = 0; i < (int) m_aMoongates.GetSize(); i++ ) ! { ! CScriptBase * pGate = m_aMoongates[i]; ! vector<CString>::iterator p = find(vFiles.begin(), vFiles.end(), pGate->m_csFilename); ! if ( p == vFiles.end() ) ! vFiles.push_back(pGate->m_csFilename); ! } ! // Check the teleporters as well ! for ( int i = 0; i < (int) m_aTeleporters.GetSize(); i++ ) ! { ! CScriptBase * pTele = m_aTeleporters[i]; ! vector<CString>::iterator p = find(vFiles.begin(), vFiles.end(), pTele->m_csFilename); ! if ( p == vFiles.end() ) ! vFiles.push_back(pTele->m_csFilename); ! } ! // Now that we know which files we are dealing with here, we can write all of this stuff out ! vector<CString>::iterator p = vFiles.begin(); ! while ( p != vFiles.end() ) ! { ! CString sFilename = *p; ! CString sTmpFilename = *p + _T(".tmp"); ! CStdioFile csfOutput; ! if ( !csfOutput.Open(sTmpFilename, CFile::modeWrite | CFile::modeCreate | CFile::shareDenyWrite | CFile::typeText) ) ! { ! CString s; ! s.Format(locale->String(IDS_SCRIPTS_CANTOPENTEMP), sTmpFilename, locale->String(IDS_SCRIPTS_TMAP)); ! LOG(s); ! AfxMessageBox(s, MB_OK | MB_ICONSTOP); ! return false; ! } ! Main->WriteFileHeader(&csfOutput, sFilename); ! POSITION pos = m_olAreas.GetHeadPosition(); ! while ( pos ) ! { ! CArea * pArea = (CArea *) m_olAreas.GetNext(pos); ! if ( !pArea ) ! continue; ! CString s = pArea->m_csFilename; ! if ( s.CompareNoCase(*p) == 0 ) { ! // The object belongs in this file ! CRoom * pRoom = dynamic_cast <CRoom*>(pArea); ! if ( pRoom ) ! pRoom->Write(csfOutput, iVersion); ! else ! pArea->Write(csfOutput, iVersion); } } - WriteMoongates(*p, csfOutput); - WriteTeleporters(*p, csfOutput); - csfOutput.Close(); - p++; } } - break; - default: - TCHAR szVersion[MAX_BUFFER]; - _stprintf(szVersion, _T("%ld"), iVersion); - CString sMsg; - sMsg.Format(locale->String(IDS_SCRIPTS_UNKNOWNMAP), szVersion); - LOG(sMsg); - AfxMessageBox(sMsg, MB_OK); - return false; } return bSaveStatus; } --- 803,851 ---- bool bSaveStatus = false; ! // In 0.52, all customizations are saved in the map2 file. The original map file is left alone ! LOG(locale->String(IDS_SCRIPTS_SAVINGMAP), "0.52"); ! CStdioFile csfOutput; ! if ( ! csfOutput.Open(TMP_MAP_FILE, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite | CFile::typeText) ) { ! CString sMsg, s; ! s.Format(locale->String(IDS_SCRIPTS_TMAP)); ! sMsg.Format(locale->String(IDS_SCRIPTS_CANTOPENTEMP), TMP_MAP_FILE, s); ! LOG(sMsg); ! AfxMessageBox(sMsg, MB_OK | MB_ICONSTOP); ! return false; ! } ! Main->WriteFileHeader(&csfOutput, USER_MAP_FILE); ! // Go through this twice....once for areas and once for rooms ! for ( int iPass = 0; iPass < 2; iPass++ ) ! { ! POSITION pos = m_olAreas.GetHeadPosition(); ! while ( pos ) { ! CArea * pArea = (CArea *) m_olAreas.GetNext(pos); ! if ( pArea && pArea->m_bCustom ) { ! CRoom * pRoom = dynamic_cast <CRoom*> (pArea); ! switch(iPass) { ! case 0: ! if ( pRoom ) { ! // don't do anything } ! else ! pArea->Write(csfOutput); ! break; ! case 1: ! if ( !pRoom ) { ! pRoom->Write(csfOutput); } + break; } } } } + csfOutput.Close(); + bSaveStatus = UpdateFiles( TMP_MAP_FILE, USER_MAP_FILE, RMT_MAP_FILE, _T("graymap") ); return bSaveStatus; } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** ScriptsMain.h 2 Jul 2003 17:20:08 -0000 1.13 --- ScriptsMain.h 10 Jul 2003 05:13:37 -0000 1.14 *************** *** 131,135 **** bool SaveTemplates(); bool SaveTables(); ! bool SaveMap(int iVersion); bool SaveTriggers(); bool SaveLocations(); --- 131,135 ---- bool SaveTemplates(); bool SaveTables(); ! bool SaveMap(); bool SaveTriggers(); bool SaveLocations(); |
From: Philip E. <pes...@us...> - 2003-07-10 04:30:47
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52/res In directory sc8-pr-cvs1:/tmp/cvs-serv8756 Added Files: downarro.ico uparrow.ico zoomin.ico zoomout.ico Log Message: no message --- NEW FILE: downarro.ico --- --- NEW FILE: uparrow.ico --- --- NEW FILE: zoomin.ico --- --- NEW FILE: zoomout.ico --- |
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv25651/S_Sphere52 Modified Files: AccountDlg.cpp DefEditDlg.cpp itemeditdlg.cpp itemeditdlg.h lootitemeditdlg.cpp MapScriptEditDlg.cpp NameEditDlg.cpp NotoTitleEditDlg.cpp NPC.h npceditdlg.cpp npceditdlg.h OreEditDlg.cpp PotionEdit.cpp PotionEdit.h Resource.h S_Sphere52.rc S_Sphere52.vcproj serverconfigdlg.cpp serverconfigdlg.h skilleditdlg.cpp SkillMenuEditDlg.cpp SkillMenuEditDlg.h SkillMenuGroup.cpp SkillTableEditDlg.cpp SkillTableEditDlg.h SpellEditDlg.cpp SpellEditDlg.h StatRateEditDlg.cpp StatRateEditDlg.h strings.h TemplateEditDlg.cpp TemplateEditDlg.h weighteditemdlg.cpp WOPEditDlg.cpp Added Files: Account.cpp Account.h addserver.cpp addserver.h foodtypeeditdlg.cpp foodtypeeditdlg.h TriggerEditDlg.cpp TriggerEditDlg.h Log Message: no message --- NEW FILE: Account.cpp --- #include "StdAfx.h" #include "account.h" CAccount::CAccount(void) { m_iPLevel = 1; m_wPrivs = 0; } CAccount::~CAccount(void) { } --- NEW FILE: Account.h --- #pragma once #include "scriptbase.h" class CAccount : public CScriptBase { public: CString m_csName; CString m_csPassword; WORD m_wPrivs; int m_iPLevel; CString m_csLang; CString m_csChat; CString m_csTime; CString m_csIP; CString m_csLastTime; CString m_csLastDate; CString m_csFirstIP; CString m_csFirstDate; CString m_csUID; CString m_csEMail; CString m_csFailures; CString m_csComment; CAccount(void); ~CAccount(void); }; --- NEW FILE: addserver.cpp --- /* $Id: addserver.cpp,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // AddServer.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "AddServer.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAddServer dialog CAddServer::CAddServer(CWnd* pParent /*=NULL*/) : CDialog(CAddServer::IDD, pParent) { //{{AFX_DATA_INIT(CAddServer) m_csServerName = _T(""); m_csServerIP = _T(""); m_csServerPort = _T(""); //}}AFX_DATA_INIT } void CAddServer::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAddServer) DDX_Text(pDX, IDC_NEWSERVERNAME, m_csServerName); DDX_Text(pDX, IDC_NEWSERVERIP, m_csServerIP); DDX_Text(pDX, IDC_NEWSERVERPORT, m_csServerPort); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_AS_STATIC1, m_sName); DDX_Control(pDX, IDC_AS_STATIC2, m_sIP); DDX_Control(pDX, IDC_AS_STATIC3, m_sPort); DDX_Control(pDX, IDC_NEWSERVERNAME, m_eName); DDX_Control(pDX, IDC_NEWSERVERIP, m_eIP); DDX_Control(pDX, IDC_NEWSERVERPORT, m_ePort); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAddServer, CDialog) //{{AFX_MSG_MAP(CAddServer) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAddServer message handlers void CAddServer::OnOK() { UpdateData(true); CDialog::OnOK(); } BOOL CAddServer::OnInitDialog() { CDialog::OnInitDialog(); Localize(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CAddServer::Localize(void) { locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AS_STATIC1, (CWnd*)&m_sName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AS_STATIC2, (CWnd*)&m_sIP, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AS_STATIC3, (CWnd*)&m_sPort, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWSERVERNAME, (CWnd*)&m_eName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWSERVERIP, (CWnd*)&m_eIP, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWSERVERPORT, (CWnd*)&m_ePort, (CWnd*)this); } --- NEW FILE: addserver.h --- /* $Id: addserver.h,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_ADDSERVER_H__0C7A30E1_0AB1_11D3_B244_004F4905E937__INCLUDED_) #define AFX_ADDSERVER_H__0C7A30E1_0AB1_11D3_B244_004F4905E937__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // AddServer.h : header file // ///////////////////////////////////////////////////////////////////////////// // CAddServer dialog class CAddServer : public CDialog { // Construction public: CAddServer(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CAddServer) enum { IDD = IDD_ADDSERVER_DLG }; CString m_csServerName; CString m_csServerIP; CString m_csServerPort; CButton m_bOK; CButton m_bCancel; CStatic m_sName; CStatic m_sIP; CStatic m_sPort; CEdit m_eName; CEdit m_eIP; CEdit m_ePort; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAddServer) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CAddServer) virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); virtual BOOL OnInitDialog(); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ADDSERVER_H__0C7A30E1_0AB1_11D3_B244_004F4905E937__INCLUDED_) --- NEW FILE: foodtypeeditdlg.cpp --- /* $Id: foodtypeeditdlg.cpp,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // FoodTypeEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "FoodTypeEditDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CFoodTypeEditDlg dialog CFoodTypeEditDlg::CFoodTypeEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CFoodTypeEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CFoodTypeEditDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CFoodTypeEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFoodTypeEditDlg) DDX_Control(pDX, IDC_FOODTYPE_NAME, m_ceFoodTypeName); DDX_Control(pDX, IDC_FOODTYPE_BITES, m_ceFoodTypeBites); DDX_Control(pDX, IDC_FOODTYPE_AMOUNT, m_ceFoodTypeAmount); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_FTE_STATIC1, m_sFoodyType); DDX_Control(pDX, IDC_FTE_STATIC2, m_sAmount); DDX_Control(pDX, IDC_FTE_STATIC3, m_sPerBite); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CFoodTypeEditDlg, CDialog) //{{AFX_MSG_MAP(CFoodTypeEditDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CFoodTypeEditDlg message handlers void CFoodTypeEditDlg::OnOK() { CWaitCursor hourglass; this->m_ceFoodTypeAmount.GetWindowText(m_csAmount); this->m_ceFoodTypeBites.GetWindowText(m_csBites); CDialog::OnOK(); } BOOL CFoodTypeEditDlg::OnInitDialog() { CDialog::OnInitDialog(); m_csAmount.TrimLeft(); m_csAmount.TrimRight(); m_csBites.TrimLeft(); m_csBites.TrimRight(); this->m_ceFoodTypeName.SetWindowText(m_csName); this->m_ceFoodTypeAmount.SetWindowText(m_csAmount); this->m_ceFoodTypeBites.SetWindowText(m_csBites); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CFoodTypeEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FOODTYPE_NAME, (CWnd*)&m_ceFoodTypeName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FOODTYPE_BITES, (CWnd*)&m_ceFoodTypeBites, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FOODTYPE_AMOUNT, (CWnd*)&m_ceFoodTypeAmount, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FTE_STATIC1, (CWnd*)&m_sFoodyType, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FTE_STATIC2, (CWnd*)&m_sAmount, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FTE_STATIC3, (CWnd*)&m_sPerBite, (CWnd*)this); } --- NEW FILE: foodtypeeditdlg.h --- /* $Id: foodtypeeditdlg.h,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_FOODTYPEEDITDLG_H__D641A8B4_E95A_11D2_A61F_004F4905E937__INCLUDED_) #define AFX_FOODTYPEEDITDLG_H__D641A8B4_E95A_11D2_A61F_004F4905E937__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // FoodTypeEditDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CFoodTypeEditDlg dialog class CFoodTypeEditDlg : public CDialog { // Construction public: CString m_csBites; CString m_csAmount; CString m_csName; CFoodTypeEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CFoodTypeEditDlg) enum { IDD = IDD_FOODTYPE_EDIT_DLG }; CEdit m_ceFoodTypeName; CEdit m_ceFoodTypeBites; CEdit m_ceFoodTypeAmount; CButton m_bOK; CButton m_bCancel; CStatic m_sFoodyType; CStatic m_sAmount; CStatic m_sPerBite; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CFoodTypeEditDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CFoodTypeEditDlg) virtual void OnOK(); virtual BOOL OnInitDialog(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_FOODTYPEEDITDLG_H__D641A8B4_E95A_11D2_A61F_004F4905E937__INCLUDED_) --- NEW FILE: TriggerEditDlg.cpp --- /* $Id: TriggerEditDlg.cpp,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // TriggerEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "TriggerEditDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTriggerEditDlg dialog CTriggerEditDlg::CTriggerEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CTriggerEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CTriggerEditDlg) //}}AFX_DATA_INIT m_bSingleMode = true; m_iSel = -1; m_dwNextRegion = 65000; m_dwNextTrig = 1400; } void CTriggerEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CTriggerEditDlg) DDX_Control(pDX, IDC_NEWREGIONTRIG, m_cbNewRegionTrig); DDX_Control(pDX, IDC_NEWTRIGGER, m_cbNewTrigger); DDX_Control(pDX, IDC_OLDCLIP, m_ceOldClip); DDX_Control(pDX, IDC_QUICKCLIP, m_ceQuickClip); DDX_Control(pDX, IDC_TOPERATORS, m_ccbOperators); DDX_Control(pDX, IDC_TRIGGEREDITBOX, m_ceTrigEdit); DDX_Control(pDX, IDC_TVERBS, m_ccbVerbs); DDX_Control(pDX, IDC_TEVALUATORS, m_ccbEvaluators); DDX_Control(pDX, IDC_TREFERENCES, m_ccbReferences); DDX_Control(pDX, IDC_TCONDITIONS, m_ccbConditions); DDX_Control(pDX, IDC_TATTRIBUTES, m_ccbAttributes); DDX_Control(pDX, IDC_TRIGGER_EVENT, m_ccbEvent); DDX_Control(pDX, IDC_TRIG_ID, m_ccbTriggerID); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_INSRTEVNT, m_bInsertEvent); DDX_Control(pDX, IDC_INSRTCOND, m_bInsertCondition); DDX_Control(pDX, IDC_INSRTATTR, m_bInsertAttr); DDX_Control(pDX, IDC_INSRTREF, m_bInsertRef); DDX_Control(pDX, IDC_INSRTVERB, m_bInsertVerb); DDX_Control(pDX, IDC_INSRTEVAL, m_bInsertEval); DDX_Control(pDX, IDC_INSRTOP, m_bInsertOperator); DDX_Control(pDX, IDC_TRIGEDIT_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_TRIGEDIT_STATIC2, m_sStatic2); DDX_Control(pDX, IDC_TRIGEDIT_STATIC3, m_sStatic3); DDX_Control(pDX, IDC_TRIGEDIT_STATIC4, m_sStatic4); DDX_Control(pDX, IDC_TRIGEDIT_STATIC5, m_sStatic5); DDX_Control(pDX, IDC_TRIGEDIT_STATIC6, m_sStatic6); DDX_Control(pDX, IDC_TRIGEDIT_STATIC7, m_sStatic7); DDX_Control(pDX, IDC_TRIGEDIT_STATIC8, m_sStatic8); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CTriggerEditDlg, CDialog) //{{AFX_MSG_MAP(CTriggerEditDlg) ON_BN_CLICKED(IDC_NEWTRIGGER, OnNewtrigger) ON_BN_CLICKED(IDOK, OnOk) ON_BN_CLICKED(IDC_INSRTATTR, OnInsrtattr) ON_BN_CLICKED(IDC_INSRTCOND, OnInsrtcond) ON_BN_CLICKED(IDC_INSRTEVAL, OnInsrteval) ON_BN_CLICKED(IDC_INSRTEVNT, OnInsrtevnt) ON_BN_CLICKED(IDC_INSRTREF, OnInsrtref) ON_BN_CLICKED(IDC_INSRTVERB, OnInsrtverb) ON_BN_CLICKED(IDC_INSRTOP, OnInsrtop) ON_CBN_SELCHANGE(IDC_TRIG_ID, OnSelchangeTrigId) ON_EN_CHANGE(IDC_TRIGGEREDITBOX, OnChangeTriggereditbox) ON_BN_CLICKED(IDC_NEWREGIONTRIG, OnNewregiontrig) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTriggerEditDlg message handlers void CTriggerEditDlg::OnNewtrigger() { CString csID; csID.Format(_T("TRIG %ld"), m_dwNextTrig); CTrigger * pNewTrigger = new (CTrigger); pNewTrigger->m_csID = csID; pNewTrigger->m_bIsCustom = true; m_dwNextTrig++; int iIndex = this->m_ccbTriggerID.AddString( csID ); this->m_ccbTriggerID.SetItemDataPtr( iIndex, (void *) pNewTrigger ); this->m_ccbTriggerID.SelectString( -1, csID ); } void CTriggerEditDlg::OnOk() { if ( this->m_bSingleMode ) { CDialog::OnOK(); return; } // Save all of the triggers. CStdioFile csfTriggers; if (csfTriggers.Open( TMP_TRIGGER_FILE, CFile::modeWrite | CFile::modeCreate | CFile::shareDenyNone ) ) { for ( int i = 0; i < this->m_ccbTriggerID.GetCount(); i++ ) { CTrigger * pTrigger = (CTrigger *) this->m_ccbTriggerID.GetItemDataPtr( i ); if ( pTrigger && pTrigger->m_bIsCustom ) { CString csLine; csLine.Format(_T("[%s]\n"), pTrigger->m_csID ); csfTriggers.WriteString(csLine); for ( int j = 0; j <= pTrigger->m_csaEvents.GetUpperBound(); j++ ) { csLine.Format(_T("%s\n"), pTrigger->m_csaEvents.GetAt(j)); csfTriggers.WriteString(csLine); } csfTriggers.WriteString(_T("\n")); } } } csfTriggers.Close(); CDialog::OnOK(); } BOOL CTriggerEditDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); FillEvents(); FillEvaluators(); FillAttributes(); FillVerbs(); FillReferences(); FillConditions(); if ( this->m_bSingleMode ) { // don't read the tustrig.scp file // fill the edit box with the stuff from the trigger if ( m_pCurrentTrigger ) { for ( int i = 0; i <= this->m_pCurrentTrigger->m_csaEvents.GetUpperBound(); i++ ) { CString csTrigger; for ( int i = 0; i <= m_pCurrentTrigger->m_csaEvents.GetUpperBound(); i++ ) { CString csTemp = csTrigger; if ( csTrigger != _T("") ) csTemp.Format(_T("%s%c%c%s"), csTrigger, 0x0d, 0x0a, m_pCurrentTrigger->m_csaEvents.GetAt(i)); else csTemp.Format(_T("%s"), m_pCurrentTrigger->m_csaEvents.GetAt(i)); csTrigger = csTemp; } this->m_ceTrigEdit.SetWindowText(csTrigger); } } this->m_ccbTriggerID.ShowWindow( SW_HIDE ); this->m_cbNewTrigger.ShowWindow( SW_HIDE ); this->m_cbNewRegionTrig.ShowWindow( SW_HIDE ); } else { // read the files from the trigger scripts CStdioFile csfTrigFile; CString csScpPath = Main->m_pScripts->GetScriptPath(); CString csFile; if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == _T("") ) csFile = TRIGGER_FILE; else csFile.Format(_T("%s%s"), csScpPath, TRIGGER_FILE); if (csfTrigFile.Open( csFile, CFile::modeRead | CFile::shareDenyNone )) { ReadFile( &csfTrigFile, false ); csfTrigFile.Close(); } if ( Main->GetProfileType() == PROFILE_REMOTE ) { Main->m_pAxis->GetRemoteFile(_T("spheretrig.scp"), _T("spheretrig.scp")); } if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == _T("") ) csFile = Main->GetProfileType() == PROFILE_REMOTE ? RMT_TRIGGER_FILE : USER_TRIGGER_FILE; else csFile.Format(_T("%s%s"), csScpPath, USER_TRIGGER_FILE); if (csfTrigFile.Open( csFile, CFile::modeRead | CFile::shareDenyNone ) ) { ReadFile( &csfTrigFile, true ); csfTrigFile.Close(); } } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CTriggerEditDlg::FillEvents() { this->m_ccbEvent.AddString(_T("DAMAGE")); this->m_ccbEvent.AddString(_T("DCLICK")); this->m_ccbEvent.AddString(_T("DROPON_CHAR")); this->m_ccbEvent.AddString(_T("DROPON_GROUND")); this->m_ccbEvent.AddString(_T("DROPON_ITEM")); this->m_ccbEvent.AddString(_T("DROPON_TYPE")); this->m_ccbEvent.AddString(_T("EQUIP")); this->m_ccbEvent.AddString(_T("HEAR")); this->m_ccbEvent.AddString(_T("PICKUP_GROUND")); this->m_ccbEvent.AddString(_T("PICKUP_PACK")); this->m_ccbEvent.AddString(_T("SPELL")); this->m_ccbEvent.AddString(_T("STEP")); this->m_ccbEvent.AddString(_T("TARGON_CHAR")); this->m_ccbEvent.AddString(_T("TARGON_GROUND")); this->m_ccbEvent.AddString(_T("TARGON_ITEM")); this->m_ccbEvent.AddString(_T("TARGON_TYPE")); this->m_ccbEvent.AddString(_T("TIMER")); this->m_ccbEvent.AddString(_T("UNEQUIP")); } void CTriggerEditDlg::FillAttributes() { // CObjBase stuff m_ccbAttributes.AddString(_T("TYPEDEF")); m_ccbAttributes.AddString(_T("NAME")); m_ccbAttributes.AddString(_T("TIMER")); m_ccbAttributes.AddString(_T("COLOR")); m_ccbAttributes.AddString(_T("UID")); m_ccbAttributes.AddString(_T("P")); m_ccbAttributes.AddString(_T("Z")); // CItem stuff m_ccbAttributes.AddString(_T("ID")); m_ccbAttributes.AddString(_T("AMOUNT")); m_ccbAttributes.AddString(_T("TYPE")); m_ccbAttributes.AddString(_T("ATTR")); m_ccbAttributes.AddString(_T("LINK")); m_ccbAttributes.AddString(_T("MORE1")); m_ccbAttributes.AddString(_T("MORE2")); m_ccbAttributes.AddString(_T("MOREP")); m_ccbAttributes.AddString(_T("MOREX")); m_ccbAttributes.AddString(_T("MOREY")); m_ccbAttributes.AddString(_T("MOREZ")); m_ccbAttributes.AddString(_T("HITPOINTS")); m_ccbAttributes.AddString(_T("FRUIT")); // CChar stuff m_ccbAttributes.AddString(_T("DIR")); m_ccbAttributes.AddString(_T("BODY")); m_ccbAttributes.AddString(_T("XBODY")); m_ccbAttributes.AddString(_T("XSKIN")); m_ccbAttributes.AddString(_T("HOME")); m_ccbAttributes.AddString(_T("FONT")); m_ccbAttributes.AddString(_T("FLAGS")); m_ccbAttributes.AddString(_T("ACTION")); m_ccbAttributes.AddString(_T("TITLE")); m_ccbAttributes.AddString(_T("HITS")); m_ccbAttributes.AddString(_T("STAMINA")); m_ccbAttributes.AddString(_T("MANA")); m_ccbAttributes.AddString(_T("FOOD")); m_ccbAttributes.AddString(_T("CREATE")); m_ccbAttributes.AddString(_T("ACTARG1")); m_ccbAttributes.AddString(_T("ACTARG2")); m_ccbAttributes.AddString(_T("STR")); m_ccbAttributes.AddString(_T("DEX")); m_ccbAttributes.AddString(_T("INT")); m_ccbAttributes.AddString(_T("KARMA")); m_ccbAttributes.AddString(_T("FAME")); m_ccbAttributes.AddString(_T("KILLS")); // Skills...ugh } void CTriggerEditDlg::FillVerbs() { // CObjBase stuff m_ccbVerbs.AddString(_T("REMOVE")); m_ccbVerbs.AddString(_T("MESSAGE")); m_ccbVerbs.AddString(_T("SPEAK")); m_ccbVerbs.AddString(_T("SOUND")); m_ccbVerbs.AddString(_T("EFFECT")); m_ccbVerbs.AddString(_T("FIX")); m_ccbVerbs.AddString(_T("FLIP")); m_ccbVerbs.AddString(_T("SHOW")); m_ccbVerbs.AddString(_T("MOVE")); m_ccbVerbs.AddString(_T("SPELLEFFECT")); m_ccbVerbs.AddString(_T("EDIT")); m_ccbVerbs.AddString(_T("NUDGEUP")); m_ccbVerbs.AddString(_T("NUDGEDOWN")); // CItem stuff m_ccbVerbs.AddString(_T("DUPE")); m_ccbVerbs.AddString(_T("BOUNCE")); // CChar stuff m_ccbVerbs.AddString(_T("DAMAGE")); m_ccbVerbs.AddString(_T("POLY")); m_ccbVerbs.AddString(_T("RESURRECT")); m_ccbVerbs.AddString(_T("GO")); m_ccbVerbs.AddString(_T("GOUID")); m_ccbVerbs.AddString(_T("GOCHAR")); m_ccbVerbs.AddString(_T("GOSOCK")); m_ccbVerbs.AddString(_T("GOCLI")); m_ccbVerbs.AddString(_T("JAIL")); m_ccbVerbs.AddString(_T("KICK")); m_ccbVerbs.AddString(_T("KILL")); m_ccbVerbs.AddString(_T("GHOST")); m_ccbVerbs.AddString(_T("NEWITEM")); m_ccbVerbs.AddString(_T("COUNT")); m_ccbVerbs.AddString(_T("CONSUME")); m_ccbVerbs.AddString(_T("SUMMONCAGE")); m_ccbVerbs.AddString(_T("ANIM")); m_ccbVerbs.AddString(_T("SLEEP")); m_ccbVerbs.AddString(_T("FACE")); m_ccbVerbs.AddString(_T("DISCONNECT")); m_ccbVerbs.AddString(_T("ALLSKILLS")); m_ccbVerbs.AddString(_T("BANK")); m_ccbVerbs.AddString(_T("SELL")); m_ccbVerbs.AddString(_T("BUY")); m_ccbVerbs.AddString(_T("BYE")); m_ccbVerbs.AddString(_T("BOW")); m_ccbVerbs.AddString(_T("SALUTE")); m_ccbVerbs.AddString(_T("ATTACK")); m_ccbVerbs.AddString(_T("DRAWMAP")); m_ccbVerbs.AddString(_T("EMOTE")); m_ccbVerbs.AddString(_T("SKILL")); m_ccbVerbs.AddString(_T("INVUL")); m_ccbVerbs.AddString(_T("INVIS")); m_ccbVerbs.AddString(_T("SHRINK")); m_ccbVerbs.AddString(_T("FORGIVE")); m_ccbVerbs.AddString(_T("UNDERWEAR")); m_ccbVerbs.AddString(_T("PETSTABLE")); m_ccbVerbs.AddString(_T("PETRETRIEVE")); m_ccbVerbs.AddString(_T("SUMMONTO")); m_ccbVerbs.AddString(_T("HUNGRY")); m_ccbVerbs.AddString(_T("WHERE")); m_ccbVerbs.AddString(_T("SUICIDE")); // CClient stuff m_ccbVerbs.AddString(_T("SET")); m_ccbVerbs.AddString(_T("GMMENU")); m_ccbVerbs.AddString(_T("ITEMMENU")); m_ccbVerbs.AddString(_T("WEBLINK")); m_ccbVerbs.AddString(_T("SYSMESSAGE")); m_ccbVerbs.AddString(_T("GMPAGE")); m_ccbVerbs.AddString(_T("VERSION")); m_ccbVerbs.AddString(_T("INFORMATION")); m_ccbVerbs.AddString(_T("ADDITEM")); m_ccbVerbs.AddString(_T("ADDNPC")); m_ccbVerbs.AddString(_T("SUMMON")); m_ccbVerbs.AddString(_T("REPAIR")); m_ccbVerbs.AddString(_T("PRIVSHOW")); m_ccbVerbs.AddString(_T("GOTARG")); m_ccbVerbs.AddString(_T("ALLMOVE")); m_ccbVerbs.AddString(_T("DEBUG")); m_ccbVerbs.AddString(_T("LISTEN")); m_ccbVerbs.AddString(_T("HEARALL")); m_ccbVerbs.AddString(_T("GM")); m_ccbVerbs.AddString(_T("DETAIL")); m_ccbVerbs.AddString(_T("BANKSELF")); m_ccbVerbs.AddString(_T("RESEND")); m_ccbVerbs.AddString(_T("CAST")); m_ccbVerbs.AddString(_T("TELE")); m_ccbVerbs.AddString(_T("STATIC")); m_ccbVerbs.AddString(_T("RETURN 0")); m_ccbVerbs.AddString(_T("RETURN 1")); } void CTriggerEditDlg::FillEvaluators() { m_ccbEvaluators.AddString(_T("==")); m_ccbEvaluators.AddString(_T("&&")); m_ccbEvaluators.AddString(_T("||")); m_ccbEvaluators.AddString(_T("!=")); m_ccbEvaluators.AddString(_T(">")); m_ccbEvaluators.AddString(_T("<")); m_ccbEvaluators.AddString(_T(">=")); m_ccbEvaluators.AddString(_T("<=")); } void CTriggerEditDlg::FillReferences() { m_ccbReferences.AddString(_T("LINK.")); m_ccbReferences.AddString(_T("REGION.")); m_ccbReferences.AddString(_T("ACT.")); m_ccbReferences.AddString(_T("TARG.")); m_ccbReferences.AddString(_T("SRC.")); } void CTriggerEditDlg::FillConditions() { m_ccbConditions.AddString(_T("IF")); m_ccbConditions.AddString(_T("ELSEIF")); m_ccbConditions.AddString(_T("ELSE")); m_ccbConditions.AddString(_T("ENDIF")); m_ccbConditions.AddString(_T("DORAND")); m_ccbConditions.AddString(_T("ENDDO")); } void CTriggerEditDlg::OnInsrtattr() { CString csAttr; this->m_ccbAttributes.GetWindowText(csAttr); this->m_ceQuickClip.SetWindowText(csAttr); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); } void CTriggerEditDlg::OnInsrtcond() { SaveClipboard(); CString csCond; this->m_ccbConditions.GetWindowText(csCond); this->m_ceQuickClip.SetWindowText(csCond); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::OnInsrteval() { SaveClipboard(); CString csEval; this->m_ccbEvaluators.GetWindowText(csEval); this->m_ceQuickClip.SetWindowText(csEval); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::OnInsrtevnt() { SaveClipboard(); CString csEvnt, csText; this->m_ccbEvent.GetWindowText(csEvnt); csText.Format(_T("ONTRIGGER=%s"), csEvnt); this->m_ceQuickClip.SetWindowText(csText); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::OnInsrtref() { SaveClipboard(); CString csRef; this->m_ccbReferences.GetWindowText(csRef); this->m_ceQuickClip.SetWindowText(csRef); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::OnInsrtverb() { SaveClipboard(); CString csVerb; this->m_ccbVerbs.GetWindowText(csVerb); this->m_ceQuickClip.SetWindowText(csVerb); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::OnInsrtop() { SaveClipboard(); CString csOp; this->m_ccbOperators.GetWindowText(csOp); this->m_ceQuickClip.SetWindowText(csOp); this->m_ceQuickClip.SetSel(0, -1); this->m_ceQuickClip.Copy(); this->m_ceTrigEdit.Paste(); RestoreClipboard(); } void CTriggerEditDlg::FillOperators() { m_ccbOperators.AddString(_T("=")); m_ccbOperators.AddString(_T("+")); m_ccbOperators.AddString(_T("+-")); m_ccbOperators.AddString(_T("*")); m_ccbOperators.AddString(_T("/")); m_ccbOperators.AddString(_T("|")); m_ccbOperators.AddString(_T("^")); m_ccbOperators.AddString(_T("&")); m_ccbOperators.AddString(_T("!")); } void CTriggerEditDlg::SaveClipboard() { this->m_ceOldClip.Clear(); this->m_ceOldClip.Paste(); } void CTriggerEditDlg::RestoreClipboard() { this->m_ceOldClip.SetSel(0, -1); this->m_ceOldClip.Copy(); } void CTriggerEditDlg::OnSelchangeTrigId() { if ( m_iSel >= 0 ) { CTrigger * pOldTrigger = (CTrigger *) this->m_ccbTriggerID.GetItemDataPtr( m_iSel ); if ( pOldTrigger ) { CStringArray csaNewEvents; for (int i = 0; i < this->m_ceTrigEdit.GetLineCount(); i++ ) { TCHAR szLine[512]; memset(&szLine[0], 0x00, sizeof(szLine)); this->m_ceTrigEdit.GetLine( i, szLine, sizeof(szLine) ); csaNewEvents.Add(szLine); } pOldTrigger->m_csaEvents.RemoveAll(); pOldTrigger->m_csaEvents.Copy( csaNewEvents ); } } m_iSel = this->m_ccbTriggerID.GetCurSel(); this->m_ceTrigEdit.SetWindowText(_T("")); CTrigger * pNewTrigger = (CTrigger *) this->m_ccbTriggerID.GetItemDataPtr( m_iSel ); if ( pNewTrigger ) { CString csTrigger; for ( int i = 0; i <= pNewTrigger->m_csaEvents.GetUpperBound(); i++ ) { CString csTemp = csTrigger; if ( csTrigger != _T("") ) csTemp.Format(_T("%s%c%c%s"), csTrigger, 0x0d, 0x0a, pNewTrigger->m_csaEvents.GetAt(i)); else csTemp.Format(_T("%s"), pNewTrigger->m_csaEvents.GetAt(i)); csTrigger = csTemp; } this->m_ceTrigEdit.SetWindowText(csTrigger); } else { CTrigger * pNewTrigger = new (CTrigger); this->m_ccbTriggerID.SetItemDataPtr( m_iSel, (void *) pNewTrigger ); } this->m_pCurrentTrigger = pNewTrigger; } void CTriggerEditDlg::OnChangeTriggereditbox() { if ( this->m_pCurrentTrigger ) this->m_pCurrentTrigger->m_bIsCustom = true; } void CTriggerEditDlg::ReadFile(CStdioFile *pFile, bool bIsCustom) { BOOL bStatus = TRUE; CTrigger * pTrigger = NULL; while ( bStatus ) { CString csLine; bStatus = pFile->ReadString( csLine ); if ( bStatus ) { if ( csLine.Find(_T("[")) == 0 ) { // got a new trigger entry if ( pTrigger ) { // Anything to do to finish this guy up? } CString csTemp = csLine.Mid(1); csTemp = csTemp.SpanExcluding(_T("]")); csTemp.MakeUpper(); if ( csTemp.Find(_T("REGION")) != -1 ) { CString csID = csTemp.Mid(csTemp.Find(_T("REGION")) + 6); DWORD dwID = _tstoi(csID); if ( dwID >= m_dwNextRegion ) m_dwNextRegion = dwID + 1; } if ( csTemp.Find(_T("TRIG")) != -1 ) { CString csID = csTemp.Mid(csTemp.Find(_T("TRIG")) + 4); DWORD dwID = _tstoi(csID); if ( dwID >= m_dwNextTrig ) m_dwNextTrig = dwID + 1; } // does this one already exist? int iIndex = this->m_ccbTriggerID.FindString( -1, csTemp ); if ( iIndex != -1 ) { pTrigger = (CTrigger *) this->m_ccbTriggerID.GetItemDataPtr( iIndex ); pTrigger->m_csaEvents.RemoveAll(); } else { pTrigger = new (CTrigger); iIndex = this->m_ccbTriggerID.AddString(csTemp); this->m_ccbTriggerID.SetItemDataPtr( iIndex, (void *) pTrigger ); } pTrigger->m_csID = csTemp; pTrigger->m_bIsCustom = bIsCustom; } else { // either we are before the triggers, or we are inside one if ( pTrigger ) pTrigger->m_csaEvents.Add( csLine ); } } } } CTriggerEditDlg::~CTriggerEditDlg() { } BOOL CTriggerEditDlg::DestroyWindow() { for ( int i = 0; i < this->m_ccbTriggerID.GetCount(); i++ ) { CTrigger * pTrigger = (CTrigger *) this->m_ccbTriggerID.GetItemDataPtr( i ); if ( pTrigger ) { pTrigger->m_csaEvents.RemoveAll(); delete pTrigger; } } return CDialog::DestroyWindow(); } void CTriggerEditDlg::OnNewregiontrig() { CString csID; csID.Format(_T("REGION %ld"), m_dwNextRegion); CTrigger * pNewTrigger = new (CTrigger); pNewTrigger->m_csID = csID; pNewTrigger->m_bIsCustom = true; m_dwNextRegion++; int iIndex = this->m_ccbTriggerID.AddString( csID ); this->m_ccbTriggerID.SetItemDataPtr( iIndex, (void *) pNewTrigger ); this->m_ccbTriggerID.SelectString( -1, csID ); } void CTriggerEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWREGIONTRIG, (CWnd*)&m_cbNewRegionTrig, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWTRIGGER, (CWnd*)&m_cbNewTrigger, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_OLDCLIP, (CWnd*)&m_ceOldClip, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_QUICKCLIP, (CWnd*)&m_ceQuickClip, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TOPERATORS, (CWnd*)&m_ccbOperators, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGGEREDITBOX, (CWnd*)&m_ceTrigEdit, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TVERBS, (CWnd*)&m_ccbVerbs, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TEVALUATORS, (CWnd*)&m_ccbEvaluators, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TREFERENCES, (CWnd*)&m_ccbReferences, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TCONDITIONS, (CWnd*)&m_ccbConditions, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TATTRIBUTES, (CWnd*)&m_ccbAttributes, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGGER_EVENT, (CWnd*)&m_ccbEvent, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIG_ID, (CWnd*)&m_ccbTriggerID, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTEVNT, (CWnd*)&m_bInsertEvent, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTCOND, (CWnd*)&m_bInsertCondition, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTATTR, (CWnd*)&m_bInsertAttr, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTREF, (CWnd*)&m_bInsertRef, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTVERB, (CWnd*)&m_bInsertVerb, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTEVAL, (CWnd*)&m_bInsertEval, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_INSRTOP, (CWnd*)&m_bInsertOperator, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC3, (CWnd*)&m_sStatic3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC4, (CWnd*)&m_sStatic4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC5, (CWnd*)&m_sStatic5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC6, (CWnd*)&m_sStatic6, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC7, (CWnd*)&m_sStatic7, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TRIGEDIT_STATIC8, (CWnd*)&m_sStatic8, (CWnd*)this); } --- NEW FILE: TriggerEditDlg.h --- /* $Id: TriggerEditDlg.h,v 1.1 2003/07/09 19:57:25 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_TRIGGEREDITDLG_H__94091823_C539_11D3_A386_00805FD91B8C__INCLUDED_) #define AFX_TRIGGEREDITDLG_H__94091823_C539_11D3_A386_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // TriggerEditDlg.h : header file // #include "Trigger.h" ///////////////////////////////////////////////////////////////////////////// // CTriggerEditDlg dialog class CTriggerEditDlg : public CDialog { // Construction public: virtual ~CTriggerEditDlg(); CTrigger * m_pCurrentTrigger; int m_iSel; bool m_bSingleMode; bool m_bInAssignment; int m_iConditions; bool m_bInCondition; int m_iBlockCount; bool m_bOpenBrace; bool m_bNewLine; CString m_csLine; CTriggerEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CTriggerEditDlg) enum { IDD = IDD_TRIGGEREDITDLG }; CButton m_cbNewRegionTrig; CButton m_cbNewTrigger; CEdit m_ceOldClip; CEdit m_ceQuickClip; CComboBox m_ccbOperators; CEdit m_ceTrigEdit; CComboBox m_ccbVerbs; CComboBox m_ccbEvaluators; CComboBox m_ccbReferences; CComboBox m_ccbConditions; CComboBox m_ccbAttributes; CComboBox m_ccbEvent; CComboBox m_ccbTriggerID; CButton m_bOK; CButton m_bCancel; CButton m_bInsertEvent; CButton m_bInsertCondition; CButton m_bInsertAttr; CButton m_bInsertRef; CButton m_bInsertVerb; CButton m_bInsertEval; CButton m_bInsertOperator; CButton m_sStatic1; CButton m_sStatic2; CButton m_sStatic3; CButton m_sStatic4; CButton m_sStatic5; CButton m_sStatic6; CButton m_sStatic7; CButton m_sStatic8; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CTriggerEditDlg) public: virtual BOOL DestroyWindow(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: DWORD m_dwNextRegion; DWORD m_dwNextTrig; void ReadFile(CStdioFile * pFile, bool bIsCustom); void RestoreClipboard(); void SaveClipboard(); void FillOperators(); void FillConditions(); void FillReferences(); void FillEvaluators(); void FillVerbs(); void FillAttributes(); void FillEvents(); // Generated message map functions //{{AFX_MSG(CTriggerEditDlg) afx_msg void OnNewtrigger(); afx_msg void OnOk(); virtual BOOL OnInitDialog(); afx_msg void OnInsrtattr(); afx_msg void OnInsrtcond(); afx_msg void OnInsrteval(); afx_msg void OnInsrtevnt(); afx_msg void OnInsrtref(); afx_msg void OnInsrtval(); afx_msg void OnInsrtverb(); afx_msg void OnInsrtop(); afx_msg void OnSelchangeTrigId(); afx_msg void OnChangeTriggereditbox(); afx_msg void OnNewregiontrig(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_TRIGGEREDITDLG_H__94091823_C539_11D3_A386_00805FD91B8C__INCLUDED_) Index: AccountDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/AccountDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AccountDlg.cpp 3 Jul 2003 18:09:29 -0000 1.1 --- AccountDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- #include "AccountDlg.h" #include "AddValueDialog.h" + #include "Account.h" #ifdef _DEBUG *************** *** 36,39 **** --- 37,66 ---- #endif + const TCHAR * knownAcctTags [] = + { + _T("ACCOUNT"), + _T("BLOCK"), + _T("CHATNAME"), + _T("COMMENT"), + _T("EMAIL"), + _T("EMAILFAIL"), + _T("EMAILMSG"), + _T("FIRSTCONNECTDATE"), + _T("FIRSTIP"), + _T("GUEST"), + _T("JAIL"), + _T("LANG"), + _T("LASTCHARUID"), + _T("LASTCONNECTDATE"), + _T("LASTCONNECTTIME"), + _T("LASTIP"), + _T("LEVEL"), + _T("PASSWORD"), + _T("PLEVEL"), + _T("PRIV"), + _T("T2A"), + _T("TOTALCONNECTTIME"), + }; + ///////////////////////////////////////////////////////////////////////////// // CAccountDlg dialog *************** *** 293,297 **** if ( iSel != -1 ) { ! AxisMessageBox(locale->String(IDS_ACCTEDIT_ACCOUNTEXISTS), MB_OK | MB_ICONEXCLAMATION); delete pAcct; return; --- 320,324 ---- if ( iSel != -1 ) { ! AfxMessageBox(locale->String(IDS_ACCTEDIT_ACCOUNTEXISTS), MB_OK | MB_ICONEXCLAMATION); delete pAcct; return; *************** *** 316,334 **** CString csMsg; csMsg.Format(locale->String(IDS_ACCTEDIT_DELETEACCT), pAcct->m_csName); ! if ( AxisMessageBox( csMsg, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL ) return; ! if ( AxisMessageBox( locale->String(IDS_ACCTEDIT_DELETEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION) == IDCANCEL ) return; // Two warnings is enough ! if ( Main->m_pScriptsOld->m_bNewFormat ) ! { ! if ( Main->m_dwCommandVersion ) ! csMsg.Format(_T(".serv.accountmgr %s delete"), pAcct->m_csName); ! else ! csMsg.Format(_T(".serv.account %s delete"), pAcct->m_csName); ! } ! else ! csMsg.Format(_T(".account %s delete"), pAcct->m_csName); ! SendToUORaw(csMsg); this->m_clbAcctList.DeleteString( iSel ); delete pAcct; --- 343,353 ---- CString csMsg; csMsg.Format(locale->String(IDS_ACCTEDIT_DELETEACCT), pAcct->m_csName); ! if ( AfxMessageBox( csMsg, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL ) return; ! if ( AfxMessageBox( locale->String(IDS_ACCTEDIT_DELETEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION) == IDCANCEL ) return; // Two warnings is enough ! csMsg.Format(_T(".account %s delete"), pAcct->m_csName); ! Main->m_pAxis->SendText(csMsg); this->m_clbAcctList.DeleteString( iSel ); delete pAcct; *************** *** 364,368 **** if ( csPath == _T("") ) { ! AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTFINDFILE), MB_OK | MB_ICONEXCLAMATION); return; } --- 383,387 ---- if ( csPath == _T("") ) { ! AfxMessageBox(locale->String(IDS_ACCTEDIT_CANTFINDFILE), MB_OK | MB_ICONEXCLAMATION); return; } *************** *** 414,421 **** if ( Main->GetProfileType() == PROFILE_REMOTE ) { ! CRemoteConnection remote; ! if ( ! remote.SendCustomFile(_T("grayacct"), csFile ) ) { ! if ( AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTUPLOAD), MB_YESNO | MB_ICONQUESTION ) == IDNO ) return; else --- 433,439 ---- if ( Main->GetProfileType() == PROFILE_REMOTE ) { ! if ( ! Main->m_pAxis->SendLocalFile(_T("sphereaccu.scp"), csFile ) ) { ! if ( AfxMessageBox(locale->String(IDS_ACCTEDIT_CANTUPLOAD), MB_YESNO | MB_ICONQUESTION ) == IDNO ) return; else *************** *** 428,432 **** } if ( this->m_clbUpdates.GetCount() > 0 ) ! AxisMessageBox(locale->String(IDS_ACCTEDIT_CHANGESQUEUED), MB_OK | MB_ICONINFORMATION); } --- 446,450 ---- } if ( this->m_clbUpdates.GetCount() > 0 ) ! AfxMessageBox(locale->String(IDS_ACCTEDIT_CHANGESQUEUED), MB_OK | MB_ICONINFORMATION); } *************** *** 439,443 **** if ( this->m_clbUpdates.GetCount() != 0 ) { ! if ( AxisMessageBox(locale->String(IDS_ACCTEDIT_CLOSEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION ) == IDCANCEL ) return; } --- 457,461 ---- if ( this->m_clbUpdates.GetCount() != 0 ) { ! if ( AfxMessageBox(locale->String(IDS_ACCTEDIT_CLOSEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION ) == IDCANCEL ) return; } *************** *** 596,602 **** if ( Main->GetProfileType() == PROFILE_REMOTE ) { - CRemoteConnection remote; csFile.Format(_T("%s\\%s"), Main->GetProfileString(), RMT_ACCU_FILE); ! remote.GetCustomFile(_T("grayacct"), csFile); } else --- 614,619 ---- if ( Main->GetProfileType() == PROFILE_REMOTE ) { csFile.Format(_T("%s\\%s"), Main->GetProfileString(), RMT_ACCU_FILE); ! Main->m_pAxis->GetRemoteFile(_T("sphereaccu.scp"), csFile); } else *************** *** 621,625 **** if ( csPath == _T("") ) { ! AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTOPEN), MB_OK | MB_ICONEXCLAMATION); return; } --- 638,642 ---- if ( csPath == _T("") ) { ! AfxMessageBox(locale->String(IDS_ACCTEDIT_CANTOPEN), MB_OK | MB_ICONEXCLAMATION); return; } *************** *** 720,724 **** else { ! AxisMessageBox(_T("Unable to open the account file."), MB_OK | MB_ICONEXCLAMATION); return; } --- 737,741 ---- else { ! AfxMessageBox(_T("Unable to open the account file."), MB_OK | MB_ICONEXCLAMATION); return; } Index: DefEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/DefEditDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** DefEditDlg.cpp 3 Jul 2003 18:09:29 -0000 1.1 --- DefEditDlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 *************** *** 28,32 **** #include "Scripts.h" #include "DefEditDlg.h" - #include "RemoteConsole.h" #ifdef _DEBUG --- 28,31 ---- *************** *** 120,129 **** if ( csName == _T("") ) { ! AxisMessageBox(locale->String(IDS_DEFEDIT_BLANK), MB_OK | MB_ICONEXCLAMATION); return; } if ( csName.SpanExcluding( _T(" =+)(*&^%$#@!~`';:[]}{<>.,/?\\|\"") ) != csName ) { ! AxisMessageBox(locale->String(IDS_DEFEDIT_INVALID), MB_OK | MB_ICONEXCLAMATION ); return; } --- 119,128 ---- if ( csName == _T("") ) { ! AfxMessageBox(locale->String(IDS_DEFEDIT_BLANK), MB_OK | MB_ICONEXCLAMATION); return; } if ( csName.SpanExcluding( _T(" =+)(*&^%$#@!~`';:[]}{<>.,/?\\|\"") ) != csName ) { ! AfxMessageBox(locale->String(IDS_DEFEDIT_INVALID), MB_OK | MB_ICONEXCLAMATION ); return; } *************** *** 133,137 **** if ( csGroup == _T("") ) { ! AxisMessageBox(locale->String(IDS_DEFEDIT_GROUP), MB_OK | MB_ICONEXCLAMATION ); return; } --- 132,136 ---- if ( csGroup == _T("") ) { ! AfxMessageBox(locale->String(IDS_DEFEDIT_GROUP), MB_OK | MB_ICONEXCLAMATION ); return; } *************** *** 139,143 **** CStdioFile csfTmp; CStdioFile csfOld; ! CString csScpPath = GetScriptPath(); CString csFile; if ( !csfTmp.Open( TMP_DEFS_FILE, CFile::modeWrite | CFile::shareDenyWrite | CFile::modeCreate ) ) --- 138,142 ---- CStdioFile csfTmp; CStdioFile csfOld; ! CString csScpPath = Main->m_pScripts->GetScriptPath(); CString csFile; if ( !csfTmp.Open( TMP_DEFS_FILE, CFile::modeWrite | CFile::shareDenyWrite | CFile::modeCreate ) ) *************** *** 146,150 **** s.Format(locale->String(IDS_SCRIPTS_TDEFS)); csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPENTEMP), TMP_DEFS_FILE, s ); ! AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); return; } --- 145,149 ---- s.Format(locale->String(IDS_SCRIPTS_TDEFS)); csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPENTEMP), TMP_DEFS_FILE, s ); ! AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); return; } *************** *** 157,161 **** CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); csfOld.Open( csFile, CFile::modeCreate | CFile::shareDenyNone ); csfOld.Close(); --- 156,160 ---- CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); csfOld.Open( csFile, CFile::modeCreate | CFile::shareDenyNone ); csfOld.Close(); *************** *** 216,220 **** } // Update the file ! UpdateFiles( TMP_DEFS_FILE, USER_DEFS_FILE, RMT_DEFS_FILE, _T("graydefs") ); CDialog::OnOK(); } --- 215,219 ---- } // Update the file ! // UpdateFiles( TMP_DEFS_FILE, USER_DEFS_FILE, RMT_DEFS_FILE, _T("graydefs") ); CDialog::OnOK(); } *************** *** 229,240 **** this->m_cbType.SetCheck(1); - // Make sure we have the tusdefs.scp file - if ( Main->GetProfileType() == PROFILE_REMOTE ) - { - CRemoteConnection remote; - remote.GetCustomFile(_T("graydefs") ); - } CStdioFile csfDefsFile; ! CString csScpPath = GetScriptPath(); CString csFile; if ( csScpPath == _T("") ) --- 228,233 ---- this->m_cbType.SetCheck(1); CStdioFile csfDefsFile; ! CString csScpPath = Main->m_pScripts->GetScriptPath(); CString csFile; if ( csScpPath == _T("") ) *************** *** 246,250 **** CString csMessage; csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); this->m_cbSave.EnableWindow( FALSE ); } --- 239,243 ---- CString csMessage; csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); this->m_cbSave.EnableWindow( FALSE ); } *************** *** 286,290 **** CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); } else --- 279,283 ---- CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); ! AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); } else Index: itemeditdlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/itemeditdlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** itemeditdlg.cpp 3 Jul 2003 18:09:29 -0000 1.1 --- itemeditdlg.cpp 9 Jul 2003 19:57:25 -0000 1.2 *************** *** 30,34 **** #include "AddValueDialog.h" #include "TriggerEditDlg.h" ! #include "ColorSelectionDlg.h" #ifdef _DEBUG --- 30,35 ---- #include "AddValueDialog.h" #include "TriggerEditDlg.h" ! #include "TSpellDef.h" ! #include "types.h" #ifdef _DEBUG *************** *** 81,85 **** DDX_Control(pDX, IDC_WEIGHT, m_ceWeight); DDX_Control(pDX, IDC_SUBSECTION, m_ccbSubsection); - DDX_Control(pDX, IDC_STATIC_ID, m_csBase); DDX_Control(pDX, IDC_SPELLID, m_ccbSpell); DDX_Control(pDX, IDC_SKILL, m_ccbSkill); --- 82,85 ---- *************** *** 166,172 **** Localize(); ! Main->m_pScriptsOld->LoadItems(); ! Main->m_pScriptsOld->LoadTemplates(); ! Main->m_pScriptsOld->CategorizeItems(); // Populate those darn combo boxes --- 166,172 ---- Localize(); ! Main->m_pScripts->LoadItems(); ! Main->m_pScripts->LoadTemplates(); ! CategorizeItems(); // Populate those darn combo boxes *************** *** 175,181 **** FillDupeItems(); ! for ( int i = 0; i < Main->m_pScriptsOld->m_aItems.GetSize(); i++ ) { ! CCategorizedScriptBase * pItem = (CCategorizedScriptBase *) Main->m_pScriptsOld->m_aItems.GetAt(i); if ( !pItem ) continue; --- 175,181 ---- FillDupeItems(); ! for ( int i = 0; i < (int) Main->m_pScripts->m_aItems.GetSize(); i++ ) { ! CCategorizedScriptBase * pItem = (CCategorizedScriptBase *) Main->m_pScripts->m_aItems.GetAt(i); if ( !pItem ) continue; *************** *** 184,196 **** CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScriptsOld->m_aItems.Find(csDupe); if ( iIndex == -1 ) { csDupe.Format(_T("%04x"), ahextoi(pItem->m_csDupeItem)); ! iIndex = Main->m_pScriptsOld->m_aItems.Find(csDupe); } if ( iIndex != -1 ) { ! CCategorizedScriptBase * pDupe = (CCategorizedScriptBase *) Main->m_pScriptsOld->m_aItems.GetAt(iIndex); if ( pItem->m_csCategory == _T("<none>") ) pItem->m_csCategory = pDupe->m_csCategory; --- 184,196 ---- CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScripts->m_aItems.Find(csDupe); if ( iIndex == -1 ) { csDupe.Format(_T("%04x"), ahextoi(pItem->m_csDupeItem)); ! iIndex = Main->m_pScripts->m_aItems.Find(csDupe); } if ( iIndex != -1 ) { ! CCategorizedScriptBase * pDupe = (CCategorizedScriptBase *) Main->m_pScripts->m_aItems.GetAt(iIndex); if ( pItem->m_csCategory == _T("<none>") ) pItem->m_csCategory = pDupe->m_csCategory; *************** *** 206,210 **** csString.Format(_T("%s [%s]"), pItem->m_csDescription, pItem->m_csValue); int index = this->m_ccbEntry.AddString(csString); ! this->m_ccbEntry.SetItemData(index, (DWORD) pItem); } --- 206,210 ---- csString.Format(_T("%s [%s]"), pItem->m_csDescription, pItem->m_csValue); int index = this->m_ccbEntry.AddString(csString); ! this->m_ccbEntry.SetItemData(index, (DWORD_PTR) pItem); } *************** *** 219,234 **** // Fill in the category box ! if (!Main->m_pScriptsOld->m_olItems.IsEmpty()) ! { ! POSITION pos = Main->m_pScriptsOld->m_olItems.GetHeadPosition(); ! while (pos != NULL) ! { ! CCategory * pCategory = (CCategory *) Main->m_pScriptsOld->m_olItems.GetNext(pos); ! int iIndex = m_ccbCategory.AddString(pCategory->m_csName); ! m_ccbCategory.SetItemData(iIndex, (DWORD) pCategory); ! } ! } ! m_hPaletteIcon = Main->LoadIcon(IDI_PALETTE); this->m_cbPalette.SetIcon(m_hPaletteIcon); if ( m_pItem != NULL ) --- 219,225 ---- // Fill in the category box ! FillCategoryTree(); ! m_hPaletteIcon = AfxGetApp()->LoadIcon(IDI_PALETTE); this->m_cbPalette.SetIcon(m_hPaletteIcon); if ( m_pItem != NULL ) *************** *** 273,277 **** CSubsection * pSubsection = (CSubsection *) pCategory->m_SubsectionList.GetNext(pos); int iIndex = m_ccbSubsection.AddString(pSubsection->m_csName); ! m_ccbSubsection.SetItemData(iIndex, (DWORD) pSubsection); } } --- 264,268 ---- CSubsection * pSubsection = (CSubsection *) pCategory->m_SubsectionList.GetNext(pos); int iIndex = m_ccbSubsection.AddString(pSubsection->m_csName); ! m_ccbSubsection.SetItemData(iIndex, (DWORD_PTR) pSubsection); } } *************** *** 338,342 **** // TODO: Add your control notification handler code here int iSel = m_ccbItemType.GetCurSel(); ! int iType = m_ccbItemType.GetItemData(iSel); bool bWeapon = false; bool bArmour = false; --- 329,333 ---- // TODO: Add your control notification handler code here int iSel = m_ccbItemType.GetCurSel(); ! int iType = (int) m_ccbItemType.GetItemData(iSel); bool bWeapon = false; bool bArmour = false; *************** *** 394,401 **** CString csValue; csValue.Format(_T("%s"), m_csDispID); ! int iIndex = Main->m_pScriptsOld->m_aItems.Find(csValue); if ( iIndex != -1 ) { ! CItem * pBase = (CItem *) Main->m_pScriptsOld->m_aItems.GetAt(iIndex); if ( pBase ) { --- 385,392 ---- CString csValue; csValue.Format(_T("%s"), m_csDispID); ! int iIndex = Main->m_pScripts->m_aItems.Find(csValue); if ( iIndex != -1 ) { ! CItem * pBase = (CItem *) Main->m_pScripts->m_aItems.GetAt(iIndex); if ( pBase ) { *************** *** 411,418 **** CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScriptsOld->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CItem * pDupe = (CItem *) Main->m_pScriptsOld->m_aItems.GetAt(iIndex); if ( pItem->m_csCategory == _T("<none>") ) pItem->m_csCategory = pDupe->m_csCategory; --- 402,409 ---- CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScripts->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CItem * pDupe = (CItem *) Main->m_pScripts->m_aItems.GetAt(iIndex); if ( pItem->m_csCategory == _T("<none>") ) pItem->m_csCategory = pDupe->m_csCategory; *************** *** 529,544 **** if (pItem->m_bySpell != 0) { ! CString csSpell = SpellNames[pItem->m_bySpell]; m_ccbSpell.SetCurSel(m_ccbSpell.FindStringExact(-1, csSpell)); } if (pItem->m_csDupeItem != _T("")) { - CDrewskyApp * pApp = (CDrewskyApp *) AfxGetApp(); CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = pApp->m_pScriptsOld->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CCategorizedScriptBase * pDupe = (CCategorizedScriptBase *) pApp->m_pScriptsOld->m_aItems.GetAt(iIndex); int iCurIndex = this->m_ccbDupeitem.GetCurSel(); if (iCurIndex == -1) --- 520,534 ---- if (pItem->m_bySpell != 0) { ! CString csSpell = Main->m_pScripts->SpellName(pItem->m_bySpell); m_ccbSpell.SetCurSel(m_ccbSpell.FindStringExact(-1, csSpell)); } if (pItem->m_csDupeItem != _T("")) { CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScripts->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CCategorizedScriptBase * pDupe = (CCategorizedScriptBase *) Main->m_pScripts->m_aItems.GetAt(iIndex); int iCurIndex = this->m_ccbDupeitem.GetCurSel(); if (iCurIndex == -1) *************** *** 597,612 **** { CItem * pDupe = NULL; - CDrewskyApp * pApp = (CDrewskyApp*) AfxGetApp(); if (pItem->m_csDupeItem != _T("")) { CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = pApp->m_pScriptsOld->m_aItems.Find(csDupe); if ( iIndex != -1 ) ! pDupe = (CItem *) pApp->m_pScriptsOld->m_aItems.GetAt(iIndex); } if (pDupe == NULL) { ! AxisMessageBox(locale->String(IDS_ITEMEDIT_CATSLOST), MB_OK | MB_ICONEXCLAMATION); m_ccbCategory.SetCurSel(0); m_ccbSubsection.SetCurSel(0); --- 587,601 ---- { CItem * pDupe = NULL; if (pItem->m_csDupeItem != _T("")) { CString csDupe; csDupe.Format(_T("%s"), pItem->m_csDupeItem); ! int iIndex = Main->m_pScripts->m_aItems.Find(csDupe); if ( iIndex != -1 ) ! pDupe = (CItem *) Main->m_pScripts->m_aItems.GetAt(iIndex); } if (pDupe == NULL) { ! AfxMessageBox(locale->String(IDS_ITEMEDIT_CATSLOST), MB_OK | MB_ICONEXCLAMATION); m_ccbCategory.SetCurSel(0); m_ccbSubsection.SetCurSel(0); *************** *** 671,681 **** this->m_ccbDupeitem.GetLBText(iIndex, csDupeItem); this->m_pItem->m_csDupeItem = csDupeItem; - CDrewskyApp * pApp = (CDrewskyApp *) AfxGetApp(); CString csDupe; csDupe.Format(_T("%s"), csDupeItem); ! int iIndex = pApp->m_pScriptsOld->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CItem * pDupe = (CItem *) pApp->m_pScriptsOld->m_aItems.GetAt(iIndex); if (pDupe != NULL) this->m_pItem->Dupe(pDupe); --- 660,669 ---- this->m_ccbDupeitem.GetLBText(iIndex, csDupeItem); this->m_pItem->m_csDupeItem = csDupeItem; CString csDupe; csDupe.Format(_T("%s"), csDupeItem); ! int iIndex = Main->m_pScripts->m_aItems.Find(csDupe); if ( iIndex != -1 ) { ! CItem * pDupe = (CItem *) Main->m_pScripts->m_aItems.GetAt(iIndex); if (pDupe != NULL) this->m_pItem->Dupe(pDupe); *************** *** 689,693 **** { CWaitCursor hourglass; ! if ( !m_iEdits || Main->m_pScriptsOld->SaveItems() ) CDialog::OnOK(); } --- 677,681 ---- { CWaitCursor hourglass; ! if ( !m_iEdits || Main->m_pScripts->SaveItems() ) CDialog::OnOK(); } *************** *** 696,711 **** { CAddValueDialog dlg; ! CCategory * pCategory; if (dlg.DoModal() == IDOK) { if (m_ccbCategory.FindStringExact(0, dlg.m_csValue) != CB_ERR) { ! AxisMessageBox(locale->String(IDS_CATEXISTS), MB_OK | MB_ICONEXCLAMATION); return; } else ! pCategory = FindCategory(&Main->m_pScriptsOld->m_olNPCs, dlg.m_csValue); int iIndex = m_ccbCategory.AddString(dlg.m_csValue); ! m_ccbCategory.SetItemData(iIndex, (DWORD) pCategory); m_ccbCategory.SetCurSel(iIndex); this->OnSelchangeCategory(); --- 684,699 ---- { CAddValueDialog dlg; ! CCategoryTree * pCategory; if (dlg.DoModal() == IDOK) { if (... [truncated message content] |
From: Philip E. <pes...@us...> - 2003-07-09 19:57:29
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv25651/S_ScriptsBase Modified Files: S_ScriptsBase.vcproj Added Files: CategoryTree.cpp CategoryTree.h Log Message: no message --- NEW FILE: CategoryTree.cpp --- /* $Id: CategoryTree.cpp,v 1.1 2003/07/09 19:57:26 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #include "stdafx.h" #include "categorytree.h" CCategoryTree::CCategoryTree(void) { m_sName = _T("<none>"); m_pParent = NULL; } CCategoryTree::~CCategoryTree(void) { for ( int i = 0; i < m_aChildren.GetCount(); i++ ) { CCategoryTree * pChild = m_aChildren.GetAt(i); if ( pChild ) delete pChild; } } CCategoryTree::CCategoryTree(CString sName, CCategoryTree * pParent) { m_sName = sName; m_pParent = pParent; } void CCategoryTree::AddEntry(int index) { m_aEntries.Add(index); } void CCategoryTree::AddChild(CString sName) { CCategoryTree * pChild = new CCategoryTree(sName, this); m_aChildren.Add(pChild); } int CCategoryTree::GetEntry(int index) { if ( index > m_aEntries.GetUpperBound() ) return -1; else return m_aEntries.GetAt(index); } CCategoryTree * CCategoryTree::GetChild(int index) { if ( index > m_aChildren.GetUpperBound() ) return NULL; else return m_aChildren.GetAt(index); } CCategoryTree * CCategoryTree::FindNode(CString sName) { if ( sName.GetLength() == 0 ) return this; // Recursively find nodes in the tree, creating them if necessary. CString sBaseName = sName.SpanExcluding(_T("\\")); CString sChildName; if ( sName.GetLength() > sBaseName.GetLength() + 1 ) sChildName = sName.Mid(sBaseName.GetLength() + 1); else sChildName = _T(""); if ( sBaseName.GetLength() == 0 ) return this; for ( int i = 0; i < m_aChildren.GetCount(); i++ ) { CCategoryTree * pTree = m_aChildren.GetAt(i); if ( pTree->GetName() == sBaseName ) return pTree->FindNode(sChildName); } // We still haven't found it. CCategoryTree * pTree = new CCategoryTree(sBaseName, this); m_aChildren.Add(pTree); return pTree->FindNode(sChildName); } --- NEW FILE: CategoryTree.h --- /* $Id: CategoryTree.h,v 1.1 2003/07/09 19:57:26 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #pragma once #include <afxtempl.h> class CCategoryTree { public: CCategoryTree(void); ~CCategoryTree(void); CCategoryTree(CString sName, CCategoryTree * pParent = NULL); void AddEntry(int index); void AddChild(CString sName); void SetName(CString sName) { m_sName = sName; } int ChildCount() { return (int) m_aChildren.GetCount(); } int EntryCount() { return (int) m_aEntries.GetCount(); } int GetEntry(int index); CCategoryTree * GetChild(int index); CString GetName() { return m_sName; } CCategoryTree * FindNode(CString sName); CCategoryTree * GetParent() { return m_pParent; } protected: CString m_sName; CArray<CCategoryTree*,CCategoryTree*> m_aChildren; CArray<int,int> m_aEntries; CCategoryTree * m_pParent; }; Index: S_ScriptsBase.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.vcproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** S_ScriptsBase.vcproj 2 Jul 2003 04:13:07 -0000 1.11 --- S_ScriptsBase.vcproj 9 Jul 2003 19:57:26 -0000 1.12 *************** *** 121,124 **** --- 121,127 ---- </File> <File + RelativePath="CategoryTree.cpp"> + </File> + <File RelativePath="DisplayedScriptBase.cpp"> </File> *************** *** 198,201 **** --- 201,207 ---- <File RelativePath="Category.h"> + </File> + <File + RelativePath="CategoryTree.h"> </File> <File |
From: Philip E. <pes...@us...> - 2003-07-09 19:57:29
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52/res In directory sc8-pr-cvs1:/tmp/cvs-serv25651/S_Sphere52/res Added Files: icon1.ico Log Message: no message --- NEW FILE: icon1.ico --- |
From: Philip E. <pes...@us...> - 2003-07-03 18:10:20
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv19614 Added Files: venditemdlg.cpp venditemdlg.h weighteditemdlg.cpp weighteditemdlg.h WOPEditDlg.cpp WOPEditDlg.h Log Message: no message --- NEW FILE: venditemdlg.cpp --- /* $Id: venditemdlg.cpp,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // VendItemDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "VendItemDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CVendItemDlg dialog CVendItemDlg::CVendItemDlg(CWnd* pParent /*=NULL*/) : CDialog(CVendItemDlg::IDD, pParent) { //{{AFX_DATA_INIT(CVendItemDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_csName = _T(""); m_csMinimum = _T(""); m_csMaximum = _T(""); m_csFrequency = _T(""); } void CVendItemDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CVendItemDlg) DDX_Control(pDX, IDC_VENDITEM_NAME, m_ceVendItemName); DDX_Control(pDX, IDC_VENDITEM_MIN, m_ceVendItemMin); DDX_Control(pDX, IDC_VENDITEM_MAX, m_ceVendItemMax); DDX_Control(pDX, IDC_VENDITEM_FREQ, m_ceVendItemFrequency); DDX_Control(pDX, IDC_VENDITEM_CHANCE, m_cbRandomChance); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_EVIV_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_EVIV_STATIC2, m_sStatic2); DDX_Control(pDX, IDC_EVIV_STATIC3, m_sStatic3); DDX_Control(pDX, IDC_EVIV_STATIC4, m_sStatic4); DDX_Control(pDX, IDC_EVIV_STATIC5, m_sStatic5); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CVendItemDlg, CDialog) //{{AFX_MSG_MAP(CVendItemDlg) ON_BN_CLICKED(IDC_VENDITEM_CHANCE, OnVenditemChance) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CVendItemDlg message handlers void CVendItemDlg::OnVenditemChance() { int iState = m_cbRandomChance.GetCheck(); if (iState == 0) m_ceVendItemFrequency.EnableWindow(false); else m_ceVendItemFrequency.EnableWindow(true); } void CVendItemDlg::OnOK() { if (m_cbRandomChance.GetCheck() == 0) m_csFrequency = _T(""); else m_ceVendItemFrequency.GetWindowText(m_csFrequency); CString csMin, csMax; m_ceVendItemMin.GetWindowText(csMin); m_ceVendItemMax.GetWindowText(csMax); int iMin, iMax; iMin = _tstoi(csMin); iMax = _tstoi(csMax); if (iMin <= iMax) { m_csMinimum = csMin; m_csMaximum = csMax; } else { m_csMinimum = csMax; m_csMaximum = csMin; } CDialog::OnOK(); } BOOL CVendItemDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); m_csMinimum.TrimLeft(); m_csMinimum.TrimRight(); m_csMaximum.TrimLeft(); m_csMaximum.TrimRight(); m_ceVendItemName.SetWindowText(m_csName); m_ceVendItemMin.SetWindowText(m_csMinimum); m_ceVendItemMax.SetWindowText(m_csMaximum); if (m_csFrequency != _T("")) { m_cbRandomChance.SetCheck(1); m_ceVendItemFrequency.EnableWindow(true); m_ceVendItemFrequency.SetWindowText(m_csFrequency); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CVendItemDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VENDITEM_NAME, (CWnd*)&m_ceVendItemName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VENDITEM_MIN, (CWnd*)&m_ceVendItemMin, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VENDITEM_MAX, (CWnd*)&m_ceVendItemMax, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VENDITEM_FREQ, (CWnd*)&m_ceVendItemFrequency, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VENDITEM_CHANCE, (CWnd*)&m_cbRandomChance, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EVIV_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EVIV_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EVIV_STATIC3, (CWnd*)&m_sStatic3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EVIV_STATIC4, (CWnd*)&m_sStatic4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EVIV_STATIC5, (CWnd*)&m_sStatic5, (CWnd*)this); } --- NEW FILE: venditemdlg.h --- /* $Id: venditemdlg.h,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_VENDITEMDLG_H__D641A8B1_E95A_11D2_A61F_004F4905E937__INCLUDED_) #define AFX_VENDITEMDLG_H__D641A8B1_E95A_11D2_A61F_004F4905E937__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // VendItemDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CVendItemDlg dialog class CVendItemDlg : public CDialog { // Construction public: CString m_csName; CString m_csFrequency; CString m_csMaximum; CString m_csMinimum; CVendItemDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CVendItemDlg) enum { IDD = IDD_VENDITEM_DLG }; CEdit m_ceVendItemName; CEdit m_ceVendItemMin; CEdit m_ceVendItemMax; CEdit m_ceVendItemFrequency; CButton m_cbRandomChance; CButton m_bOK; CButton m_bCancel; CStatic m_sStatic1; CStatic m_sStatic2; CStatic m_sStatic3; CStatic m_sStatic4; CStatic m_sStatic5; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CVendItemDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CVendItemDlg) afx_msg void OnVenditemChance(); virtual void OnOK(); virtual BOOL OnInitDialog(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_VENDITEMDLG_H__D641A8B1_E95A_11D2_A61F_004F4905E937__INCLUDED_) --- NEW FILE: weighteditemdlg.cpp --- /* $Id: weighteditemdlg.cpp,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // WeightedItemDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "WeightedItemDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CWeightedItemDlg dialog CWeightedItemDlg::CWeightedItemDlg(CWnd* pParent /*=NULL*/) : CDialog(CWeightedItemDlg::IDD, pParent) { //{{AFX_DATA_INIT(CWeightedItemDlg) //}}AFX_DATA_INIT } void CWeightedItemDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CWeightedItemDlg) DDX_Control(pDX, IDC_WEIGHTEDLIST, m_clcList); DDX_Control(pDX, IDC_WEIGHTEDITEMS, m_ccbItems); DDX_Control(pDX, IDC_ITEMWEIGHT, m_ceWeight); DDX_Control(pDX, IDC_ADDWEIGHTEDITEM, m_cbAdd); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_WI_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_WI_STATIC2, m_sStatic2); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CWeightedItemDlg, CDialog) //{{AFX_MSG_MAP(CWeightedItemDlg) ON_BN_CLICKED(IDC_ADDWEIGHTEDITEM, OnAddweighteditem) ON_NOTIFY(LVN_KEYDOWN, IDC_WEIGHTEDLIST, OnKeydownWeightedlist) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CWeightedItemDlg message handlers BOOL CWeightedItemDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); FillItems(); m_ccbItems.AddString(_T(" NONE ")); m_clcList.InsertColumn(0, locale->String(IDS_GENERIC_ITEM), LVCFMT_LEFT, 200); m_clcList.InsertColumn(1, locale->String(IDS_GENERIC_WEIGHT), LVCFMT_LEFT, 50); // TODO: Add extra initialization here return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CWeightedItemDlg::OnOK() { m_csWeightString = _T("{"); for (int i = 0; i < m_clcList.GetItemCount(); i++) { CString csTmp = m_csWeightString; CString csItem = m_clcList.GetItemText(i, 0); if (csItem == _T(" NONE ")) csItem = _T("0 0"); CString csWeight = m_clcList.GetItemText(i, 1); m_csWeightString.Format(_T("%s %s %s"), csTmp, csItem, csWeight); } m_csWeightString += _T(" }"); CDialog::OnOK(); } void CWeightedItemDlg::OnAddweighteditem() { CString csItem; m_ccbItems.GetWindowText(csItem); if (csItem == _T("")) { AxisMessageBox(locale->String(IDS_ITEMGEN_NOSELECTION), MB_OK | MB_ICONEXCLAMATION); return; } CString csWeight; m_ceWeight.GetWindowText(csWeight); if (_tstoi(csWeight) == 0) { AxisMessageBox(locale->String(IDS_WIE_NOWEIGHT), MB_OK | MB_ICONEXCLAMATION); return; } int iIndex = m_clcList.InsertItem(m_clcList.GetItemCount(), csItem); m_clcList.SetItemText(iIndex, 1, csWeight); } void CWeightedItemDlg::FillItems() { CStdioFile csfGrayDefs; BOOL bStatus; CString csScpPath = GetScriptPath(); CString csFile; if ( csScpPath == _T("") ) csFile = DEFS_FILE; else csFile.Format(_T("%s%s"), csScpPath, DEFS_FILE); bStatus = csfGrayDefs.Open(csFile, CFile::modeRead | CFile::shareDenyNone); if (bStatus == 0) { CString csMessage; csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), csFile); AxisMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return; } CString csInput; bool bFoundSection = false; int iIndex = 0; while (bStatus) { bStatus = csfGrayDefs.ReadString(csInput); csInput.MakeLower(); if (bStatus) { if (csInput.Find(_T("[")) != -1) { // We have reached a new section if (csInput.Find(_T("[items_")) == -1) bFoundSection = FALSE; else bFoundSection = TRUE; } else { if (bFoundSection) { // Check for blank line or comment csInput = csInput.SpanExcluding(_T("//")); csInput.TrimLeft(); csInput.TrimRight(); CString csValue = csInput.Right(8); csValue.TrimLeft(); csInput = csInput.SpanExcluding(_T(" ")); if (csInput != _T("")) { m_ccbItems.AddString(csInput); } } } } } csfGrayDefs.Close(); } void CWeightedItemDlg::OnKeydownWeightedlist(NMHDR* pNMHDR, LRESULT* pResult) { LV_KEYDOWN* pLVKeyDown = (LV_KEYDOWN*)pNMHDR; if (pLVKeyDown->wVKey == VK_DELETE) { // Delete the selected items from the list control while (this->m_clcList.GetSelectedCount() > 0) { int iSel = this->m_clcList.GetNextItem(-1, LVNI_SELECTED); if (iSel != -1) this->m_clcList.DeleteItem(iSel); } } *pResult = 0; } void CWeightedItemDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WEIGHTEDLIST, (CWnd*)&m_clcList, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WEIGHTEDITEMS, (CWnd*)&m_ccbItems, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ITEMWEIGHT, (CWnd*)&m_ceWeight, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ADDWEIGHTEDITEM, (CWnd*)&m_cbAdd, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WI_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WI_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); } --- NEW FILE: weighteditemdlg.h --- /* $Id: weighteditemdlg.h,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_WEIGHTEDITEMDLG_H__D641A8B6_E95A_11D2_A61F_004F4905E937__INCLUDED_) #define AFX_WEIGHTEDITEMDLG_H__D641A8B6_E95A_11D2_A61F_004F4905E937__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // WeightedItemDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CWeightedItemDlg dialog class CWeightedItemDlg : public CDialog { // Construction public: CString m_csWeightString; CWeightedItemDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CWeightedItemDlg) enum { IDD = IDD_WEIGHTED_ITEM_DLG }; CListCtrl m_clcList; CComboBox m_ccbItems; CEdit m_ceWeight; CButton m_cbAdd; CButton m_bOK; CButton m_bCancel; CStatic m_sStatic1; CStatic m_sStatic2; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWeightedItemDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CWeightedItemDlg) virtual BOOL OnInitDialog(); virtual void OnOK(); afx_msg void OnAddweighteditem(); afx_msg void OnKeydownWeightedlist(NMHDR* pNMHDR, LRESULT* pResult); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: void FillItems(); public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_WEIGHTEDITEMDLG_H__D641A8B6_E95A_11D2_A61F_004F4905E937__INCLUDED_) --- NEW FILE: WOPEditDlg.cpp --- /* $Id: WOPEditDlg.cpp,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // WOPEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "WOPEditDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CWOPEditDlg dialog CWOPEditDlg::CWOPEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CWOPEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CWOPEditDlg) m_cs1 = _T(""); m_cs10 = _T(""); m_cs11 = _T(""); m_cs12 = _T(""); m_cs13 = _T(""); m_cs14 = _T(""); m_cs15 = _T(""); m_cs16 = _T(""); m_cs17 = _T(""); m_cs18 = _T(""); m_cs19 = _T(""); m_cs2 = _T(""); m_cs20 = _T(""); m_cs21 = _T(""); m_cs22 = _T(""); m_cs23 = _T(""); m_cs24 = _T(""); m_cs25 = _T(""); m_cs26 = _T(""); m_cs3 = _T(""); m_cs4 = _T(""); m_cs5 = _T(""); m_cs6 = _T(""); m_cs7 = _T(""); m_cs8 = _T(""); m_cs9 = _T(""); //}}AFX_DATA_INIT } void CWOPEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CWOPEditDlg) DDX_Text(pDX, IDC_WOP1, m_cs1); DDX_Text(pDX, IDC_WOP10, m_cs10); DDX_Text(pDX, IDC_WOP11, m_cs11); DDX_Text(pDX, IDC_WOP12, m_cs12); DDX_Text(pDX, IDC_WOP13, m_cs13); DDX_Text(pDX, IDC_WOP14, m_cs14); DDX_Text(pDX, IDC_WOP15, m_cs15); DDX_Text(pDX, IDC_WOP16, m_cs16); DDX_Text(pDX, IDC_WOP17, m_cs17); DDX_Text(pDX, IDC_WOP18, m_cs18); DDX_Text(pDX, IDC_WOP19, m_cs19); DDX_Text(pDX, IDC_WOP2, m_cs2); DDX_Text(pDX, IDC_WOP20, m_cs20); DDX_Text(pDX, IDC_WOP21, m_cs21); DDX_Text(pDX, IDC_WOP22, m_cs22); DDX_Text(pDX, IDC_WOP23, m_cs23); DDX_Text(pDX, IDC_WOP24, m_cs24); DDX_Text(pDX, IDC_WOP25, m_cs25); DDX_Text(pDX, IDC_WOP26, m_cs26); DDX_Text(pDX, IDC_WOP3, m_cs3); DDX_Text(pDX, IDC_WOP4, m_cs4); DDX_Text(pDX, IDC_WOP5, m_cs5); DDX_Text(pDX, IDC_WOP6, m_cs6); DDX_Text(pDX, IDC_WOP7, m_cs7); DDX_Text(pDX, IDC_WOP8, m_cs8); DDX_Text(pDX, IDC_WOP9, m_cs9); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_WOP1, m_e1); DDX_Control(pDX, IDC_WOP2, m_e2); DDX_Control(pDX, IDC_WOP3, m_e3); DDX_Control(pDX, IDC_WOP4, m_e4); DDX_Control(pDX, IDC_WOP5, m_e5); DDX_Control(pDX, IDC_WOP6, m_e6); DDX_Control(pDX, IDC_WOP7, m_e7); DDX_Control(pDX, IDC_WOP8, m_e8); DDX_Control(pDX, IDC_WOP9, m_e9); DDX_Control(pDX, IDC_WOP10, m_e10); DDX_Control(pDX, IDC_WOP11, m_e11); DDX_Control(pDX, IDC_WOP12, m_e12); DDX_Control(pDX, IDC_WOP13, m_e13); DDX_Control(pDX, IDC_WOP14, m_e14); DDX_Control(pDX, IDC_WOP15, m_e15); DDX_Control(pDX, IDC_WOP16, m_e16); DDX_Control(pDX, IDC_WOP17, m_e17); DDX_Control(pDX, IDC_WOP18, m_e18); DDX_Control(pDX, IDC_WOP19, m_e19); DDX_Control(pDX, IDC_WOP20, m_e20); DDX_Control(pDX, IDC_WOP21, m_e21); DDX_Control(pDX, IDC_WOP22, m_e22); DDX_Control(pDX, IDC_WOP23, m_e23); DDX_Control(pDX, IDC_WOP24, m_e24); DDX_Control(pDX, IDC_WOP25, m_e25); DDX_Control(pDX, IDC_WOP26, m_e26); DDX_Control(pDX, IDC_WOP_STATICA, m_s1); DDX_Control(pDX, IDC_WOP_STATICB, m_s2); DDX_Control(pDX, IDC_WOP_STATICC, m_s3); DDX_Control(pDX, IDC_WOP_STATICD, m_s4); DDX_Control(pDX, IDC_WOP_STATICE, m_s5); DDX_Control(pDX, IDC_WOP_STATICF, m_s6); DDX_Control(pDX, IDC_WOP_STATICG, m_s7); DDX_Control(pDX, IDC_WOP_STATICH, m_s8); DDX_Control(pDX, IDC_WOP_STATICI, m_s9); DDX_Control(pDX, IDC_WOP_STATICJ, m_s10); DDX_Control(pDX, IDC_WOP_STATICK, m_s11); DDX_Control(pDX, IDC_WOP_STATICL, m_s12); DDX_Control(pDX, IDC_WOP_STATICM, m_s13); DDX_Control(pDX, IDC_WOP_STATICN, m_s14); DDX_Control(pDX, IDC_WOP_STATICO, m_s15); DDX_Control(pDX, IDC_WOP_STATICP, m_s16); DDX_Control(pDX, IDC_WOP_STATICQ, m_s17); DDX_Control(pDX, IDC_WOP_STATICR, m_s18); DDX_Control(pDX, IDC_WOP_STATICS, m_s19); DDX_Control(pDX, IDC_WOP_STATICT, m_s20); DDX_Control(pDX, IDC_WOP_STATICU, m_s21); DDX_Control(pDX, IDC_WOP_STATICV, m_s22); DDX_Control(pDX, IDC_WOP_STATICW, m_s23); DDX_Control(pDX, IDC_WOP_STATICX, m_s24); DDX_Control(pDX, IDC_WOP_STATICY, m_s25); DDX_Control(pDX, IDC_WOP_STATICZ, m_s26); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CWOPEditDlg, CDialog) //{{AFX_MSG_MAP(CWOPEditDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CWOPEditDlg message handlers BOOL CWOPEditDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); Main->m_pScriptsOld->LoadTables(); for ( int i = 0; i < Main->m_pScriptsOld->m_tables.m_runes.GetSize(); i++ ) { CString csRune = Main->m_pScriptsOld->m_tables.m_runes.GetAt(i); switch(i + 1) { case 1: m_cs1 = csRune; break; case 2: m_cs2 = csRune; break; case 3: m_cs3 = csRune; break; case 4: m_cs4 = csRune; break; case 5: m_cs5 = csRune; break; case 6: m_cs6 = csRune; break; case 7: m_cs7 = csRune; break; case 8: m_cs8 = csRune; break; case 9: m_cs9 = csRune; break; case 10: m_cs10 = csRune; break; case 11: m_cs11 = csRune; break; case 12: m_cs12 = csRune; break; case 13: m_cs13 = csRune; break; case 14: m_cs14 = csRune; break; case 15: m_cs15 = csRune; break; case 16: m_cs16 = csRune; break; case 17: m_cs17 = csRune; break; case 18: m_cs18 = csRune; break; case 19: m_cs19 = csRune; break; case 20: m_cs20 = csRune; break; case 21: m_cs21 = csRune; break; case 22: m_cs22 = csRune; break; case 23: m_cs23 = csRune; break; case 24: m_cs24 = csRune; break; case 25: m_cs25 = csRune; break; case 26: m_cs26 = csRune; break; default: break; } } UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CWOPEditDlg::OnOK() { CWaitCursor hourglass; Main->m_pScriptsOld->m_tables.m_runes.RemoveAll(); for (int i = 1; i < 27; i++) { CString csRune = _T(""); switch(i) { case 1: csRune = m_cs1; break; case 2: csRune = m_cs2; break; case 3: csRune = m_cs3; break; case 4: csRune = m_cs4; break; case 5: csRune = m_cs5; break; case 6: csRune = m_cs6; break; case 7: csRune = m_cs7; break; case 8: csRune = m_cs8; break; case 9: csRune = m_cs9; break; case 10: csRune = m_cs10; break; case 11: csRune = m_cs11; break; case 12: csRune = m_cs12; break; case 13: csRune = m_cs13; break; case 14: csRune = m_cs14; break; case 15: csRune = m_cs15; break; case 16: csRune = m_cs16; break; case 17: csRune = m_cs17; break; case 18: csRune = m_cs18; break; case 19: csRune = m_cs19; break; case 20: csRune = m_cs20; break; case 21: csRune = m_cs21; break; case 22: csRune = m_cs22; break; case 23: csRune = m_cs23; break; case 24: csRune = m_cs24; break; case 25: csRune = m_cs25; break; case 26: csRune = m_cs26; break; } Main->m_pScriptsOld->m_tables.m_runes.InsertAt(i - 1, csRune); } if ( Main->m_pScriptsOld->m_tables.Write() ) CDialog::OnOK(); } void CWOPEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP1, (CWnd*)&m_e1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP2, (CWnd*)&m_e2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP3, (CWnd*)&m_e3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP4, (CWnd*)&m_e4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP5, (CWnd*)&m_e5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP6, (CWnd*)&m_e6, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP7, (CWnd*)&m_e7, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP8, (CWnd*)&m_e8, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP9, (CWnd*)&m_e9, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP10, (CWnd*)&m_e10, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP11, (CWnd*)&m_e11, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP12, (CWnd*)&m_e12, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP13, (CWnd*)&m_e13, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP14, (CWnd*)&m_e14, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP15, (CWnd*)&m_e15, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP16, (CWnd*)&m_e16, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP17, (CWnd*)&m_e17, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP18, (CWnd*)&m_e18, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP19, (CWnd*)&m_e19, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP20, (CWnd*)&m_e20, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP21, (CWnd*)&m_e21, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP22, (CWnd*)&m_e22, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP23, (CWnd*)&m_e23, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP24, (CWnd*)&m_e24, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP25, (CWnd*)&m_e25, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP26, (CWnd*)&m_e26, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICA, (CWnd*)&m_s1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICB, (CWnd*)&m_s2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICC, (CWnd*)&m_s3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICD, (CWnd*)&m_s4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICE, (CWnd*)&m_s5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICF, (CWnd*)&m_s6, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICG, (CWnd*)&m_s7, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICH, (CWnd*)&m_s8, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICI, (CWnd*)&m_s9, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICJ, (CWnd*)&m_s10, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICK, (CWnd*)&m_s11, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICL, (CWnd*)&m_s12, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICM, (CWnd*)&m_s13, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICN, (CWnd*)&m_s14, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICO, (CWnd*)&m_s15, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICP, (CWnd*)&m_s16, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICQ, (CWnd*)&m_s17, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICR, (CWnd*)&m_s18, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICS, (CWnd*)&m_s19, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICT, (CWnd*)&m_s20, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICU, (CWnd*)&m_s21, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICV, (CWnd*)&m_s22, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICW, (CWnd*)&m_s23, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICX, (CWnd*)&m_s24, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICY, (CWnd*)&m_s25, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_WOP_STATICZ, (CWnd*)&m_s26, (CWnd*)this); } --- NEW FILE: WOPEditDlg.h --- /* $Id: WOPEditDlg.h,v 1.1 2003/07/03 18:10:17 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_WOPEDITDLG_H__5D6AFB64_2981_11D3_8723_00805FD91B8C__INCLUDED_) #define AFX_WOPEDITDLG_H__5D6AFB64_2981_11D3_8723_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // WOPEditDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CWOPEditDlg dialog class CWOPEditDlg : public CDialog { // Construction public: CWOPEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CWOPEditDlg) enum { IDD = IDD_WOPEDITDLG }; CString m_cs1; CString m_cs10; CString m_cs11; CString m_cs12; CString m_cs13; CString m_cs14; CString m_cs15; CString m_cs16; CString m_cs17; CString m_cs18; CString m_cs19; CString m_cs2; CString m_cs20; CString m_cs21; CString m_cs22; CString m_cs23; CString m_cs24; CString m_cs25; CString m_cs26; CString m_cs3; CString m_cs4; CString m_cs5; CString m_cs6; CString m_cs7; CString m_cs8; CString m_cs9; CButton m_bOK; CButton m_bCancel; CEdit m_e1; CEdit m_e2; CEdit m_e3; CEdit m_e4; CEdit m_e5; CEdit m_e6; CEdit m_e7; CEdit m_e8; CEdit m_e9; CEdit m_e10; CEdit m_e11; CEdit m_e12; CEdit m_e13; CEdit m_e14; CEdit m_e15; CEdit m_e16; CEdit m_e17; CEdit m_e18; CEdit m_e19; CEdit m_e20; CEdit m_e21; CEdit m_e22; CEdit m_e23; CEdit m_e24; CEdit m_e25; CEdit m_e26; CStatic m_s1; CStatic m_s2; CStatic m_s3; CStatic m_s4; CStatic m_s5; CStatic m_s6; CStatic m_s7; CStatic m_s8; CStatic m_s9; CStatic m_s10; CStatic m_s11; CStatic m_s12; CStatic m_s13; CStatic m_s14; CStatic m_s15; CStatic m_s16; CStatic m_s17; CStatic m_s18; CStatic m_s19; CStatic m_s20; CStatic m_s21; CStatic m_s22; CStatic m_s23; CStatic m_s24; CStatic m_s25; CStatic m_s26; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWOPEditDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CWOPEditDlg) virtual BOOL OnInitDialog(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_WOPEDITDLG_H__5D6AFB64_2981_11D3_8723_00805FD91B8C__INCLUDED_) |
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv19409 Modified Files: Resource.h S_Sphere52.rc S_Sphere52.vcproj Added Files: AccountDlg.cpp AccountDlg.h DefEditDlg.cpp DefEditDlg.h itemeditdlg.cpp itemeditdlg.h lootitemeditdlg.cpp lootitemeditdlg.h NameEditDlg.cpp NameEditDlg.h NotoTitleEditDlg.cpp NotoTitleEditDlg.h npceditdlg.cpp npceditdlg.h OreEditDlg.cpp OreEditDlg.h PotionEdit.cpp PotionEdit.h serverconfigdlg.cpp serverconfigdlg.h skilleditdlg.cpp skilleditdlg.h SkillMenuEditDlg.cpp SkillMenuEditDlg.h SkillTableEditDlg.cpp SkillTableEditDlg.h SpellEditDlg.cpp SpellEditDlg.h StatRateEditDlg.cpp StatRateEditDlg.h TemplateEditDlg.cpp TemplateEditDlg.h Log Message: no message --- NEW FILE: AccountDlg.cpp --- /* $Id: AccountDlg.cpp,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // AccountDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "AccountDlg.h" #include "AddValueDialog.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAccountDlg dialog const TCHAR * PrivFlags[] = { _T("Admin Privs"), // 0x0001 _T("GM Privs"), // 0x0002 _T("Counselor Privs"), // 0x0004 _T("Hear GM Pages"), // 0x0008 _T("Hear All"), // 0x0010 _T("Move All"), // 0x0020 _T("Combat Detail Messages"), // 0x0040 _T("Debug Mode"), // 0x0080 _T("EMail is valid"), // 0x0100 _T("Privshow set"), // 0x0200 _T("Allow GM toggle"), // 0x0400 _T("Jailed"), // 0x0800 _T("T2A"), // 0x1000 _T("Blocked"), // 0x2000 _T("AllShow enabled"), // 0x4000 }; const TCHAR * acctStrings [] = { _T("guest"), _T("player"), _T("counselor"), _T("seer"), _T("gm"), _T("developer"), _T("admin"), _T("owner"), }; CAccountDlg::CAccountDlg(CWnd* pParent /*=NULL*/) : CDialog(CAccountDlg::IDD, pParent) { //{{AFX_DATA_INIT(CAccountDlg) //}}AFX_DATA_INIT } CAccountDlg::~CAccountDlg() { } void CAccountDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAccountDlg) DDX_Control(pDX, IDOK, m_cbOK); DDX_Control(pDX, IDCANCEL, m_cbCancel); DDX_Control(pDX, IDC_STATIC_LABEL9, m_csLabel9); DDX_Control(pDX, IDC_STATIC_LABEL8, m_csLabel8); DDX_Control(pDX, IDC_STATIC_LABEL7, m_csLabel7); DDX_Control(pDX, IDC_STATIC_LABEL6, m_csLabel6); DDX_Control(pDX, IDC_STATIC_LABEL5, m_csLabel5); DDX_Control(pDX, IDC_STATIC_LABEL4, m_csLabel4); DDX_Control(pDX, IDC_STATIC_LABEL3, m_csLabel3); DDX_Control(pDX, IDC_STATIC_LABEL2, m_csLabel2); DDX_Control(pDX, IDC_STATIC_LABEL15, m_csLabel15); DDX_Control(pDX, IDC_STATIC_LABEL14, m_csLabel14); DDX_Control(pDX, IDC_STATIC_LABEL13, m_csLabel13); DDX_Control(pDX, IDC_STATIC_LABEL12, m_csLabel12); DDX_Control(pDX, IDC_STATIC_LABEL11, m_csLabel11); DDX_Control(pDX, IDC_STATIC_LABEL10, m_csLabel10); DDX_Control(pDX, IDC_STATIC_LABEL1, m_csLabel1); DDX_Control(pDX, IDC_QUEUELABEL, m_csQueue); DDX_Control(pDX, IDC_PARAMBOX, m_cbParam); DDX_Control(pDX, IDC_NEWACCT, m_cbNew); DDX_Control(pDX, IDC_DELETEACCT, m_cbDelete); DDX_Control(pDX, IDC_ACCTFIRSTIP, m_csFirstIP); DDX_Control(pDX, IDC_CHATCOMMENT, m_ceComment); DDX_Control(pDX, IDC_ACCTUPDATES, m_clbUpdates); DDX_Control(pDX, IDC_ACCTTIME, m_csTime); DDX_Control(pDX, IDC_ACCTPWD, m_cePassword); DDX_Control(pDX, IDC_ACCTPRIV, m_clbPriv); DDX_Control(pDX, IDC_ACCTLEVEL, m_ccbLevel); DDX_Control(pDX, IDC_ACCTLASTUID, m_csUID); DDX_Control(pDX, IDC_ACCTLASTTIME, m_csLastTime); DDX_Control(pDX, IDC_ACCTLASTIP, m_csLastIP); DDX_Control(pDX, IDC_ACCTLASTDATE, m_csLastDate); DDX_Control(pDX, IDC_ACCTLANG, m_ceLang); DDX_Control(pDX, IDC_ACCTFIRSTDATE, m_csFirstDate); DDX_Control(pDX, IDC_ACCTFAILURES, m_csFailures); DDX_Control(pDX, IDC_ACCTEMAIL, m_ceEmail); DDX_Control(pDX, IDC_ACCTCHAT, m_ceChat); DDX_Control(pDX, IDC_ACCT_LIST, m_clbAcctList); DDX_Control(pDX, IDC_AMD_STATIC1, m_csAcctLabel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAccountDlg, CDialog) //{{AFX_MSG_MAP(CAccountDlg) ON_BN_CLICKED(IDC_NEWACCT, OnNewacct) ON_BN_CLICKED(IDC_DELETEACCT, OnDeleteacct) ON_BN_CLICKED(IDOK, OnOk) ON_LBN_SELCHANGE(IDC_ACCT_LIST, OnSelchangeAcctList) ON_EN_CHANGE(IDC_ACCTCHAT, OnChangeAcctchat) ON_EN_CHANGE(IDC_ACCTEMAIL, OnChangeAcctemail) ON_EN_CHANGE(IDC_ACCTLANG, OnChangeAcctlang) ON_CBN_SELCHANGE(IDC_ACCTLEVEL, OnSelchangeAcctlevel) ON_LBN_SELCHANGE(IDC_ACCTPRIV, OnSelchangeAcctpriv) ON_EN_CHANGE(IDC_ACCTPWD, OnChangeAcctpwd) ON_EN_CHANGE(IDC_CHATCOMMENT, OnChangeChatcomment) ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAccountDlg message handlers BOOL CAccountDlg::OnInitDialog() { CDialog::OnInitDialog(); CWaitCursor hourglass; Localize(); Load(); this->m_ccbLevel.AddString(_T("Guest")); this->m_ccbLevel.AddString(_T("Player")); this->m_ccbLevel.AddString(_T("Counselor")); this->m_ccbLevel.AddString(_T("Seer")); this->m_ccbLevel.AddString(_T("GM")); this->m_ccbLevel.AddString(_T("Developer")); this->m_ccbLevel.AddString(_T("Admin")); this->m_ccbLevel.AddString(_T("Owner")); this->m_ccbLevel.SetItemData(0, 0); this->m_ccbLevel.SetItemData(1, 1); this->m_ccbLevel.SetItemData(2, 2); this->m_ccbLevel.SetItemData(3, 3); this->m_ccbLevel.SetItemData(4, 4); this->m_ccbLevel.SetItemData(5, 5); this->m_ccbLevel.SetItemData(6, 6); this->m_ccbLevel.SetItemData(7, 7); for ( int i = 0; i < 15; i++ ) { int iIndex = this->m_clbPriv.AddString(PrivFlags[i]); this->m_clbPriv.SetItemData( iIndex, 1 << i ); } this->m_csFailures.SetWindowText(_T("")); this->m_csFirstDate.SetWindowText(_T("")); this->m_csFirstIP.SetWindowText(_T("")); this->m_csLastDate.SetWindowText(_T("")); this->m_csLastIP.SetWindowText(_T("")); this->m_csLastTime.SetWindowText(_T("")); this->m_csTime.SetWindowText(_T("")); this->m_csUID.SetWindowText(_T("")); // Get the rects for the controls here GetWindowRect(m_crOriginal); m_cbCancel.GetWindowRect(m_crCancel); m_cbOK.GetWindowRect(m_crOK); m_csLabel1.GetWindowRect(m_crLabel1); m_csLabel2.GetWindowRect(m_crLabel2); m_csLabel3.GetWindowRect(m_crLabel3); m_csLabel4.GetWindowRect(m_crLabel4); m_csLabel5.GetWindowRect(m_crLabel5); m_csLabel6.GetWindowRect(m_crLabel6); m_csLabel7.GetWindowRect(m_crLabel7); m_csLabel8.GetWindowRect(m_crLabel8); m_csLabel9.GetWindowRect(m_crLabel9); m_csLabel10.GetWindowRect(m_crLabel10); m_csLabel11.GetWindowRect(m_crLabel11); m_csLabel12.GetWindowRect(m_crLabel12); m_csLabel13.GetWindowRect(m_crLabel13); m_csLabel14.GetWindowRect(m_crLabel14); m_csLabel15.GetWindowRect(m_crLabel15); m_csQueue.GetWindowRect(m_crQueue); m_cbParam.GetWindowRect(m_crParam); m_cbNew.GetWindowRect(m_crNew); m_cbDelete.GetWindowRect(m_crDelete); m_csFirstIP.GetWindowRect(m_crFirstIP); m_ceComment.GetWindowRect(m_crComment); m_clbUpdates.GetWindowRect(m_crUpdates); m_csTime.GetWindowRect(m_crTime); m_cePassword.GetWindowRect(m_crPassword); m_clbPriv.GetWindowRect(m_crPriv); m_ccbLevel.GetWindowRect(m_crLevel); m_csUID.GetWindowRect(m_crUID); m_csLastTime.GetWindowRect(m_crLastTime); m_csLastIP.GetWindowRect(m_crLastIP); m_csLastDate.GetWindowRect(m_crLastDate); m_ceLang.GetWindowRect(m_crLang); m_csFirstDate.GetWindowRect(m_crFirstDate); m_csFailures.GetWindowRect(m_crFailures); m_ceEmail.GetWindowRect(m_crEmail); m_ceChat.GetWindowRect(m_crChat); m_clbAcctList.GetWindowRect(m_crAcctList); ScreenToClient(m_crOK); ScreenToClient(m_crCancel); ScreenToClient(m_crQueue); ScreenToClient(m_crParam); ScreenToClient(m_crNew); ScreenToClient(m_crDelete); ScreenToClient(m_crFirstIP); ScreenToClient(m_crComment); ScreenToClient(m_crUpdates); ScreenToClient(m_crTime); ScreenToClient(m_crPassword); ScreenToClient(m_crPriv); ScreenToClient(m_crLevel); ScreenToClient(m_crUID); ScreenToClient(m_crLastTime); ScreenToClient(m_crLastIP); ScreenToClient(m_crLastDate); ScreenToClient(m_crLang); ScreenToClient(m_crFirstDate); ScreenToClient(m_crFailures); ScreenToClient(m_crEmail); ScreenToClient(m_crChat); ScreenToClient(m_crAcctList); ScreenToClient(m_crLabel1); ScreenToClient(m_crLabel2); ScreenToClient(m_crLabel3); ScreenToClient(m_crLabel4); ScreenToClient(m_crLabel5); ScreenToClient(m_crLabel6); ScreenToClient(m_crLabel7); ScreenToClient(m_crLabel8); ScreenToClient(m_crLabel9); ScreenToClient(m_crLabel10); ScreenToClient(m_crLabel11); ScreenToClient(m_crLabel12); ScreenToClient(m_crLabel13); ScreenToClient(m_crLabel14); ScreenToClient(m_crLabel15); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CAccountDlg::OnNewacct() { CAddValueDialog dlg; dlg.m_csTitle = _T("New Account Name"); if (dlg.DoModal() == IDOK) { CAccount * pAcct = new (CAccount); pAcct->m_csName = dlg.m_csValue; int iSel = -1; for ( int i = 0; i < m_clbAcctList.GetCount(); i++ ) { CString csTest; m_clbAcctList.GetText(i, csTest); if ( csTest.CompareNoCase(pAcct->m_csName) == 0 ) iSel = i; } //int iSel = this->m_clbAcctList.FindStringExact( -1, pAcct->m_csName ); if ( iSel != -1 ) { AxisMessageBox(locale->String(IDS_ACCTEDIT_ACCOUNTEXISTS), MB_OK | MB_ICONEXCLAMATION); delete pAcct; return; } iSel = this->m_clbAcctList.AddString( pAcct->m_csName ); this->m_clbAcctList.SetItemDataPtr( iSel, (void *) pAcct ); this->m_clbAcctList.SetCurSel( iSel ); iSel = this->m_clbUpdates.AddString( pAcct->m_csName ); this->m_clbUpdates.SetItemDataPtr( iSel, (void *) pAcct ); this->OnSelchangeAcctList(); } } void CAccountDlg::OnDeleteacct() { int iSel = this->m_clbAcctList.GetCurSel(); if ( iSel == -1 ) return; CAccount * pAcct = (CAccount *) this->m_clbAcctList.GetItemDataPtr(iSel); if ( pAcct == NULL ) return; CString csMsg; csMsg.Format(locale->String(IDS_ACCTEDIT_DELETEACCT), pAcct->m_csName); if ( AxisMessageBox( csMsg, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL ) return; if ( AxisMessageBox( locale->String(IDS_ACCTEDIT_DELETEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION) == IDCANCEL ) return; // Two warnings is enough if ( Main->m_pScriptsOld->m_bNewFormat ) { if ( Main->m_dwCommandVersion ) csMsg.Format(_T(".serv.accountmgr %s delete"), pAcct->m_csName); else csMsg.Format(_T(".serv.account %s delete"), pAcct->m_csName); } else csMsg.Format(_T(".account %s delete"), pAcct->m_csName); SendToUORaw(csMsg); this->m_clbAcctList.DeleteString( iSel ); delete pAcct; } void CAccountDlg::OnOk() { CStdioFile csfAcctFile; CString csPath; CStdioFile csfIniFile; CString csFile; if ( Main->GetProfileType() == PROFILE_REMOTE ) csFile.Format(_T("%s\\%s"), Main->GetProfileString(), _T("sphereacct.rmt")); else { if ( csfIniFile.Open(_T("sphere.ini"), CFile::modeRead | CFile::shareDenyNone) ) { CString csLine; BOOL bStatus = TRUE; while (bStatus) { bStatus = csfIniFile.ReadString(csLine); if ( ! bStatus ) break; csLine = csLine.SpanExcluding(_T("//")); if ( csPath == _T("") && csLine.Find(_T("WORLDSAVE")) != -1 ) csPath = csLine.Mid(csLine.Find(_T("WORLDSAVE")) + 10 ); if ( csLine.Find(_T("ACCTFILES")) != -1 ) csPath = csLine.Mid(csLine.Find(_T("ACCTFILES")) + 10 ); } csfIniFile.Close(); } if ( csPath == _T("") ) { AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTFINDFILE), MB_OK | MB_ICONEXCLAMATION); return; } if ( csPath.Right(1) == _T("\\") ) csFile.Format(_T("%ssphereacct.scp"), csPath); else csFile.Format(_T("%s\\sphereacct.scp"), csPath); } if ( csfAcctFile.Open(csFile, CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite | CFile::shareDenyNone) ) { csfAcctFile.SeekToEnd(); for ( int i = 0; i < this->m_clbUpdates.GetCount(); i++ ) { CAccount * pAcct = (CAccount *) this->m_clbUpdates.GetItemDataPtr(i); CString csLine; if ( pAcct != NULL ) { csLine.Format(_T("\n[%s]\n"), pAcct->m_csName); csfAcctFile.WriteString(csLine); csLine.Format(_T("PASSWORD=%s\n"), pAcct->m_csPassword); csfAcctFile.WriteString(csLine); csLine.Format(_T("PLEVEL=%ld\n"), pAcct->m_iPLevel); csfAcctFile.WriteString(csLine); csLine.Format(_T("PRIV=%05x\n"), pAcct->m_wPrivs); csfAcctFile.WriteString(csLine); if ( pAcct->m_csEMail != _T("") ) { csLine.Format(_T("EMAIL=%s\n"), pAcct->m_csEMail); csfAcctFile.WriteString(csLine); } if ( pAcct->m_csChat != _T("") ) { csLine.Format(_T("CHATNAME=%s\n"), pAcct->m_csChat); csfAcctFile.WriteString(csLine); } if ( pAcct->m_csComment != _T("") ) { csLine.Format(_T("COMMENT=%s\n"), pAcct->m_csComment); csfAcctFile.WriteString(csLine); } if ( pAcct->m_csLang != _T("") ) { csLine.Format(_T("LANG=%s\n"), pAcct->m_csLang); csfAcctFile.WriteString(csLine); } } } csfAcctFile.Close(); if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; if ( ! remote.SendCustomFile(_T("grayacct"), csFile ) ) { if ( AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTUPLOAD), MB_YESNO | MB_ICONQUESTION ) == IDNO ) return; else { Unload(); CDialog::OnOK(); return; } } } if ( this->m_clbUpdates.GetCount() > 0 ) AxisMessageBox(locale->String(IDS_ACCTEDIT_CHANGESQUEUED), MB_OK | MB_ICONINFORMATION); } Unload(); CDialog::OnOK(); } void CAccountDlg::OnCancel() { if ( this->m_clbUpdates.GetCount() != 0 ) { if ( AxisMessageBox(locale->String(IDS_ACCTEDIT_CLOSEWARN), MB_OKCANCEL | MB_ICONEXCLAMATION ) == IDCANCEL ) return; } Unload(); CDialog::OnCancel(); } void CAccountDlg::Unload() { for (int i = 0; i < this->m_clbAcctList.GetCount(); i++ ) { CAccount * pAcct = (CAccount*) this->m_clbAcctList.GetItemDataPtr(i); if ( pAcct ) delete pAcct; } m_clbAcctList.ResetContent(); // Remove the updates m_clbUpdates.ResetContent(); } void CAccountDlg::OnSelchangeAcctList() { this->m_bIsChanging = true; int iSel = this->m_clbAcctList.GetCurSel(); if ( iSel != -1 ) { CAccount * pAcct = (CAccount *) this->m_clbAcctList.GetItemDataPtr(iSel); if ( pAcct != NULL ) { this->m_ceChat.SetWindowText(pAcct->m_csChat); this->m_ceComment.SetWindowText(pAcct->m_csComment); this->m_ceEmail.SetWindowText(pAcct->m_csEMail); this->m_ceLang.SetWindowText(pAcct->m_csLang); this->m_cePassword.SetWindowText(pAcct->m_csPassword); this->m_csFailures.SetWindowText(pAcct->m_csFailures); this->m_csFirstDate.SetWindowText(pAcct->m_csFirstDate); this->m_csFirstIP.SetWindowText(pAcct->m_csFirstIP); this->m_csLastDate.SetWindowText(pAcct->m_csLastDate); this->m_csLastTime.SetWindowText(pAcct->m_csLastTime); this->m_csLastIP.SetWindowText(pAcct->m_csIP); this->m_csLastTime.SetWindowText(pAcct->m_csLastTime); this->m_csTime.SetWindowText(pAcct->m_csTime); this->m_csUID.SetWindowText(pAcct->m_csUID); this->m_ccbLevel.SetCurSel(pAcct->m_iPLevel); for ( int i = 0; i < this->m_clbPriv.GetCount(); i++) { WORD wPriv = (WORD) this->m_clbPriv.GetItemData(i); if ( pAcct->m_wPrivs & wPriv ) this->m_clbPriv.SetSel( i, TRUE ); else this->m_clbPriv.SetSel( i, FALSE ); } } else { this->m_ceChat.SetWindowText(_T("")); this->m_ceComment.SetWindowText(_T("")); this->m_ceEmail.SetWindowText(_T("")); this->m_ceLang.SetWindowText(_T("")); this->m_cePassword.SetWindowText(_T("")); this->m_csFailures.SetWindowText(_T("")); this->m_csFirstDate.SetWindowText(_T("")); this->m_csFirstIP.SetWindowText(_T("")); this->m_csLastDate.SetWindowText(_T("")); this->m_csLastTime.SetWindowText(_T("")); this->m_csLastIP.SetWindowText(_T("")); this->m_csLastTime.SetWindowText(_T("")); this->m_csTime.SetWindowText(_T("")); this->m_csUID.SetWindowText(_T("")); this->m_ccbLevel.SetCurSel(0); this->m_clbPriv.SelItemRange(FALSE, 0, this->m_clbPriv.GetCount() - 1); } } this->m_bIsChanging = false; } void CAccountDlg::OnChangeAcctchat() { TouchAccount(); } void CAccountDlg::OnChangeAcctemail() { TouchAccount(); } void CAccountDlg::OnChangeAcctlang() { TouchAccount(); } void CAccountDlg::OnSelchangeAcctlevel() { TouchAccount(); } void CAccountDlg::OnSelchangeAcctpriv() { TouchAccount(); } void CAccountDlg::OnChangeAcctpwd() { TouchAccount(); } void CAccountDlg::OnChangeChatcomment() { TouchAccount(); } void CAccountDlg::TouchAccount() { if ( this->m_bIsChanging ) return; int iSel = this->m_clbAcctList.GetCurSel(); if ( iSel == -1 ) return; CAccount * pAcct = (CAccount *) this->m_clbAcctList.GetItemDataPtr(iSel); if ( pAcct == NULL ) return; int iIndex = this->m_clbUpdates.FindString( -1, pAcct->m_csName ); if ( iIndex == -1 ) { iIndex = this->m_clbUpdates.AddString( pAcct->m_csName ); this->m_clbUpdates.SetItemDataPtr( iIndex, (void*) pAcct ); } this->m_ceChat.GetWindowText(pAcct->m_csChat); this->m_ceComment.GetWindowText(pAcct->m_csComment); this->m_ceEmail.GetWindowText(pAcct->m_csEMail); this->m_ceLang.GetWindowText(pAcct->m_csLang); this->m_cePassword.GetWindowText(pAcct->m_csPassword); // Get the PLEVEL. pAcct->m_iPLevel = (int) this->m_ccbLevel.GetItemData(this->m_ccbLevel.GetCurSel()); // Get the PRIV flags pAcct->m_wPrivs = 0; for ( int i = 0; i < this->m_clbPriv.GetCount(); i++) { if ( this->m_clbPriv.GetSel(i) > 0 ) { WORD wFlag = (WORD) this->m_clbPriv.GetItemData(i); pAcct->m_wPrivs |= wFlag; } } } void CAccountDlg::Load() { CStdioFile csfAcctFile; CString csPath; CStdioFile csfIniFile; CString csFile; if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; csFile.Format(_T("%s\\%s"), Main->GetProfileString(), RMT_ACCU_FILE); remote.GetCustomFile(_T("grayacct"), csFile); } else { if ( csfIniFile.Open(_T("sphere.ini"), CFile::modeRead | CFile::shareDenyNone) ) { CString csLine; BOOL bStatus = TRUE; while (bStatus) { bStatus = csfIniFile.ReadString(csLine); if ( ! bStatus ) break; csLine = csLine.SpanExcluding(_T("//")); if ( csPath == _T("") && csLine.Find(_T("WORLDSAVE")) != -1 ) csPath = csLine.Mid(csLine.Find(_T("WORLDSAVE")) + 10 ); if ( csLine.Find(_T("ACCTFILES")) != -1 ) csPath = csLine.Mid(csLine.Find(_T("ACCTFILES")) + 10 ); } csfIniFile.Close(); } if ( csPath == _T("") ) { AxisMessageBox(locale->String(IDS_ACCTEDIT_CANTOPEN), MB_OK | MB_ICONEXCLAMATION); return; } if ( csPath.Right(1) == "\\" ) csFile.Format(_T("%ssphereaccu.scp"), csPath); else csFile.Format(_T("%s\\sphereaccu.scp"), csPath); } if ( csfAcctFile.Open(csFile, CFile::modeRead | CFile::shareDenyNone) ) { CString csLine; BOOL bStatus = TRUE; CString csNextLine = _T(""); while (bStatus) { if ( csNextLine == _T("") ) bStatus = csfAcctFile.ReadString(csLine); if ( !bStatus ) break; csLine = csLine.SpanExcluding(_T("//")); if ( csLine.Left(1) == _T("[")) { CAccount * pAcct = new (CAccount); pAcct->m_csName = csLine.Mid(1); pAcct->m_csName = pAcct->m_csName.SpanExcluding(_T("]")); int iIndex = this->m_clbAcctList.AddString(pAcct->m_csName); this->m_clbAcctList.SetItemDataPtr( iIndex, (void*) pAcct ); while ( bStatus ) { bStatus = csfAcctFile.ReadString(csLine); if ( !bStatus ) break; csLine.SpanExcluding(_T("//")); if ( csLine.Left(1) == _T("[") ) { csNextLine = csLine; break; } CString csTag = csLine.SpanExcluding(_T("=")); CString csValue = csLine.Mid(csLine.Find(_T("=")) + 1 ); switch ( FindTable( csTag, &knownAcctTags[0], 22, sizeof(char *) ) ) { case 0: break; case 1: pAcct->m_wPrivs |= 0x2000; break; case 2: pAcct->m_csChat = csValue; break; case 3: pAcct->m_csComment = csValue; break; case 4: pAcct->m_csEMail = csValue; break; case 5: pAcct->m_csFailures = csValue; break; case 6: break; case 7: pAcct->m_csFirstDate = csValue; break; case 8: pAcct->m_csFirstIP = csValue; break; case 9: pAcct->m_iPLevel = 0; break; case 10: pAcct->m_wPrivs |= 0x0800; break; case 11: pAcct->m_csLang = csValue; break; case 12: pAcct->m_csUID = csValue; break; case 13: pAcct->m_csLastDate = csValue; break; case 14: pAcct->m_csLastTime = csValue; break; case 15: pAcct->m_csIP = csValue; break; case 16: case 18: { if ( isalpha(csValue[0]) ) { csValue.MakeLower(); pAcct->m_iPLevel = FindTable( csValue, &acctStrings[0], 8, sizeof(char*)); } else pAcct->m_iPLevel = _tstoi(csValue); break; } case 17: pAcct->m_csPassword = csValue; break; case 19: pAcct->m_wPrivs |= (WORD) ahextoi(csValue); break; case 20: pAcct->m_wPrivs |= 0x1000; break; case 21: pAcct->m_csTime = csValue; break; } } } } csfAcctFile.Close(); } else { AxisMessageBox(_T("Unable to open the account file."), MB_OK | MB_ICONEXCLAMATION); return; } } void CAccountDlg::OnSize(UINT nType, int cx, int cy) { // Make sure we aren't trying to be narrower or shorter than the original if ( cx < m_crOriginal.Width() ) cx = m_crOriginal.Width(); if ( cy < m_crOriginal.Height() ) cy = m_crOriginal.Height(); int dx, dy; dx = 0; dy = 0; CRect crNew; GetWindowRect(crNew); ScreenToClient(crNew); dx = crNew.Width() - m_crOriginal.Width(); dy = crNew.Height() - m_crOriginal.Height(); int dy1 = dy / 2; int dy2 = dy - dy1; if ( m_clbAcctList.GetSafeHwnd() != NULL ) { // Resize the accounts and queue windows m_clbAcctList.MoveWindow(m_crAcctList.left, m_crAcctList.top, m_crAcctList.Width() + dx, m_crAcctList.Height() + dy1); m_clbUpdates.MoveWindow(m_crUpdates.left, m_crUpdates.top + dy1, m_crUpdates.Width() + dx, m_crUpdates.Height() + dy2); // Move the rest of the windows // Left side stuff RepositionWindow(&m_cbNew, m_crNew, 0, dy1); RepositionWindow(&m_cbDelete, m_crDelete, 0, dy1); RepositionWindow(&m_csQueue, m_crQueue, 0, dy1); // Right side stuff RepositionWindow(&m_cbCancel, m_crCancel, dx, 0); RepositionWindow(&m_cbOK, m_crOK, dx, 0); RepositionWindow(&m_csLabel1, m_crLabel1, dx, 0); RepositionWindow(&m_csLabel2, m_crLabel2, dx, 0); RepositionWindow(&m_csLabel3, m_crLabel3, dx, 0); RepositionWindow(&m_csLabel4, m_crLabel4, dx, 0); RepositionWindow(&m_csLabel5, m_crLabel5, dx, 0); RepositionWindow(&m_csLabel6, m_crLabel6, dx, 0); RepositionWindow(&m_csLabel7, m_crLabel7, dx, 0); RepositionWindow(&m_csLabel8, m_crLabel8, dx, 0); RepositionWindow(&m_csLabel9, m_crLabel9, dx, 0); RepositionWindow(&m_csLabel10, m_crLabel10, dx, 0); RepositionWindow(&m_csLabel11, m_crLabel11, dx, 0); RepositionWindow(&m_csLabel12, m_crLabel12, dx, 0); RepositionWindow(&m_csLabel13, m_crLabel13, dx, 0); RepositionWindow(&m_csLabel14, m_crLabel14, dx, 0); RepositionWindow(&m_csLabel15, m_crLabel15, dx, 0); RepositionWindow(&m_cbParam, m_crParam , dx, 0); RepositionWindow(&m_csFirstIP, m_crFirstIP, dx, 0); RepositionWindow(&m_ceComment, m_crComment, dx, 0); RepositionWindow(&m_csTime, m_crTime, dx, 0); RepositionWindow(&m_cePassword, m_crPassword, dx, 0); RepositionWindow(&m_clbPriv, m_crPriv, dx, 0); RepositionWindow(&m_ccbLevel, m_crLevel, dx, 0); RepositionWindow(&m_csUID, m_crUID, dx, 0); RepositionWindow(&m_csLastTime, m_crLastTime, dx, 0); RepositionWindow(&m_csLastIP, m_crLastIP, dx, 0); RepositionWindow(&m_csLastDate, m_crLastDate, dx, 0); RepositionWindow(&m_ceLang, m_crLang, dx, 0); RepositionWindow(&m_csFirstDate, m_crFirstDate, dx, 0); RepositionWindow(&m_csFailures, m_crFailures, dx, 0); RepositionWindow(&m_ceEmail, m_crEmail, dx, 0); RepositionWindow(&m_ceChat, m_crChat, dx, 0); } CDialog::OnSize(nType, cx, cy); this->Invalidate(); } void CAccountDlg::RepositionWindow(CWnd * pWnd, CRect rect, int dx, int dy) { pWnd->MoveWindow(rect.left + dx, rect.top + dy, rect.Width(), rect.Height()); } void CAccountDlg::Localize(void) { locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_cbOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_cbCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL9, (CWnd*)&m_csLabel9, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL8, (CWnd*)&m_csLabel8, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL7, (CWnd*)&m_csLabel7, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL6, (CWnd*)&m_csLabel6, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL5, (CWnd*)&m_csLabel5, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL4, (CWnd*)&m_csLabel4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL3, (CWnd*)&m_csLabel3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL2, (CWnd*)&m_csLabel2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL15, (CWnd*)&m_csLabel15, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL14, (CWnd*)&m_csLabel14, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL13, (CWnd*)&m_csLabel13, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL12, (CWnd*)&m_csLabel12, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL11, (CWnd*)&m_csLabel11, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL10, (CWnd*)&m_csLabel10, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_STATIC_LABEL1, (CWnd*)&m_csLabel1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_QUEUELABEL, (CWnd*)&m_csQueue, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_PARAMBOX, (CWnd*)&m_cbParam, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWACCT, (CWnd*)&m_cbNew, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DELETEACCT, (CWnd*)&m_cbDelete, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTFIRSTIP, (CWnd*)&m_csFirstIP, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_CHATCOMMENT, (CWnd*)&m_ceComment, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTUPDATES, (CWnd*)&m_clbUpdates, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTTIME, (CWnd*)&m_csTime, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTPWD, (CWnd*)&m_cePassword, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTPRIV, (CWnd*)&m_clbPriv, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLEVEL, (CWnd*)&m_ccbLevel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLASTUID, (CWnd*)&m_csUID, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLASTTIME, (CWnd*)&m_csLastTime, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLASTIP, (CWnd*)&m_csLastIP, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLASTDATE, (CWnd*)&m_csLastDate, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTLANG, (CWnd*)&m_ceLang, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTFIRSTDATE, (CWnd*)&m_csFirstDate, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTFAILURES, (CWnd*)&m_csFailures, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTEMAIL, (CWnd*)&m_ceEmail, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCTCHAT, (CWnd*)&m_ceChat, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ACCT_LIST, (CWnd*)&m_clbAcctList, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AMD_STATIC1, (CWnd*)&m_csAcctLabel, (CWnd*)this); } --- NEW FILE: AccountDlg.h --- /* $Id: AccountDlg.h,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_ACCOUNTDLG_H__DF6204E3_DD7F_11D3_A38A_00805FD91B8C__INCLUDED_) #define AFX_ACCOUNTDLG_H__DF6204E3_DD7F_11D3_A38A_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // AccountDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CAccountDlg dialog class CAccountDlg : public CDialog { // Construction public: CAccountDlg(CWnd* pParent = NULL); // standard constructor ~CAccountDlg(); // Dialog Data //{{AFX_DATA(CAccountDlg) enum { IDD = IDD_ACCOUNT_DLG }; CButton m_cbOK; CButton m_cbCancel; CStatic m_csLabel9; CStatic m_csLabel8; CStatic m_csLabel7; CStatic m_csLabel6; CStatic m_csLabel5; CStatic m_csLabel4; CStatic m_csLabel3; CStatic m_csLabel2; CStatic m_csLabel15; CStatic m_csLabel14; CStatic m_csLabel13; CStatic m_csLabel12; CStatic m_csLabel11; CStatic m_csLabel10; CStatic m_csLabel1; CStatic m_csQueue; CButton m_cbParam; CButton m_cbNew; CButton m_cbDelete; CStatic m_csFirstIP; CEdit m_ceComment; CListBox m_clbUpdates; CStatic m_csTime; CEdit m_cePassword; CListBox m_clbPriv; CComboBox m_ccbLevel; CStatic m_csUID; CStatic m_csLastTime; CStatic m_csLastIP; CStatic m_csLastDate; CEdit m_ceLang; CStatic m_csFirstDate; CStatic m_csFailures; CEdit m_ceEmail; CEdit m_ceChat; CListBox m_clbAcctList; CStatic m_csAcctLabel; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAccountDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: void RepositionWindow(CWnd * pWnd, CRect rect, int dx, int dy); void TouchAccount(); bool m_bIsChanging; void Load(); void Unload(); CRect m_crOriginal; CRect m_crOK, m_crCancel, m_crQueue, m_crParam, m_crNew, m_crDelete, m_crFirstIP, m_crComment; CRect m_crUpdates, m_crTime, m_crPassword, m_crPriv, m_crLevel, m_crUID, m_crLastTime, m_crLastIP; CRect m_crLastDate, m_crLang, m_crFirstDate, m_crFailures, m_crEmail, m_crChat, m_crAcctList; CRect m_crLabel1, m_crLabel2, m_crLabel3, m_crLabel4, m_crLabel5, m_crLabel6, m_crLabel7, m_crLabel8; CRect m_crLabel9, m_crLabel10, m_crLabel11, m_crLabel12, m_crLabel13, m_crLabel14, m_crLabel15; // Generated message map functions //{{AFX_MSG(CAccountDlg) virtual BOOL OnInitDialog(); afx_msg void OnNewacct(); afx_msg void OnDeleteacct(); afx_msg void OnOk(); virtual void OnCancel(); afx_msg void OnSelchangeAcctList(); afx_msg void OnChangeAcctchat(); afx_msg void OnChangeAcctemail(); afx_msg void OnChangeAcctlang(); afx_msg void OnSelchangeAcctlevel(); afx_msg void OnSelchangeAcctpriv(); afx_msg void OnChangeAcctpwd(); afx_msg void OnChangeChatcomment(); afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ACCOUNTDLG_H__DF6204E3_DD7F_11D3_A38A_00805FD91B8C__INCLUDED_) --- NEW FILE: DefEditDlg.cpp --- /* $Id: DefEditDlg.cpp,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // DefEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "DefEditDlg.h" #include "RemoteConsole.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDefEditDlg dialog CDefEditDlg::CDefEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CDefEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDefEditDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT this->m_dwID = 0; this->m_csDef = _T(""); this->m_csGroup = _T(""); } void CDefEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDefEditDlg) DDX_Control(pDX, IDC_DEFHEX, m_cbType); DDX_Control(pDX, IDOK, m_cbSave); DDX_Control(pDX, IDC_DEFGROUP, m_ccbDefGroup); DDX_Control(pDX, IDC_DEFNAME, m_ceDefName); DDX_Control(pDX, IDC_DEFID, m_ceDefID); DDX_Control(pDX, IDC_DEF_STATIC1, m_sInfo); DDX_Control(pDX, IDC_DEF_STATIC2, m_sID); DDX_Control(pDX, IDC_DEF_STATIC3, m_sDefName); DDX_Control(pDX, IDC_DEF_STATIC4, m_sGroup); DDX_Control(pDX, IDC_DEFDEC, m_bDefDec); DDX_Control(pDX, IDCANCEL, m_bCancel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDefEditDlg, CDialog) //{{AFX_MSG_MAP(CDefEditDlg) ON_BN_CLICKED(IDC_DEFHEX, OnDefhex) ON_BN_CLICKED(IDC_DEFDEC, OnDefdec) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDefEditDlg message handlers void CDefEditDlg::OnDefhex() { if ( !this->m_bDecimal ) return; // Convert the value from Decimal to Hex CString csVal; this->m_ceDefID.GetWindowText( csVal ); DWORD dwVal = _tstoi( csVal ); csVal.Format( _T("%04x"), dwVal ); this->m_ceDefID.SetWindowText( csVal ); this->m_bDecimal = false; return; } void CDefEditDlg::OnDefdec() { if ( this->m_bDecimal ) return; // Convert the value from Hex to Decimal CString csVal; this->m_ceDefID.GetWindowText( csVal ); DWORD dwVal = ahextoi( csVal ); csVal.Format( _T("%ld"), dwVal ); this->m_ceDefID.SetWindowText( csVal ); this->m_bDecimal = true; return; } void CDefEditDlg::OnOK() { CWaitCursor hourglass; CString csID; this->m_ceDefID.GetWindowText( csID ); DWORD dwID = ( this->m_bDecimal ? _tstoi( csID ) : ahextoi ( csID ) ); CString csName; this->m_ceDefName.GetWindowText( csName ); csName.TrimLeft(); csName.TrimRight(); if ( csName == _T("") ) { AxisMessageBox(locale->String(IDS_DEFEDIT_BLANK), MB_OK | MB_ICONEXCLAMATION); return; } if ( csName.SpanExcluding( _T(" =+)(*&^%$#@!~`';:[]}{<>.,/?\\|\"") ) != csName ) { AxisMessageBox(locale->String(IDS_DEFEDIT_INVALID), MB_OK | MB_ICONEXCLAMATION ); return; } CString csGroup; this->m_ccbDefGroup.GetWindowText( csGroup ); csGroup.TrimLeft(); csGroup.TrimRight(); if ( csGroup == _T("") ) { AxisMessageBox(locale->String(IDS_DEFEDIT_GROUP), MB_OK | MB_ICONEXCLAMATION ); return; } // Open the files CStdioFile csfTmp; CStdioFile csfOld; CString csScpPath = GetScriptPath(); CString csFile; if ( !csfTmp.Open( TMP_DEFS_FILE, CFile::modeWrite | CFile::shareDenyWrite | CFile::modeCreate ) ) { CString csMessage, s; s.Format(locale->String(IDS_SCRIPTS_TDEFS)); csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPENTEMP), TMP_DEFS_FILE, s ); AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); return; } if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == _T("")) csFile = Main->GetProfileType() == PROFILE_REMOTE ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format(_T("%s%s"), csScpPath, USER_DEFS_FILE); if ( !csfOld.Open( csFile, CFile::modeRead | CFile::shareDenyNone ) ) { CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); csfOld.Open( csFile, CFile::modeCreate | CFile::shareDenyNone ); csfOld.Close(); CString csDefLine, csGroupLine, csGroupFind; csDefLine.Format( _T("%s %ld\n"), csName, dwID ); csGroupLine.Format( _T("// [%s]\n"), csGroup ); csfTmp.WriteString( csGroupLine ); csfTmp.WriteString( csDefLine ); csfTmp.Close(); } else { // Start reading the old file CString csDefLine, csGroupLine, csGroupFind; csDefLine.Format( _T("%s %ld\n"), csName, dwID ); csGroupLine.Format( _T("// [%s]\n"), csGroup ); csGroupFind.Format( _T("[%s]"), csGroup ); BOOL bStatus = TRUE; BOOL bDefWritten = FALSE; while ( bStatus ) { CString csLine; bStatus = csfOld.ReadString( csLine ); if ( ! bStatus ) { if ( ! bDefWritten ) { csfTmp.WriteString( csGroupLine ); csfTmp.WriteString( csDefLine ); } break; } if ( bDefWritten ) { csfTmp.WriteString( csLine ); csfTmp.WriteString( _T("\n") ); } else { // Is this the group? if ( csLine.Find( csGroupFind ) != -1 ) { // This is the one csfTmp.WriteString( csLine ); csfTmp.WriteString( _T("\n") ); csfTmp.WriteString( csDefLine ); bDefWritten = TRUE; } else { csfTmp.WriteString( csLine ); csfTmp.WriteString( _T("\n") ); } } } csfTmp.Close(); csfOld.Close(); } // Update the file UpdateFiles( TMP_DEFS_FILE, USER_DEFS_FILE, RMT_DEFS_FILE, _T("graydefs") ); CDialog::OnOK(); } BOOL CDefEditDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); this->m_bDecimal = false; this->m_cbType.SetCheck(1); // Make sure we have the tusdefs.scp file if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; remote.GetCustomFile(_T("graydefs") ); } CStdioFile csfDefsFile; CString csScpPath = GetScriptPath(); CString csFile; if ( csScpPath == _T("") ) csFile = DEFS_FILE; else csFile.Format(_T("%s%s"), csScpPath, DEFS_FILE); if ( !csfDefsFile.Open( csFile, CFile::modeRead | CFile::shareDenyNone ) ) { CString csMessage; csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); this->m_cbSave.EnableWindow( FALSE ); } else { // Find all of the DEF groups and try to find the current def. CString csLastGroup = _T(""); BOOL bStatus = true; while ( bStatus ) { CString csLine; bStatus = csfDefsFile.ReadString( csLine ); if ( ! bStatus ) break; if ( csLine.Find(_T("[")) != -1 ) { CString csGroupName = csLine.Mid( csLine.Find(_T("[")) + 1 ); csGroupName = csGroupName.SpanExcluding(_T("]")); if ( this->m_ccbDefGroup.FindString( -1, csGroupName ) == -1 ) this->m_ccbDefGroup.AddString( csGroupName ); csLastGroup = csGroupName; } if ( this->m_csDef != _T("") ) { csLine.TrimLeft(); CString csTmp = csLine.SpanExcluding(_T(" \t")); if ( this->m_csDef.CompareNoCase( csTmp ) == 0 ) this->m_csGroup = csLastGroup; } } csfDefsFile.Close(); } if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == _T("") ) csFile = Main->GetProfileType() == PROFILE_REMOTE ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format(_T("%s%s"), csScpPath, USER_DEFS_FILE); if ( !csfDefsFile.Open(csFile, CFile::modeRead | CFile::shareDenyNone ) ) { CString csMessage; csMessage.Format( locale->String(IDS_SCRIPTS_CANTOPEN), csFile ); AxisMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); } else { // Find all of the DEF groups and try to find the current def. CString csLastGroup = _T(""); BOOL bStatus = true; while ( bStatus ) { CString csLine; bStatus = csfDefsFile.ReadString( csLine ); if ( ! bStatus ) break; if ( csLine.Find(_T("[")) != -1 ) { CString csGroupName = csLine.Mid( csLine.Find(_T("[")) + 1 ); csGroupName = csGroupName.SpanExcluding(_T("]")); if ( this->m_ccbDefGroup.FindString( -1, csGroupName ) == -1 ) this->m_ccbDefGroup.AddString( csGroupName ); csLastGroup = csGroupName; } if ( this->m_csDef != _T("") ) { csLine.TrimLeft(); CString csTmp = csLine.SpanExcluding(_T(" \t")); if ( this->m_csDef.CompareNoCase( csTmp ) == 0 ) this->m_csGroup = csLastGroup; } } csfDefsFile.Close(); } CString csID; csID.Format( _T("%04x"), m_dwID ); this->m_ceDefID.SetWindowText( csID ); this->m_ceDefName.SetWindowText( m_csDef ); if ( m_csGroup != _T("") ) this->m_ccbDefGroup.SetWindowText( m_csGroup ); else this->m_ccbDefGroup.SetCurSel( -1 ); if ( this->m_dwID != 0 ) this->m_ceDefID.EnableWindow( FALSE ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } BOOL CDefEditDlg::PreTranslateMessage(MSG* pMsg) { // Make sure any text that is added to the ID edit control is valid static bool bShiftKeyDown = false; if ( pMsg->message == WM_KEYDOWN ) { if ( this->GetFocus()->GetSafeHwnd() == this->m_ceDefID.GetSafeHwnd() ) { char nChar = (char) pMsg->wParam; if ( nChar == VK_SHIFT ) bShiftKeyDown = true; if ( nChar == VK_DELETE || nChar == VK_BACK || nChar == VK_HOME ) // these are always ok return CDialog::PreTranslateMessage(pMsg); if ( nChar >= _T('0') && nChar <= _T('9') && ( ! bShiftKeyDown ) ) // these are ok if the shift key isn't being held down. return CDialog::PreTranslateMessage(pMsg); if ( nChar >= VK_NUMPAD0 && nChar <= VK_NUMPAD9 ) // these are always ok return CDialog::PreTranslateMessage(pMsg); if ( ( nChar >= _T('a') && nChar <= _T('f') ) || ( nChar >= _T('A') && nChar <= _T('F') ) ) { if ( ! this->m_bDecimal ) return CDialog::PreTranslateMessage(pMsg); else return TRUE; } return TRUE; } } if ( pMsg->message == WM_KEYUP ) { char nChar = (char) pMsg->wParam; if ( nChar == VK_SHIFT ) bShiftKeyDown = false; } return CDialog::PreTranslateMessage(pMsg); } void CDefEditDlg::SetDef(DWORD dwID, CString csDef, CString csGroup) { this->m_dwID = dwID; this->m_csDef = csDef; this->m_csOldDef = csDef; this->m_csGroup = csGroup; } void CDefEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEFHEX, (CWnd*)&m_cbType, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_cbSave, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEFGROUP, (CWnd*)&m_ccbDefGroup, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEFNAME, (CWnd*)&m_ceDefName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEFID, (CWnd*)&m_ceDefID, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEF_STATIC1, (CWnd*)&m_sInfo, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEF_STATIC2, (CWnd*)&m_sID, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEF_STATIC3, (CWnd*)&m_sDefName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEF_STATIC4, (CWnd*)&m_sGroup, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DEFDEC, (CWnd*)&m_bDefDec, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); } --- NEW FILE: DefEditDlg.h --- /* $Id: DefEditDlg.h,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_DEFEDITDLG_H__CE8B17F1_4F35_11D3_872C_00805FD91B8C__INCLUDED_) #define AFX_DEFEDITDLG_H__CE8B17F1_4F35_11D3_872C_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // DefEditDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CDefEditDlg dialog class CDefEditDlg : public CDialog { // Construction public: void SetDef(DWORD dwID, CString csDef = _T(""), CString csGroup = _T("")); bool m_bDecimal; CDefEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDefEditDlg) enum { IDD = IDD_DEFEDIT_DLG }; CButton m_cbType; CButton m_cbSave; CComboBox m_ccbDefGroup; CEdit m_ceDefName; CEdit m_ceDefID; CStatic m_sInfo; CStatic m_sID; CStatic m_sDefName; CStatic m_sGroup; CButton m_bDefDec; CButton m_bCancel; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDefEditDlg) public: virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: CString m_csOldDef; CString m_csGroup; CString m_csDef; DWORD m_dwID; // Generated message map functions //{{AFX_MSG(CDefEditDlg) afx_msg void OnDefhex(); afx_msg void OnDefdec(); virtual void OnOK(); virtual BOOL OnInitDialog(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DEFEDITDLG_H__CE8B17F1_4F35_11D3_872C_00805FD91B8C__INCLUDED_) --- NEW FILE: itemeditdlg.cpp --- /* $Id: itemeditdlg.cpp,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * [...1540 lines suppressed...] locale->LocalizeWindow(IDD, IDC_EI_GATTR, (CWnd*)&m_sGAttr, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SSKILL, (CWnd*)&m_sSkill, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SDAMAGE, (CWnd*)&m_sDamage, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SAR, (CWnd*)&m_sAr, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SREQSTR, (CWnd*)&m_sReqStr, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_GMAGIC, (CWnd*)&m_sGMagic, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SSPELL, (CWnd*)&m_sSpell, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SCHARGES, (CWnd*)&m_sCharges, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SARBONUS, (CWnd*)&m_sArBonus, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_GCLASS, (CWnd*)&m_sGClass, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SCAT, (CWnd*)&m_sCat, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SSUB, (CWnd*)&m_sSub, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_SDESC, (CWnd*)&m_sDesc, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STRIG, (CWnd*)&m_sTrig, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STATIC3, (CWnd*)&m_sStatic3, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STATIC4, (CWnd*)&m_sStatic4, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_EI_STATIC5, (CWnd*)&m_sStatic5, (CWnd*)this); } --- NEW FILE: itemeditdlg.h --- /* $Id: itemeditdlg.h,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_ITEMEDITDLG_H__40564671_DE14_11D2_8709_00805FD91B8C__INCLUDED_) #define AFX_ITEMEDITDLG_H__40564671_DE14_11D2_8709_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // ItemEditDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CItemEditDlg dialog class CItemEditDlg : public CDialog { // Construction public: void InitData(CItem * pItem); CPtrArray * m_pDupeItemArray; void EnableControls(bool bEnable); CItem * m_pItem; CString m_csDispID; CString m_csCaption; CItemEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CItemEditDlg) enum { IDD = IDD_ITEMEDIT }; CStatic m_csDisplay; CComboBox m_ccbEntry; CButton m_cbOK; CButton m_cbCancel; CButton m_cbTrigEdit; CButton m_cbNew; CButton m_cbEdit; CButton m_cbCancelEdit; CButton m_cbApply; CButton m_cbPalette; CButton m_cbAddSubsection; CButton m_cbAddCategory; CEdit m_ceTriggers; CEdit m_ceSellValueMax; CEdit m_ceBuyValueMax; CButton m_cbNoIndex; CComboBox m_ccbColor; CComboBox m_ccbDupeitem; CButton m_cbRepairable; CButton m_cbDyeable; CButton m_cbMagical; CEdit m_ceWeight; CComboBox m_ccbSubsection; CStatic m_csBase; CComboBox m_ccbSpell; CComboBox m_ccbSkill; CEdit m_ceSellValue; CEdit m_ceReqStr; CEdit m_ceName; CComboBox m_ccbItemType; CEdit m_ceItemID; CEdit m_ceHPMin; CEdit m_ceHPMax; CEdit m_ceDescription; CEdit m_ceDamageMin; CEdit m_ceDamageMax; CEdit m_ceCharges; CComboBox m_ccbCategory; CEdit m_ceBuyValue; CEdit m_ceArmourMin; CEdit m_ceArmourMax; CEdit m_ceArmourBonus; CStatic m_sEntry; CStatic m_sBase; CStatic m_sDupe; CStatic m_sName; CStatic m_sType; CStatic m_sBuy; CStatic m_sColor; CStatic m_sSell; CStatic m_sWeight; CStatic m_sHP; CStatic m_sGAttr; CStatic m_sSkill; CStatic m_sDamage; CStatic m_sAr; CStatic m_sReqStr; CStatic m_sGMagic; CStatic m_sSpell; CStatic m_sCharges; CStatic m_sArBonus; CStatic m_sGClass; CStatic m_sCat; CStatic m_sSub; CStatic m_sDesc; CStatic m_sTrig; CStatic m_sStatic1; CStatic m_sStatic2; CStatic m_sStatic3; CStatic m_sStatic4; CStatic m_sStatic5; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CItemEditDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: bool ValidateData(); void EnableEditWindows(bool bEnable); bool m_bNew; int m_iEdits; HICON m_hPaletteIcon; // Generated message map functions //{{AFX_MSG(CItemEditDlg) virtual BOOL OnInitDialog(); afx_msg void OnSelchangeCategory(); afx_msg void OnMagical(); afx_msg void OnSelchangeItemtype(); afx_msg void OnSelchangeDupeitem(); virtual void OnOK(); afx_msg void OnAddcategory(); afx_msg void OnAddsubsection(); afx_msg void OnNoindex(); afx_msg void OnChangeName(); afx_msg void OnTrigedit(); afx_msg void OnIepalette(); afx_msg void OnSelchangeItementry(); afx_msg void OnItemNew(); afx_msg void OnItemEdit(); afx_msg void OnItemApply(); afx_msg void OnItemCancel(); virtual void OnCancel(); afx_msg void OnChangeItemid(); afx_msg void OnEditchangeColorcombo(); afx_msg void OnSelchangeColorcombo(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: void FillDupeItems(); void FillColors(); void FillSpells(); void DrawItem(); public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ITEMEDITDLG_H__40564671_DE14_11D2_8709_00805FD91B8C__INCLUDED_) --- NEW FILE: lootitemeditdlg.cpp --- /* $Id: lootitemeditdlg.cpp,v 1.1 2003/07/03 18:09:29 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // LootItemEditDlg.cpp : implementation file // #include "stdafx.h" #include "Scripts.h" #include "LootItemEditDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CLootItemEditDlg dialog CLootItemEditDlg::CLootItemEditDlg(CWnd* pParent /*=NULL*/) : CDialog(CLootItemEditDlg::IDD, pParent) { //{{AFX_DATA_INIT(CLootItemEditDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT this->m_bNewbie = false; } void CLootItemEditDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLootItemEditDlg) DDX_Control(pDX, IDC_CHECK2, m_cbNewbie); DDX_Control(pDX, IDC_LOOTITEM_RANDOM, m_cbRandom); DDX_Control(pDX, IDC_LOOTITEM_NAME, m_ceName); DDX_Control(pDX, IDC_LOOTITEM_MIN, m_ceMin); DDX_Control(pDX, IDC_LOOTITEM_MAX, m_ceMax); DDX_Control(pDX, IDC_LOOTITEM_FREQUENCY, m_ceFrequency); DDX_Control(pDX, IDC_LOOTITEM_COLOR, m_ccbColor); DDX_Control(pDX, IDC_LIE_STATIC1, m_sName); DDX_Control(pDX, IDC_LIE_STATIC2, m_sMin); DDX_Control(pDX, IDC_LIE_STATIC3, m_sMax); DDX_Control(pDX, IDC_LIE_STATIC4, m_sColor); DDX_Control(pDX, IDC_LIE_STATIC5, m_s1in); DDX_Control(pDX, IDC_LIE_STATIC6, m_sChance); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CLootItemEditDlg, CDialog) //{{AFX_MSG_MAP(CLootItemEditDlg) ON_BN_CLICKED(IDC_LOOTITEM_RANDOM, OnLootitemRandom) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CLootItemEditDlg message handlers BOOL CLootItemEditDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); m_csMin.TrimLeft(); m_csMin.TrimRight(); m_csMax.TrimLeft(); m_csMax.TrimRight(); // Load the colors FillColors(); this->m_ceName.SetWindowText(m_csName); this->m_ceMax.SetWindowText(m_csMax); this->m_ceMin.SetWindowText(m_csMin); if (m_csFrequency != _T("")) { m_cbRandom.SetCheck(1); m_ceFrequency.EnableWindow(true); m_ceFrequency.SetWindowText(m_csFrequency); } else { m_cbRandom.SetCheck(0); m_ceFrequency.EnableWindow(false); } m_cbNewbie.SetCheck(m_bNewbie); int iSel = -1; m_csColor.MakeLower(); for (int i = 0; i < this->m_ccbColor.GetCount(); i++) { CString csText; this->m_ccbColor.GetLBText(i, csText); csText.MakeLower(); if (csText == m_csColor) { this->m_ccbColor.SetCurSel(i); iSel = i; } } if (iSel == -1) this->m_ccbColor.SetWindowText(m_csColor); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CLootItemEditDlg::OnOK() { CWaitCursor hourglass; if (m_cbRandom.GetCheck() == 0) m_csFrequency = _T(""); else m_ceFrequency.GetWindowText(m_csFrequency); CString csMin, csMax; m_ceMin.GetWindowText(csMin); m_ceMax.GetWindowText(csMax); int iMin, iMax; iMin = _tstoi(csMin); iMax = _tstoi(csMax); if (iMin <= iMax) { m_csMin = csMin; m_csMax = csMax; } else { m_csMin = csMax; m_csMax = csMin; } m_ccbColor.GetWindowText(m_csColor); m_bNewbie = (m_cbNewbie.GetCheck() == 1) ? true : false; CDialog::OnOK(); } void CLootItemEditDlg::OnLootitemRandom() { if (m_cbRandom.GetCheck() == 0) m_ceFrequency.EnableWindow(false); else m_ceFrequency.EnableWindow(true); } void CLootItemEditDlg::FillColors() { CStdioFile csfGrayDefs; BOOL bStatus; CString csScpPath = GetScriptPath(); CString csFile; if ( csScpPath == _T("") ) csFile = DEFS_FILE; else csFile.Format(_T("%s%s"), csScpPath, DEFS_FILE); bStatus = csfGrayDefs.Open(csFile, CFile::modeRead | CFile::shareDenyNone); if (bStatus == 0) { CString csMessage; csMessage.Format(_T("Unable to open %s"), csFile); AxisMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return; } CString csInput; bool bFoundSection = false; while (bStatus) { bStatus = csfGrayDefs.ReadString(csInput); if (bStatus && !bFoundSection) { if (csInput.Find(_T("[COLORS]")) != -1) bFoundSection = TRUE; } else { if (bFoundSection) { if (csInput.Find(_T("[")) != -1) { // We have reached a new section bStatus = FALSE; } else { // Check for blank line or comment csInput = csInput.SpanExcluding(_T("//")); csInput.TrimLeft(); // Get the value associated with this name csInput = csInput.SpanExcluding(_T(" ")); csInput.MakeLower(); if (csInput != _T("")) { int iIndex = this->m_ccbColor.AddString(csInput); } } } } } csfGrayDefs.Close(); } void CLootItemEditDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_CHECK2, (CWnd*)&m_cbNewbie, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_RANDOM, (CWnd*)&m_cbRandom, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_NAME, (CWnd*)&m_ceName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_MIN, (CWnd*)&m_ceMin, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_MAX, (CWnd*)&m_ceMax, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_FREQUENCY, (CWnd*)&m_ceFrequency, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOOTITEM_COLOR, (CWnd*)&m_ccbColor, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC1, (CWnd*)&m_sName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC2, (CWnd*)&m_sMin, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC3, (CWnd*)&m_sMax, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC4, (CWnd*)&m_sColor, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC5, (CWnd*)&m_s1in, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LIE_STATIC6, (CWnd*)&m_sChance, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CW... [truncated message content] |
From: Philip E. <pes...@us...> - 2003-07-03 17:14:57
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv11251/S_Sphere52 Modified Files: S_Sphere52.cpp Log Message: no message Index: S_Sphere52.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** S_Sphere52.cpp 23 May 2003 05:46:54 -0000 1.2 --- S_Sphere52.cpp 3 Jul 2003 17:14:54 -0000 1.3 *************** *** 32,35 **** --- 32,36 ---- return FALSE; #endif + AfxEnableControlContainer(); return CWinApp::InitInstance(); } |
From: Philip E. <pes...@us...> - 2003-07-02 17:20:12
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv28726/S_Sphere52 Modified Files: MapScriptEditDlg.cpp MapScriptEditDlg.h ScriptsMain.cpp ScriptsMain.h strings.h Log Message: no message Index: MapScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MapScriptEditDlg.cpp 2 Jul 2003 13:54:17 -0000 1.2 --- MapScriptEditDlg.cpp 2 Jul 2003 17:20:08 -0000 1.3 *************** *** 388,392 **** if ( iSel == -1 ) { ! AxisMessageBox(locale->String(IDS_MAPSEDIT_CHOOSEVERSION), MB_OK); return; } --- 388,392 ---- if ( iSel == -1 ) { ! AfxMessageBox(locale->String(IDS_MAPSEDIT_CHOOSEVERSION), MB_OK); return; } *************** *** 399,403 **** void CMapScriptEditDlg::OnCancel() { ! if (AxisMessageBox(locale->String(IDS_MAPSEDIT_WARNCANCEL), MB_YESNO | MB_ICONQUESTION) == IDYES) CDialog::OnCancel(); --- 399,403 ---- void CMapScriptEditDlg::OnCancel() { ! if (AfxMessageBox(locale->String(IDS_MAPSEDIT_WARNCANCEL), MB_YESNO | MB_ICONQUESTION) == IDYES) CDialog::OnCancel(); *************** *** 777,781 **** CString csVal = this->m_clcValues.GetItemText( iSel, 1 ); int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); ! string sCaption, sValue; bool bSimple = true; // Some of these are just strings --- 777,781 ---- CString csVal = this->m_clcValues.GetItemText( iSel, 1 ); int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); ! CString sCaption, sValue; bool bSimple = true; // Some of these are just strings *************** *** 798,843 **** { // Name of locals ! sCaption.assign(_T("Name for locals")); ! sValue.assign((LPCTSTR)pArea->m_csLocal); } break; case 0: ! sCaption.assign(_T("Region Title")); ! sValue.assign((LPCTSTR)pArea->m_csTitle); break; case 1: ! sCaption.assign(_T("Classification Group")); ! sValue.assign((LPCTSTR)pArea->m_csGroup); break; case 2: ! sCaption.assign(_T("Teleport Point")); ! sValue.assign((LPCTSTR)pArea->m_csPoint); break; case 4: ! sCaption.assign(_T("Guard allegiance")); ! sValue.assign((LPCTSTR)pArea->m_csGuardOwner); break; case 5: ! sCaption.assign(_T("Chance of Weather")); ! sValue = FormatString(_T("%ld"), pArea->m_iRainChance); break; case 6: ! sCaption.assign(_T("Chance of Cold")); ! sValue = FormatString(_T("%ld"), pArea->m_iSnowChance); break; case 7: ! sCaption.assign(_T("Announcement")); ! sValue.assign(pArea->m_csAnnouncement); break; case 9: if ( iVersion == 0 ) { ! sCaption.assign(_T("Region Trigger")); ! sValue = FormatString(_T("%ld"), pArea->m_dwTriggerID); } else { ! sCaption.assign(_T("Defname")); ! sValue.assign(pArea->m_csDefname); } break; --- 798,843 ---- { // Name of locals ! sCaption =_T("Name for locals"); ! sValue = pArea->m_csLocal; } break; case 0: ! sCaption = _T("Region Title"); ! sValue = pArea->m_csTitle; break; case 1: ! sCaption = _T("Classification Group"); ! sValue = pArea->m_csGroup; break; case 2: ! sCaption = _T("Teleport Point"); ! sValue = pArea->m_csPoint; break; case 4: ! sCaption = _T("Guard allegiance"); ! sValue = pArea->m_csGuardOwner; break; case 5: ! sCaption = _T("Chance of Weather"); ! sValue.Format(_T("%ld"), pArea->m_iRainChance); break; case 6: ! sCaption= _T("Chance of Cold"); ! sValue.Format(_T("%ld"), pArea->m_iSnowChance); break; case 7: ! sCaption = _T("Announcement"); ! sValue = pArea->m_csAnnouncement; break; case 9: if ( iVersion == 0 ) { ! sCaption = _T("Region Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTriggerID); } else { ! sCaption = _T("Defname"); ! sValue = pArea->m_csDefname; } break; *************** *** 845,855 **** if ( iVersion == 0 ) { ! sCaption.assign(_T("Periodic Trigger")); ! sValue = FormatString(_T("%ld"), pArea->m_dwTrigPeriodic); } else { ! sCaption.assign(_T("Class")); ! sValue = FormatString(_T("%ld"), pArea->m_iClass); } break; --- 845,855 ---- if ( iVersion == 0 ) { ! sCaption = _T("Periodic Trigger"); ! sValue.Format(_T("%ld"), pArea->m_dwTrigPeriodic); } else { ! sCaption = _T("Class"); ! sValue.Format(_T("%ld"), pArea->m_iClass); } break; *************** *** 859,864 **** CEditValueDlg dlg; dlg.m_bTextMode = true; ! dlg.m_csCaption = sCaption.c_str(); ! dlg.m_csTextValue = sValue.c_str(); if ( dlg.DoModal() == IDOK ) { --- 859,864 ---- CEditValueDlg dlg; dlg.m_bTextMode = true; ! dlg.m_csCaption = sCaption; ! dlg.m_csTextValue = sValue; if ( dlg.DoModal() == IDOK ) { *************** *** 1007,1011 **** } else ! AxisMessageBox(locale->String(IDS_MAPSEDIT_NOAREA), MB_OK | MB_ICONEXCLAMATION); m_bSearching = false; } --- 1007,1011 ---- } else ! AfxMessageBox(locale->String(IDS_MAPSEDIT_NOAREA), MB_OK | MB_ICONEXCLAMATION); m_bSearching = false; } *************** *** 1078,1082 **** } else ! AxisMessageBox(locale->String(IDS_MAPSEDIT_NOROOM), MB_OK | MB_ICONEXCLAMATION); m_bSearching = false; } --- 1078,1082 ---- } else ! AfxMessageBox(locale->String(IDS_MAPSEDIT_NOROOM), MB_OK | MB_ICONEXCLAMATION); m_bSearching = false; } Index: MapScriptEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MapScriptEditDlg.h 2 Jul 2003 13:54:17 -0000 1.2 --- MapScriptEditDlg.h 2 Jul 2003 17:20:08 -0000 1.3 *************** *** 22,28 **** */ - //{{AFX_INCLUDES() - #include "uomap.h" - //}}AFX_INCLUDES #if !defined(AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_) #define AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_ --- 22,25 ---- *************** *** 34,37 **** --- 31,35 ---- #include <afxwin.h> #include <afxcmn.h> + #include "uomap.h" #include <string> Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** ScriptsMain.cpp 1 Jul 2003 14:17:40 -0000 1.21 --- ScriptsMain.cpp 2 Jul 2003 17:20:08 -0000 1.22 *************** *** 2914,2917 **** --- 2914,2919 ---- void CScriptsMain::RegionEditor(ULONG index) { + CMapScriptEditDlg dlg; + dlg.DoModal(); } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** ScriptsMain.h 1 Jul 2003 14:17:40 -0000 1.12 --- ScriptsMain.h 2 Jul 2003 17:20:08 -0000 1.13 *************** *** 7,10 **** --- 7,11 ---- #include "FileReadProgress.h" + #include "MapScriptEditDlg.h" #include <vector> Index: strings.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/strings.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** strings.h 1 Jul 2003 14:17:40 -0000 1.4 --- strings.h 2 Jul 2003 17:20:08 -0000 1.5 *************** *** 59,62 **** --- 59,70 ---- #define IDS_ADDVAL_NAME 241 #define IDS_ADDVAL_FILE 242 + #define IDS_SCRIPTEDIT_DESCRIPTION 460 + #define IDS_GENERIC_VALUE 461 + #define IDS_MAPSEDIT_BLANK 255 + #define IDS_MAPSEDIT_CANTDELETE 256 + #define IDS_MAPSEDIT_CHOOSEVERSION 257 + #define IDS_MAPSEDIT_WARNCANCEL 258 + #define IDS_MAPSEDIT_NOAREA 259 + #define IDS_MAPSEDIT_NOROOM 260 |
From: Philip E. <pes...@us...> - 2003-07-02 13:54:20
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv25558 Modified Files: MapScriptEditDlg.cpp MapScriptEditDlg.h Resource.h XMLConfig.cpp XMLConfig.h Log Message: no message Index: MapScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MapScriptEditDlg.cpp 2 Jul 2003 00:13:30 -0000 1.1 --- MapScriptEditDlg.cpp 2 Jul 2003 13:54:17 -0000 1.2 *************** *** 257,261 **** { TV_KEYDOWN* pTVKeyDown = (TV_KEYDOWN*)pNMHDR; ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if (pTVKeyDown->wVKey == VK_DELETE) { --- 257,261 ---- { TV_KEYDOWN* pTVKeyDown = (TV_KEYDOWN*)pNMHDR; ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if (pTVKeyDown->wVKey == VK_DELETE) { *************** *** 267,271 **** if ( iVersion == 0 && pArea->m_bCustom == false ) { ! AxisMessageBox(locale->String(IDS_MAPSEDIT_CANTDELETE), MB_OK | MB_ICONINFORMATION ); return; } --- 267,271 ---- if ( iVersion == 0 && pArea->m_bCustom == false ) { ! AfxMessageBox(locale->String(IDS_MAPSEDIT_CANTDELETE), MB_OK | MB_ICONINFORMATION ); return; } *************** *** 291,295 **** void CMapScriptEditDlg::OnNewroom() { ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); HTREEITEM hParent = NULL; HTREEITEM hTestItem = this->m_ctcRegionTree.GetRootItem(); --- 291,295 ---- void CMapScriptEditDlg::OnNewroom() { ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); HTREEITEM hParent = NULL; HTREEITEM hTestItem = this->m_ctcRegionTree.GetRootItem(); *************** *** 337,341 **** void CMapScriptEditDlg::OnNewarea() { ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); CAddValueDialog dlg; if ( iVersion ) --- 337,341 ---- void CMapScriptEditDlg::OnNewarea() { ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); CAddValueDialog dlg; if ( iVersion ) *************** *** 391,395 **** return; } ! int version = m_ccbVersion.GetItemData(iSel); Main->m_pScripts->SaveMap(version); m_bIsActive = false; --- 391,395 ---- return; } ! int version = (int) m_ccbVersion.GetItemData(iSel); Main->m_pScripts->SaveMap(version); m_bIsActive = false; *************** *** 562,567 **** // Mapplane 0 m_iMapPlane = 0; ! X = (wParam / 512) * 8; ! Y = (wParam % 512) * 8; m_map.SetMapFile(0); } --- 562,567 ---- // Mapplane 0 m_iMapPlane = 0; ! X = ((int) wParam / 512) * 8; ! Y = ((int) wParam % 512) * 8; m_map.SetMapFile(0); } *************** *** 571,576 **** m_iMapPlane = 2; wParam %= (768 * 512); ! X = (wParam / 512 ) * 8; ! Y = (wParam % 512 ) * 8; m_map.SetMapFile(2); } --- 571,576 ---- m_iMapPlane = 2; wParam %= (768 * 512); ! X = ((int)wParam / 512 ) * 8; ! Y = ((int)wParam % 512 ) * 8; m_map.SetMapFile(2); } *************** *** 606,610 **** return; ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); // Do the common ones first --- 606,610 ---- return; ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); // Do the common ones first *************** *** 697,701 **** m = m_iMapPlane; CString csCoords; ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if ( iVersion == 0 ) csCoords.Format(_T("%d, %d, %d"), x, y, z); --- 697,701 ---- m = m_iMapPlane; CString csCoords; ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if ( iVersion == 0 ) csCoords.Format(_T("%d, %d, %d"), x, y, z); *************** *** 711,715 **** CArea * CMapScriptEditDlg::SetCustomArea(CArea *pArea) { ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if ( iVersion ) { --- 711,715 ---- CArea * CMapScriptEditDlg::SetCustomArea(CArea *pArea) { ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); if ( iVersion ) { *************** *** 776,780 **** CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData( hSelItem ); CString csVal = this->m_clcValues.GetItemText( iSel, 1 ); ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); string sCaption, sValue; bool bSimple = true; --- 776,780 ---- CArea * pArea = (CArea *) this->m_ctcRegionTree.GetItemData( hSelItem ); CString csVal = this->m_clcValues.GetItemText( iSel, 1 ); ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); string sCaption, sValue; bool bSimple = true; *************** *** 1345,1349 **** m_clcValues.DeleteAllItems(); // Change the options in the values box ! int iVersion = m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); switch (iVersion) { --- 1345,1349 ---- m_clcValues.DeleteAllItems(); // Change the options in the values box ! int iVersion = (int) m_ccbVersion.GetItemData(m_ccbVersion.GetCurSel()); switch (iVersion) { Index: MapScriptEditDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/MapScriptEditDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MapScriptEditDlg.h 2 Jul 2003 00:13:30 -0000 1.1 --- MapScriptEditDlg.h 2 Jul 2003 13:54:17 -0000 1.2 *************** *** 23,27 **** //{{AFX_INCLUDES() ! #include "CDUOMap.h" //}}AFX_INCLUDES #if !defined(AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_) --- 23,27 ---- //{{AFX_INCLUDES() ! #include "uomap.h" //}}AFX_INCLUDES #if !defined(AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_) *************** *** 91,95 **** CStatic m_csCursor; CStatic m_csCoords; ! CDUOMap m_map; //}}AFX_DATA --- 91,95 ---- CStatic m_csCursor; CStatic m_csCoords; ! CUOMap m_map; //}}AFX_DATA Index: Resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Resource.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Resource.h 1 Jul 2003 14:17:40 -0000 1.4 --- Resource.h 2 Jul 2003 13:54:17 -0000 1.5 *************** *** 53,56 **** --- 53,57 ---- #define IDC_PROFILE_SAVE 231 #define IDC_PROFILE_DISCARD 232 + #define IDC_UOMAPCTRL1 232 #define IDC_TRIGEDIT 1001 #define IDC_NPCATTRADD 1001 *************** *** 255,259 **** #define _APS_NEXT_RESOURCE_VALUE 205 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 232 #define _APS_NEXT_SYMED_VALUE 104 #endif --- 256,260 ---- #define _APS_NEXT_RESOURCE_VALUE 205 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 233 #define _APS_NEXT_SYMED_VALUE 104 #endif Index: XMLConfig.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/XMLConfig.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** XMLConfig.cpp 13 Jun 2003 14:52:42 -0000 1.4 --- XMLConfig.cpp 2 Jul 2003 13:54:17 -0000 1.5 *************** *** 23,26 **** --- 23,27 ---- { m_iProfileCount = 0; + m_sMulFiles.resize(MulCount, _T("")); } Index: XMLConfig.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/XMLConfig.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** XMLConfig.h 12 Jun 2003 23:27:01 -0000 1.4 --- XMLConfig.h 2 Jul 2003 13:54:17 -0000 1.5 *************** *** 5,8 **** --- 5,11 ---- #include "XMLBase.h" + #include <vector> + using namespace std; + #ifndef PROFILE_LOCAL #define PROFILE_UNDEFINED -1 *************** *** 13,16 **** --- 16,80 ---- #endif + enum Muls + { + Map0 = 0, + StaIdx0, + Statics0, + ArtIdx, + Art, + AnimIdx, + Anim, + SoundIdx, + Sound, + TexIdx, + Texmaps, // 0x0A + GumpIdx, + Gump, + MultiIdx, + Multi, + SkillsIdx, + Skills, // 0x10 + LightIdx, + Lights, + Tiledata = 0x1e, + Animdata = 0x1f, + Hues, + Animinfo, + Fonts, + Radarcol, + Verdata, + Map2, + StaIdx2, + Statics2, + Anim2, + Anim2Idx, + Map3, + StaIdx3, + Statics3, + Anim3, + Anim3Idx, + // For some reason, the diff files are out of order in the ActiveX controls. + MapDif3, + MapDifl3, + StaDif3, + StaDifi3, + StaDifl3, + MapDif0, + MapDif1, + MapDif2, + MapDifl0, + MapDifl1, + MapDifl2, + StaDif0, + StaDif1, + StaDif2, + StaDifi0, + StaDifi1, + StaDifi2, + StaDifl0, + StaDifl1, + StaDifl2, + MulCount + }; class CXMLConfig : public CXMLBase *************** *** 28,31 **** --- 92,99 ---- void AddProfile(CScriptProfile * pNewProfile); void DeleteProfile(CScriptProfile * pProfile); + CString MulPath() { return m_sMulPath; } + CString MulFile(int index) { if ( index < MulCount && index >= Map0 ) return m_sMulFiles[index]; else return _T(""); } + void MulPath(CString s) { m_sMulPath = s; } + void MulFile(int index, CString s) { if ( index < MulCount && index >= Map0 ) m_sMulFiles[index] = s; } protected: *************** *** 34,37 **** --- 102,107 ---- xmlDocPtr m_pXMLDoc; CString m_sLocaleFile; + CString m_sMulPath; + vector<CString> m_sMulFiles; bool LoadFromRegistry(); |
From: Philip E. <pes...@us...> - 2003-07-02 04:13:10
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv21600 Modified Files: S_ScriptsBase.cpp S_ScriptsBase.vcproj stdafx.h Added Files: uoart.cpp uoart.h uomap.cpp uomap.h Removed Files: CDUOArt.cpp CDUOArt.h CDUOMap.cpp CDUOMap.h Log Message: no message --- NEW FILE: uoart.cpp --- /* $Id: uoart.cpp,v 1.1 2003/07/02 04:13:07 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. #include "stdafx.h" #include "uoart.h" ///////////////////////////////////////////////////////////////////////////// // CUOArt IMPLEMENT_DYNCREATE(CUOArt, CWnd) ///////////////////////////////////////////////////////////////////////////// // CUOArt properties long CUOArt::GetReadyState() { long result; GetProperty(DISPID_READYSTATE, VT_I4, (void*)&result); return result; } short CUOArt::GetArtType() { short result; GetProperty(0x3, VT_I2, (void*)&result); return result; } void CUOArt::SetArtType(short propVal) { SetProperty(0x3, VT_I2, propVal); } long CUOArt::GetArtIndex() { long result; GetProperty(0x4, VT_I4, (void*)&result); return result; } void CUOArt::SetArtIndex(long propVal) { SetProperty(0x4, VT_I4, propVal); } short CUOArt::GetArtColor() { short result; GetProperty(0x5, VT_I2, (void*)&result); return result; } void CUOArt::SetArtColor(short propVal) { SetProperty(0x5, VT_I2, propVal); } long CUOArt::GetXOffset() { long result; GetProperty(0x1, VT_I4, (void*)&result); return result; } void CUOArt::SetXOffset(long propVal) { SetProperty(0x1, VT_I4, propVal); } long CUOArt::GetYOffset() { long result; GetProperty(0x2, VT_I4, (void*)&result); return result; } void CUOArt::SetYOffset(long propVal) { SetProperty(0x2, VT_I4, propVal); } short CUOArt::GetDrawFlags() { short result; GetProperty(0x6, VT_I2, (void*)&result); return result; } void CUOArt::SetDrawFlags(short propVal) { SetProperty(0x6, VT_I2, propVal); } ///////////////////////////////////////////////////////////////////////////// // CUOArt operations void CUOArt::SetObject(short type, long index) { static BYTE parms[] = VTS_I2 VTS_I4; InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms, type, index); } void CUOArt::SetOffset(long x, long y) { static BYTE parms[] = VTS_I4 VTS_I4; InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } long CUOArt::yScroll(long offset) { long result; static BYTE parms[] = VTS_I4; InvokeHelper(0x9, DISPATCH_METHOD, VT_I4, (void*)&result, parms, offset); return result; } long CUOArt::xScroll(long offset) { long result; static BYTE parms[] = VTS_I4; InvokeHelper(0xa, DISPATCH_METHOD, VT_I4, (void*)&result, parms, offset); return result; } void CUOArt::Scroll(long x, long y) { static BYTE parms[] = VTS_I4 VTS_I4; InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void CUOArt::RemovePreviewItems() { InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOArt::RemovePreviewItem(short ID, short x, short y, short z, short color) { static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2; InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ID, x, y, z, color); } void CUOArt::RemovePreviewItemAt(long index) { static BYTE parms[] = VTS_I4; InvokeHelper(0xe, DISPATCH_METHOD, VT_EMPTY, NULL, parms, index); } long CUOArt::AddPreviewItem(short ID, short x, short y, short z, short color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2; InvokeHelper(0xf, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ID, x, y, z, color); return result; } long CUOArt::AddHideStatic(short ID, long Block, short x, short y, short z, short color) { long result; static BYTE parms[] = VTS_I2 VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2; InvokeHelper(0x10, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ID, Block, x, y, z, color); return result; } void CUOArt::RemoveHideStatics() { InvokeHelper(0x11, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOArt::RemoveHideStaticAt(long index) { static BYTE parms[] = VTS_I4; InvokeHelper(0x12, DISPATCH_METHOD, VT_EMPTY, NULL, parms, index); } void CUOArt::RemoveHideStatic(short ID, long Block, short x, short y, short z, short color) { static BYTE parms[] = VTS_I2 VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2; InvokeHelper(0x13, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ID, Block, x, y, z, color); } void CUOArt::RedrawControl() { InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOArt::SetMulPath(LPCTSTR pszNewPath) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszNewPath); } CString CUOArt::GetMulPath() { CString result; InvokeHelper(0x16, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); return result; } BOOL CUOArt::SetCustomMulFile(short sFileIndex, LPCTSTR pszNewFilePath) { BOOL result; static BYTE parms[] = VTS_I2 VTS_BSTR; InvokeHelper(0x17, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, sFileIndex, pszNewFilePath); return result; } CString CUOArt::GetCustomMulPath(short sFileIndex) { CString result; static BYTE parms[] = VTS_I2; InvokeHelper(0x18, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, sFileIndex); return result; } long CUOArt::GetBkColor(long color) { long result; static BYTE parms[] = VTS_I4; InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms, color); return result; } void CUOArt::SetBkColor(long color, long nNewValue) { static BYTE parms[] = VTS_I4 VTS_I4; InvokeHelper(0x19, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, color, nNewValue); } --- NEW FILE: uoart.h --- /* $Id: uoart.h,v 1.1 2003/07/02 04:13:07 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #ifndef __UOART_CTRL__ #define __UOART_CTRL__ // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. ///////////////////////////////////////////////////////////////////////////// // CUOArt wrapper class class CUOArt : public CWnd { protected: DECLARE_DYNCREATE(CUOArt) public: CLSID const& GetClsid() { static CLSID const clsid = { 0x904f7b3, 0x2339, 0x44c9, { 0x85, 0x7c, 0x6e, 0xb6, 0xcf, 0xef, 0xa3, 0xb6 } }; return clsid; } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } // Attributes public: long GetReadyState(); short GetArtType(); void SetArtType(short); long GetArtIndex(); void SetArtIndex(long); short GetArtColor(); void SetArtColor(short); long GetXOffset(); void SetXOffset(long); long GetYOffset(); void SetYOffset(long); short GetDrawFlags(); void SetDrawFlags(short); // Operations public: void SetObject(short type, long index); void SetOffset(long x, long y); long yScroll(long offset); long xScroll(long offset); void Scroll(long x, long y); void RemovePreviewItems(); void RemovePreviewItem(short ID, short x, short y, short z, short color); void RemovePreviewItemAt(long index); long AddPreviewItem(short ID, short x, short y, short z, short color); long AddHideStatic(short ID, long Block, short x, short y, short z, short color); void RemoveHideStatics(); void RemoveHideStaticAt(long index); void RemoveHideStatic(short ID, long Block, short x, short y, short z, short color); void RedrawControl(); void SetMulPath(LPCTSTR pszNewPath); CString GetMulPath(); BOOL SetCustomMulFile(short sFileIndex, LPCTSTR pszNewFilePath); CString GetCustomMulPath(short sFileIndex); long GetBkColor(long color); void SetBkColor(long color, long nNewValue); }; #endif --- NEW FILE: uomap.cpp --- // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. #include "stdafx.h" #include "uomap.h" ///////////////////////////////////////////////////////////////////////////// // CUOMap IMPLEMENT_DYNCREATE(CUOMap, CWnd) ///////////////////////////////////////////////////////////////////////////// // CUOMap properties long CUOMap::GetReadyState() { long result; GetProperty(DISPID_READYSTATE, VT_I4, (void*)&result); return result; } short CUOMap::GetZoomLevel() { short result; GetProperty(0x1, VT_I2, (void*)&result); return result; } void CUOMap::SetZoomLevel(short propVal) { SetProperty(0x1, VT_I2, propVal); } short CUOMap::GetXCenter() { short result; GetProperty(0x2, VT_I2, (void*)&result); return result; } void CUOMap::SetXCenter(short propVal) { SetProperty(0x2, VT_I2, propVal); } short CUOMap::GetYCenter() { short result; GetProperty(0x3, VT_I2, (void*)&result); return result; } void CUOMap::SetYCenter(short propVal) { SetProperty(0x3, VT_I2, propVal); } BOOL CUOMap::GetDrawStatics() { BOOL result; GetProperty(0x4, VT_BOOL, (void*)&result); return result; } void CUOMap::SetDrawStatics(BOOL propVal) { SetProperty(0x4, VT_BOOL, propVal); } short CUOMap::GetMapFile() { short result; GetProperty(0x5, VT_I2, (void*)&result); return result; } void CUOMap::SetMapFile(short propVal) { SetProperty(0x5, VT_I2, propVal); } ///////////////////////////////////////////////////////////////////////////// // CUOMap operations void CUOMap::ZoomIn() { InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOMap::ZoomOut() { InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOMap::SetCenter(short x, short y) { static BYTE parms[] = VTS_I2 VTS_I2; InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void CUOMap::Scroll(short direction, short distance) { static BYTE parms[] = VTS_I2 VTS_I2; InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, direction, distance); } void CUOMap::CtrlToMap(short* x, short* y) { static BYTE parms[] = VTS_PI2 VTS_PI2; InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void CUOMap::MapToCtrl(short* x, short* y) { static BYTE parms[] = VTS_PI2 VTS_PI2; InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void CUOMap::GetCenter(short* x, short* y) { static BYTE parms[] = VTS_PI2 VTS_PI2; InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } short CUOMap::CtrlToMapX(short x) { short result; static BYTE parms[] = VTS_I2; InvokeHelper(0xd, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; } short CUOMap::CtrlToMapY(short y) { short result; static BYTE parms[] = VTS_I2; InvokeHelper(0xe, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; } short CUOMap::MapToCtrlX(short x) { short result; static BYTE parms[] = VTS_I2; InvokeHelper(0xf, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; } short CUOMap::MapToCtrlY(short y) { short result; static BYTE parms[] = VTS_I2; InvokeHelper(0x10, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; } short CUOMap::GetMapHeight(short x, short y) { short result; static BYTE parms[] = VTS_I2 VTS_I2; InvokeHelper(0x11, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x, y); return result; } long CUOMap::AddDrawObject(short x, short y, short type, short size, long color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; InvokeHelper(0x12, DISPATCH_METHOD, VT_I4, (void*)&result, parms, x, y, type, size, color); return result; } BOOL CUOMap::RemoveDrawObject(short x, short y, short type, short size, long color) { BOOL result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; InvokeHelper(0x13, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, type, size, color); return result; } BOOL CUOMap::RemoveDrawObjectAt(long index) { BOOL result; static BYTE parms[] = VTS_I4; InvokeHelper(0x14, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; } void CUOMap::RemoveDrawObjects() { InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } long CUOMap::AddDrawRect(short xleft, short ytop, short width, short height, short mode, long color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; InvokeHelper(0x16, DISPATCH_METHOD, VT_I4, (void*)&result, parms, xleft, ytop, width, height, mode, color); return result; } void CUOMap::RemoveDrawRects() { InvokeHelper(0x17, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } BOOL CUOMap::RemoveDrawRectAt(long index) { BOOL result; static BYTE parms[] = VTS_I4; InvokeHelper(0x18, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; } BOOL CUOMap::RemoveDrawRect(short x, short y, short width, short height, short mode, long color) { BOOL result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; InvokeHelper(0x19, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, width, height, mode, color); return result; } void CUOMap::SetClientPath(LPCTSTR pszClientPath) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszClientPath); } long CUOMap::GetCenterBlock() { long result; InvokeHelper(0x1b, DISPATCH_METHOD, VT_I4, (void*)&result, NULL); return result; } BOOL CUOMap::SetCustomMulPath(short sFileIndex, LPCTSTR pszFilePath) { BOOL result; static BYTE parms[] = VTS_I2 VTS_BSTR; InvokeHelper(0x1c, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, sFileIndex, pszFilePath); return result; } CString CUOMap::GetCustomMulPath(short sFileIndex) { CString result; static BYTE parms[] = VTS_I2; InvokeHelper(0x1d, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, sFileIndex); return result; } --- NEW FILE: uomap.h --- // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. ///////////////////////////////////////////////////////////////////////////// // CUOMap wrapper class #ifndef __UOMAP_H__ #define __UOMAP_H__ class CUOMap : public CWnd { protected: DECLARE_DYNCREATE(CUOMap) public: CLSID const& GetClsid() { static CLSID const clsid = { 0x2ac21540, 0x4c63, 0x4663, { 0xbf, 0x24, 0xd1, 0xdb, 0xd9, 0x20, 0x52, 0x23 } }; return clsid; } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } // Attributes public: long GetReadyState(); short GetZoomLevel(); void SetZoomLevel(short); short GetXCenter(); void SetXCenter(short); short GetYCenter(); void SetYCenter(short); BOOL GetDrawStatics(); void SetDrawStatics(BOOL); short GetMapFile(); void SetMapFile(short); // Operations public: void ZoomIn(); void ZoomOut(); void SetCenter(short x, short y); void Scroll(short direction, short distance); void CtrlToMap(short* x, short* y); void MapToCtrl(short* x, short* y); void GetCenter(short* x, short* y); short CtrlToMapX(short x); short CtrlToMapY(short y); short MapToCtrlX(short x); short MapToCtrlY(short y); short GetMapHeight(short x, short y); long AddDrawObject(short x, short y, short type, short size, long color); BOOL RemoveDrawObject(short x, short y, short type, short size, long color); BOOL RemoveDrawObjectAt(long index); void RemoveDrawObjects(); long AddDrawRect(short xleft, short ytop, short width, short height, short mode, long color); void RemoveDrawRects(); BOOL RemoveDrawRectAt(long index); BOOL RemoveDrawRect(short x, short y, short width, short height, short mode, long color); void SetClientPath(LPCTSTR pszClientPath); long GetCenterBlock(); BOOL SetCustomMulPath(short sFileIndex, LPCTSTR pszFilePath); CString GetCustomMulPath(short sFileIndex); }; #endif Index: S_ScriptsBase.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** S_ScriptsBase.cpp 1 Jul 2003 14:17:40 -0000 1.3 --- S_ScriptsBase.cpp 2 Jul 2003 04:13:07 -0000 1.4 *************** *** 4,9 **** #include "stdafx.h" #include "S_ScriptsBase.h" ! #include "CDUOArt.h" ! #include "CDUOMap.h" #ifdef _DEBUG --- 4,9 ---- #include "stdafx.h" #include "S_ScriptsBase.h" ! #include "UOArt.h" ! #include "UOMap.h" #ifdef _DEBUG Index: S_ScriptsBase.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.vcproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** S_ScriptsBase.vcproj 1 Jul 2003 14:17:40 -0000 1.10 --- S_ScriptsBase.vcproj 2 Jul 2003 04:13:07 -0000 1.11 *************** *** 21,25 **** Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="..\..\crypto51" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL" MinimalRebuild="TRUE" --- 21,25 ---- Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL" MinimalRebuild="TRUE" *************** *** 68,72 **** InlineFunctionExpansion="1" OmitFramePointers="TRUE" ! AdditionalIncludeDirectories="..\..\crypto51" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL" StringPooling="TRUE" --- 68,72 ---- InlineFunctionExpansion="1" OmitFramePointers="TRUE" ! AdditionalIncludeDirectories="" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL" StringPooling="TRUE" *************** *** 115,124 **** </File> <File - RelativePath="CDUOArt.cpp"> - </File> - <File - RelativePath="CDUOMap.cpp"> - </File> - <File RelativePath="CategorizedScriptBase.cpp"> </File> --- 115,118 ---- *************** *** 183,186 **** --- 177,186 ---- </FileConfiguration> </File> + <File + RelativePath="uoart.cpp"> + </File> + <File + RelativePath="uomap.cpp"> + </File> </Filter> <Filter *************** *** 194,203 **** </File> <File - RelativePath="CDUOArt.h"> - </File> - <File - RelativePath="CDUOMap.h"> - </File> - <File RelativePath="CategorizedScriptBase.h"> </File> --- 194,197 ---- *************** *** 252,255 **** --- 246,255 ---- <File RelativePath="stdafx.h"> + </File> + <File + RelativePath="uoart.h"> + </File> + <File + RelativePath="uomap.h"> </File> </Filter> Index: stdafx.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/stdafx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** stdafx.h 1 Jul 2003 14:17:40 -0000 1.3 --- stdafx.h 2 Jul 2003 04:13:07 -0000 1.4 *************** *** 52,54 **** --- 52,56 ---- #include <afxdisp.h> #include <afxdisp.h> + #include <afxdisp.h> + #include <afxdisp.h> --- CDUOArt.cpp DELETED --- --- CDUOArt.h DELETED --- --- CDUOMap.cpp DELETED --- --- CDUOMap.h DELETED --- |
From: Philip E. <pes...@us...> - 2003-07-02 00:13:34
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv18749/S_Sphere52 Added Files: addvaluedialog.cpp addvaluedialog.h EditFlagsDlg.cpp EditFlagsDlg.h EditValue.cpp EditValue.h MapScriptEditDlg.cpp MapScriptEditDlg.h RegionSelectDlg.cpp RegionSelectDlg.h Log Message: no message --- NEW FILE: addvaluedialog.cpp --- /* $Id: addvaluedialog.cpp,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // AddValueDialog.cpp : implementation file // #include "stdafx.h" #include "AddValueDialog.h" #include "Scripts.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAddValueDialog dialog CAddValueDialog::CAddValueDialog(CWnd* pParent /*=NULL*/) : CDialog(CAddValueDialog::IDD, pParent) { //{{AFX_DATA_INIT(CAddValueDialog) m_csValue = _T(""); //}}AFX_DATA_INIT m_bEnableFilename = false; } void CAddValueDialog::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAddValueDialog) DDX_Text(pDX, IDC_VALUE, m_csValue); DDX_Control(pDX, IDC_FILENAME, m_eFilename); DDX_Control(pDX, IDC_AV_SNAME, m_sName); DDX_Control(pDX, IDC_AV_SFILE, m_sFilename); DDX_Control(pDX, IDC_VALUE, m_eName); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAddValueDialog, CDialog) //{{AFX_MSG_MAP(CAddValueDialog) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAddValueDialog message handlers void CAddValueDialog::OnOK() { UpdateData(true); m_csValue.TrimLeft(); if (m_csValue == _T("")) { AfxMessageBox(locale->String(IDS_ADDVAL_NAME), MB_OK | MB_ICONEXCLAMATION); return; } m_eFilename.GetWindowText(m_csFilename); if ( m_csFilename == _T("") && m_bEnableFilename ) { AfxMessageBox(locale->String(IDS_ADDVAL_FILE), MB_OK | MB_ICONEXCLAMATION); return; } CDialog::OnOK(); } BOOL CAddValueDialog::OnInitDialog() { CDialog::OnInitDialog(); Localize(); if (this->m_csTitle != _T("")) this->SetWindowText(m_csTitle); m_eFilename.EnableWindow(m_bEnableFilename); m_eFilename.SetWindowText(m_csFilename); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CAddValueDialog::Localize(void) { locale->LocalizeWindow(IDD, IDC_FILENAME, (CWnd*)&m_eFilename, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AV_SNAME, (CWnd*)&m_sName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_AV_SFILE, (CWnd*)&m_sFilename, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VALUE, (CWnd*)&m_eName, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); } --- NEW FILE: addvaluedialog.h --- /* $Id: addvaluedialog.h,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #include "afxwin.h" #if !defined(AFX_ADDVALUEDIALOG_H__2ED3EDC4_D825_11D2_A614_004F4905E937__INCLUDED_) #define AFX_ADDVALUEDIALOG_H__2ED3EDC4_D825_11D2_A614_004F4905E937__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // AddValueDialog.h : header file // ///////////////////////////////////////////////////////////////////////////// // CAddValueDialog dialog class CAddValueDialog : public CDialog { // Construction public: CString m_csTitle; CAddValueDialog(CWnd* pParent = NULL); // standard constructor void EnableFilename(bool bEnable) { m_bEnableFilename = bEnable; } CString GetFilename() { return m_csFilename; } void SetFilename(CString csName){ m_csFilename = csName; } // Dialog Data //{{AFX_DATA(CAddValueDialog) enum { IDD = IDD_ADD_VALUE }; CEdit m_eFilename; CString m_csValue; CStatic m_sName; CStatic m_sFilename; CEdit m_eName; CButton m_bOK; CButton m_bCancel; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAddValueDialog) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: bool m_bEnableFilename; CString m_csFilename; // Generated message map functions //{{AFX_MSG(CAddValueDialog) virtual void OnOK(); virtual BOOL OnInitDialog(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ADDVALUEDIALOG_H__2ED3EDC4_D825_11D2_A614_004F4905E937__INCLUDED_) --- NEW FILE: EditFlagsDlg.cpp --- /* $Id: EditFlagsDlg.cpp,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // EditFlagsDlg.cpp : implementation file // #include "stdafx.h" #include "EditFlagsDlg.h" #include "Scripts.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CEditFlagsDlg dialog const TCHAR * DebugFlags[] = { _T("NPC Emotes"), // 0x0001 _T("Stat Advances"), // 0x0002 _T("NPC Motivation"), // 0x0004 _T(""), // 0x0008 _T(""), // 0x0010 _T(""), // 0x0020 _T(""), // 0x0040 _T("New Walk Code"), // 0x0080 }; const TCHAR * LogFlags[] = { _T(""), // 0x0001 _T(""), // 0x0002 _T(""), // 0x0004 _T(""), // 0x0008 _T(""), // 0x0010 _T(""), // 0x0020 _T(""), // 0x0040 _T(""), // 0x0080 _T("Start-Up Messages"), // 0x0100 _T("World Save Status"), // 0x0200 _T("Client login/logout"), // 0x0400 _T("GM Pages"), // 0x0800 _T("Player Speech"), // 0x1000 _T("GM Commands"), // 0x2000 }; const TCHAR * MapFlags[] = { _T("All Magic banned"), // 0x0001 _T("Recall In not allowed"), // 0x0002 _T("Recall Out not allowed"), // 0x0004 _T("Gate not allowed"), // 0x0008 _T("Teleport not allowed"), // 0x0010 _T("Damaging magic not allowed"), // 0x0020 _T("Region is a ship"), // 0x0040 _T("No building allowed"), // 0x0080 _T("Name available globally"), // 0x0100 _T("Announce to all who enter"), // 0x0200 _T("Instant Logout allowed"), // 0x0400 _T("Region is underground or indoors"), // 0x0800 _T("Items don't decay here"), // 0x1000 _T("Region is safe from harm"), // 0x2000 _T("Region is guarded"), // 0x4000 }; CEditFlagsDlg::CEditFlagsDlg(CWnd* pParent /*=NULL*/) : CDialog(CEditFlagsDlg::IDD, pParent) { //{{AFX_DATA_INIT(CEditFlagsDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CEditFlagsDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CEditFlagsDlg) DDX_Control(pDX, IDC_FLAGLIST, m_clbFlagList); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CEditFlagsDlg, CDialog) //{{AFX_MSG_MAP(CEditFlagsDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CEditFlagsDlg message handlers BOOL CEditFlagsDlg::OnInitDialog() { CDialog::OnInitDialog(); Localize(); switch (this->m_iFlagTable ) { case 0: { // Debug Flags for ( int i = 0; i < 8; i++ ) { if ( _tcscmp(DebugFlags[i], _T("") ) != 0 ) { int j = this->m_clbFlagList.AddString(DebugFlags[i]); this->m_clbFlagList.SetItemData(j, (1 << i) ); } } } break; case 1: { // Log Flags for ( int i = 0; i < 14; i++ ) { if ( _tcscmp(LogFlags[i], _T("") ) != 0 ) { int j = this->m_clbFlagList.AddString(LogFlags[i]); this->m_clbFlagList.SetItemData(j, (1 << i) ); } } } break; case 2: { // Map Flags for ( int i = 0; i < 15; i++ ) { if ( _tcscmp(MapFlags[i], _T("") ) != 0 ) { int j = this->m_clbFlagList.AddString(MapFlags[i]); this->m_clbFlagList.SetItemData(j, (1 << i) ); } } } default: break; } this->SetWindowText(m_csCaption); for (int i = 0; i < this->m_clbFlagList.GetCount(); i++ ) { DWORD dwFlag = (DWORD) this->m_clbFlagList.GetItemData( i ); if ( this->m_dwFlags & dwFlag ) this->m_clbFlagList.SetSel( i ); else this->m_clbFlagList.SetSel( i, FALSE ); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CEditFlagsDlg::OnOK() { this->m_dwFlags = 0; int iSelections[32] ; int iSelCount = this->m_clbFlagList.GetSelItems( 32, &iSelections[0] ); for (int i = 0; i < iSelCount; i++ ) this->m_dwFlags |= this->m_clbFlagList.GetItemData( iSelections[i] ); CDialog::OnOK(); } void CEditFlagsDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FLAGLIST, (CWnd*)&m_clbFlagList, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); } --- NEW FILE: EditFlagsDlg.h --- /* $Id: EditFlagsDlg.h,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_EDITFLAGSDLG_H__3FB7DD17_B18B_11D3_A384_00805FD91B8C__INCLUDED_) #define AFX_EDITFLAGSDLG_H__3FB7DD17_B18B_11D3_A384_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // EditFlagsDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CEditFlagsDlg dialog class CEditFlagsDlg : public CDialog { // Construction public: DWORD m_dwFlags; CString m_csCaption; int m_iFlagTable; CEditFlagsDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CEditFlagsDlg) enum { IDD = IDD_EDITFLAGS }; CListBox m_clbFlagList; CButton m_bOK; CButton m_bCancel; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CEditFlagsDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CEditFlagsDlg) virtual BOOL OnInitDialog(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_EDITFLAGSDLG_H__3FB7DD17_B18B_11D3_A384_00805FD91B8C__INCLUDED_) --- NEW FILE: EditValue.cpp --- /* $Id: EditValue.cpp,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // EditValue.cpp : implementation file // #include "stdafx.h" #include "EditValue.h" #include "Scripts.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CEditValueDlg dialog CEditValueDlg::CEditValueDlg(CWnd* pParent /*=NULL*/) : CDialog(CEditValueDlg::IDD, pParent) { //{{AFX_DATA_INIT(CEditValueDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CEditValueDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CEditValueDlg) DDX_Control(pDX, IDC_VALUEENABLED, m_cbEnabled); DDX_Control(pDX, IDC_TEXTVALUE, m_ceTextValue); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CEditValueDlg, CDialog) //{{AFX_MSG_MAP(CEditValueDlg) ON_BN_CLICKED(IDC_VALUEENABLED, OnValueenabled) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CEditValueDlg message handlers void CEditValueDlg::OnValueenabled() { UpdateData( TRUE ); if ( this->m_cbEnabled.GetCheck() == 0 ) this->m_cbEnabled.SetWindowText(locale->String(IDS_FALSE)); else this->m_cbEnabled.SetWindowText(locale->String(IDS_TRUE)); } BOOL CEditValueDlg::OnInitDialog() { CDialog::OnInitDialog(); Localize(); this->m_cbEnabled.ShowWindow( m_bTextMode ? SW_HIDE : SW_SHOW ); this->m_ceTextValue.ShowWindow( m_bTextMode ? SW_SHOW : SW_HIDE ); this->m_cbEnabled.SetCheck( m_bEnabled ); this->m_ceTextValue.SetWindowText( m_csTextValue ); if ( this->m_bEnabled ) this->m_cbEnabled.SetWindowText(locale->String(IDS_TRUE)); this->SetWindowText( this->m_csCaption ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CEditValueDlg::OnOK() { // TODO: Add extra validation here this->m_bEnabled = this->m_cbEnabled.GetCheck() == 0 ? false : true; this->m_ceTextValue.GetWindowText( this->m_csTextValue ); CDialog::OnOK(); } void CEditValueDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VALUEENABLED, (CWnd*)&m_cbEnabled, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_TEXTVALUE, (CWnd*)&m_ceTextValue, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); } --- NEW FILE: EditValue.h --- /* $Id: EditValue.h,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #if !defined(AFX_EDITVALUE_H__3FB7DD16_B18B_11D3_A384_00805FD91B8C__INCLUDED_) #define AFX_EDITVALUE_H__3FB7DD16_B18B_11D3_A384_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // EditValue.h : header file // ///////////////////////////////////////////////////////////////////////////// // CEditValueDlg dialog class CEditValueDlg : public CDialog { // Construction public: CString m_csCaption; CString m_csTextValue; bool m_bEnabled; bool m_bTextMode; CEditValueDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CEditValueDlg) enum { IDD = IDD_EDITVALUE }; CButton m_cbEnabled; CEdit m_ceTextValue; CButton m_bOK; CButton m_bCancel; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CEditValueDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CEditValueDlg) afx_msg void OnValueenabled(); virtual BOOL OnInitDialog(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_EDITVALUE_H__3FB7DD16_B18B_11D3_A384_00805FD91B8C__INCLUDED_) --- NEW FILE: MapScriptEditDlg.cpp --- /* $Id: MapScriptEditDlg.cpp,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * [...1375 lines suppressed...] locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_cbCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ZOOMOUT, (CWnd*)&m_csZoomOut, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_ZOOMIN, (CWnd*)&m_csZoomIn, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_SETPOINT, (CWnd*)&m_cbSetPoint, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_REMOVERECT, (CWnd*)&m_cbRemoveRect, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWROOM, (CWnd*)&m_cbNewRoom, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_NEWAREA, (CWnd*)&m_cbNewArea, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MOVEUP, (CWnd*)&m_cbMoveUp, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MOVEDOWN, (CWnd*)&m_cbMoveDown, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOCATEAREA, (CWnd*)&m_cbLocateArea, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_LOCATEROOM, (CWnd*)&m_cbLocateRoom, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_REGIONRECTLIST, (CWnd*)&m_clbRectList, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_REGIONTREE, (CWnd*)&m_ctcRegionTree, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MAPVALS, (CWnd*)&m_clcValues, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_DRAWRECTS, (CWnd*)&m_cbDrawRects, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_CURSORCOORDS, (CWnd*)&m_csCursor, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MAPCENTER, (CWnd*)&m_csCoords, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_MAPDISPLAY, (CWnd*)&m_map, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_VERSION, (CWnd*)&m_ccbVersion, (CWnd*)this); } --- NEW FILE: MapScriptEditDlg.h --- /* $Id: MapScriptEditDlg.h,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ //{{AFX_INCLUDES() #include "CDUOMap.h" //}}AFX_INCLUDES #if !defined(AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_) #define AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "area.h" #include <afxwin.h> #include <afxcmn.h> #include <string> using namespace std; #include "Scripts.h" // MapScriptEditDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMapScriptEditDlg dialog class CMapScriptEditDlg : public CDialog { // Construction public: bool m_bIsActive; void PopulateTreeView(HTREEITEM hItem, CArea *pArea); int m_dragRect; int m_button; int m_yOffset; int m_xOffset; WORD m_wFlags; CPoint m_pUOBottomRight; CPoint m_pUOTopLeft; CRect m_crRegion; CPoint m_pBottomRight; CPoint m_pTopLeft; void LoadMap(); CByteArray m_bMapArray; DWORD m_dwColorMap[65536]; virtual ~CMapScriptEditDlg(); CMapScriptEditDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CMapScriptEditDlg) enum { IDD = IDD_EDITGRAYMAP_DLG }; CStatic m_csPlane; CStatic m_csVals; CStatic m_csBR; CButton m_cbOK; CButton m_cbCancel; CStatic m_csZoomOut; CStatic m_csZoomIn; CButton m_cbSetPoint; CButton m_cbRemoveRect; CButton m_cbNewRoom; CButton m_cbNewArea; CButton m_cbMoveUp; CButton m_cbMoveDown; CButton m_cbLocateArea; CButton m_cbLocateRoom; CListBox m_clbRectList; CTreeCtrl m_ctcRegionTree; CListCtrl m_clcValues; CButton m_cbDrawRects; CStatic m_csCursor; CStatic m_csCoords; CDUOMap m_map; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMapScriptEditDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam); //}}AFX_VIRTUAL // Implementation protected: void GetRects(); bool m_bSearching; CArea * SetCustomArea(CArea * pArea); void DisplayValues(CArea * pArea); void GetFlags(); void SetFlags(); int m_iMapPlane; string m_sLastCustomFile; CRect m_rOK; CRect m_rCancel; CRect m_rZoomOut; CRect m_rZoomIn; CRect m_rSetPoint; CRect m_rRemoveRect; CRect m_rNewRoom; CRect m_rNewArea; CRect m_rMoveUp; CRect m_rMoveDown; CRect m_rLocateArea; CRect m_rLocateRoom; CRect m_rRectList; CRect m_rRegionTree; CRect m_rValues; CRect m_rDrawRects; CRect m_rCursor; CRect m_rCoords; CRect m_rMap; CRect m_rWindow; CRect m_rBR; CRect m_rVals; // Generated message map functions //{{AFX_MSG(CMapScriptEditDlg) virtual BOOL OnInitDialog(); afx_msg void OnSelchangedRegiontree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnEndlabeleditRegiontree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnKeydownRegiontree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnNewroom(); afx_msg void OnNewarea(); virtual void OnOK(); virtual void OnCancel(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnSetpoint(); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnRemoverect(); afx_msg void OnDblclkMapvals(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnLocatearea(); afx_msg void OnLocateroom(); afx_msg void OnMoveup(); afx_msg void OnMovedown(); afx_msg void OnZoomin(); afx_msg void OnZoomout(); afx_msg void OnMouseDownMapdisplay(short Button, short Shift, long x, long y); afx_msg void OnMouseMoveMapdisplay(short Button, short Shift, long x, long y); afx_msg void OnMouseUpMapdisplay(short Button, short Shift, long x, long y); afx_msg void OnSize(UINT nType, int cx, int cy); DECLARE_EVENTSINK_MAP() //}}AFX_MSG DECLARE_MESSAGE_MAP() public: CComboBox m_ccbVersion; afx_msg void OnCbnSelchangeVersion(); protected: void FillValues(void); public: void Localize(void); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MAPSCRIPTEDITDLG_H__98315981_0270_11D3_8716_00805FD91B8C__INCLUDED_) --- NEW FILE: RegionSelectDlg.cpp --- /* $Id: RegionSelectDlg.cpp,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ // RegionSelectDlg.cpp : implementation file // #include "stdafx.h" #include "RegionSelectDlg.h" #include "Scripts.h" // CRegionSelectDlg dialog IMPLEMENT_DYNAMIC(CRegionSelectDlg, CDialog) CRegionSelectDlg::CRegionSelectDlg(CWnd* pParent /*=NULL*/) : CDialog(CRegionSelectDlg::IDD, pParent) , m_iType(0) , m_iSelCount(0) , m_iSelections(NULL) { } CRegionSelectDlg::~CRegionSelectDlg() { } void CRegionSelectDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_REGION_LIST, m_lbRegions); DDX_Control(pDX, IDC_REGION_DETAILS, m_eScript); DDX_Control(pDX, IDOK, m_bOK); DDX_Control(pDX, IDCANCEL, m_bCancel); DDX_Control(pDX, IDC_RSD_STATIC1, m_sStatic1); DDX_Control(pDX, IDC_RSD_STATIC2, m_sStatic2); } BEGIN_MESSAGE_MAP(CRegionSelectDlg, CDialog) ON_LBN_SELCHANGE(IDC_REGION_LIST, OnLbnSelchangeRegionList) ON_WM_LBUTTONDOWN() ON_BN_CLICKED(IDOK, OnBnClickedOk) END_MESSAGE_MAP() // CRegionSelectDlg message handlers BOOL CRegionSelectDlg::OnInitDialog() { CWaitCursor hourglass; CDialog::OnInitDialog(); Localize(); // Populate the resource list PopulateResourceList(); return TRUE; } int CRegionSelectDlg::RegionType(void) { return m_iType; } void CRegionSelectDlg::RegionType(int type) { m_iType = type; } void CRegionSelectDlg::PopulateResourceList(void) { CScriptArray<CScriptBase*> * pArray; switch ( m_iType ) { case 0: pArray = &Main->m_pScripts->m_aRegionTypes; break; case 1: pArray = &Main->m_pScripts->m_aRegionResourceTypes; break; } for ( int i = 0; i < (int) pArray->GetSize(); i++ ) { CScriptBase * pRes = pArray->GetAt(i); int index = m_lbRegions.AddString(pRes->m_csValue); m_lbRegions.SetItemDataPtr(index, (void *) pRes); } // Parse the selection string and select the list box entry corresponding to the string m_lbRegions.SelItemRange(FALSE, 0, -1); string::iterator c = m_sSelections.begin(); string s; while ( c != m_sSelections.end() ) { if ( *c != ',' ) if ( *c != ' ' ) s += *c; else { SelectString(s.c_str()); s.erase(s.begin(), s.end()); } c++; } SelectString(s.c_str()); } void CRegionSelectDlg::OnLbnSelchangeRegionList() { // Find out what the most recently selected item is m_eScript.Clear(); int iSelCount = m_lbRegions.GetSelCount(); if ( iSelCount < 1 ) { delete m_iSelections; m_iSelections = NULL; return; } int * iSelections = new int [iSelCount]; m_lbRegions.GetSelItems(iSelCount, iSelections); int iItem = -1; for ( int i = 0; i < iSelCount; i++ ) { bool bOld = false; for ( int j = 0; j < m_iSelCount; j++ ) { if ( iSelections[i] == m_iSelections[j] ) { bOld = true; break; } } if ( !bOld ) { iItem = iSelections[i]; break; } } if ( iItem != -1 ) { CScriptBase * pObject = (CScriptBase *) m_lbRegions.GetItemDataPtr(iItem); if ( pObject ) { // Load the resource so we can display its script CStringBlock script; script.CopyBase(pObject); script.Load(_T("RESOURCE ")); string sValue; for ( int i = 0; i < script.GetSize(); i++ ) { sValue.append((LPCTSTR) script.GetAt(i)); sValue += 0x0d; sValue += 0x0a; } m_eScript.SetWindowText(sValue.c_str()); } } delete [] m_iSelections; m_iSelections = iSelections; m_iSelCount = iSelCount; } void CRegionSelectDlg::OnLButtonDown(UINT nFlags, CPoint point) { CDialog::OnLButtonDown(nFlags, point); } void CRegionSelectDlg::OnBnClickedOk() { // Update the selection string m_sSelections.erase(m_sSelections.begin(), m_sSelections.end()); for ( int i = 0; i < m_lbRegions.GetCount(); i++ ) { if ( m_lbRegions.GetSel(i) ) { CString csValue; m_lbRegions.GetText(i, csValue); if ( !m_sSelections.empty() ) m_sSelections.append(_T(", ")); m_sSelections.append((LPCTSTR) csValue); } } OnOK(); } void CRegionSelectDlg::SelectString(const TCHAR * pszText) { for ( int i = 0; i < m_lbRegions.GetCount(); i++ ) { CString csVal; m_lbRegions.GetText(i, csVal); if ( _tcscmp(pszText, (LPCTSTR) csVal) == 0 ) { m_lbRegions.SetSel(i, TRUE); return; } } } void CRegionSelectDlg::Localize(void) { locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_REGION_LIST, (CWnd*)&m_lbRegions, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_REGION_DETAILS, (CWnd*)&m_eScript, (CWnd*)this); locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bOK, (CWnd*)this); locale->LocalizeWindow(IDD, IDCANCEL, (CWnd*)&m_bCancel, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_RSD_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_RSD_STATIC2, (CWnd*)&m_sStatic2, (CWnd*)this); } --- NEW FILE: RegionSelectDlg.h --- /* $Id: RegionSelectDlg.h,v 1.1 2003/07/02 00:13:30 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #pragma once #include "afxwin.h" #include <string> using namespace std; // CRegionSelectDlg dialog class CRegionSelectDlg : public CDialog { DECLARE_DYNAMIC(CRegionSelectDlg) public: CRegionSelectDlg(CWnd* pParent = NULL); // standard constructor virtual ~CRegionSelectDlg(); // Dialog Data enum { IDD = IDD_REGIONSELECTDLG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() public: CListBox m_lbRegions; CEdit m_eScript; CButton m_bOK; CButton m_bCancel; CStatic m_sStatic1; CStatic m_sStatic2; virtual BOOL OnInitDialog(); protected: int m_iType; int * m_iSelections; int m_iSelCount; public: int RegionType(void); void RegionType(int type); void PopulateResourceList(void); void Selections(string s){m_sSelections.assign(s);} string Selections(){return m_sSelections;} afx_msg void OnLbnSelchangeRegionList(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); protected: string m_sSelections; public: afx_msg void OnBnClickedOk(); protected: void SelectString(const TCHAR * pszText); public: void Localize(void); }; |
From: Philip E. <pes...@us...> - 2003-07-02 00:13:33
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv18749/S_ScriptsBase Added Files: CDUOArt.cpp CDUOArt.h CDUOMap.cpp CDUOMap.h Log Message: no message --- NEW FILE: CDUOArt.cpp --- // CDUOArt.cpp : Definition of ActiveX Control wrapper class(es) created by Microsoft Visual C++ #include "stdafx.h" #include "CDUOArt.h" ///////////////////////////////////////////////////////////////////////////// // CDUOArt IMPLEMENT_DYNCREATE(CDUOArt, CWnd) // CDUOArt properties // CDUOArt operations --- NEW FILE: CDUOArt.h --- // CDUOArt.h : Declaration of ActiveX Control wrapper class(es) created by Microsoft Visual C++ #pragma once ///////////////////////////////////////////////////////////////////////////// // CDUOArt class CDUOArt : public CWnd { protected: DECLARE_DYNCREATE(CDUOArt) public: CLSID const& GetClsid() { static CLSID const clsid = { 0x42509308, 0x9EA0, 0x4603, { 0x92, 0x2E, 0xF1, 0xAC, 0x67, 0xFF, 0x6F, 0x4A } }; return clsid; } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } // Attributes public: // Operations public: void SetObject(short type, long index) { static BYTE parms[] = VTS_I2 VTS_I4 ; InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms, type, index); } void SetOffset(long x, long y) { static BYTE parms[] = VTS_I4 VTS_I4 ; InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } long yScroll(long offset) { long result; static BYTE parms[] = VTS_I4 ; InvokeHelper(0x9, DISPATCH_METHOD, VT_I4, (void*)&result, parms, offset); return result; } long xScroll(long offset) { long result; static BYTE parms[] = VTS_I4 ; InvokeHelper(0xa, DISPATCH_METHOD, VT_I4, (void*)&result, parms, offset); return result; } void Scroll(long x, long y) { static BYTE parms[] = VTS_I4 VTS_I4 ; InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void RemovePreviewItems() { InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void RemovePreviewItem(short ID, short x, short y, short z, short color) { static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 ; InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ID, x, y, z, color); } void RemovePreviewItemAt(long index) { static BYTE parms[] = VTS_I4 ; InvokeHelper(0xe, DISPATCH_METHOD, VT_EMPTY, NULL, parms, index); } long AddPreviewItem(short ID, short x, short y, short z, short color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 ; InvokeHelper(0xf, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ID, x, y, z, color); return result; } long AddHideStatic(short ID, long Block, short x, short y, short z, short color) { long result; static BYTE parms[] = VTS_I2 VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2 ; InvokeHelper(0x10, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ID, Block, x, y, z, color); return result; } void RemoveHideStatics() { InvokeHelper(0x11, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void RemoveHideStaticAt(long index) { static BYTE parms[] = VTS_I4 ; InvokeHelper(0x12, DISPATCH_METHOD, VT_EMPTY, NULL, parms, index); } void RemoveHideStatic(short ID, long Block, short x, short y, short z, short color) { static BYTE parms[] = VTS_I2 VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2 ; InvokeHelper(0x13, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ID, Block, x, y, z, color); } void RedrawControl() { InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void SetMulPath(LPCTSTR pszNewPath) { static BYTE parms[] = VTS_BSTR ; InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszNewPath); } CString GetMulPath() { CString result; InvokeHelper(0x16, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); return result; } BOOL SetCustomMulFile(short sFileIndex, LPCTSTR pszNewFilePath) { BOOL result; static BYTE parms[] = VTS_I2 VTS_BSTR ; InvokeHelper(0x17, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, sFileIndex, pszNewFilePath); return result; } CString GetCustomMulPath(short sFileIndex) { CString result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0x18, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, sFileIndex); return result; } long get_BkColor(long color) { long result; static BYTE parms[] = VTS_I4 ; InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms, color); return result; } void put_BkColor(long color, long newValue) { static BYTE parms[] = VTS_I4 VTS_I4 ; InvokeHelper(0x19, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, color, newValue); } }; --- NEW FILE: CDUOMap.cpp --- // CDUOMap.cpp : Definition of ActiveX Control wrapper class(es) created by Microsoft Visual C++ #include "stdafx.h" #include "CDUOMap.h" ///////////////////////////////////////////////////////////////////////////// // CDUOMap IMPLEMENT_DYNCREATE(CDUOMap, CWnd) // CDUOMap properties // CDUOMap operations --- NEW FILE: CDUOMap.h --- // CDUOMap.h : Declaration of ActiveX Control wrapper class(es) created by Microsoft Visual C++ #pragma once ///////////////////////////////////////////////////////////////////////////// // CDUOMap class CDUOMap : public CWnd { protected: DECLARE_DYNCREATE(CDUOMap) public: CLSID const& GetClsid() { static CLSID const clsid = { 0x2AC21540, 0x4C63, 0x4663, { 0xBF, 0x24, 0xD1, 0xDB, 0xD9, 0x20, 0x52, 0x23 } }; return clsid; } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } // Attributes public: // Operations public: void ZoomIn() { InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void ZoomOut() { InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void SetCenter(short x, short y) { static BYTE parms[] = VTS_I2 VTS_I2 ; InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void Scroll(short direction, short distance) { static BYTE parms[] = VTS_I2 VTS_I2 ; InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, direction, distance); } void CtrlToMap(short * x, short * y) { static BYTE parms[] = VTS_PI2 VTS_PI2 ; InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void MapToCtrl(short * x, short * y) { static BYTE parms[] = VTS_PI2 VTS_PI2 ; InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } void GetCenter(short * x, short * y) { static BYTE parms[] = VTS_PI2 VTS_PI2 ; InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } short CtrlToMapX(short x) { short result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0xd, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; } short CtrlToMapY(short y) { short result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0xe, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; } short MapToCtrlX(short x) { short result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0xf, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; } short MapToCtrlY(short y) { short result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0x10, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; } short GetMapHeight(short x, short y) { short result; static BYTE parms[] = VTS_I2 VTS_I2 ; InvokeHelper(0x11, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x, y); return result; } long AddDrawObject(short x, short y, short type, short size, long color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4 ; InvokeHelper(0x12, DISPATCH_METHOD, VT_I4, (void*)&result, parms, x, y, type, size, color); return result; } BOOL RemoveDrawObject(short x, short y, short type, short size, long color) { BOOL result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4 ; InvokeHelper(0x13, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, type, size, color); return result; } BOOL RemoveDrawObjectAt(long index) { BOOL result; static BYTE parms[] = VTS_I4 ; InvokeHelper(0x14, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; } void RemoveDrawObjects() { InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } long AddDrawRect(short xleft, short ytop, short width, short height, short mode, long color) { long result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4 ; InvokeHelper(0x16, DISPATCH_METHOD, VT_I4, (void*)&result, parms, xleft, ytop, width, height, mode, color); return result; } void RemoveDrawRects() { InvokeHelper(0x17, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } BOOL RemoveDrawRectAt(long index) { BOOL result; static BYTE parms[] = VTS_I4 ; InvokeHelper(0x18, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; } BOOL RemoveDrawRect(short x, short y, short width, short height, short mode, long color) { BOOL result; static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4 ; InvokeHelper(0x19, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, width, height, mode, color); return result; } void SetClientPath(LPCTSTR pszClientPath) { static BYTE parms[] = VTS_BSTR ; InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszClientPath); } long GetCenterBlock() { long result; InvokeHelper(0x1b, DISPATCH_METHOD, VT_I4, (void*)&result, NULL); return result; } BOOL SetCustomMulPath(short sFileIndex, LPCTSTR pszFilePath) { BOOL result; static BYTE parms[] = VTS_I2 VTS_BSTR ; InvokeHelper(0x1c, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, sFileIndex, pszFilePath); return result; } CString GetCustomMulPath(short sFileIndex) { CString result; static BYTE parms[] = VTS_I2 ; InvokeHelper(0x1d, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, sFileIndex); return result; } }; |
From: Philip E. <pes...@us...> - 2003-07-01 14:19:05
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv18040/S_ScriptsBase Modified Files: S_ScriptsBase.cpp S_ScriptsBase.vcproj stdafx.h Log Message: no message Index: S_ScriptsBase.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** S_ScriptsBase.cpp 23 May 2003 05:46:26 -0000 1.2 --- S_ScriptsBase.cpp 1 Jul 2003 14:17:40 -0000 1.3 *************** *** 4,7 **** --- 4,9 ---- #include "stdafx.h" #include "S_ScriptsBase.h" + #include "CDUOArt.h" + #include "CDUOMap.h" #ifdef _DEBUG Index: S_ScriptsBase.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.vcproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** S_ScriptsBase.vcproj 19 Jun 2003 21:38:29 -0000 1.9 --- S_ScriptsBase.vcproj 1 Jul 2003 14:17:40 -0000 1.10 *************** *** 115,118 **** --- 115,124 ---- </File> <File + RelativePath="CDUOArt.cpp"> + </File> + <File + RelativePath="CDUOMap.cpp"> + </File> + <File RelativePath="CategorizedScriptBase.cpp"> </File> *************** *** 186,189 **** --- 192,201 ---- <File RelativePath="AxisLibWrapper.h"> + </File> + <File + RelativePath="CDUOArt.h"> + </File> + <File + RelativePath="CDUOMap.h"> </File> <File Index: stdafx.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/stdafx.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** stdafx.h 23 May 2003 05:46:27 -0000 1.2 --- stdafx.h 1 Jul 2003 14:17:40 -0000 1.3 *************** *** 50,52 **** --- 50,54 ---- #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT + #include <afxdisp.h> + #include <afxdisp.h> |
From: Philip E. <pes...@us...> - 2003-07-01 14:18:16
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv18040 Modified Files: bugs.txt roofing.txt todo.txt Axis COM.doc Log Message: no message Index: bugs.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/bugs.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** bugs.txt 30 Jul 2002 22:01:18 -0000 1.4 --- bugs.txt 1 Jul 2003 14:17:39 -0000 1.5 *************** *** 22,34 **** */ - · Full paths specified in linux versions don't get read properly by Axis. (fixed 0.13) · Travel locations show up twice (0.51a only?) -- can't reproduce this - · too many characters sent through remote console cause disconnect. (fixed 0.13) · sphere.ini not being read correctly for 0.51a? -- more information? - · can't search on ID number in item/npc windows (fixed 0.13) - · custom locations not being saved correctly (fixed 0.13) · loading spawns sometimes crashes axissvr. -- need a worldfile that causes this problem in order to reproduce and fix - · raw text editor doesn't work remotely (fixed 0.13) - · remote Account manager can't find account file (fixed 0.13) · map script editor doesn't work for 55i, and possibly not even 0.51a. --- 22,28 ---- Index: roofing.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/roofing.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** roofing.txt 29 May 2002 16:44:34 -0000 1.1 --- roofing.txt 1 Jul 2003 14:17:39 -0000 1.2 *************** *** 11,18 **** had the patience to type in. ! To install it, simply copy the axis.exe and rooftiles.cfg found in the ! archive to your Axis directory. If you want to be able to go back to ! regular Axis you should make a backup of axis.exe first. When you run ! the modified Axis you will find a Roofing button on the Misc page. Clicking this button opens the Roofing dialog. There you define the roof that you want generated by specifying rectangular parts. T or X --- 11,15 ---- had the patience to type in. ! In Axis you will find a Roofing button on the Misc page. Clicking this button opens the Roofing dialog. There you define the roof that you want generated by specifying rectangular parts. T or X Index: todo.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/todo.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** todo.txt 12 Jun 2003 03:15:34 -0000 1.11 --- todo.txt 1 Jul 2003 14:17:39 -0000 1.12 *************** *** 47,55 **** I think it'd be great to have an option somewhere in axissvr config to determine what files to send remotely. IE, the "job*" files aren't really used by Axis, are they? (if they are.. oops on my part.) Maybe a sort of [ignore] section in axis cfg file that lets us enter directories to say which directories *not* to send out of? ! Include the 2 ActiveX controls Work on either removing the map editor, or fixing it up Show/Hide buttons on the remote console window Allow for re-ordering of the custom buttons. ! Show multis on the map windows. Nuke Region command. Or .nuke XXXXX --- 47,56 ---- I think it'd be great to have an option somewhere in axissvr config to determine what files to send remotely. IE, the "job*" files aren't really used by Axis, are they? (if they are.. oops on my part.) Maybe a sort of [ignore] section in axis cfg file that lets us enter directories to say which directories *not* to send out of? ! Include the 2 ActiveX controls - done Work on either removing the map editor, or fixing it up Show/Hide buttons on the remote console window Allow for re-ordering of the custom buttons. ! Show multis on the map windows. We can only really do this if we are running ! on the same machine as Sphere. Nuke Region command. Or .nuke XXXXX *************** *** 66,70 **** Put UOMap control in the Map Script editor - done Put the UOArt control in the Item tab and script editor. ! Install shield setup wizard. - done Use progress dialog for the patch save, patch apply, and worldfile clean functions - done Create an import file for former static objects - done --- 67,71 ---- Put UOMap control in the Map Script editor - done Put the UOArt control in the Item tab and script editor. ! Install shield setup wizard. - done, but removed. Now usins NSIS. Use progress dialog for the patch save, patch apply, and worldfile clean functions - done Create an import file for former static objects - done ***** Bogus filespec: Axis |
From: Philip E. <pes...@us...> - 2003-07-01 14:18:16
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv18040/S_Sphere52 Modified Files: ConfigFile.cpp Resource.h S_Sphere52.rc S_Sphere52.vcproj ScriptsMain.cpp ScriptsMain.h strings.h Log Message: no message Index: ConfigFile.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ConfigFile.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ConfigFile.cpp 5 Jun 2003 14:49:53 -0000 1.3 --- ConfigFile.cpp 1 Jul 2003 14:17:40 -0000 1.4 *************** *** 4,8 **** #include "Scripts.h" ! #define GRAY_MAIN_SERVER "menace.ne.mediaone.net" #define GRAY_GAME_SERVER #define GRAY_LOG_SERVER --- 4,8 ---- #include "Scripts.h" ! #define GRAY_MAIN_SERVER "list.sphereserver.net" #define GRAY_GAME_SERVER #define GRAY_LOG_SERVER Index: Resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Resource.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Resource.h 12 Jun 2003 23:27:01 -0000 1.3 --- Resource.h 1 Jul 2003 14:17:40 -0000 1.4 *************** *** 5,9 **** --- 5,19 ---- #define IDS_PROJNAME 100 #define IDR_S_SPHERE52 101 + #define IDD_REGIONSELECTDLG 102 #define IDR_SCRIPTS 103 + #define IDD_ADD_DESTINATION 145 + #define IDD_ADD_VALUE 146 + #define IDD_ITEMEDIT 149 + #define IDD_NPCEDIT_DLG 151 + #define IDD_EDITSKILL_DLG 152 + #define IDD_EDITGRAYMAP_DLG 162 + #define IDD_ORE_EDIT_DLG 177 + #define IDD_EDITVALUE 182 + #define IDD_EDITFLAGS 183 #define IDD_FILEREAD_PROGRESS 201 #define IDC_STATUS_MESSAGE 201 *************** *** 43,46 **** --- 53,251 ---- #define IDC_PROFILE_SAVE 231 #define IDC_PROFILE_DISCARD 232 + #define IDC_TRIGEDIT 1001 + #define IDC_NPCATTRADD 1001 + #define IDC_OREADD 1001 + #define IDC_NEWAREA 1001 + #define IDC_NPCATTRREMOVE 1002 + #define IDC_OREREMOVE 1002 + #define IDC_NEWROOM 1002 + #define IDC_IEPALETTE 1003 + #define IDC_NEWNPC 1003 + #define IDC_SETPOINT 1003 + #define IDC_ITEM_NEW 1004 + #define IDC_EDITNPC 1004 + #define IDC_REMOVERECT 1004 + #define IDC_ITEM_EDIT 1005 + #define IDC_APPLYNPCEDITS 1005 + #define IDC_LOCATEAREA 1005 + #define IDC_ITEM_APPLY 1006 + #define IDC_CANCELNPCEDITS 1006 + #define IDC_LOCATEROOM 1006 + #define IDC_ITEM_CANCEL 1007 + #define IDC_NPCADDCATEGORY 1007 + #define IDC_NPCPALETTE 1008 + #define IDC_MOVEUP 1008 + #define IDC_NPCADDSUBSECTION 1009 + #define IDC_MOVEDOWN 1009 + #define IDC_NPCATTRLIST 1031 + #define IDC_ORELIST 1031 + #define IDC_REGIONRECTLIST 1031 + #define IDC_REGION_LIST 1031 + #define IDC_FLAGLIST 1031 + #define IDC_NPCATTRSELECTION 1032 + #define IDC_MAPVALS 1032 + #define IDC_DYEABLE 1033 + #define IDC_NPCATTRCHOICES 1033 + #define IDC_REPAIRABLE 1034 + #define IDC_DRAWRECTS 1034 + #define IDC_MAGICAL 1035 + #define IDC_NPCNOINDEX 1035 + #define IDC_NOINDEX 1036 + #define IDC_TRIGGERS 1059 + #define IDC_NPCNAME 1059 + #define IDC_ORENAME 1059 + #define IDC_SKILLNAME 1059 + #define IDC_TEXTVALUE 1059 + #define IDC_NPCDEFNAME 1060 + #define IDC_ORECOLOUR 1060 + #define IDC_SKILL_MIN 1060 + #define IDC_REGION_DETAILS 1060 + #define IDC_COLORCOMBO 1061 + #define IDC_SKILLS 1061 + #define IDC_ORESKILL 1061 + #define IDC_VERSION 1061 + #define IDC_SKILL_MAX 1061 + #define IDC_FILENAME 1061 + #define IDC_ITEMTYPE 1062 + #define IDC_NPCDESIRES 1062 + #define IDC_ORECHANCE 1062 + #define IDC_BUYVALUE 1063 + #define IDC_NPCSPEECH 1063 + #define IDC_OREMIN 1063 + #define IDC_SELLVALUE 1064 + #define IDC_NPCEVENTS 1064 + #define IDC_OREMAX 1064 + #define IDC_WEIGHT 1065 + #define IDC_OREINGOT 1065 + #define IDC_HPMIN 1066 + #define IDC_HPMAX 1067 + #define IDC_BUYVALUEMAX 1068 + #define IDC_SELLVALUEMAX 1069 + #define IDC_ITEMID 1151 + #define IDC_NAME 1158 + #define IDC_XCOORD 1167 + #define IDC_YCOORD 1168 + #define IDC_ZCOORD 1169 + #define IDC_PLANE 1170 + #define IDC_CATEGORY 1171 + #define IDC_SUBSECTION 1172 + #define IDC_DESCRIPTION 1173 + #define IDC_ADD_CATEGORY 1174 + #define IDC_ADD_SUBSECTION 1175 + #define IDC_VALUE 1176 + #define IDC_SKILL 1189 + #define IDC_DAMAGEMIN 1190 + #define IDC_DAMAGEMAX 1191 + #define IDC_ARMOURMIN 1192 + #define IDC_ARMOURMAX 1193 + #define IDC_REQSTR 1194 + #define IDC_SPELLID 1196 + #define IDC_CHARGES 1197 + #define IDC_ARMOURBONUS 1198 + #define IDC_EI_SBASE 1202 + #define IDC_ADDCATEGORY 1203 + #define IDC_ADDSUBSECTION 1204 + #define IDC_DUPEITEM 1207 + #define IDC_NPCICON 1210 + #define IDC_NPCCATEGORY 1221 + #define IDC_NPCSUBSECTION 1222 + #define IDC_REGIONTREE 1243 + #define IDC_MAPCENTER 1246 + #define IDC_CURSORCOORDS 1247 + #define IDC_VALUEENABLED 1287 + #define IDC_NPCATTRAMOUNT 1334 + #define IDC_NPCENTRY 1335 + #define IDC_NPCATTRIBUTES 1337 + #define IDC_NPCNAMEINDEX 1339 + #define IDC_NPCSOUND 1340 + #define IDC_NPCBASEID 1341 + #define IDC_NPCOLOUR 1342 + #define IDC_NPCATTRCATS 1343 + #define IDC_NPCBRAIN 1345 + #define IDC_NPCEDITDESCRIPTION 1347 + #define IDC_NPCIMAGE 1348 + #define IDC_NPCDISABLEDISPLAY 1349 + #define IDC_ITEMENTRY 1351 + #define IDC_ITEMDISPLAY 1352 + #define IDC_ZOOMOUT 1379 + #define IDC_ZOOMIN 1380 + #define IDC_MAPDISPLAY 1391 + #define IDC_STATIC_BR 1426 + #define IDC_STATIC_VALS 1427 + #define IDC_ACD_SCAT 1490 + #define IDC_ADC_SSUB 1491 + #define IDC_ADC_SDES 1492 + #define IDC_ADC_SX 1493 + #define IDC_ADC_SY 1494 + #define IDC_ADC_SZ 1495 + #define IDC_ADC_SP 1496 + #define IDC_AV_SNAME 1497 + #define IDC_AV_SFILE 1498 + #define IDC_EI_SENTRY 1499 + #define IDC_EI_SDUPE 1500 + #define IDC_EI_SNAME 1501 + #define IDC_EI_STYPE 1502 + #define IDC_EI_SCOLOR 1503 + #define IDC_EI_SBUY 1504 + #define IDC_EI_SSELL 1505 + #define IDC_EI_SWEIGHT 1506 + #define IDC_EI_SHP 1507 + #define IDC_EI_GATTR 1508 + #define IDC_EI_GCLASS 1509 + #define IDC_EI_GMAGIC 1510 + #define IDC_EI_SSKILL 1511 + #define IDC_EI_SDAMAGE 1512 + #define IDC_EI_SAR 1513 + #define IDC_EI_SREQSTR 1514 + #define IDC_EI_SSPELL 1515 + #define IDC_EI_SCHARGES 1516 + #define IDC_EI_SARBONUS 1517 + #define IDC_EI_SCAT 1518 + #define IDC_EI_SSUB 1519 + #define IDC_EI_SDESC 1520 + #define IDC_EI_STRIG 1521 + #define IDC_NE_STATIC1 1523 + #define IDC_NE_GATTR 1524 + #define IDC_NE_GMISC 1525 + #define IDC_NE_GCLASS 1526 + #define IDC_NE_STATIC2 1527 + #define IDC_NE_STATIC3 1528 + #define IDC_NE_STATIC4 1529 + #define IDC_NE_STATIC5 1530 + #define IDC_NE_STATIC6 1531 + #define IDC_NE_STATIC7 1532 + #define IDC_NE_STATIC8 1533 + #define IDC_NE_STATIC9 1534 + #define IDC_NE_STATIC10 1535 + #define IDC_NE_STATIC11 1536 + #define IDC_NE_STATIC12 1537 + #define IDC_NE_STATIC13 1538 + #define IDC_NE_STATIC14 1539 + #define IDC_NE_STATIC15 1540 + #define IDC_NE_STATIC16 1541 + #define IDC_NE_STATIC17 1542 + #define IDC_NE_STATIC18 1543 + #define IDC_NE_STATIC19 1544 + #define IDC_NE_STATIC20 1545 + #define IDC_ESS_STATIC1 1546 + #define IDC_ESS_STATIC2 1547 + #define IDC_ESS_STATIC3 1548 + #define IDC_STATIC_MC 1570 + #define IDC_STATIC_VER 1571 + #define IDC_STATIC_PLANE 1572 + #define IDC_ORE_STATIC1 1661 + #define IDC_ORE_STATIC2 1662 + #define IDC_ORE_STATIC3 1663 + #define IDC_ORE_STATIC4 1664 + #define IDC_ORE_STATIC5 1665 + #define IDC_ORE_STATIC6 1666 + #define IDC_ORE_STATIC7 1667 + #define IDC_RSD_STATIC1 1765 + #define IDC_RSD_STATIC2 1766 + #define IDC_EI_STATIC1 1784 + #define IDC_EI_STATIC2 1785 + #define IDC_EI_STATIC3 1786 + #define IDC_EI_STATIC4 1787 + #define IDC_EI_STATIC5 1788 // Next default values for new objects Index: S_Sphere52.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.rc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** S_Sphere52.rc 25 Jun 2003 00:07:27 -0000 1.6 --- S_Sphere52.rc 1 Jul 2003 14:17:40 -0000 1.7 *************** *** 28,46 **** // ! 1 TEXTINCLUDE BEGIN ! "resource.h\0" END ! 2 TEXTINCLUDE BEGIN ! "#include ""afxres.h""\r\n" ! "\0" END ! 3 TEXTINCLUDE BEGIN ! "1 TYPELIB ""S_Sphere52.tlb""\r\n" ! "\0" END --- 28,46 ---- // ! 1 TEXTINCLUDE BEGIN ! "resource.h\0" END ! 2 TEXTINCLUDE BEGIN ! "#include ""afxres.h""\r\n" ! "\0" END ! 3 TEXTINCLUDE BEGIN ! "1 TYPELIB ""S_Sphere52.tlb""\r\n" ! "\0" END *************** *** 54,87 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1, 0, 0, 1 ! PRODUCTVERSION 1.0.0.1 ! FILEFLAGSMASK 0x3fL #ifdef _DEBUG ! FILEFLAGS 0x1L #else ! FILEFLAGS 0x0L #endif ! FILEOS 0x4L ! FILETYPE 0x2L ! FILESUBTYPE 0x0L ! BEGIN ! BLOCK "StringFileInfo" ! BEGIN ! BLOCK "040904B0" ! BEGIN ! VALUE "CompanyName", "" ! VALUE "FileDescription", "Scripts module for Sphere 0.52" ! VALUE "FileVersion", "1, 0, 0, 1" ! VALUE "LegalCopyright", "Copyright Philip Esterle 2002-2003" ! VALUE "InternalName", "S_Sphere52.dll" ! VALUE "OriginalFilename", "S_Sphere52.dll" ! VALUE "ProductName", "S_Sphere52" ! VALUE "ProductVersion", "1.0.0.1" ! END ! END ! BLOCK "VarFileInfo" ! BEGIN ! VALUE "Translation", 0x409, 1200 ! END END --- 54,86 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,0,0,0 ! PRODUCTVERSION 1,0,0,0 ! FILEFLAGSMASK 0x3fL #ifdef _DEBUG ! FILEFLAGS 0x1L #else ! FILEFLAGS 0x0L #endif ! FILEOS 0x4L ! FILETYPE 0x2L ! FILESUBTYPE 0x0L ! BEGIN ! BLOCK "StringFileInfo" ! BEGIN ! BLOCK "040904b0" ! BEGIN ! VALUE "FileDescription", "Scripts module for Sphere 0.52" ! VALUE "FileVersion", "1, 0, 0, 0" ! VALUE "InternalName", "S_Sphere52.dll" ! VALUE "LegalCopyright", "Copyright Philip Esterle 2002-2003" ! VALUE "OriginalFilename", "S_Sphere52.dll" ! VALUE "ProductName", "S_Sphere52" ! VALUE "ProductVersion", "1.0.0.0" ! END ! END ! BLOCK "VarFileInfo" ! BEGIN ! VALUE "Translation", 0x409, 1200 ! END END *************** *** 105,167 **** FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ! CTEXT "",IDC_STATUS_MESSAGE,7,3,274,8,SS_CENTERIMAGE ! CONTROL "",IDC_PROGBAR,"Static",SS_BLACKFRAME | SS_SUNKEN,7,14, ! 274,10 END IDD_PROFILE_EDIT DIALOGEX 0, 0, 299, 293 ! STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | ! WS_CAPTION | WS_SYSMENU CAPTION "Profile Editor (Sphere 0.52)" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ! LISTBOX IDC_PROFILE_LIST,7,18,230,78,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "New",IDC_PROFILE_NEW,244,49,50,14 ! PUSHBUTTON "Edit",IDC_PROFILE_EDIT,244,65,50,14 ! PUSHBUTTON "Delete",IDC_PROFILE_DELETE,244,81,50,14 ! CONTROL "Local",IDC_PROFILE_LOCAL,"Button",BS_AUTORADIOBUTTON | ! WS_DISABLED | WS_GROUP | WS_TABSTOP,35,110,32,10 ! CONTROL "Remote",IDC_PROFILE_REMOTE,"Button",BS_AUTORADIOBUTTON | ! WS_DISABLED | WS_TABSTOP,83,110,41,10 ! EDITTEXT IDC_PROFILE_NAME,40,122,95,13,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_SPHEREIP,50,138,85,13,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_SPHEREPORT,60,155,75,13,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! EDITTEXT IDC_PROFILE_BASEPATH,56,173,79,12,ES_AUTOHSCROLL | ! WS_DISABLED ! CONTROL "Get Remote Spawnpoints",IDC_PROFILE_REMOTESPAWNS,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,14,191,122,12 ! EDITTEXT IDC_PROFILE_REMOTEUSER,67,207,68,12,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTEPWD,76,221,59,12,ES_PASSWORD | ! ES_AUTOHSCROLL | WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTEPORT,73,235,62,12,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTETIMEOUT,86,249,49,12,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! CONTROL "",IDC_PROFILE_FILES,"SysTreeView32",TVS_HASBUTTONS | ! TVS_HASLINES | TVS_LINESATROOT | TVS_CHECKBOXES | ! WS_DISABLED | WS_BORDER | WS_TABSTOP,141,122,147,144 ! PUSHBUTTON "Refresh List",IDC_PROFILE_SCRIPT_REFRESH,226,107,61,13, ! WS_DISABLED ! PUSHBUTTON "Save Changes",IDC_PROFILE_SAVE,9,270,60,14,WS_DISABLED ! PUSHBUTTON "Discard Changes",IDC_PROFILE_DISCARD,229,270,60,14, ! WS_DISABLED ! DEFPUSHBUTTON "OK",IDOK,242,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,242,24,50,14 ! LTEXT "User Defined Profiles",IDC_PE_STATIC1,9,8,227,10 ! GROUPBOX "Parameters",IDC_PROFILE_PARMS,7,100,285,186 ! LTEXT "Name",IDC_PE_STATIC3,15,123,23,11 ! LTEXT "Available Scripts",IDC_PE_STATIC2,145,111,68,8 ! LTEXT "Sphere IP",IDC_PE_STATIC4,14,140,32,8 ! LTEXT "Sphere Port",IDC_PE_STATIC5,14,157,39,8 ! LTEXT "Base Path",IDC_PE_STATIC6,14,175,33,8 ! LTEXT "Remote User",IDC_PE_STATIC7,14,209,46,9 ! LTEXT "Remote Password",IDC_PE_STATIC8,14,223,58,8 ! LTEXT "Remote Port",IDC_PE_STATIC9,14,237,41,8 ! LTEXT "Remote Timeout (ms)",IDC_PE_STATIC10,14,251,69,8 END --- 104,533 ---- FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ! CTEXT "",IDC_STATUS_MESSAGE,7,3,274,8,SS_CENTERIMAGE ! CONTROL "",IDC_PROGBAR,"Static",SS_BLACKFRAME | SS_SUNKEN,7,14, ! 274,10 END IDD_PROFILE_EDIT DIALOGEX 0, 0, 299, 293 ! STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | ! WS_CAPTION | WS_SYSMENU CAPTION "Profile Editor (Sphere 0.52)" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ! LISTBOX IDC_PROFILE_LIST,7,18,230,78,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "New",IDC_PROFILE_NEW,244,49,50,14 ! PUSHBUTTON "Edit",IDC_PROFILE_EDIT,244,65,50,14 ! PUSHBUTTON "Delete",IDC_PROFILE_DELETE,244,81,50,14 ! CONTROL "Local",IDC_PROFILE_LOCAL,"Button",BS_AUTORADIOBUTTON | ! WS_DISABLED | WS_GROUP | WS_TABSTOP,35,110,32,10 ! CONTROL "Remote",IDC_PROFILE_REMOTE,"Button",BS_AUTORADIOBUTTON | ! WS_DISABLED | WS_TABSTOP,83,110,41,10 ! EDITTEXT IDC_PROFILE_NAME,40,122,95,13,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_SPHEREIP,50,138,85,13,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_SPHEREPORT,60,155,75,13,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! EDITTEXT IDC_PROFILE_BASEPATH,56,173,79,12,ES_AUTOHSCROLL | ! WS_DISABLED ! CONTROL "Get Remote Spawnpoints",IDC_PROFILE_REMOTESPAWNS,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,14,191,122,12 ! EDITTEXT IDC_PROFILE_REMOTEUSER,67,207,68,12,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTEPWD,76,221,59,12,ES_PASSWORD | ! ES_AUTOHSCROLL | WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTEPORT,73,235,62,12,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! EDITTEXT IDC_PROFILE_REMOTETIMEOUT,86,249,49,12,ES_AUTOHSCROLL | ! ES_NUMBER | WS_DISABLED ! CONTROL "",IDC_PROFILE_FILES,"SysTreeView32",TVS_HASBUTTONS | ! TVS_HASLINES | TVS_LINESATROOT | TVS_CHECKBOXES | ! WS_DISABLED | WS_BORDER | WS_TABSTOP,141,122,147,144 ! PUSHBUTTON "Refresh List",IDC_PROFILE_SCRIPT_REFRESH,226,107,61,13, ! WS_DISABLED ! PUSHBUTTON "Save Changes",IDC_PROFILE_SAVE,9,270,60,14,WS_DISABLED ! PUSHBUTTON "Discard Changes",IDC_PROFILE_DISCARD,229,270,60,14, ! WS_DISABLED ! DEFPUSHBUTTON "OK",IDOK,242,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,242,24,50,14 ! LTEXT "User Defined Profiles",IDC_PE_STATIC1,9,8,227,10 ! GROUPBOX "Parameters",IDC_PROFILE_PARMS,7,100,285,186 ! LTEXT "Name",IDC_PE_STATIC3,15,123,23,11 ! LTEXT "Available Scripts",IDC_PE_STATIC2,145,111,68,8 ! LTEXT "Sphere IP",IDC_PE_STATIC4,14,140,32,8 ! LTEXT "Sphere Port",IDC_PE_STATIC5,14,157,39,8 ! LTEXT "Base Path",IDC_PE_STATIC6,14,175,33,8 ! LTEXT "Remote User",IDC_PE_STATIC7,14,209,46,9 ! LTEXT "Remote Password",IDC_PE_STATIC8,14,223,58,8 ! LTEXT "Remote Port",IDC_PE_STATIC9,14,237,41,8 ! LTEXT "Remote Timeout (ms)",IDC_PE_STATIC10,14,251,69,8 ! END ! ! IDD_ITEMEDIT DIALOGEX 0, 0, 397, 343 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Edit Item" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 ! BEGIN ! EDITTEXT IDC_ITEMID,42,47,35,12,ES_AUTOHSCROLL | WS_DISABLED ! COMBOBOX IDC_DUPEITEM,120,47,69,81,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_NAME,42,62,147,12,ES_AUTOHSCROLL | WS_DISABLED ! COMBOBOX IDC_ITEMTYPE,42,75,85,95,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COLORCOMBO,42,89,68,81,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Palette",IDC_IEPALETTE,111,89,14,12,BS_ICON | ! WS_DISABLED ! CONTROL "Dyeable",IDC_DYEABLE,"Button",BS_AUTOCHECKBOX | ! BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,7,106,66,9 ! CONTROL "Repairable",IDC_REPAIRABLE,"Button",BS_AUTOCHECKBOX | ! BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,7,117,66,10 ! COMBOBOX IDC_SKILL,57,142,67,52,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_DAMAGEMIN,57,156,20,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_DAMAGEMAX,91,156,20,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_ARMOURMIN,57,171,20,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_ARMOURMAX,91,171,20,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_REQSTR,57,185,20,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! COMBOBOX IDC_CATEGORY,56,216,102,40,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Add",IDC_ADDCATEGORY,163,216,22,13,WS_DISABLED ! COMBOBOX IDC_SUBSECTION,56,229,102,33,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Add",IDC_ADDSUBSECTION,163,230,22,13,WS_DISABLED ! EDITTEXT IDC_DESCRIPTION,56,242,102,12,ES_AUTOHSCROLL | ! WS_DISABLED ! CONTROL "Don't Index this Item",IDC_NOINDEX,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,255,88,11 ! EDITTEXT IDC_BUYVALUE,173,75,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_BUYVALUEMAX,205,75,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_SELLVALUE,173,89,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_SELLVALUEMAX,205,89,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_WEIGHT,173,103,50,13,ES_AUTOHSCROLL | WS_DISABLED ! EDITTEXT IDC_HPMIN,173,117,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_HPMAX,205,117,17,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! CONTROL "Magical",IDC_MAGICAL,"Button",BS_AUTOCHECKBOX | ! WS_DISABLED | WS_TABSTOP,133,135,41,10 ! COMBOBOX IDC_SPELLID,157,155,74,53,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_CHARGES,198,171,33,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! EDITTEXT IDC_ARMOURBONUS,198,187,33,13,ES_AUTOHSCROLL | ES_NUMBER | ! WS_DISABLED ! PUSHBUTTON "Edit",IDC_TRIGEDIT,368,254,22,13,WS_DISABLED ! EDITTEXT IDC_TRIGGERS,7,269,383,67,ES_MULTILINE | ES_AUTOVSCROLL | ! ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED | WS_VSCROLL ! DEFPUSHBUTTON "OK",IDOK,340,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,340,21,50,14 ! LTEXT "Name",IDC_EI_SNAME,7,64,20,8 ! LTEXT "Based On",IDC_EI_SBASE,7,50,32,8 ! LTEXT "Type",IDC_EI_STYPE,7,77,17,8 ! LTEXT "Buy Value",IDC_EI_SBUY,131,77,33,8 ! LTEXT "Sell Value",IDC_EI_SSELL,131,91,32,8 ! LTEXT "Weight",IDC_EI_SWEIGHT,131,105,24,8 ! LTEXT "Category",IDC_EI_SCAT,13,218,29,8 ! LTEXT "Subsection",IDC_EI_SSUB,13,233,36,8 ! LTEXT "Description",IDC_EI_SDESC,14,245,36,8 ! GROUPBOX "Axis Classifications",IDC_EI_GCLASS,7,206,183,61 ! GROUPBOX "Armour / Weapon Attributes",IDC_EI_GATTR,7,131,121,72 ! LTEXT "Skill",IDC_EI_SSKILL,16,143,14,8 ! LTEXT "Damage",IDC_EI_SDAMAGE,16,158,28,8 ! LTEXT "Armour",IDC_EI_SAR,16,173,23,8 ! LTEXT "Required Str",IDC_EI_SREQSTR,16,187,40,8 ! LTEXT "HitPoints",IDC_EI_SHP,131,119,29,8 ! LTEXT "Color",IDC_EI_SCOLOR,7,91,17,8 ! GROUPBOX "Magical Attributes",IDC_EI_GMAGIC,130,146,107,57 ! LTEXT "Spell",IDC_EI_SSPELL,136,157,16,8 ! LTEXT "Charges",IDC_EI_SCHARGES,136,173,27,8 ! LTEXT "Armour Bonus",IDC_EI_SARBONUS,136,189,45,8 ! LTEXT "DupeItem",IDC_EI_SDUPE,83,49,32,8 ! LTEXT "---",IDC_EI_STATIC1,194,77,8,8,0,WS_EX_TRANSPARENT ! LTEXT "Triggers",IDC_EI_STRIG,336,259,26,8 ! LTEXT "---",IDC_EI_STATIC2,194,91,8,8,0,WS_EX_TRANSPARENT ! LTEXT "---",IDC_EI_STATIC4,81,158,8,8,0,WS_EX_TRANSPARENT ! LTEXT "---",IDC_EI_STATIC5,81,173,8,8,0,WS_EX_TRANSPARENT ! LTEXT "---",IDC_EI_STATIC3,194,120,8,8,0,WS_EX_TRANSPARENT ! COMBOBOX IDC_ITEMENTRY,42,7,152,103,CBS_DROPDOWNLIST | WS_VSCROLL | ! WS_TABSTOP ! LTEXT "Entry",IDC_EI_SENTRY,13,9,17,8 ! PUSHBUTTON "New",IDC_ITEM_NEW,13,26,40,12 ! PUSHBUTTON "Edit",IDC_ITEM_EDIT,57,26,40,12 ! PUSHBUTTON "Apply",IDC_ITEM_APPLY,103,26,40,12,NOT WS_VISIBLE ! PUSHBUTTON "Cancel",IDC_ITEM_CANCEL,147,26,40,12,NOT WS_VISIBLE ! CONTROL "",IDC_ITEMDISPLAY,"Static",SS_BITMAP | SS_CENTERIMAGE | ! SS_SUNKEN,250,38,140,140 ! END ! ! IDD_NPCEDIT_DLG DIALOGEX 0, 0, 494, 341 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "NPC Editor" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! COMBOBOX IDC_NPCENTRY,47,7,154,157,CBS_DROPDOWNLIST | WS_VSCROLL | ! WS_TABSTOP ! PUSHBUTTON "New",IDC_NEWNPC,204,7,44,12 ! PUSHBUTTON "Edit",IDC_EDITNPC,251,7,44,12 ! PUSHBUTTON "Apply Edits",IDC_APPLYNPCEDITS,298,7,44,12,NOT ! WS_VISIBLE ! PUSHBUTTON "Cancel Edits",IDC_CANCELNPCEDITS,345,7,44,12,NOT ! WS_VISIBLE ! EDITTEXT IDC_NPCNAME,71,30,102,14,ES_AUTOHSCROLL | WS_DISABLED ! COMBOBOX IDC_NPCNAMEINDEX,71,46,102,52,CBS_DROPDOWNLIST | ! CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_NPCSOUND,71,61,102,57,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_NPCBASEID,71,75,102,60,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_NPCOLOUR,71,90,86,49,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "",IDC_NPCPALETTE,160,90,13,13,BS_ICON | BS_CENTER | ! BS_VCENTER | WS_DISABLED ! COMBOBOX IDC_NPCICON,71,105,102,51,CBS_DROPDOWN | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_NPCBRAIN,71,121,102,53,CBS_DROPDOWNLIST | CBS_SORT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_NPCDEFNAME,71,135,102,14,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_NPCDESIRES,71,150,102,14,ES_AUTOHSCROLL | ! WS_DISABLED ! EDITTEXT IDC_NPCSPEECH,71,165,102,14,ES_AUTOHSCROLL | WS_DISABLED ! EDITTEXT IDC_NPCEVENTS,71,180,102,14,ES_AUTOHSCROLL | WS_DISABLED ! CONTROL "List5",IDC_NPCATTRIBUTES,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | LVS_NOSORTHEADER | WS_DISABLED | ! WS_BORDER | WS_TABSTOP,178,32,114,58 ! CONTROL "List6",IDC_SKILLS,"SysListView32",LVS_REPORT | ! LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_DISABLED | ! WS_BORDER | WS_TABSTOP,178,95,114,99 ! CONTROL "No Axis index",IDC_NPCNOINDEX,"Button",BS_AUTOCHECKBOX | ! BS_MULTILINE | WS_DISABLED | WS_TABSTOP,437,116,41,24 ! COMBOBOX IDC_NPCCATEGORY,342,150,122,52,CBS_DROPDOWNLIST | ! CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Add",IDC_NPCADDCATEGORY,465,150,18,12,WS_DISABLED ! COMBOBOX IDC_NPCSUBSECTION,342,165,122,59,CBS_DROPDOWNLIST | ! CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "Add",IDC_NPCADDSUBSECTION,465,165,18,12,WS_DISABLED ! EDITTEXT IDC_NPCEDITDESCRIPTION,342,180,141,12,ES_AUTOHSCROLL | ! WS_DISABLED ! LISTBOX IDC_NPCATTRLIST,12,217,64,112,LBS_NOINTEGRALHEIGHT | ! WS_DISABLED | WS_VSCROLL | WS_TABSTOP ! CONTROL "Tree1",IDC_NPCATTRCATS,"SysTreeView32",TVS_HASBUTTONS | ! TVS_HASLINES | TVS_LINESATROOT | WS_DISABLED | WS_BORDER | ! WS_TABSTOP,79,217,100,112 ! LISTBOX IDC_NPCATTRCHOICES,181,217,106,112,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_DISABLED | ! WS_VSCROLL | WS_HSCROLL | WS_TABSTOP ! CONTROL "List2",IDC_NPCATTRSELECTION,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | LVS_NOSORTHEADER | WS_DISABLED | ! WS_BORDER | WS_TABSTOP,290,217,191,97 ! EDITTEXT IDC_NPCATTRAMOUNT,321,317,33,12,ES_AUTOHSCROLL | ! WS_DISABLED ! PUSHBUTTON "Add",IDC_NPCATTRADD,407,317,35,12,WS_DISABLED ! PUSHBUTTON "Remove",IDC_NPCATTRREMOVE,444,317,35,12,WS_DISABLED ! CONTROL "Disable Display",IDC_NPCDISABLEDISPLAY,"Button", ! BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,437,42,37,20 ! DEFPUSHBUTTON "OK",IDOK,437,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,437,24,50,14 ! GROUPBOX "Axis Classification",IDC_NE_GCLASS,299,139,188,60 ! LTEXT "NPC Entry",IDC_NE_STATIC1,7,9,34,8 ! GROUPBOX "Attributes",IDC_NE_GATTR,7,23,290,176 ! LTEXT "Name",IDC_NE_STATIC2,14,33,20,8 ! LTEXT "Name Index",IDC_NE_STATIC3,14,48,39,8 ! LTEXT "Sound",IDC_NE_STATIC4,14,63,22,8 ! LTEXT "Tracking Icon",IDC_NE_STATIC7,14,108,45,8 ! LTEXT "Brain",IDC_NE_STATIC8,14,123,17,8 ! LTEXT "DefName",IDC_NE_STATIC9,14,138,31,8 ! LTEXT "Desires",IDC_NE_STATIC10,14,153,24,8 ! LTEXT "Basic Speech",IDC_NE_STATIC11,14,168,45,8 ! LTEXT "Basic Events",IDC_NE_STATIC12,14,183,42,8 ! LTEXT "Creature Base",IDC_NE_STATIC5,14,78,46,8 ! LTEXT "Colour",IDC_NE_STATIC6,14,93,21,8 ! GROUPBOX "Miscellaneous Attributes",IDC_NE_GMISC,7,199,480,135 ! LTEXT "Attributes",IDC_NE_STATIC13,14,208,30,8 ! LTEXT "Categories",IDC_NE_STATIC14,79,208,34,8 ! LTEXT "Choices\t\t(D-Click to Add)",IDC_NE_STATIC15,182,208, ! 103,8 ! LTEXT "Selections\t\t\t\t(D-Click to Edit)",IDC_NE_STATIC16, ! 290,208,189,8 ! LTEXT "Amount",IDC_NE_STATIC20,292,319,25,8 ! LTEXT "Category",IDC_NE_STATIC17,304,152,29,8 ! LTEXT "Subsection",IDC_NE_STATIC18,304,167,36,8 ! LTEXT "Description",IDC_NE_STATIC19,304,182,36,8 ! CONTROL "",IDC_NPCIMAGE,"Static",SS_BITMAP | SS_CENTERIMAGE,300, ! 27,124,110 ! END ! ! IDD_ORE_EDIT_DLG DIALOGEX 0, 0, 291, 218 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Ore Table Editor" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! CONTROL "List1",IDC_ORELIST,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,40,277,77 ! PUSHBUTTON "Remove",IDC_OREREMOVE,7,119,44,14 ! PUSHBUTTON "Add",IDC_OREADD,240,119,44,14 ! EDITTEXT IDC_ORENAME,78,134,101,12,ES_AUTOHSCROLL ! EDITTEXT IDC_ORECOLOUR,78,147,101,12,ES_AUTOHSCROLL ! EDITTEXT IDC_ORESKILL,78,160,30,12,ES_AUTOHSCROLL ! EDITTEXT IDC_ORECHANCE,78,173,30,12,ES_AUTOHSCROLL ! EDITTEXT IDC_OREMIN,78,185,30,12,ES_AUTOHSCROLL | ES_NUMBER ! EDITTEXT IDC_OREMAX,122,186,29,12,ES_AUTOHSCROLL | ES_NUMBER ! EDITTEXT IDC_OREINGOT,78,199,100,12,ES_AUTOHSCROLL ! DEFPUSHBUTTON "Save",IDOK,234,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,234,24,50,14 ! LTEXT "Name",IDC_ORE_STATIC1,7,136,20,8 ! LTEXT "Colour",IDC_ORE_STATIC2,7,149,21,8 ! LTEXT "Vein %",IDC_ORE_STATIC4,7,175,22,8 ! LTEXT "Minimum Skill",IDC_ORE_STATIC3,7,162,43,8 ! LTEXT "Ore Per Vein",IDC_ORE_STATIC5,7,188,41,8 ! LTEXT "Ingot Item (optional)",IDC_ORE_STATIC6,7,201,63,8 ! LTEXT "--",IDC_ORE_STATIC7,109,187,8,8 ! END ! ! IDD_ADD_DESTINATION DIALOGEX 0, 0, 237, 97 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Add Custom Destination" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! COMBOBOX IDC_CATEGORY,47,7,91,50,CBS_DROPDOWNLIST | WS_VSCROLL | ! WS_TABSTOP ! COMBOBOX IDC_SUBSECTION,47,31,91,59,CBS_DROPDOWNLIST | WS_VSCROLL | ! WS_TABSTOP ! EDITTEXT IDC_DESCRIPTION,47,53,123,12,ES_AUTOHSCROLL ! EDITTEXT IDC_XCOORD,32,78,32,12,ES_AUTOHSCROLL | ES_NUMBER ! EDITTEXT IDC_YCOORD,82,78,32,12,ES_AUTOHSCROLL | ES_NUMBER ! EDITTEXT IDC_ZCOORD,134,78,32,12,ES_AUTOHSCROLL ! DEFPUSHBUTTON "OK",IDOK,180,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,180,24,50,14 ! PUSHBUTTON "Add",IDC_ADD_CATEGORY,144,7,25,14 ! PUSHBUTTON "Add",IDC_ADD_SUBSECTION,144,30,25,14 ! LTEXT "X",IDC_ADC_SX,21,80,8,8 ! LTEXT "Y",IDC_ADC_SY,70,80,8,8 ! LTEXT "Z",IDC_ADC_SZ,124,80,8,8 ! LTEXT "Category",IDC_ACD_SCAT,14,9,29,8 ! LTEXT "Subsection",IDC_ADC_SSUB,7,33,36,8 ! LTEXT "Description",IDC_ADC_SDES,7,57,36,8 ! EDITTEXT IDC_PLANE,187,78,32,12,ES_AUTOHSCROLL | ES_NUMBER ! LTEXT "Plane",IDC_ADC_SP,168,80,19,8 ! END ! ! IDD_EDITGRAYMAP_DLG DIALOGEX 0, 0, 488, 318 ! STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | ! WS_SYSMENU | WS_THICKFRAME ! CAPTION "Map Script Editor" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! CONTROL "Tree1",IDC_REGIONTREE,"SysTreeView32",TVS_HASBUTTONS | ! TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | ! TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,192,98 ! PUSHBUTTON "New Area",IDC_NEWAREA,226,7,53,14 ! PUSHBUTTON "New Room",IDC_NEWROOM,226,22,53,14 ! PUSHBUTTON "Locate Area",IDC_LOCATEAREA,285,7,54,14 ! PUSHBUTTON "Locate Room",IDC_LOCATEROOM,285,22,54,14 ! PUSHBUTTON "Set as new TelePoint",IDC_SETPOINT,343,7,73,14 ! COMBOBOX IDC_VERSION,372,23,44,40,CBS_DROPDOWNLIST | WS_VSCROLL | ! WS_TABSTOP ! LISTBOX IDC_REGIONRECTLIST,7,119,108,45,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! CONTROL "Draw Rectangles",IDC_DRAWRECTS,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,121,118,70,10 ! PUSHBUTTON "Remove Rect",IDC_REMOVERECT,121,131,65,15 ! CONTROL "List2",IDC_MAPVALS,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,175,190,134 ! DEFPUSHBUTTON "Save Changes",IDOK,425,7,56,14 ! PUSHBUTTON "Cancel",IDCANCEL,425,24,56,14 ! LTEXT "Bounding Rectangles",IDC_STATIC_BR,7,108,69,8 ! LTEXT "Map Center : ",IDC_STATIC_MC,255,47,44,8 ! LTEXT "",IDC_MAPCENTER,301,47,61,8 ! LTEXT "",IDC_CURSORCOORDS,368,47,74,8 ! LTEXT "Values",IDC_STATIC_VALS,7,165,22,8 ! PUSHBUTTON "",IDC_MOVEUP,202,7,15,15,BS_ICON | NOT WS_VISIBLE ! PUSHBUTTON "",IDC_MOVEDOWN,202,23,15,15,BS_ICON | NOT WS_VISIBLE ! CONTROL "",IDC_MAPDISPLAY,"{2AC21540-4C63-4663-BF24-D1DBD9205223}", ! WS_TABSTOP,205,57,276,252 ! ICON 215,IDC_ZOOMOUT,207,42,20,20,SS_NOTIFY | ! SS_REALSIZEIMAGE ! ICON 216,IDC_ZOOMIN,224,42,20,20,SS_NOTIFY | SS_REALSIZEIMAGE ! LTEXT "Plane",IDC_STATIC_PLANE,445,47,19,8 ! LTEXT "0",IDC_PLANE,466,47,12,8 ! LTEXT "Version",IDC_STATIC_VER,345,22,24,14,SS_CENTERIMAGE ! END ! ! IDD_EDITSKILL_DLG DIALOGEX 0, 0, 244, 59 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Edit Skill/Stat Values" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! EDITTEXT IDC_SKILL_MIN,51,31,42,14,ES_AUTOHSCROLL ! EDITTEXT IDC_SKILL_MAX,132,31,42,14,ES_AUTOHSCROLL ! DEFPUSHBUTTON "OK",IDOK,187,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,187,24,50,14 ! LTEXT "Skill Name:",IDC_ESS_STATIC1,7,10,36,8 ! EDITTEXT IDC_SKILLNAME,53,7,122,14,ES_AUTOHSCROLL | ES_READONLY ! LTEXT "Minimum",IDC_ESS_STATIC2,16,34,28,8 ! LTEXT "Maximum",IDC_ESS_STATIC3,97,34,30,8 ! END ! ! IDD_ADD_VALUE DIALOGEX 0, 0, 223, 46 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Add Value" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! EDITTEXT IDC_VALUE,40,7,124,13,ES_AUTOHSCROLL ! EDITTEXT IDC_FILENAME,40,25,124,13,ES_AUTOHSCROLL ! DEFPUSHBUTTON "OK",IDOK,166,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,166,24,50,14 ! LTEXT "Name",IDC_AV_SNAME,7,10,20,8,SS_CENTERIMAGE ! LTEXT "Filename",IDC_AV_SFILE,7,27,29,8 ! END ! ! IDD_EDITVALUE DIALOG 0, 0, 186, 46 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Dialog" ! FONT 8, "MS Sans Serif" ! BEGIN ! EDITTEXT IDC_TEXTVALUE,7,16,115,13,ES_AUTOHSCROLL ! CONTROL "False",IDC_VALUEENABLED,"Button",BS_AUTOCHECKBOX | NOT ! WS_VISIBLE | WS_TABSTOP,47,17,33,10 ! DEFPUSHBUTTON "OK",IDOK,129,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 ! END ! ! IDD_REGIONSELECTDLG DIALOGEX 0, 0, 303, 314 ! STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | ! WS_SYSMENU ! CAPTION "Region Selection" ! FONT 8, "MS Shell Dlg", 400, 0, 0x1 ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,246,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,246,24,50,14 ! LISTBOX IDC_REGION_LIST,7,40,101,267,LBS_NOINTEGRALHEIGHT | ! LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP ! LTEXT "Available Selections",IDC_RSD_STATIC1,7,31,64,8 ! EDITTEXT IDC_REGION_DETAILS,111,40,185,267,ES_MULTILINE | ! ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY ! LTEXT "Details",IDC_RSD_STATIC2,111,31,22,8 ! END ! ! IDD_EDITFLAGS DIALOG 0, 0, 187, 151 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Dialog" ! FONT 8, "MS Sans Serif" ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,130,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14 ! LISTBOX IDC_FLAGLIST,7,40,173,104,LBS_NOINTEGRALHEIGHT | ! LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP END *************** *** 173,192 **** #ifdef APSTUDIO_INVOKED ! GUIDELINES DESIGNINFO ! BEGIN ! IDD_FILEREAD_PROGRESS, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 179 ! TOPMARGIN, 7 ! END ! ! IDD_PROFILE_EDIT, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 292 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 286 ! END END #endif // APSTUDIO_INVOKED --- 539,638 ---- #ifdef APSTUDIO_INVOKED ! GUIDELINES DESIGNINFO BEGIN ! IDD_FILEREAD_PROGRESS, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 179 ! TOPMARGIN, 7 ! END ! ! IDD_PROFILE_EDIT, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 292 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 286 ! END ! ! IDD_ITEMEDIT, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 390 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 336 ! END ! ! IDD_NPCEDIT_DLG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 487 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 334 ! END ! ! IDD_ORE_EDIT_DLG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 284 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 211 ! END ! ! IDD_ADD_DESTINATION, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 230 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 90 ! END ! ! IDD_EDITGRAYMAP_DLG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 481 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 309 ! END ! ! IDD_EDITSKILL_DLG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 237 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 52 ! END ! ! IDD_ADD_VALUE, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 216 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 39 ! END ! ! IDD_EDITVALUE, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 179 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 39 ! END ! ! IDD_REGIONSELECTDLG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 296 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 307 ! END ! ! IDD_EDITFLAGS, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 180 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 144 ! END END #endif // APSTUDIO_INVOKED *************** *** 205,214 **** ///////////////////////////////////////////////////////////////////////////// // // String Table // ! STRINGTABLE BEGIN ! IDS_PROJNAME "S_Sphere52" END --- 651,687 ---- ///////////////////////////////////////////////////////////////////////////// // + // Dialog Info + // + + IDD_ITEMEDIT DLGINIT + BEGIN + IDC_SKILL, 0x403, 8, 0 + 0x7241, 0x6863, 0x7265, 0x0079, + IDC_SKILL, 0x403, 8, 0 + 0x6546, 0x636e, 0x6e69, 0x0067, + IDC_SKILL, 0x403, 13, 0 + 0x614d, 0x6563, 0x6966, 0x6867, 0x6974, 0x676e, "\000" + IDC_SKILL, 0x403, 14, 0 + 0x7753, 0x726f, 0x7364, 0x616d, 0x736e, 0x6968, 0x0070, + 0 + END + + IDD_EDITGRAYMAP_DLG DLGINIT + BEGIN + IDC_MAPDISPLAY, 0x376, 29, 0 + 0x0000, 0x0000, 0x0000, 0x0001, 0x2aca, 0x0000, 0x2a60, 0x0000, 0x0000, + 0x0000, 0x0001, 0x000c, 0x0008, 0x0000, "\000" + 0 + END + + + ///////////////////////////////////////////////////////////////////////////// + // // String Table // ! STRINGTABLE BEGIN ! IDS_PROJNAME "S_Sphere52" END Index: S_Sphere52.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.vcproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** S_Sphere52.vcproj 19 Jun 2003 19:13:36 -0000 1.10 --- S_Sphere52.vcproj 1 Jul 2003 14:17:40 -0000 1.11 *************** *** 161,164 **** --- 161,170 ---- </File> <File + RelativePath="EditFlagsDlg.cpp"> + </File> + <File + RelativePath="EditValue.cpp"> + </File> + <File RelativePath="FileReadProgress.cpp"> </File> *************** *** 170,173 **** --- 176,182 ---- </File> <File + RelativePath="MapScriptEditDlg.cpp"> + </File> + <File RelativePath="NPC.cpp"> </File> *************** *** 182,185 **** --- 191,197 ---- </File> <File + RelativePath="RegionSelectDlg.cpp"> + </File> + <File RelativePath="Room.cpp"> </File> *************** *** 269,272 **** --- 281,287 ---- </File> <File + RelativePath="addvaluedialog.cpp"> + </File> + <File RelativePath="attributes.cpp"> </File> *************** *** 321,324 **** --- 336,345 ---- </File> <File + RelativePath="EditFlagsDlg.h"> + </File> + <File + RelativePath="EditValue.h"> + </File> + <File RelativePath="FileReadProgress.h"> </File> *************** *** 330,333 **** --- 351,357 ---- </File> <File + RelativePath="MapScriptEditDlg.h"> + </File> + <File RelativePath="NPC.h"> </File> *************** *** 342,345 **** --- 366,372 ---- </File> <File + RelativePath="RegionSelectDlg.h"> + </File> + <File RelativePath="Resource.h"> </File> *************** *** 427,430 **** --- 454,460 ---- <File RelativePath="XMLConfig.h"> + </File> + <File + RelativePath="addvaluedialog.h"> </File> <File Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** ScriptsMain.cpp 26 Jun 2003 22:28:03 -0000 1.20 --- ScriptsMain.cpp 1 Jul 2003 14:17:40 -0000 1.21 *************** *** 1113,1117 **** bool CScriptsMain::SaveLocations() { - #ifdef _AXIS LOG(locale->String(IDS_SCRIPTS_SAVING), locale->String(IDS_SCRIPTS_TLOCATIONS)); CWaitCursor hourglass; --- 1113,1116 ---- *************** *** 1127,1131 **** } CString csLine; ! csLine.Format(_T("// %s created by %s\n"), USER_LOC_FILE, Main->GetVersionTitle()); csfOutput.WriteString(csLine); CTime time; --- 1126,1130 ---- } CString csLine; ! csLine.Format(_T("// %s created by %s\n"), USER_LOC_FILE, Version()); csfOutput.WriteString(csLine); CTime time; *************** *** 1136,1140 **** csfOutput.WriteString(csLine); ! for ( int i = 0; i < this->m_aLocations.GetSize(); i++ ) { CLocation * pLoc = this->m_aLocations[i]; --- 1135,1139 ---- csfOutput.WriteString(csLine); ! for ( int i = 0; i < (int) this->m_aLocations.GetSize(); i++ ) { CLocation * pLoc = this->m_aLocations[i]; *************** *** 1153,1157 **** csfOutput.Close(); ReplaceFiles(TMP_USER_LOC_FILE, USER_LOC_FILE); - #endif return true; } --- 1152,1155 ---- *************** *** 1388,1395 **** void CScriptsMain::ReloadTables() { - /* - if ( m_bNewFormat ) - return; - */ this->UnloadTables(); this->LoadTables(); --- 1386,1389 ---- *************** *** 1431,1436 **** --- 1425,1432 ---- RES_NOTOTITLES, // (SI) Define the noto titles used. RES_OBSCENE, // (SL) A list of obscene words. + RES_ORE, // Table of ores (Sphere 0.52 and earlier) RES_PLEVEL, // Define the list of commands that a PLEVEL can access. (or not access) RES_PLOTITEM, // (Phase this out in favor of better @trigger TEVENT= and EVENT= support.) + RES_POTION, // Definition of a potion (Sphere 0.52 and earlier) RES_PROFESSION, // Define specifics for a char with this skill class. (ex. skill caps) -- used to be SKILLCLASS RES_QUEST, *************** *** 1496,1501 **** --- 1492,1499 ---- _T("NOTOTITLES"), // (SI) Define the noto titles used. _T("OBSCENE"), // (SL) A list of obscene words. + _T("ORE"), // Ore table _T("PLEVEL"), // Define the list of commands that a PLEVEL can access. (or not access) _T("PLOTITEM"), // (Phase this out in favor of better @trigger TEVENT= and EVENT= support.) + _T("POTION"), // Potion definition _T("PROFESSION"), // Define class specifics for a char with this skill class. -- Used to be SKILLCLASS _T("QUEST"), // ability to get accomplishment titles. *************** *** 1553,1557 **** m_pDlg->SetPos(0); m_pDlg->SetRange32(0, (DWORD)csfInput.GetLength()); - // m_pDlg->UpdateData(false); } --- 1551,1554 ---- *************** *** 1569,1576 **** j++; if ( j % 10 == 0 && m_pDlg) - { m_pDlg->SetPos((int)csfInput.GetPosition()); - //m_pDlg->UpdateData(); - } CString csKey = csLine.Mid(1); csKey = csKey.SpanExcluding(_T("]")); --- 1566,1570 ---- *************** *** 1785,1788 **** --- 1779,1787 ---- this->m_tables.m_obscene.m_csFilename = csFile; break; + case RES_ORE: // An ore table + this->m_tables.m_ores.Read(csfInput); + this->m_tables.m_ores.m_dwFileOffset = dwOffset; + this->m_tables.m_ores.m_csFilename = csFile; + break; case RES_PLEVEL: // Define the list of commands that a PLEVEL can access. (or not access) this->m_tables.m_pLevel[iIndex - 1].m_csID.Format(_T("%s %s"), csKey, csIndex); *************** *** 1804,1807 **** --- 1803,1819 ---- } break; + case RES_POTION: + { + CTPotionDef * pPotion = new CTPotionDef; + pPotion->m_csFilename = csFile; + pPotion->m_dwFileOffset = dwOffset; + pPotion->m_csValue = csIndex; + pPotion->m_bType = TYPE_POTION; + int iOld = m_tables.m_potions.Find(csIndex); + if ( iOld != -1 ) + m_tables.m_potions.RemoveAt(iOld); + m_tables.m_potions.Insert(pPotion); + } + break; case RES_QUEST: break; *************** *** 2059,2071 **** } } ! else ! { ! j++; ! if ( j % 100 == 0 && m_pDlg) ! { m_pDlg->SetPos((int)csfInput.GetPosition()); - //m_pDlg->UpdateData(); - } - } } } --- 2071,2076 ---- } } ! else if ( j++ % 100 == 0 && m_pDlg) m_pDlg->SetPos((int)csfInput.GetPosition()); } } *************** *** 2099,2104 **** LOG(locale->String(IDS_SCRIPTS_CWD), cwd); - CreateProgressDialog(); - m_bDeleteDialog = false; m_vFiles.erase(m_vFiles.begin(), m_vFiles.end()); m_vFiles.resize(File_QTY); --- 2104,2107 ---- *************** *** 2108,2122 **** Main->m_pAxis->Login(); CStringArray csaScripts; csaScripts.Copy(m_pProfile->Files()); if ( csaScripts.GetSize() > 0 ) { // Check for updates on the specified scripts - // Make sure the directory for the remote profiles exists - CreateDirectory(m_pProfile->ProfileName(), NULL); for ( int i = 0; i < csaScripts.GetSize(); i++ ) { CString sFile; CMD5Hash md5; ! sFile.Format(_T("%s\\%s"), m_pProfile->ProfileName(), md5.GetHash(csaScripts.GetAt(i))); Main->m_pAxis->GetRemoteFile(csaScripts.GetAt(i), sFile); int j = MapFile(csaScripts.GetAt(i)); --- 2111,2126 ---- Main->m_pAxis->Login(); CStringArray csaScripts; + CString sScriptDirectory = m_pProfile->BaseDirectory() + _T("\\") + m_pProfile->ProfileName(); csaScripts.Copy(m_pProfile->Files()); + // Make sure the directory for the remote profiles exists + CreateDirectory(sScriptDirectory, NULL); if ( csaScripts.GetSize() > 0 ) { // Check for updates on the specified scripts for ( int i = 0; i < csaScripts.GetSize(); i++ ) { CString sFile; CMD5Hash md5; ! sFile.Format(_T("%s\\%s"), sScriptDirectory, md5.GetHash(csaScripts.GetAt(i))); Main->m_pAxis->GetRemoteFile(csaScripts.GetAt(i), sFile); int j = MapFile(csaScripts.GetAt(i)); *************** *** 2128,2137 **** { // Check for updates of the files we know we need to get - CreateDirectory(m_pProfile->ProfileName(), NULL); for ( int i = File_Map; i < File_QTY; i++ ) { CString sFile; CMD5Hash md5; ! sFile.Format(_T("%s\\%s"), m_pProfile->ProfileName(), md5.GetHash(m_pszFiles[i])); Main->m_pAxis->GetRemoteFile(m_pszFiles[i], sFile); m_vFiles[i] = sFile; --- 2132,2140 ---- { // Check for updates of the files we know we need to get for ( int i = File_Map; i < File_QTY; i++ ) { CString sFile; CMD5Hash md5; ! sFile.Format(_T("%s\\%s"), sScriptDirectory, md5.GetHash(m_pszFiles[i])); Main->m_pAxis->GetRemoteFile(m_pszFiles[i], sFile); m_vFiles[i] = sFile; *************** *** 2140,2143 **** --- 2143,2148 ---- Main->m_pAxis->Logout(); // Make sure we know where to get the location files + // By default, these should be in the working directory, but we may + // have downloaded them from the remote server. if ( m_vFiles[File_Loc] == _T("") ) { *************** *** 2152,2156 **** m_vFiles[File_Loc2] = sFile; } ! // If Axiscats is defined, then load it if ( m_vFiles[File_AxisCats] != _T("") ) { --- 2157,2161 ---- m_vFiles[File_Loc2] = sFile; } ! // If axiscats.scp is in our file list, read it. if ( m_vFiles[File_AxisCats] != _T("") ) { *************** *** 2158,2161 **** --- 2163,2167 ---- LoadFile(m_vFiles[File_Loc]); LoadFile(m_vFiles[File_Loc2]); + // No other files need to be loaded. return; } *************** *** 2164,2167 **** --- 2170,2174 ---- { // Local profile + CString sBaseDirectory = m_pProfile->BaseDirectory(); // Has the user selected particular scripts to load? CStringArray csaScripts; *************** *** 2179,2184 **** else { LOG( locale->String(IDS_SCRIPTS_READINGINI)); ! csLoadFile.Format(_T("%s\\%s"), cwd, INI_FILE); m_tables.m_Sphere.m_csFilename = csLoadFile; m_config.m_sSCPBaseDir = cwd; --- 2186,2192 ---- else { + // Find the location of the scripts from sphere.ini LOG( locale->String(IDS_SCRIPTS_READINGINI)); ! csLoadFile.Format(_T("%s\\%s"), sBaseDirectory, INI_FILE); m_tables.m_Sphere.m_csFilename = csLoadFile; m_config.m_sSCPBaseDir = cwd; *************** *** 2189,2195 **** sBasePath = m_config.m_sSCPBaseDir; else ! sBasePath = cwd; if ( sBasePath.Right(1) != _T('\\') ) sBasePath.Append(_T("\\")); for ( int i = File_World; i < File_QTY; i++ ) { --- 2197,2205 ---- sBasePath = m_config.m_sSCPBaseDir; else ! sBasePath = sBaseDirectory; ! // Strip out a trailing backslash, if it exists. if ( sBasePath.Right(1) != _T('\\') ) sBasePath.Append(_T("\\")); + // Populate the filelist with all of the standard files for ( int i = File_World; i < File_QTY; i++ ) { *************** *** 2201,2206 **** --- 2211,2231 ---- m_vFiles[i] = sFile; } + // hoglocs.scp, axiscats.scp and custloc.scp should come from the base directory + m_vFiles[File_AxisCats] = sBaseDirectory + _T("\\axiscats.scp"); + m_vFiles[File_Loc] = sBaseDirectory + _T("\\hoglocs.scp"); + m_vFiles[File_Loc2] = sBaseDirectory + _T("\\custloc.scp"); + } + // Try to load axiscats.scp if it exists + if ( LoadFile(m_vFiles[File_AxisCats]) ) + { + // Load the locations and exit + LoadFile(m_vFiles[File_Loc]); + LoadFile(m_vFiles[File_Loc2]); + return; } } + CreateProgressDialog(); + m_bDeleteDialog = false; + this->LoadDefs(); this->LoadItems(); *************** *** 2380,2387 **** bool CScriptsMain::ReplaceFiles( CString csNewFile, CString csOldFile ) { - // Most likely, the old file name doesn't have the path associated with it. - if (csOldFile.Find(_T(":")) == -1 && csOldFile.Find(_T("ini")) == -1 ) - { - } // Loop through this a few times int i = 0; --- 2405,2408 ---- *************** *** 3038,3053 **** CStdioFile fWorld; CString sWorldfile; ! sWorldfile.Format(_T("%s\\sphereworld.scp"), m_config.m_sWorldBaseDir); if ( fWorld.Open(sWorldfile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) { ! CFileReadProgress progress; ! progress.Create(IDD_FILEREAD_PROGRESS); ! progress.SetRange32(0, (ULONG) fWorld.GetLength()); ! progress.SetPos(0); CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! progress.m_csMessage.SetWindowText(sMessage); BOOL bStatus = TRUE; CString sLine; DWORD offset; while ( bStatus ) { --- 3059,3077 ---- CStdioFile fWorld; CString sWorldfile; ! if ( m_vFiles[File_World] == _T("") ) ! sWorldfile.Format(_T("%s\\sphereworld.scp"), m_config.m_sWorldBaseDir); ! else ! sWorldfile = m_vFiles[File_World]; if ( fWorld.Open(sWorldfile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) { ! CreateProgressDialog(); ! m_pDlg->SetRange32(0, (ULONG) fWorld.GetLength()); ! m_pDlg->SetPos(0); CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! m_pDlg->m_csMessage.SetWindowText(sMessage); BOOL bStatus = TRUE; CString sLine; DWORD offset; + int iLine = 0; while ( bStatus ) { *************** *** 3056,3059 **** --- 3080,3085 ---- if ( ! bStatus ) break; + if ( (iLine++ % 1000) == 0 ) + m_pDlg->SetPos(offset); if ( sLine.Find(_T("[WORLDITEM")) == 0 ) { *************** *** 3073,3076 **** --- 3099,3103 ---- } } + DestroyProgressDialog(); fWorld.Close(); return 0; *************** *** 3207,3222 **** CleanWorlditems(); if ( m_sWorldItemFile == _T("") ) ! return -1; CStdioFile fWorld; if ( fWorld.Open(m_sWorldItemFile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) { ! CFileReadProgress progress; ! progress.SetRange32(0, (ULONG) fWorld.GetLength()); ! progress.SetPos(0); CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! progress.m_csMessage.SetWindowText(sMessage); BOOL bStatus = TRUE; CString sLine; DWORD offset; while ( bStatus ) { --- 3234,3255 ---- CleanWorlditems(); if ( m_sWorldItemFile == _T("") ) ! { ! if ( m_vFiles[File_World] == _T("") ) ! return -1; ! else ! m_sWorldItemFile = m_vFiles[File_World]; ! } CStdioFile fWorld; if ( fWorld.Open(m_sWorldItemFile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) { ! CreateProgressDialog(); ! m_pDlg->SetRange32(0, (ULONG) fWorld.GetLength()); ! m_pDlg->SetPos(0); CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! m_pDlg->m_csMessage.SetWindowText(sMessage); BOOL bStatus = TRUE; CString sLine; DWORD offset; + int iLine = 0; while ( bStatus ) { *************** *** 3225,3228 **** --- 3258,3263 ---- if ( ! bStatus ) break; + if ( iLine % 1000 == 0 ) + m_pDlg->SetPos(offset); if ( sLine.Find(_T("[WORLDITEM")) == 0 ) { *************** *** 3237,3240 **** --- 3272,3276 ---- } fWorld.Close(); + DestroyProgressDialog(); return 0; } *************** *** 3401,3402 **** --- 3437,3443 ---- } + CString CScriptsMain::Version() + { + // Don't hardcode this!! + return _T("S_Sphere52 version 1.0 alpha"); + } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ScriptsMain.h 26 Jun 2003 22:28:04 -0000 1.11 --- ScriptsMain.h 1 Jul 2003 14:17:40 -0000 1.12 *************** *** 327,329 **** --- 327,330 ---- bool m_bMidisFound; void FindMidis(); + CString Version(); }; Index: strings.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/strings.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** strings.h 4 Jun 2003 21:47:17 -0000 1.3 --- strings.h 1 Jul 2003 14:17:40 -0000 1.4 *************** *** 55,58 **** --- 55,63 ---- #define IDS_TRAVEL_ALLSPAWNS 445 #define IDS_TRAVEL_LOADINGSPAWNS 446 + #define IDS_TRUE 398 + #define IDS_FALSE 397 + #define IDS_ADDVAL_NAME 241 + #define IDS_ADDVAL_FILE 242 + |
From: Philip E. <pes...@us...> - 2003-06-26 22:28:07
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv5154/S_Sphere52 Modified Files: ScriptsMain.cpp ScriptsMain.h ScriptTables.cpp Log Message: no message Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ScriptsMain.cpp 25 Jun 2003 22:55:58 -0000 1.19 --- ScriptsMain.cpp 26 Jun 2003 22:28:03 -0000 1.20 *************** *** 24,27 **** --- 24,37 ---- #include <direct.h> #include "MD5Hash.h" + #include "FileMap.h" + + CString TranslateFilename(CString sFile) + { + CFileMap mapping(sFile); + if ( mapping.Load() ) + return mapping.RemoteName(); + else + return sFile; + } int CScriptsMain::m_iScriptSeq = 0; *************** *** 86,89 **** --- 96,101 ---- m_pDlg = NULL; m_pProfile = NULL; + m_bBrainsFound = false; + m_bMidisFound = false; } *************** *** 93,96 **** --- 105,111 ---- if ( m_pProfile != NULL ) delete m_pProfile; + m_vFiles.erase(m_vFiles.begin(), m_vFiles.end()); + m_vBrains.erase(m_vBrains.begin(), m_vBrains.end()); + m_vMidis.erase(m_vMidis.begin(), m_vMidis.end()); } *************** *** 180,190 **** if ( csFilename == _T("") ) continue; if ( !csfDefs.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 195,206 ---- if ( csFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfDefs.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 281,291 **** if ( csFilename == _T("") ) continue; if ( !csfItems.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 297,308 ---- if ( csFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfItems.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 409,418 **** if ( csFilename == _T("") ) continue; if ( !csfChars.Open(csFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 426,436 ---- if ( csFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfChars.Open(csFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 534,543 **** if ( csFilename == _T("") ) break; if ( !csfTemplates.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 552,562 ---- if ( csFilename == _T("") ) break; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfTemplates.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 710,719 **** continue; if (!csfMapfile.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 729,739 ---- continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if (!csfMapfile.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 953,962 **** if ( csFilename == _T("") ) continue; if (!csfTrigfile.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 973,983 ---- if ( csFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if (!csfTrigfile.Open(csFilename, CFile::modeRead | CFile::shareDenyNone)) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); break; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 1047,1056 **** if ( sFilename == _T("") ) continue; if ( !csfLocs.Open( sFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), i ? USER_LOC_FILE : LOC_FILE ); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), i ? USER_LOC_FILE : LOC_FILE ); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 1068,1078 ---- if ( sFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(sFilename)); if ( !csfLocs.Open( sFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(sFilename) ); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(sFilename) ); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 1069,1075 **** if ( csLine.Find(_T("[LOCATION")) != -1 || csLine.Find(_T("[CUSTOM LOC")) != -1) { ! CLocation * pLoc = new (CLocation); if ( !pLoc ) break; pLoc->m_bCustom = i ? true : false; pLoc->Read(csfLocs); --- 1091,1103 ---- if ( csLine.Find(_T("[LOCATION")) != -1 || csLine.Find(_T("[CUSTOM LOC")) != -1) { ! CLocation * pLoc = new CLocation; if ( !pLoc ) break; + CString sValue; + if ( csLine.Find(_T("[LOCATION")) != -1 ) + sValue = csLine.Mid(csLine.Find(_T("[LOCATION")) + 10).SpanExcluding(_T("]")); + else + sValue = csLine.Mid(csLine.Find(_T("[CUSTOM LOC")) + 12).SpanExcluding(_T("]")); + pLoc->m_csValue = sValue; pLoc->m_bCustom = i ? true : false; pLoc->Read(csfLocs); *************** *** 1151,1161 **** if ( csFilename == _T("")) return; if ( !csfNames.Open(csFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); return; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 1179,1190 ---- if ( csFilename == _T("")) return; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfNames.Open(csFilename, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); return; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 1273,1276 **** --- 1302,1306 ---- if ( csFilename == _T("") ) continue; + LOG(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); if ( !csfSpeech.Open(csFilename, CFile::modeRead | CFile::shareDenyNone) ) { *************** *** 1283,1291 **** csFilename.Format(_T("%s\\%s"), szPath, csFilename); } ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), csFilename); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); --- 1313,1321 ---- csFilename.Format(_T("%s\\%s"), szPath, csFilename); } ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); continue; } ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFilename)); m_pDlg->m_csMessage.SetWindowText(csMessage); m_pDlg->SetPos(0); *************** *** 1508,1515 **** try { ! LOG( locale->String(IDS_SCRIPTS_ATTEMPTINGLOAD), csFile); if ( !csfInput.Open(csFile, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG( locale->String(IDS_SCRIPTS_CANTOPEN), csFile); return false; } --- 1538,1545 ---- try { ! LOG( locale->String(IDS_SCRIPTS_ATTEMPTINGLOAD), TranslateFilename(csFile)); if ( !csfInput.Open(csFile, CFile::modeRead | CFile::shareDenyNone) ) { ! LOG( locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFile)); return false; } *************** *** 1517,1521 **** CString csMessage; ! csMessage.Format(locale->String(IDS_READINGFILE), csFile); if ( m_pDlg ) { --- 1547,1551 ---- CString csMessage; ! csMessage.Format(locale->String(IDS_READINGFILE), TranslateFilename(csFile)); if ( m_pDlg ) { *************** *** 2025,2029 **** break; default: ! LOG( locale->String(IDS_SCRIPTS_UNKNOWNSECTION), csLine, csFile); break; } --- 2055,2059 ---- break; default: ! LOG( locale->String(IDS_SCRIPTS_UNKNOWNSECTION), csLine, TranslateFilename(csFile)); break; } *************** *** 2109,2112 **** --- 2139,2155 ---- } Main->m_pAxis->Logout(); + // Make sure we know where to get the location files + if ( m_vFiles[File_Loc] == _T("") ) + { + CString sFile; + sFile.Format(_T("%s\\%s"), cwd, LOC_FILE); + m_vFiles[File_Loc] = sFile; + } + if ( m_vFiles[File_Loc2] == _T("") ) + { + CString sFile; + sFile.Format(_T("%s\\%s"), cwd, USER_LOC_FILE); + m_vFiles[File_Loc2] = sFile; + } // If Axiscats is defined, then load it if ( m_vFiles[File_AxisCats] != _T("") ) *************** *** 2425,2431 **** CString s; if ( sCat == _T("") ) ! s.Format(_T("<uncategorized>\\%s"), pItem->m_csFilename); else ! s.Format(_T("%s\\%s"), sCat, sSub); return s; } --- 2468,2474 ---- CString s; if ( sCat == _T("") ) ! s = _T("<uncategorized>\\") + TranslateFilename(pItem->m_csFilename); else ! s = sCat + _T("\\") + sSub; return s; } *************** *** 2441,2445 **** return sCategory; } ! return pTemplate->m_csFilename; } index -= (ULONG) m_aTemplates.GetCount(); --- 2484,2488 ---- return sCategory; } ! return (_T("<uncategorized>\\") + TranslateFilename(pTemplate->m_csFilename)); } index -= (ULONG) m_aTemplates.GetCount(); *************** *** 2454,2458 **** return sCategory; } ! return pTemplate->m_csFilename; } return _T(""); --- 2497,2501 ---- return sCategory; } ! return (_T("<uncategorized>\\") + TranslateFilename(pTemplate->m_csFilename)); } return _T(""); *************** *** 2576,2580 **** if ( pItem->m_bNoIndex ) return pItem->m_bNoIndex; ! if ( pDupe->m_bNoIndex ) return pDupe->m_bNoIndex; return false; --- 2619,2623 ---- if ( pItem->m_bNoIndex ) return pItem->m_bNoIndex; ! if ( pDupe && pDupe->m_bNoIndex ) return pDupe->m_bNoIndex; return false; *************** *** 2617,2627 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! { ! CString sCategory = pNPC->m_csCategory + _T("\\") + pNPC->m_csSubsection; ! return sCategory; ! } ! else return _T(""); } index -= (ULONG) m_aNPCs.GetCount(); --- 2660,2678 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return _T(""); + CDisplayedScriptBase * pDupe = FindDupe(pNPC, &m_aNPCs); + CString sCat = pNPC->m_csCategory; + if ( sCat == _T("") && pDupe ) + sCat = pDupe->m_csCategory; + CString sSub = pNPC->m_csSubsection; + if ( sSub == _T("") && pDupe ) + sSub = pDupe->m_csSubsection; + CString s; + if ( sCat == _T("") ) + s = _T("<uncategorized>\\") + TranslateFilename(pNPC->m_csFilename); + else + s = sCat + _T("\\") + sSub; + return s; } index -= (ULONG) m_aNPCs.GetCount(); *************** *** 2632,2636 **** { CString sCategory = pSpawn->m_csCategory + _T("\\") + pSpawn->m_csSubsection; ! return sCategory; } } --- 2683,2690 ---- { CString sCategory = pSpawn->m_csCategory + _T("\\") + pSpawn->m_csSubsection; ! if ( sCategory != _T("\\") ) ! return sCategory; ! else ! return ( _T("<uncategorized>\\") + TranslateFilename(pSpawn->m_csFilename)); } } *************** *** 2643,2650 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! return pNPC->m_csDescription; ! else return _T(""); } index -= (ULONG) m_aNPCs.GetCount(); --- 2697,2711 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return _T(""); + CDisplayedScriptBase * pDupe = FindDupe(pNPC, &m_aNPCs); + CString sSub = pNPC->m_csSubsection; + if ( sSub == _T("") && pDupe ) + sSub = pDupe->m_csSubsection; + CString s = pNPC->m_csDescription; + if ( s == _T("") && pDupe ) + s = pDupe->m_csDescription; + s.Replace(_T("@"), sSub); + return s; } index -= (ULONG) m_aNPCs.GetCount(); *************** *** 2663,2673 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! if ( pNPC->m_csDispID != _T("") ) ! return pNPC->m_csDispID; ! else ! return pNPC->m_csValue; ! else return _T(""); } // Spawn Groups have no DispID --- 2724,2736 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return _T(""); + CDisplayedScriptBase * pDupe = FindDupe(pNPC, &m_aNPCs); + CString sDispID = pNPC->m_csDispID; + if ( sDispID == _T("") && pDupe ) + sDispID = pDupe->m_csDispID; + if ( sDispID == _T("") ) + sDispID = pNPC->m_csValue; + return sDispID; } // Spawn Groups have no DispID *************** *** 2680,2687 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! return pNPC->m_csColor; ! else return _T(""); } // Spawn Groups have no Color --- 2743,2754 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return _T(""); + CDisplayedScriptBase * pDupe = FindDupe(pNPC, &m_aNPCs); + CString sColor = pNPC->m_csColor; + if ( sColor == _T("") && pDupe ) + return pDupe->m_csColor; + else + return sColor; } // Spawn Groups have no Color *************** *** 2714,2721 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! return false; ! else return true; } // Spawn Groups can only be spawned --- 2781,2788 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return true; + else + return false; } // Spawn Groups can only be spawned *************** *** 2729,2736 **** { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC != NULL ) ! return pNPC->m_bNoIndex; ! else return true; } index -= (ULONG) m_aNPCs.GetCount(); --- 2796,2807 ---- { CDisplayedScriptBase * pNPC = m_aNPCs[index]; ! if ( pNPC == NULL ) return true; + if ( pNPC->m_bNoIndex ) + return pNPC->m_bNoIndex; + CDisplayedScriptBase * pDupe = FindDupe(pNPC, &m_aNPCs); + if ( pDupe != NULL ) + return pDupe->m_bNoIndex; + return false; } index -= (ULONG) m_aNPCs.GetCount(); *************** *** 2838,2842 **** CString sCategory; sCategory = pLoc->m_csCategory + _T("\\") + pLoc->m_csSubsection; ! return sCategory; } } --- 2909,2916 ---- CString sCategory; sCategory = pLoc->m_csCategory + _T("\\") + pLoc->m_csSubsection; ! if ( sCategory != _T("\\") ) ! return sCategory; ! else ! return ( _T("<uncategorized>\\") + TranslateFilename(pLoc->m_csFilename) ); } } *************** *** 2849,2854 **** { CLocation * pLoc = m_aLocations[index]; ! if ( pLoc != NULL ) return pLoc->m_csDescription; } return _T(""); --- 2923,2932 ---- { CLocation * pLoc = m_aLocations[index]; ! if ( pLoc == NULL ) ! return _T(""); ! if ( pLoc->m_csDescription != _T("") ) return pLoc->m_csDescription; + else + return _T("<unnamed>"); } return _T(""); *************** *** 3232,3251 **** ULONG CScriptsMain::BrainCount() { ! return 0; } CString CScriptsMain::BrainDescription(ULONG index) { ! return _T(""); } ULONG CScriptsMain::MidiCount() { ! return 0; } CString CScriptsMain::MidiName(ULONG index) { ! return _T(""); } --- 3310,3335 ---- ULONG CScriptsMain::BrainCount() { ! FindBrains(); ! return (ULONG) m_vBrains.size(); } CString CScriptsMain::BrainDescription(ULONG index) { ! if ( index > m_vBrains.size() || index < 0 ) ! return _T(""); ! return m_vBrains[index]; } ULONG CScriptsMain::MidiCount() { ! FindMidis(); ! return (ULONG) m_vMidis.size(); } CString CScriptsMain::MidiName(ULONG index) { ! if ( index > m_vMidis.size() || index < 0 ) ! return _T(""); ! return m_vMidis[index]; } *************** *** 3288,3289 **** --- 3372,3402 ---- return dynamic_cast<CDisplayedScriptBase *>(array->GetAt(iDupe)); } + + void CScriptsMain::FindBrains() + { + if ( m_bBrainsFound ) + return; + m_vBrains.erase(m_vBrains.begin(), m_vBrains.end()); + for ( int i = 0; i < (int) m_aDefs.GetCount(); i++ ) + { + CDef * pDef = m_aDefs[i]; + if ( pDef->m_csGroup == _T("BRAINS") ) + m_vBrains.push_back(pDef->m_csValue); + } + m_bBrainsFound = true; + } + + void CScriptsMain::FindMidis() + { + if ( m_bMidisFound ) + return; + m_vMidis.erase(m_vMidis.begin(), m_vMidis.end()); + for ( int i = 0; i < (int) m_aDefs.GetCount(); i++ ) + { + CDef * pDef = m_aDefs[i]; + if ( pDef->m_csGroup == _T("MIDIS") ) + m_vMidis.push_back(pDef->m_csValue); + } + m_bMidisFound = true; + } + Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** ScriptsMain.h 25 Jun 2003 22:55:58 -0000 1.10 --- ScriptsMain.h 26 Jun 2003 22:28:04 -0000 1.11 *************** *** 78,81 **** --- 78,83 ---- #define PROFILE_REMOTE 3 + CString TranslateFilename(CString sFile); + class CScriptsMain { *************** *** 318,320 **** --- 320,329 ---- int MapFile(CString s); CDisplayedScriptBase * FindDupe(CDisplayedScriptBase * pScript, CScriptArray<CDisplayedScriptBase*> *array); + + vector<CString> m_vBrains; + bool m_bBrainsFound; + void FindBrains(); + vector <CString> m_vMidis; + bool m_bMidisFound; + void FindMidis(); }; Index: ScriptTables.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptTables.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ScriptTables.cpp 11 Jun 2003 22:18:11 -0000 1.4 --- ScriptTables.cpp 26 Jun 2003 22:28:04 -0000 1.5 *************** *** 99,104 **** csFilename.Format(_T("%s\\%s"), szPath, csFilename); } ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); ! csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), csFilename); AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return false; --- 99,104 ---- csFilename.Format(_T("%s\\%s"), szPath, csFilename); } ! LOG(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); ! csMessage.Format(locale->String(IDS_SCRIPTS_CANTOPEN), TranslateFilename(csFilename)); AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return false; |
From: Philip E. <pes...@us...> - 2003-06-26 22:28:07
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv5154 Modified Files: ChooseProfileDlg.cpp itemgentab.cpp SPAWNTAB.CPP Log Message: no message Index: ChooseProfileDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ChooseProfileDlg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ChooseProfileDlg.cpp 23 May 2003 18:15:21 -0000 1.7 --- ChooseProfileDlg.cpp 26 Jun 2003 22:28:01 -0000 1.8 *************** *** 84,88 **** { int iIndex = m_clbProfiles.AddString(sName); ! m_clbProfiles.SetItemData(iIndex, m_aInfo.GetAt(i)); } } --- 84,88 ---- { int iIndex = m_clbProfiles.AddString(sName); ! m_clbProfiles.SetItemData(iIndex, i); } } *************** *** 95,99 **** void CChooseProfileDlg::OnOK() { ! m_iSelection = m_clbProfiles.GetCurSel(); if ( m_iSelection == -1 ) OnCancel(); --- 95,100 ---- void CChooseProfileDlg::OnOK() { ! int iSel = m_clbProfiles.GetCurSel(); ! m_iSelection = m_clbProfiles.GetItemData(iSel); if ( m_iSelection == -1 ) OnCancel(); Index: itemgentab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** itemgentab.cpp 12 Jun 2003 03:15:32 -0000 1.23 --- itemgentab.cpp 26 Jun 2003 22:28:01 -0000 1.24 *************** *** 311,314 **** --- 311,316 ---- CString sDescription, sID; sDescription = Main->m_pScripts->GetItemDescription(iIndex); + if ( sDescription == _T("") ) + sDescription = _T("<unnamed>"); sID = Main->m_pScripts->GetItemID(iIndex); m_clcItems.InsertItem(iCount, sDescription, 0); Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** SPAWNTAB.CPP 12 Jun 2003 03:15:34 -0000 1.22 --- SPAWNTAB.CPP 26 Jun 2003 22:28:02 -0000 1.23 *************** *** 256,259 **** --- 256,261 ---- CString sDescription, sID; sDescription = Main->m_pScripts->GetCharacterDescription(iIndex); + if ( sDescription == _T("") ) + sDescription = _T("<unnamed>"); sID = Main->m_pScripts->GetCharacterID(iIndex); m_clcCreatures.InsertItem(iCount, sDescription, 0); |
From: Philip E. <pes...@us...> - 2003-06-26 22:28:07
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv5154/S_ScriptsBase Modified Files: FileMap.h Log Message: no message Index: FileMap.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/FileMap.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FileMap.h 18 Jun 2003 22:45:25 -0000 1.1 --- FileMap.h 26 Jun 2003 22:28:03 -0000 1.2 *************** *** 17,20 **** --- 17,24 ---- LastUpdate(t); } + CFileMap(CString sLocal) + { + LocalName(sLocal); + } ~CFileMap(void); |