sphere-axis-commits Mailing List for Axis for Sphere
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...> - 2004-04-22 18:56:33
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28929 Modified Files: Axis.sln Log Message: no message Index: Axis.sln =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.sln,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Axis.sln 19 Jun 2003 21:38:28 -0000 1.9 --- Axis.sln 22 Apr 2004 18:56:25 -0000 1.10 *************** *** 24,27 **** --- 24,29 ---- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CC_Sphere", "CC_Sphere\CC_Sphere.csproj", "{4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S_Sphere55", "S_Sphere55\S_Sphere55.vcproj", "{6E062D16-2F8F-4E80-8E23-A0EA25939F25}" + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 34,42 **** EndGlobalSection GlobalSection(ProjectDependencies) = postSolution ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.0 = {F592829A-6A02-43AF-A04F-CC81615805EF} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.1 = {283AA9B4-58DF-42D2-8050-59F631661A1A} {24511912-DBD6-4F14-8014-32E4F961C5D5}.2 = {52C0CF6C-70BC-4A00-B25B-88782372914F} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.3 = {A3262B43-56CE-4D79-83D3-0DB671456E28} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.4 = {4DB8875A-2964-4843-A469-879E1672A181} {3ECDA872-C8AF-464E-80EE-3976E9DE72B2}.0 = {39ADE5E8-846A-4164-BBF2-A905CB3334BD} EndGlobalSection --- 36,44 ---- EndGlobalSection GlobalSection(ProjectDependencies) = postSolution ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.0 = {4DB8875A-2964-4843-A469-879E1672A181} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.1 = {A3262B43-56CE-4D79-83D3-0DB671456E28} {24511912-DBD6-4F14-8014-32E4F961C5D5}.2 = {52C0CF6C-70BC-4A00-B25B-88782372914F} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.3 = {283AA9B4-58DF-42D2-8050-59F631661A1A} ! {24511912-DBD6-4F14-8014-32E4F961C5D5}.4 = {F592829A-6A02-43AF-A04F-CC81615805EF} {3ECDA872-C8AF-464E-80EE-3976E9DE72B2}.0 = {39ADE5E8-846A-4164-BBF2-A905CB3334BD} EndGlobalSection *************** *** 185,188 **** --- 187,202 ---- {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.Unicode Release.ActiveCfg = Release|.NET {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.Unicode Release.Build.0 = Release|.NET + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Debug.ActiveCfg = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Debug.Build.0 = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.FIPS 140 Debug.ActiveCfg = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.FIPS 140 Debug.Build.0 = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.FIPS 140 Release.ActiveCfg = Release|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.FIPS 140 Release.Build.0 = Release|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Release.ActiveCfg = Release|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Release.Build.0 = Release|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Unicode Debug.ActiveCfg = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Unicode Debug.Build.0 = Debug|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Unicode Release.ActiveCfg = Release|Win32 + {6E062D16-2F8F-4E80-8E23-A0EA25939F25}.Unicode Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
From: Philip E. <pes...@us...> - 2004-04-22 18:54:50
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere55 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28532 Modified Files: ScriptsMain.cpp Log Message: no message Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere55/ScriptsMain.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ScriptsMain.cpp 16 Apr 2004 20:59:34 -0000 1.1 --- ScriptsMain.cpp 22 Apr 2004 18:54:39 -0000 1.2 *************** *** 2838,2843 **** if ( csaScripts.GetSize() > 0 ) { - // Load the specified scripts - //this->m_bNewFormat = true; /* m_pRemote->SetDialog(m_pDlg); --- 2838,2841 ---- *************** *** 2921,2925 **** { this->LoadFile(_T("custloc.scp")); - // this->m_bNewFormat = true; CategorizeLocations(); CategorizeItems(); --- 2919,2922 ---- *************** *** 3000,3090 **** } } ! if ( this->m_tables.m_resources.GetSize() > 0 ) ! { ! TCHAR szCount[MAX_BUFFER]; ! _stprintf(szCount, _T("%ld"), m_tables.m_resources.GetSize()); ! LOG( locale->String(IDS_SCRIPTS_FOUNDRESOURCES), szCount); ! LOG( locale->String(IDS_SCRIPTS_NEWSCRIPTS)); ! //m_bNewFormat = true; ! // We've got resources to deal with here ! for ( int index = 0; index < this->m_tables.m_resources.GetSize(); index++ ) ! { ! CString csFilename = this->m_tables.m_resources.GetAt(index); ! if ( csFilename.Find(_T("//")) != -1 ) ! csFilename = csFilename.Left(csFilename.Find(_T("//"))); ! if ( csFilename == _T("") ) ! continue; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! { ! CString csFile; ! if ( csFilename.GetAt(0) == _T('\\') || csFilename.GetAt(0) == _T('/')) ! csFile = csFilename.Mid(1); ! else ! csFile = csFilename; ! csFilename = csFile; ! } ! // See if there was no path specified here...if not, try using the SCPFILES path ! if ( csFilename.Find(_T('\\')) == -1 && csFilename.Find(_T('/')) == -1 ) ! { ! CString csScpPath = Main->m_pScripts->m_config.m_sSCPBaseDir; ! if ( csScpPath.GetLength() > 0 && ( csScpPath.GetAt(csScpPath.GetLength() - 1) == _T('\\') || csScpPath.GetAt(csScpPath.GetLength() -1) == _T('/') ) ) ! csScpPath.SetAt(csScpPath.GetLength() - 1, 0x00); ! if ( csScpPath.GetLength() > 0 ) ! csLoadFile.Format(_T("%s\\%s"), csScpPath, csFilename); ! else ! csLoadFile = csFilename; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! csFilename = csLoadFile; ! } else { ! if ( csFilename.Find(_T(":")) == -1 ) ! { ! if ( this->m_csRootDirectory.GetLength() > 0 ) ! csLoadFile.Format(_T("%s\\%s"), this->m_csRootDirectory, csFilename); ! else ! csLoadFile = csFilename; ! } else csLoadFile = csFilename; } ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! { ! csFilename.Replace(_T(':'), _T('!')); ! csLoadFile.Format(_T("%s\\%s\\%s"), cwd, Main->GetProfileString(), csFilename); ! } ! CString csTest = csFilename; ! csTest.MakeLower(); ! if ( csTest.Find(TABLE_FILE) == -1 ) ! LoadFile(csLoadFile); } ! this->LoadFile(_T("hoglocs.scp")); ! this->LoadFile(_T("custloc.scp")); ! } ! else ! { ! // This must be the old script format ! LOG( locale->String(IDS_SCRIPTS_OLDSCRIPTS)); ! CreateProgressDialog(); ! this->LoadDefs(); ! this->LoadItems(); ! this->LoadLocations(); ! this->LoadMap(); ! this->LoadNames(); ! this->LoadNPCs(); ! this->LoadSpeechBlocks(); ! this->LoadTables(); ! this->LoadTemplates(); ! this->LoadTriggers(); } this->CategorizeItems(); this->CategorizeLocations(); this->CategorizeNPCs(); LOG( locale->String(IDS_SCRIPTS_FINISHEDLOADING)); - /* - if ( m_pRemote ) - m_pRemote->SetDialog(NULL); - */ m_bDeleteDialog = true; DestroyProgressDialog(); --- 2997,3063 ---- } } ! TCHAR szCount[MAX_BUFFER]; ! _stprintf(szCount, _T("%ld"), m_tables.m_resources.GetSize()); ! LOG( locale->String(IDS_SCRIPTS_FOUNDRESOURCES), szCount); ! LOG( locale->String(IDS_SCRIPTS_NEWSCRIPTS)); ! for ( int index = 0; index < this->m_tables.m_resources.GetSize(); index++ ) ! { ! CString csFilename = this->m_tables.m_resources.GetAt(index); ! if ( csFilename.Find(_T("//")) != -1 ) ! csFilename = csFilename.Left(csFilename.Find(_T("//"))); ! if ( csFilename == _T("") ) ! continue; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! { ! CString csFile; ! if ( csFilename.GetAt(0) == _T('\\') || csFilename.GetAt(0) == _T('/')) ! csFile = csFilename.Mid(1); ! else ! csFile = csFilename; ! csFilename = csFile; ! } ! // See if there was no path specified here...if not, try using the SCPFILES path ! if ( csFilename.Find(_T('\\')) == -1 && csFilename.Find(_T('/')) == -1 ) ! { ! CString csScpPath = Main->m_pScripts->m_config.m_sSCPBaseDir; ! if ( csScpPath.GetLength() > 0 && ( csScpPath.GetAt(csScpPath.GetLength() - 1) == _T('\\') || csScpPath.GetAt(csScpPath.GetLength() -1) == _T('/') ) ) ! csScpPath.SetAt(csScpPath.GetLength() - 1, 0x00); ! if ( csScpPath.GetLength() > 0 ) ! csLoadFile.Format(_T("%s\\%s"), csScpPath, csFilename); else + csLoadFile = csFilename; + if ( Main->GetProfileType() == PROFILE_REMOTE ) + csFilename = csLoadFile; + } + else + { + if ( csFilename.Find(_T(":")) == -1 ) { ! if ( this->m_csRootDirectory.GetLength() > 0 ) ! csLoadFile.Format(_T("%s\\%s"), this->m_csRootDirectory, csFilename); else csLoadFile = csFilename; } ! else ! csLoadFile = csFilename; } ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! { ! csFilename.Replace(_T(':'), _T('!')); ! csLoadFile.Format(_T("%s\\%s\\%s"), cwd, Main->GetProfileString(), csFilename); ! } ! CString csTest = csFilename; ! csTest.MakeLower(); ! if ( csTest.Find(TABLE_FILE) == -1 ) ! LoadFile(csLoadFile); } + this->LoadFile(_T("hoglocs.scp")); + this->LoadFile(_T("custloc.scp")); + this->CategorizeItems(); this->CategorizeLocations(); this->CategorizeNPCs(); LOG( locale->String(IDS_SCRIPTS_FINISHEDLOADING)); m_bDeleteDialog = true; DestroyProgressDialog(); |
From: Philip E. <pes...@us...> - 2004-04-16 21:45:00
|
Update of /cvsroot/sphere-axis/Utilities/SWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12582 Modified Files: SWizardDlg.cpp Log Message: Added compreg stuff to the IDL. Index: SWizardDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/SWizard/SWizardDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SWizardDlg.cpp 15 Apr 2004 18:24:16 -0000 1.2 --- SWizardDlg.cpp 16 Apr 2004 21:44:49 -0000 1.3 *************** *** 2054,2057 **** --- 2054,2074 ---- FileWrite(f, _T("[\n")); FileWrite(f, _T("\tobject,\n")); + FileWrite(f, _T("\tuuid(%s),\n"), m_sCompRegInterfaceGUID); + FileWrite(f, _T("\tdual,\n")); + FileWrite(f, _T("\thelpstring(\"IComponentRegistrar Interface\"),\n")); + FileWrite(f, _T("\tpointer_default(unique)\n")); + FileWrite(f, _T("]\n")); + FileWrite(f, _T("interface IComponentRegistrar : IDispatch\n")); + FileWrite(f, _T("{\n")); + FileWrite(f, _T("\t[id(1)] HRESULT Attach([in] BSTR bstrPath);\n")); + FileWrite(f, _T("\t[id(2)] HRESULT RegisterAll();\n")); + FileWrite(f, _T("\t[id(3)] HRESULT UnregisterAll();\n")); + FileWrite(f, _T("\t[id(4)] HRESULT GetComponents([out] SAFEARRAY(BSTR)* pbstrCLSIDs, [out] SAFEARRAY(BSTR)* pbstrDescriptions);\n")); + FileWrite(f, _T("\t[id(5)] HRESULT RegisterComponent([in] BSTR bstrCLSID);\n")); + FileWrite(f, _T("\t[id(6)] HRESULT UnregisterComponent([in] BSTR bstrCLSID);\n")); + FileWrite(f, _T("};\n")); + FileWrite(f, _T("\n")); + FileWrite(f, _T("[\n")); + FileWrite(f, _T("\tobject,\n")); FileWrite(f, _T("\tuuid(%s),\n"), m_sInterfaceGUID); FileWrite(f, _T("\tdual,\n")); *************** *** 2158,2161 **** --- 2175,2187 ---- FileWrite(f, _T("{\n")); FileWrite(f, _T("\timportlib(\"stdole2.tlb\");\n")); + FileWrite(f, _T("\n")); + FileWrite(f, _T("\t[\n")); + FileWrite(f, _T("\t\tuuid(%s),\n"), m_sCompRegGUID); + FileWrite(f, _T("\t\thelpstring(\"ComponentRegistrar Class\")\n")); + FileWrite(f, _T("\t]\n")); + FileWrite(f, _T("\tcoclass CompReg\n")); + FileWrite(f, _T("\t{\n")); + FileWrite(f, _T("\t\t[default] interface IComponentRegistrar;\n")); + FileWrite(f, _T("\t};\n")); FileWrite(f, _T("\t[\n")); FileWrite(f, _T("\t\tuuid(%s),\n"), m_sClassGUID); *************** *** 2735,2740 **** FileWrite(f, _T(" VALUE \"FileVersion\", \"1.0.0.1\"\n")); FileWrite(f, _T(" VALUE \"LegalCopyright\", \"TODO: (c) <Company name>. All rights reserved.\"\n")); ! FileWrite(f, _T(" VALUE \"InternalName\", \"ClientCommands.dll\"\n")); ! FileWrite(f, _T(" VALUE \"OriginalFilename\", \"ClientCommands.dll\"\n")); FileWrite(f, _T(" VALUE \"ProductName\", \"TODO: <Product name>\"\n")); FileWrite(f, _T(" VALUE \"ProductVersion\", \"1.0.0.1\"\n")); --- 2761,2766 ---- FileWrite(f, _T(" VALUE \"FileVersion\", \"1.0.0.1\"\n")); FileWrite(f, _T(" VALUE \"LegalCopyright\", \"TODO: (c) <Company name>. All rights reserved.\"\n")); ! FileWrite(f, _T(" VALUE \"InternalName\", \"%s.dll\"\n"), m_sLibrary); ! FileWrite(f, _T(" VALUE \"OriginalFilename\", \"%s.dll\"\n"), m_sLibrary); FileWrite(f, _T(" VALUE \"ProductName\", \"TODO: <Product name>\"\n")); FileWrite(f, _T(" VALUE \"ProductVersion\", \"1.0.0.1\"\n")); |
From: Philip E. <pes...@us...> - 2004-04-16 21:01:16
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3700 Modified Files: Scripts.cpp Log Message: no message Index: Scripts.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** Scripts.cpp 27 Jul 2003 20:44:55 -0000 1.10 --- Scripts.cpp 16 Apr 2004 21:01:06 -0000 1.11 *************** *** 68,72 **** { psfOutput->WriteString(_T("//****************************************************************************\n")); ! psfOutput->WriteString(_T("//SPHERE by : Menasoft ©1997-2003\n")); psfOutput->WriteString(_T("//www.sphereserver.com\n")); psfOutput->WriteString(_T("// All SPHERE script files and formats are copyright Menasoft & Partners.\n")); --- 68,72 ---- { psfOutput->WriteString(_T("//****************************************************************************\n")); ! psfOutput->WriteString(_T("//SPHERE by : Menasoft ©1997-2004\n")); psfOutput->WriteString(_T("//www.sphereserver.com\n")); psfOutput->WriteString(_T("// All SPHERE script files and formats are copyright Menasoft & Partners.\n")); |
Update of /cvsroot/sphere-axis/Axis/S_Sphere55 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3232 Modified Files: resource.h S_Sphere55.cpp S_Sphere55.idl S_Sphere55.rc S_Sphere55.vcproj Scripts.cpp Scripts.h stdafx.h Added Files: Area.cpp Area.h compreg.cpp compreg.h ConfigFile.cpp ConfigFile.h Def.cpp Def.h FileReadProgress.cpp FileReadProgress.h Item.cpp Item.h Location.cpp Location.h NPC.cpp NPC.h NPCLootItem.cpp NPCLootItem.h Potion.cpp Potion.h RemoteConsole.cpp RemoteConsole.h RemoteConsoleDlg.cpp RemoteConsoleDlg.h RemoteConsoleLoginDlg.cpp RemoteConsoleLoginDlg.h resource2.h Room.cpp Room.h ScriptProfile.cpp ScriptProfile.h ScriptsMain.cpp ScriptsMain.h ScriptTables.cpp ScriptTables.h ScriptUpdate.cpp ScriptUpdate.h ServerDef.cpp ServerDef.h SkillDef.cpp SkillDef.h SkillMenuGroup.cpp SkillMenuGroup.h SkillMenuItem.cpp SkillMenuItem.h SkillRootMenu.cpp SkillRootMenu.h SpawnRec.cpp SpawnRec.h SpellDef.cpp SpellDef.h strings.h Template.cpp Template.h TObArray.cpp TObArray.h TOreDef.cpp TOreDef.h TPotionDef.cpp TPotionDef.h Trigger.cpp Trigger.h TSkillClass.cpp TSkillClass.h TSkillDef.cpp TSkillDef.h TSpawnDef.cpp TSpawnDef.h TSpellDef.cpp TSpellDef.h TStartLocation.cpp TStartLocation.h VendorItem.cpp VendorItem.h WebpageDef.cpp WebpageDef.h WorldItem.cpp WorldItem.h XMLConfig.cpp XMLConfig.h Log Message: Initial check-in of alot of script functionality --- NEW FILE: Area.cpp --- /* $Id: Area.cpp,v 1.1 2004/04/16 20:59:33 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "area.h" const TCHAR * knownMapTags[] = { _T("GROUP"), // 0 _T("TITLE"), _T("P"), _T("RECT"), _T("MIDILIST"), _T("MAGICDAMAGE"), _T("MAGIC"), _T("MARK"), _T("RECALLIN"), _T("RECALLOUT"), _T("GATE"), // 10 _T("GATEIN"), _T("GATEOUT"), _T("BUILDABLE"), _T("NOBUILD"), _T("GUARDED"), _T("GUARDOWNER"), _T("RAINCHANCE"), _T("COLDCHANCE"), _T("LOCAL"), _T("GLOBAL"), // 20 _T("SOUNDS"), _T("NODECAY"), _T("SAFE"), _T("UNDERGROUND"), // 24 _T("ANNOUNCEMENT"), _T("ANNOUNCE"), _T("TRIGGER"), // 27 _T("FLAGS"), // 28 _T("TRIGPERIODIC"), // 29 _T("CLASS"), _T("RESOURCES"), _T("DEFNAME"), _T("EVENTS"), _T("TAG.GUARDOWNER"), _T("TAG.ANNOUNCEMENT"), }; CCategorizedScriptBase * FindArea(CPtrList * pList, CString csName, bool bCreate) { if ( !pList->IsEmpty() ) { POSITION pos = pList->GetHeadPosition(); while (pos != NULL) { CArea * pTest = (CArea *) pList->GetNext(pos); if ( pTest->m_csName == csName ) return pTest; } } // Obviously, we didn't find it. if ( bCreate ) { CArea * pArea = new (CArea); pArea->m_csName = csName; if ( pList->IsEmpty() ) pList->AddHead(pArea); else pList->AddTail(pArea); return pArea; } return NULL; } CArea::CArea() { // Fill in the default values this->m_csName = _T(""); this->m_iRainChance = -1; this->m_iSnowChance = -1; this->m_dwTriggerID = 0xFFFFFFFF; this->m_wFlags = 0; this->m_dwTrigPeriodic = 0xFFFFFFFF; this->m_bCustom = false; this->m_pOriginal = NULL; this->m_iClass = 0; this->m_bDelete = false; } CArea::~CArea() { } void CArea::ReadFromFile(CStdioFile &csfInput) { BOOL bStatus = true; while (bStatus) { DWORD dwCur = (DWORD)csfInput.GetPosition(); CString csLine; bStatus = csfInput.ReadString(csLine); if ( !bStatus ) break; csLine.TrimLeft(); if (csLine != _T("")) { if (csLine[0] == _T('[')) { // Ooops!! We're in a new section. Rewind the file 1 line csfInput.Seek((LONG) (dwCur - csfInput.GetPosition()), CFile::current); break; } // This is a normal guy if (csLine.Find(_T("//")) != 0) { // Not a comment this->ReadTag(csLine); } } } } void CArea::ReadTag(CString csLine) { CString csTag; if (csLine == _T("")) return; if (csLine.Find(_T("=")) != -1) csTag = csLine.SpanExcluding(_T("=")); else csTag = csLine.SpanExcluding(_T(" ")); CString csValue; if ( csLine.GetLength() == csTag.GetLength() ) csValue = _T(""); else csValue = csLine.Mid(csTag.GetLength() + 1); switch(FindTable(csTag, knownMapTags, 36)) { case 0: // GROUP this->m_csGroup = csValue; break; case 1: // TITLE this->m_csTitle = csValue; break; case 2: // P this->m_csPoint = csValue; break; case 3: // RECT this->m_caRects.Add(csValue); break; case 4: // MIDILIST this->m_csMidiList = csValue; break; case 5: // MAGICDAMAGE if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_DAMAGE; break; case 6: // MAGIC if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_ALL; break; case 7: // MARK case 8: // RECALLIN if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_RECALL_IN; break; case 9: // RECALLOUT if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_RECALL_OUT; break; case 10: // GATE case 11: // GATEIN if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_GATE; break; case 12: // GATEOUT if ( _tstoi(csValue) ) this->m_wFlags |= REGION_ANTIMAGIC_GATE; break; case 13: // BUILDABLE if ( ! _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_NOBUILDING; break; case 14: // NOBUILD if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_NOBUILDING; break; case 15: // GUARDED if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_GUARDED; break; case 16: // GUARDOWNER case 34: // TAG.GUARDOWNER this->m_csGuardOwner = csValue; break; case 17: // RAINCHANCE this->m_iRainChance = _tstoi(csValue); break; case 18: // COLDCHANCE this->m_iSnowChance = _tstoi(csValue); break; case 19: // LOCAL this->m_csLocal = csValue; break; case 20: // GLOBAL if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_GLOBALNAME; break; case 21: // SOUNDS this->m_csSounds = csValue; break; case 22: // NODECAY if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_NODECAY; break; case 23: // SAFE if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_SAFE; break; case 24: // UNDERGROUND if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_UNDERGROUND; break; case 25: // ANNOUNCEMENT case 35: // TAG.ANNOUNCEMENT this->m_csAnnouncement = csValue; break; case 26: // ANNOUNCE if ( _tstoi(csValue) ) this->m_wFlags |= REGION_FLAG_ANNOUNCE; break; case 27: // TRIGGER this->m_dwTriggerID = ahextoi(csValue); break; case 28: // FLAGS this->m_wFlags = (WORD) ahextoi(csValue); break; case 29: // TRIGPERIODIC this->m_dwTrigPeriodic = ahextoi(csValue); break; case 30: // CLASS this->m_iClass = _tstoi(csValue); break; case 31: // RESOURCES this->m_csResources = csValue; break; case 32: // DEFNAME this->m_csDefname = csValue; break; case 33: // EVENTS this->m_csEvents = csValue; break; // 34 is TAG.GUARDOWNER, handled above // 35 is TAG.ANNOUNCEMENT default: break; } } void CArea::Copy(CArea *pCopy) { if ( pCopy == NULL ) return; this->m_csGuardOwner = pCopy->m_csGuardOwner; this->m_csLocal = pCopy->m_csLocal; this->m_csName = pCopy->m_csName; this->m_csTitle = pCopy->m_csTitle; this->m_iRainChance = pCopy->m_iRainChance; this->m_iSnowChance = pCopy->m_iSnowChance; this->m_csAnnouncement = pCopy->m_csAnnouncement; this->m_dwTriggerID = pCopy->m_dwTriggerID; this->m_csGroup = pCopy->m_csGroup; this->m_wFlags = pCopy->m_wFlags; for ( int i = 0; i < pCopy->m_caRects.GetSize(); i++ ) this->m_caRects.Add(pCopy->m_caRects.GetAt(i) ); this->m_csPoint = pCopy->m_csPoint; this->m_dwTrigPeriodic = pCopy->m_dwTrigPeriodic; this->m_iClass = pCopy->m_iClass; this->m_csResources = pCopy->m_csResources; this->m_csDefname = pCopy->m_csDefname; this->m_csEvents = pCopy->m_csEvents; } void CArea::WriteHeader(CStdioFile &csfOutput) { CString csTemp; csTemp.Format(_T("[AREA %s]\n"), this->m_csName); csfOutput.WriteString(csTemp); } 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; } bool CArea::WriteBasic(CStdioFile &csfOutput) { if ( m_bDelete ) return true; CString csTemp; 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(""); switch(FindTable(csTag, knownMapTags, 36)) { case 0: // GROUP if (this->m_csGroup != _T("")) csValue.Format(_T("GROUP=%s\n"), this->m_csGroup); break; case 1: // TITLE if (this->m_csTitle != _T("")) csValue.Format(_T("TITLE=%s\n"), this->m_csTitle); break; case 2: // P if (this->m_csPoint != _T("")) csValue.Format(_T("P=%s\n"), this->m_csPoint); break; case 3: // RECT if (this->m_caRects.GetUpperBound() != -1) { for (int i = 0; i < (this->m_caRects.GetUpperBound() + 1); i++) { CString csTemp = csValue; csValue.Format(_T("%sRECT=%s\n"), csTemp, this->m_caRects.GetAt(i)); } } break; case 4: // MIDILIST if (this->m_csMidiList != _T("")) csValue.Format(_T("MIDILIST=%s\n"), this->m_csMidiList); break; case 5: // MAGICDAMAGE case 6: // MAGIC case 7: //MARK case 8: // RECALLIN case 9: // RECALLOUT case 10: // GATE case 11: // GATEIN case 12: // GATEOUT case 13: // BUILDABLE case 14: // NOBUILD case 15: // GUARDED case 20: // GLOBAL case 22: // NODECAY case 23: // SAFE case 24: // UNDERGROUND case 26: // ANNOUNCE break; case 16: // GUARDOWNER if (this->m_csGuardOwner != _T("")) csValue.Format(_T("GUARDOWNER=%s\n"), this->m_csGuardOwner); break; 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 if (this->m_csLocal != _T("")) csValue.Format(_T("LOCAL=%s\n"), this->m_csLocal); break; case 21: // SOUNDS if (this->m_csSounds != _T("")) csValue.Format(_T("SOUNDS=%s\n"), this->m_csSounds); break; case 25: // ANNOUNCEMENT if (this->m_csAnnouncement != _T("")) csValue.Format(_T("ANNOUNCEMENT=%s\n"), this->m_csAnnouncement); break; case 27: // TRIGGER if (this->m_dwTriggerID != 0xFFFFFFFF) csValue.Format(_T("TRIGGER=%05x\n"), this->m_dwTriggerID); break; case 28: // FLAGS 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; case 29: // TRIGPERIODIC if (this->m_dwTrigPeriodic != 0xFFFFFFFF) csValue.Format(_T("TRIGPERIODIC=%05x\n"), this->m_dwTrigPeriodic); break; case 30: // CLASS if ( this->m_iClass ) csValue.Format(_T("CLASS=%ld\n"), this->m_iClass); break; case 31: // RESOURCES if ( this->m_csResources != _T("") ) csValue.Format(_T("RESOURCES=%s\n"), this->m_csResources); break; case 32: // DEFNAME if ( this->m_csDefname != _T("") ) csValue.Format(_T("DEFNAME=%s\n"), this->m_csDefname); break; case 33: // EVENTS if ( this->m_csEvents != _T("") ) csValue.Format(_T("EVENTS=%s\n"), this->m_csEvents); break; case 34: // TAG.GUARDOWNER if ( this->m_csGuardOwner != _T("") ) csValue.Format(_T("TAG.GUARDOWNER=%s\n"), this->m_csGuardOwner); break; case 35: // TAG.ANNOUNCEMENT if ( this->m_csAnnouncement != _T("") ) csValue.Format(_T("TAG.ANNOUNCEMENT=%s\n"), this->m_csAnnouncement); break; default: break; } if (csValue != _T("")) csfOutput.WriteString(csValue); return; } bool CArea::IsInside(CArea *pTestArea) { if ( !pTestArea ) return false; // Check the point to see if these are areas are on the same plane if ( this->MapPlane() != pTestArea->MapPlane() ) return false; if ( this->m_caRects.GetSize() > 0 ) { for ( int i = 0; i <= this->m_caRects.GetUpperBound(); i++ ) { bool p1Inside = false; bool p2Inside = false; int x1, y1, x2, y2; CString csRect = this->m_caRects.GetAt(i); CString csTemp; csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); y1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x2 = _tstoi(csTemp); y2 = _tstoi(csRect); for ( int j = 0; j <= pTestArea->m_caRects.GetUpperBound(); j++ ) { int tx1, ty1, tx2, ty2; csRect = pTestArea->m_caRects.GetAt(j); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); ty1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx2 = _tstoi(csTemp); ty2 = _tstoi(csRect); if ( (x1 >= tx1) && (x1 <= tx2) && (y1 >= ty1) && (y1 <=ty2) ) p1Inside = true; if ( (x2 >= tx1) && (x2 <= tx2) && (y2 >= ty1) && (y2 <=ty2) ) p2Inside = true; } if ( ! ( p1Inside && p2Inside ) ) return false; } return true; } else { // No RECTs defined for the area...Check the teleport point. if ( this->m_csPoint != _T("") ) { int x, y; CString csTemp = this->m_csPoint.SpanExcluding(_T(",")); x = _tstoi(csTemp); csTemp = this->m_csPoint.Mid(m_csPoint.Find(_T(",")) + 1); csTemp = csTemp.SpanExcluding(_T(",")); y = _tstoi(csTemp); for ( int i = 0; i <= pTestArea->m_caRects.GetUpperBound(); i++ ) { int tx1, ty1, tx2, ty2; CString csRect = pTestArea->m_caRects.GetAt(i); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); ty1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx2 = _tstoi(csTemp); ty2 = _tstoi(csRect); if ( (x >= tx1) && (x <= tx2) && (y >=ty1) && (y <=ty2) ) return true; } } } return false; } bool CArea::IsInside(CPoint p) { for ( int i = 0; i < this->m_caRects.GetSize(); i++ ) { int x1, x2, y1, y2; CString csRect = this->m_caRects.GetAt(i); CString csTemp; csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); y1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x2 = _tstoi(csTemp); y2 = _tstoi(csRect); if ( ( p.x >= x1 ) && ( p.x <= x2 ) && ( p.y >= y1 ) && ( p.y <= y2 ) ) return true; } return false; } bool CArea::Overlaps(CArea *pTest) { if ( ! pTest ) return false; for ( int i = 0; i <= this->m_caRects.GetUpperBound(); i++ ) { int x1, y1, x2, y2; CString csRect = this->m_caRects.GetAt(i); CString csTemp; csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); y1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); x2 = _tstoi(csTemp); y2 = _tstoi(csRect); for ( int j = 0; j <= pTest->m_caRects.GetUpperBound(); j++ ) { int tx1, ty1, tx2, ty2; csRect = pTest->m_caRects.GetAt(j); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); ty1 = _tstoi(csTemp); csTemp = csRect.SpanExcluding(_T(",")); csRect = csRect.Mid( csRect.Find(_T(",")) + 1 ); tx2 = _tstoi(csTemp); ty2 = _tstoi(csRect); if ( (x1 >= tx1) && (x1 <= tx2) && (y1 >= ty1) && (y1 <=ty2) ) return true; if ( (x2 >= tx1) && (x2 <= tx2) && (y2 >= ty1) && (y2 <=ty2) ) return true; if ( (tx1 >= x1) && (tx2 <= x1) && (ty1 >= y1) && (ty2 <= y1) ) return true; if ( (tx1 >= x2) && (tx2 <= x2) && (ty1 >= y2) && (ty2 <= y2) ) return true; } } return false; } int CArea::MapPlane() { int pos = 0; int iTokens = 0; CString csToken = this->m_csPoint.Tokenize(_T(","), pos); while (csToken != _T("")) { iTokens++; if ( iTokens == 4 ) return (_tstoi(csToken)); csToken = m_csPoint.Tokenize(_T(","), pos); } return 0; } --- NEW FILE: Area.h --- /* $Id: Area.h,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "stdafx.h" #define REGION_ANTIMAGIC_ALL 0x0001 // All magic banned here. #define REGION_ANTIMAGIC_RECALL_IN 0x0002 // Teleport,recall in to this, and mark #define REGION_ANTIMAGIC_RECALL_OUT 0x0004 // can't recall out of here. #define REGION_ANTIMAGIC_GATE 0x0008 #define REGION_ANTIMAGIC_TELEPORT 0x0010 // Can't teleport into here. #define REGION_ANTIMAGIC_DAMAGE 0x0020 // just no bad magic here #define REGION_FLAG_SHIP 0x0040 // This is a ship region. ship commands #define REGION_FLAG_NOBUILDING 0x0080 // No building in this area #define REGION_FLAG_GLOBALNAME 0x0100 // Make sure the name is avail globally. #define REGION_FLAG_ANNOUNCE 0x0200 // Announce to all who enter. #define REGION_FLAG_INSTA_LOGOUT 0x0400 // Instant Log out is allowed here. (hotel) #define REGION_FLAG_UNDERGROUND 0x0800 // dungeon type area. (no weather) #define REGION_FLAG_NODECAY 0x1000 // Things on the ground don't decay here. #define REGION_FLAG_SAFE 0x2000 // This region is safe from all harm. #define REGION_FLAG_GUARDED 0x4000 #define REGION_DYNAMIC 0x8000 // Must be saved in the WORLD.SCP file (not multi) const TCHAR * knownMapTags[]; class CArea : public CCategorizedScriptBase { public: bool Overlaps(CArea *pTest); bool IsInside(CPoint p); bool m_bCustom; CArea * m_pOriginal; DWORD m_dwTriggerID; DWORD m_dwTrigPeriodic; bool m_bAnnounce; CString m_csAnnouncement; CString m_csSounds; CString m_csLocal; CString m_csGuardOwner; CString m_csMidiList; CString m_csPoint; CString m_csTitle; int m_iSnowChance; int m_iRainChance; CString m_csName; CString m_csGroup; WORD m_wFlags; CStringArray m_caRects; CString m_csResources; CString m_csEvents; int m_iClass; CString m_csDefname; bool m_bDelete; CArea(); virtual ~CArea(); void ReadFromFile(CStdioFile &csfInput); bool Write(CStdioFile &csfOutput, int iVersion); bool WriteBasic(CStdioFile &csfOutput); void Copy(CArea *pCopy); bool IsInside(CArea *pTestArea); void Insert(CArea * pParentArea); int MapPlane(); protected: void ReadTag(CString csLine); void WriteTag(CString csTag, CStdioFile &csfOutput, int iVersion); virtual void WriteHeader(CStdioFile &csfOutput); }; --- NEW FILE: compreg.cpp --- /* $Id: compreg.cpp,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // compreg.cpp : Implementation of CCompReg #include "stdafx.h" #include "compreg.h" // CCompReg --- NEW FILE: compreg.h --- /* $Id: compreg.h,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // compreg.h : Declaration of the CCompReg #pragma once #include "resource.h" // main symbols #include "S_Sphere55.h" // CCompReg class ATL_NO_VTABLE CCompReg : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CCompReg, &CLSID_CompReg>, public IDispatchImpl<IComponentRegistrar, &IID_IComponentRegistrar, &LIBID_S_Sphere55, /*wMajor =*/ 1, /*wMinor =*/ 0> { public: CCompReg() { } DECLARE_NO_REGISTRY() BEGIN_COM_MAP(CCompReg) COM_INTERFACE_ENTRY(IComponentRegistrar) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // IComponentRegistrar public: STDMETHOD(Attach)(BSTR bstrPath) { return S_OK; } STDMETHOD(RegisterAll)() { return _pModule->RegisterServer(TRUE); } STDMETHOD(UnregisterAll)() { _pModule->UnregisterServer(TRUE); return S_OK; } STDMETHOD(GetComponents)(SAFEARRAY **ppCLSIDs, SAFEARRAY **ppDescriptions) { _ATL_OBJMAP_ENTRY* pEntry = _pModule->m_pObjMap; int nComponents = 0; while (pEntry->pclsid != NULL) { LPCTSTR pszDescription = pEntry->pfnGetObjectDescription(); if (pszDescription) nComponents++; pEntry++; } SAFEARRAYBOUND rgBound[1]; rgBound[0].lLbound = 0; rgBound[0].cElements = nComponents; *ppCLSIDs = SafeArrayCreate(VT_BSTR, 1, rgBound); *ppDescriptions = SafeArrayCreate(VT_BSTR, 1, rgBound); pEntry = _pModule->m_pObjMap; for (long i=0; pEntry->pclsid != NULL; pEntry++) { LPCTSTR pszDescription = pEntry->pfnGetObjectDescription(); if (pszDescription) { LPOLESTR pszCLSID; StringFromCLSID(*pEntry->pclsid, &pszCLSID); SafeArrayPutElement(*ppCLSIDs, &i, OLE2BSTR(pszCLSID)); CoTaskMemFree(pszCLSID); SafeArrayPutElement(*ppDescriptions, &i, T2BSTR(pszDescription)); i++; } } return S_OK; } STDMETHOD(RegisterComponent)(BSTR bstrCLSID) { CLSID clsid; CLSIDFromString(bstrCLSID, &clsid); _pModule->RegisterServer(TRUE, &clsid); return S_OK; } STDMETHOD(UnregisterComponent)(BSTR bstrCLSID) { CLSID clsid; CLSIDFromString(bstrCLSID, &clsid); _pModule->UnregisterServer(FALSE, &clsid); return S_OK; } }; OBJECT_ENTRY_AUTO(CLSID_CompReg, CCompReg) --- NEW FILE: ConfigFile.cpp --- /* $Id: ConfigFile.cpp,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "ConfigFile.h" #include "ServerDef.h" #include "Scripts.h" #define GRAY_MAIN_SERVER "menace.ne.mediaone.net" #define GRAY_GAME_SERVER #define GRAY_LOG_SERVER #define GRAY_URL "www.sphereserver.com" // default url. #define TICK_PER_SEC 10 #define GRAY_CLIENT_VER 20000 // 1.25.37 = 12537 = default version. const TCHAR * sm_LoadKeys[SC_QTY] = { _T("ACCTFILES"), // m_sAcctBaseDir _T("ARRIVEDEPARTMSG"), _T("AUTONEWBIEKEYS"), // m_fAutoNewbieKeys _T("BACKUPLEVELS"), // m_iSaveBackupLevels _T("BANKMAXITEMS"), _T("BANKMAXWEIGHT"), _T("CHANGEFILES"), // m_sChangedBaseDir _T("CHARTAGS"), // m_fCharTags _T("CLIENTLINGER"), _T("CLIENTMAX"), // m_nClientsMax _T("CLIENTS"), _T("CLIENTVERSION"), _T("CORPSENPCDECAY"), _T("CORPSEPLAYERDECAY"), _T("CRIMINALTIMER"), // m_iCriminalTimer _T("DEADSOCKETTIME"), _T("DEBUGFLAGS"), _T("DECAYTIMER"), _T("DUNGEONLIGHT"), _T("EQUIPPEDCAST"), // m_fEquippedCast _T("FILES"), // _T("FLIPDROPPEDITEMS"), // m_fFlipDroppedItems _T("FORCEGARBAGECOLLECT"), // m_fSaveGarbageCollect _T("FREEZERESTARTTIME"), // m_iFreezeRestartTime _T("GAMEMINUTELENGTH"), // m_iGameMinuteLength _T("GUARDLINGER"), // m_iGuardLingerTime _T("GUARDSINSTANTKILL"), _T("GUESTS"), _T("GUILDS"), _T("HEARALL"), _T("HELPINGCRIMINALSISACRIME"), // m_fHelpingCriminalsIsACrime _T("HITPOINTPERCENTONREZ"), // m_iHitpointPercentOnRez _T("LIGHTDAY"), // m_iLightDay _T("LIGHTNIGHT"), // m_iLightNight _T("LOG"), _T("LOGMASK"), // GetLogMask _T("LOOTINGISACRIME"), // m_fLootingIsACrime _T("MAGICUNLOCKDOOR"), // m_iMagicUnlockDoor _T("MAINLOGSERVER"), // m_fMainLogServer _T("MAPCACHETIME"), _T("MAXBASESKILL"), // m_iMaxBaseSkill _T("MAXCHARSPERACCOUNT"), // m_iMaxCharsPerAccount _T("MAXCOMPLEXITY"), // m_iMaxComplexity _T("MINCHARDELETETIME"), _T("MONSTERFEAR"), // m_fMonsterFear _T("MONSTERFIGHT"), _T("MULFILE"), _T("MULFILES"), _T("MURDERDECAYTIME"), // m_iMurderDecayTime; _T("MURDERMINCOUNT"), // m_iMurderMinCount; // amount of murders before we get title. _T("NOWEATHER"), // m_fNoWeather _T("NPCTRAINMAX"), // m_iTrainSkillMax _T("NPCTRAINPERCENT"), // m_iTrainSkillPercent _T("NTSERVICE"), // m_fUseNTService _T("PLAYERGHOSTSOUNDS"), // m_fPlayerGhostSounds _T("PLAYERNEUTRAL"), // m_iPlayerKarmaNeutral _T("POLLSERVERS"), // m_iPollServers _T("PROFILE"), _T("RCLOCK"), _T("REAGENTLOSSFAIL"), // m_fReagentLossFail _T("REAGENTSREQUIRED"), _T("REGEN"), _T("REGISTERSERVER"), // m_sRegisterServer _T("REQUIREEMAIL"), // m_fRequireEmail _T("RTIME"), _T("RTIMETEXT"), _T("RUNNINGPENALTY"), // m_iStamRunningPenalty _T("SAVEBACKGROUND"), // m_iSaveBackgroundTime _T("SAVEPERIOD"), _T("SCPFILES"), _T("SECTORSLEEP"), // m_iSectorSleepMask _T("SECURE"), _T("SNOOPCRIMINAL"), _T("SPEECHFILES"), _T("STAMINALOSSATWEIGHT"), // m_iStaminaLossAtWeight _T("STATAVG"), // m_iAvgSumOfStats _T("STATCAP"), // m_iMaxSumOfStats _T("STATGUILDS"), _T("TIME"), _T("TIMEUP"), _T("TOTALPOLLEDACCOUNTS"), _T("TOTALPOLLEDCLIENTS"), _T("TOTALPOLLEDSERVERS"), _T("VENDORMAXSELL"), // m_iVendorMaxSell _T("VERBOSE"), _T("VERSION"), _T("WOPPLAYER"), _T("WOPSTAFF"), _T("WORLDSAVE"), }; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CConfigFile::CConfigFile() { m_fUseNTService = false; m_iPollServers = 0; m_sRegisterServer = GRAY_MAIN_SERVER; m_fMainLogServer = false; m_iMapCacheTime = 2 * 60 * TICK_PER_SEC; m_iSectorSleepMask = 0x3ff; m_ClientVersion = GRAY_CLIENT_VER; m_wDebugFlags = 0; //DEBUGF_NPC_EMOTE m_fSecure = true; m_iFreezeRestartTime = 10*TICK_PER_SEC; //Magic m_fReagentsRequired = true; m_fReagentLossFail = true; m_fWordsOfPowerPlayer = true; m_fWordsOfPowerStaff = true; m_fEquippedCast = true; m_iMagicUnlockDoor = 1000; //m_iSpell_Teleport_Effect_Staff = 0x3709; // drama //m_iSpell_Teleport_Sound_Staff = 0x1f3; //m_iSpell_Teleport_Effect_Player = ; //m_iSpell_Teleport_Sound_Player; // Decay m_iDecay_Item = 30*60*TICK_PER_SEC; m_iDecay_CorpsePlayer = 45*60*TICK_PER_SEC; m_iDecay_CorpseNPC = 15*60*TICK_PER_SEC; // Accounts m_nClientsMax = FD_SETSIZE-1; m_fRequireEmail = false; m_nGuestsMax = 0; m_fArriveDepartMsg = true; m_iClientLingerTime = 60 * TICK_PER_SEC; m_iDeadSocketTimeMin = 10*60*TICK_PER_SEC; m_iMinCharDeleteTime = 3*24*60*60*TICK_PER_SEC; m_iMaxCharsPerAccount = 5; // Save m_iSaveBackupLevels = 3; m_iSaveBackgroundTime = 5* 60 * TICK_PER_SEC; // Use the new background save. m_fSaveGarbageCollect = false; // Always force a full garbage collection. m_iSavePeriod = 15*60*TICK_PER_SEC; // In game effects. m_fMonsterFight = true; m_fMonsterFear = true; m_iLightDungeon = 17; m_iLightNight = 17; // dark before t2a. m_iLightDay = 0; m_iBankIMax = 1000; m_iBankWMax = 400; m_fGuardsInstantKill = false; m_iSnoopCriminal = 500; m_iTrainSkillPercent = 50; m_iTrainSkillMax = 500; m_fCharTags = true; m_iVendorMaxSell = 30; m_iGameMinuteLength = 8 * TICK_PER_SEC; m_sSpeechBaseDir = _T("speech"); m_fNoWeather = false; m_fFlipDroppedItems = true; m_iAvgSumOfStats = 300; m_iMaxSumOfStats = 350; m_iMurderMinCount = 5; m_iMurderDecayTime = 8*60*60* TICK_PER_SEC; m_iMaxComplexity = 16; m_iPlayerKarmaNeutral = -2000; // How much bad karma makes a player neutral? m_iPlayerKarmaEvil = -8000; m_iGuardLingerTime = 1*60*TICK_PER_SEC; // "GUARDLINGER&& m_iCriminalTimer = 3*60*TICK_PER_SEC; m_iHitpointPercentOnRez = 10; m_fLootingIsACrime = true; m_fHelpingCriminalsIsACrime = true; m_fPlayerGhostSounds = true; m_fAutoNewbieKeys = true; m_iMaxBaseSkill = 250; m_iStamRunningPenalty = 50; m_iStaminaLossAtWeight = 100; } CConfigFile::~CConfigFile() { this->m_blockIP.RemoveAll(); for ( int i = 0; i < this->m_servers.GetSize(); i++ ) { CServerDef * pServer = (CServerDef *) this->m_servers.GetAt(i); if ( pServer ) delete pServer; } this->m_servers.RemoveAll(); } bool CConfigFile::Read() { BOOL bStatus = TRUE; CStdioFile csfIni; if ( Main->m_pScripts->m_tables.m_Sphere.m_csFilename != _T("") ) bStatus = csfIni.Open(Main->m_pScripts->m_tables.m_Sphere.m_csFilename, CFile::modeRead | CFile::shareDenyNone); else bStatus = csfIni.Open(_T("sphere.ini"), CFile::modeRead | CFile::shareDenyNone ); if ( !bStatus ) return FALSE; CString csSection; while ( bStatus ) { CString csLine; bStatus = csfIni.ReadString(csLine); if ( ! bStatus ) break; CString csKey, csValue; if ( csLine.Find(_T("[")) == -1 && csSection == _T("") ) continue; else if ( csLine.Find(_T("[")) != -1 ) { csSection = csLine.Mid(1); csSection = csSection.SpanExcluding(_T("]")); continue; } else { if ( csSection.CompareNoCase(_T("sphere")) == 0 ) { csKey = csLine.SpanExcluding(_T("=")); if ( csKey.GetLength() < csLine.GetLength() ) csValue = csLine.Mid(csKey.GetLength() + 1); else csValue = _T(""); csValue.Remove(0x0d); switch ( FindTable(csKey, sm_LoadKeys, SC_QTY) ) { case SC_ACCTFILES: // m_sAcctBaseDir m_sAcctBaseDir = csValue; break; case SC_ARRIVEDEPARTMSG: m_fArriveDepartMsg = _tstoi(csValue) ? true : false; break; case SC_AUTONEWBIEKEYS: // m_fAutoNewbieKeys m_fAutoNewbieKeys = _tstoi(csValue) ? true : false; break; case SC_BACKUPLEVELS: // m_iSaveBackupLevels m_iSaveBackupLevels = _tstoi(csValue); break; case SC_BANKMAXITEMS: m_iBankIMax = _tstoi(csValue); break; case SC_BANKMAXWEIGHT: m_iBankWMax = _tstoi(csValue); break; case SC_CHANGEFILES: // m_sChangedBaseDir m_sChangedBaseDir = csValue; break; case SC_CHARTAGS: // m_fCharTags m_fCharTags = _tstoi(csValue) ? true : false; break; case SC_CLIENTLINGER: m_iClientLingerTime = _tstoi(csValue); break; case SC_CLIENTMAX: // m_nClientsMax m_nClientsMax = _tstoi(csValue); break; case SC_CLIENTS: break; case SC_CLIENTVERSION: m_ClientVersion = _tstoi(csValue); break; case SC_CORPSENPCDECAY: m_iDecay_CorpseNPC = _tstoi(csValue); break; case SC_CORPSEPLAYERDECAY: m_iDecay_CorpsePlayer = _tstoi(csValue); break; case SC_CRIMINALTIMER: // m_iCriminalTimer m_iCriminalTimer = _tstoi(csValue); break; case SC_DEADSOCKETTIME: m_iDeadSocketTimeMin = _tstoi(csValue); break; case SC_DEBUGFLAGS: m_wDebugFlags = (WORD) ahextoi(csValue); break; case SC_DECAYTIMER: m_iDecay_Item = _tstoi(csValue); break; case SC_DUNGEONLIGHT: m_iLightDungeon = _tstoi(csValue); break; case SC_EQUIPPEDCAST: // m_fEquippedCast m_fEquippedCast = _tstoi(csValue) ? true : false; break; case SC_FILES: // break; case SC_FLIPDROPPEDITEMS: // m_fFlipDroppedItems m_fFlipDroppedItems = _tstoi(csValue) ? true : false; break; case SC_FORCEGARBAGECOLLECT: // m_fSaveGarbageCollect m_fSaveGarbageCollect = _tstoi(csValue) ? true : false; break; case SC_FREEZERESTARTTIME: // m_iFreezeRestartTime m_iFreezeRestartTime = _tstoi(csValue); break; case SC_GAMEMINUTELENGTH: // m_iGameMinuteLength m_iGameMinuteLength = _tstoi(csValue); break; case SC_GUARDLINGER: // m_iGuardLingerTime m_iGuardLingerTime = _tstoi(csValue); break; case SC_GUARDSINSTANTKILL: m_fGuardsInstantKill = _tstoi(csValue) ? true : false; break; case SC_GUESTS: m_nGuestsMax = _tstoi(csValue); break; case SC_GUILDS: break; case SC_HEARALL: break; case SC_HELPINGCRIMINALSISACRIME: // m_fHelpingCriminalsIsACrime m_fHelpingCriminalsIsACrime = _tstoi(csValue) ? true : false; break; case SC_HITPOINTPERCENTONREZ: // m_iHitpointPercentOnRez m_iHitpointPercentOnRez = _tstoi(csValue); break; case SC_LIGHTDAY: // m_iLightDay m_iLightDay = _tstoi(csValue); break; case SC_LIGHTNIGHT: // m_iLightNight m_iLightNight = _tstoi(csValue); break; case SC_LOG: break; case SC_LOGMASK: // GetLogMask break; case SC_LOOTINGISACRIME: // m_fLootingIsACrime m_fLootingIsACrime = _tstoi(csValue) ? true : false; break; case SC_MAGICUNLOCKDOOR: // m_iMagicUnlockDoor m_iMagicUnlockDoor = _tstoi(csValue); break; case SC_MAINLOGSERVER: // m_fMainLogServer m_fMainLogServer = _tstoi(csValue) ? true : false; break; case SC_MAPCACHETIME: m_iMapCacheTime = _tstoi(csValue); break; case SC_MAXBASESKILL: // m_iMaxBaseSkill m_iMaxBaseSkill = _tstoi(csValue); break; case SC_MAXCHARSPERACCOUNT: // m_iMaxCharsPerAccount m_iMaxCharsPerAccount = _tstoi(csValue); break; case SC_MAXCOMPLEXITY: // m_iMaxComplexity m_iMaxComplexity = _tstoi(csValue); break; case SC_MINCHARDELETETIME: m_iMinCharDeleteTime = _tstoi(csValue); break; case SC_MONSTERFEAR: // m_fMonsterFear m_fMonsterFear = _tstoi(csValue) ? true : false; break; case SC_MONSTERFIGHT: m_fMonsterFight = _tstoi(csValue) ? true : false; break; case SC_MULFILE: break; case SC_MULFILES: break; case SC_MURDERDECAYTIME: // m_iMurderDecayTime; m_iMurderDecayTime = _tstoi(csValue); break; case SC_MURDERMINCOUNT: // m_iMurderMinCount; // amount of murders before we get title. m_iMurderMinCount = _tstoi(csValue); break; case SC_NOWEATHER: // m_fNoWeather m_fNoWeather = _tstoi(csValue) ? true : false; break; case SC_NPCTRAINMAX: // m_iTrainSkillMax m_iTrainSkillMax = _tstoi(csValue); break; case SC_NPCTRAINPERCENT: // m_iTrainSkillPercent m_iTrainSkillPercent = _tstoi(csValue); break; case SC_NTSERVICE: // m_fUseNTService m_fUseNTService = _tstoi(csValue) ? true : false; break; case SC_PLAYERGHOSTSOUNDS: // m_fPlayerGhostSounds m_fPlayerGhostSounds = _tstoi(csValue) ? true : false; break; case SC_PLAYERNEUTRAL: // m_iPlayerKarmaNeutral m_iPlayerKarmaNeutral = _tstoi(csValue); break; case SC_POLLSERVERS: // m_iPollServers m_iPollServers = _tstoi(csValue); break; case SC_PROFILE: break; case SC_RCLOCK: break; case SC_REAGENTLOSSFAIL: // m_fReagentLossFail m_fReagentLossFail = _tstoi(csValue) ? true : false; break; case SC_REAGENTSREQUIRED: m_fReagentsRequired = _tstoi(csValue) ? true : false; break; case SC_REGEN: break; case SC_REGISTERSERVER: // m_sRegisterServer m_sRegisterServer = csValue; case SC_REQUIREEMAIL: // m_fRequireEmail m_fRequireEmail = _tstoi(csValue) ? true : false; break; case SC_RTIME: break; case SC_RTIMETEXT: break; case SC_RUNNINGPENALTY: // m_iStamRunningPenalty m_iStamRunningPenalty = _tstoi(csValue); break; case SC_SAVEBACKGROUND: // m_iSaveBackgroundTime m_iSaveBackgroundTime = _tstoi(csValue); break; case SC_SAVEPERIOD: m_iSavePeriod = _tstoi(csValue); break; case SC_SCPFILES: m_sSCPBaseDir = csValue; break; case SC_SECTORSLEEP: // m_iSectorSleepMask m_iSectorSleepMask = _tstoi(csValue); break; case SC_SECURE: m_fSecure = _tstoi(csValue) ? true : false; break; case SC_SNOOPCRIMINAL: m_iSnoopCriminal = _tstoi(csValue); break; case SC_SPEECHFILES: m_sSpeechBaseDir = csValue; break; case SC_STAMINALOSSATWEIGHT: // m_iStaminaLossAtWeight m_iStaminaLossAtWeight = _tstoi(csValue); break; case SC_STATAVG: // m_iAvgSumOfStats m_iAvgSumOfStats = _tstoi(csValue); break; case SC_STATCAP: // m_iMaxSumOfStats m_iMaxSumOfStats = _tstoi(csValue); break; case SC_STATGUILDS: break; case SC_TIME: break; case SC_TIMEUP: break; case SC_TOTALPOLLEDACCOUNTS: break; case SC_TOTALPOLLEDCLIENTS: break; case SC_TOTALPOLLEDSERVERS: break; case SC_VENDORMAXSELL: // m_iVendorMaxSell m_iVendorMaxSell = _tstoi(csValue); break; case SC_VERBOSE: break; case SC_VERSION: break; case SC_WOPPLAYER: m_fWordsOfPowerPlayer = _tstoi(csValue) ? true : false; break; case SC_WOPSTAFF: m_fWordsOfPowerStaff = _tstoi(csValue) ? true : false; break; case SC_WORLDSAVE: break; case SC_QTY: break; } } else if ( csSection.CompareNoCase(_T("servers")) == 0 ) { CServerDef * pServer = new CServerDef; if ( pServer->Load(&csfIni) ) m_servers.Add((void *) pServer); else delete pServer; } else if ( csSection.CompareNoCase(_T("blockip")) == 0 ) this->m_blockIP.Add(csLine); else continue; } } csfIni.Close(); return bStatus ? true : false; } bool CConfigFile::Write() { return true; } --- NEW FILE: ConfigFile.h --- /* $Id: ConfigFile.h,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 enum SC_TYPE { SC_ACCTFILES, // m_sAcctBaseDir SC_ARRIVEDEPARTMSG, SC_AUTONEWBIEKEYS, // m_fAutoNewbieKeys SC_BACKUPLEVELS, // m_iSaveBackupLevels SC_BANKMAXITEMS, SC_BANKMAXWEIGHT, SC_CHANGEFILES, // m_sChangedBaseDir SC_CHARTAGS, // m_fCharTags SC_CLIENTLINGER, SC_CLIENTMAX, // m_nClientsMax SC_CLIENTS, SC_CLIENTVERSION, SC_CORPSENPCDECAY, SC_CORPSEPLAYERDECAY, SC_CRIMINALTIMER, // m_iCriminalTimer SC_DEADSOCKETTIME, SC_DEBUGFLAGS, SC_DECAYTIMER, SC_DUNGEONLIGHT, SC_EQUIPPEDCAST, // m_fEquippedCast SC_FILES, // SC_FLIPDROPPEDITEMS, // m_fFlipDroppedItems SC_FORCEGARBAGECOLLECT, // m_fSaveGarbageCollect SC_FREEZERESTARTTIME, // m_iFreezeRestartTime SC_GAMEMINUTELENGTH, // m_iGameMinuteLength SC_GUARDLINGER, // m_iGuardLingerTime SC_GUARDSINSTANTKILL, SC_GUESTS, SC_GUILDS, SC_HEARALL, SC_HELPINGCRIMINALSISACRIME, // m_fHelpingCriminalsIsACrime SC_HITPOINTPERCENTONREZ, // m_iHitpointPercentOnRez SC_LIGHTDAY, // m_iLightDay SC_LIGHTNIGHT, // m_iLightNight SC_LOG, SC_LOGMASK, // GetLogMask SC_LOOTINGISACRIME, // m_fLootingIsACrime SC_MAGICUNLOCKDOOR, // m_iMagicUnlockDoor SC_MAINLOGSERVER, // m_fMainLogServer SC_MAPCACHETIME, SC_MAXBASESKILL, // m_iMaxBaseSkill SC_MAXCHARSPERACCOUNT, // m_iMaxCharsPerAccount SC_MAXCOMPLEXITY, // m_iMaxComplexity SC_MINCHARDELETETIME, SC_MONSTERFEAR, // m_fMonsterFear SC_MONSTERFIGHT, SC_MULFILE, SC_MULFILES, SC_MURDERDECAYTIME, // m_iMurderDecayTime; SC_MURDERMINCOUNT, // m_iMurderMinCount; // amount of murders before we get title. SC_NOWEATHER, // m_fNoWeather SC_NPCTRAINMAX, // m_iTrainSkillMax SC_NPCTRAINPERCENT, // m_iTrainSkillPercent SC_NTSERVICE, // m_fUseNTService SC_PLAYERGHOSTSOUNDS, // m_fPlayerGhostSounds SC_PLAYERNEUTRAL, // m_iPlayerKarmaNeutral SC_POLLSERVERS, // m_iPollServers SC_PROFILE, SC_RCLOCK, SC_REAGENTLOSSFAIL, // m_fReagentLossFail SC_REAGENTSREQUIRED, SC_REGEN, SC_REGISTERSERVER, // m_sRegisterServer SC_REQUIREEMAIL, // m_fRequireEmail SC_RTIME, SC_RTIMETEXT, SC_RUNNINGPENALTY, // m_iStamRunningPenalty SC_SAVEBACKGROUND, // m_iSaveBackgroundTime SC_SAVEPERIOD, SC_SCPFILES, SC_SECTORSLEEP, // m_iSectorSleepMask SC_SECURE, SC_SNOOPCRIMINAL, SC_SPEECHFILES, SC_STAMINALOSSATWEIGHT, // m_iStaminaLossAtWeight SC_STATAVG, // m_iAvgSumOfStats SC_STATCAP, // m_iMaxSumOfStats SC_STATGUILDS, SC_TIME, SC_TIMEUP, SC_TOTALPOLLEDACCOUNTS, SC_TOTALPOLLEDCLIENTS, SC_TOTALPOLLEDSERVERS, SC_VENDORMAXSELL, // m_iVendorMaxSell SC_VERBOSE, SC_VERSION, SC_WOPPLAYER, SC_WOPSTAFF, SC_WORLDSAVE, SC_QTY, }; class CConfigFile { public: CConfigFile(); virtual ~CConfigFile(); bool Read(); bool Write(); // Begin INI file options. bool m_fUseNTService; int m_iPollServers; // background polling of peer servers. (minutes) CString m_sRegisterServer; // GRAY_MAIN_SERVER bool m_fMainLogServer; // This is the main log server. Will list any server that polls. int m_iMapCacheTime; // Time in sec to keep unused map data. int m_iSectorSleepMask; // The mask for how long sectors will sleep. CString m_sWorldBaseDir; // "e:\graysvr\worldsave\" = world files go here. CString m_sAcctBaseDir; // Where do the account files go/come from ? CString m_sSCPBaseDir; // if we want to get *.SCP files from elsewhere. CString m_sSpeechBaseDir; // Where do the speech script files go ? CString m_sChangedBaseDir; // Take files from here and replace existing files. bool m_fSecure; // Secure mode. (will trap exceptions) int m_iFreezeRestartTime; // # seconds before restarting. #define DEBUGF_NPC_EMOTE 0x01 #define DEBUGF_ADVANCE_STATS 0x02 #define DEBUGF_MOTIVATION 0x04 // display motication level debug messages. #define DEBUGF_WALKCODES 0x80 // try the new walk code checking stuff. WORD m_wDebugFlags; // DEBUG In game effects to turn on and off. // Decay int m_iDecay_Item; // Base decay time in minutes. int m_iDecay_CorpsePlayer; // Time for a playercorpse to decay (mins). int m_iDecay_CorpseNPC; // Time for a NPC corpse to decay. // Save int m_iSavePeriod; // Minutes between saves. int m_iSaveBackupLevels; // How many backup levels. int m_iSaveBackgroundTime; // Speed of the background save in minutes. bool m_fSaveGarbageCollect; // Always force a full garbage collection. bool m_fSaveInBackground; // Do background save stuff. // Account bool m_fRequireEmail; // Valid Email required to leave GUEST mode. int m_iDeadSocketTimeMin; bool m_fArriveDepartMsg; // General switch to turn on/off arrival/depart messages. int m_nClientsMax; // Maximum (FD_SETSIZE) open connections to server int m_nGuestsMax; // Allow guests who have no accounts ? int m_iClientLingerTime; // How long logged out clients linger in seconds. int m_iMinCharDeleteTime; // How old must a char be ? (minutes) int m_ClientVersion; // GRAY_CLIENT_VER 12537 int m_iMaxCharsPerAccount; // MAX_CHARS_PER_ACCT // Magic bool m_fReagentsRequired; bool m_fWordsOfPowerPlayer; // Words of Power for players bool m_fWordsOfPowerStaff; // Words of Power for staff bool m_fEquippedCast; // Allow casting while equipped. bool m_fReagentLossFail; // ??? Lose reags when failed. int m_iMagicUnlockDoor; // 1 in N chance of magic unlock working on doors -- 0 means never //ITEMID_TYPE m_iSpell_Teleport_Effect_Player; //SOUND_TYPE m_iSpell_Teleport_Sound_Player; //ITEMID_TYPE m_iSpell_Teleport_Effect_Staff; //SOUND_TYPE m_iSpell_Teleport_Sound_Staff; // In Game Effects int m_iLightDungeon; int m_iLightDay; // Outdoor light level. int m_iLightNight; // Outdoor light level. bool m_fMonsterFight; // Will creatures fight amoung themselves. bool m_fMonsterFear; // will they run away if hurt ? int m_iBankIMax; // Maximum number of items allowed in bank. int m_iBankWMax; // Maximum weight in WEIGHT_UNITS stones allowed in bank. bool m_fGuardsInstantKill; // Will guards kill instantly or follow normal combat rules? int m_iSnoopCriminal; // 1 in # chance of getting criminalflagged when succesfully snooping. int m_iTrainSkillPercent; // How much can NPC's train up to ? int m_iTrainSkillMax; bool m_fCharTags; // Put [NPC] tags over chars. int m_iVendorMaxSell; // Max things a vendor will sell in one shot. int m_iGameMinuteLength; // Length of the game world minute in real world (TICK_PER_SEC) seconds. bool m_fFlipDroppedItems; // Flip dropped items. bool m_fNoWeather; // Turn off all weather. int m_iMaxSumOfStats; // Stat Cap int m_iAvgSumOfStats; // Stat Avg. decay can set in here. int m_iMurderMinCount; // amount of murders before we get title. int m_iMurderDecayTime; // (minutes) Roll murder counts off this often. int m_iMaxComplexity; // How many chars per area. int m_iPlayerKarmaNeutral; // How much bad karma makes a player neutral? int m_iPlayerKarmaEvil; int m_iGuardLingerTime; // How long do guards linger about. int m_iCriminalTimer; // How many minutes are criminals flagged for? int m_iHitpointPercentOnRez;// How many hitpoints do they get when they are rez'd? bool m_fLootingIsACrime; // Looting a blue corpse is bad. bool m_fHelpingCriminalsIsACrime;// If I help (rez, heal, etc) a criminal, do I become one too? bool m_fPlayerGhostSounds; // Do player ghosts make a ghostly sound? bool m_fAutoNewbieKeys; // Are house and boat keys newbied automatically? int m_iMaxBaseSkill; // Maximum value for base skills at char creation int m_iStamRunningPenalty; // Weight penalty for running (+N% of max carry weight) int m_iStaminaLossAtWeight; // %Weight at which characters begin to lose stamina // End INI file options. CStringArray m_blockIP; CPtrArray m_servers; }; --- NEW FILE: Def.cpp --- /* $Id: Def.cpp,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "def.h" #include "Scripts.h" CDef::CDef() { m_dwValueMin = 0; m_dwValueMax = 0; m_bCustom = false; } CDef::~CDef() { } void CDef::Read(CString csLine) { CString csTemp; csTemp = csLine.SpanExcluding(_T(" \t")); csTemp.MakeUpper(); this->m_csValue = csTemp; if ( this->m_csValue.GetLength() != csLine.GetLength() ) csTemp = csLine.Mid(this->m_csValue.GetLength() + 1); else return; csTemp.TrimLeft(); csTemp.TrimRight(); if ( csTemp.Find(_T("{")) != -1 ) this->m_expression.Read(csTemp); else { CString csTemp2; if ( csTemp.Find(_T(" ")) != -1) csTemp2 = csTemp.Mid(csTemp.Find(_T(" ")) + 1); csTemp2.TrimLeft(); csTemp2.TrimRight(); if ( csTemp.GetAt(0) == _T('0') ) this->m_dwValueMin = ahextoi(csTemp); else this->m_dwValueMin = _tstoi(csTemp); if ( csTemp2.GetLength() > 0 ) { if ( csTemp2.GetAt(0) == _T('0') ) this->m_dwValueMax = ahextoi(csTemp2); else this->m_dwValueMax = _tstoi(csTemp2); } else this->m_dwValueMax = this->m_dwValueMin; } } void CDef::WriteDef(CStdioFile &csfOutput) { CString csLine; csLine.Format(_T("%s\t"), m_csValue); csfOutput.WriteString(csLine); if ( m_expression.m_csMember.GetSize() != 0 ) csLine.Format(_T("%s\n"), m_expression.Write() ); else { if ( m_dwValueMax == m_dwValueMin ) csLine.Format(_T("%ld\n"), m_dwValueMin); else csLine.Format(_T("%ld %ld\n"), m_dwValueMin, m_dwValueMax); } csfOutput.WriteString(csLine); } DWORD CDef::Evaluate() { if ( m_expression.m_csMember.GetSize() != 0 ) return m_expression.Evaluate(); else { if ( m_dwValueMax == m_dwValueMin ) return m_dwValueMax; else { srand((unsigned int)time(NULL)); return ((DWORD) (rand() % (m_dwValueMax - m_dwValueMin) ) + m_dwValueMin); } } } DWORD DefLookup(const TCHAR *pszExp) { if ( IsHexValue(pszExp) ) return ahextoi(pszExp); if ( IsDecimalValue(pszExp) ) return atoi(pszExp); int iDef = Main->m_pScripts->m_aDefs.Find(pszExp); if ( iDef != -1 ) { CDef * pDef = Main->m_pScripts->m_aDefs[iDef]; return pDef->Evaluate() ; } return -1; } --- NEW FILE: Def.h --- /* $Id: Def.h,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "stdafx.h" DWORD DefLookup(const TCHAR *pszExp); class CDef : public CScriptBase { public: CExpression m_expression; DWORD m_dwValueMin; DWORD m_dwValueMax; CString m_csGroup; bool m_bCustom; CDef(); ~CDef(); virtual void Read(CString csLine); virtual void WriteDef(CStdioFile &csfOutput); virtual DWORD Evaluate(); }; --- NEW FILE: FileReadProgress.cpp --- /* $Id: FileReadProgress.cpp,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // FileReadProgress.cpp : implementation file // #include "stdafx.h" #include "FileReadProgress.h" // CFileReadProgress dialog CFileReadProgress::CFileReadProgress(CWnd* pParent /*=NULL*/) : CDialog(CFileReadProgress::IDD, pParent) { //{{AFX_DATA_INIT(CFileReadProgress) //}}AFX_DATA_INIT m_iUpper = 100; m_iLower = 0; m_iPos = 0; m_cBkg = GetSysColor(COLOR_3DFACE); m_cFgd = 0x00800000; NONCLIENTMETRICS met; memset(&met, 0, sizeof(met)); met.cbSize = sizeof(met); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, met.cbSize, (void *) &met, 0); m_csFontName.Format(_T("%s"), met.lfStatusFont.lfFaceName); m_pAxis = NULL; } void CFileReadProgress::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFileReadProgress) DDX_Control(pDX, IDC_PROGBAR, m_csProgBar); DDX_Control(pDX, IDC_STATUS_MESSAGE, m_csMessage); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CFileReadProgress, CDialog) //{{AFX_MSG_MAP(CFileReadProgress) ON_WM_PAINT() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CFileReadProgress message handlers void CFileReadProgress::Update() { if ( m_iUpper == m_iLower ) return; CDC * pDC = this->m_csProgBar.GetDC(); pDC->SetTextAlign(TA_CENTER); CString csPercent; csPercent.Format(_T("%ld%%"), ( (m_iPos * 100) / (m_iUpper - m_iLower)) ); CRect rect; m_csProgBar.GetClientRect(&rect); CRgn clip, clip2; COLORREF oldBkg, oldText; oldBkg = pDC->SetBkColor(m_cFgd); oldText = pDC->SetTextColor(m_cBkg); CBrush * pFore = new CBrush(m_cFgd); CBrush * pBack = new CBrush(m_cBkg); CFont * pFont = new CFont(); pFont->CreateFont(15, 0, 0, 0, 600, 0, 0, 0, 0, OUT_TT_PRECIS, CLIP_TT_ALWAYS, PROOF_QUALITY, DEFAULT_PITCH, m_csFontName); CFont * pOldFont = pDC->SelectObject(pFont); int right = rect.left + ( rect.Width() * m_iPos / (m_iUpper - m_iLower) ); clip.CreateRectRgn(rect.left, rect.top, right, rect.bottom); pDC->SelectClipRgn(&clip); pDC->FillRect(rect, pFore); pDC->ExtTextOut( ((rect.right - rect.left) / 2), rect.top - 1, ETO_CLIPPED, &rect, csPercent, NULL); clip2.CreateRectRgn(right, rect.top, rect.right, rect.bottom); pDC->SelectClipRgn(&clip2); pDC->FillRect(rect, pBack); pDC->SetBkColor(m_cBkg); pDC->SetTextColor(m_cFgd); pDC->ExtTextOut( ((rect.right - rect.left) / 2), rect.top - 1, ETO_CLIPPED, &rect, csPercent, NULL); pDC->SelectObject(pOldFont); delete pFore; delete pBack; delete pFont; pDC->SetBkColor(oldBkg); pDC->SetTextColor(oldText); m_csProgBar.ReleaseDC(pDC); } void CFileReadProgress::OnPaint() { CPaintDC dc(this); // device context for painting Update(); // Do not call CDialog::OnPaint() for painting messages } void CFileReadProgress::Localize(void) { if ( m_pAxis != NULL ) m_pAxis->LocalizeWindow(IDD, 0, NULL, (CWnd*) this); } // CFileReadProgress message handlers --- NEW FILE: FileReadProgress.h --- /* $Id: FileReadProgress.h,v 1.1 2004/04/16 20:59:34 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 "resource.h" #include "../S_ScriptsBase/AxisLibWrapper.h" // CFileReadProgress dialog class __declspec(dllexport) CFileReadProgress : public CDialog { // Construction public: CFileReadProgress(CWnd* pParent = NULL); // standard constructor void SetRange(unsigned short nLower, unsigned short nUpper) { SetRange32((int) nLower, (int) nUpper); } void SetRange32(unsigned long nLower, unsigned long nUpper) { m_iLower = nLower; m_iUpper = nUpper; } void GetRange(unsigned long& nLower, unsigned long& nUpper) {nLower = m_iLower; nUpper = m_iUpper; } int GetPos() { return m_iPos; } void SetPos(int iPos) { m_iPos = ... [truncated message content] |
From: Philip E. <pes...@us...> - 2004-04-15 18:54:03
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere55 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24204 Added Files: dlldatax.c dlldatax.h resource.h S_Sphere55.cpp S_Sphere55.def S_Sphere55.idl S_Sphere55.rc S_Sphere55.rgs S_Sphere55.vcproj Scripts.cpp Scripts.h Scripts.rgs stdafx.cpp stdafx.h Log Message: Initial Check-in of Sphere55 module base code. --- NEW FILE: dlldatax.c --- /* $Id: dlldatax.c,v 1.1 2004/04/15 18:53:53 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // wrapper for dlldata.c #ifdef _MERGE_PROXYSTUB // merge proxy stub DLL #define REGISTER_PROXY_DLL //DllRegisterServer, etc. #define _WIN32_WINNT 0x0400 //for WinNT 4.0 or Win95 with DCOM #define USE_STUBLESS_PROXY //defined only with MIDL switch /Oicf #pragma comment(lib, "rpcndr.lib") #pragma comment(lib, "rpcns4.lib") #pragma comment(lib, "rpcrt4.lib") #define ENTRY_PREFIX Prx #include "dlldata.c" #include "S_Sphere55_p.c" #endif //_MERGE_PROXYSTUB --- NEW FILE: dlldatax.h --- /* $Id: dlldatax.h,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 #ifdef _MERGE_PROXYSTUB extern "C" { BOOL WINAPI PrxDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved); STDAPI PrxDllCanUnloadNow(void); STDAPI PrxDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv); STDAPI PrxDllRegisterServer(void); STDAPI PrxDllUnregisterServer(void); } #endif --- NEW FILE: resource.h --- /* $Id: resource.h,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by S_Sphere55.rc // #define IDS_PROJNAME 100 #define IDR_S_SPHERE55 101 #define IDR_SCRIPTS 103 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 #define _APS_NEXT_SYMED_VALUE 104 #endif #endif --- NEW FILE: S_Sphere55.cpp --- /* $Id: S_Sphere55.cpp,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // S_Sphere55.cpp : Implementation of DLL Exports. #include "stdafx.h" #include "resource.h" #include "S_Sphere55.h" #include "dlldatax.h" class CS_Sphere55Module : public CAtlDllModuleT< CS_Sphere55Module > { public : DECLARE_LIBID(LIBID_S_Sphere55) DECLARE_REGISTRY_APPID_RESOURCEID(IDR_S_SPHERE55, "{971dec83-17dc-4ffa-941b-fc209c18b8f9}") }; CS_Sphere55Module _AtlModule; class CS_Sphere55App : public CWinApp { public: // Overrides virtual BOOL InitInstance(); virtual int ExitInstance(); DECLARE_MESSAGE_MAP() }; BEGIN_MESSAGE_MAP(CS_Sphere55App, CWinApp) END_MESSAGE_MAP() CS_Sphere55App theApp; BOOL CS_Sphere55App::InitInstance() { #ifdef _MERGE_PROXYSTUB if (!PrxDllMain(m_hInstance, DLL_PROCESS_ATTACH, NULL)) return FALSE; #endif return CWinApp::InitInstance(); } int CS_Sphere55App::ExitInstance() { return CWinApp::ExitInstance(); } // Used to determine whether the DLL can be unloaded by OLE STDAPI DllCanUnloadNow(void) { #ifdef _MERGE_PROXYSTUB HRESULT hr = PrxDllCanUnloadNow(); if (FAILED(hr)) return hr; #endif AFX_MANAGE_STATE(AfxGetStaticModuleState()); return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE; } // Returns a class factory to create an object of the requested type STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { #ifdef _MERGE_PROXYSTUB if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK) return S_OK; #endif return _AtlModule.DllGetClassObject(rclsid, riid, ppv); } // DllRegisterServer - Adds entries to the system registry STDAPI DllRegisterServer(void) { // registers object, typelib and all interfaces in typelib HRESULT hr = _AtlModule.DllRegisterServer(); #ifdef _MERGE_PROXYSTUB if (FAILED(hr)) return hr; hr = PrxDllRegisterServer(); #endif return hr; } // DllUnregisterServer - Removes entries from the system registry STDAPI DllUnregisterServer(void) { HRESULT hr = _AtlModule.DllUnregisterServer(); #ifdef _MERGE_PROXYSTUB if (FAILED(hr)) return hr; hr = PrxDllRegisterServer(); if (FAILED(hr)) return hr; hr = PrxDllUnregisterServer(); #endif return hr; } --- NEW FILE: S_Sphere55.def --- ; S_Sphere55.def : Declares the module parameters. LIBRARY "S_Sphere55.DLL" EXPORTS DllCanUnloadNow PRIVATE DllGetClassObject PRIVATE DllRegisterServer PRIVATE DllUnregisterServer PRIVATE --- NEW FILE: S_Sphere55.idl --- /* $Id: S_Sphere55.idl,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // S_Sphere55.idl : IDL source for S_Sphere55 // // This file will be processed by the MIDL tool to // produce the type library (S_Sphere55.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(244e6db0-47f1-4192-956e-9b738577673c), dual, nonextensible, helpstring("IScripts Interface"), pointer_default(unique) ] interface IScripts : IDispatch{ [id(1), helpstring("method GetProfileCount")] HRESULT GetProfileCount([out,retval] ULONG* count); [id(2), helpstring("method GetProfileName")] HRESULT GetProfileName([in] ULONG index, [out,retval] BSTR* name); [id(3), helpstring("method GetProfileType")] HRESULT GetProfileType([in] ULONG index, [out,retval] BYTE* type); [id(4), helpstring("method LoadScripts")] HRESULT LoadScripts([in] ULONG index, [out,retval] ULONG* result); [id(5), helpstring("method InvokeProfileEditor")] HRESULT InvokeProfileEditor([in] ULONG index); [id(6), helpstring("method GetItemCount")] HRESULT GetItemCount([out,retval] ULONG* count); [id(7), helpstring("method GetItemCategory")] HRESULT GetItemCategory([in] ULONG index, [out,retval] BSTR* category); [id(8), helpstring("method GetItemDescription")] HRESULT GetItemDescription([in] ULONG index, [out,retval] BSTR* description); [id(9), helpstring("method GetItemDispID")] HRESULT GetItemDispID([in] ULONG index, [out,retval] BSTR* dispID); [id(10), helpstring("method GetItemColor")] HRESULT GetItemColor([in] ULONG index, [out,retval] BSTR* color); [id(11), helpstring("method GetItemID")] HRESULT GetItemID([in] ULONG index, [out,retval] BSTR* id); [id(12), helpstring("method InvokeItemEditor")] HRESULT InvokeItemEditor([in] ULONG index); [id(13), helpstring("method ItemSpawnOnly")] HRESULT ItemSpawnOnly([in] ULONG index, [out,retval] VARIANT_BOOL* value); [id(14), helpstring("method ItemDontCategorize")] HRESULT ItemDontCategorize([in] ULONG index, [out,retval] VARIANT_BOOL* value); [id(15), helpstring("method GetCharacterCount")] HRESULT GetCharacterCount([out,retval] ULONG* count); [id(16), helpstring("method GetCharacterCategory")] HRESULT GetCharacterCategory([in] ULONG index, [out,retval] BSTR* category); [id(17), helpstring("method GetCharacterDescription")] HRESULT GetCharacterDescription([in] ULONG index, [out,retval] BSTR* description); [id(18), helpstring("method GetCharacterDispID")] HRESULT GetCharacterDispID([in] ULONG index, [out,retval] BSTR* dispID); [id(19), helpstring("method GetCharacterColor")] HRESULT GetCharacterColor([in] ULONG index, [out,retval] BSTR* color); [id(20), helpstring("method GetCharacterID")] HRESULT GetCharacterID([in] ULONG index, [out,retval] BSTR* id); [id(21), helpstring("method InvokeCharacterEditor")] HRESULT InvokeCharacterEditor([in] ULONG index); [id(22), helpstring("method CharacterSpawnOnly")] HRESULT CharacterSpawnOnly([in] ULONG index, [out,retval] VARIANT_BOOL* value); [id(23), helpstring("method CharacterDontCategorize")] HRESULT CharacterDontCategorize([in] ULONG index, [out,retval] VARIANT_BOOL* value); [id(24), helpstring("method GetRegionCount")] HRESULT GetRegionCount([out,retval] ULONG* count); [id(25), helpstring("method GetRegionCategory")] HRESULT GetRegionCategory([in] ULONG index, [out,retval] BSTR* category); [id(26), helpstring("method GetRegionDescription")] HRESULT GetRegionDescription([in] ULONG index, [out,retval] BSTR* description); [id(27), helpstring("method GetRegionTeleportPoint")] HRESULT GetRegionTeleportPoint([in] ULONG index, [out,retval] BSTR* point); [id(28), helpstring("method GetRegionName")] HRESULT GetRegionName([in] ULONG index, [out,retval] BSTR* name); [id(29), helpstring("method InvokeRegionEditor")] HRESULT InvokeRegionEditor([in] ULONG index); [id(30), helpstring("method GetDestinationCount")] HRESULT GetDestinationCount([out,retval] ULONG* count); [id(31), helpstring("method GetDestinationCategory")] HRESULT GetDestinationCategory([in] ULONG index, [out,retval] BSTR* category); [id(32), helpstring("method GetDestinationDescription")] HRESULT GetDestinationDescription([in] ULONG index, [out,retval] BSTR* description); [id(33), helpstring("method GetDestinationTeleportPoint")] HRESULT GetDestinationTeleportPoint([in] ULONG index, [out,retval] BSTR* point); [id(34), helpstring("method GetDestinationName")] HRESULT GetDestinationName([in] ULONG index, [out,retval] BSTR* name); [id(35), helpstring("method InvokeDestinationEditor")] HRESULT InvokeDestinationEditor([in] ULONG index); [id(36), helpstring("method EvaluateDef")] HRESULT EvaluateDef([in] BSTR, [out,retval] ULONG* value); [id(37), helpstring("method GetSpellCount")] HRESULT GetSpellCount([out,retval] ULONG* count); [id(38), helpstring("method GetSpellName")] HRESULT GetSpellName([in] ULONG index, [out,retval] BSTR* name); [id(39), helpstring("method InvokeSpellEditor")] HRESULT InvokeSpellEditor([in] ULONG index); [id(40), helpstring("method GetSkillCount")] HRESULT GetSkillCount([out,retval] ULONG* count); [id(41), helpstring("method GetSkillName")] HRESULT GetSkillName([in] ULONG index, [out,retval] BSTR* name); [id(42), helpstring("method InvokeSkillEditor")] HRESULT InvokeSkillEditor([in] ULONG index); [id(43), helpstring("method GetSpawnCount")] HRESULT GetSpawnCount([out,retval] ULONG* count); [id(44), helpstring("method GetSpawnInfo")] HRESULT GetSpawnInfo([in] ULONG index, [out,retval] BSTR* info); [id(45), helpstring("method ReloadSpawnInfo")] HRESULT ReloadSpawnInfo([out,retval] ULONG* result); [id(46), helpstring("method GetWorldSpawnUID")] HRESULT GetWorldSpawnUID([in] ULONG index, [out,retval] ULONG* uid); [id(47), helpstring("method GetWorldItemCount")] HRESULT GetWorldItemCount([out,retval] ULONG* count); [id(48), helpstring("method GetWorldItemUID")] HRESULT GetWorldItemUID([in] ULONG index, [out,retval] ULONG* uid); [id(49), helpstring("method GetWorldItemName")] HRESULT GetWorldItemName([in] ULONG index, [out,retval] BSTR* name); [id(50), helpstring("method GetWorldItemCoordinates")] HRESULT GetWorldItemCoordinates([in] ULONG index, [out,retval] BSTR* coordinates); [id(51), helpstring("method GetWorldItemType")] HRESULT GetWorldItemType([in] ULONG index, [out,retval] ULONG* type); [id(52), helpstring("method GetWorldItemDispID")] HRESULT GetWorldItemDispID([in] ULONG index, [out,retval] BSTR* dispID); [id(53), helpstring("method GetWorldItemColor")] HRESULT GetWorldItemColor([in] ULONG index, [out,retval] BSTR* color); [id(54), helpstring("method GetWorldItemAttributes")] HRESULT GetWorldItemAttributes([in] ULONG index, [out,retval] ULONG* attributes); [id(55), helpstring("method IsWorldItemTopLevel")] HRESULT IsWorldItemTopLevel([in] ULONG index, [out,retval] VARIANT_BOOL* value); [id(56), helpstring("method SetWorldItemFile")] HRESULT SetWorldItemFile([in] BSTR file); [id(57), helpstring("method ReloadWorldItemFile")] HRESULT ReloadWorldItemFile([out,retval]ULONG* result); [id(58), helpstring("method MarkWorldItemForDeletion")] HRESULT MarkWorldItemForDeletion([in] ULONG index, [out,retval] ULONG* result); [id(59), helpstring("method AddWorldItemForImport")] HRESULT AddWorldItemForImport([in] ULONG itemID, [in] ULONG x, [in] ULONG y, [in] CHAR z, [in] BYTE m, [out,retval] ULONG* result); [id(60), helpstring("method UpdateWorldFile")] HRESULT UpdateWorldFile([out,retval] ULONG* result); [id(61), helpstring("method GetEditorCount")] HRESULT GetEditorCount([out,retval] ULONG* count); [id(62), helpstring("method GetEditorDescription")] HRESULT GetEditorDescription([in] ULONG index, [out,retval] BSTR* description); [id(63), helpstring("method InvokeEditor")] HRESULT InvokeEditor([in] ULONG index); [id(64), helpstring("method GetTypeCount")] HRESULT GetTypeCount([out,retval] ULONG* count); [id(65), helpstring("method GetTypeDescription")] HRESULT GetTypeDescription([in] ULONG index, [out,retval] BSTR* bDescription); [id(66), helpstring("method GetItemAttributeDescription")] HRESULT GetItemAttributeDescription([in] BYTE bit, [out,retval] BSTR* bDescription); [id(67), helpstring("method AddDestination")] HRESULT AddDestination([in] USHORT x, [in] USHORT y, [in] CHAR z, [in] BYTE m); [id(68), helpstring("method DeleteDestination")] HRESULT DeleteDestination([in] ULONG index); [id(69), helpstring("method GetBrainCount")] HRESULT GetBrainCount([out,retval] ULONG* count); [id(70), helpstring("method GetBrainDescription")] HRESULT GetBrainDescription([in] ULONG index, [out,retval] BSTR* description); [id(71), helpstring("method GetMidiCount")] HRESULT GetMidiCount([out,retval] ULONG* count); [id(72), helpstring("method GetMidiName")] HRESULT GetMidiName([in] ULONG index, [out,retval] BSTR* name); [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); }; [ uuid(564863b0-fb04-4fc0-bc9e-e18c462e5a2a), version(1.0), helpstring("S_Sphere55 1.0 Type Library") ] library S_Sphere55 { importlib("stdole2.tlb"); [ uuid(57de0245-ce34-4826-9e16-5cc29f58f5f7), helpstring("Scripts Class") ] coclass Scripts { [default] interface IScripts; }; }; --- NEW FILE: S_Sphere55.rc --- // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "1 TYPELIB ""S_Sphere55.tlb""\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // 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", "TODO: <Company name>" VALUE "FileDescription", "TODO: <File description>" VALUE "FileVersion", "1.0.0.1" VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved." VALUE "InternalName", "ClientCommands.dll" VALUE "OriginalFilename", "ClientCommands.dll" VALUE "ProductName", "TODO: <Product name>" VALUE "ProductVersion", "1.0.0.1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END ///////////////////////////////////////////////////////////////////////////// // // REGISTRY // IDR_S_SPHERE55 REGISTRY "S_Sphere55.rgs" IDR_SCRIPTS REGISTRY "Scripts.rgs" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE BEGIN IDS_PROJNAME "S_Sphere55" END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // 1 TYPELIB "S_Sphere55.tlb" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: S_Sphere55.rgs --- HKCR { NoRemove AppID { '%APPID%' = s 'S_Sphere55' 'Scripts.DLL' { val AppID = s '%APPID%' } } } --- NEW FILE: S_Sphere55.vcproj --- <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.00" Name="S_Sphere55" ProjectGUID="{6E062D16-2F8F-4E80-8E23-A0EA25939F25}" Keyword="AtlProj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="2" UseOfMFC="2" UseOfATL="1" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" IgnoreImportLibrary="TRUE" OutputFile="$(OutDir)/S_Sphere55.dll" LinkIncremental="2" ModuleDefinitionFile=".\S_Sphere55.def" GenerateDebugInformation="TRUE" SubSystem="2" ImportLibrary="$(OutDir)/S_Sphere55.lib" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="FALSE" TargetEnvironment="1" GenerateStublessProxies="TRUE" TypeLibraryName="$(IntDir)/S_Sphere55.tlb" HeaderFileName="S_Sphere55.h" DLLDataFileName="" InterfaceIdentifierFileName="S_Sphere55_i.c" ProxyFileName="S_Sphere55_p.c"/> <Tool Name="VCPostBuildEventTool" Description="Performing registration" CommandLine="regsvr32 /s /c "$(TargetPath)""/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="2" UseOfMFC="2" UseOfATL="1" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" IgnoreImportLibrary="TRUE" OutputFile="$(OutDir)/S_Sphere55.dll" LinkIncremental="1" ModuleDefinitionFile=".\S_Sphere55.def" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" ImportLibrary="$(OutDir)/S_Sphere55.lib" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="FALSE" TargetEnvironment="1" GenerateStublessProxies="TRUE" TypeLibraryName="$(IntDir)/S_Sphere55.tlb" HeaderFileName="S_Sphere55.h" DLLDataFileName="" InterfaceIdentifierFileName="S_Sphere55_i.c" ProxyFileName="S_Sphere55_p.c"/> <Tool Name="VCPostBuildEventTool" Description="Performing registration" CommandLine="regsvr32 /s /c "$(TargetPath)""/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> </Configurations> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> <File RelativePath="S_Sphere55.cpp"> </File> <File RelativePath="S_Sphere55.def"> </File> <File RelativePath="S_Sphere55.idl"> </File> <File RelativePath="Scripts.cpp"> </File> <File RelativePath="dlldatax.c"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="0"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="0"/> </FileConfiguration> </File> <File RelativePath="stdafx.cpp"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc"> <File RelativePath="Resource.h"> </File> <File RelativePath="Scripts.h"> </File> <File RelativePath="dlldatax.h"> </File> <File RelativePath="stdafx.h"> </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> <File RelativePath="S_Sphere55.rc"> </File> <File RelativePath="S_Sphere55.rgs"> </File> <File RelativePath="Scripts.rgs"> </File> </Filter> <Filter Name="Generated Files" SourceControlFiles="FALSE"> <File RelativePath="S_Sphere55_i.c"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="0"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="0"/> </FileConfiguration> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: Scripts.cpp --- /* $Id: Scripts.cpp,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // Scripts.cpp : Implementation of CScripts #include "stdafx.h" #include "Scripts.h" // CScripts STDMETHODIMP CScripts::InterfaceSupportsErrorInfo(REFIID riid) { static const IID* arr[] = { &IID_IScripts, }; for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) { if (InlineIsEqualGUID(*arr[i],riid)) return S_OK; } return S_FALSE; } STDMETHODIMP CScripts::GetProfileCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetProfileName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); *name = T2BSTR(_T("C++")); return S_OK; } STDMETHODIMP CScripts::GetProfileType(ULONG index, BYTE* type) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::LoadScripts(ULONG index, ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeProfileEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemCategory(ULONG index, BSTR* category) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemDispID(ULONG index, BSTR* dispID) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemColor(ULONG index, BSTR* color) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemID(ULONG index, BSTR* id) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeItemEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::ItemSpawnOnly(ULONG index, VARIANT_BOOL* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::ItemDontCategorize(ULONG index, VARIANT_BOOL* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterCategory(ULONG index, BSTR* category) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterDispID(ULONG index, BSTR* dispID) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterColor(ULONG index, BSTR* color) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetCharacterID(ULONG index, BSTR* id) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeCharacterEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::CharacterSpawnOnly(ULONG index, VARIANT_BOOL* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::CharacterDontCategorize(ULONG index, VARIANT_BOOL* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetRegionCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetRegionCategory(ULONG index, BSTR* category) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetRegionDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetRegionTeleportPoint(ULONG index, BSTR* point) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetRegionName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeRegionEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetDestinationCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetDestinationCategory(ULONG index, BSTR* category) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetDestinationDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetDestinationTeleportPoint(ULONG index, BSTR* point) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetDestinationName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeDestinationEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::EvaluateDef(BSTR string, ULONG* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSpellCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSpellName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeSpellEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSkillCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSkillName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeSkillEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSpawnCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetSpawnInfo(ULONG index, BSTR* info) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::ReloadSpawnInfo(ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldSpawnUID(ULONG index, ULONG* uid) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemUID(ULONG index, ULONG* uid) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemCoordinates(ULONG index, BSTR* coordinates) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemType(ULONG index, ULONG* type) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemDispID(ULONG index, BSTR* dispID) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemColor(ULONG index, BSTR* color) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetWorldItemAttributes(ULONG index, ULONG* attributes) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::IsWorldItemTopLevel(ULONG index, VARIANT_BOOL* value) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::SetWorldItemFile(BSTR file) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::ReloadWorldItemFile(ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetEditorCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetEditorDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeEditor(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::MarkWorldItemForDeletion(ULONG index, ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::AddWorldItemForImport(ULONG itemID, ULONG x, ULONG y, CHAR z, BYTE m, ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::UpdateWorldFile(ULONG* result) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetTypeCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetTypeDescription(ULONG index, BSTR* bDescription) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetItemAttributeDescription(BYTE bit, BSTR* bDescription) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::AddDestination(USHORT x, USHORT y, CHAR z, BYTE m) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::DeleteDestination(ULONG index) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetBrainCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetBrainDescription(ULONG index, BSTR* description) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetMidiCount(ULONG* count) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::GetMidiName(ULONG index, BSTR* name) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::ExportCategories(BSTR filename) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::InvokeRemoteConsole(void) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::SetMulPath(BSTR path) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } STDMETHODIMP CScripts::SetMulFile(ULONG index, BSTR file) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // TODO: Add your implementation code here return S_OK; } --- NEW FILE: Scripts.h --- /* $Id: Scripts.h,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // Scripts.h : Declaration of the CScripts #pragma once #include "resource.h" // main symbols #include "S_Sphere55.h" // CScripts class ATL_NO_VTABLE CScripts : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CScripts, &CLSID_Scripts>, public ISupportErrorInfo, public IDispatchImpl<IScripts, &IID_IScripts, &LIBID_S_Sphere55, /*wMajor =*/ 1, /*wMinor =*/ 0> { public: CScripts() { } DECLARE_REGISTRY_RESOURCEID(IDR_SCRIPTS) BEGIN_COM_MAP(CScripts) COM_INTERFACE_ENTRY(IScripts) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) END_COM_MAP() // ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(GetProfileCount)(ULONG* count); STDMETHOD(GetProfileName)(ULONG index, BSTR* name); STDMETHOD(GetProfileType)(ULONG index, BYTE* type); STDMETHOD(LoadScripts)(ULONG index, ULONG* result); STDMETHOD(InvokeProfileEditor)(ULONG index); STDMETHOD(GetItemCount)(ULONG* count); STDMETHOD(GetItemCategory)(ULONG index, BSTR* category); STDMETHOD(GetItemDescription)(ULONG index, BSTR* description); STDMETHOD(GetItemDispID)(ULONG index, BSTR* dispID); STDMETHOD(GetItemColor)(ULONG index, BSTR* color); STDMETHOD(GetItemID)(ULONG index, BSTR* id); STDMETHOD(InvokeItemEditor)(ULONG index); STDMETHOD(ItemSpawnOnly)(ULONG index, VARIANT_BOOL* value); STDMETHOD(ItemDontCategorize)(ULONG index, VARIANT_BOOL* value); STDMETHOD(GetCharacterCount)(ULONG* count); STDMETHOD(GetCharacterCategory)(ULONG index, BSTR* category); STDMETHOD(GetCharacterDescription)(ULONG index, BSTR* description); STDMETHOD(GetCharacterDispID)(ULONG index, BSTR* dispID); STDMETHOD(GetCharacterColor)(ULONG index, BSTR* color); STDMETHOD(GetCharacterID)(ULONG index, BSTR* id); STDMETHOD(InvokeCharacterEditor)(ULONG index); STDMETHOD(CharacterSpawnOnly)(ULONG index, VARIANT_BOOL* value); STDMETHOD(CharacterDontCategorize)(ULONG index, VARIANT_BOOL* value); STDMETHOD(GetRegionCount)(ULONG* count); STDMETHOD(GetRegionCategory)(ULONG index, BSTR* category); STDMETHOD(GetRegionDescription)(ULONG index, BSTR* description); STDMETHOD(GetRegionTeleportPoint)(ULONG index, BSTR* point); STDMETHOD(GetRegionName)(ULONG index, BSTR* name); STDMETHOD(InvokeRegionEditor)(ULONG index); STDMETHOD(GetDestinationCount)(ULONG* count); STDMETHOD(GetDestinationCategory)(ULONG index, BSTR* category); STDMETHOD(GetDestinationDescription)(ULONG index, BSTR* description); STDMETHOD(GetDestinationTeleportPoint)(ULONG index, BSTR* point); STDMETHOD(GetDestinationName)(ULONG index, BSTR* name); STDMETHOD(InvokeDestinationEditor)(ULONG index); STDMETHOD(EvaluateDef)(BSTR string, ULONG* value); STDMETHOD(GetSpellCount)(ULONG* count); STDMETHOD(GetSpellName)(ULONG index, BSTR* name); STDMETHOD(InvokeSpellEditor)(ULONG index); STDMETHOD(GetSkillCount)(ULONG* count); STDMETHOD(GetSkillName)(ULONG index, BSTR* name); STDMETHOD(InvokeSkillEditor)(ULONG index); STDMETHOD(GetSpawnCount)(ULONG* count); STDMETHOD(GetSpawnInfo)(ULONG index, BSTR* info); STDMETHOD(ReloadSpawnInfo)(ULONG* result); STDMETHOD(GetWorldSpawnUID)(ULONG index, ULONG* uid); STDMETHOD(GetWorldItemCount)(ULONG* count); STDMETHOD(GetWorldItemUID)(ULONG index, ULONG* uid); STDMETHOD(GetWorldItemName)(ULONG index, BSTR* name); STDMETHOD(GetWorldItemCoordinates)(ULONG index, BSTR* coordinates); STDMETHOD(GetWorldItemType)(ULONG index, ULONG* type); STDMETHOD(GetWorldItemDispID)(ULONG index, BSTR* dispID); STDMETHOD(GetWorldItemColor)(ULONG index, BSTR* color); STDMETHOD(GetWorldItemAttributes)(ULONG index, ULONG* attributes); STDMETHOD(IsWorldItemTopLevel)(ULONG index, VARIANT_BOOL* value); STDMETHOD(SetWorldItemFile)(BSTR file); STDMETHOD(ReloadWorldItemFile)(ULONG* result); STDMETHOD(GetEditorCount)(ULONG* count); STDMETHOD(GetEditorDescription)(ULONG index, BSTR* description); STDMETHOD(InvokeEditor)(ULONG index); STDMETHOD(MarkWorldItemForDeletion)(ULONG index, ULONG* result); STDMETHOD(AddWorldItemForImport)(ULONG itemID, ULONG x, ULONG y, CHAR z, BYTE m, ULONG* result); STDMETHOD(UpdateWorldFile)(ULONG* result); STDMETHOD(GetTypeCount)(ULONG* count); STDMETHOD(GetTypeDescription)(ULONG index, BSTR* bDescription); STDMETHOD(GetItemAttributeDescription)(BYTE bit, BSTR* bDescription); STDMETHOD(AddDestination)(USHORT x, USHORT y, CHAR z, BYTE m); STDMETHOD(DeleteDestination)(ULONG index); STDMETHOD(GetBrainCount)(ULONG* count); STDMETHOD(GetBrainDescription)(ULONG index, BSTR* description); STDMETHOD(GetMidiCount)(ULONG* count); STDMETHOD(GetMidiName)(ULONG index, BSTR* name); STDMETHOD(ExportCategories)(BSTR filename); STDMETHOD(InvokeRemoteConsole)(void); STDMETHOD(SetMulPath)(BSTR path); STDMETHOD(SetMulFile)(ULONG index, BSTR file); }; OBJECT_ENTRY_AUTO(__uuidof(Scripts), CScripts) --- NEW FILE: Scripts.rgs --- HKCR { S_Sphere55.Scripts.1 = s 'Scripts Class' { CLSID = s '{57de0245-ce34-4826-9e16-5cc29f58f5f7}' } S_Sphere55.Scripts = s 'Scripts Class' { CLSID = s '{57de0245-ce34-4826-9e16-5cc29f58f5f7}' CurVer = s 'S_Sphere55.Scripts.1' } NoRemove CLSID { ForceRemove {57de0245-ce34-4826-9e16-5cc29f58f5f7} = s 'Scripts Class' { ProgID = s 'S_Sphere55.Scripts.1' VersionIndependentProgID = s 'S_Sphere55.Scripts' ForceRemove 'Programmable' InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } val AppID = s '%APPID%' 'TypeLib' = s '{564863b0-fb04-4fc0-bc9e-e18c462e5a2a}' } } } --- NEW FILE: stdafx.cpp --- /* $Id: stdafx.cpp,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // stdafx.cpp : source file that includes just the standard includes // S_Sphere55.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" --- NEW FILE: stdafx.h --- /* $Id: stdafx.h,v 1.1 2004/04/15 18:53:54 pesterle Exp $ ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2004 * * 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 * ********************************************************************** */ // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #pragma once #ifndef STRICT #define STRICT #endif // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 2000 or later. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. #define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. #endif #define _ATL_APARTMENT_THREADED #define _ATL_NO_AUTOMATIC_NAMESPACE #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit // turns off ATL's hiding of some common and often safely ignored warning messages #define _ATL_ALL_WARNINGS #include <afxwin.h> #include <afxdisp.h> #include <comsvcs.h> #include "resource.h" #include <atlbase.h> #include <atlcom.h> using namespace ATL; |
From: Philip E. <pes...@us...> - 2004-04-15 18:51:38
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere55 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23800/S_Sphere55 Log Message: Directory /cvsroot/sphere-axis/Axis/S_Sphere55 added to the repository |
From: Philip E. <pes...@us...> - 2004-04-15 18:24:26
|
Update of /cvsroot/sphere-axis/Utilities/SWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17781/SWizard Modified Files: SWizardDlg.cpp Log Message: no message Index: SWizardDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/SWizard/SWizardDlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SWizardDlg.cpp 4 Mar 2004 00:08:59 -0000 1.1 --- SWizardDlg.cpp 15 Apr 2004 18:24:16 -0000 1.2 *************** *** 55,58 **** --- 55,62 ---- { CDialog::DoDataExchange(pDX); + DDX_Control(pDX, IDC_OUTPUTPATH, m_eOutput); + DDX_Control(pDX, IDC_LIBRARYNAME, m_eLibraryName); + DDX_Control(pDX, IDC_CLASSNAME, m_eClassName); + DDX_Control(pDX, IDC_STATUS, m_eStatus); } *************** *** 1132,1140 **** FileWrite(f, _T("\t\t\tVersionIndependentProgID = s '%s.%s'\n"), m_sLibrary, m_sClass); FileWrite(f, _T("\t\t\tForceRemove 'Programmable'\n")); ! FileWrite(f, _T("\t\t\tInprocServer32 = s '%MODULE%'\n")); FileWrite(f, _T("\t\t\t{\n")); FileWrite(f, _T("\t\t\t\tval ThreadingModel = s 'Apartment'\n")); FileWrite(f, _T("\t\t\t}\n")); ! FileWrite(f, _T("\t\t\tval AppID = s '%APPID%'\n")); FileWrite(f, _T("\t\t\t'TypeLib' = s '{%s}'\n"), m_sTlbGUID); FileWrite(f, _T("\t\t}\n")); --- 1136,1144 ---- FileWrite(f, _T("\t\t\tVersionIndependentProgID = s '%s.%s'\n"), m_sLibrary, m_sClass); FileWrite(f, _T("\t\t\tForceRemove 'Programmable'\n")); ! FileWrite(f, _T("\t\t\tInprocServer32 = s '%%MODULE%%'\n")); FileWrite(f, _T("\t\t\t{\n")); FileWrite(f, _T("\t\t\t\tval ThreadingModel = s 'Apartment'\n")); FileWrite(f, _T("\t\t\t}\n")); ! FileWrite(f, _T("\t\t\tval AppID = s '%%APPID%%'\n")); FileWrite(f, _T("\t\t\t'TypeLib' = s '{%s}'\n"), m_sTlbGUID); FileWrite(f, _T("\t\t}\n")); *************** *** 2151,2155 **** FileWrite(f, _T("\thelpstring(\"%s 1.0 Type Library\")\n"), m_sLibrary); FileWrite(f, _T("]\n")); ! FileWrite(f, _T("library %sLib\n"), m_sLibrary); FileWrite(f, _T("{\n")); FileWrite(f, _T("\timportlib(\"stdole2.tlb\");\n")); --- 2155,2159 ---- FileWrite(f, _T("\thelpstring(\"%s 1.0 Type Library\")\n"), m_sLibrary); FileWrite(f, _T("]\n")); ! FileWrite(f, _T("library %s\n"), m_sLibrary); FileWrite(f, _T("{\n")); FileWrite(f, _T("\timportlib(\"stdole2.tlb\");\n")); *************** *** 2208,2215 **** FileWrite(f, _T("\tNoRemove AppID\n")); FileWrite(f, _T("\t{\n")); ! FileWrite(f, _T("\t\t'%APPID%' = s '%s'\n"), m_sLibrary); FileWrite(f, _T("\t\t'Scripts.DLL'\n")); FileWrite(f, _T("\t\t{\n")); ! FileWrite(f, _T("\t\t\tval AppID = s '%APPID%'\n")); FileWrite(f, _T("\t\t}\n")); FileWrite(f, _T("\t}\n")); --- 2212,2219 ---- FileWrite(f, _T("\tNoRemove AppID\n")); FileWrite(f, _T("\t{\n")); ! FileWrite(f, _T("\t\t'%%APPID%%' = s '%s'\n"), m_sLibrary); FileWrite(f, _T("\t\t'Scripts.DLL'\n")); FileWrite(f, _T("\t\t{\n")); ! FileWrite(f, _T("\t\t\tval AppID = s '%%APPID%%'\n")); FileWrite(f, _T("\t\t}\n")); FileWrite(f, _T("\t}\n")); *************** *** 2240,2244 **** FileWrite(f, _T("#include \"dlldatax.h\"\n")); FileWrite(f, _T("\n")); ! FileWrite(f, _T("class C%sModule : public CAtlDllModuleT< C%ssModule >\n"), m_sLibrary, m_sLibrary); FileWrite(f, _T("{\n")); FileWrite(f, _T("public :\n")); --- 2244,2248 ---- FileWrite(f, _T("#include \"dlldatax.h\"\n")); FileWrite(f, _T("\n")); ! FileWrite(f, _T("class C%sModule : public CAtlDllModuleT< C%sModule >\n"), m_sLibrary, m_sLibrary); FileWrite(f, _T("{\n")); FileWrite(f, _T("public :\n")); *************** *** 2247,2251 **** FileWrite(f, _T("};\n")); FileWrite(f, _T("\n")); ! FileWrite(f, _T("C%ssModule _AtlModule;\n"), m_sLibrary); FileWrite(f, _T("\n")); FileWrite(f, _T("class C%sApp : public CWinApp\n"), m_sLibrary); --- 2251,2255 ---- FileWrite(f, _T("};\n")); FileWrite(f, _T("\n")); ! FileWrite(f, _T("C%sModule _AtlModule;\n"), m_sLibrary); FileWrite(f, _T("\n")); FileWrite(f, _T("class C%sApp : public CWinApp\n"), m_sLibrary); *************** *** 2431,2435 **** FileWrite(f, _T("\t\t\t\tOutputFile=\"$(OutDir)/%s.dll\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tLinkIncremental=\"2\"\n")); ! FileWrite(f, _T("\t\t\t\tModuleDefinitionFile=\"%s.def\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tGenerateDebugInformation=\"TRUE\"\n")); FileWrite(f, _T("\t\t\t\tSubSystem=\"2\"\n")); --- 2435,2439 ---- FileWrite(f, _T("\t\t\t\tOutputFile=\"$(OutDir)/%s.dll\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tLinkIncremental=\"2\"\n")); ! FileWrite(f, _T("\t\t\t\tModuleDefinitionFile=\".\\%s.def\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tGenerateDebugInformation=\"TRUE\"\n")); FileWrite(f, _T("\t\t\t\tSubSystem=\"2\"\n")); *************** *** 2492,2496 **** FileWrite(f, _T("\t\t\t\tOutputFile=\"$(OutDir)/%s.dll\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tLinkIncremental=\"1\"\n")); ! FileWrite(f, _T("\t\t\t\tModuleDefinitionFile=\"%s.def\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tGenerateDebugInformation=\"TRUE\"\n")); FileWrite(f, _T("\t\t\t\tSubSystem=\"2\"\n")); --- 2496,2500 ---- FileWrite(f, _T("\t\t\t\tOutputFile=\"$(OutDir)/%s.dll\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tLinkIncremental=\"1\"\n")); ! FileWrite(f, _T("\t\t\t\tModuleDefinitionFile=\".\\%s.def\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tGenerateDebugInformation=\"TRUE\"\n")); FileWrite(f, _T("\t\t\t\tSubSystem=\"2\"\n")); *************** *** 2508,2512 **** FileWrite(f, _T("\t\t\t\tHeaderFileName=\"%s.h\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tDLLDataFileName=\"\"\n")); ! FileWrite(f, _T("\t\t\t\tInterfaceIdentifierFileName=\"%s_i.c\"\n")), m_sLibrary; FileWrite(f, _T("\t\t\t\tProxyFileName=\"%s_p.c\"/>\n"), m_sLibrary); FileWrite(f, _T("\t\t\t<Tool\n")); --- 2512,2516 ---- FileWrite(f, _T("\t\t\t\tHeaderFileName=\"%s.h\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tDLLDataFileName=\"\"\n")); ! FileWrite(f, _T("\t\t\t\tInterfaceIdentifierFileName=\"%s_i.c\"\n"), m_sLibrary); FileWrite(f, _T("\t\t\t\tProxyFileName=\"%s_p.c\"/>\n"), m_sLibrary); FileWrite(f, _T("\t\t\t<Tool\n")); |
From: Philip E. <pes...@us...> - 2004-03-25 21:49:44
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8952 Modified Files: Tag: v0_13-Stable drewsky.rc Drewsky.vcproj Log Message: no message Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.84.2.2 retrieving revision 1.84.2.3 diff -C2 -r1.84.2.2 -r1.84.2.3 *** drewsky.rc 22 Aug 2003 04:03:02 -0000 1.84.2.2 --- drewsky.rc 25 Mar 2004 21:38:47 -0000 1.84.2.3 *************** *** 2428,2433 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,3,5 ! PRODUCTVERSION 0,13,3,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 2428,2433 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,3,6 ! PRODUCTVERSION 0,13,3,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 2445,2454 **** BEGIN VALUE "FileDescription", "axis MFC Application" ! VALUE "FileVersion", "0, 13, 3, 5" VALUE "InternalName", "axis" VALUE "LegalCopyright", "Copyright (C) 1998-2003" VALUE "OriginalFilename", "axis.EXE" VALUE "ProductName", "Axis" ! VALUE "ProductVersion", "0, 13, 3, 5" VALUE "SpecialBuild", "Pre-Release" END --- 2445,2454 ---- BEGIN VALUE "FileDescription", "axis MFC Application" ! VALUE "FileVersion", "0, 13, 3, 6" VALUE "InternalName", "axis" VALUE "LegalCopyright", "Copyright (C) 1998-2003" VALUE "OriginalFilename", "axis.EXE" VALUE "ProductName", "Axis" ! VALUE "ProductVersion", "0, 13, 3, 6" VALUE "SpecialBuild", "Pre-Release" END Index: Drewsky.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.vcproj,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -r1.7.2.1 -r1.7.2.2 *** Drewsky.vcproj 18 Aug 2003 17:17:33 -0000 1.7.2.1 --- Drewsky.vcproj 25 Mar 2004 21:38:48 -0000 1.7.2.2 *************** *** 101,105 **** AdditionalDependencies="version.lib" OutputFile="Debug/axis.exe" ! LinkIncremental="1" SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" --- 101,105 ---- AdditionalDependencies="version.lib" OutputFile="Debug/axis.exe" ! LinkIncremental="2" SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" |
From: Philip E. <pes...@us...> - 2004-03-12 22:48:33
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3661 Modified Files: Tag: v0_13-Stable ConfigFile.cpp Log Message: tweaks for Sphere 1.0 support Index: ConfigFile.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ConfigFile.cpp,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -r1.8 -r1.8.2.1 *** ConfigFile.cpp 23 May 2003 04:04:29 -0000 1.8 --- ConfigFile.cpp 12 Mar 2004 22:20:49 -0000 1.8.2.1 *************** *** 269,272 **** --- 269,276 ---- csValue = ""; csValue.Remove(0x0d); + // We need to check for quotes around these values. + csValue.Replace("\"", ""); + // We also should make sure that we don't have double backslashes for paths. + csValue.Replace("\\\\", "\\"); switch ( FindTable(csKey, sm_LoadKeys, SC_QTY) ) { |
From: Philip E. <pes...@us...> - 2004-03-08 18:13:43
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7937 Modified Files: Tag: v0_13-Stable configure configure.in Log Message: Configuration change for 0.13.3.6 Index: configure =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/configure,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -r1.1.4.2 -r1.1.4.3 *** configure 30 Aug 2003 17:02:52 -0000 1.1.4.2 --- configure 8 Mar 2004 17:49:14 -0000 1.1.4.3 *************** *** 1,5 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57 for AxisSvr 0.13.3.5. # # Report bugs to <bu...@fi...>. --- 1,5 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57 for AxisSvr 0.13.3.6. # # Report bugs to <bu...@fi...>. *************** *** 269,274 **** PACKAGE_NAME='AxisSvr' PACKAGE_TARNAME='axissvr' ! PACKAGE_VERSION='0.13.3.5' ! PACKAGE_STRING='AxisSvr 0.13.3.5' PACKAGE_BUGREPORT='bu...@fi...' --- 269,274 ---- PACKAGE_NAME='AxisSvr' PACKAGE_TARNAME='axissvr' ! PACKAGE_VERSION='0.13.3.6' ! PACKAGE_STRING='AxisSvr 0.13.3.6' PACKAGE_BUGREPORT='bu...@fi...' *************** *** 788,792 **** # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures AxisSvr 0.13.3.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... --- 788,792 ---- # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures AxisSvr 0.13.3.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... *************** *** 850,854 **** if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of AxisSvr 0.13.3.5:";; esac cat <<\_ACEOF --- 850,854 ---- if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of AxisSvr 0.13.3.6:";; esac cat <<\_ACEOF *************** *** 937,941 **** if $ac_init_version; then cat <<\_ACEOF ! AxisSvr configure 0.13.3.5 generated by GNU Autoconf 2.57 --- 937,941 ---- if $ac_init_version; then cat <<\_ACEOF ! AxisSvr configure 0.13.3.6 generated by GNU Autoconf 2.57 *************** *** 952,956 **** running configure, to aid debugging if configure makes a mistake. ! It was created by AxisSvr $as_me 0.13.3.5, which was generated by GNU Autoconf 2.57. Invocation command line was --- 952,956 ---- running configure, to aid debugging if configure makes a mistake. ! It was created by AxisSvr $as_me 0.13.3.6, which was generated by GNU Autoconf 2.57. Invocation command line was *************** *** 1543,1547 **** # Define the identity of the package. PACKAGE=axissvr ! VERSION=0.13.3.5 --- 1543,1547 ---- # Define the identity of the package. PACKAGE=axissvr ! VERSION=0.13.3.6 *************** *** 5925,5929 **** cat >&5 <<_CSEOF ! This file was extended by AxisSvr $as_me 0.13.3.5, which was generated by GNU Autoconf 2.57. Invocation command line was --- 5925,5929 ---- cat >&5 <<_CSEOF ! This file was extended by AxisSvr $as_me 0.13.3.6, which was generated by GNU Autoconf 2.57. Invocation command line was *************** *** 5983,5987 **** cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! AxisSvr config.status 0.13.3.5 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" --- 5983,5987 ---- cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! AxisSvr config.status 0.13.3.6 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: configure.in =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/configure.in,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -r1.1.4.2 -r1.1.4.3 *** configure.in 30 Aug 2003 17:02:52 -0000 1.1.4.2 --- configure.in 8 Mar 2004 17:49:15 -0000 1.1.4.3 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) ! AC_INIT([AxisSvr],[0.13.3.5],[bu...@fi...]) AC_CONFIG_SRCDIR([gwhogsvr.h]) AM_INIT_AUTOMAKE --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) ! AC_INIT([AxisSvr],[0.13.3.6],[bu...@fi...]) AC_CONFIG_SRCDIR([gwhogsvr.h]) AM_INIT_AUTOMAKE |
From: Philip E. <pes...@us...> - 2004-03-08 17:54:42
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3710 Modified Files: Tag: v0_13-Stable gwhogsvr.cpp Log Message: Fixed the stristr function for linux. Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27.2.6 retrieving revision 1.27.2.7 diff -C2 -r1.27.2.6 -r1.27.2.7 *** gwhogsvr.cpp 8 Mar 2004 05:46:58 -0000 1.27.2.6 --- gwhogsvr.cpp 8 Mar 2004 17:30:15 -0000 1.27.2.7 *************** *** 76,80 **** --- 76,84 ---- char *stristr( char *pszString, char *pszCharSet) { + #ifdef WIN32 return strstr( _strupr(pszString), _strupr(pszCharSet)); + #else + return strcasestr( pszString, pszCharSet ); + #endif } |
From: Philip E. <pes...@us...> - 2004-03-08 06:11:03
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29309 Modified Files: Tag: v0_13-Stable gwhogsvr.cpp Log Message: Fixes for 0.13.3.6 Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27.2.5 retrieving revision 1.27.2.6 diff -C2 -r1.27.2.5 -r1.27.2.6 *** gwhogsvr.cpp 16 Oct 2003 21:01:21 -0000 1.27.2.5 --- gwhogsvr.cpp 8 Mar 2004 05:46:58 -0000 1.27.2.6 *************** *** 44,48 **** #endif ! #define SVR_VERSION "0.13.3.6BETA" #ifdef WIN32 #define SVR_PLATFORM "Win32" --- 44,48 ---- #endif ! #define SVR_VERSION "0.13.3.6" #ifdef WIN32 #define SVR_PLATFORM "Win32" *************** *** 74,80 **** //added a little function which compares strings not case sensitive //not written very fast but isn't called often! ! char *stristr( char szString[] char szCharSet[]) { ! return strstr( _strupr(szString), _strupr(szCharSet)); } --- 74,80 ---- //added a little function which compares strings not case sensitive //not written very fast but isn't called often! ! char *stristr( char *pszString, char *pszCharSet) { ! return strstr( _strupr(pszString), _strupr(pszCharSet)); } *************** *** 2583,2592 **** } // First check the IP Address against the test host ! if ( stristr(pszIPAddr, pszTestHost) != NULL ) return 1; // Next check the hostname against the test host if ( pHostent != NULL ) { ! if ( stristr(pHostent->h_name, pszTestHost) != NULL ) return 1; } --- 2583,2592 ---- } // First check the IP Address against the test host ! if ( stristr((char*)pszIPAddr, (char*)pszTestHost) != NULL ) return 1; // Next check the hostname against the test host if ( pHostent != NULL ) { ! if ( stristr(pHostent->h_name, (char*)pszTestHost) != NULL ) return 1; } |
From: Philip E. <pes...@us...> - 2004-03-04 04:13:02
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5754 Modified Files: common.cpp common.h Log Message: no message Index: common.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/common.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** common.cpp 24 Jul 2003 20:12:44 -0000 1.4 --- common.cpp 4 Mar 2004 03:52:05 -0000 1.5 *************** *** 66,70 **** { CString s(pszStr); ! if ( s.SpanIncluding(_T("0123456789abcdefABCDEF")) == s ) return true; else --- 66,79 ---- { CString s(pszStr); ! if ( s.SpanIncluding(_T("0123456789abcdefABCDEF")) == s && s.Left(1) == _T("0") ) ! return true; ! else ! return false; ! } ! ! bool IsDecimalValue( const TCHAR * pszStr ) ! { ! CString s(pszStr); ! if ( s.SpanIncluding(_T("0123456789")) == s ) return true; else Index: common.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/common.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** common.h 24 Jul 2003 20:12:44 -0000 1.4 --- common.h 4 Mar 2004 03:52:05 -0000 1.5 *************** *** 59,60 **** --- 59,61 ---- __declspec(dllexport) DWORD ahextoi( const TCHAR * pszStr ); __declspec(dllexport) bool IsHexValue( const TCHAR * pszStr ); + __declspec(dllexport) bool IsDecimalValue( const TCHAR * pszStr ); |
Update of /cvsroot/sphere-axis/Utilities/SWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28176/SWizard Added Files: resource.h stdafx.cpp stdafx.h SWizard.cpp SWizard.h SWizard.rc SWizard.vcproj SWizardDlg.cpp SWizardDlg.h Log Message: no message --- NEW FILE: resource.h --- //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by SWizard.rc // #define IDR_MANIFEST 1 #define IDM_ABOUTBOX 0x0010 #define IDD_ABOUTBOX 100 #define IDS_ABOUTBOX 101 #define IDD_SWIZARD_DIALOG 102 #define IDR_MAINFRAME 128 #define IDC_LIBRARYNAME 1000 #define IDC_CLASSNAME 1001 #define IDC_RADIO1 1002 #define IDC_RADIO2 1003 #define IDC_RADIO3 1004 #define IDC_STATUS 1005 #define IDC_CREATEFILES 1006 #define IDC_OUTPUTPATH 1007 #define IDC_BROWSEPATH 1008 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 129 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif --- NEW FILE: stdafx.cpp --- // stdafx.cpp : source file that includes just the standard includes // SWizard.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" --- NEW FILE: stdafx.h --- // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #pragma once #ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. #define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. #endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit // turns off MFC's hiding of some common and often safely ignored warning messages #define _AFX_ALL_WARNINGS #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxdisp.h> // MFC Automation classes #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT --- NEW FILE: SWizard.cpp --- // SWizard.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "SWizard.h" #include "SWizardDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CSWizardApp BEGIN_MESSAGE_MAP(CSWizardApp, CWinApp) ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() // CSWizardApp construction CSWizardApp::CSWizardApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } // The one and only CSWizardApp object CSWizardApp theApp; // CSWizardApp initialization BOOL CSWizardApp::InitInstance() { // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. InitCommonControls(); CWinApp::InitInstance(); AfxEnableControlContainer(); CSWizardDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } --- NEW FILE: SWizard.h --- // SWizard.h : main header file for the PROJECT_NAME application // #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols // CSWizardApp: // See SWizard.cpp for the implementation of this class // class CSWizardApp : public CWinApp { public: CSWizardApp(); // Overrides public: virtual BOOL InitInstance(); // Implementation DECLARE_MESSAGE_MAP() }; extern CSWizardApp theApp; --- NEW FILE: SWizard.rc --- // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\SWizard.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON "res\\SWizard.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About SWizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 LTEXT "SWizard Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2004 Philip A. Esterle",IDC_STATIC,40,25, 119,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP END IDD_SWIZARD_DIALOG DIALOGEX 0, 0, 320, 200 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "Script Module Wizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_OUTPUTPATH,55,15,145,14,ES_AUTOHSCROLL PUSHBUTTON "Browse",IDC_BROWSEPATH,205,16,45,12 EDITTEXT IDC_LIBRARYNAME,56,41,97,13,ES_AUTOHSCROLL EDITTEXT IDC_CLASSNAME,56,56,98,14,ES_AUTOHSCROLL CONTROL "C++",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP, 29,84,31,10 CONTROL "C#",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,67,84,26,10 CONTROL "VB",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,105,84,24,10 DEFPUSHBUTTON "Create Files",IDC_CREATEFILES,161,82,57,15 PUSHBUTTON "Finished",IDOK,263,7,50,16 LTEXT "Library Name",IDC_STATIC,12,43,44,8 LTEXT "Class Name",IDC_STATIC,18,59,38,8 GROUPBOX "Static",IDC_STATIC,7,32,151,41 GROUPBOX "Language Properties",IDC_STATIC,7,73,151,26 EDITTEXT IDC_STATUS,7,101,306,92,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL GROUPBOX "Output",IDC_STATIC,7,7,249,26 LTEXT "Output Path",IDC_STATIC,13,18,40,8 END ///////////////////////////////////////////////////////////////////////////// // // Version // 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 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "TODO: <Company name>" VALUE "FileDescription", "TODO: <File description>" VALUE "FileVersion", "1.0.0.1" VALUE "InternalName", "SWizard.exe" VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved." VALUE "OriginalFilename", "SWizard.exe" VALUE "ProductName", "TODO: <Product name>" VALUE "ProductVersion", "1.0.0.1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 228 TOPMARGIN, 7 BOTTOMMARGIN, 48 END IDD_SWIZARD_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 313 TOPMARGIN, 7 BOTTOMMARGIN, 193 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // RT_MANIFEST // IDR_MANIFEST RT_MANIFEST "res\\SWizard.manifest" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE BEGIN IDS_ABOUTBOX "&About SWizard..." END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\SWizard.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: SWizard.vcproj --- <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.00" Name="SWizard" ProjectGUID="{B3AC4059-8C35-48F7-8597-AB85C795E12B}" Keyword="MFCProj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="1" UseOfMFC="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="rpcrt4.lib" LinkIncremental="2" GenerateDebugInformation="TRUE" SubSystem="2" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="FALSE"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="1" UseOfMFC="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" OmitFramePointers="TRUE" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG" StringPooling="TRUE" MinimalRebuild="FALSE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="FALSE"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> </Configurations> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> <File RelativePath="SWizard.cpp"> </File> <File RelativePath="SWizardDlg.cpp"> </File> <File RelativePath="stdafx.cpp"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc"> <File RelativePath="Resource.h"> </File> <File RelativePath="SWizard.h"> </File> <File RelativePath="SWizardDlg.h"> </File> <File RelativePath="stdafx.h"> </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"> <File RelativePath="res\SWizard.ico"> </File> <File RelativePath="res\SWizard.manifest"> </File> <File RelativePath="SWizard.rc"> </File> <File RelativePath="res\SWizard.rc2"> </File> </Filter> <File RelativePath="ReadMe.txt"> </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: SWizardDlg.cpp --- // SWizardDlg.cpp : implementation file // #include "stdafx.h" #include "SWizard.h" #include "SWizardDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CAboutDlg dialog used for App About class CAboutDlg : public CDialog { public: CAboutDlg(); [...2996 lines suppressed...] return; } FileWrite(f, _T("// stdafx.cpp : source file that includes just the standard includes\n")); FileWrite(f, _T("// %s.pch will be the pre-compiled header\n"), m_sLibrary); FileWrite(f, _T("// stdafx.obj will contain the pre-compiled type information\n")); FileWrite(f, _T("\n")); FileWrite(f, _T("#include \"stdafx.h\"\n")); f.Close(); } void CSWizardDlg::FileWrite(CStdioFile &f, const char *format, ...) { CString s; va_list vargs; va_start(vargs, format); s.FormatV(format, vargs); va_end(vargs); f.WriteString(s); } --- NEW FILE: SWizardDlg.h --- // SWizardDlg.h : header file // #pragma once #include "afxwin.h" // CSWizardDlg dialog class CSWizardDlg : public CDialog { // Construction public: CSWizardDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_SWIZARD_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() int BuildFilesCPlusPlus(); int BuildFilesCSharp(); int BuildFilesVB(); void GenerateGUIDs(); CString MakeGUID(); CString m_sInterfaceGUID; CString m_sTlbGUID; CString m_sClassGUID; CString m_sCompRegGUID; CString m_sCompRegInterfaceGUID; CString m_sAppIDResourceGUID; CString m_sProjectGUID; CString m_sPath; CString m_sClass; CString m_sLibrary; CString m_sClassUpper; CString m_sLibraryUpper; // Functions to build C++ files void BuildCDllDataFiles(); void BuildCClassFiles(); void BuildCTlbFiles(); void BuildCProjectFiles(); void BuildCExtraFiles(); // Functions to build C# files // Functions to build VB files // Other functions void FileWrite(CStdioFile &f, const char * format, ...); public: afx_msg void OnBnClickedBrowsepath(); afx_msg void OnBnClickedCreatefiles(); CEdit m_eOutput; CEdit m_eLibraryName; CEdit m_eClassName; CEdit m_eStatus; }; |
From: Philip E. <pes...@us...> - 2004-03-04 00:29:46
|
Update of /cvsroot/sphere-axis/Utilities/SWizard/res In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28176/SWizard/res Added Files: SWizard.manifest SWizard.rc2 SWizard.ico Log Message: no message --- NEW FILE: SWizard.manifest --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Microsoft.Windows.SWizard" type="win32" /> <description>Your app description here</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly> --- NEW FILE: SWizard.rc2 --- // // SWizard.RC2 - resources Microsoft Visual C++ does not edit directly // #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // Add manually edited resources here... ///////////////////////////////////////////////////////////////////////////// --- NEW FILE: SWizard.ico --- ÷÷÷÷÷÷÷÷÷÷÷÷÷÷ï À®êÊËÌÜÝÞÎÏпËÌÌÇÒ¿§÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïïïïïÀ®êàÊËõôÍÎÏÐõ üüüüüüüû´ÇÓÔÖרÚÊËÅ¿«¬üüüüüüüüüûû¡æÆçÓõøòçãø÷Å«üüüüüüüüüüüüüæÆãçõ !D?H31IT.-,%B;G1JKS.( )*E9A011R.&#++E/4678:."&' NQWhX^XXXe rpqt}~]mv\l{ £hE¤iJX7§bIêεùîÛéȧ²t5RDE # |
From: Philip E. <pes...@us...> - 2004-03-04 00:29:46
|
Update of /cvsroot/sphere-axis/Utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28176 Modified Files: Utilities.sln Log Message: no message Index: Utilities.sln =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/Utilities.sln,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Utilities.sln 1 Mar 2004 17:27:28 -0000 1.2 --- Utilities.sln 4 Mar 2004 00:08:59 -0000 1.3 *************** *** 4,7 **** --- 4,9 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCWizard", "CCWizard\CCWizard.vcproj", "{D87556C2-D080-4D6D-B2DA-5EDFACA64397}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SWizard", "SWizard\SWizard.vcproj", "{B3AC4059-8C35-48F7-8597-AB85C795E12B}" + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 20,23 **** --- 22,29 ---- {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Release.ActiveCfg = Release|Win32 {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Release.Build.0 = Release|Win32 + {B3AC4059-8C35-48F7-8597-AB85C795E12B}.Debug.ActiveCfg = Debug|Win32 + {B3AC4059-8C35-48F7-8597-AB85C795E12B}.Debug.Build.0 = Debug|Win32 + {B3AC4059-8C35-48F7-8597-AB85C795E12B}.Release.ActiveCfg = Release|Win32 + {B3AC4059-8C35-48F7-8597-AB85C795E12B}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
From: Philip E. <pes...@us...> - 2004-03-04 00:29:46
|
Update of /cvsroot/sphere-axis/Utilities/CCWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28176/CCWizard Modified Files: CCWizard.rc CCWizardDlg.cpp Log Message: no message Index: CCWizard.rc =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/CCWizard/CCWizard.rc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** CCWizard.rc 3 Oct 2003 21:17:53 -0000 1.3 --- CCWizard.rc 4 Mar 2004 00:08:59 -0000 1.4 *************** *** 81,85 **** LTEXT "CCWizard Version 1.0",IDC_STATIC,40,10,119,8, SS_NOPREFIX ! LTEXT "Copyright (C) 2003 Philip A. Esterle",IDC_STATIC,40,25, 188,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP --- 81,85 ---- LTEXT "CCWizard Version 1.0",IDC_STATIC,40,10,119,8, SS_NOPREFIX ! LTEXT "Copyright (C) 2004 Philip A. Esterle",IDC_STATIC,40,25, 188,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP *************** *** 90,94 **** WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW ! CAPTION "CCWizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN --- 90,94 ---- WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW ! CAPTION "Client Command Module Wizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN Index: CCWizardDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/CCWizard/CCWizardDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** CCWizardDlg.cpp 3 Oct 2003 21:17:53 -0000 1.3 --- CCWizardDlg.cpp 4 Mar 2004 00:08:59 -0000 1.4 *************** *** 1263,1267 **** FileWrite(f, _T("public :\n")); FileWrite(f, _T("\tDECLARE_LIBID(LIBID_%sLib)\n"), m_sLibrary); ! FileWrite(f, _T("\tDECLARE_REGISTRY_APPID_RESOURCEID(IDR_%s, \"{%s}\")\n"), m_sClassUpper, m_sAppIDResourceGUID); FileWrite(f, _T("};\n")); FileWrite(f, _T("\n")); --- 1263,1267 ---- FileWrite(f, _T("public :\n")); FileWrite(f, _T("\tDECLARE_LIBID(LIBID_%sLib)\n"), m_sLibrary); ! FileWrite(f, _T("\tDECLARE_REGISTRY_APPID_RESOURCEID(IDR_%s, \"{%s}\")\n"), m_sLibraryUpper, m_sAppIDResourceGUID); FileWrite(f, _T("};\n")); FileWrite(f, _T("\n")); |
From: Philip E. <pes...@us...> - 2004-03-04 00:28:45
|
Update of /cvsroot/sphere-axis/Utilities/SWizard/res In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27979/res Log Message: Directory /cvsroot/sphere-axis/Utilities/SWizard/res added to the repository |
From: Philip E. <pes...@us...> - 2004-03-04 00:27:35
|
Update of /cvsroot/sphere-axis/Utilities/SWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27749/SWizard Log Message: Directory /cvsroot/sphere-axis/Utilities/SWizard added to the repository |
From: Philip E. <pes...@us...> - 2004-03-01 17:46:31
|
Update of /cvsroot/sphere-axis/Utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21100 Modified Files: Utilities.sln Log Message: no message Index: Utilities.sln =================================================================== RCS file: /cvsroot/sphere-axis/Utilities/Utilities.sln,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Utilities.sln 3 Sep 2003 21:13:26 -0000 1.1.1.1 --- Utilities.sln 1 Mar 2004 17:27:28 -0000 1.2 *************** *** 2,5 **** --- 2,7 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rc2xml", "rc2xml\rc2xml.vcproj", "{CB71D33F-1940-4D06-A318-C444A05A2F49}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCWizard", "CCWizard\CCWizard.vcproj", "{D87556C2-D080-4D6D-B2DA-5EDFACA64397}" + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 14,17 **** --- 16,23 ---- {CB71D33F-1940-4D06-A318-C444A05A2F49}.Release.ActiveCfg = Release|Win32 {CB71D33F-1940-4D06-A318-C444A05A2F49}.Release.Build.0 = Release|Win32 + {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Debug.ActiveCfg = Debug|Win32 + {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Debug.Build.0 = Debug|Win32 + {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Release.ActiveCfg = Release|Win32 + {D87556C2-D080-4D6D-B2DA-5EDFACA64397}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
From: Philip E. <pes...@us...> - 2003-10-16 21:01:28
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv9110 Modified Files: Tag: v0_13-Stable gwhogsvr.cpp Log Message: Incorporated herby's stristr patch. Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27.2.4 retrieving revision 1.27.2.5 diff -C2 -r1.27.2.4 -r1.27.2.5 *** gwhogsvr.cpp 14 Oct 2003 05:12:54 -0000 1.27.2.4 --- gwhogsvr.cpp 16 Oct 2003 21:01:21 -0000 1.27.2.5 *************** *** 71,74 **** --- 71,82 ---- char g_szSpherePath[MAX_BUFFER]; + //herby: + //added a little function which compares strings not case sensitive + //not written very fast but isn't called often! + char *stristr( char szString[] char szCharSet[]) + { + return strstr( _strupr(szString), _strupr(szCharSet)); + } + #ifdef WIN32 int service_main(int argc, char *argv[]) *************** *** 1104,1110 **** { // comment herby: I should write a stristr (not case sensitive) function ! if ((strstr(szLine, "WORLDSAVE=") == szLine) && (szPath[0] == 0x00)) memcpy(&szPath[0], &szLine[10], strlen(szLine) - 10); ! if (strstr(szLine, "ACCTFILES=") == szLine) { memset(szPath, 0x00, sizeof(szPath)); --- 1112,1118 ---- { // comment herby: I should write a stristr (not case sensitive) function ! if ((stristr(szLine, "WORLDSAVE=") == szLine) && (szPath[0] == 0x00)) memcpy(&szPath[0], &szLine[10], strlen(szLine) - 10); ! if (stristr(szLine, "ACCTFILES=") == szLine) { memset(szPath, 0x00, sizeof(szPath)); *************** *** 1167,1171 **** { stoupper(&szBuffer[0], strlen(szBuffer)); ! if (strstr(szBuffer, szTargetAcct) != NULL) { // Found the account --- 1175,1179 ---- { stoupper(&szBuffer[0], strlen(szBuffer)); ! if (stristr(szBuffer, szTargetAcct) != NULL) { // Found the account *************** *** 1178,1182 **** stoupper(&szUCBuffer[0], strlen(szBuffer)); // Check for either PRIVS or PASSWORD ! if (strstr(szUCBuffer, "PASSWORD=") == szUCBuffer) { // Compare it to the real password --- 1186,1190 ---- stoupper(&szUCBuffer[0], strlen(szBuffer)); // Check for either PRIVS or PASSWORD ! if (stristr(szUCBuffer, "PASSWORD=") == szUCBuffer) { // Compare it to the real password *************** *** 1185,1189 **** bBadPassword = false; } ! if (strstr(szUCBuffer, "PLEVEL=") != NULL) { char szLevel[20]; --- 1193,1197 ---- bBadPassword = false; } ! if (stristr(szUCBuffer, "PLEVEL=") != NULL) { char szLevel[20]; *************** *** 1400,1409 **** if (strcmp( pszFileName, g_szAccuFile) == 0) { ! if (strstr(szLine, "ACCTFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); break; } ! else if ( szScriptPath[0] == 0x00 && (strstr(szLine, "WORLDSAVE=") == szLine) ) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); --- 1408,1417 ---- if (strcmp( pszFileName, g_szAccuFile) == 0) { ! if (stristr(szLine, "ACCTFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); break; } ! else if ( szScriptPath[0] == 0x00 && (stristr(szLine, "WORLDSAVE=") == szLine) ) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); *************** *** 1413,1417 **** else { ! if (strstr(szLine, "SCPFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); --- 1421,1425 ---- else { ! if (stristr(szLine, "SCPFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); *************** *** 1529,1533 **** if (szLine[0] != 0x00) { ! if (strstr(szLine, "SCPFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); --- 1537,1541 ---- if (szLine[0] != 0x00) { ! if (stristr(szLine, "SCPFILES=") == szLine) { memcpy(&szScriptPath[0], &szLine[9], strlen(szLine) - 9); *************** *** 2041,2045 **** if (szLine[0] != 0x00) { ! if (strstr(szLine, "WORLDSAVE=") == szLine && ( strlen(szLine) > 10 )) { //memset(&szPath[0], 0x00, sizeof(szPath)); --- 2049,2053 ---- if (szLine[0] != 0x00) { ! if (stristr(szLine, "WORLDSAVE=") == szLine && ( strlen(szLine) > 10 )) { //memset(&szPath[0], 0x00, sizeof(szPath)); *************** *** 2105,2116 **** //the other problem is spawnpoint don't appear only as i_worldgem_bit as I can see they might be i_pet_somewhat - maybe problem //I use the flag bWorldGem which is init above ! if ( (strstr(szLine, "[WORLDITEM I_WORLDGEM_BIT") != NULL ) || (strstr(szLine, "[WORLDITEM I_PET_") != NULL ) || (strstr(szLine, "[WORLDITEM I_SPAWNBIT") != NULL ) ) bWorldGem = TRUE; else if ( strstr(szLine, "[") != NULL ) bWorldGem = FALSE; ! if (strstr(szLine, "P=") == szLine && (strlen(szLine) > 2) && (bWorldGem)) sprintf(szCoords, &szLine[2]); ! if (strstr(szLine, "TYPE=34") != NULL || strstr(szLine, "TYPE=T_SPAWN_CHAR") != NULL || strstr(szLine, "TYPE=034") != NULL || ( strstr(szLine, "DISPID=I_PET_") != NULL && bWorldGem ) ) { // this is a NPC spawn point --- 2113,2124 ---- //the other problem is spawnpoint don't appear only as i_worldgem_bit as I can see they might be i_pet_somewhat - maybe problem //I use the flag bWorldGem which is init above ! if ( (stristr(szLine, "[WORLDITEM I_WORLDGEM_BIT") != NULL ) || (stristr(szLine, "[WORLDITEM I_PET_") != NULL ) || (stristr(szLine, "[WORLDITEM I_SPAWNBIT") != NULL ) ) bWorldGem = TRUE; else if ( strstr(szLine, "[") != NULL ) bWorldGem = FALSE; ! if (stristr(szLine, "P=") == szLine && (strlen(szLine) > 2) && (bWorldGem)) sprintf(szCoords, &szLine[2]); ! if (stristr(szLine, "TYPE=34") != NULL || stristr(szLine, "TYPE=T_SPAWN_CHAR") != NULL || stristr(szLine, "TYPE=034") != NULL || ( stristr(szLine, "DISPID=I_PET_") != NULL && bWorldGem ) ) { // this is a NPC spawn point *************** *** 2150,2165 **** break; } ! if (strstr(szLine, "MORE1=") != NULL && (strlen(szLine) > 6)) sprintf(szID, &szLine[6]); ! if (strstr(szLine, "MORE=") != NULL && (strlen(szLine) > 5)) sprintf(szID, &szLine[5]); ! if (strstr(szLine, "P=") != NULL && (strlen(szLine) > 2)) { ! if (strstr(szLine, "MOREP=") == NULL) sprintf(szCoords, &szLine[2]); } } } ! if (strstr(szLine, "TYPE=69") != NULL || strstr(szLine, "TYPE=T_SPAWN_ITEM") != NULL || strstr(szLine, "TYPE=069") != NULL) { // This is an item spawn point --- 2158,2173 ---- break; } ! if (stristr(szLine, "MORE1=") != NULL && (strlen(szLine) > 6)) sprintf(szID, &szLine[6]); ! if (stristr(szLine, "MORE=") != NULL && (strlen(szLine) > 5)) sprintf(szID, &szLine[5]); ! if (stristr(szLine, "P=") != NULL && (strlen(szLine) > 2)) { ! if (stristr(szLine, "MOREP=") == NULL) sprintf(szCoords, &szLine[2]); } } } ! if (stristr(szLine, "TYPE=69") != NULL || stristr(szLine, "TYPE=T_SPAWN_ITEM") != NULL || stristr(szLine, "TYPE=069") != NULL) { // This is an item spawn point *************** *** 2199,2209 **** break; } ! if (strstr(szLine, "MORE1=") != NULL && (strlen(szLine) > 6)) sprintf(szID, &szLine[6]); ! if (strstr(szLine, "MORE=") != NULL && (strlen(szLine) > 5)) sprintf(szID, &szLine[5]); ! //if (strstr(szLine, "P=") != NULL && (strlen(szLine) > 2)) //{ ! // if (strstr(szLine, "MOREP=") == NULL) // sprintf(szCoords, &szLine[2]); //} --- 2207,2217 ---- break; } ! if (stristr(szLine, "MORE1=") != NULL && (strlen(szLine) > 6)) sprintf(szID, &szLine[6]); ! if (stristr(szLine, "MORE=") != NULL && (strlen(szLine) > 5)) sprintf(szID, &szLine[5]); ! //if (stristr(szLine, "P=") != NULL && (strlen(szLine) > 2)) //{ ! // if (stristr(szLine, "MOREP=") == NULL) // sprintf(szCoords, &szLine[2]); //} *************** *** 2272,2276 **** { fReadLine(pFile, szLine, sizeof(szLine)); ! if ( strstr(szLine, "[RESOURCES]") != NULL ) { bInResources = TRUE; --- 2280,2284 ---- { fReadLine(pFile, szLine, sizeof(szLine)); ! if ( stristr(szLine, "[RESOURCES]") != NULL ) { bInResources = TRUE; *************** *** 2575,2584 **** } // First check the IP Address against the test host ! if ( strstr(pszIPAddr, pszTestHost) != NULL ) return 1; // Next check the hostname against the test host if ( pHostent != NULL ) { ! if ( strstr(pHostent->h_name, pszTestHost) != NULL ) return 1; } --- 2583,2592 ---- } // First check the IP Address against the test host ! if ( stristr(pszIPAddr, pszTestHost) != NULL ) return 1; // Next check the hostname against the test host if ( pHostent != NULL ) { ! if ( stristr(pHostent->h_name, pszTestHost) != NULL ) return 1; } |
From: Philip E. <pes...@us...> - 2003-10-14 05:12:58
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv22507 Modified Files: Tag: v0_13-Stable gwhogsvr.cpp Log Message: Updated the version to 0.13.3.6BETA Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27.2.3 retrieving revision 1.27.2.4 diff -C2 -r1.27.2.3 -r1.27.2.4 *** gwhogsvr.cpp 13 Oct 2003 21:34:06 -0000 1.27.2.3 --- gwhogsvr.cpp 14 Oct 2003 05:12:54 -0000 1.27.2.4 *************** *** 44,48 **** #endif ! #define SVR_VERSION "0.13.3.5" #ifdef WIN32 #define SVR_PLATFORM "Win32" --- 44,48 ---- #endif ! #define SVR_VERSION "0.13.3.6BETA" #ifdef WIN32 #define SVR_PLATFORM "Win32" |
From: Philip E. <pes...@us...> - 2003-10-14 05:12:39
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv22486 Added Files: Tag: v0_13-Stable gwhogsvr.sln gwhogsvr.vcproj Log Message: Added sln and vcproj files to the project for compatibility with VS.NET --- NEW FILE: gwhogsvr.sln --- Microsoft Visual Studio Solution File, Format Version 7.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gwhogsvr", "gwhogsvr.vcproj", "{4355C5B9-8C73-4C45-A286-09B36C8EE40C}" EndProject Global GlobalSection(SolutionConfiguration) = preSolution ConfigName.0 = Debug ConfigName.1 = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {4355C5B9-8C73-4C45-A286-09B36C8EE40C}.Debug.ActiveCfg = Debug|Win32 {4355C5B9-8C73-4C45-A286-09B36C8EE40C}.Debug.Build.0 = Debug|Win32 {4355C5B9-8C73-4C45-A286-09B36C8EE40C}.Release.ActiveCfg = Release|Win32 {4355C5B9-8C73-4C45-A286-09B36C8EE40C}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal --- NEW FILE: gwhogsvr.vcproj --- <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.00" Name="gwhogsvr" SccProjectName="" SccAuxPath="" SccLocalPath="" SccProvider=""> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory=".\gwhogsv0" IntermediateDirectory=".\gwhogsv0" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" RuntimeLibrary="0" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\gwhogsv0/gwhogsvr.pch" AssemblerListingLocation=".\gwhogsv0/" ObjectFile=".\gwhogsv0/" ProgramDataBaseFileName=".\gwhogsv0/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib" OutputFile="axissvr.exe" LinkIncremental="2" SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\gwhogsv0/axissvr.pdb" SubSystem="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\gwhogsv0/gwhogsvr.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory=".\gwhogsvr" IntermediateDirectory=".\gwhogsvr" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\gwhogsvr/gwhogsvr.pch" AssemblerListingLocation=".\gwhogsvr/" ObjectFile=".\gwhogsvr/" ProgramDataBaseFileName=".\gwhogsvr/" WarningLevel="3" SuppressStartupBanner="TRUE"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib" OutputFile="gwhogsvr/axissvr.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" ProgramDatabaseFile=".\gwhogsvr/axissvr.pdb" SubSystem="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\gwhogsvr/gwhogsvr.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> </Configurations> <Files> <Filter Name="Source Files" Filter="*.cpp; *.c"> <File RelativePath=".\gwhogsvr.cpp"> </File> <File RelativePath=".\messages.mc"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Building Message Files" CommandLine="mc -v -c -r .\ messages.mc " Outputs=".\messages.h;.\MSG00001.bin"/> </FileConfiguration> </File> <File RelativePath=".\messages.rc"> </File> <File RelativePath=".\ntservice.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="*.h"> <File RelativePath=".\gwhogsvr.h"> </File> <File RelativePath=".\messages.h"> </File> <File RelativePath=".\ntservice.h"> </File> </Filter> <File RelativePath=".\MSG00001.bin"> </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Philip E. <pes...@us...> - 2003-10-13 21:34:10
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv13291 Modified Files: Tag: v0_13-Stable axissvr.cfg gwhogsvr.cpp Log Message: Added a new configuration parameter called SPHEREPATH which allows axis server to run from a different directory than sphere. Index: axissvr.cfg =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/axissvr.cfg,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -r1.3 -r1.3.4.1 *** axissvr.cfg 26 Jul 2002 19:05:55 -0000 1.3 --- axissvr.cfg 13 Oct 2003 21:34:06 -0000 1.3.4.1 *************** *** 63,64 **** --- 63,69 ---- # quotes. # ALLOWEDHOSTS localhost,10.0. + + # SPHEREPATH specifies the location of the sphere server executable file. If + # you have AxisServer and Sphere in the same directory, you should leave this + # commented out. Otherwise, provide the full path of the sphere executable. + # SPHEREPATH c:\sphere Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27.2.2 retrieving revision 1.27.2.3 diff -C2 -r1.27.2.2 -r1.27.2.3 *** gwhogsvr.cpp 22 Aug 2003 04:05:03 -0000 1.27.2.2 --- gwhogsvr.cpp 13 Oct 2003 21:34:06 -0000 1.27.2.3 *************** *** 69,72 **** --- 69,73 ---- char * g_pszSpawns; int g_iReceiveTimeout; + char g_szSpherePath[MAX_BUFFER]; #ifdef WIN32 *************** *** 83,86 **** --- 84,88 ---- memset(g_szAllowedExtensions, 0x00, sizeof(g_szAllowedExtensions)); memset(g_szLogPath, 0x00, sizeof(g_szLogPath)); + memset(g_szSpherePath, 0x00, sizeof(g_szSpherePath)); #ifdef WIN32 char szMutex[256]; *************** *** 181,184 **** --- 183,189 ---- if (szCommand != NULL) strcpy(g_szDeniedHosts, &szCommand[12]); + szCommand = strstr(szLine, "SPHEREPATH"); + if (szCommand != NULL) + strcpy(g_szSpherePath, &szCommand[11]); } } *************** *** 191,194 **** --- 196,205 ---- SysMessage("\nUnable to open axissvr.cfg...using default values.\n"); } + if ( strlen(g_szSpherePath) > 0 ) + #ifdef _WIN32 + _chdir(g_szSpherePath); + #else + chdir(g_szSpherePath); + #endif dwTusPort = 2593; |