[Sphere-axis-commits] CVS: Axis AccountDlg.cpp,1.6,1.7 AdditionalSettingsDlg.cpp,1.1,1.2 AdditionalS
Brought to you by:
pesterle
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv10434 Modified Files: AccountDlg.cpp AdditionalSettingsDlg.cpp AdditionalSettingsDlg.h ChooseProfileDlg.cpp CITEM.CPP CNPC.CPP common.cpp CScriptObjects.cpp DefEditDlg.cpp Drewsky.cpp Drewsky.h drewsky.rc EditorTab.cpp ItemScriptEditDlg.cpp MISCTAB.CPP remoteconnection.cpp RemoteConsole.cpp RemoteFileDlg.cpp resource.h ScriptEditDlg.cpp serverconfigdlg.cpp settingstab.cpp settingstab.h SkillMenuEditDlg.cpp Stdafx.cpp STDAFX.H TABLES.CPP traveltab.cpp TriggerEditDlg.cpp uoart.cpp uoart.h uomap.cpp uomap.h Log Message: Changes to the way profiles are read and stored. A few minor bug fixes as well. Index: AccountDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** AccountDlg.cpp 1 May 2002 03:33:09 -0000 1.6 --- AccountDlg.cpp 14 May 2002 20:03:34 -0000 1.7 *************** *** 228,233 **** CStdioFile csfIniFile; CString csFile; ! if ( Main->m_dwUseRemoteScripts ) ! csFile.Format("%s\\%s", Main->m_csRemoteProfile, "sphereacct.rmt"); else { --- 228,233 ---- CStdioFile csfIniFile; CString csFile; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFile.Format("%s\\%s", Main->GetProfileString(), "sphereacct.rmt"); else { *************** *** 299,303 **** } csfAcctFile.Close(); ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; --- 299,303 ---- } csfAcctFile.Close(); ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; *************** *** 477,484 **** CStdioFile csfIniFile; CString csFile; ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; ! csFile.Format("%s\\%s", Main->m_csRemoteProfile, RMT_ACCU_FILE); remote.GetCustomFile("grayacct", csFile); } --- 477,484 ---- CStdioFile csfIniFile; CString csFile; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; ! csFile.Format("%s\\%s", Main->GetProfileString(), RMT_ACCU_FILE); remote.GetCustomFile("grayacct", csFile); } Index: AdditionalSettingsDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AdditionalSettingsDlg.cpp 12 May 2002 16:23:59 -0000 1.1 --- AdditionalSettingsDlg.cpp 14 May 2002 20:03:34 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- m_bStartLauncher = FALSE; m_bSysClose = FALSE; + m_bAllowMultiple = FALSE; //}}AFX_DATA_INIT } *************** *** 38,41 **** --- 39,43 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAdditionalSettingsDlg) + DDX_Control(pDX, IDC_AS_CLIENTBROWSE, m_cbClientBrowse); DDX_Control(pDX, IDC_AS_USESAMEPATHASCLIENT, m_cbMulPathFromClient); DDX_Control(pDX, IDC_AS_PROFILES, m_clbProfiles); *************** *** 58,61 **** --- 60,64 ---- DDX_Check(pDX, IDC_AS_STARTLAUNCHER, m_bStartLauncher); DDX_Check(pDX, IDC_AS_SYSCLOSE, m_bSysClose); + DDX_Check(pDX, IDC_AS_ALLOWMULTIPLE, m_bAllowMultiple); //}}AFX_DATA_MAP } *************** *** 64,68 **** BEGIN_MESSAGE_MAP(CAdditionalSettingsDlg, CDialog) //{{AFX_MSG_MAP(CAdditionalSettingsDlg) - // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 67,70 ---- *************** *** 70,71 **** --- 72,176 ---- ///////////////////////////////////////////////////////////////////////////// // CAdditionalSettingsDlg message handlers + + BOOL CAdditionalSettingsDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + m_bSpawnMessage = (BOOL) Main->m_dwSpawnMessage; + m_bStartLauncher = (BOOL) Main->m_dwStartLauncher; + m_bDisplayItems = (BOOL) Main->m_dwDrawItems; + m_bShowChars = (BOOL) Main->m_dwDrawChars; + m_b3DRoomView = (BOOL) Main->m_dw3DRoomView; + m_bScaleItems = (BOOL) Main->m_dwScaleItems; + m_bAlwaysOnTop = (BOOL) Main->m_dwAlwaysOnTop; + m_bShowRadarMap = (BOOL) Main->m_dwShowRadar; + m_bShowSpawns = (BOOL) Main->m_dwShowSpawnpoints; + m_bSysClose = (BOOL) Main->m_dwSysClose; + m_bAllowMultiple = (BOOL) Main->m_dwAllowMultiple; + + CString csText; + csText.Format("%s%s", csUOPath, csUOExe); + m_csDefaultClient.SetWindowText(csText); + m_csDefaultMulPath.SetWindowText(csUOPath); + + // List the mulfiles + m_clcMuls.InsertColumn(0, "Mulfile", LVCFMT_LEFT, 75, 0); + m_clcMuls.InsertColumn(1, "Custom Filename", LVCFMT_LEFT, 255, 1); + + m_clcMuls.InsertItem(0, "map0"); + m_clcMuls.InsertItem(1, "staidx0"); + m_clcMuls.InsertItem(2, "statics0"); + m_clcMuls.InsertItem(3, "artidx"); + m_clcMuls.InsertItem(4, "art"); + m_clcMuls.InsertItem(5, "animidx"); + m_clcMuls.InsertItem(6, "anim"); + m_clcMuls.InsertItem(7, "soundidx"); + m_clcMuls.InsertItem(8, "sound"); + m_clcMuls.InsertItem(9, "texidx"); + m_clcMuls.InsertItem(10, "texmaps"); + m_clcMuls.InsertItem(11, "gumpidx"); + m_clcMuls.InsertItem(12, "gumpart"); + m_clcMuls.InsertItem(13, "multiidx"); + m_clcMuls.InsertItem(14, "multi"); + m_clcMuls.InsertItem(15, "skillsidx"); + m_clcMuls.InsertItem(16, "skills"); + m_clcMuls.InsertItem(17, "lightidx"); + m_clcMuls.InsertItem(18, "light"); + m_clcMuls.InsertItem(30, "tiledata"); + m_clcMuls.InsertItem(31, "animdata"); + m_clcMuls.InsertItem(32, "hues"); + m_clcMuls.InsertItem(33, "animinfo"); + m_clcMuls.InsertItem(34, "fonts"); + m_clcMuls.InsertItem(35, "radarcol"); + m_clcMuls.InsertItem(36, "verdata"); + m_clcMuls.InsertItem(37, "map2"); + m_clcMuls.InsertItem(38, "staidx2"); + m_clcMuls.InsertItem(39, "statics2"); + + // Are there any local profiles in the registry? + HKEY hKey; + LONG lStatus; + int iIndex = 0; + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Local Profiles", 0, KEY_ALL_ACCESS, &hKey); + if ( lStatus == ERROR_SUCCESS ) + { + while (lStatus == ERROR_SUCCESS) + { + char szBuffer[MAX_PATH]; + DWORD dwSize = sizeof(szBuffer); + lStatus = RegEnumKeyEx(hKey, iIndex, &szBuffer[0], &dwSize, 0, NULL, NULL, NULL); + if (lStatus == ERROR_SUCCESS) + { + CString csProfile; + csProfile.Format("Local: %s", szBuffer); + this->m_clbProfiles.AddString(szBuffer); + } + iIndex++; + } + RegCloseKey(hKey); + } + + // Are there any remote profiles in the registry? + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles", 0, KEY_ALL_ACCESS, &hKey); + iIndex = 0; + if ( lStatus == ERROR_SUCCESS ) + { + while (lStatus == ERROR_SUCCESS) + { + char szBuffer[MAX_PATH]; + DWORD dwSize = sizeof(szBuffer); + lStatus = RegEnumKeyEx(hKey, iIndex, &szBuffer[0], &dwSize, 0, NULL, NULL, NULL); + if (lStatus == ERROR_SUCCESS) + { + CString csProfile; + csProfile.Format("Remote: %s", szBuffer); + this->m_clbProfiles.AddString(szBuffer); + } + iIndex++; + } + RegCloseKey(hKey); + } + + UpdateData(FALSE); + return TRUE; + } Index: AdditionalSettingsDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AdditionalSettingsDlg.h 12 May 2002 16:23:59 -0000 1.1 --- AdditionalSettingsDlg.h 14 May 2002 20:03:34 -0000 1.2 *************** *** 20,23 **** --- 20,24 ---- //{{AFX_DATA(CAdditionalSettingsDlg) enum { IDD = IDD_ADDITIONAL_SETTINGS }; + CButton m_cbClientBrowse; CButton m_cbMulPathFromClient; CListBox m_clbProfiles; *************** *** 40,43 **** --- 41,45 ---- BOOL m_bStartLauncher; BOOL m_bSysClose; + BOOL m_bAllowMultiple; //}}AFX_DATA *************** *** 55,59 **** // Generated message map functions //{{AFX_MSG(CAdditionalSettingsDlg) ! // NOTE: the ClassWizard will add member functions here //}}AFX_MSG DECLARE_MESSAGE_MAP() --- 57,61 ---- // Generated message map functions //{{AFX_MSG(CAdditionalSettingsDlg) ! virtual BOOL OnInitDialog(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: ChooseProfileDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ChooseProfileDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ChooseProfileDlg.cpp 1 May 2002 03:33:09 -0000 1.4 --- ChooseProfileDlg.cpp 14 May 2002 20:03:34 -0000 1.5 *************** *** 69,76 **** CDialog::OnInitDialog(); - this->m_clbProfiles.AddString("< Local >"); this->m_clbProfiles.AddString("< NONE >"); DWORD dwUseRemote = 0; char szProfile[MAX_PATH]; HKEY hKey; LONG lStatus; --- 69,77 ---- CDialog::OnInitDialog(); this->m_clbProfiles.AddString("< NONE >"); + m_clbProfiles.AddString("< DEFAULT >"); DWORD dwUseRemote = 0; char szProfile[MAX_PATH]; + CString csProfileDisp; HKEY hKey; LONG lStatus; *************** *** 79,103 **** dwSize = sizeof(DWORD); lStatus = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); - lStatus = RegQueryValueEx(hKey, "UseRemoteScripts", 0, &dwType, (BYTE *)&dwUseRemote, &dwSize); dwSize = sizeof(szProfile); ! lStatus = RegQueryValueEx( hKey, "Remote Profile", 0, &dwType, (BYTE *)&szProfile, &dwSize); RegCloseKey(hKey); // Enumerate the remote profiles lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles", 0, KEY_ALL_ACCESS, &hKey); ! int iIndex = 0; ! while (lStatus == ERROR_SUCCESS) { ! char szBuffer[MAX_PATH]; ! DWORD dwSize = sizeof(szBuffer); ! lStatus = RegEnumKeyEx(hKey, iIndex, &szBuffer[0], &dwSize, 0, NULL, NULL, NULL); ! if (lStatus == ERROR_SUCCESS) ! this->m_clbProfiles.AddString(szBuffer); ! iIndex++; } ! RegCloseKey(hKey); ! if ( dwUseRemote ) ! m_clbProfiles.SelectString(-1, szProfile); ! else ! m_clbProfiles.SelectString(-1, "< Local >"); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE --- 80,128 ---- dwSize = sizeof(DWORD); lStatus = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); dwSize = sizeof(szProfile); ! memset(&szProfile[0], 0x00, MAX_PATH); ! lStatus = RegQueryValueEx( hKey, "Script Profile", 0, &dwType, (BYTE *)&szProfile, &dwSize); RegCloseKey(hKey); + // Enumerate the local profiles + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Local Profiles", 0, KEY_ALL_ACCESS, &hKey); + int iIndex = 0; + if ( lStatus == ERROR_SUCCESS ) + { + while (lStatus == ERROR_SUCCESS) + { + char szBuffer[MAX_PATH]; + DWORD dwSize = sizeof(szBuffer); + lStatus = RegEnumKeyEx(hKey, iIndex, &szBuffer[0], &dwSize, 0, NULL, NULL, NULL); + if (lStatus == ERROR_SUCCESS) + { + CString csProfile; + csProfile.Format("Local: %s", szBuffer); + this->m_clbProfiles.AddString(csProfile); + } + iIndex++; + } + RegCloseKey(hKey); + } // Enumerate the remote profiles lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles", 0, KEY_ALL_ACCESS, &hKey); ! iIndex = 0; ! if ( lStatus == ERROR_SUCCESS ) { ! while (lStatus == ERROR_SUCCESS) ! { ! char szBuffer[MAX_PATH]; ! DWORD dwSize = sizeof(szBuffer); ! lStatus = RegEnumKeyEx(hKey, iIndex, &szBuffer[0], &dwSize, 0, NULL, NULL, NULL); ! if (lStatus == ERROR_SUCCESS) ! { ! CString csProfile; ! csProfile.Format("Remote: %s", szBuffer); ! this->m_clbProfiles.AddString(csProfile); ! } ! iIndex++; ! } ! RegCloseKey(hKey); } ! m_clbProfiles.SelectString(-1, szProfile); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE *************** *** 111,129 **** CString csProfile; m_clbProfiles.GetText(iSel, csProfile); - if ( csProfile == "< Local >") - csProfile = ""; - if ( csProfile == "< NONE >") - Main->m_bNoScripts = true; // Set the registry key HKEY hKey; LONG lStatus; DWORD dwDisp; - int Yes = 1; - int No = 0; lStatus = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); if (lStatus == ERROR_SUCCESS) { ! lStatus+= RegSetValueEx(hKey, "Remote Profile", 0, REG_SZ, ((BYTE *) csProfile.GetBuffer(csProfile.GetLength())), csProfile.GetLength()); ! lStatus+= RegSetValueEx(hKey, "UseRemoteScripts", 0, REG_DWORD, (BYTE *) (csProfile.GetLength() ? &Yes : &No), sizeof(DWORD)); RegCloseKey(hKey); } --- 136,147 ---- CString csProfile; m_clbProfiles.GetText(iSel, csProfile); // Set the registry key HKEY hKey; LONG lStatus; DWORD dwDisp; lStatus = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); if (lStatus == ERROR_SUCCESS) { ! lStatus+= RegSetValueEx(hKey, "Script Profile", 0, REG_SZ, ((BYTE *) csProfile.GetBuffer(csProfile.GetLength())), csProfile.GetLength()); RegCloseKey(hKey); } Index: CITEM.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CITEM.CPP,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** CITEM.CPP 6 May 2002 04:11:10 -0000 1.6 --- CITEM.CPP 14 May 2002 20:03:34 -0000 1.7 *************** *** 148,152 **** #ifdef _AXIS CString csFileName, csTmpFileName; ! if (Main->m_dwUseRemoteScripts) csFileRoot = "remoteaxis"; csFileName.Format("%s.scp", csFileRoot); --- 148,152 ---- #ifdef _AXIS CString csFileName, csTmpFileName; ! if (Main->GetProfileType() == PROFILE_REMOTE) csFileRoot = "remoteaxis"; csFileName.Format("%s.scp", csFileRoot); *************** *** 156,160 **** if (!csfInput.Open(csFileName, CFile::modeRead | CFile::modeCreate | CFile::modeNoTruncate | CFile::shareDenyWrite)) return false; ! if (Main->m_dwUseRemoteScripts) { if (!csfOutput.Open(csTmpFileName, CFile::modeWrite | CFile::modeCreate | CFile::shareDenyWrite | CFile::typeBinary)) --- 156,160 ---- if (!csfInput.Open(csFileName, CFile::modeRead | CFile::modeCreate | CFile::modeNoTruncate | CFile::shareDenyWrite)) return false; ! if (Main->GetProfileType() == PROFILE_REMOTE) { if (!csfOutput.Open(csTmpFileName, CFile::modeWrite | CFile::modeCreate | CFile::shareDenyWrite | CFile::typeBinary)) *************** *** 244,248 **** csfInput.Close(); csfOutput.Close(); ! if (Main->m_dwUseRemoteScripts) { CRemoteConnection crRemote; --- 244,248 ---- csfInput.Close(); csfOutput.Close(); ! if (Main->GetProfileType() == PROFILE_REMOTE) { CRemoteConnection crRemote; *************** *** 253,257 **** } } ! if (Main->m_dwUseRemoteScripts) { CFile::Remove(csFileName); --- 253,257 ---- } } ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFile::Remove(csFileName); Index: CNPC.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CNPC.CPP,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** CNPC.CPP 6 May 2002 04:11:10 -0000 1.8 --- CNPC.CPP 14 May 2002 20:03:34 -0000 1.9 *************** *** 681,686 **** #ifndef _AXIS CString csFileName, csTmpFileName; ! csFileName.Format(Main->m_dwUseRemoteScripts ? "%s.rmt" : "%s.scp", csFileRoot); ! if (Main->m_dwUseRemoteScripts) csTmpFileName.Format("remoteaxis.tmp"); else --- 681,686 ---- #ifndef _AXIS CString csFileName, csTmpFileName; ! csFileName.Format(Main->GetProfileType() == PROFILE_REMOTE ? "%s.rmt" : "%s.scp", csFileRoot); ! if (Main->GetProfileType() == PROFILE_REMOTE) csTmpFileName.Format("remoteaxis.tmp"); else *************** *** 727,731 **** csLine = csLine.SpanExcluding("]"); DWORD dwThisItem = ahextoi(csLine); ! if (dwThisItem < ahextoi(this->m_csValue) && !Main->m_dwUseRemoteScripts) { csfOutput.WriteString(csIn); --- 727,731 ---- csLine = csLine.SpanExcluding("]"); DWORD dwThisItem = ahextoi(csLine); ! if (dwThisItem < ahextoi(this->m_csValue) && !Main->GetProfileType() == PROFILE_REMOTE) { csfOutput.WriteString(csIn); *************** *** 765,769 **** // otherwise, at this point, it's either a comment, or a tag in an item preceding the one we want, or we've already written the new item // so write the line to the new file ! if (bStatus && !Main->m_dwUseRemoteScripts) { csfOutput.WriteString(csIn); --- 765,769 ---- // otherwise, at this point, it's either a comment, or a tag in an item preceding the one we want, or we've already written the new item // so write the line to the new file ! if (bStatus && !Main->GetProfileType() == PROFILE_REMOTE) { csfOutput.WriteString(csIn); *************** *** 773,777 **** csfInput.Close(); csfOutput.Close(); ! if (Main->m_dwUseRemoteScripts) { CRemoteConnection crRemote; --- 773,777 ---- csfInput.Close(); csfOutput.Close(); ! if (Main->GetProfileType() == PROFILE_REMOTE) { CRemoteConnection crRemote; Index: common.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/common.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** common.cpp 10 May 2002 19:23:49 -0000 1.16 --- common.cpp 14 May 2002 20:03:34 -0000 1.17 *************** *** 2768,2772 **** bool bStatus = false; #ifdef _AXIS ! if ( Main->m_dwUseRemoteScripts ) { bStatus = ReplaceFiles( csNewFile, csRemoteFile ); --- 2768,2772 ---- bool bStatus = false; #ifdef _AXIS ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { bStatus = ReplaceFiles( csNewFile, csRemoteFile ); Index: CScriptObjects.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CScriptObjects.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** CScriptObjects.cpp 10 May 2002 19:23:50 -0000 1.14 --- CScriptObjects.cpp 14 May 2002 20:03:34 -0000 1.15 *************** *** 57,61 **** m_pDlg = NULL; ! if ( Main->m_dwUseRemoteScripts && ! Main->m_bNoScripts ) m_pRemote = new CRemoteConnection; else --- 57,61 ---- m_pDlg = NULL; ! if ( Main->GetProfileType() == PROFILE_REMOTE && !Main->m_bNoScripts ) m_pRemote = new CRemoteConnection; else *************** *** 180,189 **** // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; if ( !CFile::GetStatus(RMT_DEFS_FILE, st) ) { ! if (m_pRemote->IsValid()) m_pRemote->GetCustomFile("graydefs"); } --- 180,189 ---- // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; if ( !CFile::GetStatus(RMT_DEFS_FILE, st) ) { ! if (m_pRemote && m_pRemote->IsValid()) m_pRemote->GetCustomFile("graydefs"); } *************** *** 202,206 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = DEFS_FILE; else --- 202,206 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = DEFS_FILE; else *************** *** 209,214 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_DEFS_FILE); else if ( csScpPath == "" ) csFilename = USER_DEFS_FILE; --- 209,214 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_DEFS_FILE); else if ( csScpPath == "" ) csFilename = USER_DEFS_FILE; *************** *** 228,236 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 228,231 ---- *************** *** 318,322 **** // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 313,317 ---- // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 340,344 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = ITEM_FILE; else --- 335,339 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = ITEM_FILE; else *************** *** 347,352 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_ITEM_FILE); else if ( csScpPath == "" ) csFilename = USER_ITEM_FILE; --- 342,347 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_ITEM_FILE); else if ( csScpPath == "" ) csFilename = USER_ITEM_FILE; *************** *** 366,374 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 361,364 ---- *************** *** 484,488 **** // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 474,478 ---- // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 505,509 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = NPC_FILE; else --- 495,499 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = NPC_FILE; else *************** *** 512,517 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_NPC_FILE); else if ( csScpPath == "" ) csFilename = USER_NPC_FILE; --- 502,507 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_NPC_FILE); else if ( csScpPath == "" ) csFilename = USER_NPC_FILE; *************** *** 531,539 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 521,524 ---- *************** *** 647,651 **** // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 632,636 ---- // Grab the custom file from the remote server if necessary. #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 668,672 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = TEMPLATE_FILE; else --- 653,657 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = TEMPLATE_FILE; else *************** *** 675,682 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_TEMPLATE_FILE); else if ( csScpPath == "" ) ! csFilename = Main->m_dwUseRemoteScripts ? RMT_TEMPLATE_FILE : USER_TEMPLATE_FILE; else csFilename.Format("%s%s", csScpPath, USER_TEMPLATE_FILE); --- 660,667 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_TEMPLATE_FILE); else if ( csScpPath == "" ) ! csFilename = Main->GetProfileType() == PROFILE_REMOTE ? RMT_TEMPLATE_FILE : USER_TEMPLATE_FILE; else csFilename.Format("%s%s", csScpPath, USER_TEMPLATE_FILE); *************** *** 694,702 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 679,682 ---- *************** *** 821,825 **** this->LoadDefs(); CreateProgressDialog(); ! this->LoadFile(Main->m_dwUseRemoteScripts ? RMT_TABLE_FILE : TABLE_FILE, &m_pDlg); */ m_bTablesLoaded = true; --- 801,805 ---- this->LoadDefs(); CreateProgressDialog(); ! this->LoadFile(Main->GetProfileType() == PROFILE_REMOTE ? RMT_TABLE_FILE : TABLE_FILE, &m_pDlg); */ m_bTablesLoaded = true; *************** *** 852,856 **** #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 832,836 ---- #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 874,878 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = MAP_FILE; else --- 854,858 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = MAP_FILE; else *************** *** 881,886 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_MAP_FILE); else if ( csScpPath == "" ) csFilename = USER_MAP_FILE; --- 861,866 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_MAP_FILE); else if ( csScpPath == "" ) csFilename = USER_MAP_FILE; *************** *** 901,909 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 881,884 ---- *************** *** 1019,1023 **** #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 994,998 ---- #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 1041,1045 **** case 0: // This is the regular file ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) csFilename = TRIGGER_FILE; else --- 1016,1020 ---- case 0: // This is the regular file ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) csFilename = TRIGGER_FILE; else *************** *** 1048,1055 **** case 1: // This is the custom file ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_TRIGGER_FILE); else if ( csScpPath == "" ) ! csFilename = Main->m_dwUseRemoteScripts ? RMT_TRIGGER_FILE : USER_TRIGGER_FILE; else csFilename.Format("%s%s", csScpPath, USER_TRIGGER_FILE); --- 1023,1030 ---- case 1: // This is the custom file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_TRIGGER_FILE); else if ( csScpPath == "" ) ! csFilename = Main->GetProfileType() == PROFILE_REMOTE ? RMT_TRIGGER_FILE : USER_TRIGGER_FILE; else csFilename.Format("%s%s", csScpPath, USER_TRIGGER_FILE); *************** *** 1068,1076 **** } Main->m_log.Add("Unable to open file %s", csFilename); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 1043,1046 ---- *************** *** 1187,1195 **** { Main->m_log.Add("Unable to open file %s", i ? USER_LOC_FILE : LOC_FILE ); - if ( i == 0 ) - { - csMessage.Format("Unable to open file %s for input.", LOC_FILE); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - } break; } --- 1157,1160 ---- *************** *** 1285,1289 **** #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 1250,1254 ---- #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 1300,1305 **** CStdioFile csfNames; ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_NAME_FILE); else if ( csScpPath == "" ) csFilename = NAME_FILE; --- 1265,1270 ---- CStdioFile csfNames; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_NAME_FILE); else if ( csScpPath == "" ) csFilename = NAME_FILE; *************** *** 1317,1322 **** } Main->m_log.Add("Unable to open file %s", csFilename); - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return; } --- 1282,1285 ---- *************** *** 1423,1427 **** #ifdef _AXIS ! if (Main->m_dwUseRemoteScripts) { CFileStatus st; --- 1386,1390 ---- #ifdef _AXIS ! if (Main->GetProfileType() == PROFILE_REMOTE) { CFileStatus st; *************** *** 1438,1443 **** CStdioFile csfSpeech; ! if ( Main->m_dwUseRemoteScripts ) ! csFilename.Format("%s\\%s", Main->m_csRemoteProfile, RMT_SPEECH_FILE); else if ( csScpPath == "" ) csFilename = SPEECH_FILE; --- 1401,1406 ---- CStdioFile csfSpeech; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename.Format("%s\\%s", Main->GetProfileString(), RMT_SPEECH_FILE); else if ( csScpPath == "" ) csFilename = SPEECH_FILE; *************** *** 1455,1460 **** } Main->m_log.Add("Unable to open file %s", csFilename); - csMessage.Format("Unable to open file %s for input.", csFilename); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); return; } --- 1418,1421 ---- *************** *** 2015,2023 **** if ( !csfInput.Open(csFile, CFile::modeRead | CFile::shareDenyNone) ) { - #if 0 - CString csMessage; - csMessage.Format("Unable to open script file %s", csFile); - AfxMessageBox(csMessage, MB_OK | MB_ICONEXCLAMATION); - #endif Main->m_log.Add("Unable to open file %s", csFile); return false; --- 1976,1979 ---- *************** *** 2528,2532 **** CreateProgressDialog(); m_bDeleteDialog = false; ! if ( Main->m_dwUseRemoteScripts ) { #ifdef _AXIS --- 2484,2488 ---- CreateProgressDialog(); m_bDeleteDialog = false; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { #ifdef _AXIS *************** *** 2582,2586 **** } // Some of the resource entries may be directories ! if ( !Main->m_dwUseRemoteScripts ) { int i = 0; --- 2538,2542 ---- } // Some of the resource entries may be directories ! if ( Main->GetProfileType() != PROFILE_REMOTE ) { int i = 0; *************** *** 2646,2650 **** if ( csFilename == "" ) continue; ! if ( Main->m_dwUseRemoteScripts ) { CString csFile; --- 2602,2606 ---- if ( csFilename == "" ) continue; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CString csFile; *************** *** 2672,2684 **** else csLoadFile = csFilename; ! if ( Main->m_dwUseRemoteScripts ) csFilename = csLoadFile; } else csLoadFile = csFilename; ! if ( Main->m_dwUseRemoteScripts ) { csFilename.Replace(':', '!'); ! csLoadFile.Format("%s\\%s\\%s", cwd, Main->m_csRemoteProfile, csFilename); } CString csTest = csFilename; --- 2628,2640 ---- else csLoadFile = csFilename; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) csFilename = csLoadFile; } else csLoadFile = csFilename; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { csFilename.Replace(':', '!'); ! csLoadFile.Format("%s\\%s\\%s", cwd, Main->GetProfileString(), csFilename); } CString csTest = csFilename; *************** *** 2697,2702 **** GetPrivateProfileString("SPHERE", "SCPFILES", "", szScriptPath, sizeof(szScriptPath), INI_FILE); CString csTestPath; ! if ( Main->m_dwUseRemoteScripts ) ! csTestPath.Format("%s\\", Main->m_csRemoteProfile); else { --- 2653,2658 ---- GetPrivateProfileString("SPHERE", "SCPFILES", "", szScriptPath, sizeof(szScriptPath), INI_FILE); CString csTestPath; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csTestPath.Format("%s\\", Main->GetProfileString()); else { Index: DefEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/DefEditDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** DefEditDlg.cpp 1 May 2002 03:33:09 -0000 1.4 --- DefEditDlg.cpp 14 May 2002 20:03:34 -0000 1.5 *************** *** 143,148 **** return; } ! if ( Main->m_dwUseRemoteScripts || csScpPath == "") ! csFile = Main->m_dwUseRemoteScripts ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format("%s%s", csScpPath, USER_DEFS_FILE); --- 143,148 ---- return; } ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "") ! csFile = Main->GetProfileType() == PROFILE_REMOTE ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format("%s%s", csScpPath, USER_DEFS_FILE); *************** *** 223,227 **** // Make sure we have the tusdefs.scp file ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; --- 223,227 ---- // Make sure we have the tusdefs.scp file ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; *************** *** 271,276 **** csfDefsFile.Close(); } ! if ( Main->m_dwUseRemoteScripts || csScpPath == "" ) ! csFile = Main->m_dwUseRemoteScripts ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format("%s%s", csScpPath, USER_DEFS_FILE); --- 271,276 ---- csfDefsFile.Close(); } ! if ( Main->GetProfileType() == PROFILE_REMOTE || csScpPath == "" ) ! csFile = Main->GetProfileType() == PROFILE_REMOTE ? RMT_DEFS_FILE : USER_DEFS_FILE; else csFile.Format("%s%s", csScpPath, USER_DEFS_FILE); Index: Drewsky.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** Drewsky.cpp 10 May 2002 19:23:50 -0000 1.11 --- Drewsky.cpp 14 May 2002 20:03:34 -0000 1.12 *************** *** 89,93 **** #endif ! m_log.Add("Starting %s, built %s, %s", Main->GetVersionTitle(), Main->GetBuildTimestamp()); // Find the path to the UO files --- 89,93 ---- #endif ! m_log.Add("Starting %s, built %s", Main->GetVersionTitle(), Main->GetBuildTimestamp()); // Find the path to the UO files *************** *** 107,115 **** m_dwSpawnMessage = 0; m_dwStartLauncher = 0; ! m_dwDrawItems = 0; ! m_dw3DRoomView = 0; ! m_dwScaleItems = 0; m_dwAlwaysOnTop = 0; ! m_dwShowRadar = 0; m_dwUseRemoteScripts = 0; m_dwShowSpawnpoints = 0; --- 107,116 ---- m_dwSpawnMessage = 0; m_dwStartLauncher = 0; ! m_dwDrawItems = 1; ! m_dwDrawChars = 1; ! m_dw3DRoomView = 1; ! m_dwScaleItems = 1; m_dwAlwaysOnTop = 0; ! m_dwShowRadar = 1; m_dwUseRemoteScripts = 0; m_dwShowSpawnpoints = 0; *************** *** 184,194 **** m_csPosition = GetRegistryString("Position"); ! m_csRemoteProfile = GetRegistryString("Remote Profile"); ! if ( m_csRemoteProfile != "" ) { CString csKey; m_log.Add("Retrieving remote profiles"); ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", m_csRemoteProfile); m_csUserID = GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); m_csPassword = GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); --- 185,195 ---- m_csPosition = GetRegistryString("Position"); ! m_csProfile = GetRegistryString("Script Profile"); ! if ( GetProfileType() == PROFILE_REMOTE ) { CString csKey; m_log.Add("Retrieving remote profiles"); ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", GetProfileString()); m_csUserID = GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); m_csPassword = GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); *************** *** 312,324 **** // Read the scripts m_pScripts = new CScriptObjects; ! if ( !m_bNoScripts ) { m_log.Add("Loading scripts"); this->m_pScripts->LoadAll(); } - else - { - this->m_pScripts->LoadAll(); - } m_log.Add("Ready to display main window"); int nResponse = dlg.DoModal(); --- 313,321 ---- // Read the scripts m_pScripts = new CScriptObjects; ! if ( GetProfileType() != PROFILE_NONE ) { m_log.Add("Loading scripts"); this->m_pScripts->LoadAll(); } m_log.Add("Ready to display main window"); int nResponse = dlg.DoModal(); *************** *** 524,526 **** --- 521,552 ---- csTimestamp.Format("%s %s", __DATE__, __TIME__); return csTimestamp; + } + + CString CDrewskyApp::GetProfileString() + { + if ( m_csProfile.Find(": ", 0) != -1 ) + return m_csProfile.Mid(m_csProfile.Find(": ") + 2); + else + return ""; + } + + int CDrewskyApp::GetProfileType() + { + if ( m_csProfile.Find(": ", 0) != -1 ) + { + CString csType; + csType = m_csProfile.SpanExcluding(": "); + if ( csType.CompareNoCase("Local") == 0 ) + return PROFILE_LOCAL; + if ( csType.CompareNoCase("Remote") == 0 ) + return PROFILE_REMOTE; + } + else + { + if ( m_csProfile.Find("NONE") != -1 ) + return PROFILE_NONE; + if ( m_csProfile.Find("DEFAULT") != -1 ) + return PROFILE_DEFAULT; + } + return PROFILE_UNDEFINED; } Index: Drewsky.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** Drewsky.h 10 May 2002 19:23:50 -0000 1.8 --- Drewsky.h 14 May 2002 20:03:34 -0000 1.9 *************** *** 65,68 **** --- 65,70 ---- CString GetVersionTitle(); CString GetBuildTimestamp(); + CString GetProfileString(); + int GetProfileType(); void DeleteRegistryKey(CString csKeyName, HKEY hRootKey = HKEY_LOCAL_MACHINE); void PutRegistryDword(CString csValue, DWORD dwValue, HKEY hMainKey = HKEY_LOCAL_MACHINE, CString csSubKey = "SOFTWARE\\Menasoft\\GM Tools"); *************** *** 80,83 **** --- 82,86 ---- DWORD m_dwStartLauncher; DWORD m_dwDrawItems; + DWORD m_dwDrawChars; DWORD m_dw3DRoomView; DWORD m_dwScaleItems; *************** *** 107,111 **** CString m_csSpherePort; CString m_csAxissvrPort; ! CString m_csRemoteProfile; CString m_csMonPassword; CRemoteConsole * m_pRConsole; --- 110,114 ---- CString m_csSpherePort; CString m_csAxissvrPort; ! CString m_csProfile; CString m_csMonPassword; CRemoteConsole * m_pRConsole; Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** drewsky.rc 12 May 2002 16:24:18 -0000 1.34 --- drewsky.rc 14 May 2002 20:03:34 -0000 1.35 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // Last compiled 5/12/2002 at 10:22:58 #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // #include "resource.h" *************** *** 622,628 **** CONTROL "Only load RESOURCE scripts",IDC_RESOURCEONLY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,100,109,10 ! CONTROL "Read from Remote Server",IDC_USEREMOTE,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,173,12,103,10 ! LISTBOX IDC_REMOTEPROFILES,174,25,103,71,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "New",IDC_RP_NEW,179,98,30,14 --- 622,626 ---- CONTROL "Only load RESOURCE scripts",IDC_RESOURCEONLY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,100,109,10 ! LISTBOX IDC_REMOTEPROFILES,174,12,103,84,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "New",IDC_RP_NEW,179,98,30,14 *************** *** 642,646 **** PUSHBUTTON "Refresh Categories",IDC_REFRESHCATEGORIES,369,29,85,13 GROUPBOX "Actions",IDC_STATIC,283,2,75,112 ! GROUPBOX "Remote Profiles",IDC_STATIC,168,2,113,112 LTEXT "NPC Spawn Color",IDC_STATIC,374,69,58,8,NOT WS_GROUP LTEXT "Item Spawn Color",IDC_STATIC,374,80,56,8,NOT WS_GROUP --- 640,644 ---- PUSHBUTTON "Refresh Categories",IDC_REFRESHCATEGORIES,369,29,85,13 GROUPBOX "Actions",IDC_STATIC,283,2,75,112 ! GROUPBOX "Profiles",IDC_STATIC,168,2,113,112 LTEXT "NPC Spawn Color",IDC_STATIC,374,69,58,8,NOT WS_GROUP LTEXT "Item Spawn Color",IDC_STATIC,374,80,56,8,NOT WS_GROUP *************** *** 2249,2262 **** END ! IDD_ADDITIONAL_SETTINGS DIALOG DISCARDABLE 0, 0, 374, 270 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Axis Configuration" FONT 8, "MS Sans Serif" BEGIN ! DEFPUSHBUTTON "OK",IDOK,317,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,317,24,50,14 ! GROUPBOX "Display Settings",IDC_STATIC,7,120,170,143 ! GROUPBOX "Basic Axis Settings",IDC_STATIC,7,7,170,111 ! GROUPBOX "Script Profiles",IDC_STATIC,180,39,187,224 CONTROL "Display message when spawnpoint is initialized", IDC_AS_SPAWNMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10, --- 2247,2260 ---- END ! IDD_ADDITIONAL_SETTINGS DIALOG DISCARDABLE 0, 0, 378, 310 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Axis Configuration" FONT 8, "MS Sans Serif" BEGIN ! DEFPUSHBUTTON "OK",IDOK,321,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,321,24,50,14 ! GROUPBOX "Display Settings",IDC_STATIC,7,133,170,176 ! GROUPBOX "Basic Axis Settings",IDC_STATIC,7,7,169,122 ! GROUPBOX "Script Profiles",IDC_STATIC,184,44,187,259 CONTROL "Display message when spawnpoint is initialized", IDC_AS_SPAWNMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10, *************** *** 2281,2309 **** CONTROL "Display pictures in Spawn Tab",IDC_AS_SHOWCHARS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,10,106,111,10 ! GROUPBOX "Default Ultima Online Client file",IDC_STATIC,12,130, 162,25 ! GROUPBOX "Default Mulfile Path",IDC_STATIC,12,156,162,38 CONTROL "Use same path as default client", IDC_AS_USESAMEPATHASCLIENT,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,16,181,131,11 ! GROUPBOX "Mulfile Overrides",IDC_STATIC,12,195,162,64 ! PUSHBUTTON "Browse",IDC_AS_CLIENTBROWSE,140,138,30,13 ! PUSHBUTTON "Browse",IDC_AS_MULBROWSE,140,166,30,13 CONTROL "List1",IDC_AS_CUSTOMMULS,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,15,205,155,51 ! LTEXT "Default Client EXE",IDC_AS_DEFUALTCLIENT,16,139,108,10, SS_CENTERIMAGE ! LTEXT "Default Mulfile Path",IDC_AS_DEFUALTMULPATH,16,168,108, 10,SS_CENTERIMAGE ! LTEXT "Profiles",IDC_STATIC,185,47,24,8 ! LISTBOX IDC_AS_PROFILES,184,55,180,55,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Available Scripts",IDC_STATIC,187,126,53,8 ! PUSHBUTTON "New",IDC_AS_NEWPROFILE,208,113,33,11 ! PUSHBUTTON "Edit",IDC_AS_EDITPROFILE,257,113,33,11 ! PUSHBUTTON "Delete",IDC_AS_DELETEPROFILE,306,113,33,11 CONTROL "Tree1",IDC_AS_AVAILABLESCRIPTS,"SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | ! TVS_CHECKBOXES | WS_BORDER | WS_TABSTOP,186,134,178,127 END --- 2279,2309 ---- CONTROL "Display pictures in Spawn Tab",IDC_AS_SHOWCHARS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,10,106,111,10 ! GROUPBOX "Default Ultima Online Client file",IDC_STATIC,12,142, 162,25 ! GROUPBOX "Default Mulfile Path",IDC_STATIC,12,168,162,38 CONTROL "Use same path as default client", IDC_AS_USESAMEPATHASCLIENT,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,16,193,131,11 ! GROUPBOX "Mulfile Overrides",IDC_STATIC,12,206,162,93 ! PUSHBUTTON "Browse",IDC_AS_CLIENTBROWSE,140,150,30,13 ! PUSHBUTTON "Browse",IDC_AS_MULBROWSE,140,178,30,13 CONTROL "List1",IDC_AS_CUSTOMMULS,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,15,216,155,80 ! LTEXT "Default Client EXE",IDC_AS_DEFUALTCLIENT,16,151,108,10, SS_CENTERIMAGE ! LTEXT "Default Mulfile Path",IDC_AS_DEFUALTMULPATH,16,180,108, 10,SS_CENTERIMAGE ! LTEXT "Profiles",IDC_STATIC,189,53,24,8 ! LISTBOX IDC_AS_PROFILES,188,61,180,55,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Available Scripts",IDC_STATIC,191,131,53,8 ! PUSHBUTTON "New",IDC_AS_NEWPROFILE,212,119,33,11 ! PUSHBUTTON "Edit",IDC_AS_EDITPROFILE,261,119,33,11 ! PUSHBUTTON "Delete",IDC_AS_DELETEPROFILE,310,119,33,11 CONTROL "Tree1",IDC_AS_AVAILABLESCRIPTS,"SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | ! TVS_CHECKBOXES | WS_BORDER | WS_TABSTOP,190,140,178,160 ! CONTROL "Allow Multiple Instances of Axis",IDC_AS_ALLOWMULTIPLE, ! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,116,112,9 END *************** *** 2886,2892 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 367 TOPMARGIN, 7 ! BOTTOMMARGIN, 263 END END --- 2886,2892 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 371 TOPMARGIN, 7 ! BOTTOMMARGIN, 303 END END Index: EditorTab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/EditorTab.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** EditorTab.cpp 1 May 2002 03:33:10 -0000 1.4 --- EditorTab.cpp 14 May 2002 20:03:34 -0000 1.5 *************** *** 176,180 **** CPropertyPage::OnShowWindow(bShow, nStatus); ! //this->m_cbRawEdit.ShowWindow( Main->m_dwUseRemoteScripts ? SW_HIDE : SW_SHOW ); } --- 176,180 ---- CPropertyPage::OnShowWindow(bShow, nStatus); ! //this->m_cbRawEdit.ShowWindow( Main->GetProfileType() == PROFILE_REMOTE ? SW_HIDE : SW_SHOW ); } Index: ItemScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ItemScriptEditDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ItemScriptEditDlg.cpp 1 May 2002 03:33:10 -0000 1.5 --- ItemScriptEditDlg.cpp 14 May 2002 20:03:34 -0000 1.6 *************** *** 883,887 **** } } ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; --- 883,887 ---- } } ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** MISCTAB.CPP 10 May 2002 19:23:50 -0000 1.10 --- MISCTAB.CPP 14 May 2002 20:03:34 -0000 1.11 *************** *** 933,937 **** { Main->m_log.Add("Trying to start Sphere server"); ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; --- 933,937 ---- { Main->m_log.Add("Trying to start Sphere server"); ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; Index: remoteconnection.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/remoteconnection.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** remoteconnection.cpp 10 May 2002 00:05:45 -0000 1.18 --- remoteconnection.cpp 14 May 2002 20:03:34 -0000 1.19 *************** *** 432,436 **** csRemoteFileName = csFile; if ( csLocalFile == "" ) ! csLocalFile.Format("%s\\%s", Main->m_csRemoteProfile, csRemoteFileName); csLocalFile.Replace(':', '!'); csLocalFile.Replace('/', '\\'); --- 432,436 ---- csRemoteFileName = csFile; if ( csLocalFile == "" ) ! csLocalFile.Format("%s\\%s", Main->GetProfileString(), csRemoteFileName); csLocalFile.Replace(':', '!'); csLocalFile.Replace('/', '\\'); *************** *** 632,637 **** break; default: ! if (csFile.Find(Main->m_csRemoteProfile) != -1 ) ! csFileName = csFile.Mid(csFile.Find(Main->m_csRemoteProfile) + Main->m_csRemoteProfile.GetLength() + 1); else csFileName = csFile; --- 632,637 ---- break; default: ! if (csFile.Find(Main->GetProfileString()) != -1 ) ! csFileName = csFile.Mid(csFile.Find(Main->GetProfileString()) + Main->GetProfileString().GetLength() + 1); else csFileName = csFile; *************** *** 916,923 **** // Try to read files that are already here... CString csFile; ! csFile.Format("%s\\%s", Main->m_csRemoteProfile, INI_FILE); Main->m_pScripts->LoadFile(csFile); Main->m_pScripts->m_config.Read(); ! csFile.Format("%s\\%s", Main->m_csRemoteProfile, TABLE_FILE); if ( !Main->m_pScripts->LoadFile(csFile) ) { --- 916,923 ---- // Try to read files that are already here... CString csFile; ! csFile.Format("%s\\%s", Main->GetProfileString(), INI_FILE); Main->m_pScripts->LoadFile(csFile); Main->m_pScripts->m_config.Read(); ! csFile.Format("%s\\%s", Main->GetProfileString(), TABLE_FILE); if ( !Main->m_pScripts->LoadFile(csFile) ) { *************** *** 925,929 **** if ( csScpPath.GetLength() > 0 && ( csScpPath.GetAt(csScpPath.GetLength() - 1) == '\\' || csScpPath.GetAt(csScpPath.GetLength() -1) == '/' ) ) csScpPath.SetAt(csScpPath.GetLength() - 1, 0x00); ! csFile.Format("%s\\%s\\%s", Main->m_csRemoteProfile, csScpPath, TABLE_FILE); Main->m_pScripts->LoadFile(csFile); } --- 925,929 ---- if ( csScpPath.GetLength() > 0 && ( csScpPath.GetAt(csScpPath.GetLength() - 1) == '\\' || csScpPath.GetAt(csScpPath.GetLength() -1) == '/' ) ) csScpPath.SetAt(csScpPath.GetLength() - 1, 0x00); ! csFile.Format("%s\\%s\\%s", Main->GetProfileString(), csScpPath, TABLE_FILE); Main->m_pScripts->LoadFile(csFile); } *************** *** 941,945 **** unsigned int iChk = atoi(szBuffer); CString csFileName; ! csFileName.Format("%s\\%s", Main->m_csRemoteProfile, INI_FILE); csMessage.Format("Checking for an updated version of %s", INI_FILE); if ( m_pDlg ) --- 941,945 ---- unsigned int iChk = atoi(szBuffer); CString csFileName; ! csFileName.Format("%s\\%s", Main->GetProfileString(), INI_FILE); csMessage.Format("Checking for an updated version of %s", INI_FILE); if ( m_pDlg ) *************** *** 958,963 **** Receive(&szBuffer[0], sizeof(szBuffer)); iChk = atoi(szBuffer); ! csFileName.Format("%s\\%s", Main->m_csRemoteProfile, TABLE_FILE); ! CreateDirectory(Main->m_csRemoteProfile, NULL); iTest = GetChecksum(csFileName); if ( iChk != iTest ) --- 958,963 ---- Receive(&szBuffer[0], sizeof(szBuffer)); iChk = atoi(szBuffer); ! csFileName.Format("%s\\%s", Main->GetProfileString(), TABLE_FILE); ! CreateDirectory(Main->GetProfileString(), NULL); iTest = GetChecksum(csFileName); if ( iChk != iTest ) *************** *** 977,981 **** sprintf(szCmd, "GFCS%s\\%s", csScpPath, TABLE_FILE); csRemoteFile.Format("%s\\%s", csScpPath, TABLE_FILE); ! csFileName.Format("%s\\%s\\%s", Main->m_csRemoteProfile, csScpPath, TABLE_FILE); csMessage.Format("Checking for an updated version of %s", TABLE_FILE); if ( m_pDlg ) --- 977,981 ---- sprintf(szCmd, "GFCS%s\\%s", csScpPath, TABLE_FILE); csRemoteFile.Format("%s\\%s", csScpPath, TABLE_FILE); ! csFileName.Format("%s\\%s\\%s", Main->GetProfileString(), csScpPath, TABLE_FILE); csMessage.Format("Checking for an updated version of %s", TABLE_FILE); if ( m_pDlg ) *************** *** 999,1003 **** memset(&szScriptPath[0], 0x00, sizeof(szScriptPath)); CString csConfigFile; ! csConfigFile.Format("%s\\%s", Main->m_csRemoteProfile, INI_FILE); GetPrivateProfileString("SPHERE", "SCPFILES", "", &szScriptPath[0], sizeof(szScriptPath), csConfigFile); */ --- 999,1003 ---- memset(&szScriptPath[0], 0x00, sizeof(szScriptPath)); CString csConfigFile; ! csConfigFile.Format("%s\\%s", Main->GetProfileString(), INI_FILE); GetPrivateProfileString("SPHERE", "SCPFILES", "", &szScriptPath[0], sizeof(szScriptPath), csConfigFile); */ *************** *** 1040,1048 **** if ( csFile.Find('\\') == -1 ) { ! csLocalFile.Format("%s\\%s\\%s", Main->m_csRemoteProfile, csScpPath, csFile); csFilename.Format("%s\\%s", csScpPath, csFilename); } else ! csLocalFile.Format("%s\\%s", Main->m_csRemoteProfile, csFile); sprintf(szCmd, "GFCS%s", csFilename); Send(szCmd, strlen(szCmd)); --- 1040,1048 ---- if ( csFile.Find('\\') == -1 ) { ! csLocalFile.Format("%s\\%s\\%s", Main->GetProfileString(), csScpPath, csFile); csFilename.Format("%s\\%s", csScpPath, csFilename); } else ! csLocalFile.Format("%s\\%s", Main->GetProfileString(), csFile); sprintf(szCmd, "GFCS%s", csFilename); Send(szCmd, strlen(szCmd)); Index: RemoteConsole.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteConsole.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** RemoteConsole.cpp 10 May 2002 19:22:47 -0000 1.8 --- RemoteConsole.cpp 14 May 2002 20:03:35 -0000 1.9 *************** *** 44,48 **** CString csSavePath; // Try to find out where to connect to ! if (Main->m_dwUseRemoteScripts) { m_csHostAddress = Main->m_csServerIP; --- 44,48 ---- CString csSavePath; // Try to find out where to connect to ! if (Main->GetProfileType() == PROFILE_REMOTE) { m_csHostAddress = Main->m_csServerIP; *************** *** 504,516 **** void CRemoteConsole::Pause() { ! // Check first to see if it is connected ! if ( ! this->m_bIsConnected ) ! Reconnect(); ! m_bCommandPending = true; if ( this->m_bIsConnected ) { - this->m_csCommand.Format( "R%c", 0x0d ); int i = 0; ! while (m_bCommandPending && i < 100) { Sleep(100); --- 504,513 ---- void CRemoteConsole::Pause() { ! this->m_csCommand.Format( "R%c", 0x0d ); ! this->m_bCommandPending = true; if ( this->m_bIsConnected ) { int i = 0; ! while(this->m_bCommandPending && i < 100) { Sleep(100); *************** *** 521,525 **** { CString csMessage; ! csMessage.Format("Axis is not connected to the Sphere Server.\nIf it is running, please pause/resync it manually.\n\nTo pause/resync the Sphere server, type 'R' at the console.\nIf it ins't running, ignore this message."); AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); m_bCommandPending = false; --- 518,522 ---- { CString csMessage; ! csMessage.Format("Axis is not connected to the Sphere Server.\nIf it is running, please pause/resync it manually.\n\nTo pause/resync the Sphere server, type 'R' at the console.\nIf it isn't running, ignore this message."); AfxMessageBox( csMessage, MB_OK | MB_ICONEXCLAMATION ); m_bCommandPending = false; Index: RemoteFileDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteFileDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** RemoteFileDlg.cpp 1 May 2002 03:33:10 -0000 1.5 --- RemoteFileDlg.cpp 14 May 2002 20:03:35 -0000 1.6 *************** *** 117,121 **** else m_csRemoteFile.Format("%s\\%s", m_csPath, m_csFilename); ! m_csFilename.Format("%s\\%s", Main->m_csRemoteProfile, m_csRemoteFile); //m_csFilename.Replace("\\", "_"); //m_csFilename.Replace(".", "-"); --- 117,121 ---- else m_csRemoteFile.Format("%s\\%s", m_csPath, m_csFilename); ! m_csFilename.Format("%s\\%s", Main->GetProfileString(), m_csRemoteFile); //m_csFilename.Replace("\\", "_"); //m_csFilename.Replace(".", "-"); Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** resource.h 10 May 2002 19:23:50 -0000 1.24 --- resource.h 14 May 2002 20:03:35 -0000 1.25 *************** *** 1276,1279 **** --- 1276,1280 ---- #define IDC_AS_DEFUALTMULPATH 1396 #define IDC_AS_AVAILABLESCRIPTS 1398 + #define IDC_AS_ALLOWMULTIPLE 1399 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 1310,1314 **** #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1399 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 1311,1315 ---- #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1400 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: ScriptEditDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ScriptEditDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ScriptEditDlg.cpp 1 May 2002 03:33:10 -0000 1.5 --- ScriptEditDlg.cpp 14 May 2002 20:03:35 -0000 1.6 *************** *** 98,102 **** { CDialog::OnInitDialog(); ! if ( Main->m_dwUseRemoteScripts ) { CRemoteFileDlg dlg; --- 98,102 ---- { CDialog::OnInitDialog(); ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteFileDlg dlg; *************** *** 177,181 **** else pConsole = new (CRemoteConsole); ! if ( !Main->m_dwUseRemoteScripts ) pConsole->Pause(); --- 177,181 ---- else pConsole = new (CRemoteConsole); ! if ( Main->GetProfileType() != PROFILE_REMOTE ) pConsole->Pause(); *************** *** 201,205 **** } } ! if ( Main->m_dwUseRemoteScripts ) { CRemoteConnection remote; --- 201,205 ---- } } ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; *************** *** 207,211 **** CFile::Remove(m_csFilename); } ! if ( !Main->m_dwUseRemoteScripts ) pConsole->Resync(); if ( bDeleteConsole ) --- 207,211 ---- CFile::Remove(m_csFilename); } ! if ( Main->GetProfileType() != PROFILE_REMOTE ) pConsole->Resync(); if ( bDeleteConsole ) *************** *** 216,220 **** void CScriptEditDlg::OnCancel() { ! if ( Main->m_dwUseRemoteScripts && m_csFilename != "" ... [truncated message content] |