sphere-axis-commits Mailing List for Axis for Sphere (Page 8)
Brought to you by:
pesterle
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(71) |
Jun
(4) |
Jul
(26) |
Aug
(23) |
Sep
(6) |
Oct
(2) |
Nov
(74) |
Dec
(89) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(88) |
Feb
(51) |
Mar
(26) |
Apr
(8) |
May
(55) |
Jun
(67) |
Jul
(37) |
Aug
(46) |
Sep
(12) |
Oct
(6) |
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(13) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Philip E. <pes...@us...> - 2003-06-10 22:57:24
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv17039/S_Sphere52 Modified Files: NPC.cpp ScriptsMain.cpp ScriptTables.cpp TObArray.cpp Log Message: no message Index: NPC.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/NPC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** NPC.cpp 27 May 2003 04:26:31 -0000 1.3 --- NPC.cpp 10 Jun 2003 22:57:19 -0000 1.4 *************** *** 494,498 **** { int iSpell = 0; ! for ( int i = 0; i < Main->m_pScripts->m_tables.m_spells.GetSize(); i++) { CTSpellDef * pSpell = (CTSpellDef *) Main->m_pScripts->m_tables.m_spells.GetAt(i); --- 494,498 ---- { int iSpell = 0; ! for ( int i = 0; i < (int) Main->m_pScripts->m_tables.m_spells.GetSize(); i++) { CTSpellDef * pSpell = (CTSpellDef *) Main->m_pScripts->m_tables.m_spells.GetAt(i); Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** ScriptsMain.cpp 5 Jun 2003 14:49:53 -0000 1.10 --- ScriptsMain.cpp 10 Jun 2003 22:57:19 -0000 1.11 *************** *** 78,82 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TSCRIPTS)); ! for ( int i = 0; i < m_aDefs.GetSize(); i++ ) { CDef * pDef = (CDef *) m_aDefs.GetAt(i); --- 78,82 ---- { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TSCRIPTS)); ! for ( int i = 0; i < (int) m_aDefs.GetSize(); i++ ) { CDef * pDef = (CDef *) m_aDefs.GetAt(i); *************** *** 89,93 **** UnloadTemplates(); ! for ( i = 0; i < this->m_aTriggers.GetSize(); i++ ) { CStringBlock * pTrigger = (CStringBlock *) m_aTriggers.GetAt(i); --- 89,93 ---- UnloadTemplates(); ! for ( i = 0; i < (int) this->m_aTriggers.GetSize(); i++ ) { CStringBlock * pTrigger = (CStringBlock *) m_aTriggers.GetAt(i); *************** *** 97,101 **** m_aTriggers.RemoveAll(); ! for ( i = 0; i < this->m_aRegionTrigs.GetSize(); i++ ) { CStringBlock * pTable = (CStringBlock *) m_aRegionTrigs.GetAt(i); --- 97,101 ---- m_aTriggers.RemoveAll(); ! for ( i = 0; i < (int) this->m_aRegionTrigs.GetSize(); i++ ) { CStringBlock * pTable = (CStringBlock *) m_aRegionTrigs.GetAt(i); *************** *** 105,109 **** m_aRegionTrigs.RemoveAll(); ! for ( i = 0; i < this->m_aRegionResources.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionResources.GetAt(i); --- 105,109 ---- m_aRegionTrigs.RemoveAll(); ! for ( i = 0; i < (int) this->m_aRegionResources.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionResources.GetAt(i); *************** *** 113,117 **** m_aRegionResources.RemoveAll(); ! for ( i = 0; i < this->m_aRegionTypes.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionTypes.GetAt(i); --- 113,117 ---- m_aRegionResources.RemoveAll(); ! for ( i = 0; i < (int) this->m_aRegionTypes.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionTypes.GetAt(i); *************** *** 121,125 **** m_aRegionTypes.RemoveAll(); ! for ( i = 0; i < this->m_aRegionResourceTypes.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionResourceTypes.GetAt(i); --- 121,125 ---- m_aRegionTypes.RemoveAll(); ! for ( i = 0; i < (int) this->m_aRegionResourceTypes.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_aRegionResourceTypes.GetAt(i); *************** *** 129,133 **** m_aRegionResourceTypes.RemoveAll(); ! for ( i = 0; i < this->m_aPlotTrigs.GetSize(); i++ ) { CStringBlock * pTable = (CStringBlock *) m_aPlotTrigs.GetAt(i); --- 129,133 ---- m_aRegionResourceTypes.RemoveAll(); ! for ( i = 0; i < (int) this->m_aPlotTrigs.GetSize(); i++ ) { CStringBlock * pTable = (CStringBlock *) m_aPlotTrigs.GetAt(i); *************** *** 146,150 **** this->m_olAreas.RemoveAll(); ! for ( i = 0; i < m_aLocations.GetSize(); i++ ) { CLocation * pLoc = (CLocation *) m_aLocations.GetAt(i); --- 146,150 ---- this->m_olAreas.RemoveAll(); ! for ( i = 0; i < (int) m_aLocations.GetSize(); i++ ) { CLocation * pLoc = (CLocation *) m_aLocations.GetAt(i); *************** *** 156,160 **** UnloadNames(); ! for ( i = 0; i < m_aSpeechBlocks.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) m_aSpeechBlocks.GetAt(i); --- 156,160 ---- UnloadNames(); ! for ( i = 0; i < (int) m_aSpeechBlocks.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) m_aSpeechBlocks.GetAt(i); *************** *** 164,168 **** m_aSpeechBlocks.RemoveAll(); ! for ( i = 0; i < m_aWebpages.GetSize(); i++ ) { CScriptBase * pBlock = (CScriptBase *) m_aWebpages.GetAt(i); --- 164,168 ---- m_aSpeechBlocks.RemoveAll(); ! for ( i = 0; i < (int) m_aWebpages.GetSize(); i++ ) { CScriptBase * pBlock = (CScriptBase *) m_aWebpages.GetAt(i); *************** *** 445,449 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TITEMS)); ! for ( int i = 0; i < m_aItems.GetSize(); i++ ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(i); --- 445,449 ---- { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TITEMS)); ! for ( int i = 0; i < (int) m_aItems.GetSize(); i++ ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(i); *************** *** 477,481 **** Main->WriteFileHeader(&csfOutput, USER_ITEM_FILE); ! for ( int i = 0; i < this->m_aItems.GetSize(); i++ ) { CItem * pItem = (CItem *) m_aItems.GetAt(i); --- 477,481 ---- Main->WriteFileHeader(&csfOutput, USER_ITEM_FILE); ! for ( int i = 0; i < (int) this->m_aItems.GetSize(); i++ ) { CItem * pItem = (CItem *) m_aItems.GetAt(i); *************** *** 622,626 **** Main->WriteFileHeader(&csfOutput, USER_NPC_FILE); ! for ( int i = 0; i < this->m_aNPCs.GetSize(); i++ ) { CNPC * pNPC = (CNPC *) m_aNPCs.GetAt(i); --- 622,626 ---- Main->WriteFileHeader(&csfOutput, USER_NPC_FILE); ! for ( int i = 0; i < (int) this->m_aNPCs.GetSize(); i++ ) { CNPC * pNPC = (CNPC *) m_aNPCs.GetAt(i); *************** *** 635,639 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TNPCS)); ! for ( int i = 0; i < m_aNPCs.GetSize(); i++ ) { CCategorizedScriptBase * pNPC = (CCategorizedScriptBase *) m_aNPCs.GetAt(i); --- 635,639 ---- { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TNPCS)); ! for ( int i = 0; i < (int) m_aNPCs.GetSize(); i++ ) { CCategorizedScriptBase * pNPC = (CCategorizedScriptBase *) m_aNPCs.GetAt(i); *************** *** 787,791 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TTEMPLATES)); ! for ( int i = 0; i < m_aTemplates.GetSize(); i++ ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(i); --- 787,791 ---- { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TTEMPLATES)); ! for ( int i = 0; i < (int) m_aTemplates.GetSize(); i++ ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(i); *************** *** 819,823 **** Main->WriteFileHeader(&csfOutput, USER_TEMPLATE_FILE); ! for ( int i = 0; i < this->m_aTemplates.GetSize(); i++ ) { CTemplate * pTemplate = (CTemplate *) m_aTemplates.GetAt(i); --- 819,823 ---- Main->WriteFileHeader(&csfOutput, USER_TEMPLATE_FILE); ! for ( int i = 0; i < (int) this->m_aTemplates.GetSize(); i++ ) { CTemplate * pTemplate = (CTemplate *) m_aTemplates.GetAt(i); *************** *** 826,830 **** } ! for ( i = 0; i < this->m_aTemplates2.GetSize(); i++ ) { CTemplate * pTemplate = (CTemplate *) m_aTemplates2.GetAt(i); --- 826,830 ---- } ! for ( i = 0; i < (int) this->m_aTemplates2.GetSize(); i++ ) { CTemplate * pTemplate = (CTemplate *) m_aTemplates2.GetAt(i); *************** *** 1248,1252 **** case 0: { ! if ( m_aPlotTrigs.GetUpperBound() < index ) m_aPlotTrigs.SetAtGrow(index, pTable); else --- 1248,1252 ---- case 0: { ! if ( (int) m_aPlotTrigs.GetUpperBound() < index ) m_aPlotTrigs.SetAtGrow(index, pTable); else *************** *** 1261,1265 **** case 1: { ! if ( m_aRegionTrigs.GetUpperBound() < index ) m_aRegionTrigs.SetAtGrow(index, pTable); else --- 1261,1265 ---- case 1: { ! if ( (int) m_aRegionTrigs.GetUpperBound() < index ) m_aRegionTrigs.SetAtGrow(index, pTable); else *************** *** 1274,1278 **** case 2: { ! if ( m_aTriggers.GetUpperBound() < index ) m_aTriggers.SetAtGrow(index, pTable); else --- 1274,1278 ---- case 2: { ! if ( (int) m_aTriggers.GetUpperBound() < index ) m_aTriggers.SetAtGrow(index, pTable); else *************** *** 1518,1522 **** Main->WriteFileHeader(&csfOutput, NAME_FILE); ! for ( int i = 0; i < this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) this->m_aNames.GetAt(i); --- 1518,1522 ---- Main->WriteFileHeader(&csfOutput, NAME_FILE); ! for ( int i = 0; i < (int) this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) this->m_aNames.GetAt(i); *************** *** 1535,1539 **** LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TNAMES)); this->m_bNamesLoaded = false; ! for ( int i = 0; i < this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) m_aNames.GetAt(i); --- 1535,1539 ---- LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TNAMES)); this->m_bNamesLoaded = false; ! for ( int i = 0; i < (int) this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) m_aNames.GetAt(i); *************** *** 1654,1658 **** Main->WriteFileHeader(&csfOutput, SPEECH_FILE); ! for ( int i = 0; i < this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) this->m_aNames.GetAt(i); --- 1654,1658 ---- Main->WriteFileHeader(&csfOutput, SPEECH_FILE); ! for ( int i = 0; i < (int) this->m_aNames.GetSize(); i++ ) { CStringBlock * pBlock = (CStringBlock *) this->m_aNames.GetAt(i); Index: ScriptTables.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptTables.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ScriptTables.cpp 23 May 2003 05:46:54 -0000 1.2 --- ScriptTables.cpp 10 Jun 2003 22:57:19 -0000 1.3 *************** *** 309,313 **** csfOutput.WriteString(_T("\n")); csfOutput.WriteString(_T("[STARTS]\n")); ! for ( i = 0; i < m_starts.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_starts.GetAt(i); --- 309,313 ---- csfOutput.WriteString(_T("\n")); csfOutput.WriteString(_T("[STARTS]\n")); ! for ( i = 0; i < (int) m_starts.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_starts.GetAt(i); *************** *** 318,322 **** this->m_runes.Write(csfOutput); csfOutput.WriteString(_T("[ORE]\n")); ! for ( i = 0; i < m_ores.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_ores.GetAt(i); --- 318,322 ---- this->m_runes.Write(csfOutput); csfOutput.WriteString(_T("[ORE]\n")); ! for ( i = 0; i < (int) m_ores.GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) m_ores.GetAt(i); *************** *** 339,343 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TTABLES)); ! for ( int i = 0; i < this->m_ores.GetSize(); i++ ) { CTOreDef * pOre = (CTOreDef *) this->m_ores.GetAt(i); --- 339,343 ---- { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TTABLES)); ! for ( int i = 0; i < (int) this->m_ores.GetSize(); i++ ) { CTOreDef * pOre = (CTOreDef *) this->m_ores.GetAt(i); *************** *** 346,350 **** } this->m_ores.RemoveAll(); ! for ( i = 0; i < this->m_skillClasses.GetSize(); i++ ) { CTSkillClass * pSkillclass = (CTSkillClass *) this->m_skillClasses.GetAt(i); --- 346,350 ---- } this->m_ores.RemoveAll(); ! for ( i = 0; i < (int) this->m_skillClasses.GetSize(); i++ ) { CTSkillClass * pSkillclass = (CTSkillClass *) this->m_skillClasses.GetAt(i); *************** *** 353,357 **** } this->m_skillClasses.RemoveAll(); ! for ( i = 0; i < this->m_skills.GetSize(); i++ ) { CTSkillDef * pSkill = (CTSkillDef *) this->m_skills.GetAt(i); --- 353,357 ---- } this->m_skillClasses.RemoveAll(); ! for ( i = 0; i < (int) this->m_skills.GetSize(); i++ ) { CTSkillDef * pSkill = (CTSkillDef *) this->m_skills.GetAt(i); *************** *** 360,364 **** } this->m_skills.RemoveAll(); ! for ( i = 0; i < this->m_potions.GetSize(); i++ ) { CTPotionDef * pPotion = (CTPotionDef *) this->m_potions.GetAt(i); --- 360,364 ---- } this->m_skills.RemoveAll(); ! for ( i = 0; i < (int) this->m_potions.GetSize(); i++ ) { CTPotionDef * pPotion = (CTPotionDef *) this->m_potions.GetAt(i); *************** *** 367,371 **** } this->m_potions.RemoveAll(); ! for ( i = 0; i < this->m_spells.GetSize(); i++ ) { CTSpellDef * pSpell = (CTSpellDef *) this->m_spells.GetAt(i); --- 367,371 ---- } this->m_potions.RemoveAll(); ! for ( i = 0; i < (int) this->m_spells.GetSize(); i++ ) { CTSpellDef * pSpell = (CTSpellDef *) this->m_spells.GetAt(i); *************** *** 374,378 **** } this->m_spells.RemoveAll(); ! for ( i = 0; i < this->m_spawns.GetSize(); i++ ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) this->m_spawns.GetAt(i); --- 374,378 ---- } this->m_spells.RemoveAll(); ! for ( i = 0; i < (int) this->m_spawns.GetSize(); i++ ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) this->m_spawns.GetAt(i); *************** *** 381,385 **** } this->m_spawns.RemoveAll(); ! for ( i = 0; i < this->m_starts.GetSize(); i++ ) { CTStartLocation * pStart = (CTStartLocation * ) this->m_starts.GetAt(i); --- 381,385 ---- } this->m_spawns.RemoveAll(); ! for ( i = 0; i < (int) this->m_starts.GetSize(); i++ ) { CTStartLocation * pStart = (CTStartLocation * ) this->m_starts.GetAt(i); Index: TObArray.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/TObArray.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** TObArray.cpp 23 May 2003 05:46:54 -0000 1.2 --- TObArray.cpp 10 Jun 2003 22:57:20 -0000 1.3 *************** *** 16,20 **** { CString csLine; ! for ( int i = 0; i < this->GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) this->GetAt(i); --- 16,20 ---- { CString csLine; ! for ( int i = 0; i < (int) this->GetSize(); i++ ) { CScriptBase * pObject = (CScriptBase *) this->GetAt(i); |
From: Philip E. <pes...@us...> - 2003-06-10 22:57:23
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv17039 Modified Files: Axis.sln Log Message: no message Index: Axis.sln =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.sln,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Axis.sln 29 May 2003 04:34:20 -0000 1.5 --- Axis.sln 10 Jun 2003 22:57:18 -0000 1.6 *************** *** 42,45 **** --- 42,46 ---- {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 GlobalSection(ProjectConfiguration) = postSolution |
From: Philip E. <pes...@us...> - 2003-06-05 14:49:58
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv2049 Modified Files: itemgentab.cpp spawnlist.cpp SPAWNTAB.CPP traveltab.cpp Log Message: no message Index: itemgentab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** itemgentab.cpp 30 May 2003 20:06:12 -0000 1.20 --- itemgentab.cpp 5 Jun 2003 14:49:54 -0000 1.21 *************** *** 846,849 **** --- 846,851 ---- for ( int i = 0; i < (int) Main->m_pScriptsA->GetItemCount(); i++ ) { + if ( Main->m_pScriptsA->ItemDontCategorize(i) ) + continue; CString sCategory; sCategory = Main->m_pScriptsA->GetItemCategory(i); Index: spawnlist.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/spawnlist.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** spawnlist.cpp 23 May 2003 05:30:38 -0000 1.4 --- spawnlist.cpp 5 Jun 2003 14:49:54 -0000 1.5 *************** *** 57,62 **** DDX_Control(pDX, IDC_GOSPAWN, m_bGoto); DDX_Control(pDX, IDC_FINDSPAWN, m_bFind); ! DDX_Control(pDX, IDC_FINDNEXT, m_bClose); ! DDX_Control(pDX, IDOK, m_sStatic1); //}}AFX_DATA_MAP } --- 57,62 ---- DDX_Control(pDX, IDC_GOSPAWN, m_bGoto); DDX_Control(pDX, IDC_FINDSPAWN, m_bFind); ! DDX_Control(pDX, IDOK, m_bClose); ! DDX_Control(pDX, IDC_SL_STATIC1, m_sStatic1); //}}AFX_DATA_MAP } *************** *** 153,157 **** locale->LocalizeWindow(IDD, IDC_GOSPAWN, (CWnd*)&m_bGoto, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FINDSPAWN, (CWnd*)&m_bFind, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_FINDNEXT, (CWnd*)&m_bClose, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_sStatic1, (CWnd*)this); } --- 153,157 ---- locale->LocalizeWindow(IDD, IDC_GOSPAWN, (CWnd*)&m_bGoto, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_FINDSPAWN, (CWnd*)&m_bFind, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDOK, (CWnd*)&m_bClose, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_SL_STATIC1, (CWnd*)&m_sStatic1, (CWnd*)this); } Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** SPAWNTAB.CPP 30 May 2003 20:06:13 -0000 1.19 --- SPAWNTAB.CPP 5 Jun 2003 14:49:54 -0000 1.20 *************** *** 719,722 **** --- 719,724 ---- for ( int i = 0; i < (int) Main->m_pScriptsA->GetCharacterCount(); i++ ) { + if ( Main->m_pScriptsA->CharacterDontCategorize(i) ) + continue; CString sCategory; sCategory = Main->m_pScriptsA->GetCharacterCategory(i); Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** traveltab.cpp 30 May 2003 20:06:13 -0000 1.39 --- traveltab.cpp 5 Jun 2003 14:49:54 -0000 1.40 *************** *** 908,918 **** if ( Main->m_config.ShowSpawnpoints() ) ! { ! // Make sure we've loaded them ! if ( m_csaSpawns.GetSize() == 0 ) ! OnReloadspawns(); ! else ! UpdateSpawnDisplay(); ! } else { --- 908,912 ---- if ( Main->m_config.ShowSpawnpoints() ) ! UpdateSpawnDisplay(); else { |
From: Philip E. <pes...@us...> - 2003-06-05 14:49:57
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv2049/S_Sphere52 Modified Files: ConfigFile.cpp ScriptsMain.cpp Log Message: no message Index: ConfigFile.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ConfigFile.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ConfigFile.cpp 23 May 2003 05:46:53 -0000 1.2 --- ConfigFile.cpp 5 Jun 2003 14:49:53 -0000 1.3 *************** *** 222,225 **** --- 222,228 ---- if ( ! bStatus ) break; + csLine = csLine.SpanExcluding(_T("//")); + if ( csLine.GetLength() == 0 ) + continue; CString csKey, csValue; if ( csLine.Find(_T("[")) == -1 && csSection == _T("") ) *************** *** 420,423 **** --- 423,427 ---- m_fWordsOfPowerStaff = _tstoi(csValue) ? true : false; break; case SC_WORLDSAVE: + m_sWorldBaseDir = csValue; break; case SC_QTY: Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ScriptsMain.cpp 4 Jun 2003 21:47:16 -0000 1.9 --- ScriptsMain.cpp 5 Jun 2003 14:49:53 -0000 1.10 *************** *** 2495,2505 **** LOG( locale->String(IDS_SCRIPTS_READINGINI)); csLoadFile.Format(_T("%s\\%s"), cwd, INI_FILE); ! Main->m_pScripts->m_tables.m_Sphere.m_csFilename = csLoadFile; ! Main->m_pScripts->m_config.m_sSCPBaseDir = cwd; ! if ( !this->LoadFile(csLoadFile) && !bFoundScripts ) ! bFoundScripts = false; ! else ! bFoundScripts = true; ! Main->m_pScripts->m_config.Read(); } --- 2495,2501 ---- LOG( locale->String(IDS_SCRIPTS_READINGINI)); csLoadFile.Format(_T("%s\\%s"), cwd, INI_FILE); ! m_tables.m_Sphere.m_csFilename = csLoadFile; ! m_config.m_sSCPBaseDir = cwd; ! m_config.Read(); } *************** *** 2841,2845 **** CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); if ( pItem != NULL ) ! return pItem->m_csDispID; return _T(""); } --- 2837,2844 ---- CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); if ( pItem != NULL ) ! if ( pItem->m_csDispID != _T("") ) ! return pItem->m_csDispID; ! else ! return pItem->m_csValue; return _T(""); } *************** *** 2988,2992 **** CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); if ( pNPC != NULL ) ! return pNPC->m_csDispID; else return _T(""); --- 2987,2994 ---- CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); if ( pNPC != NULL ) ! if ( pNPC->m_csDispID != _T("") ) ! return pNPC->m_csDispID; ! else ! return pNPC->m_csValue; else return _T(""); *************** *** 3285,3288 **** --- 3287,3291 ---- { CFileReadProgress progress; + progress.Create(IDD_FILEREAD_PROGRESS); progress.SetRange32(0, (ULONG) fWorld.GetLength()); progress.SetPos(0); |
From: Philip E. <pes...@us...> - 2003-06-04 21:47:41
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv14286/S_Sphere52 Modified Files: ScriptsMain.cpp ScriptsMain.h strings.h Log Message: no message Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ScriptsMain.cpp 3 Jun 2003 21:28:49 -0000 1.8 --- ScriptsMain.cpp 4 Jun 2003 21:47:16 -0000 1.9 *************** *** 20,23 **** --- 20,24 ---- #include "types.h" #include "attributes.h" + #include "worlditem.h" #include <direct.h> *************** *** 77,83 **** { LOG(locale->String(IDS_SCRIPTS_UNLOADING), locale->String(IDS_SCRIPTS_TSCRIPTS)); - RemoveNPCCategories(); - RemoveItemCategories(); - RemoveLocationCategories(); for ( int i = 0; i < m_aDefs.GetSize(); i++ ) { --- 78,81 ---- *************** *** 191,194 **** --- 189,193 ---- } m_vMoongates.erase(m_vMoongates.begin(), m_vMoongates.end()); + CleanSpawnpoints(); this->m_bDefsLoaded = false; *************** *** 1681,2057 **** } - void CScriptsMain::CategorizeItems() - { - bool bDestroy = false; - - if ( m_bItemsCategorized ) - return; - if ( !m_bItemsLoaded ) - LoadItems(); - if ( !m_bTemplatesLoaded ) - LoadTemplates(); - - CreateProgressDialog(); - - LOG(locale->String(IDS_SCRIPTS_CATEGORIZING), locale->String(IDS_SCRIPTS_TITEMS)); - CWaitCursor hourglass; - m_pDlg->SetRange(0, (int)m_aItems.GetSize()); - m_pDlg->SetPos(0); - m_pDlg->SetWindowText(locale->String(IDS_LOADING)); - m_pDlg->m_csMessage.SetWindowText(locale->String(IDS_CATITEMS)); - - m_wNextItemID = 0x6000; - - // Go through the item array and organize it into categories. - for ( int i = 0; i < m_aItems.GetSize(); i++ ) - { - if ( i % 0x100 ) - m_pDlg->SetPos(i); - CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(i); - if ( pItem && i >= m_wNextItemID ) - m_wNextItemID = i + 1; - if ( pItem && !pItem->m_bNoIndex ) - { - if ( pItem->m_csDupeItem != _T("") ) - { - CString csDupe; - /* - if ( !this->m_bNewFormat ) - csDupe.Format(_T("%04x"), ahextoi(pItem->m_csDupeItem)); - else - */ - csDupe.Format(_T("%s"), pItem->m_csDupeItem); - int iIndex = m_aItems.Find(csDupe); - if ( iIndex == -1 ) - { - // Look in the defs - iIndex = m_aDefs.Find(csDupe); - if ( iIndex != -1 ) - { - CDef * pDef = (CDef *) Main->m_pScripts->m_aDefs.GetAt(iIndex); - if ( pDef ) - { - csDupe.Format(_T("0%x"), pDef->Evaluate() ); - iIndex = m_aItems.Find(csDupe); - } - } - } - if ( iIndex != -1 ) - { - CDisplayedScriptBase * pDupe = (CDisplayedScriptBase *) m_aItems.GetAt(iIndex); - if ( pDupe->m_bNoIndex ) - continue; - if ( pItem->m_csCategory == _T("<none>") ) - pItem->m_csCategory = pDupe->m_csCategory; - if ( pItem->m_csSubsection == _T("<none>") ) - pItem->m_csSubsection = pDupe->m_csSubsection; - if ( pItem->m_csDescription.Find(_T("<unnamed>")) != -1 ) - pItem->m_csDescription = pDupe->m_csDescription; - } - } - if ( pItem->m_csDescription.Find(_T("@")) != -1 ) - pItem->m_csDescription.Replace(_T("@"), pItem->m_csSubsection); - if ( pItem->m_csCategory == _T("<none>") ) - pItem->m_csCategory = _T("<uncategorized items>"); - if ( pItem->m_csSubsection == _T("<none>") ) - pItem->m_csSubsection = pItem->m_csFilename; - if ( pItem->m_csDescription == _T("<unnamed>") ) - pItem->m_csDescription = pItem->m_csValue; - CCategory * pCategory = FindCategory(&m_olItems, pItem->m_csCategory); - CSubsection * pSubsection = FindSubsection(pCategory, pItem->m_csSubsection); - if (pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead(pItem); - else - pSubsection->m_ItemList.AddTail(pItem); - } - } - // Now go through the templates - m_pDlg->SetRange(0, (int)m_aTemplates.GetSize()); - m_pDlg->SetPos(0); - m_pDlg->SetWindowText(locale->String(IDS_LOADING)); - m_pDlg->m_csMessage.SetWindowText(locale->String(IDS_CATTEMPLATES)); - for ( i = 0; i < m_aTemplates.GetSize(); i++ ) - { - if ( i % 0x100 ) - m_pDlg->SetPos(i); - CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(i); - if ( pTemplate->m_bNoIndex ) - continue; - if ( pTemplate->m_csCategory == _T("<none>") ) - pTemplate->m_csCategory = _T("<uncategorized templates>"); - if ( pTemplate->m_csSubsection == _T("<none>") ) - pTemplate->m_csSubsection = pTemplate->m_csFilename; - if ( pTemplate->m_csDescription == _T("<unnamed>") ) - pTemplate->m_csDescription = pTemplate->m_csValue; - CCategory * pCategory = FindCategory(&m_olItems, pTemplate->m_csCategory); - CSubsection * pSubsection = FindSubsection(pCategory, pTemplate->m_csSubsection); - if ( pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead(pTemplate); - else - pSubsection->m_ItemList.AddTail(pTemplate); - } - m_bItemsCategorized = true; - m_iICatSeq++; - DestroyProgressDialog(); - } - - void CScriptsMain::CategorizeNPCs() - { - bool bDestroy = false; - - if ( m_bNPCsCategorized ) - return; - if ( !m_bNPCsLoaded ) - LoadNPCs(); - if ( !m_bTablesLoaded ) - LoadTables(); - - CreateProgressDialog(); - RemoveNPCCategories(); - - LOG(locale->String(IDS_SCRIPTS_CATEGORIZING), locale->String(IDS_SCRIPTS_TNPCS)); - m_pDlg->SetRange32(0, (int)m_aNPCs.GetSize()); - m_pDlg->SetPos(0); - m_pDlg->SetWindowText(locale->String(IDS_LOADING)); - m_pDlg->m_csMessage.SetWindowText(locale->String(IDS_CATNPCS)); - - m_wNextNPCID = 0x4000; - - for ( int i = 0; i < m_aNPCs.GetSize(); i++ ) - { - if ( i % 100 ) - m_pDlg->SetPos(i); - CCategorizedScriptBase * pChar = (CCategorizedScriptBase *) m_aNPCs.GetAt(i); - if ( pChar && i >= m_wNextNPCID ) - m_wNextNPCID = i + 1; - if ( pChar && !pChar->m_bNoIndex ) - { - if ( pChar->m_csDescription.Find(_T("@")) != -1 ) - pChar->m_csDescription.Replace(_T("@"), pChar->m_csSubsection); - if ( pChar->m_csCategory == _T("<none>") ) - pChar->m_csCategory = _T("<uncategorized chars>"); - if ( pChar->m_csSubsection == _T("<none>") ) - pChar->m_csSubsection = pChar->m_csFilename; - if ( pChar->m_csDescription == _T("<unnamed>") ) - pChar->m_csDescription = pChar->m_csValue; - CCategory * pCategory = FindCategory(&m_olNPCs, pChar->m_csCategory); - CSubsection * pSubsection = FindSubsection(pCategory, pChar->m_csSubsection); - if (pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead((CCategorizedScriptBase *) pChar); - else - pSubsection->m_ItemList.AddTail((CCategorizedScriptBase *) pChar); - } - } - - m_pDlg->SetRange32(0, (int)m_tables.m_spawns.GetSize()); - m_pDlg->SetPos(0); - m_pDlg->m_csMessage.SetWindowText(locale->String(IDS_CATSPAWNS)); - - for ( i = 0; i < m_tables.m_spawns.GetSize(); i++ ) - { - m_pDlg->SetPos(i); - CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(i); - if ( pSpawn ) - { - if ( pSpawn->m_csDescription.Find(_T("@")) != -1 ) - pSpawn->m_csDescription.Replace(_T("@"), pSpawn->m_csSubsection); - if ( pSpawn->m_csCategory == _T("<none>") ) - pSpawn->m_csCategory = _T("<uncategorized spawns>"); - if ( pSpawn->m_csSubsection == _T("<none>") ) - pSpawn->m_csSubsection = pSpawn->m_csFilename; - if ( pSpawn->m_csDescription == _T("<unnamed>") ) - pSpawn->m_csDescription = pSpawn->m_csValue; - CCategory * pCategory = FindCategory(&m_olNPCs, pSpawn->m_csCategory); - CSubsection * pSubsection = FindSubsection(pCategory, pSpawn->m_csSubsection); - if ( pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead(pSpawn); - else - pSubsection->m_ItemList.AddTail(pSpawn); - } - } - m_iNCatSeq++; - m_bNPCsCategorized = true; - DestroyProgressDialog(); - } - - void CScriptsMain::CategorizeLocations() - { - bool bDestroy = false; - - if ( m_bLocationsCategorized ) - return; - if ( !m_bMapLoaded ) - LoadMap(); - if ( !m_bLocationsLoaded ) - LoadLocations(); - - CreateProgressDialog(); - - LOG(locale->String(IDS_SCRIPTS_CATEGORIZING), locale->String(IDS_SCRIPTS_TLOCATIONS)); - POSITION pos = m_olAreas.GetHeadPosition(); - while (pos) - { - CArea * pArea = (CArea *) m_olAreas.GetNext(pos); - if ( pArea && pArea->m_csPoint != _T("") && pArea->m_csGroup != _T("") && pArea->m_csPoint != _T("")) - { - CCategory * pCategory = FindCategory(&m_olLocations, _T("Map Regions")); - CSubsection * pSubsection = FindSubsection(pCategory, pArea->m_csGroup); - if (pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead(pArea); - else - pSubsection->m_ItemList.AddTail(pArea); - } - } - - for ( int i = 0; i < m_aLocations.GetSize(); i++ ) - { - CLocation * pLoc = (CLocation *) m_aLocations.GetAt(i); - if ( pLoc ) - { - CCategory * pCategory = FindCategory(&m_olLocations, pLoc->m_csCategory); - CSubsection * pSubsection = FindSubsection(pCategory, pLoc->m_csSubsection); - if (pSubsection->m_ItemList.IsEmpty()) - pSubsection->m_ItemList.AddHead(pLoc); - else - pSubsection->m_ItemList.AddTail(pLoc); - } - } - m_iMCatSeq++; - m_bLocationsCategorized = true; - DestroyProgressDialog(); - - } - - void CScriptsMain::RemoveItemCategories() - { - LOG( locale->String(IDS_SCRIPTS_CLEARINGITEMS)); - if (!m_olItems.IsEmpty()) - { - POSITION catPos = m_olItems.GetHeadPosition(); - while (catPos != NULL) - { - CCategory * pCat = (CCategory *) m_olItems.GetNext(catPos); - if (! pCat->m_SubsectionList.IsEmpty()) - { - POSITION subPos = pCat->m_SubsectionList.GetHeadPosition(); - while (subPos != NULL) - { - CSubsection *pSub = (CSubsection *) pCat->m_SubsectionList.GetNext(subPos); - delete (pSub); - } - } - delete (pCat); - } - } - m_olItems.RemoveAll(); - m_bItemsCategorized = false; - } - - void CScriptsMain::RemoveNPCCategories() - { - LOG( locale->String(IDS_SCRIPTS_CLEARINGNPCS)); - if (!m_olNPCs.IsEmpty()) - { - POSITION catPos = m_olNPCs.GetHeadPosition(); - while (catPos != NULL) - { - CCategory * pCat = (CCategory *) m_olNPCs.GetNext(catPos); - if (! pCat->m_SubsectionList.IsEmpty()) - { - POSITION subPos = pCat->m_SubsectionList.GetHeadPosition(); - while (subPos != NULL) - { - CSubsection *pSub = (CSubsection *) pCat->m_SubsectionList.GetNext(subPos); - delete (pSub); - } - } - delete (pCat); - } - } - m_olNPCs.RemoveAll(); - m_bNPCsCategorized = false; - } - - void CScriptsMain::RemoveLocationCategories() - { - LOG( locale->String(IDS_SCRIPTS_CLEARINGLOCS)); - if (!m_olLocations.IsEmpty()) - { - POSITION catPos = m_olLocations.GetHeadPosition(); - while (catPos != NULL) - { - CCategory * pCat = (CCategory *) m_olLocations.GetNext(catPos); - if (! pCat->m_SubsectionList.IsEmpty()) - { - POSITION subPos = pCat->m_SubsectionList.GetHeadPosition(); - while (subPos != NULL) - { - CSubsection *pSub = (CSubsection *) pCat->m_SubsectionList.GetNext(subPos); - delete (pSub); - } - } - delete (pCat); - } - } - m_olLocations.RemoveAll(); - m_bLocationsCategorized = false; - } - - void CScriptsMain::CleanCategories(CPtrList &olCategories) - { - if ( !olCategories.IsEmpty() ) - { - POSITION catPos = m_olLocations.GetHeadPosition(); - while ( catPos ) - { - CCategory * pCat = (CCategory *) olCategories.GetNext(catPos); - if ( !pCat ) - continue; - POSITION subPos = pCat->m_SubsectionList.GetHeadPosition(); - while ( subPos ) - { - CSubsection * pSub = (CSubsection *) pCat->m_SubsectionList.GetNext(subPos); - if ( pSub && pSub->m_ItemList.IsEmpty() ) - { - pCat->m_SubsectionList.RemoveAt(pCat->m_SubsectionList.Find(pSub)); - delete pSub; - } - } - if ( pCat->m_SubsectionList.IsEmpty() ) - { - olCategories.RemoveAt(olCategories.Find(pCat)); - delete pCat; - } - } - } - } - - void CScriptsMain::RecategorizeItems() - { - if ( !m_bItemsCategorized ) - return; - RemoveItemCategories(); - CreateProgressDialog(); - CategorizeItems(); - } - - void CScriptsMain::RecategorizeLocations() - { - if ( !m_bLocationsCategorized ) - return; - RemoveLocationCategories(); - CreateProgressDialog(); - CategorizeLocations(); - } - - void CScriptsMain::RecategorizeNPCs() - { - if ( !m_bNPCsCategorized ) - return; - RemoveNPCCategories(); - CreateProgressDialog(); - CategorizeNPCs(); - } - enum RES_TYPE // all the script resource blocks we know how to deal with ! { --- 1680,1683 ---- *************** *** 3133,3194 **** } - CCategory * CScriptsMain::FindCategory(CPtrList * pPtrList, CString sCategory, bool bCreate) - { - CCategory * pCategory = NULL; - if (!pPtrList->IsEmpty()) - { - POSITION pos = pPtrList->GetHeadPosition(); - while (pos != NULL) - { - CCategory * pTest = (CCategory *) pPtrList->GetNext(pos); - if (pTest->m_csName == sCategory) - { - pCategory = pTest; - break; - } - } - } - if (pCategory == NULL && bCreate == true) - { - // Category didn't exist. Create a new one - pCategory = new (CCategory); - pCategory->m_csName = sCategory; - if (pPtrList->IsEmpty()) - pPtrList->AddHead(pCategory); - else - pPtrList->AddTail(pCategory); - } - return pCategory; - } - - CSubsection * CScriptsMain::FindSubsection(CCategory * pCategory, CString sSubsection, bool bCreate) - { - CSubsection * pSubsection = NULL; - if (!pCategory->m_SubsectionList.IsEmpty()) - { - POSITION pos = pCategory->m_SubsectionList.GetHeadPosition(); - while (pos != NULL) - { - CSubsection * pTest = (CSubsection *) pCategory->m_SubsectionList.GetNext(pos); - if (pTest->m_csName == sSubsection) - { - pSubsection = pTest; - break; - } - } - } - if (pSubsection == NULL && bCreate == true) - { - // Subsection didn't exist. Create a new one - pSubsection = new (CSubsection); - pSubsection->m_csName = sSubsection; - if (pCategory->m_SubsectionList.IsEmpty()) - pCategory->m_SubsectionList.AddHead(pSubsection); - else - pCategory->m_SubsectionList.AddTail(pSubsection); - } - return pSubsection; - } - ULONG CScriptsMain::ItemCount() { --- 2759,2762 ---- *************** *** 3689,3757 **** ULONG CScriptsMain::SpawnCount() { ! return 0; } CString CScriptsMain::SpawnInfo(ULONG index) { ! return _T(""); } ULONG CScriptsMain::ReloadSpawns() { ! return 0; } ULONG CScriptsMain::WorldSpawnUID(ULONG index) { ! return 0; } ULONG CScriptsMain::WorldItemCount() { ! return 0; } ULONG CScriptsMain::WorldItemUID(ULONG index) { ! return 0; } CString CScriptsMain::WorldItemName(ULONG index) { ! return _T(""); } CString CScriptsMain::WorldItemCoordinates(ULONG index) { ! return _T(""); } ULONG CScriptsMain::WorldItemType(ULONG index) { ! return 0; } CString CScriptsMain::WorldItemDispID(ULONG index) { ! return _T(""); } CString CScriptsMain::WorldItemColor(ULONG index) { ! return _T(""); } ULONG CScriptsMain::WorldItemAttributes(ULONG index) { ! return 0; } bool CScriptsMain::WorldItemTopLevel(ULONG index) { ! return false; } void CScriptsMain::WorldItemFile(CString sFile) { return; } --- 3257,3451 ---- ULONG CScriptsMain::SpawnCount() { ! return (ULONG) m_vSpawns.size(); } CString CScriptsMain::SpawnInfo(ULONG index) { ! if ( index >= (ULONG) m_vSpawns.size() ) ! return _T(""); ! CScriptBase * pBase = m_vSpawns[index]; ! CWorldItem spawn; ! spawn.CopyBase(pBase); ! spawn.Load(_T("WORLDITEM")); ! CString sInfo; ! // Format the spawn info here ! sInfo.Format(_T("%s,%s,%ld,%ld,%ld"), spawn.m_dwItemType == ITEM_SPAWN_CHAR ? _T("NPC") : _T("ITEM"), spawn.m_csBaseID, spawn.m_pX, spawn.m_pY, spawn.m_pZ); ! return sInfo; } ULONG CScriptsMain::ReloadSpawns() { ! CleanSpawnpoints(); ! if ( m_config.m_sWorldBaseDir == _T("") ) ! return -1; ! CStdioFile fWorld; ! CString sWorldfile; ! sWorldfile.Format(_T("%s\\sphereworld.scp"), m_config.m_sWorldBaseDir); ! if ( fWorld.Open(sWorldfile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) ! { ! CFileReadProgress progress; ! progress.SetRange32(0, (ULONG) fWorld.GetLength()); ! progress.SetPos(0); ! CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! progress.m_csMessage.SetWindowText(sMessage); ! BOOL bStatus = TRUE; ! CString sLine; ! DWORD offset; ! while ( bStatus ) ! { ! offset = (DWORD) fWorld.GetPosition(); ! bStatus = fWorld.ReadString(sLine); ! if ( ! bStatus ) ! break; ! if ( sLine.Find(_T("[WORLDITEM")) == 0 ) ! { ! CString sID = sLine.Mid(11).SpanExcluding(_T("]")); ! CWorldItem item; ! item.m_csFilename = sWorldfile; ! item.m_bType = TYPE_WORLDITEM; ! item.m_dwFileOffset = offset; ! item.m_csBaseID = sID; ! item.Load(_T("WORLDITEM")); ! if ( item.m_dwItemType == ITEM_SPAWN_CHAR || item.m_dwItemType == ITEM_SPAWN_ITEM ) ! { ! CScriptBase * pBase = new CScriptBase; ! pBase->CopyBase(&item); ! m_vSpawns.push_back(pBase); ! } ! } ! } ! fWorld.Close(); ! return 0; ! } ! return -2; ! } ! ! void CScriptsMain::CleanSpawnpoints() ! { ! vector<CScriptBase *>::iterator p = m_vSpawns.begin(); ! while ( p != m_vSpawns.end() ) ! { ! delete *p; ! p++; ! } ! m_vSpawns.erase(m_vSpawns.begin(), m_vSpawns.end()); } ULONG CScriptsMain::WorldSpawnUID(ULONG index) { ! if ( index >= (ULONG) m_vSpawns.size() ) ! return 0; ! CScriptBase * pBase = m_vSpawns[index]; ! CWorldItem spawn; ! spawn.CopyBase(pBase); ! spawn.Load(_T("WORLDITEM")); ! return spawn.m_dwSerial; } ULONG CScriptsMain::WorldItemCount() { ! return (ULONG) m_vWorlditems.size(); } ULONG CScriptsMain::WorldItemUID(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return 0; ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! return item.m_dwSerial; } CString CScriptsMain::WorldItemName(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return _T(""); ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! return item.m_csName; } CString CScriptsMain::WorldItemCoordinates(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return _T(""); ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! CString sCoords; ! sCoords.Format(_T("%ld,%ld,%ld"), item.m_pX, item.m_pY, item.m_pZ); ! return sCoords; } ULONG CScriptsMain::WorldItemType(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return 0; ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! return item.m_dwItemType; } CString CScriptsMain::WorldItemDispID(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return _T(""); ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! CString sDispID; ! sDispID.Format(_T("0%04x"), item.m_wArtID); ! return sDispID; } CString CScriptsMain::WorldItemColor(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return _T(""); ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! CString sColor; ! sColor.Format(_T("0%04x"), item.m_wColor); ! return sColor; } ULONG CScriptsMain::WorldItemAttributes(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return 0; ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! return item.m_dwAttr; } bool CScriptsMain::WorldItemTopLevel(ULONG index) { ! if ( index >= (ULONG) m_vWorlditems.size() ) ! return false; ! CScriptBase * pBase = m_vWorlditems[index]; ! CWorldItem item; ! item.CopyBase(pBase); ! item.Load(_T("WORLDITEM")); ! if ( item.m_dwContainer == 0 ) ! return true; ! else ! return false; } void CScriptsMain::WorldItemFile(CString sFile) { + m_sWorldItemFile = sFile; return; } *************** *** 3759,3763 **** ULONG CScriptsMain::WorldReload() { ! return 0; } --- 3453,3502 ---- ULONG CScriptsMain::WorldReload() { ! CleanWorlditems(); ! if ( m_sWorldItemFile == _T("") ) ! return -1; ! CStdioFile fWorld; ! if ( fWorld.Open(m_sWorldItemFile, CFile::modeRead | CFile::shareDenyNone | CFile::typeText) ) ! { ! CFileReadProgress progress; ! progress.SetRange32(0, (ULONG) fWorld.GetLength()); ! progress.SetPos(0); ! CString sMessage = locale->String(IDS_TRAVEL_LOADINGSPAWNS); ! progress.m_csMessage.SetWindowText(sMessage); ! BOOL bStatus = TRUE; ! CString sLine; ! DWORD offset; ! while ( bStatus ) ! { ! offset = (DWORD) fWorld.GetPosition(); ! bStatus = fWorld.ReadString(sLine); ! if ( ! bStatus ) ! break; ! if ( sLine.Find(_T("[WORLDITEM")) == 0 ) ! { ! CString sID = sLine.Mid(11).SpanExcluding(_T("]")); ! CScriptBase * pItem = new CScriptBase; ! pItem->m_csFilename = m_sWorldItemFile; ! pItem->m_bType = TYPE_WORLDITEM; ! pItem->m_dwFileOffset = offset; ! pItem->m_csValue = sID; ! m_vWorlditems.push_back(pItem); ! } ! } ! fWorld.Close(); ! return 0; ! } ! return -2; ! } ! ! void CScriptsMain::CleanWorlditems() ! { ! vector<CScriptBase *>::iterator p = m_vWorlditems.begin(); ! while ( p != m_vWorlditems.end() ) ! { ! delete *p; ! p++; ! } ! m_vWorlditems.erase(m_vWorlditems.begin(), m_vWorlditems.end()); } *************** *** 3846,3848 **** { return; ! } \ No newline at end of file --- 3585,3588 ---- { return; ! } ! Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ScriptsMain.h 30 May 2003 20:06:14 -0000 1.5 --- ScriptsMain.h 4 Jun 2003 21:47:17 -0000 1.6 *************** *** 129,143 **** bool WriteMoongates(CString sTargetFile, CStdioFile &csfOutput); - void CategorizeNPCs(); - void CategorizeItems(); - void CategorizeLocations(); - void RecategorizeNPCs(); - void RecategorizeItems(); - void RecategorizeLocations(); - void RemoveNPCCategories(); - void RemoveItemCategories(); - void RemoveLocationCategories(); - void CleanCategories(CPtrList &olCategories); - #define TEMPLATE_INDEX_BASE 101500 #define TEMPLATE2_INDEX_BASE 500000 --- 129,132 ---- *************** *** 160,170 **** CScriptArray m_aPlotTrigs; CScriptArray m_aTriggers; CConfigFile m_config; vector<CScriptBase *> m_vTeleporters; vector<CScriptBase *> m_vMoongates; ! ! CPtrList m_olNPCs; ! CPtrList m_olItems; ! CPtrList m_olLocations; WORD m_wNextNPCID; --- 149,158 ---- CScriptArray m_aPlotTrigs; CScriptArray m_aTriggers; + vector<CScriptBase*> m_vSpawns; + vector<CScriptBase*> m_vWorlditems; CConfigFile m_config; vector<CScriptBase *> m_vTeleporters; vector<CScriptBase *> m_vMoongates; ! CString m_sWorldItemFile; WORD m_wNextNPCID; *************** *** 181,187 **** void DestroyProgressDialog(); - CCategory * FindCategory(CPtrList * pPtrList, CString sCategory, bool bCreate = true); - CSubsection * FindSubsection(CCategory * pCategory, CString sSubsection, bool bCreate = true); - ULONG ItemCount(); CString ItemCategory(ULONG index); --- 169,172 ---- *************** *** 285,287 **** --- 270,274 ---- CScriptProfile * m_pProfile; + void CleanSpawnpoints(); + void CleanWorlditems(); }; Index: strings.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/strings.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** strings.h 23 May 2003 05:46:54 -0000 1.2 --- strings.h 4 Jun 2003 21:47:17 -0000 1.3 *************** *** 53,56 **** --- 53,58 ---- #define IDS_SCRIPTS_OLDSCRIPTS 138 #define IDS_SCRIPTS_FINISHEDLOADING 139 + #define IDS_TRAVEL_ALLSPAWNS 445 + #define IDS_TRAVEL_LOADINGSPAWNS 446 |
From: Philip E. <pes...@us...> - 2003-06-03 21:28:54
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv14578 Modified Files: itemtweaktab.cpp itemtweaktab.h MakeHelp.bat Log Message: no message Index: itemtweaktab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemtweaktab.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** itemtweaktab.cpp 30 May 2003 20:06:12 -0000 1.9 --- itemtweaktab.cpp 3 Jun 2003 21:28:50 -0000 1.10 *************** *** 657,659 **** --- 657,681 ---- locale->LocalizeWindow(IDD, IDC_IT_GROUPNAME, (CWnd*)&m_sName, (CWnd*)this); locale->LocalizeWindow(IDD, IDC_IT_GROUP_QS, (CWnd*)&m_sQuickSet, (CWnd*)this); + + SetAttributeCaptions(); } + + void CItemTweakTab::SetAttributeCaptions() + { + m_cbIdentified.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(0)); + m_cbDecay.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(1)); + m_cbNewbie.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(2)); + m_cbMoveAlways.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(3)); + m_cbMoveNever.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(4)); + m_cbMagic.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(5)); + m_cbOwnedByTown.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(6)); + m_cbInvisible.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(7)); + m_cbCursed.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(8)); + m_cbDamned.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(9)); + m_cbBlessed.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(10)); + m_cbSacred.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(11)); + m_cbForSale.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(12)); + m_cbStolen.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(13)); + m_cbCanDecay.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(14)); + m_cbStatic.SetWindowText(Main->m_pScriptsA->GetItemAttributeDescription(15)); + } \ No newline at end of file Index: itemtweaktab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemtweaktab.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** itemtweaktab.h 23 May 2003 05:30:37 -0000 1.5 --- itemtweaktab.h 3 Jun 2003 21:28:50 -0000 1.6 *************** *** 166,169 **** --- 166,170 ---- virtual BOOL OnSetActive(); void Localize(void); + void SetAttributeCaptions(); }; Index: MakeHelp.bat =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MakeHelp.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MakeHelp.bat 23 May 2003 05:30:37 -0000 1.2 --- MakeHelp.bat 3 Jun 2003 21:28:50 -0000 1.3 *************** *** 1,20 **** @echo off ! REM -- First make map file from Microsoft Visual C++ generated ENU\resource.h echo // MAKEHELP.BAT generated Help Map file. Used by DREWSKY.HPJ. >"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Commands (ID_* and IDM_*) >>"hlp\gwhog.hm" ! makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ENU\resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Prompts (IDP_*) >>"hlp\gwhog.hm" ! makehm IDP_,HIDP_,0x30000 ENU\resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Resources (IDR_*) >>"hlp\gwhog.hm" ! makehm IDR_,HIDR_,0x20000 ENU\resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Dialogs (IDD_*) >>"hlp\gwhog.hm" ! makehm IDD_,HIDD_,0x20000 ENU\resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Frame Controls (IDW_*) >>"hlp\gwhog.hm" ! makehm IDW_,HIDW_,0x50000 ENU\resource.h >>"hlp\gwhog.hm" REM -- Make help for Project DREWSKY --- 1,20 ---- @echo off ! REM -- First make map file from Microsoft Visual C++ generated resource.h echo // MAKEHELP.BAT generated Help Map file. Used by DREWSKY.HPJ. >"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Commands (ID_* and IDM_*) >>"hlp\gwhog.hm" ! makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Prompts (IDP_*) >>"hlp\gwhog.hm" ! makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Resources (IDR_*) >>"hlp\gwhog.hm" ! makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Dialogs (IDD_*) >>"hlp\gwhog.hm" ! makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\gwhog.hm" echo. >>"hlp\gwhog.hm" echo // Frame Controls (IDW_*) >>"hlp\gwhog.hm" ! makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\gwhog.hm" REM -- Make help for Project DREWSKY |
From: Philip E. <pes...@us...> - 2003-06-03 21:28:54
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv14578/S_Sphere52 Modified Files: S_Sphere52.vcproj ScriptsMain.cpp Added Files: attributes.cpp attributes.h types.cpp types.h Log Message: no message --- NEW FILE: attributes.cpp --- // attributes.cpp #include "stdafx.h" #include "attributes.h" int AttributeNames[] = { IDS_ATTR_IDENTIFIED, IDS_ATTR_DECAY, IDS_ATTR_NEWBIE, IDS_ATTR_ALWAYSMOVEABLE, IDS_ATTR_NEVERMOVEABLE, IDS_ATTR_MAGIC, IDS_ATTR_OWNEDBYTOWN, IDS_ATTR_INVISIBLE, IDS_ATTR_CURSED, IDS_ATTR_DAMNED, IDS_ATTR_BLESSED, IDS_ATTR_SACRED, IDS_ATTR_FORSALE, IDS_ATTR_STOLEN, IDS_ATTR_CANDECAY, IDS_ATTR_STATIC, }; --- NEW FILE: attributes.h --- // attributes.h // #define ATTR_IDENTIFIED 0x0001 // This is the identified name. ??? #define ATTR_DECAY 0x0002 // Timer currently set to decay. #define ATTR_NEWBIE 0x0004 // Not lost on death or sellable ? #define ATTR_MOVE_ALWAYS 0x0008 // Always movable (else Default as stored in client) (even if MUL says not movalble) NEVER DECAYS ! #define ATTR_MOVE_NEVER 0x0010 // Never movable (else Default as stored in client) NEVER DECAYS ! #define ATTR_MAGIC 0x0020 // DON'T SET THIS WHILE WORN! This item is magic as apposed to marked or markable. #define ATTR_OWNED 0x0040 // This is owned by the town. You need to steal it. NEVER DECAYS ! #define ATTR_INVIS 0x0080 // Gray hidden item (to GM's or owners?) #define ATTR_CURSED 0x0100 #define ATTR_CURSED2 0x0200 // cursed damned unholy #define ATTR_BLESSED 0x0400 #define ATTR_BLESSED2 0x0800 // blessed sacred holy #define ATTR_FORSALE 0x1000 // For sale on a vendor. #define ATTR_STOLEN 0x2000 // The item is hot. m_uidLink = previous owner. #define ATTR_CAN_DECAY 0x4000 // This item can decay. but it would seem that it would not (ATTR_MOVE_NEVER etc) #define ATTR_STATIC 0x8000 // WorldForge merge marker. (not used) // Strings from the Axis localization XML file. #define IDS_ATTR_IDENTIFIED 598 #define IDS_ATTR_DECAY 599 #define IDS_ATTR_NEWBIE 600 #define IDS_ATTR_ALWAYSMOVEABLE 601 #define IDS_ATTR_NEVERMOVEABLE 602 #define IDS_ATTR_MAGIC 603 #define IDS_ATTR_OWNEDBYTOWN 604 #define IDS_ATTR_INVISIBLE 605 #define IDS_ATTR_CURSED 606 #define IDS_ATTR_DAMNED 607 #define IDS_ATTR_BLESSED 608 #define IDS_ATTR_SACRED 609 #define IDS_ATTR_FORSALE 610 #define IDS_ATTR_STOLEN 611 #define IDS_ATTR_CANDECAY 612 #define IDS_ATTR_STATIC 613 extern int AttributeNames[]; --- NEW FILE: types.cpp --- // types.cpp // This file contains the names of the types associated with Sphere 0.52 // #include "stdafx.h" const TCHAR * ItemTypeName[] = { _T(" Normal "), _T("Container"), // any unlocked container or corpse. CContainer based _T("Locked Container"), // 2 = _T("Door"), // 3 = door can be opened _T("Locked Door"), // 4 = a locked door. _T("Key"), // 5 = _T("Light Lit"), // 6 = Local Light giving object _T("Light Out"), // 7 = Can be lit. _T("Food"), // 8 = edible food. (poisoned food ?) _T("Raw food"), // 9 = Must cook raw meat unless your an animal. _T("Armor"), // 10 = some type of armor. (no real action) _T("Smith's Mace"), // 11 = Can be used for smithing _T("Sharp Mace"), // 12 = war axe can be used to cut/chop trees. _T("Sword"), // 13 = _T("Fencing Weapon"), // 14 = can't be used to chop trees. (make kindling) _T("Bow"), // 15 = bow or xbow _T("Wand"), // 16 = A magic storage item _T("Teleport pad"), // 17 = walk on teleport _T("Switch"), // 18 = this is a switch which effects some other object in the world. _T("Book"), // 19 = read this book. (static text) _T("Rune"), // 20 = can be marked and renamed as a recall rune. _T("Booze"), // 21 = booze _T("Potion"), // 22 = Some magic effect. _T("Fire"), // 23 = It will burn you. _T("Clock"), // 24 = or a wristwatch _T("Trap"), // 25 = walk on trap. _T("Active Trap"), // 26 = some animation _T("Musical instrument"), // 27 = a musical instrument. _T("Spell"), // 28 = magic spell effect. _T("Gem"), // 29 = no use yet _T("Fishable Water"), // 30 = This is water (fishable) _T("Clothing"), // 31 = All cloth based wearable stuff"), _T("Scroll"), // 32 = magic scroll _T("Carpentry Tool"), // 33 = tool of some sort. _T("NPC Spawn Point"), // 34 = spawn object. should be invis also. _T("Game Piece"), // 35 = can't be removed from game. _T("Portculis"), // 36 = Z delta moving gate. (open) _T("Figurine"), // 37 = magic figure that turns into a creature when activated. _T("Shrine"), // 38 = can res you _T("Moongate"), // 39 = linked to other moon gates (hard coded locations) _T("Chair"), // 40 = Any sort of a chair item. we can sit on. _T("Forge"), // 41 = used to smelt ore"), blacksmithy etc. _T("Ore"), // 42 = smelt to ingots. _T("Log"), // 43 = make into furniture etc. _T("Tree"), // 44 = can be chopped. _T("Rock"), // 45 = can be mined for ore. _T("Carpentry Chopping tool"), // 46 = tool of some sort. _T("Multi"), // 47 = multi part object like house or ship. _T("Reagent"), // 48 = alchemy when clicked ? _T("Ship"), // 49 = this is a SHIP MULTI _T("Ship plank"), _T("Ship side"), // 51 = Should extend to make a plank _T("Ship side locked"), _T("Ship tiller"), // 53 = Tiller man on the ship. _T("Trade Window"), // 54 = container for the trade window. _T("Fish"), // 55 = fish can e cut up. _T("Sign gump"), // 56 = Things like grave stones and sign plaques _T("Guild Stone"), // 57 = Guild/town stones _T("Active Animation"), // 58 = active anium that will recycle when done. _T("Advance gate"), // 59 = advance gate. m_AdvanceGateType = CREID_TYPE _T("Cloth"), // 60 = bolt or folded cloth _T("Hair"), _T("Beard"), // 62 = just for grouping purposes. _T("Ingot"), // 63 = Ingot. _T("Coin"), // 64 = coin of some sort. gold or otherwise. _T("Plant"), // 65 = a plant that will regrow. picked type. _T("Drink (non-alcoholic"), // 66 = some sort of drink (non booze) _T("Anvil"), // 67 = for repair. _T("Locked Portcullis"), // 68 = this portcullis must be triggered. _T("Item Spawn Point"), // 69 = spawn other items. _T("Telescope"), // 70 = big telescope pic. _T("Bed EW"), // 71 = EW facing bed. _T("Bed NS"), // 72 = NS facing bed _T("Map"), // 73 = Map object with pins. _T("Memory Object"), // 74 = A Char has a memory link to some object. (I am fighting with someone. This records the fight.) _T("Staff/Mace"), // 75 = staff type of mace. or just other type of mace. _T("Equipped Horse object"), // 76 = equipped horse object represents a riding horse to the client. _T("Communication Crystal"), // 77 = communication crystal. _T("Game board"), // 78 = this is a container of pieces. _T("Trash"), // 79 = delete any object dropped on it. _T("Cannon muzzle"), // 80 = cannon muzzle. NOT the other cannon parts. _T("Cannon"), // 81 = the reset of the cannon. _T("Cannon ball"), _T("Fruiting Plant"), // 83 = fruit can be picked off this. _T("Immature Plant"), // 84 = can't be picked yet. _T("Ring of Reagents"), // 85 = ring of reagents. _T("Crystal Ball"), _T("Cashier's Check"), // 87 = represents large amounts of money. _T("Message"), // 88 = user written message item. (for bboard ussually) _T("Raw Reagent"), // 89 = Freshly grown reagents...not processed yet. _T("Client Linger Object"), // 90 = Change the brain type for some time. _T("Dream gate"), // 91 = Push you to another shard. (no items transfered"), client insta logged out) _T("Item Stone"), // 92 = Double click for items _T("Metronome"), // 93 = ticks once every n secs. _T("Explosion"), // 94 = async explosion. _T("NPC Script Object"), // 95 = Script npc actions in the form of a book. _T("Web"), _T("Grass"), _T("Throwable Rock"), // 98 = a rock or boulder. can be thrown by giants. _T("Tracker"), // 99 = points to a linked object. _T("Sound"), // 100 = this is a sound source. _T("Town Stone"), // 101 = Town stones. everyone free to join. _T("Shepherd's Crook"), // 102 _T("Pick Axe"), // 103 _T("Leather"), // 104 = Leather or skins of some sort.(not wearable) _T("Ship Part"), // 105 = some other part of a ship. _T("Bullitin Board"), // 106 = a container and bboard object. _T("Spellbook"), // 107 = spellbook (with spells) _T("Corpse"), // 108 = special type of item. _T("Track item"), // 109 - track a id or type of item. _T("Track char"), // 110 = track a char or range of char id's _T("Arrow"), // 111 _T("Crossbow Bolt"), // 112 _T("Vendor Box (equipped)"), // 113 = an equipped vendor . _T("Bank Box (equipped)"), // 114 = an equipped bank box _T("Deed"), // 115 _T("Loom"), // 116 _T("Beehive"), // 117 _T("Archery butte"), // 118 _T("Murder Count Object") // 119 = my murder count flag. _T("Vendor Stock"), // 120 _T("Inactive Trap"), // 121 = a safe trap. _T("Stone Room"), // 122 = house type stone. (for mapped house regions) _T("Bandage"), // 123 = can be used for healing. _T("Campfire"), // 124 = this is a fire but a small one. _T("Blank Map"), // 125 = blank map. _T("Spyglass"), // 126 _T("Sextant"), // 127 _T("Blank Scroll"), // 128 _T("Fruit"), // 129 _T("Washing/Drinking water"), // 130 = water that will not contain fish. (for washing or drinking) _T("Axe"), // 131 = not the same as a sword. but uses swordsmanship skill _T("Crossbow"), // 132 _T("Spell Icon"), // 133 _T("Open Door"), // 134 = You can walk through doors that are open. _T("Raw Meat"), // 135 = raw (uncooked meat) or part of a corpse. _T("Garbage"), // 136 = this is junk. _T("Keyring"), // 137 _T("Table"), // 138 = a table top _T("Floor"), // 139 _T("Roof"), // 140 _T("Feather"), // 141 = a birds feather _T("Wool"), // 142 = Wool cut frm a sheep. _T("Fur"), // 143 _T("Blood"), // 144 = blood of some creature _T("Foliage"), // 145 = does not go invis when reaped. but will if eaten _T("Grain"), // 146 _T("Scissors"), // 147 _T("Thread"), // 148 _T("Yarn"), // 149 _T("Spihning Wheel"), // 150 _T("Bloody Bandage"), // 151 = must be washed in water to get bandage back. _T("Fishing Pole"), // 152 _T("Shaft"), // 153 = used to make arrows and xbolts _T("Lockpick"), // 154 _T("Kindling"), // 155 = lit to make campfire _T("Training Dummy"), // 156 _T("Pickpocket Dip"),// 157 _T("Bedroll"), // 158 _T("Bellows"), // 159 _T("Hide"), // 160 = hides are cured to make leather. _T("Bolt of cloth"), // 161 = must be cut up to make cloth squares. _T("Lumber"), // 162 = logs are plained into decent lumber _T("Pitcher"), // 163 _T("Empty Pitcher"), // 164 _T("Dye vat"), // 165 _T("Dyes"), // 166 _T("Empty Potion Bottle"), // 167 = empty bottle. _T("Mortar"), // 168 _T("Hair Dye"), // 169 _T("Sewing kit"), // 170 _T("Tinker Tools"), // 171 _T("Wall"), // 172 = wall of a structure. _T("Window"), // 173 = window for a structure. _T("Cotton"), // 174 = Cotton from the plant _T("Bone"), // 175 _T("Script Object"), // 176 _T("Ship's Hold"), // 177 = ships hold. _T("Ship's Hold (locked)"), // 178 _T("Lava"), // 179 _T("Shield"), // 180 = equippable armor. _T("Jewelry"), // 181 = equippable. _T("Dirt"), // 182 = a patch of dirt where i can plant something }; --- NEW FILE: types.h --- // types.h // This file contains the definitions of the item types associated with Sphere 0.52. // // Some of these may not actually exist in Sphere 0.52. enum ITEM_TYPE // double click type action. { // NOTE: Never changethis list as it will mess up the GRAYITEMS.SCP file. // Just add stuff to end. ITEM_NORMAL = 0, ITEM_CONTAINER = 1, // any unlocked container or corpse. CContainer based ITEM_CONTAINER_LOCKED, // 2 = ITEM_DOOR, // 3 = door can be opened ITEM_DOOR_LOCKED, // 4 = a locked door. ITEM_KEY, // 5 = ITEM_LIGHT_LIT, // 6 = Local Light giving object ITEM_LIGHT_OUT, // 7 = Can be lit. ITEM_FOOD, // 8 = edible food. (poisoned food ?) ITEM_FOOD_RAW, // 9 = Must cook raw meat unless your an animal. ITEM_ARMOR, // 10 = some type of armor. (no real action) ITEM_WEAPON_MACE_SMITH, // 11 = Can be used for smithing ITEM_WEAPON_MACE_SHARP, // 12 = war axe can be used to cut/chop trees. ITEM_WEAPON_SWORD, // 13 = ITEM_WEAPON_FENCE, // 14 = can't be used to chop trees. (make kindling) ITEM_WEAPON_BOW, // 15 = bow or xbow ITEM_WAND, // 16 = A magic storage item ITEM_TELEPAD, // 17 = walk on teleport ITEM_SWITCH, // 18 = this is a switch which effects some other object in the world. ITEM_BOOK, // 19 = read this book. (static or dynamic text) ITEM_RUNE, // 20 = can be marked and renamed as a recall rune. ITEM_BOOZE, // 21 = booze ITEM_POTION, // 22 = Some magic effect. ITEM_FIRE, // 23 = It will burn you. ITEM_CLOCK, // 24 = or a wristwatch ITEM_TRAP, // 25 = walk on trap. ITEM_TRAP_ACTIVE, // 26 = some animation ITEM_MUSICAL, // 27 = a musical instrument. ITEM_SPELL, // 28 = magic spell effect. ITEM_GEM, // 29 = no use yet ITEM_WATER, // 30 = This is water (fishable) ITEM_CLOTHING, // 31 = All cloth based wearable stuff, ITEM_SCROLL, // 32 = magic scroll ITEM_CARPENTRY, // 33 = tool of some sort. ITEM_SPAWN_CHAR, // 34 = spawn object. should be invis also. ITEM_GAME_PIECE, // 35 = can't be removed from game. ITEM_PORTCULIS, // 36 = Z delta moving gate. (open) ITEM_FIGURINE, // 37 = magic figure that turns into a creature when activated. ITEM_SHRINE, // 38 = can res you ITEM_MOONGATE, // 39 = linked to other moon gates (hard coded locations) ITEM_CHAIR, // 40 = Any sort of a chair item. we can sit on. ITEM_FORGE, // 41 = used to smelt ore, blacksmithy etc. ITEM_ORE, // 42 = smelt to ingots. ITEM_LOG, // 43 = make into furniture etc. lumber,logs, ITEM_TREE, // 44 = can be chopped. ITEM_ROCK, // 45 = can be mined for ore. ITEM_CARPENTRY_CHOP, // 46 = tool of some sort. ITEM_MULTI, // 47 = multi part object like house or ship. ITEM_REAGENT, // 48 = alchemy when clicked ? ITEM_SHIP, // 49 = this is a SHIP MULTI ITEM_SHIP_PLANK, ITEM_SHIP_SIDE, // 51 = Should extend to make a plank ITEM_SHIP_SIDE_LOCKED, ITEM_SHIP_TILLER, // 53 = Tiller man on the ship. ITEM_EQ_TRADE_WINDOW, // 54 = container for the trade window. ITEM_FISH, // 55 = fish can be cut up. ITEM_SIGN_GUMP, // 56 = Things like grave stones and sign plaques ITEM_STONE_GUILD, // 57 = Guild/town stones ITEM_ANIM_ACTIVE, // 58 = active anium that will recycle when done. ITEM_ADVANCE_GATE, // 59 = advance gate. m_AdvanceGateType = CREID_TYPE ITEM_CLOTH, // 60 = bolt or folded cloth ITEM_HAIR, ITEM_BEARD, // 62 = just for grouping purposes. ITEM_INGOT, // 63 = Ingot. ITEM_COIN, // 64 = coin of some sort. gold or otherwise. ITEM_PLANT, // 65 = a plant that will regrow. picked type. ITEM_DRINK, // 66 = some sort of drink (non booze) ITEM_ANVIL, // 67 = for repair. ITEM_PORT_LOCKED, // 68 = this portcullis must be triggered. ITEM_SPAWN_ITEM, // 69 = spawn other items. ITEM_TELESCOPE, // 70 = big telescope pic. ITEM_BED_EW, // 71 = EW facing bed. ITEM_BED_NS, // 72 = NS facing bed ITEM_MAP, // 73 = Map object with pins. ITEM_EQ_MEMORY_OBJ, // 74 = A Char has a memory link to some object. (I am fighting with someone. This records the fight.) ITEM_WEAPON_MACE_STAFF, // 75 = staff type of mace. or just other type of mace. ITEM_EQ_HORSE, // 76 = equipped horse object represents a riding horse to the client. ITEM_COMM_CRYSTAL, // 77 = communication crystal. ITEM_GAME_BOARD, // 78 = this is a container of pieces. ITEM_TRASH, // 79 = delete any object dropped on it. ITEM_CANNON_MUZZLE, // 80 = cannon muzzle. NOT the other cannon parts. ITEM_CANNON, // 81 = the reset of the cannon. ITEM_CANNON_BALL, ITEM_PLANT_FRUITING, // 83 = fruit can be picked off this. ITEM_PLANT_IMATURE, // 84 = can't be picked yet. ITEM_RING_REAGENTS, // 85 = ring of reagents. ITEM_CRYSTAL_BALL, ITEM_CASHIERS_CHECK, // 87 = represents large amounts of money. ITEM_MESSAGE, // 88 = user written message item. (for bboard ussually) ITEM_REAGENT_RAW, // 89 = Freshly grown reagents...not processed yet. ITEM_EQ_CLIENT_LINGER, // 90 = Change player to NPC for a while. ITEM_DREAM_GATE, // 91 = Push you to another shard. (no items transfered, client insta logged out) ITEM_ITEM_STONE, // 92 = Double click for items ITEM_METRONOME, // 93 = ticks once every n secs. ITEM_EXPLOSION, // 94 = async explosion. ITEM_EQ_NPC_SCRIPT, // 95 = Script npc actions in the form of a book. ITEM_WEB, ITEM_GRASS, ITEM_AROCK, // 98 = a rock or boulder. can be thrown by giants. ITEM_TRACKER, // 99 = points to a linked object. ITEM_SOUND, // 100 = this is a sound source. ITEM_STONE_TOWN, // 101 = Town stones. everyone free to join. ITEM_WEAPON_MACE_CROOK, // 102 ITEM_WEAPON_MACE_PICK, // 103 ITEM_LEATHER, // 104 = Leather or skins of some sort.(not wearable) ITEM_SHIP_OTHER, // 105 = some other part of a ship. ITEM_BBOARD, // 106 = a container and bboard object. ITEM_SPELLBOOK, // 107 = spellbook (with spells) ITEM_CORPSE, // 108 = special type of item. ITEM_TRACK_ITEM, // 109 - track a id or type of item. ITEM_TRACK_CHAR, // 110 = track a char or range of char id's ITEM_WEAPON_ARROW, // 111 ITEM_WEAPON_BOLT, // 112 ITEM_EQ_VENDOR_BOX, // 113 = an equipped vendor . ITEM_EQ_BANK_BOX, // 114 = an equipped bank box ITEM_DEED, // 115 ITEM_LOOM, // 116 ITEM_BEE_HIVE, // 117 ITEM_ARCHERY_BUTTE, // 118 ITEM_EQ_MURDER_COUNT, // 119 = my murder count flag. ITEM_EQ_STUCK, // 120 ITEM_TRAP_INACTIVE, // 121 = a safe trap. ITEM_STONE_ROOM, // 122 = house type stone. (for mapped house regions) ITEM_BANDAGE, // 123 = can be used for healing. ITEM_CAMPFIRE, // 124 = this is a fire but a small one. ITEM_MAP_BLANK, // 125 = blank map. ITEM_SPY_GLASS, // 126 ITEM_SEXTANT, // 127 ITEM_SCROLL_BLANK, // 128 ITEM_FRUIT, // 129 ITEM_WATER_WASH, // 130 = water that will not contain fish. (for washing or drinking) ITEM_WEAPON_AXE, // 131 = not the same as a sword. but uses swordsmanship skill ITEM_WEAPON_XBOW, // 132 ITEM_SPELLICON, // 133 ITEM_DOOR_OPEN, // 134 = You can walk through doors that are open. ITEM_MEAT_RAW, // 135 = raw (uncooked meat) or part of a corpse. ITEM_GARBAGE, // 136 = this is junk. ITEM_KEYRING, // 137 ITEM_TABLE, // 138 = a table top ITEM_FLOOR, // 139 ITEM_ROOF, // 140 ITEM_FEATHER, // 141 = a birds feather ITEM_WOOL, // 142 = Wool cut frm a sheep. ITEM_FUR, // 143 ITEM_BLOOD, // 144 = blood of some creature ITEM_FOLIAGE, // 145 = does not go invis when reaped. but will if eaten ITEM_GRAIN, // 146 ITEM_SCISSORS, // 147 ITEM_THREAD, // 148 ITEM_YARN, // 149 ITEM_SPINWHEEL, // 150 ITEM_BANDAGE_BLOOD, // 151 = must be washed in water to get bandage back. ITEM_FISH_POLE, // 152 ITEM_SHAFT, // 153 = used to make arrows and xbolts ITEM_LOCKPICK, // 154 ITEM_KINDLING, // 155 = lit to make campfire ITEM_TRAIN_DUMMY, // 156 ITEM_TRAIN_PICKPOCKET,// 157 ITEM_BEDROLL, // 158 ITEM_BELLOWS, // 159 ITEM_HIDE, // 160 = hides are cured to make leather. ITEM_CLOTH_BOLT, // 161 = must be cut up to make cloth squares. ITEM_LUMBER, // 162 = logs are plained into decent lumber ITEM_PITCHER, // 163 ITEM_PITCHER_EMPTY, // 164 ITEM_DYE_VAT, // 165 ITEM_DYE, // 166 ITEM_POTION_EMPTY, // 167 = empty bottle. ITEM_MORTAR, // 168 ITEM_HAIR_DYE, // 169 ITEM_SEWING_KIT, // 170 ITEM_TINKER_TOOLS, // 171 ITEM_WALL, // 172 = wall of a structure. ITEM_WINDOW, // 173 = window for a structure. ITEM_COTTON, // 174 = Cotton from the plant ITEM_BONE, // 175 ITEM_EQ_SCRIPT, // 176 ITEM_SHIP_HOLD, // 177 = ships hold. ITEM_SHIP_HOLD_LOCK, // 178 ITEM_LAVA, // 179 ITEM_SHIELD, // 180 = equippable armor. ITEM_JEWELRY, // 181 = equippable. ITEM_DIRT, // 182 = a patch of dirt where i can plant something ITEM_QTY, ITEM_TRIGGER = 1000, // Create custom new script trigger types }; extern const TCHAR * ItemTypeName[]; Index: S_Sphere52.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** S_Sphere52.vcproj 2 Jun 2003 14:37:13 -0000 1.3 --- S_Sphere52.vcproj 3 Jun 2003 21:28:49 -0000 1.4 *************** *** 268,271 **** --- 268,274 ---- </File> <File + RelativePath="attributes.cpp"> + </File> + <File RelativePath="compreg.cpp"> </File> *************** *** 300,303 **** --- 303,309 ---- </FileConfiguration> </File> + <File + RelativePath="types.cpp"> + </File> </Filter> <Filter *************** *** 419,422 **** --- 425,431 ---- </File> <File + RelativePath="attributes.h"> + </File> + <File RelativePath="compreg.h"> </File> *************** *** 429,432 **** --- 438,444 ---- <File RelativePath="strings.h"> + </File> + <File + RelativePath="types.h"> </File> </Filter> Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ScriptsMain.cpp 2 Jun 2003 14:37:13 -0000 1.7 --- ScriptsMain.cpp 3 Jun 2003 21:28:49 -0000 1.8 *************** *** 18,21 **** --- 18,23 ---- #include "toredef.h" #include "tobarray.h" + #include "types.h" + #include "attributes.h" #include <direct.h> *************** *** 3792,3806 **** ULONG CScriptsMain::TypeCount() { ! return 0; } CString CScriptsMain::TypeDescription(ULONG index) { ! return _T(""); } CString CScriptsMain::AttributeDescription(BYTE bit) { ! return _T(""); } --- 3794,3814 ---- ULONG CScriptsMain::TypeCount() { ! return ITEM_QTY; } CString CScriptsMain::TypeDescription(ULONG index) { ! if ( index >= ITEM_QTY ) ! return _T(""); ! else ! return ItemTypeName[index]; } CString CScriptsMain::AttributeDescription(BYTE bit) { ! if ( bit > 16 ) ! return _T(""); ! else ! return locale->String(AttributeNames[bit]); } |
From: Philip E. <pes...@us...> - 2003-06-03 16:58:50
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv32613 Modified Files: StaticToolDlg.cpp Log Message: no message Index: StaticToolDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/StaticToolDlg.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** StaticToolDlg.cpp 3 Jun 2003 16:43:12 -0000 1.36 --- StaticToolDlg.cpp 3 Jun 2003 16:58:46 -0000 1.37 *************** *** 476,480 **** patch.blockData.bY = pItem->GetBlockY(); patch.blockData.bZ = (BYTE) pItem->m_pZ; ! patch.blockData.wArtID = pItem->m_wArtID ? pItem->m_wArtID : (WORD) DefLookup(pItem->m_csBaseID); if ( patch.blockData.wArtID == 0 ) continue; --- 476,480 ---- patch.blockData.bY = pItem->GetBlockY(); patch.blockData.bZ = (BYTE) pItem->m_pZ; ! patch.blockData.wArtID = pItem->m_wArtID ? pItem->m_wArtID : (WORD) Main->m_pScriptsA->EvaluateDef(pItem->m_csBaseID); if ( patch.blockData.wArtID == 0 ) continue; *************** *** 977,981 **** else { ! if ( (WORD) DefLookup(pItem->m_csBaseID) == wArtID ) return false; } --- 977,981 ---- else { ! if ( (WORD) Main->m_pScriptsA->EvaluateDef(pItem->m_csBaseID) == wArtID ) return false; } *************** *** 994,998 **** else { ! if ( (WORD) DefLookup(pItem->m_csBaseID) == wArtID ) return true; } --- 994,998 ---- else { ! if ( (WORD) Main->m_pScriptsA->EvaluateDef(pItem->m_csBaseID) == wArtID ) return true; } *************** *** 1038,1045 **** void CStaticToolDlg::LoadWorldfile() { ! if ( Main->m_pScriptsA->ReloadWorldItemFile(m_csWorldFile) == 0 ) { // Populate the list with the information from the script module ! for ( int i = 0; i < Main->m_pScriptsA->GetWorldItemCount(); i++ ) { CWorldItem * pItem = new CWorldItem; --- 1038,1046 ---- void CStaticToolDlg::LoadWorldfile() { ! Main->m_pScriptsA->SetWorldItemFile(m_csWorldFile); ! if ( Main->m_pScriptsA->ReloadWorldItemFile() == 0 ) { // Populate the list with the information from the script module ! for ( int i = 0; i < (int) Main->m_pScriptsA->GetWorldItemCount(); i++ ) { CWorldItem * pItem = new CWorldItem; *************** *** 1051,1055 **** pItem->m_dwItemType = Main->m_pScriptsA->GetWorldItemType(i); pItem->m_dwSerial = Main->m_pScriptsA->GetWorldItemUID(i); ! pItem->m_wColor = Main->m_pScriptsA->EvaluateDef(Main->m_pScriptsA->GetWorldItemColor(i)); // Get the coords as well if ( m_pWorldItemList.IsEmpty() ) --- 1052,1056 ---- pItem->m_dwItemType = Main->m_pScriptsA->GetWorldItemType(i); pItem->m_dwSerial = Main->m_pScriptsA->GetWorldItemUID(i); ! pItem->m_wColor = (WORD) Main->m_pScriptsA->EvaluateDef(Main->m_pScriptsA->GetWorldItemColor(i)); // Get the coords as well if ( m_pWorldItemList.IsEmpty() ) *************** *** 1059,1065 **** } } csTemp.Format(locale->String(IDS_STATICTOOL_CAPTION2), m_pWorldItemList.GetCount()); this->SetWindowText(csTemp); - csfWorld.Close(); } --- 1060,1066 ---- } } + CString csTemp; csTemp.Format(locale->String(IDS_STATICTOOL_CAPTION2), m_pWorldItemList.GetCount()); this->SetWindowText(csTemp); } *************** *** 1572,1576 **** { // Load the name from the mulfiles. ! DWORD idx = DefLookup(pItem->m_csBaseID); if ( idx != 0 ) { --- 1573,1577 ---- { // Load the name from the mulfiles. ! DWORD idx = Main->m_pScriptsA->EvaluateDef(pItem->m_csBaseID); if ( idx != 0 ) { *************** *** 1912,1916 **** CWorldItem * pItem = (CWorldItem *) m_pWorldItemList.GetNext(pos); if ( pItem && pItem->m_bStaticFlag ) ! m_Preview.AddPreviewItem(pItem->m_wArtID ? pItem->m_wArtID : (WORD) DefLookup(pItem->m_csBaseID), pItem->m_pX, pItem->m_pY, pItem->m_pZ, pItem->m_wColor); } pos = m_pPatchItemList.GetHeadPosition(); --- 1913,1917 ---- CWorldItem * pItem = (CWorldItem *) m_pWorldItemList.GetNext(pos); if ( pItem && pItem->m_bStaticFlag ) ! m_Preview.AddPreviewItem(pItem->m_wArtID ? pItem->m_wArtID : (WORD) Main->m_pScriptsA->EvaluateDef(pItem->m_csBaseID), pItem->m_pX, pItem->m_pY, pItem->m_pZ, pItem->m_wColor); } pos = m_pPatchItemList.GetHeadPosition(); |
From: Philip E. <pes...@us...> - 2003-06-03 16:46:43
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv26736 Modified Files: Axis.rc axis_enu.xml axis_esp.xml AxisLog.cpp AxisLogDlg.cpp AxisLogDlg.h Drewsky.cpp Drewsky.h drewskyps.cpp EditorTab.cpp EditorTab.h resource.h StaticToolDlg.cpp version.h Log Message: Put the editor tab back in. Also updated the Static Tool to support Scripts COM. Index: Axis.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Axis.rc 23 May 2003 05:30:36 -0000 1.2 --- Axis.rc 3 Jun 2003 16:43:11 -0000 1.3 *************** *** 1207,1232 **** END ! IDD_EDITORTAB DIALOG 0, 0, 375, 102 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Editors" ! FONT 8, "MS Sans Serif" BEGIN ! PUSHBUTTON "Names",IDC_NAMEEDITOR,7,2,55,16,WS_DISABLED ! PUSHBUTTON "Skills",IDC_SKILLEDITOR,7,19,55,16,WS_DISABLED ! PUSHBUTTON "Spells",IDC_SPELLEDITOR,7,36,55,16,WS_DISABLED ! PUSHBUTTON "Words of Power",IDC_WOPEDITOR,7,54,55,16,WS_DISABLED ! PUSHBUTTON "Notoriety Titles",IDC_NOTOEDITOR,7,72,55,16,WS_DISABLED ! PUSHBUTTON "Stat Gain Rates",IDC_STATRATEEDIT,65,2,55,16, ! WS_DISABLED ! PUSHBUTTON "Coloured Ores",IDC_OREEDIT,65,19,55,16,WS_DISABLED ! PUSHBUTTON "Defs",IDC_DEFEDIT,65,36,55,16,WS_DISABLED ! PUSHBUTTON "Triggers",IDC_TRIGGEREDIT,65,54,55,16 ! PUSHBUTTON "Newbies",IDC_NEWBIEEDIT,65,72,55,16,WS_DISABLED ! PUSHBUTTON "Accounts",IDC_ACCOUNTEDIT,123,2,55,16 ! PUSHBUTTON "Raw Text Edit",IDC_RAWEDIT,313,2,55,16 ! PUSHBUTTON "Potions",IDC_POTIONEDIT,123,19,55,16,WS_DISABLED ! PUSHBUTTON "Skill Menus",IDC_SKILLMENUEDIT,123,36,55,16,WS_DISABLED ! PUSHBUTTON "Items / Templates / NPCs / Spawn Groups",IDC_ITEMEDIT, ! 123,54,55,34,BS_MULTILINE END --- 1207,1289 ---- END ! IDD_EDITORTAB DIALOGEX 0, 0, 480, 116 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Editors" ! FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! CTEXT "There are no editors available with the current script module.", ! IDC_NOEDITORS,7,2,466,112,SS_CENTERIMAGE ! PUSHBUTTON "Button1",IDC_EDITOR1,7,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR2,7,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR3,7,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR4,7,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR5,7,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR6,7,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR7,84,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR8,84,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR9,84,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR10,84,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR11,84,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR12,84,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR13,161,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR14,161,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR15,161,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR16,161,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR17,161,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR18,161,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR19,238,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR20,238,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR21,238,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR22,238,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR23,238,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR24,238,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR25,315,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR26,315,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR27,315,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR28,315,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR29,315,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR30,315,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR31,392,2,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR32,392,20,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR33,392,38,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR34,392,56,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR35,392,74,76,18,BS_MULTILINE | NOT ! WS_VISIBLE ! PUSHBUTTON "Button1",IDC_EDITOR36,392,92,76,18,BS_MULTILINE | NOT ! WS_VISIBLE END *************** *** 2332,2337 **** CONTROL "Allow Multiple Instances of Axis",IDC_AS_ALLOWMULTIPLE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,116,112,9 ! CONTROL "Save Account Password in uo.cfg",IDC_SAVEACCTPWD, ! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,126,154,8 CONTROL "Check for updates at start",IDC_AS_CHECKFORUPDATES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,136,160,8 --- 2389,2394 ---- CONTROL "Allow Multiple Instances of Axis",IDC_AS_ALLOWMULTIPLE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,116,112,9 ! CONTROL "Save Account Password in uo.cfg",IDC_SAVEACCTPWD,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,10,126,154,8 CONTROL "Check for updates at start",IDC_AS_CHECKFORUPDATES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,136,160,8 *************** *** 2732,2738 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 368 TOPMARGIN, 2 ! BOTTOMMARGIN, 100 END --- 2789,2795 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 473 TOPMARGIN, 2 ! BOTTOMMARGIN, 114 END Index: axis_enu.xml =================================================================== RCS file: /cvsroot/sphere-axis/Axis/axis_enu.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** axis_enu.xml 23 May 2003 05:30:36 -0000 1.2 --- axis_enu.xml 3 Jun 2003 16:43:12 -0000 1.3 *************** *** 728,746 **** </Dialog> <Dialog ID="166" Caption="Editors"> ! <Item ID="1001" type="PUSHBUTTON" geometry="7,2,55,16">"Names"</Item> ! <Item ID="1002" type="PUSHBUTTON" geometry="7,19,55,16">"Skills"</Item> ! <Item ID="1003" type="PUSHBUTTON" geometry="7,36,55,16">"Spells"</Item> ! <Item ID="1005" type="PUSHBUTTON" geometry="7,54,55,16">"Words of Power"</Item> ! <Item ID="1006" type="PUSHBUTTON" geometry="7,72,55,16">"Notoriety Titles"</Item> ! <Item ID="1007" type="PUSHBUTTON" geometry="65,2,55,16">"Stat Gain Rates"</Item> ! <Item ID="1008" type="PUSHBUTTON" geometry="65,19,55,16">"Coloured Ores"</Item> ! <Item ID="1012" type="PUSHBUTTON" geometry="65,36,55,16">"Defs"</Item> ! <Item ID="1013" type="PUSHBUTTON" geometry="65,54,55,16">"Triggers"</Item> ! <Item ID="1014" type="PUSHBUTTON" geometry="65,72,55,16">"Newbies"</Item> ! <Item ID="1015" type="PUSHBUTTON" geometry="123,2,55,16">"Accounts"</Item> ! <Item ID="1016" type="PUSHBUTTON" geometry="313,2,55,16">"Raw Text Edit"</Item> ! <Item ID="1017" type="PUSHBUTTON" geometry="123,19,55,16">"Potions"</Item> ! <Item ID="1018" type="PUSHBUTTON" geometry="123,36,55,16">"Skill Menus"</Item> ! <Item ID="1021" type="PUSHBUTTON" geometry="123,54,55,34">"Items / Templates / NPCs / Spawn Groups"</Item> </Dialog> <Dialog ID="168" Caption="Name Editor"> --- 728,732 ---- </Dialog> <Dialog ID="166" Caption="Editors"> ! <Item ID="1795" type="CTEXT" geometry="7,2,466,112">"There are no editors available with the current script module."</Item> </Dialog> <Dialog ID="168" Caption="Name Editor"> Index: axis_esp.xml =================================================================== RCS file: /cvsroot/sphere-axis/Axis/axis_esp.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** axis_esp.xml 23 May 2003 05:30:36 -0000 1.2 --- axis_esp.xml 3 Jun 2003 16:43:12 -0000 1.3 *************** *** 726,744 **** </Dialog> <Dialog ID="166" Caption="Editors"> ! <Item ID="1001" type="PUSHBUTTON" geometry="7,2,55,16">"Names"</Item> ! <Item ID="1002" type="PUSHBUTTON" geometry="7,19,55,16">"Skills"</Item> ! <Item ID="1003" type="PUSHBUTTON" geometry="7,36,55,16">"Spells"</Item> ! <Item ID="1005" type="PUSHBUTTON" geometry="7,54,55,16">"Words of Power"</Item> ! <Item ID="1006" type="PUSHBUTTON" geometry="7,72,55,16">"Notoriety Titles"</Item> ! <Item ID="1007" type="PUSHBUTTON" geometry="65,2,55,16">"Stat Gain Rates"</Item> ! <Item ID="1008" type="PUSHBUTTON" geometry="65,19,55,16">"Coloured Ores"</Item> ! <Item ID="1012" type="PUSHBUTTON" geometry="65,36,55,16">"Defs"</Item> ! <Item ID="1013" type="PUSHBUTTON" geometry="65,54,55,16">"Triggers"</Item> ! <Item ID="1014" type="PUSHBUTTON" geometry="65,72,55,16">"Newbies"</Item> ! <Item ID="1015" type="PUSHBUTTON" geometry="123,2,55,16">"Accounts"</Item> ! <Item ID="1016" type="PUSHBUTTON" geometry="313,2,55,16">"Raw Text Edit"</Item> ! <Item ID="1017" type="PUSHBUTTON" geometry="123,19,55,16">"Potions"</Item> ! <Item ID="1018" type="PUSHBUTTON" geometry="123,36,55,16">"Skill Menus"</Item> ! <Item ID="1021" type="PUSHBUTTON" geometry="123,54,55,34">"Items / Templates / NPCs / Spawn Groups"</Item> </Dialog> <Dialog ID="168" Caption="Name Editor"> --- 726,730 ---- </Dialog> <Dialog ID="166" Caption="Editors"> ! <Item ID="1795" type="CTEXT" geometry="7,2,466,112">"There are no editors available with the current script module."</Item> </Dialog> <Dialog ID="168" Caption="Name Editor"> Index: AxisLog.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AxisLog.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** AxisLog.cpp 23 May 2003 05:30:36 -0000 1.7 --- AxisLog.cpp 3 Jun 2003 16:43:12 -0000 1.8 *************** *** 71,77 **** if ( Main->m_pAxisCOM ) Main->m_pAxisCOM->AddToLog(NEW_LOG, csText); - - if ( Main->m_pcppAxisLogTab ) - Main->m_pcppAxisLogTab->AddText(csText); } --- 71,74 ---- Index: AxisLogDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AxisLogDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AxisLogDlg.cpp 23 May 2003 05:30:36 -0000 1.2 --- AxisLogDlg.cpp 3 Jun 2003 16:43:12 -0000 1.3 *************** *** 67,84 **** // CAxisLogDlg message handlers ! void CAxisLogDlg::AddText(CString csText) { ! if ( m_csText.GetLength() > 0 ) ! { ! TCHAR crlf[3] = { 0x0d, 0x0a, 0x00 }; ! m_csText += crlf; ! } ! m_csText += csText; } ! BOOL CAxisLogDlg::OnSetActive() { ! m_ceLog.SetWindowText(m_csText); ! m_ceLog.SetSel(0, 0); ! return CPropertyPage::OnSetActive(); } --- 67,94 ---- // CAxisLogDlg message handlers ! BOOL CAxisLogDlg::OnSetActive() { ! ReloadLog(); ! return CPropertyPage::OnSetActive(); } ! void CAxisLogDlg::ReloadLog() { ! CStdioFile fLog; ! CString sLog; ! TCHAR szEOL [] = { 0x0d, 0x0a, 0x00 }; ! if (fLog.Open(_T("axis.log"), CFile::modeRead | CFile::typeText | CFile::shareDenyNone)) ! { ! CString sLine; ! BOOL bStatus = TRUE; ! while ( bStatus ) ! { ! bStatus = fLog.ReadString(sLine); ! if ( bStatus ) ! sLog += sLine + szEOL; ! } ! fLog.Close(); ! } ! m_ceLog.SetWindowText(sLog); ! // For some reason, the text is always selected, even if you set the current selection to -1, 0. } Index: AxisLogDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AxisLogDlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AxisLogDlg.h 17 Jul 2002 19:10:57 -0000 1.1 --- AxisLogDlg.h 3 Jun 2003 16:43:12 -0000 1.2 *************** *** 40,44 **** // Construction public: - void AddText(CString csText); void SetVisible(bool bVisible) { m_bVisible = bVisible; } CAxisLogDlg(CWnd* pParent = NULL); // standard constructor --- 40,43 ---- *************** *** 69,72 **** --- 68,72 ---- CString m_csText; bool m_bVisible; + void ReloadLog(); DECLARE_MESSAGE_MAP() }; Index: Drewsky.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** Drewsky.cpp 27 May 2003 04:26:30 -0000 1.25 --- Drewsky.cpp 3 Jun 2003 16:43:12 -0000 1.26 *************** *** 337,340 **** --- 337,341 ---- m_pcppSettingsTab = new CSettingsTab; m_pcppMiscTab = new CMiscTab; + m_pcppEditorTab = new CEditorTab; m_pcppCommandTab = new CCommandTab; m_pcppMacroDlg = new CMacroDlg; *************** *** 350,353 **** --- 351,355 ---- dlg.AddPage(m_pcppSettingsTab); dlg.AddPage(m_pcppMiscTab); + dlg.AddPage(m_pcppEditorTab); dlg.AddPage(m_pcppCommandTab); dlg.AddPage(m_pcppAxisLogTab); *************** *** 421,424 **** --- 423,427 ---- delete m_pcppMiscTab; delete m_pcppMacroDlg; + delete m_pcppEditorTab; delete m_pcppCommandTab; delete m_pcppAxisLogTab; Index: Drewsky.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Drewsky.h 23 May 2003 05:30:40 -0000 1.17 --- Drewsky.h 3 Jun 2003 16:43:12 -0000 1.18 *************** *** 50,53 **** --- 50,54 ---- #include "MiscTab.h" #include "MacroDlg.h" + #include "EditorTab.h" #include "CommandTab.h" #include "RemoteConnection.h" *************** *** 128,131 **** --- 129,133 ---- CSettingsTab * m_pcppSettingsTab; CMiscTab * m_pcppMiscTab; + CEditorTab * m_pcppEditorTab; CMacroDlg * m_pcppMacroDlg; CCommandTab * m_pcppCommandTab; Index: drewskyps.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewskyps.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** drewskyps.cpp 23 May 2003 05:30:36 -0000 1.9 --- drewskyps.cpp 3 Jun 2003 16:43:12 -0000 1.10 *************** *** 55,58 **** --- 55,59 ---- IDD_SETTINGS_TAB, IDD_MISC_TAB, + IDD_EDITORTAB, IDD_COMMAND_TAB, IDD_DIALOG1 Index: EditorTab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/EditorTab.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** EditorTab.cpp 23 May 2003 05:30:37 -0000 1.6 --- EditorTab.cpp 3 Jun 2003 16:43:12 -0000 1.7 *************** *** 28,45 **** #include "drewsky.h" #include "EditorTab.h" - #include "NameEditDlg.h" - #include "SkillTableEditDlg.h" - #include "NotoTitleEditDlg.h" - #include "StatRateEditDlg.h" - #include "SpellEditDlg.h" - #include "WOPEditDlg.h" - #include "OreEditDlg.h" - #include "DefEditDlg.h" - #include "TriggerEditDlg.h" - #include "ScriptEditDlg.h" - #include "AccountDlg.h" - #include "PotionEdit.h" - #include "SkillMenuEditDlg.h" - #include "ItemScriptEditDlg.h" #ifdef _DEBUG --- 28,31 ---- *************** *** 69,89 **** CPropertyPage::DoDataExchange(pDX); //{{AFX_DATA_MAP(CEditorTab) - DDX_Control(pDX, IDC_RAWEDIT, m_cbRawEdit); - DDX_Control(pDX, IDC_NAMEEDITOR, m_bNames); - DDX_Control(pDX, IDC_SKILLEDITOR, m_bSkills); - DDX_Control(pDX, IDC_SPELLEDITOR, m_bSpells); - DDX_Control(pDX, IDC_WOPEDITOR, m_bWOP); - DDX_Control(pDX, IDC_NOTOEDITOR, m_bNoto); - DDX_Control(pDX, IDC_STATRATEEDIT, m_bStatRates); - DDX_Control(pDX, IDC_OREEDIT, m_bOres); - DDX_Control(pDX, IDC_DEFEDIT, m_bDefs); - DDX_Control(pDX, IDC_TRIGGEREDIT, m_bTriggers); - DDX_Control(pDX, IDC_NEWBIEEDIT, m_bNewbies); - DDX_Control(pDX, IDC_ACCOUNTEDIT, m_bAccounts); - DDX_Control(pDX, IDC_POTIONEDIT, m_bPotions); - DDX_Control(pDX, IDC_SKILLMENUEDIT, m_bSkillMenus); - DDX_Control(pDX, IDC_ITEMEDIT, m_bItems); - DDX_Control(pDX, IDC_RAWEDIT, m_bRawEditor); //}}AFX_DATA_MAP } --- 55,96 ---- CPropertyPage::DoDataExchange(pDX); //{{AFX_DATA_MAP(CEditorTab) //}}AFX_DATA_MAP + DDX_Control(pDX, IDC_NOEDITORS, m_sNoEditors); + DDX_Control(pDX, IDC_EDITOR1, m_bEditor1); + DDX_Control(pDX, IDC_EDITOR2, m_bEditor2); + DDX_Control(pDX, IDC_EDITOR3, m_bEditor3); + DDX_Control(pDX, IDC_EDITOR4, m_bEditor4); + DDX_Control(pDX, IDC_EDITOR5, m_bEditor5); + DDX_Control(pDX, IDC_EDITOR6, m_bEditor6); + DDX_Control(pDX, IDC_EDITOR7, m_bEditor7); + DDX_Control(pDX, IDC_EDITOR8, m_bEditor8); + DDX_Control(pDX, IDC_EDITOR9, m_bEditor9); + DDX_Control(pDX, IDC_EDITOR10, m_bEditor10); + DDX_Control(pDX, IDC_EDITOR11, m_bEditor11); + DDX_Control(pDX, IDC_EDITOR12, m_bEditor12); + DDX_Control(pDX, IDC_EDITOR13, m_bEditor13); + DDX_Control(pDX, IDC_EDITOR14, m_bEditor14); + DDX_Control(pDX, IDC_EDITOR15, m_bEditor15); + DDX_Control(pDX, IDC_EDITOR16, m_bEditor16); + DDX_Control(pDX, IDC_EDITOR17, m_bEditor17); + DDX_Control(pDX, IDC_EDITOR18, m_bEditor18); + DDX_Control(pDX, IDC_EDITOR19, m_bEditor19); + DDX_Control(pDX, IDC_EDITOR20, m_bEditor20); + DDX_Control(pDX, IDC_EDITOR21, m_bEditor21); + DDX_Control(pDX, IDC_EDITOR22, m_bEditor22); + DDX_Control(pDX, IDC_EDITOR23, m_bEditor23); + DDX_Control(pDX, IDC_EDITOR24, m_bEditor24); + DDX_Control(pDX, IDC_EDITOR25, m_bEditor25); + DDX_Control(pDX, IDC_EDITOR26, m_bEditor26); + DDX_Control(pDX, IDC_EDITOR27, m_bEditor27); + DDX_Control(pDX, IDC_EDITOR28, m_bEditor28); + DDX_Control(pDX, IDC_EDITOR29, m_bEditor29); + DDX_Control(pDX, IDC_EDITOR30, m_bEditor30); + DDX_Control(pDX, IDC_EDITOR31, m_bEditor31); + DDX_Control(pDX, IDC_EDITOR32, m_bEditor32); + DDX_Control(pDX, IDC_EDITOR33, m_bEditor33); + DDX_Control(pDX, IDC_EDITOR34, m_bEditor34); + DDX_Control(pDX, IDC_EDITOR35, m_bEditor35); + DDX_Control(pDX, IDC_EDITOR36, m_bEditor36); } *************** *** 91,110 **** BEGIN_MESSAGE_MAP(CEditorTab, CPropertyPage) //{{AFX_MSG_MAP(CEditorTab) - ON_BN_CLICKED(IDC_NAMEEDITOR, OnNameeditor) - ON_BN_CLICKED(IDC_SKILLEDITOR, OnSkilleditor) - ON_BN_CLICKED(IDC_NOTOEDITOR, OnNotoeditor) - ON_BN_CLICKED(IDC_STATRATEEDIT, OnStatrateedit) - ON_BN_CLICKED(IDC_SPELLEDITOR, OnSpelleditor) - ON_BN_CLICKED(IDC_WOPEDITOR, OnWopeditor) - ON_BN_CLICKED(IDC_OREEDIT, OnOreedit) - ON_BN_CLICKED(IDC_DEFEDIT, OnDefedit) - ON_BN_CLICKED(IDC_TRIGGEREDIT, OnTriggeredit) - ON_BN_CLICKED(IDC_NEWBIEEDIT, OnNewbieedit) - ON_BN_CLICKED(IDC_ACCOUNTEDIT, OnAccountedit) - ON_BN_CLICKED(IDC_RAWEDIT, OnRawedit) ON_WM_SHOWWINDOW() ! ON_BN_CLICKED(IDC_POTIONEDIT, OnPotionedit) ! ON_BN_CLICKED(IDC_SKILLMENUEDIT, OnSkillmenuedit) ! ON_BN_CLICKED(IDC_ITEMEDIT, OnItemedit) //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 98,138 ---- BEGIN_MESSAGE_MAP(CEditorTab, CPropertyPage) //{{AFX_MSG_MAP(CEditorTab) ON_WM_SHOWWINDOW() ! ON_BN_CLICKED(IDC_EDITOR1, OnEditor1) ! ON_BN_CLICKED(IDC_EDITOR2, OnEditor2) ! ON_BN_CLICKED(IDC_EDITOR3, OnEditor3) ! ON_BN_CLICKED(IDC_EDITOR4, OnEditor4) ! ON_BN_CLICKED(IDC_EDITOR5, OnEditor5) ! ON_BN_CLICKED(IDC_EDITOR6, OnEditor6) ! ON_BN_CLICKED(IDC_EDITOR7, OnEditor7) ! ON_BN_CLICKED(IDC_EDITOR8, OnEditor8) ! ON_BN_CLICKED(IDC_EDITOR9, OnEditor9) ! ON_BN_CLICKED(IDC_EDITOR10, OnEditor10) ! ON_BN_CLICKED(IDC_EDITOR11, OnEditor11) ! ON_BN_CLICKED(IDC_EDITOR12, OnEditor12) ! ON_BN_CLICKED(IDC_EDITOR13, OnEditor13) ! ON_BN_CLICKED(IDC_EDITOR14, OnEditor14) ! ON_BN_CLICKED(IDC_EDITOR15, OnEditor15) ! ON_BN_CLICKED(IDC_EDITOR16, OnEditor16) ! ON_BN_CLICKED(IDC_EDITOR17, OnEditor17) ! ON_BN_CLICKED(IDC_EDITOR18, OnEditor18) ! ON_BN_CLICKED(IDC_EDITOR19, OnEditor19) ! ON_BN_CLICKED(IDC_EDITOR20, OnEditor20) ! ON_BN_CLICKED(IDC_EDITOR21, OnEditor21) ! ON_BN_CLICKED(IDC_EDITOR22, OnEditor22) ! ON_BN_CLICKED(IDC_EDITOR23, OnEditor23) ! ON_BN_CLICKED(IDC_EDITOR24, OnEditor24) ! ON_BN_CLICKED(IDC_EDITOR25, OnEditor25) ! ON_BN_CLICKED(IDC_EDITOR26, OnEditor26) ! ON_BN_CLICKED(IDC_EDITOR27, OnEditor27) ! ON_BN_CLICKED(IDC_EDITOR28, OnEditor28) ! ON_BN_CLICKED(IDC_EDITOR29, OnEditor29) ! ON_BN_CLICKED(IDC_EDITOR30, OnEditor30) ! ON_BN_CLICKED(IDC_EDITOR31, OnEditor31) ! ON_BN_CLICKED(IDC_EDITOR32, OnEditor32) ! ON_BN_CLICKED(IDC_EDITOR33, OnEditor33) ! ON_BN_CLICKED(IDC_EDITOR34, OnEditor34) ! ON_BN_CLICKED(IDC_EDITOR35, OnEditor35) ! ON_BN_CLICKED(IDC_EDITOR36, OnEditor36) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 113,248 **** // CEditorTab message handlers ! void CEditorTab::OnNameeditor() { ! CNameEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnSkilleditor() { ! CSkillTableEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnNotoeditor() { ! CNotoTitleEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnStatrateedit() { ! CStatRateEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnSpelleditor() { ! CSpellEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnWopeditor() { ! CWOPEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnOreedit() { ! COreEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnDefedit() { ! CDefEditDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnTriggeredit() { ! //AxisMessageBox(_T("The Trigger Editor is not yet functional"), MB_OK | MB_ICONINFORMATION); ! //CTriggerEditDlg dlg; ! //dlg.m_bSingleMode = false; ! //dlg.DoModal(); } ! void CEditorTab::OnNewbieedit() { ! //AxisMessageBox(_T("The newbie editor has not yet been implemented."), MB_OK | MB_ICONINFORMATION); } ! void CEditorTab::OnAccountedit() { ! CAccountDlg dlg; ! dlg.DoModal(); } ! void CEditorTab::OnRawedit() { ! CScriptEditDlg seDlg; ! seDlg.DoModal(); ! return; } ! void CEditorTab::OnShowWindow(BOOL bShow, UINT nStatus) { ! CPropertyPage::OnShowWindow(bShow, nStatus); ! ! //this->m_cbRawEdit.ShowWindow( Main->GetProfileType() == PROFILE_REMOTE ? SW_HIDE : SW_SHOW ); } ! void CEditorTab::OnPotionedit() { ! // AxisMessageBox(_T("The Potion Editor is obsolete"), MB_OK | MB_ICONINFORMATION); ! //CPotionEdit dlg; ! //dlg.DoModal(); ! return; } ! void CEditorTab::OnSkillmenuedit() { ! CSkillMenuEditDlg dlg; ! dlg.DoModal(); ! return; } ! void CEditorTab::OnItemedit() { ! CItemScriptEditDlg dlg; ! dlg.DoModal(); ! return; } ! void CEditorTab::Localize(void) { ! locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_RAWEDIT, (CWnd*)&m_cbRawEdit, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_NAMEEDITOR, (CWnd*)&m_bNames, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_SKILLEDITOR, (CWnd*)&m_bSkills, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_SPELLEDITOR, (CWnd*)&m_bSpells, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_WOPEDITOR, (CWnd*)&m_bWOP, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_NOTOEDITOR, (CWnd*)&m_bNoto, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_STATRATEEDIT, (CWnd*)&m_bStatRates, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_OREEDIT, (CWnd*)&m_bOres, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_DEFEDIT, (CWnd*)&m_bDefs, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_TRIGGEREDIT, (CWnd*)&m_bTriggers, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_NEWBIEEDIT, (CWnd*)&m_bNewbies, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_ACCOUNTEDIT, (CWnd*)&m_bAccounts, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_POTIONEDIT, (CWnd*)&m_bPotions, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_SKILLMENUEDIT, (CWnd*)&m_bSkillMenus, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_ITEMEDIT, (CWnd*)&m_bItems, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_RAWEDIT, (CWnd*)&m_bRawEditor, (CWnd*)this); } ! BOOL CEditorTab::OnInitDialog() { ! CWaitCursor hourglass; ! CPropertyPage::OnInitDialog(); ! ! Localize(); ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE } --- 141,398 ---- // CEditorTab message handlers ! ! void CEditorTab::OnShowWindow(BOOL bShow, UINT nStatus) { ! CPropertyPage::OnShowWindow(bShow, nStatus); } ! void CEditorTab::Localize(void) { ! locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); ! locale->LocalizeWindow(IDD, IDC_NOEDITORS, (CWnd*)&m_sNoEditors, (CWnd*)this); } ! BOOL CEditorTab::OnInitDialog() { ! CWaitCursor hourglass; ! CPropertyPage::OnInitDialog(); ! ! Localize(); ! AssignButtons(); ! ! int count = Main->m_pScriptsA->GetEditorCount(); ! if ( count ) ! { ! m_sNoEditors.ShowWindow(SW_HIDE); ! for ( int i = 0; i < count; i++ ) ! { ! CButton * pButton = (CButton *) m_buttons.GetAt(i); ! pButton->SetWindowText(Main->m_pScriptsA->GetEditorDescription(i)); ! pButton->ShowWindow(SW_SHOW); ! } ! } ! ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE } ! void CEditorTab::AssignButtons() { ! m_buttons.Add(&m_bEditor1); ! m_buttons.Add(&m_bEditor2); ! m_buttons.Add(&m_bEditor3); ! m_buttons.Add(&m_bEditor4); ! m_buttons.Add(&m_bEditor5); ! m_buttons.Add(&m_bEditor6); ! m_buttons.Add(&m_bEditor7); ! m_buttons.Add(&m_bEditor8); ! m_buttons.Add(&m_bEditor9); ! m_buttons.Add(&m_bEditor10); ! m_buttons.Add(&m_bEditor11); ! m_buttons.Add(&m_bEditor12); ! m_buttons.Add(&m_bEditor13); ! m_buttons.Add(&m_bEditor14); ! m_buttons.Add(&m_bEditor15); ! m_buttons.Add(&m_bEditor16); ! m_buttons.Add(&m_bEditor17); ! m_buttons.Add(&m_bEditor18); ! m_buttons.Add(&m_bEditor19); ! m_buttons.Add(&m_bEditor20); ! m_buttons.Add(&m_bEditor21); ! m_buttons.Add(&m_bEditor22); ! m_buttons.Add(&m_bEditor23); ! m_buttons.Add(&m_bEditor24); ! m_buttons.Add(&m_bEditor25); ! m_buttons.Add(&m_bEditor26); ! m_buttons.Add(&m_bEditor27); ! m_buttons.Add(&m_bEditor28); ! m_buttons.Add(&m_bEditor29); ! m_buttons.Add(&m_bEditor30); ! m_buttons.Add(&m_bEditor31); ! m_buttons.Add(&m_bEditor32); ! m_buttons.Add(&m_bEditor33); ! m_buttons.Add(&m_bEditor34); ! m_buttons.Add(&m_bEditor35); ! m_buttons.Add(&m_bEditor36); } ! void CEditorTab::OnEditor1() { ! Main->m_pScriptsA->InvokeEditor(1); } ! void CEditorTab::OnEditor2() { ! Main->m_pScriptsA->InvokeEditor(2); } ! void CEditorTab::OnEditor3() { ! Main->m_pScriptsA->InvokeEditor(3); } ! void CEditorTab::OnEditor4() { ! Main->m_pScriptsA->InvokeEditor(4); } ! void CEditorTab::OnEditor5() { ! Main->m_pScriptsA->InvokeEditor(5); } ! void CEditorTab::OnEditor6() { ! Main->m_pScriptsA->InvokeEditor(6); } ! void CEditorTab::OnEditor7() { ! Main->m_pScriptsA->InvokeEditor(7); } ! void CEditorTab::OnEditor8() { ! Main->m_pScriptsA->InvokeEditor(8); } ! void CEditorTab::OnEditor9() { ! Main->m_pScriptsA->InvokeEditor(9); } ! void CEditorTab::OnEditor10() { ! Main->m_pScriptsA->InvokeEditor(10); } ! void CEditorTab::OnEditor11() { ! Main->m_pScriptsA->InvokeEditor(11); } ! void CEditorTab::OnEditor12() { ! Main->m_pScriptsA->InvokeEditor(12); } ! void CEditorTab::OnEditor13() { ! Main->m_pScriptsA->InvokeEditor(13); } ! void CEditorTab::OnEditor14() { ! Main->m_pScriptsA->InvokeEditor(14); ! } ! void CEditorTab::OnEditor15() ! { ! Main->m_pScriptsA->InvokeEditor(15); ! } ! ! void CEditorTab::OnEditor16() ! { ! Main->m_pScriptsA->InvokeEditor(16); ! } ! ! void CEditorTab::OnEditor17() ! { ! Main->m_pScriptsA->InvokeEditor(17); ! } ! ! void CEditorTab::OnEditor18() ! { ! Main->m_pScriptsA->InvokeEditor(18); ! } ! ! void CEditorTab::OnEditor19() ! { ! Main->m_pScriptsA->InvokeEditor(19); ! } ! ! void CEditorTab::OnEditor20() ! { ! Main->m_pScriptsA->InvokeEditor(20); ! } ! ! void CEditorTab::OnEditor21() ! { ! Main->m_pScriptsA->InvokeEditor(21); } + + void CEditorTab::OnEditor22() + { + Main->m_pScriptsA->InvokeEditor(22); + } + + void CEditorTab::OnEditor23() + { + Main->m_pScriptsA->InvokeEditor(23); + } + + void CEditorTab::OnEditor24() + { + Main->m_pScriptsA->InvokeEditor(24); + } + + void CEditorTab::OnEditor25() + { + Main->m_pScriptsA->InvokeEditor(25); + } + + void CEditorTab::OnEditor26() + { + Main->m_pScriptsA->InvokeEditor(26); + } + + void CEditorTab::OnEditor27() + { + Main->m_pScriptsA->InvokeEditor(27); + } + + void CEditorTab::OnEditor28() + { + Main->m_pScriptsA->InvokeEditor(28); + } + + void CEditorTab::OnEditor29() + { + Main->m_pScriptsA->InvokeEditor(29); + } + + void CEditorTab::OnEditor30() + { + Main->m_pScriptsA->InvokeEditor(30); + } + + void CEditorTab::OnEditor31() + { + Main->m_pScriptsA->InvokeEditor(31); + } + + void CEditorTab::OnEditor32() + { + Main->m_pScriptsA->InvokeEditor(32); + } + + void CEditorTab::OnEditor33() + { + Main->m_pScriptsA->InvokeEditor(33); + } + + void CEditorTab::OnEditor34() + { + Main->m_pScriptsA->InvokeEditor(34); + } + + void CEditorTab::OnEditor35() + { + Main->m_pScriptsA->InvokeEditor(35); + } + + void CEditorTab::OnEditor36() + { + Main->m_pScriptsA->InvokeEditor(36); + } + Index: EditorTab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/EditorTab.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** EditorTab.h 23 May 2003 05:30:37 -0000 1.4 --- EditorTab.h 3 Jun 2003 16:43:12 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- */ + #include "afxwin.h" #if !defined(AFX_EDITORTAB_H__1015F311_2272_11D3_8721_00805FD91B8C__INCLUDED_) #define AFX_EDITORTAB_H__1015F311_2272_11D3_8721_00805FD91B8C__INCLUDED_ *************** *** 46,65 **** //{{AFX_DATA(CEditorTab) enum { IDD = IDD_EDITORTAB }; ! CButton m_cbRawEdit; ! CButton m_bNames; ! CButton m_bSkills; ! CButton m_bSpells; ! CButton m_bWOP; ! CButton m_bNoto; ! CButton m_bStatRates; ! CButton m_bOres; ! CButton m_bDefs; ! CButton m_bTriggers; ! CButton m_bNewbies; ! CButton m_bAccounts; ! CButton m_bPotions; ! CButton m_bSkillMenus; ! CButton m_bItems; ! CButton m_bRawEditor; //}}AFX_DATA --- 47,51 ---- //{{AFX_DATA(CEditorTab) enum { IDD = IDD_EDITORTAB }; ! //}}AFX_DATA *************** *** 76,101 **** // Generated message map functions //{{AFX_MSG(CEditorTab) - afx_msg void OnNameeditor(); - afx_msg void OnSkilleditor(); - afx_msg void OnNotoeditor(); - afx_msg void OnStatrateedit(); - afx_msg void OnSpelleditor(); - afx_msg void OnWopeditor(); - afx_msg void OnOreedit(); - afx_msg void OnDefedit(); - afx_msg void OnTriggeredit(); - afx_msg void OnNewbieedit(); - afx_msg void OnAccountedit(); - afx_msg void OnRawedit(); afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); ! afx_msg void OnPotionedit(); ! afx_msg void OnSkillmenuedit(); ! afx_msg void OnItemedit(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: void Localize(void); virtual BOOL OnInitDialog(); }; --- 62,150 ---- // Generated message map functions //{{AFX_MSG(CEditorTab) afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); ! afx_msg void OnEditor1(); ! afx_msg void OnEditor2(); ! afx_msg void OnEditor3(); ! afx_msg void OnEditor4(); ! afx_msg void OnEditor5(); ! afx_msg void OnEditor6(); ! afx_msg void OnEditor7(); ! afx_msg void OnEditor8(); ! afx_msg void OnEditor9(); ! afx_msg void OnEditor10(); ! afx_msg void OnEditor11(); ! afx_msg void OnEditor12(); ! afx_msg void OnEditor13(); ! afx_msg void OnEditor14(); ! afx_msg void OnEditor15(); ! afx_msg void OnEditor16(); ! afx_msg void OnEditor17(); ! afx_msg void OnEditor18(); ! afx_msg void OnEditor19(); ! afx_msg void OnEditor20(); ! afx_msg void OnEditor21(); ! afx_msg void OnEditor22(); ! afx_msg void OnEditor23(); ! afx_msg void OnEditor24(); ! afx_msg void OnEditor25(); ! afx_msg void OnEditor26(); ! afx_msg void OnEditor27(); ! afx_msg void OnEditor28(); ! afx_msg void OnEditor29(); ! afx_msg void OnEditor30(); ! afx_msg void OnEditor31(); ! afx_msg void OnEditor32(); ! afx_msg void OnEditor33(); ! afx_msg void OnEditor34(); ! afx_msg void OnEditor35(); ! afx_msg void OnEditor36(); //}}AFX_MSG DECLARE_MESSAGE_MAP() + CStatic m_sNoEditors; + CButton m_bEditor1; + CButton m_bEditor2; + CButton m_bEditor3; + CButton m_bEditor4; + CButton m_bEditor5; + CButton m_bEditor6; + CButton m_bEditor7; + CButton m_bEditor8; + CButton m_bEditor9; + CButton m_bEditor10; + CButton m_bEditor11; + CButton m_bEditor12; + CButton m_bEditor13; + CButton m_bEditor14; + CButton m_bEditor15; + CButton m_bEditor16; + CButton m_bEditor17; + CButton m_bEditor18; + CButton m_bEditor19; + CButton m_bEditor20; + CButton m_bEditor21; + CButton m_bEditor22; + CButton m_bEditor23; + CButton m_bEditor24; + CButton m_bEditor25; + CButton m_bEditor26; + CButton m_bEditor27; + CButton m_bEditor28; + CButton m_bEditor29; + CButton m_bEditor30; + CButton m_bEditor31; + CButton m_bEditor32; + CButton m_bEditor33; + CButton m_bEditor34; + CButton m_bEditor35; + CButton m_bEditor36; + + CObArray m_buttons; + void AssignButtons(); + public: void Localize(void); virtual BOOL OnInitDialog(); + }; Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** resource.h 23 May 2003 05:30:40 -0000 1.50 --- resource.h 3 Jun 2003 16:43:12 -0000 1.51 *************** *** 725,728 **** --- 725,729 ---- #define IDC_EXPORTHUES 1001 #define IDC_SETMORE 1001 + #define IDC_EDITOR1 1001 #define IDC_BUTTON6 1002 #define IDC_SETHEARALL 1002 *************** *** 834,837 **** --- 835,839 ---- #define IDC_ITEM_CANCEL 1007 #define IDC_RC_PAUSE 1007 + #define IDC_EDITOR2 1007 #define IDC_BUTTON7 1008 #define IDC_UNDERWEAR 1008 *************** *** 845,848 **** --- 847,851 ---- #define IDC_NPCPALETTE 1008 #define IDC_RC_SECURE 1008 + #define IDC_EDITOR3 1008 #define IDC_BUTTON9 1009 #define IDC_SERVERINFO 1009 *************** *** 855,858 **** --- 858,862 ---- #define IDC_NPCADDSUBSECTION 1009 #define IDC_RC_GARBAGE 1009 + #define IDC_EDITOR4 1009 #define IDC_BUTTON10 1010 #define IDC_ITEMINFO 1010 *************** *** 862,865 **** --- 866,870 ---- #define IDC_CUSTOM_CMD_10 1010 #define IDC_RC_INFORMATION 1010 + #define IDC_EDITOR5 1010 #define IDC_BUTTON11 1011 #define IDC_ADMIN 1011 *************** *** 867,870 **** --- 872,876 ---- #define IDC_CUSTOM_CMD_11 1011 #define IDC_RC_CLIENT 1011 + #define IDC_EDITOR6 1011 #define IDC_BUTTON12 1012 #define IDC_CLOCK 1012 *************** *** 875,878 **** --- 881,885 ---- #define IDC_CUSTOM_CMD_12 1012 #define IDC_RC_SAVE 1012 + #define IDC_EDITOR7 1012 #define IDC_BUTTON13 1013 #define IDC_TRIGGEREDIT 1013 *************** *** 881,884 **** --- 888,892 ---- #define IDC_STARTTUS 1013 #define IDC_RC_SHUTDOWN 1013 + #define IDC_EDITOR8 1013 #define IDC_BUTTON14 1014 #define IDC_LINK 1014 *************** *** 887,890 **** --- 895,899 ---- #define IDC_RC_PROFILE 1014 #define IDC_EXPORTCATS 1014 + #define IDC_EDITOR9 1014 #define IDC_BUTTON15 1015 #define IDC_DUPE 1015 *************** *** 893,896 **** --- 902,906 ---- #define IDC_RC_ACCOUNT 1015 #define IDC_UNDERWEAR2 1015 + #define IDC_EDITOR10 1015 #define IDC_ROOFING 1016 #define IDC_BUTTON16 1016 *************** *** 898,901 **** --- 908,912 ---- #define IDC_CUSTOM_CMD_16 1016 #define IDC_RAWEDIT 1016 + #define IDC_EDITOR11 1016 #define IDC_BUTTON17 1017 #define IDC_CUSTOM_CMD_17 1017 *************** *** 904,907 **** --- 915,919 ---- #define IDC_GOUID 1017 #define IDC_DOGOCMD 1017 + #define IDC_EDITOR12 1017 #define IDC_BUTTON18 1018 #define IDC_SHRINK 1018 *************** *** 909,929 **** --- 921,947 ---- #define IDC_SKILLMENUEDIT 1018 #define IDC_GOCLI 1018 + #define IDC_EDITOR13 1018 #define IDC_BUTTON19 1019 #define IDC_CUSTOM_CMD_19 1019 #define IDC_SPAWNGROUPEDIT 1019 #define IDC_NUKECMD 1019 + #define IDC_EDITOR14 1019 #define IDC_BUTTON20 1020 #define IDC_SETDEBUG 1020 #define IDC_CUSTOM_CMD_20 1020 #define IDC_NPCEDIT 1020 + #define IDC_EDITOR15 1020 #define IDC_BUTTON21 1021 #define IDC_SAVE 1021 #define IDC_CUSTOM_CMD_21 1021 #define IDC_ITEMEDIT 1021 + #define IDC_EDITOR16 1021 #define IDC_SLIDER1 1022 #define IDC_CUSTOM_CMD_22 1022 + #define IDC_EDITOR17 1022 #define IDC_BUTTON22 1023 #define IDC_RESTOCK 1023 #define IDC_CUSTOM_CMD_23 1023 + #define IDC_EDITOR18 1023 #define IDC_BUTTON23 1024 #define IDC_RESTOCKALL 1024 *************** *** 947,950 **** --- 965,969 ---- #define IDC_PAGEON 1030 #define IDC_CUSTOM_CMD_30 1030 + #define IDC_EDITOR19 1030 #define IDC_BUTTON30 1031 #define IDC_LIST1 1031 *************** *** 980,983 **** --- 999,1003 ---- #define IDC_AS_CUSTOMMULS 1031 #define IDC_REGION_LIST 1031 + #define IDC_EDITOR20 1031 #define IDC_BUTTON31 1032 #define IDC_LIST2 1032 *************** *** 999,1002 **** --- 1019,1023 ---- #define IDC_AS_PROFILES 1032 #define IDC_COMMANDS 1032 + #define IDC_EDITOR21 1032 #define IDC_BUTTON32 1033 #define IDC_LIST3 1033 *************** *** 1025,1028 **** --- 1046,1050 ---- #define IDC_REMOTESPAWNS 1033 #define IDC_UP 1033 + #define IDC_EDITOR22 1033 #define IDC_BUTTON33 1034 #define IDC_CHECK2 1034 *************** *** 1037,1040 **** --- 1059,1063 ---- #define IDC_CUSTOM_CMD_34 1034 #define IDC_TENT 1034 + #define IDC_EDITOR23 1034 #define IDC_BUTTON34 1035 #define IDC_CHECK3 1035 *************** *** 1050,1053 **** --- 1073,1077 ---- #define IDC_NOSCRIPT 1035 #define IDC_OWNERPRIVS 1035 + #define IDC_EDITOR24 1035 #define IDC_BUTTON35 1036 #define IDC_CHECK4 1036 *************** *** 1059,1062 **** --- 1083,1087 ---- #define IDC_CUSTOM_CMD_36 1036 #define IDC_AS_SCALE 1036 + #define IDC_EDITOR25 1036 #define IDC_BUTTON36 1037 #define IDC_CHECK5 1037 *************** *** 1066,1069 **** --- 1091,1095 ---- #define IDC_MONSTERFIGHT 1037 #define IDC_AS_ONTOP 1037 + #define IDC_EDITOR26 1037 #define IDC_BUTTON37 1038 #define IDC_CHECK6 1038 *************** *** 1075,1078 **** --- 1101,1105 ---- #define IDC_ADD_CMD 1038 #define IDC_AS_3DROOMVIEW 1038 + #define IDC_EDITOR27 1038 #define IDC_BUTTON38 1039 #define IDC_CHECK7 1039 *************** *** 1086,1089 **** --- 1113,1117 ---- #define IDC_AS_RADAR 1039 #define IDC_TRANSLUCENT 1039 + #define IDC_EDITOR28 1039 #define IDC_BUTTON39 1040 #define IDC_CHECK8 1040 *************** *** 1096,1099 **** --- 1124,1128 ---- #define IDC_AS_SYSCLOSE 1040 #define IDC_AUTOLOADPROFILE 1040 + #define IDC_EDITOR29 1040 #define IDC_BUTTON40 1041 #define IDC_CHECK9 1041 *************** *** 1104,1107 **** --- 1133,1137 ---- #define IDC_SAVEACCOUNTSTATS 1041 #define IDC_AS_SHOWSPAWNS 1041 + #define IDC_EDITOR30 1041 #define IDC_BUTTON41 1042 #define IDC_CHECK10 1042 *************** *** 1141,1144 **** --- 1171,1175 ---- #define IDC_STARTSECURE 1046 #define IDC_REGIONTRIGGERS 1046 + #define IDC_EDITOR31 1046 #define IDC_BUTTON46 1047 #define IDC_CHECK15 1047 *************** *** 1148,1151 **** --- 1179,1183 ---- #define IDC_ALLOWMULTIPLE 1047 #define IDC_INSTALOGOUT 1047 + #define IDC_EDITOR32 1047 #define IDC_BUTTON47 1048 #define IDC_CHECK16 1048 *************** *** 1155,1158 **** --- 1187,1191 ---- #define IDC_ANNOUNCEON 1048 #define IDC_EMOTE 1048 + #define IDC_EDITOR33 1048 #define IDC_CHECK17 1049 #define IDC_GMTOGGLE 1049 *************** *** 1160,1163 **** --- 1193,1197 ---- #define IDC_REGIONTRIGGERS2 1049 #define IDC_COMMCRYSTAL 1049 + #define IDC_EDITOR34 1049 #define IDC_CHECK18 1050 #define IDC_PUNISHED 1050 *************** *** 1165,1171 **** --- 1199,1207 ---- #define IDC_XRESTOCK 1050 #define IDC_SCRIPT_PLAY 1050 + #define IDC_EDITOR35 1050 #define IDC_CHECK19 1051 #define IDC_DRUNK 1051 #define IDC_GARBAGECOLLECTION 1051 + #define IDC_EDITOR36 1051 #define IDC_CHECK20 1052 #define IDC_HALLUCINATING 1052 *************** *** 2329,2332 **** --- 2365,2369 ---- #define IDC_LANGUAGES 1793 #define IDC_SAVEACCTPWD 1794 + #define IDC_NOEDITORS 1795 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 2365,2369 **** #define _APS_NEXT_RESOURCE_VALUE 686 #define _APS_NEXT_COMMAND_VALUE 32811 ! #define _APS_NEXT_CONTROL_VALUE 1795 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 2402,2406 ---- #define _APS_NEXT_RESOURCE_VALUE 686 #define _APS_NEXT_COMMAND_VALUE 32811 ! #define _APS_NEXT_CONTROL_VALUE 1796 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: StaticToolDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/StaticToolDlg.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** StaticToolDlg.cpp 23 May 2003 05:30:40 -0000 1.35 --- StaticToolDlg.cpp 3 Jun 2003 16:43:12 -0000 1.36 *************** *** 1038,1090 **** void CStaticToolDlg::LoadWorldfile() { ! CString csTemp; ! CStdioFile csfWorld; ! CleanupWorldItems(); ! if ( !csfWorld.Open(m_csWorldFile, CFile::modeRead | CFile::shareDenyNone) ) { ! csTemp.Format(locale->String(IDS_STATICTOOL_CANTOPENWORLDFILE), m_csWorldFile, strerror(GetLastError())); ! AxisMessageBox(csTemp, MB_OK); ! return; ! } ! CFileReadProgress progress; ! progress.Create(IDD_FILEREAD_PROGRESS); ! progress.SetWindowText(locale->String(IDS_STATICTOOL_LW)); ! progress.SetRange32(0, (DWORD) csfWorld.GetLength()); ! progress.SetPos(0); ! csTemp.Format(locale->String(IDS_STATICTOOL_LW2), m_csWorldFile); ! progress.m_csMessage.SetWindowText(csTemp); ! int i = 0; ! ! BOOL bStatus = TRUE; ! while ( bStatus ) ! { ! CString csLine; ! DWORD dwOffset = (DWORD)csfWorld.GetPosition(); ! bStatus = csfWorld.ReadString(csLine); ! if ( !bStatus ) ! break; ! if ( i++ % 50 == 0 ) ! { ! progress.SetPos((DWORD) csfWorld.GetPosition()); ! } ! if ( csLine.Find(_T("[WORLDITEM")) != -1 ) { CWorldItem * pItem = new CWorldItem; ! pItem->m_csBaseID = csLine.Mid(11).SpanExcluding(_T("]")); ! pItem->m_csFilename = csfWorld.GetFilePath(); ! pItem->m_dwFileOffset = dwOffset; ! pItem->m_csValue = pItem->m_csBaseID; ! pItem->m_bType = TYPE_WORLDITEM; ! if ( !pItem->Read(csfWorld) ) ! { ! delete pItem; ! } else ! { ! if ( m_pWorldItemList.IsEmpty() ) ! m_pWorldItemList.AddHead((CObject *) pItem); ! else ! m_pWorldItemList.AddTail((CObject *) pItem); ! } } } --- 1038,1060 ---- void CStaticToolDlg::LoadWorldfile() { ! if ( Main->m_pScriptsA->ReloadWorldItemFile(m_csWorldFile) == 0 ) { ! // Populate the list with the information from the script module ! for ( int i = 0; i < Main->m_pScriptsA->GetWorldItemCount(); i++ ) { CWorldItem * pItem = new CWorldItem; ! pItem->m_csBaseID = Main->m_pScriptsA->GetWorldItemDispID(i); ! pItem->m_dwFileOffset = i; // Use the offset value to store the index from the scripts module. ! pItem->m_bStaticFlag = false; ! pItem->m_csName = Main->m_pScriptsA->GetWorldItemName(i); ! pItem->m_dwAttr = Main->m_pScriptsA->GetWorldItemAttributes(i); ! pItem->m_dwItemType = Main->m_pScriptsA->GetWorldItemType(i); ! pItem->m_dwSerial = Main->m_pScriptsA->GetWorldItemUID(i); ! pItem->m_wColor = Main->m_pScriptsA->EvaluateDef(Main->m_pScriptsA->GetWorldItemColor(i)); ! // Get the coords as well ! if ( m_pWorldItemList.IsEmpty() ) ! m_pWorldItemList.AddHead((CObject *) pItem); else ! m_pWorldItemList.AddTail((CObject *) pItem); } } *************** *** 1092,1096 **** this->SetWindowText(csTemp); csfWorld.Close(); - } --- 1062,1065 ---- Index: version.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/version.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** version.h 23 May 2003 05:30:38 -0000 1.2 --- version.h 3 Jun 2003 16:43:12 -0000 1.3 *************** *** 25,28 **** // in the resources, of which there are now many, it's much easier to keep it in a single file. ! #define AXIS_VERSION _T("0.14 pre-release 3") ! #define AXIS_VERSION_INTERNAL 0x0013FF03 --- 25,28 ---- // in the resources, of which there are now many, it's much easier to keep it in a single file. ! #define AXIS_VERSION _T("0.14 pre-release 4") ! #define AXIS_VERSION_INTERNAL 0x0013FF04 |
From: Philip E. <pes...@us...> - 2003-06-03 16:18:01
|
Update of /cvsroot/sphere-axis/UOMap In directory sc8-pr-cvs1:/tmp/cvs-serv10670 Modified Files: Tag: v1_3-Stable UOMap.rc UOMapCtl.cpp Log Message: Fixed bug in GetMapHeight() reported by Arya. Updated to v1.3.2. Index: UOMap.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMap.rc,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -C2 -r1.15.2.1 -r1.15.2.2 *** UOMap.rc 29 May 2003 21:35:47 -0000 1.15.2.1 --- UOMap.rc 3 Jun 2003 16:17:55 -0000 1.15.2.2 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,1,0 ! PRODUCTVERSION 1,3,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,2,0 ! PRODUCTVERSION 1,3,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 71,80 **** BEGIN VALUE "FileDescription", "UOMap ActiveX Control Module" ! VALUE "FileVersion", "1, 3, 0, 0" VALUE "InternalName", "UOMap" VALUE "LegalCopyright", "Copyright (C) 2000-2003" VALUE "OriginalFilename", "UOMap.OCX" VALUE "ProductName", "UOMap ActiveX Control Module" ! VALUE "ProductVersion", "1, 3, 0, 0" END END --- 71,80 ---- BEGIN VALUE "FileDescription", "UOMap ActiveX Control Module" ! VALUE "FileVersion", "1, 3, 2, 0" VALUE "InternalName", "UOMap" VALUE "LegalCopyright", "Copyright (C) 2000-2003" VALUE "OriginalFilename", "UOMap.OCX" VALUE "ProductName", "UOMap ActiveX Control Module" ! VALUE "ProductVersion", "1, 3, 2, 0" END END Index: UOMapCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapCtl.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -r1.13.2.1 -r1.13.2.2 *** UOMapCtl.cpp 29 May 2003 21:35:47 -0000 1.13.2.1 --- UOMapCtl.cpp 3 Jun 2003 16:17:56 -0000 1.13.2.2 *************** *** 1544,1551 **** DWORD dwIndex = FindPatch(*pArray, (DWORD) BlockNumber); - CFile fMap; - CString csMapFile; - MapBlock block; - if ( dwIndex == 0xFFFFFFFF ) { --- 1544,1547 ---- *************** *** 1565,1569 **** dwIndex = BlockNumber; } ! if ( !fMap.Open(csMapFile, CFile::modeRead | CFile::typeBinary | CFile::shareDenyNone) ) return 0; fMap.Seek(dwIndex * sizeof(MapBlock), CFile::begin); --- 1561,1569 ---- dwIndex = BlockNumber; } ! ! CFile fMap; ! MapBlock block; ! ! if ( !fMap.Open(sFile, CFile::modeRead | CFile::typeBinary | CFile::shareDenyNone) ) return 0; fMap.Seek(dwIndex * sizeof(MapBlock), CFile::begin); |
From: Philip E. <pes...@us...> - 2003-06-03 03:39:01
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv23223 Modified Files: Tag: v0_13-Stable gwhogsvr.cpp gwhogsvr.h Log Message: Removed password sensitivity from PLEVEL and PASSWORD account strings. Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -C2 -r1.27 -r1.27.2.1 *** gwhogsvr.cpp 10 Dec 2002 19:28:10 -0000 1.27 --- gwhogsvr.cpp 3 Jun 2003 03:38:56 -0000 1.27.2.1 *************** *** 3,7 **** ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2002 * * This program is free software; you can redistribute it and/or modify --- 3,7 ---- ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify *************** *** 44,48 **** #endif ! #define SVR_VERSION "0.13.3.2" #ifdef WIN32 #define SVR_PLATFORM "Win32" --- 44,48 ---- #endif ! #define SVR_VERSION "0.13.3.3" #ifdef WIN32 #define SVR_PLATFORM "Win32" *************** *** 1102,1113 **** char szBuffer[MAX_PATH]; char szTargetAcct[MAX_PATH]; char szTargetPassword[MAX_PATH]; sprintf(szTargetAcct, "[%s]", pszID); stoupper(&szTargetAcct[0], strlen(szTargetAcct)); ! sprintf(szTargetPassword, "PASSWORD=%s", pszPassword); // Since newer versions of Sphere store passwords in quotes, we'll need to check against this as well char szTargetPassword2[MAX_PATH]; ! sprintf(szTargetPassword2, "PASSWORD=\"%s\"", pszPassword); bool bBadPrivs = true; --- 1102,1114 ---- char szBuffer[MAX_PATH]; + char szUCBuffer[MAX_PATH]; char szTargetAcct[MAX_PATH]; char szTargetPassword[MAX_PATH]; sprintf(szTargetAcct, "[%s]", pszID); stoupper(&szTargetAcct[0], strlen(szTargetAcct)); ! sprintf(szTargetPassword, "%s", pszPassword); // Since newer versions of Sphere store passwords in quotes, we'll need to check against this as well char szTargetPassword2[MAX_PATH]; ! sprintf(szTargetPassword2, "\"%s\"", pszPassword); bool bBadPrivs = true; *************** *** 1127,1145 **** if (fReadLine(acctFile, &szBuffer[0], sizeof(szBuffer)) > 0) { // Check for either PRIVS or PASSWORD ! if (strstr(szBuffer, "PASSWORD=") != NULL) { // Compare it to the real password // Fix security bug -- William Arts (Belgar) ! if ( (strcmp(szBuffer, szTargetPassword) == 0) || (strcmp(szBuffer, szTargetPassword2) == 0 ) ) bBadPassword = false; } ! if (strstr(szBuffer, "PLEVEL=") != NULL) { char szLevel[20]; memset(&szLevel[0], 0x00, 20); memcpy(&szLevel, &szBuffer[7], 19); ! int iLevel; ! switch (FindTable(szLevel, &pszPLevels[0], 8, sizeof(char *))) { case 0: --- 1128,1150 ---- if (fReadLine(acctFile, &szBuffer[0], sizeof(szBuffer)) > 0) { + strcpy(&szUCBuffer[0], &szBuffer[0]); + stoupper(&szUCBuffer[0], strlen(szBuffer)); // Check for either PRIVS or PASSWORD ! if (strstr(szUCBuffer, "PASSWORD=") == szUCBuffer) { // Compare it to the real password // Fix security bug -- William Arts (Belgar) ! if ( (strcmp(&szBuffer[9], szTargetPassword) == 0) || (strcmp(&szBuffer[9], szTargetPassword2) == 0 ) ) bBadPassword = false; } ! if (strstr(szUCBuffer, "PLEVEL=") != NULL) { char szLevel[20]; memset(&szLevel[0], 0x00, 20); memcpy(&szLevel, &szBuffer[7], 19); ! stoupper(&szLevel[0], strlen(szLevel)); ! int iLevelTest = FindTable(szLevel, &pszPLevels[0], 8, sizeof(char *)); ! int iLevel = 0; ! switch (iLevelTest) { case 0: *************** *** 1151,1155 **** case 6: case 7: ! iLevel = FindTable(szLevel, &pszPLevels[0], 8, sizeof(char *)); break; default: --- 1156,1160 ---- case 6: case 7: ! iLevel = iLevelTest; break; default: Index: gwhogsvr.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.h,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -C2 -r1.7 -r1.7.4.1 *** gwhogsvr.h 26 Jul 2002 20:36:33 -0000 1.7 --- gwhogsvr.h 3 Jun 2003 03:38:57 -0000 1.7.4.1 *************** *** 186,197 **** const char * pszPLevels [] = { ! "Guest", ! "Player", ! "Counsel", ! "Seer", "GM", ! "Dev", ! "Admin", ! "Owner", }; --- 186,197 ---- const char * pszPLevels [] = { ! "GUEST", ! "PLAYER", ! "COUNSEL", ! "SEER", "GM", ! "DEV", ! "ADMIN", ! "OWNER", }; |
From: Philip E. <pes...@us...> - 2003-06-02 14:37:17
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv27915 Modified Files: axis_modules.xml install.bat Added Files: axis_default.xml Log Message: no message --- NEW FILE: axis_default.xml --- <?xml version="1.0" encoding="UTF-8"?> <!--Axis Configuration file--> <!--Do not edit this file unless you know what you are doing!--> <Configuration> <!--Main Settings--> <Use3DRoomView>true</Use3DRoomView> <AllowMultiple>false</AllowMultiple> <AlwaysOnTop>false</AlwaysOnTop> <AutoLoadProfile>false</AutoLoadProfile> <DrawChars>true</DrawChars> <DrawItems>true</DrawItems> <ItemSpawnColor>0x0000ff00</ItemSpawnColor> <NPCSpawnColor>0x00ff0000</NPCSpawnColor> <ScaleItems>true</ScaleItems> <ShowRadar>true</ShowRadar> <ShowSpawnpoints>true</ShowSpawnpoints> <SpawnMessage>false</SpawnMessage> <StartLauncher>false</StartLauncher> <SysClose>false</SysClose> <TranslucentWindows>false</TranslucentWindows> <Opacity>255</Opacity> <LastProfile>< NONE ></LastProfile> <WindowPosition></WindowPosition> <DefaultClient></DefaultClient> <!--Item Tab Settings--> <ItemSpawnMaxAmount>1</ItemSpawnMaxAmount> <ItemSpawnMaxTime>240</ItemSpawnMaxTime> <ItemSpawnMinTime>30</ItemSpawnMinTime> <ItemSpawnMaxDist>0</ItemSpawnMaxDist> <ItemSpawnRate>0</ItemSpawnRate> <ItemNudgeAmount>1</ItemNudgeAmount> <ItemTileZ>1</ItemTileZ> <LockDownItems>false</LockDownItems> <!--Spawn Tab Settings--> <NPCSpawnAmount>1</NPCSpawnAmount> <NPCHomedist>5</NPCHomedist> <NPCSpawnMaxDist>0</NPCSpawnMaxDist> <NPCSpawnMaxTime>20</NPCSpawnMaxTime> <NPCSpawnMinTime>0</NPCSpawnMinTime> <!--Color Preview values--> <ColorPreviewArtType>1</ColorPreviewArtType> <ColorPreviewArtIndex>0x000d</ColorPreviewArtIndex> <ColorPreviewColor>0x08fd</ColorPreviewColor> <!--Travel Tab--> <TravelTabCenterX>0x074b</TravelTabCenterX> <TravelTabCenterY>0x0a76</TravelTabCenterY> <TravelTabZoom>0</TravelTabZoom> <!--Static Tool settings--> <StaticArtExclude></StaticArtExclude> <StaticArtInclude></StaticArtInclude> <StaticTypeExclude></StaticTypeExclude> <StaticTypeInclude></StaticTypeInclude> <StaticExcludeRegionColor>0x000000aa</StaticExcludeRegionColor> <StaticIncludeRegionColor>0x0000aa00</StaticIncludeRegionColor> <StaticAttrExclude>0x0000402e</StaticAttrExclude> <StaticAttrInclude>0x00008000</StaticAttrInclude> <StaticDisplayExcludeRegions>true</StaticDisplayExcludeRegions> <StaticDisplayIncludeRegions>true</StaticDisplayIncludeRegions> <StaticPreviewDynamics>false</StaticPreviewDynamics> <StaticPreviewStatics>false</StaticPreviewStatics> <StaticPreviewTerrain>0x03a50000</StaticPreviewTerrain> <StaticToolWidth>0x03a5</StaticToolWidth> <StaticToolHeight>0x0236</StaticToolHeight> <!--String Arrays--> <Broadcasts> </Broadcasts> <!--COM Modules--> <CommandModule>CC_Sphere99t.Commands</CommandModule> <LanguagePack>axis_enu.xml</LanguagePack> <!--Custom Mulfile Paths--> <MulPath></MulPath> <Mul0></Mul0> <Mul1></Mul1> <Mul2></Mul2> <Mul3></Mul3> <Mul4></Mul4> <Mul5></Mul5> <Mul6></Mul6> <Mul7></Mul7> <Mul8></Mul8> <Mul9></Mul9> <Mul10></Mul10> <Mul11></Mul11> <Mul12></Mul12> <Mul13></Mul13> <Mul14></Mul14> <Mul15></Mul15> <Mul16></Mul16> <Mul17></Mul17> <Mul18></Mul18> <Mul19></Mul19> <Mul20></Mul20> <Mul21></Mul21> <Mul22></Mul22> <Mul23></Mul23> <Mul24></Mul24> <Mul25></Mul25> <Mul26></Mul26> <Mul27></Mul27> <Mul28></Mul28> <Mul29></Mul29> <Mul30></Mul30> <Mul31></Mul31> <Mul32></Mul32> <Mul33></Mul33> <Mul34></Mul34> <Mul35></Mul35> <Mul36></Mul36> <Mul37></Mul37> <Mul38></Mul38> <Mul39></Mul39> <Mul40></Mul40> <Mul41></Mul41> </Configuration> Index: axis_modules.xml =================================================================== RCS file: /cvsroot/sphere-axis/Axis/axis_modules.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** axis_modules.xml 23 May 2003 18:15:21 -0000 1.3 --- axis_modules.xml 2 Jun 2003 14:37:13 -0000 1.4 *************** *** 24,32 **** <Scripts> <CLSid>S_Sphere55.Scripts</CLSid> ! <Description>Sphere 0.53 - 0.99f</Description> </Scripts> <Scripts> <CLSid>S_Sphere99.Scripts</CLSid> ! <Description>Sphere 0.99g - 0.99z</Description> </Scripts> </ScriptModules> --- 24,32 ---- <Scripts> <CLSid>S_Sphere55.Scripts</CLSid> ! <Description>Sphere 0.53 - 0.55i</Description> </Scripts> <Scripts> <CLSid>S_Sphere99.Scripts</CLSid> ! <Description>Sphere 0.99 - 0.99z</Description> </Scripts> </ScriptModules> Index: install.bat =================================================================== RCS file: /cvsroot/sphere-axis/Axis/install.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** install.bat 23 May 2003 05:30:37 -0000 1.5 --- install.bat 2 Jun 2003 14:37:13 -0000 1.6 *************** *** 25,28 **** --- 25,30 ---- copy axis_modules.xml install\ copy axis_default.xml install\ + copy S_ScriptBase\%1\S_ScriptBase.dll install\ + copy S_Sphere52\%1\S_Sphere52.dll install\ |
From: Philip E. <pes...@us...> - 2003-06-02 14:37:17
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv27915/S_Sphere52 Modified Files: S_Sphere52.vcproj ScriptsMain.cpp Log Message: no message Index: S_Sphere52.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** S_Sphere52.vcproj 23 May 2003 05:46:54 -0000 1.2 --- S_Sphere52.vcproj 2 Jun 2003 14:37:13 -0000 1.3 *************** *** 90,93 **** --- 90,94 ---- Name="VCCLCompilerTool" InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\S_ScriptsBase" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB" StringPooling="TRUE" *************** *** 104,108 **** Name="VCLinkerTool" IgnoreImportLibrary="TRUE" ! AdditionalDependencies=" comsvcs.lib" OutputFile="$(OutDir)/S_Sphere52.dll" LinkIncremental="1" --- 105,109 ---- Name="VCLinkerTool" IgnoreImportLibrary="TRUE" ! AdditionalDependencies=" libxml2.lib comsvcs.lib ..\S_ScriptsBase\Release\S_ScriptsBase.lib" OutputFile="$(OutDir)/S_Sphere52.dll" LinkIncremental="1" Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** ScriptsMain.cpp 30 May 2003 20:06:14 -0000 1.6 --- ScriptsMain.cpp 2 Jun 2003 14:37:13 -0000 1.7 *************** *** 3646,3652 **** if ( index > (ULONG) m_tables.m_spells.GetUpperBound() ) return _T(""); ! CTSpellDef * pSpell = (CTSpellDef *) m_tables.m_spells.GetAt(index); ! if ( pSpell ) ! return pSpell->m_csName; return _T(""); } --- 3646,3657 ---- if ( index > (ULONG) m_tables.m_spells.GetUpperBound() ) return _T(""); ! CScriptBase * pBase = (CScriptBase*) m_tables.m_spells.GetAt(index); ! if ( pBase ) ! { ! CTSpellDef spell; ! spell.CopyBase(pBase); ! if ( spell.Load(_T("Spell")) ) ! return spell.m_csName; ! } return _T(""); } *************** *** 3802,3809 **** --- 3807,3816 ---- void CScriptsMain::AddDestination(USHORT x, USHORT y, CHAR z, BYTE m) { + return; } void CScriptsMain::DeleteDestination(ULONG index) { + return; } |
From: Philip E. <pes...@us...> - 2003-06-02 14:37:17
|
Update of /cvsroot/sphere-axis/Axis/S_ScriptsBase In directory sc8-pr-cvs1:/tmp/cvs-serv27915/S_ScriptsBase Modified Files: S_ScriptsBase.vcproj Log Message: no message Index: S_ScriptsBase.vcproj =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_ScriptsBase/S_ScriptsBase.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** S_ScriptsBase.vcproj 23 May 2003 18:11:55 -0000 1.3 --- S_ScriptsBase.vcproj 2 Jun 2003 14:37:13 -0000 1.4 *************** *** 88,91 **** --- 88,92 ---- <Tool Name="VCLinkerTool" + AdditionalDependencies="libxml2.lib comsvcs.lib" OutputFile="$(OutDir)/S_ScriptsBase.dll" LinkIncremental="1" |
From: Philip E. <pes...@us...> - 2003-05-30 20:50:38
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv28939/S_Sphere52 Modified Files: S_Sphere52.idl Scripts.cpp Scripts.h ScriptsMain.cpp ScriptsMain.h Log Message: Added Script Module support to numerous tabs/dialogs. Index: S_Sphere52.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.idl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** S_Sphere52.idl 29 May 2003 21:23:12 -0000 1.4 --- S_Sphere52.idl 30 May 2003 20:06:14 -0000 1.5 *************** *** 116,119 **** --- 116,123 ---- [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); }; [ Index: Scripts.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Scripts.cpp 29 May 2003 21:23:12 -0000 1.4 --- Scripts.cpp 30 May 2003 20:06:14 -0000 1.5 *************** *** 701,702 **** --- 701,745 ---- return S_OK; } + + STDMETHODIMP CScripts::GetMidiCount(ULONG* count) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + *count = m_pScripts->MidiCount(); + + return S_OK; + } + + STDMETHODIMP CScripts::GetMidiName(ULONG index, BSTR* name) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + *name = T2BSTR(m_pScripts->MidiName(index)); + + return S_OK; + } + + STDMETHODIMP CScripts::ExportCategories(BSTR filename) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + CString s; + #ifdef _UNICODE + s.Format(_T("%s"), filename); + #else + s.Format(_T("%S"), filename); + #endif + + m_pScripts->ExportCategories(s); + + return S_OK; + } + + STDMETHODIMP CScripts::InvokeRemoteConsole(void) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } Index: Scripts.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Scripts.h 29 May 2003 21:23:12 -0000 1.4 --- Scripts.h 30 May 2003 20:06:14 -0000 1.5 *************** *** 139,142 **** --- 139,146 ---- 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); }; Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ScriptsMain.cpp 29 May 2003 21:23:12 -0000 1.5 --- ScriptsMain.cpp 30 May 2003 20:06:14 -0000 1.6 *************** *** 3199,3203 **** CString CScriptsMain::ItemCategory(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3199,3203 ---- CString CScriptsMain::ItemCategory(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3211,3215 **** } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); --- 3211,3215 ---- } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); *************** *** 3223,3227 **** } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); --- 3223,3227 ---- } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); *************** *** 3239,3243 **** CString CScriptsMain::ItemDescription(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3239,3243 ---- CString CScriptsMain::ItemDescription(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3247,3251 **** } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); --- 3247,3251 ---- } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); *************** *** 3255,3259 **** } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); --- 3255,3259 ---- } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); *************** *** 3267,3271 **** CString CScriptsMain::ItemDispID(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3267,3271 ---- CString CScriptsMain::ItemDispID(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3280,3284 **** CString CScriptsMain::ItemColor(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3280,3284 ---- CString CScriptsMain::ItemColor(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3293,3297 **** CString CScriptsMain::ItemID(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3293,3297 ---- CString CScriptsMain::ItemID(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3301,3305 **** } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); --- 3301,3305 ---- } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); *************** *** 3309,3313 **** } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); --- 3309,3313 ---- } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); *************** *** 3327,3331 **** bool CScriptsMain::ItemDontCategorize(ULONG index) { ! if ( m_aItems.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); --- 3327,3331 ---- bool CScriptsMain::ItemDontCategorize(ULONG index) { ! if ( m_aItems.GetCount() > (int) index ) { CDisplayedScriptBase * pItem = (CDisplayedScriptBase *) m_aItems.GetAt(index); *************** *** 3335,3339 **** } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); --- 3335,3339 ---- } index -= (ULONG) m_aItems.GetCount(); ! if ( m_aTemplates.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates.GetAt(index); *************** *** 3343,3347 **** } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); --- 3343,3347 ---- } index -= (ULONG) m_aTemplates.GetCount(); ! if ( m_aTemplates2.GetCount() > (int) index ) { CCategorizedScriptBase * pTemplate = (CCategorizedScriptBase *) m_aTemplates2.GetAt(index); *************** *** 3816,3818 **** --- 3816,3833 ---- { return _T(""); + } + + ULONG CScriptsMain::MidiCount() + { + return 0; + } + + CString CScriptsMain::MidiName(ULONG index) + { + return _T(""); + } + + void CScriptsMain::ExportCategories(CString sFilename) + { + return; } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ScriptsMain.h 29 May 2003 21:23:12 -0000 1.4 --- ScriptsMain.h 30 May 2003 20:06:14 -0000 1.5 *************** *** 262,265 **** --- 262,270 ---- CString BrainDescription(ULONG index); + ULONG MidiCount(); + CString MidiName(ULONG index); + + void ExportCategories(CString sFilename); + protected: bool m_bDefsLoaded; |
From: Philip E. <pes...@us...> - 2003-05-30 20:48:33
|
Update of /cvsroot/sphere-axis/Axis/Scripts In directory sc8-pr-cvs1:/tmp/cvs-serv28939/Scripts Modified Files: Scripts.idl Sphere.cpp Sphere.h Log Message: Added Script Module support to numerous tabs/dialogs. Index: Scripts.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Scripts.idl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Scripts.idl 29 May 2003 21:22:32 -0000 1.4 --- Scripts.idl 30 May 2003 20:06:15 -0000 1.5 *************** *** 120,123 **** --- 120,127 ---- [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); }; Index: Sphere.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Sphere.cpp 29 May 2003 21:22:32 -0000 1.4 --- Sphere.cpp 30 May 2003 20:06:15 -0000 1.5 *************** *** 674,675 **** --- 674,711 ---- return S_OK; } + + STDMETHODIMP CSphere::GetMidiCount(ULONG* count) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } + + STDMETHODIMP CSphere::GetMidiName(ULONG index, BSTR* name) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } + + STDMETHODIMP CSphere::ExportCategories(BSTR filename) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } + + STDMETHODIMP CSphere::InvokeRemoteConsole(void) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } Index: Sphere.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Sphere.h 29 May 2003 21:22:32 -0000 1.4 --- Sphere.h 30 May 2003 20:06:15 -0000 1.5 *************** *** 148,151 **** --- 148,155 ---- 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); }; |
From: Philip E. <pes...@us...> - 2003-05-30 20:38:32
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv28939 Modified Files: itemgentab.cpp itemgentab.h itemtweaktab.cpp MISCTAB.CPP ScriptsWrapper.cpp ScriptsWrapper.h SPAWNTAB.CPP SpellbookTweakDlg.cpp traveltab.cpp Log Message: Added Script Module support to numerous tabs/dialogs. Index: itemgentab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** itemgentab.cpp 23 May 2003 05:30:40 -0000 1.19 --- itemgentab.cpp 30 May 2003 20:06:12 -0000 1.20 *************** *** 56,59 **** --- 56,60 ---- //}}AFX_DATA_INIT m_iCatSeq = 0; + m_pCategories = NULL; } *************** *** 323,355 **** hSelectedItem = this->m_ctcCategories.GetSelectedItem(); this->m_ctcCategories.SetItemState(hSelectedItem, TVIS_BOLD, TVIS_BOLD); - hParentItem = this->m_ctcCategories.GetParentItem(hSelectedItem); ! if (hParentItem != NULL) { ! CString csParent = this->m_ctcCategories.GetItemText(hParentItem); ! CString csSelected = this->m_ctcCategories.GetItemText(hSelectedItem); ! CCategory * pCategory = FindCategory(&Main->m_pScriptsOld->m_olItems, csParent); ! if (pCategory == NULL) ! return; ! CSubsection * pSubsection = FindSubsection(pCategory, csSelected); ! if (!pSubsection->m_ItemList.IsEmpty()) ! { ! POSITION pos = pSubsection->m_ItemList.GetHeadPosition(); ! int iCount = 0; ! while (pos != NULL) ! { ! CDisplayedScriptBase * pObject = (CDisplayedScriptBase *) pSubsection->m_ItemList.GetNext(pos); ! CItem item; ! item.CopyBase(pObject); ! item.Load(); ! this->m_clcItems.InsertItem(iCount, pObject->m_csDescription, 0); ! if ( item.m_csDef != _T("") ) ! this->m_clcItems.SetItemText(iCount, 1, item.m_csDef); ! else ! this->m_clcItems.SetItemText(iCount, 1, pObject->m_csValue); ! this->m_clcItems.SetItemData(iCount, (DWORD)pObject); ! iCount++; ! } ! } } --- 324,343 ---- hSelectedItem = this->m_ctcCategories.GetSelectedItem(); this->m_ctcCategories.SetItemState(hSelectedItem, TVIS_BOLD, TVIS_BOLD); ! CCategoryTree * pCategory =(CCategoryTree *) m_ctcCategories.GetItemData(hSelectedItem); ! ! int iCount = 0; ! for ( int i = 0; i < pCategory->EntryCount(); i++ ) { ! int iIndex = pCategory->GetEntry(i); ! if ( iIndex == -1 ) ! continue; ! CString sDescription, sID; ! sDescription = Main->m_pScriptsA->GetItemDescription(iIndex); ! sID = Main->m_pScriptsA->GetItemID(iIndex); ! m_clcItems.InsertItem(iCount, sDescription, 0); ! m_clcItems.SetItemText(iCount, 1, sID); ! m_clcItems.SetItemData(iCount, iIndex); ! iCount++; } *************** *** 362,388 **** int CALLBACK CItemGenTab::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { ! CCategorizedScriptBase * pObject1 = (CCategorizedScriptBase *) lParam1; ! CCategorizedScriptBase * pObject2 = (CCategorizedScriptBase *) lParam2; ! if ( pObject1 && pObject2 ) { ! if (lParamSort == 0) ! { ! if (iNameSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iNameSort == 1) ! return (pObject1->m_csDescription < pObject2->m_csDescription ? -1 : 1); ! if (iNameSort == -1) ! return (pObject1->m_csDescription < pObject2->m_csDescription ? 1 : -1); ! } ! else ! { ! if (iIDSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iIDSort == 1) ! return (pObject1->m_csValue < pObject2->m_csValue ? -1 : 1); ! if (iIDSort == -1) ! return (pObject1->m_csValue < pObject2->m_csValue ? 1 : -1); ! } } return 0; --- 350,378 ---- int CALLBACK CItemGenTab::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { ! CString sID1, sID2; ! CString sDesc1, sDesc2; ! sID1 = Main->m_pScriptsA->GetItemID(lParam1); ! sID2 = Main->m_pScriptsA->GetItemID(lParam2); ! sDesc1 = Main->m_pScriptsA->GetItemDescription(lParam1); ! sDesc2 = Main->m_pScriptsA->GetItemDescription(lParam2); ! ! if (lParamSort == 0) ! { ! if (iNameSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iNameSort == 1) ! return (sDesc1 < sDesc2 ? -1 : 1); ! if (iNameSort == -1) ! return (sDesc1 < sDesc2 ? 1 : -1); ! } ! else { ! if (iIDSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iIDSort == 1) ! return (sID1 < sID2 ? -1 : 1); ! if (iIDSort == -1) ! return (sID1 < sID2 ? 1 : -1); } return 0; *************** *** 450,472 **** } this->m_clcItems.SetHotItem(iSelIndex); ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) this->m_clcItems.GetItemData(iSelIndex); ! if ( pObject == NULL ) ! return; ! this->m_csItemID.SetWindowText(pObject->m_csValue); ! CDisplayedScriptBase * pItem = dynamic_cast<CDisplayedScriptBase *>(pObject); ! if ( pItem == NULL ) ! return; ! WORD wID; ! if ( ahextoi(pItem->m_csValue) < 0x4000 && ahextoi(pItem->m_csValue) != 0 ) ! wID = (WORD) ahextoi(pItem->m_csValue); ! else ! wID = (WORD) DefLookup(pItem->m_csDispID); ! { if (Main->m_config.DrawItems()) { ! WORD wColor = ( WORD ) DefLookup( pItem->m_csColor ); ! m_Display.SetArtIndex(wID); ! m_Display.SetArtColor(wColor); } } --- 440,453 ---- } this->m_clcItems.SetHotItem(iSelIndex); ! ! int index = m_clcItems.GetItemData(iSelIndex); ! CString sColor, sDispID; ! sColor = Main->m_pScriptsA->GetCharacterColor(index); ! sDispID = Main->m_pScriptsA->GetCharacterDispID(index); { if (Main->m_config.DrawItems()) { ! m_Display.SetArtIndex(ahextoi(sDispID)); ! m_Display.SetArtColor((WORD)Main->m_pScriptsA->EvaluateDef(sColor)); } } *************** *** 480,517 **** void CItemGenTab::FillCategoryTree() { - HTREEITEM CategoryParent; - HTREEITEM SubsectionParent; - TV_INSERTSTRUCT InsertItem; - m_ctcCategories.DeleteAllItems(); ! if (!Main->m_pScriptsOld->m_olItems.IsEmpty()) { ! POSITION pos = Main->m_pScriptsOld->m_olItems.GetHeadPosition(); ! while (pos != NULL) ! { ! CCategory * pCategory = (CCategory *) Main->m_pScriptsOld->m_olItems.GetNext(pos); ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR *)LPCTSTR(pCategory->m_csName); ! InsertItem.item.cchTextMax = pCategory->m_csName.GetLength(); ! InsertItem.hParent = NULL; ! InsertItem.hInsertAfter = TVI_SORT; ! CategoryParent = this->m_ctcCategories.InsertItem(&InsertItem); ! if (!pCategory->m_SubsectionList.IsEmpty()) ! { ! POSITION sPos = pCategory->m_SubsectionList.GetHeadPosition(); ! while (sPos != NULL) ! { ! CSubsection * pSubsection = (CSubsection *) pCategory->m_SubsectionList.GetNext(sPos); ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR *)LPCTSTR(pSubsection->m_csName); ! InsertItem.item.cchTextMax = pSubsection->m_csName.GetLength(); ! InsertItem.hParent = CategoryParent; ! InsertItem.hInsertAfter = TVI_SORT; ! SubsectionParent = this->m_ctcCategories.InsertItem(&InsertItem); ! } ! } ! } } - m_iCatSeq = Main->m_pScriptsOld->m_iICatSeq; } --- 461,494 ---- void CItemGenTab::FillCategoryTree() { m_ctcCategories.DeleteAllItems(); ! FillCategoryNode(m_pCategories, NULL); ! } ! ! void CItemGenTab::FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent) ! { ! if ( pCategory == NULL ) ! return; ! HTREEITEM hItem; ! if ( pCategory != m_pCategories ) { ! // Insert this guy first ! TV_INSERTSTRUCT InsertItem; ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR*)LPCTSTR(pCategory->GetName()); ! InsertItem.item.cchTextMax = pCategory->GetName().GetLength(); ! InsertItem.hParent = hParent; ! InsertItem.hInsertAfter = TVI_SORT; ! hItem = m_ctcCategories.InsertItem(&InsertItem); ! m_ctcCategories.SetItemData(hItem, (DWORD) pCategory); ! } ! else ! hItem = hParent; ! // Now insert all of its children ! for ( int i = 0; i < pCategory->ChildCount(); i++ ) ! { ! CCategoryTree * pTree = pCategory->GetChild(i); ! if ( pTree ) ! FillCategoryNode(pTree, hItem); } } *************** *** 575,582 **** --- 552,562 ---- void CItemGenTab::Unload() { + if ( m_pCategories ) + delete m_pCategories; } void CItemGenTab::LoadScripts() { + CategorizeItems(); FillCategoryTree(); } *************** *** 591,597 **** } ! CCategorizedScriptBase * CItemGenTab::Find(CString csString, int iCrit, bool bSelect, bool bPrevious) { - CCategorizedScriptBase * pSelection = NULL; if ( csString != _T("") ) { --- 571,576 ---- } ! void CItemGenTab::Find(CString csString, int iCrit, bool bSelect, bool bPrevious) { if ( csString != _T("") ) { *************** *** 600,744 **** this->m_iSearchCrit = iCrit; this->m_pSearchCategory = NULL; ! this->m_pSearchSubsection = NULL; ! this->m_pSearchItem = NULL; ! } ! POSITION catPos; ! if ( this->m_pSearchCategory ) ! catPos = Main->m_pScriptsOld->m_olItems.Find( this->m_pSearchCategory ); ! else ! { ! if ( !bPrevious ) ! catPos = Main->m_pScriptsOld->m_olItems.GetHeadPosition(); ! else ! catPos = Main->m_pScriptsOld->m_olItems.GetTailPosition(); } ! while ( catPos != NULL ) { ! CCategory * pCategory; ! if ( !bPrevious ) ! pCategory = (CCategory *) Main->m_pScriptsOld->m_olItems.GetNext( catPos ); ! else ! pCategory = (CCategory *) Main->m_pScriptsOld->m_olItems.GetPrev( catPos ); ! if ( pCategory == NULL ) ! break; ! POSITION subPos; ! if ( this->m_pSearchSubsection ) ! subPos = pCategory->m_SubsectionList.Find( this->m_pSearchSubsection ); else { ! if ( !bPrevious ) ! subPos = pCategory->m_SubsectionList.GetHeadPosition(); ! else ! subPos = pCategory->m_SubsectionList.GetTailPosition(); ! } ! while ( subPos != NULL ) ! { ! CSubsection * pSubsection; ! if ( !bPrevious ) ! pSubsection = ( CSubsection *) pCategory->m_SubsectionList.GetNext( subPos ); ! else ! pSubsection = ( CSubsection *) pCategory->m_SubsectionList.GetPrev( subPos ); ! if ( pSubsection == NULL ) ! break; ! POSITION itemPos; ! if ( this->m_pSearchItem ) { ! itemPos = pSubsection->m_ItemList.Find( this->m_pSearchItem ); ! if ( itemPos ) ! { ! CCategorizedScriptBase * pObject; ! if ( !bPrevious ) ! pObject = (CCategorizedScriptBase *) pSubsection->m_ItemList.GetNext( itemPos ); ! else ! pObject = (CCategorizedScriptBase *) pSubsection->m_ItemList.GetPrev( itemPos ); ! } } ! else { ! if ( !bPrevious ) ! itemPos = pSubsection->m_ItemList.GetHeadPosition(); ! else ! itemPos = pSubsection->m_ItemList.GetTailPosition(); } ! while ( itemPos != NULL ) { ! CCategorizedScriptBase * pItem; ! if ( !bPrevious ) ! pItem = (CCategorizedScriptBase *) pSubsection->m_ItemList.GetNext( itemPos ); ! else ! pItem = (CCategorizedScriptBase *) pSubsection->m_ItemList.GetPrev( itemPos ); ! if ( pItem ) ! { ! CString csValue, csTest; ! csTest = this->m_csSearchValue; ! csTest.MakeLower(); ! switch ( this->m_iSearchCrit ) ! { ! case 0: ! // ID ! csValue = pItem->m_csValue; ! csValue.MakeLower(); ! if ( csValue.Find( csTest ) != -1 ) ! pSelection = (CCategorizedScriptBase *) pItem; ! break; ! case 1: ! // Description ! csValue = pItem->m_csDescription; ! csValue.Replace(_T("@"), pItem->m_csSubsection); ! csValue.MakeLower(); ! if ( csValue.Find( csTest ) != -1 ) ! pSelection = (CCategorizedScriptBase *) pItem; ! break; ! default: ! break; ! } ! } ! if ( pSelection != NULL ) { ! if ( bSelect ) ! { ! HTREEITEM hRoot = this->m_ctcCategories.GetRootItem(); ! HTREEITEM hCat = this->m_ctcCategories.GetNextItem( hRoot, TVGN_NEXT ); ! while ( hCat != NULL ) ! { ! if ( this->m_ctcCategories.GetItemText( hCat ) == pCategory->m_csName ) ! { ! HTREEITEM hSub = this->m_ctcCategories.GetChildItem( hCat ); ! while ( hSub != NULL ) ! { ! if ( this->m_ctcCategories.GetItemText( hSub ) == pSubsection->m_csName ) ! { ! this->m_ctcCategories.SelectItem( hSub ); ! for ( int i = 0; i < this->m_clcItems.GetItemCount(); i++ ) ! { ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) this->m_clcItems.GetItemData(i); ! if ( pObject == pSelection ) ! { ! this->m_clcItems.SetItemState( i, LVIS_SELECTED, LVIS_SELECTED ); ! this->m_clcItems.EnsureVisible( i, FALSE ); ! this->m_pSearchCategory = pCategory; ! this->m_pSearchItem = pItem; ! this->m_pSearchSubsection = pSubsection; ! return pSelection; ! } ! } ! return pSelection; ! } ! hSub = this->m_ctcCategories.GetNextItem( hSub, TVGN_NEXT ); ! } ! } ! hCat = this->m_ctcCategories.GetNextItem( hCat, TVGN_NEXT ); ! } ! } ! return pSelection; } } - this->m_pSearchItem = NULL; } - this->m_pSearchSubsection = NULL; } ! if ( bSelect ) ! AxisMessageBox(locale->String(IDS_ITEMGEN_NOMATCH), MB_OK | MB_ICONINFORMATION); ! return pSelection; } --- 579,691 ---- this->m_iSearchCrit = iCrit; this->m_pSearchCategory = NULL; ! m_iSearchEntry = -1; } ! m_bSearchDirection = bPrevious; ! ! bool bFound = false; ! int iStart, iEnd; ! int iTotal = Main->m_pScriptsA->GetItemCount(); ! if ( bPrevious ) { ! if ( m_iSearchEntry == -1 ) ! iStart = iTotal; else + iStart = m_iSearchEntry - 1; + iEnd = -1; + for ( int i = iStart; i > iEnd; i-- ) { ! if ( CompareItem(i) ) { ! bFound = true; ! m_iSearchEntry = i; ! break; } ! } ! } ! else ! { ! iStart = m_iSearchEntry + 1; ! iEnd = iTotal; ! for ( int i = iStart; i < iEnd; i++ ) ! { ! if ( CompareItem(i) ) { ! bFound = true; ! m_iSearchEntry = i; ! break; } ! } ! } ! ! if ( bFound ) ! { ! HTREEITEM hItem = m_ctcCategories.GetRootItem(); ! while ( hItem != NULL ) ! { ! if ( FindSelectionInTree(hItem) ) ! return; ! hItem = m_ctcCategories.GetNextItem(hItem, TVGN_NEXT); ! } ! } ! ! AxisMessageBox(locale->String(IDS_ITEMGEN_NOMATCH), MB_OK | MB_ICONINFORMATION); ! return; ! } ! ! bool CItemGenTab::CompareItem(int index) ! { ! if ( index == -1 ) ! return false; ! if ( m_iSearchCrit == 0 ) ! { ! CString sID; ! // Compare IDs ! sID = Main->m_pScriptsA->GetItemID(index); ! if ( sID.Find(m_csSearchValue) != -1 ) ! return true; ! } ! else ! { ! CString sDescription; ! // Compare Descriptions ! sDescription = Main->m_pScriptsA->GetItemDescription(index); ! if ( sDescription.Find(m_csSearchValue) != -1 ) ! return true; ! } ! return false; ! } ! ! bool CItemGenTab::FindSelectionInTree(HTREEITEM hItem) ! { ! CCategoryTree * pTree = (CCategoryTree *) m_ctcCategories.GetItemData(hItem); ! // Is the item in one of the entries in this category? ! for ( int i = 0; i < pTree->EntryCount(); i++ ) ! { ! int index = pTree->GetEntry(i); ! if ( index == m_iSearchEntry ) ! { ! m_ctcCategories.SelectItem(hItem); ! for ( int i = 0; i < m_clcItems.GetItemCount(); i++ ) { ! index = m_clcItems.GetItemData(i); ! if ( index == m_iSearchEntry ) { ! m_clcItems.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); ! m_clcItems.EnsureVisible(i, FALSE); ! return true; } } } } ! ! // Is the category one of our children? ! HTREEITEM hChild = m_ctcCategories.GetChildItem(hItem); ! while ( hChild ) ! { ! if ( FindSelectionInTree(hChild) ) ! return true; ! hChild = m_ctcCategories.GetNextItem(hChild, TVGN_NEXT); ! } ! return false; } *************** *** 769,775 **** Localize(); - if ( Main->m_pScriptsOld->m_iICatSeq != m_iCatSeq ) - this->FillCategoryTree(); - if ( Main->m_config.MulPath() == _T("") ) { --- 716,719 ---- *************** *** 780,787 **** m_Display.SetMulPath(Main->m_config.MulPath()); ! if ( Main->m_config.MulFile(Art) != _T("") ) ! m_Display.SetCustomMulFile(Art, Main->m_config.MulFile(Art)); ! if ( Main->m_config.MulFile(ArtIdx) != _T("") ) ! m_Display.SetCustomMulFile(ArtIdx, Main->m_config.MulFile(ArtIdx)); WORD wFlags = 0; --- 724,732 ---- m_Display.SetMulPath(Main->m_config.MulPath()); ! for ( int i = Map0; i < MulCount; i++ ) ! { ! if ( Main->m_config.MulFile(i) != _T("") ) ! m_Display.SetCustomMulFile(i, Main->m_config.MulFile(i)); ! } WORD wFlags = 0; *************** *** 827,833 **** } ! CCategorizedScriptBase * CItemGenTab::FindPrevious() { ! return Find(_T(""), 0, true, true); } --- 772,778 ---- } ! void CItemGenTab::FindPrevious() { ! Find(_T(""), 0, true, true); } *************** *** 884,885 **** --- 829,860 ---- locale->LocalizeWindow(IDD, IDC_IG_MAXTIME, (CWnd*)&m_sMaxTime, (CWnd*)this); } + + void CItemGenTab::CategorizeItems() + { + if ( m_pCategories ) + delete m_pCategories; + + CFileReadProgress progress; + progress.Create(IDD_FILEREAD_PROGRESS); + progress.SetWindowText(_T("Categorizing...")); + progress.m_csMessage.SetWindowText(locale->String(IDS_CATITEMS)); + progress.SetRange32(0, Main->m_pScriptsA->GetItemCount()); + progress.SetPos(0); + m_pCategories = new CCategoryTree; + if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) + { + for ( int i = 0; i < (int) Main->m_pScriptsA->GetItemCount(); i++ ) + { + CString sCategory; + sCategory = Main->m_pScriptsA->GetItemCategory(i); + if ( sCategory == _T("") ) + sCategory = _T("<none>"); + + CCategoryTree * pCategory = m_pCategories->FindNode(sCategory); + pCategory->AddEntry(i); + + if ( i % 5 == 0 ) + progress.SetPos(i); + } + } + } \ No newline at end of file Index: itemgentab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** itemgentab.h 23 May 2003 05:30:37 -0000 1.7 --- itemgentab.h 30 May 2003 20:06:12 -0000 1.8 *************** *** 3,7 **** ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2002 * * This program is free software; you can redistribute it and/or modify --- 3,7 ---- ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify *************** *** 24,27 **** --- 24,28 ---- //{{AFX_INCLUDES() #include "uoart.h" + #include "CategoryTree.h" //}}AFX_INCLUDES #if !defined(AFX_ITEMGENTAB_H__DFB29CF7_D431_11D2_A613_004F4905E937__INCLUDED_) *************** *** 108,120 **** // Implementation protected: - CCategorizedScriptBase * FindPrevious(); HICON m_iconUp, m_iconDown; int m_iCatSeq; CString m_csSearchValue; int m_iSearchCrit; ! CCategory * m_pSearchCategory; ! CSubsection * m_pSearchSubsection; ! CCategorizedScriptBase * m_pSearchItem; ! CCategorizedScriptBase * Find(CString cs_string = _T(""), int iCrit = 0, bool bSelect = true, bool bPrevious = false); // Generated message map functions //{{AFX_MSG(CItemGenTab) --- 109,124 ---- // Implementation protected: HICON m_iconUp, m_iconDown; int m_iCatSeq; CString m_csSearchValue; int m_iSearchCrit; ! CCategoryTree * m_pSearchCategory; ! int m_iSearchEntry; ! bool m_bSearchDirection; ! void Find(CString cs_string = _T(""), int iCrit = 0, bool bSelect = true, bool bPrevious = false); ! bool FindSelectionInTree(HTREEITEM hItem); ! void FindPrevious(); ! bool CompareItem(int index); ! // Generated message map functions //{{AFX_MSG(CItemGenTab) *************** *** 144,147 **** --- 148,154 ---- public: void Localize(void); + void CategorizeItems(); + CCategoryTree * m_pCategories; + void FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent); }; Index: itemtweaktab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemtweaktab.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** itemtweaktab.cpp 23 May 2003 05:30:40 -0000 1.8 --- itemtweaktab.cpp 30 May 2003 20:06:12 -0000 1.9 *************** *** 360,365 **** // Load the Combo Box of Item Types. ! for (int i = 0; i < ITEM_QTY; i++) ! m_ccItemTypes.AddString(ItemTypeName[i]); m_ccItemTypes.SetCurSel(0); --- 360,374 ---- // Load the Combo Box of Item Types. ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() && Main->m_pScriptsA->GetTypeCount() ) ! { ! for ( int i = 0; i < (int) Main->m_pScriptsA->GetTypeCount(); i++ ) ! m_ccItemTypes.AddString(Main->m_pScriptsA->GetTypeDescription(i)); ! } ! else ! { ! // Use the defaults for Sphere ! for (int i = 0; i < ITEM_QTY; i++) ! m_ccItemTypes.AddString(ItemTypeName[i]); ! } m_ccItemTypes.SetCurSel(0); Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** MISCTAB.CPP 23 May 2003 05:30:37 -0000 1.28 --- MISCTAB.CPP 30 May 2003 20:06:12 -0000 1.29 *************** *** 38,47 **** #include "drewsky.h" #include "MiscTab.h" - #include "RemoteConsoleDlg.h" #include "RemoteConnection.h" - #include "area.h" #include "winsvc.h" - #include "SpellDef.h" - #include "SkillDef.h" #ifdef _DEBUG --- 38,43 ---- *************** *** 772,780 **** if ( iSel == -1 ) return; ! CScriptBase * pBase = (CScriptBase *) m_ccSpellList.GetItemDataPtr(iSel); ! if ( !pBase ) ! return; CString csCmd; ! Main->m_pCommands->SendCommand(CC_CMD_CAST, pBase->m_csValue ); } --- 768,775 ---- if ( iSel == -1 ) return; ! int iSpell = m_ccSpellList.GetItemData(iSel); CString csCmd; ! csCmd.Format(_T("%ld"), iSpell); ! Main->m_pCommands->SendCommand(CC_CMD_CAST, csCmd ); } *************** *** 800,807 **** if ( iSel == -1 ) return; ! CScriptBase * pBase = (CScriptBase *) m_ccSpellList.GetItemDataPtr(iSel); ! if ( !pBase ) ! return; ! m_csSpellID.SetWindowText(pBase->m_csValue); } --- 795,802 ---- if ( iSel == -1 ) return; ! int iSpell = m_ccSpellList.GetItemData(iSel); ! CString csCmd; ! csCmd.Format(_T("%ld"), iSpell); ! m_csSpellID.SetWindowText(csCmd); } *************** *** 906,941 **** this->m_ccSpellList.ResetContent(); ! // Fill the spells list ! for ( int i = 1; i < Main->m_pScriptsOld->m_tables.m_spells.GetSize(); i++ ) { ! CScriptBase * pBase = (CScriptBase *) Main->m_pScriptsOld->m_tables.m_spells.GetAt(i); ! if ( pBase ) { ! CTSpellDef spell; ! spell.m_csFilename = pBase->m_csFilename; ! spell.m_dwFileOffset = pBase->m_dwFileOffset; ! spell.m_csValue = pBase->m_csValue; ! spell.Load(); ! if ( spell.m_csName != _T("") ) ! { ! int index = this->m_ccSpellList.AddString(spell.m_csName); ! this->m_ccSpellList.SetItemDataPtr(index, pBase); ! } } ! } ! ! // Fill the music list ! for ( i = 0; i < Main->m_pScriptsOld->m_aDefs.GetSize(); i++ ) ! { ! CDef * pDef = (CDef *) Main->m_pScriptsOld->m_aDefs.GetAt(i); ! if ( pDef && pDef->m_csValue.Find(_T("MIDI")) != -1 ) { ! int index = this->m_ccbMusicList.AddString(pDef->m_csValue); ! this->m_ccbMusicList.SetItemData(index, pDef->m_dwValueMin); } } // Read the sound list out of sounds.txt ! for ( i = 0; i < 589; i++ ) { int iIndex = m_ccbSfxList.AddString(Sounds[i]); --- 901,924 ---- this->m_ccSpellList.ResetContent(); ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) { ! // Fill the spells list ! for ( int i = 0; i < (int) Main->m_pScriptsA->GetSpellCount(); i++ ) { ! CString sSpell = Main->m_pScriptsA->GetSpellName(i); ! int index = m_ccSpellList.AddString(sSpell); ! m_ccSpellList.SetItemData(index, i); } ! // Fill the music list ! for ( i = 0; i < (int) Main->m_pScriptsA->GetMidiCount(); i++ ) { ! CString s = Main->m_pScriptsA->GetMidiName(i); ! int index = m_ccbMusicList.AddString(s); ! m_ccbMusicList.SetItemData(index, i); } } // Read the sound list out of sounds.txt ! for ( int i = 0; i < 589; i++ ) { int iIndex = m_ccbSfxList.AddString(Sounds[i]); *************** *** 950,954 **** OnSelchangeSfxList(); - m_iScriptSeq = Main->m_pScriptsOld->m_iScriptSeq; } --- 933,936 ---- *************** *** 970,1001 **** void CMiscTab::OnRconsole() { ! //CRemoteConsoleDlg rcDlg; ! //rcDlg.DoModal(); ! if (!m_bRemoteConsoleCreated) ! { ! m_rcDlg.Create(IDD_REMOTECONSOLEDLG, this); ! Main->SetLayeredWindow(m_rcDlg.GetSafeHwnd()); ! m_rcDlg.ShowWindow(SW_SHOW); ! this->m_cbRemoteConsole.SetWindowText(locale->String(IDS_RC_HIDE)); ! m_bRemoteConsoleCreated = true; ! m_bRemoteConsoleVisible = true; ! } ! else ! { ! if (m_bRemoteConsoleVisible) ! { ! // Hide it ! m_rcDlg.ShowWindow(SW_HIDE); ! m_bRemoteConsoleVisible = false; ! this->m_cbRemoteConsole.SetWindowText(locale->String(IDS_RC_SHOW)); ! } ! else ! { ! // Show it ! m_rcDlg.ShowWindow(SW_SHOW); ! m_bRemoteConsoleVisible = true; ! this->m_cbRemoteConsole.SetWindowText(locale->String(IDS_RC_HIDE)); ! } ! } } --- 952,957 ---- void CMiscTab::OnRconsole() { ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) ! Main->m_pScriptsA->InvokeRemoteConsole(); } *************** *** 1125,1311 **** // Export all objects here into a file. CWaitCursor hourglass; ! // Back up any existing file ! CString csBackupFile; ! time_t tnow = time(NULL); ! struct tm * tm_now = localtime(&tnow); ! csBackupFile.Format(_T("axiscats.bkp.%02d%02d%02d.%02d.%02d"), tm_now->tm_year, tm_now->tm_mon, tm_now->tm_mday, tm_now->tm_hour, tm_now->tm_min); ! try ! { ! CFile::Rename(_T("axiscats.scp"), csBackupFile); ! } ! catch (CFileException * e) ! { ! // File must not have existed ! e->Delete(); ! } ! CFileReadProgress progress; ! progress.Create(IDD_FILEREAD_PROGRESS); ! progress.SetWindowText(_T("Extracting categories")); ! // OK...time to start writing the new file ! CStdioFile csfOutput; ! if ( !csfOutput.Open(_T("axiscats.scp"), CFile::modeCreate | CFile::typeText | CFile::modeWrite | CFile::shareDenyNone) ) ! { ! // Unable to open new file ! AxisMessageBox(locale->String(IDS_MISC_AXISCATSERROR), MB_OK); ! return; ! } ! // Write the items ! progress.m_csMessage.SetWindowText(locale->String(IDS_XITEMS)); ! progress.SetRange32(0, Main->m_pScriptsOld->m_aItems.GetUpperBound() ); ! progress.SetPos(0); ! for ( int i = 0; i <= Main->m_pScriptsOld->m_aItems.GetUpperBound(); i++ ) ! { ! CDisplayedScriptBase * pObject = (CDisplayedScriptBase *) Main->m_pScriptsOld->m_aItems.GetAt(i); ! if ( ( i % 100 ) == 0 ) ! progress.SetPos(i); ! if ( pObject ) ! { ! CItem item; ! item.CopyBase(pObject); ! item.Load(); ! item.WriteBasic(csfOutput); ! } ! } ! // Write the NPCs ! progress.m_csMessage.SetWindowText(locale->String(IDS_XNPCS)); ! progress.SetRange32(0, Main->m_pScriptsOld->m_aNPCs.GetUpperBound() ); ! progress.SetPos(0); ! for ( i = 0; i <= Main->m_pScriptsOld->m_aNPCs.GetUpperBound(); i++ ) { ! CDisplayedScriptBase * pObject = (CDisplayedScriptBase *) Main->m_pScriptsOld->m_aNPCs.GetAt(i); ! if ( ( i % 10 ) == 0 ) ! progress.SetPos(i); ! if ( pObject ) { ! CNPC npc; ! npc.CopyBase(pObject); ! npc.Load(); ! npc.WriteBasic(csfOutput); } ! } ! // Write the Templates ! progress.m_csMessage.SetWindowText(locale->String(IDS_XTEMPLATES)); ! progress.SetRange32(0, Main->m_pScriptsOld->m_aTemplates.GetUpperBound() ); ! progress.SetPos(0); ! for ( i = 0; i <= Main->m_pScriptsOld->m_aTemplates.GetUpperBound(); i++ ) ! { ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) Main->m_pScriptsOld->m_aTemplates.GetAt(i); ! if ( ( i % 10 ) == 0 ) ! progress.SetPos(i); ! if ( pObject ) ! { ! CTemplate templ; ! templ.CopyBase(pObject); ! templ.Load(); ! templ.WriteBasic(csfOutput); ! } ! } ! progress.m_csMessage.SetWindowText(locale->String(IDS_XCTEMPLATES)); ! progress.SetRange32(0, Main->m_pScriptsOld->m_aTemplates2.GetUpperBound() ); ! progress.SetPos(0); ! for ( i = 0; i <= Main->m_pScriptsOld->m_aTemplates2.GetUpperBound(); i++ ) ! { ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) Main->m_pScriptsOld->m_aTemplates2.GetAt(i); ! progress.SetPos(i); ! if ( pObject ) { ! CTemplate templ; ! templ.CopyBase(pObject); ! templ.Load(); ! templ.WriteBasic(csfOutput); } } - // Write the Spawn Groups - progress.m_csMessage.SetWindowText(locale->String(IDS_XSPAWNS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_tables.m_spawns.GetUpperBound() ); - progress.SetPos(0); - for ( i = 0; i <= Main->m_pScriptsOld->m_tables.m_spawns.GetUpperBound(); i++ ) - { - progress.SetPos(i); - CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) Main->m_pScriptsOld->m_tables.m_spawns.GetAt(i); - if ( pObject ) - { - CTSpawnDef spawn; - spawn.CopyBase(pObject); - spawn.Load(); - spawn.WriteBasic(csfOutput); - } - } - // Write the Locations - progress.m_csMessage.SetWindowText(locale->String(IDS_XLOCS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_aLocations.GetUpperBound() ); - progress.SetPos(0); - for ( i = 0; i <= Main->m_pScriptsOld->m_aLocations.GetUpperBound(); i++ ) - { - CLocation * pObject = (CLocation *) Main->m_pScriptsOld->m_aLocations.GetAt(i); - progress.SetPos(i); - if ( pObject && !pObject->m_bCustom ) - pObject->Write(csfOutput); - } - // Write the areas - progress.m_csMessage.SetWindowText(locale->String(IDS_XAREAS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_olAreas.GetCount() ); - progress.SetPos(0); - POSITION pos = Main->m_pScriptsOld->m_olAreas.GetHeadPosition(); - while ( pos != NULL ) - { - CArea * pArea = (CArea *) Main->m_pScriptsOld->m_olAreas.GetNext(pos); - if ( pArea != NULL ) - { - CRoom * pRoom = dynamic_cast <CRoom*> (pArea); - if ( pRoom ) - pRoom->WriteBasic(csfOutput); - else - pArea->WriteBasic(csfOutput); - } - } - - // Write the spells - progress.m_csMessage.SetWindowText(locale->String(IDS_XSPELLS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_tables.m_spells.GetUpperBound() ); - progress.SetPos(0); - for ( i = 0; i <= Main->m_pScriptsOld->m_tables.m_spells.GetUpperBound(); i++ ) - { - CScriptBase * pObject = (CScriptBase *) Main->m_pScriptsOld->m_tables.m_spells.GetAt(i); - progress.SetPos(i); - if ( pObject ) - { - CTSpellDef spell; - spell.CopyBase(pObject); - spell.Load(); - spell.WriteBasic(csfOutput); - } - } - // Write the skills - progress.m_csMessage.SetWindowText(locale->String(IDS_XSKILLS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_tables.m_skills.GetUpperBound() ); - progress.SetPos(0); - for ( i = 0; i <= Main->m_pScriptsOld->m_tables.m_skills.GetUpperBound(); i++ ) - { - CScriptBase * pObject = (CScriptBase *) Main->m_pScriptsOld->m_tables.m_skills.GetAt(i); - progress.SetPos(i); - if ( pObject ) - { - CTSkillDef skill; - skill.CopyBase(pObject); - skill.Load(); - skill.WriteBasic(csfOutput); - } - } - // Write the defs - progress.m_csMessage.SetWindowText(locale->String(IDS_XDEFS)); - progress.SetRange32(0, Main->m_pScriptsOld->m_aDefs.GetUpperBound() ); - progress.SetPos(0); - csfOutput.WriteString(_T("\n[DEFNAME AXISCATS_DEFS]\n")); - for ( i = 0; i <= Main->m_pScriptsOld->m_aDefs.GetUpperBound(); i++ ) - { - CDef * pDef = (CDef *) Main->m_pScriptsOld->m_aDefs.GetAt(i); - if ( ( i % 25 ) == 0 ) - progress.SetPos(i); - if ( pDef ) - pDef->WriteDef(csfOutput); - } - csfOutput.Close(); - } --- 1081,1102 ---- // Export all objects here into a file. CWaitCursor hourglass; ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) { ! // Back up any existing file ! CString csBackupFile; ! time_t tnow = time(NULL); ! struct tm * tm_now = localtime(&tnow); ! csBackupFile.Format(_T("axiscats.bkp.%02d%02d%02d.%02d.%02d"), tm_now->tm_year, tm_now->tm_mon, tm_now->tm_mday, tm_now->tm_hour, tm_now->tm_min); ! try { ! CFile::Rename(_T("axiscats.scp"), csBackupFile); } ! catch (CFileException * e) { ! // File must not have existed ! e->Delete(); } + Main->m_pScriptsA->ExportCategories(_T("axiscats.scp")); } } *************** *** 1325,1330 **** { Localize(); - if ( Main->m_pScriptsOld->m_iScriptSeq != m_iScriptSeq ) - this->LoadScripts(); return CPropertyPage::OnSetActive(); } --- 1116,1119 ---- Index: ScriptsWrapper.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ScriptsWrapper.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ScriptsWrapper.cpp 29 May 2003 21:23:12 -0000 1.5 --- ScriptsWrapper.cpp 30 May 2003 20:06:13 -0000 1.6 *************** *** 570,571 **** --- 570,599 ---- return BSTR2S(m_pScripts->GetBrainDescription(index)); } + + ULONG CScriptsWrapper::GetMidiCount() + { + if ( m_pScripts == NULL ) + return 0; + return m_pScripts->GetMidiCount(); + } + + CString CScriptsWrapper::GetMidiName(ULONG index) + { + if ( m_pScripts == NULL ) + return _T(""); + return BSTR2S(m_pScripts->GetMidiName(index)); + } + + void CScriptsWrapper::ExportCategories(CString sFilename) + { + if ( m_pScripts == NULL ) + return; + m_pScripts->ExportCategories(T2BSTR(sFilename)); + } + + void CScriptsWrapper::InvokeRemoteConsole() + { + if ( m_pScripts == NULL ) + return; + m_pScripts->InvokeRemoteConsole(); + } \ No newline at end of file Index: ScriptsWrapper.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ScriptsWrapper.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ScriptsWrapper.h 29 May 2003 21:23:12 -0000 1.4 --- ScriptsWrapper.h 30 May 2003 20:06:13 -0000 1.5 *************** *** 138,141 **** --- 138,146 ---- CString GetBrainDescription(ULONG index); + ULONG GetMidiCount(); + CString GetMidiName(ULONG index); + + void ExportCategories(CString sFilename); + void InvokeRemoteConsole(); protected: Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** SPAWNTAB.CPP 29 May 2003 21:23:12 -0000 1.18 --- SPAWNTAB.CPP 30 May 2003 20:06:13 -0000 1.19 *************** *** 448,451 **** --- 448,453 ---- void CSpawnTab::Unload() { + if ( m_pCategories ) + delete m_pCategories; } Index: SpellbookTweakDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SpellbookTweakDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SpellbookTweakDlg.cpp 23 May 2003 05:30:38 -0000 1.2 --- SpellbookTweakDlg.cpp 30 May 2003 20:06:13 -0000 1.3 *************** *** 173,202 **** } // Loop through the spells and insert them into the proper place ! CTObArray * spells = & (Main->m_pScriptsOld->m_tables.m_spells ); ! ! for ( i = 0; i < spells->GetSize(); i++ ) { ! if ( i == 0 ) ! continue; ! CScriptBase * pBase = (CScriptBase *) spells->GetAt(i); ! if ( pBase ) { ! CTSpellDef spell; ! spell.m_csFilename = pBase->m_csFilename; ! spell.m_dwFileOffset = pBase->m_dwFileOffset; ! spell.m_csValue = pBase->m_csValue; ! spell.Load(); ! int index = _tstoi(spell.m_csValue); ! if ( spell.m_csName != _T("") ) ! { ! // Find out which circle it belongs to ! int circle = (index - 1) / 8; ! if ( circle < 0 ) ! circle = 0; ! if ( circle > 8 ) ! circle = 8; ! HTREEITEM hSpell = m_tcSpells.InsertItem(spell.m_csName, 0, 0, hItem[circle]); ! m_tcSpells.SetItemData(hSpell, index); ! } } } --- 173,188 ---- } // Loop through the spells and insert them into the proper place ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) { ! for ( int i = 0; i < (int) Main->m_pScriptsA->GetSpellCount(); i++ ) { ! CString sName = Main->m_pScriptsA->GetSpellName(i); ! int circle = (i - 1) / 8; ! if ( circle < 0 ) ! circle = 0; ! if ( circle > 8 ) ! circle = 8; ! HTREEITEM hSpell = m_tcSpells.InsertItem(sName, 0, 0, hItem[circle]); ! m_tcSpells.SetItemData(hSpell, i); } } Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** traveltab.cpp 29 May 2003 21:23:12 -0000 1.38 --- traveltab.cpp 30 May 2003 20:06:13 -0000 1.39 *************** *** 73,78 **** delete m_pEditDlg; } - if ( m_pCategories ) - delete m_pCategories; Unload(); } --- 73,76 ---- *************** *** 606,609 **** --- 604,609 ---- void CTravelTab::Unload() { + if ( m_pCategories ) + delete m_pCategories; } |
From: Philip E. <pes...@us...> - 2003-05-29 21:55:29
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv21958/S_Sphere52 Modified Files: S_Sphere52.idl Scripts.cpp Scripts.h ScriptsMain.cpp ScriptsMain.h Log Message: Added Script Module support to Flags/Brains tab and Spawn tab. Index: S_Sphere52.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/S_Sphere52.idl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** S_Sphere52.idl 27 May 2003 04:26:31 -0000 1.3 --- S_Sphere52.idl 29 May 2003 21:23:12 -0000 1.4 *************** *** 114,117 **** --- 114,119 ---- [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); }; [ Index: Scripts.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Scripts.cpp 27 May 2003 04:26:31 -0000 1.3 --- Scripts.cpp 29 May 2003 21:23:12 -0000 1.4 *************** *** 683,684 **** --- 683,702 ---- return S_OK; } + + STDMETHODIMP CScripts::GetBrainCount(ULONG* count) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + *count = m_pScripts->BrainCount(); + + return S_OK; + } + + STDMETHODIMP CScripts::GetBrainDescription(ULONG index, BSTR* description) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + *description = T2BSTR(m_pScripts->BrainDescription(index)); + + return S_OK; + } Index: Scripts.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/Scripts.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Scripts.h 27 May 2003 04:26:31 -0000 1.3 --- Scripts.h 29 May 2003 21:23:12 -0000 1.4 *************** *** 137,140 **** --- 137,142 ---- STDMETHOD(AddDestination)(USHORT x, USHORT y, CHAR z, BYTE m); STDMETHOD(DeleteDestination)(ULONG index); + STDMETHOD(GetBrainCount)(ULONG* count); + STDMETHOD(GetBrainDescription)(ULONG index, BSTR* description); }; Index: ScriptsMain.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ScriptsMain.cpp 27 May 2003 22:32:58 -0000 1.4 --- ScriptsMain.cpp 29 May 2003 21:23:12 -0000 1.5 *************** *** 838,842 **** void CScriptsMain::LoadTables() { ! /* All of this is done automatically when the application starts if ( m_bTablesLoaded ) return; --- 838,843 ---- void CScriptsMain::LoadTables() { ! if ( m_pProfile->ProfileType() == PROFILE_NONE ) ! return; if ( m_bTablesLoaded ) return; *************** *** 844,849 **** this->LoadDefs(); CreateProgressDialog(); ! this->LoadFile(m_pProfile->ProfileType() == PROFILE_REMOTE ? RMT_TABLE_FILE : TABLE_FILE, &m_pDlg); ! */ m_bTablesLoaded = true; } --- 845,854 ---- this->LoadDefs(); CreateProgressDialog(); ! CString csFilename; ! if ( m_pProfile->ProfileType() == PROFILE_REMOTE || GetScriptPath() == _T("") ) ! csFilename = TABLE_FILE; ! else ! csFilename.Format(_T("%s%s"), GetScriptPath(), TABLE_FILE); ! this->LoadFile(csFilename); m_bTablesLoaded = true; } *************** *** 3363,3367 **** CString CScriptsMain::CharCategory(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3368,3372 ---- CString CScriptsMain::CharCategory(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3375,3379 **** } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); --- 3380,3384 ---- } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetCount() > (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); *************** *** 3389,3393 **** CString CScriptsMain::CharDescription(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3394,3398 ---- CString CScriptsMain::CharDescription(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3398,3402 **** } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); --- 3403,3407 ---- } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetCount() > (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); *************** *** 3409,3413 **** CString CScriptsMain::CharDispID(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3414,3418 ---- CString CScriptsMain::CharDispID(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3423,3427 **** CString CScriptsMain::CharColor(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3428,3432 ---- CString CScriptsMain::CharColor(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3437,3441 **** CString CScriptsMain::CharID(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3442,3446 ---- CString CScriptsMain::CharID(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3446,3450 **** } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); --- 3451,3455 ---- } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetCount() > (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); *************** *** 3457,3461 **** bool CScriptsMain::CharSpawnOnly(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3462,3466 ---- bool CScriptsMain::CharSpawnOnly(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3472,3476 **** bool CScriptsMain::CharDontCategorize(ULONG index) { ! if ( m_aNPCs.GetUpperBound() < (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); --- 3477,3481 ---- bool CScriptsMain::CharDontCategorize(ULONG index) { ! if ( m_aNPCs.GetCount() > (int) index ) { CDisplayedScriptBase * pNPC = (CDisplayedScriptBase *) m_aNPCs.GetAt(index); *************** *** 3481,3485 **** } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetUpperBound() < (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); --- 3486,3490 ---- } index -= (ULONG) m_aNPCs.GetCount(); ! if ( m_tables.m_spawns.GetCount() > (int) index ) { CCategorizedScriptBase * pSpawn = (CCategorizedScriptBase *) m_tables.m_spawns.GetAt(index); *************** *** 3660,3666 **** if ( index > (ULONG) m_tables.m_skills.GetUpperBound() ) return _T(""); ! CTSkillDef * pSkill = (CTSkillDef *) m_tables.m_skills.GetAt(index); ! if ( pSkill ) ! return pSkill->m_csKey; return _T(""); } --- 3665,3676 ---- if ( index > (ULONG) m_tables.m_skills.GetUpperBound() ) return _T(""); ! CScriptBase * pBase = (CScriptBase*) m_tables.m_skills.GetAt(index); ! if ( pBase ) ! { ! CTSkillDef skill; ! skill.CopyBase(pBase); ! if ( skill.Load(_T("SKILL")) ) ! return skill.m_csKey; ! } return _T(""); } *************** *** 3796,3798 **** --- 3806,3818 ---- void CScriptsMain::DeleteDestination(ULONG index) { + } + + ULONG CScriptsMain::BrainCount() + { + return 0; + } + + CString CScriptsMain::BrainDescription(ULONG index) + { + return _T(""); } Index: ScriptsMain.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/ScriptsMain.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ScriptsMain.h 27 May 2003 04:26:31 -0000 1.3 --- ScriptsMain.h 29 May 2003 21:23:12 -0000 1.4 *************** *** 259,262 **** --- 259,265 ---- void DeleteDestination(ULONG index); + ULONG BrainCount(); + CString BrainDescription(ULONG index); + protected: bool m_bDefsLoaded; |
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv21958 Modified Files: AxisConfig.h flagsbrainstab.cpp ScriptsWrapper.cpp ScriptsWrapper.h SPAWNTAB.CPP SPAWNTAB.H traveltab.cpp traveltab.h Log Message: Added Script Module support to Flags/Brains tab and Spawn tab. Index: AxisConfig.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AxisConfig.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AxisConfig.h 23 May 2003 05:30:36 -0000 1.2 --- AxisConfig.h 29 May 2003 21:23:12 -0000 1.3 *************** *** 84,87 **** --- 84,113 ---- Anim2, Anim2Idx, + Map3, + StaIdx3, + Statics3, + Anim3, + Anim3Idx, + // For some reason, the diff files are out of order in the ActiveX controls. + MapDif3, + MapDifl3, + StaDif3, + StaDifi3, + StaDifl3, + MapDif0, + MapDif1, + MapDif2, + MapDifl0, + MapDifl1, + MapDifl2, + StaDif0, + StaDif1, + StaDif2, + StaDifi0, + StaDifi1, + StaDifi2, + StaDifl0, + StaDifl1, + StaDifl2, MulCount }; Index: flagsbrainstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/flagsbrainstab.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** flagsbrainstab.cpp 23 May 2003 05:30:37 -0000 1.10 --- flagsbrainstab.cpp 29 May 2003 21:23:12 -0000 1.11 *************** *** 749,777 **** this->m_ccbSkills.ResetContent(); ! for ( int i = 0; i < Main->m_pScriptsOld->m_tables.m_skills.GetSize(); i++ ) { ! CScriptBase * pBase = (CScriptBase *) Main->m_pScriptsOld->m_tables.m_skills.GetAt(i); ! if ( pBase ) { ! CTSkillDef skill; ! skill.m_csFilename = pBase->m_csFilename; ! skill.m_dwFileOffset = pBase->m_dwFileOffset; ! skill.m_csValue = pBase->m_csValue; ! skill.Load(); ! this->m_ccbSkills.AddString(skill.m_csKey); } ! } ! ! for ( i = 0; i < Main->m_pScriptsOld->m_aDefs.GetSize(); i++ ) ! { ! CDef * pDef = (CDef *) Main->m_pScriptsOld->m_aDefs.GetAt(i); ! if ( pDef->m_csGroup == _T("BRAINS") ) { ! int index = this->m_ccbBrains.AddString(pDef->m_csValue); ! this->m_ccbBrains.SetItemData(index, pDef->m_dwValueMin); } } - - m_iScriptSeq = Main->m_pScriptsOld->m_iScriptSeq; } --- 749,765 ---- this->m_ccbSkills.ResetContent(); ! if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) { ! for ( int i = 0; i < (int) Main->m_pScriptsA->GetSkillCount(); i++ ) { ! CString sKey = Main->m_pScriptsA->GetSkillName(i); ! m_ccbSkills.AddString(sKey); } ! for ( i = 0; i < (int) Main->m_pScriptsA->GetBrainCount(); i++ ) { ! CString sBrain = Main->m_pScriptsA->GetBrainDescription(i); ! m_ccbBrains.AddString(sBrain); } } } *************** *** 901,907 **** BOOL CFlagsBrainsTab::OnSetActive() { - if ( Main->m_pScriptsOld->m_iScriptSeq != m_iScriptSeq ) - this->LoadScripts(); - // Localize locale->LocalizeWindow(IDD, 0, NULL, (CWnd*)this); --- 889,892 ---- Index: ScriptsWrapper.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ScriptsWrapper.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ScriptsWrapper.cpp 27 May 2003 04:26:31 -0000 1.4 --- ScriptsWrapper.cpp 29 May 2003 21:23:12 -0000 1.5 *************** *** 545,548 **** --- 545,550 ---- void CScriptsWrapper::AddDestination(USHORT x, USHORT y, CHAR z, BYTE m) { + if ( m_pScripts == NULL ) + return; m_pScripts->AddDestination(x, y, z, m); } *************** *** 550,553 **** void CScriptsWrapper::DeleteDestination(ULONG index) { m_pScripts->DeleteDestination(index); ! } \ No newline at end of file --- 552,571 ---- void CScriptsWrapper::DeleteDestination(ULONG index) { + if ( m_pScripts == NULL ) + return; m_pScripts->DeleteDestination(index); ! } ! ! ULONG CScriptsWrapper::GetBrainCount() ! { ! if ( m_pScripts == NULL ) ! return 0; ! return m_pScripts->GetBrainCount(); ! } ! ! CString CScriptsWrapper::GetBrainDescription(ULONG index) ! { ! if ( m_pScripts == NULL ) ! return _T(""); ! return BSTR2S(m_pScripts->GetBrainDescription(index)); ! } Index: ScriptsWrapper.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ScriptsWrapper.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ScriptsWrapper.h 27 May 2003 04:26:31 -0000 1.3 --- ScriptsWrapper.h 29 May 2003 21:23:12 -0000 1.4 *************** *** 135,138 **** --- 135,141 ---- CString GetItemAttributeDescription(BYTE bit); + ULONG GetBrainCount(); + CString GetBrainDescription(ULONG index); + protected: Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** SPAWNTAB.CPP 23 May 2003 05:30:38 -0000 1.17 --- SPAWNTAB.CPP 29 May 2003 21:23:12 -0000 1.18 *************** *** 3,7 **** ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2002 * * This program is free software; you can redistribute it and/or modify --- 3,7 ---- ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify *************** *** 39,43 **** #include "FileReadProgress.h" #include "SpawnMessageDlg.h" - #include "CNPC.h" #include "tables.h" #include "NPCEditDlg.h" --- 39,42 ---- *************** *** 65,68 **** --- 64,68 ---- //}}AFX_DATA_INIT m_iCatSeq = 0; + m_pCategories = NULL; } *************** *** 158,169 **** void CSpawnTab::OnSummon() { ! CString csCmd, csID; ! m_csNPCId.GetWindowText(csID); ! DWORD dwID = (DWORD) ahextoi(csID); ! if ( dwID > 0x7FFF ) { AxisMessageBox(locale->String(IDS_SPAWN_CANTSUMMON), MB_OK | MB_ICONEXCLAMATION); return; } Main->m_pCommands->SendCommand(CC_CMD_ADDNPC, csID); } --- 158,171 ---- void CSpawnTab::OnSummon() { ! int iSelIndex = this->m_clcCreatures.GetNextItem(-1, LVNI_SELECTED); ! int index = m_clcCreatures.GetItemData(iSelIndex); ! if ( Main->m_pScriptsA->CharacterSpawnOnly(index) ) { + // We can only spawn this guy. AxisMessageBox(locale->String(IDS_SPAWN_CANTSUMMON), MB_OK | MB_ICONEXCLAMATION); return; } + CString csID; + m_csNPCId.GetWindowText(csID); Main->m_pCommands->SendCommand(CC_CMD_ADDNPC, csID); } *************** *** 247,291 **** hSelectedItem = this->m_ctcNPC.GetSelectedItem(); this->m_ctcNPC.SetItemState(hSelectedItem, TVIS_BOLD, TVIS_BOLD); - hParentItem = this->m_ctcNPC.GetParentItem(hSelectedItem); ! if (hParentItem != NULL) ! { ! CString csParent = this->m_ctcNPC.GetItemText(hParentItem); ! CString csSelected = this->m_ctcNPC.GetItemText(hSelectedItem); ! CCategory * pCategory = FindCategory(&Main->m_pScriptsOld->m_olNPCs, csParent); ! if (pCategory == NULL) ! return; ! CSubsection * pSubsection = FindSubsection(pCategory, csSelected); ! if (pSubsection == NULL) ! return; ! if (!pSubsection->m_ItemList.IsEmpty()) ! { ! POSITION pos = pSubsection->m_ItemList.GetHeadPosition(); ! int iCount = 0; ! while (pos != NULL) ! { ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) pSubsection->m_ItemList.GetNext(pos); ! CString csDef; ! if ( pObject->m_bType == TYPE_CHAR ) ! { ! CDisplayedScriptBase * pBase = dynamic_cast<CDisplayedScriptBase *>(pObject); ! if ( pBase ) ! { ! CNPC npc; ! npc.CopyBase(pBase); ! npc.Load(); ! csDef = npc.m_csDefName; ! } ! } ! this->m_clcCreatures.InsertItem(iCount, pObject->m_csDescription, 0); ! if ( csDef != _T("") ) ! this->m_clcCreatures.SetItemText(iCount, 1, csDef); ! else ! this->m_clcCreatures.SetItemText(iCount, 1, pObject->m_csValue); ! this->m_clcCreatures.SetItemData(iCount, (DWORD)pObject); ! iCount++; ! } ! } } --- 249,268 ---- hSelectedItem = this->m_ctcNPC.GetSelectedItem(); this->m_ctcNPC.SetItemState(hSelectedItem, TVIS_BOLD, TVIS_BOLD); ! CCategoryTree * pCategory =(CCategoryTree *) m_ctcNPC.GetItemData(hSelectedItem); ! int iCount = 0; ! for ( int i = 0; i < pCategory->EntryCount(); i++ ) ! { ! int iIndex = pCategory->GetEntry(i); ! if ( iIndex == -1 ) ! continue; ! CString sDescription, sID; ! sDescription = Main->m_pScriptsA->GetCharacterDescription(iIndex); ! sID = Main->m_pScriptsA->GetCharacterID(iIndex); ! m_clcCreatures.InsertItem(iCount, sDescription, 0); ! m_clcCreatures.SetItemText(iCount, 1, sID); ! m_clcCreatures.SetItemData(iCount, iIndex); ! iCount++; } *************** *** 301,327 **** int CALLBACK CSpawnTab::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { ! CCategorizedScriptBase * pObject1 = (CCategorizedScriptBase *) lParam1; ! CCategorizedScriptBase * pObject2 = (CCategorizedScriptBase *) lParam2; ! if ( pObject1 && pObject2 ) { ! if (lParamSort == 0) ! { ! if (iNameSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iNameSort == 1) ! return (pObject1->m_csDescription < pObject2->m_csDescription ? -1 : 1); ! if (iNameSort == -1) ! return (pObject1->m_csDescription < pObject2->m_csDescription ? 1 : -1); ! } ! else ! { ! if (iIDSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iIDSort == 1) ! return (pObject1->m_csValue < pObject2->m_csValue ? -1 : 1); ! if (iIDSort == -1) ! return (pObject1->m_csValue < pObject2->m_csValue ? 1 : -1); ! } } return 0; --- 278,306 ---- int CALLBACK CSpawnTab::CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { ! CString sID1, sID2; ! CString sDesc1, sDesc2; ! sID1 = Main->m_pScriptsA->GetCharacterID(lParam1); ! sID2 = Main->m_pScriptsA->GetCharacterID(lParam2); ! sDesc1 = Main->m_pScriptsA->GetCharacterDescription(lParam1); ! sDesc2 = Main->m_pScriptsA->GetCharacterDescription(lParam2); ! ! if (lParamSort == 0) ! { ! if (iNameSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iNameSort == 1) ! return (sDesc1 < sDesc2 ? -1 : 1); ! if (iNameSort == -1) ! return (sDesc1 < sDesc2 ? 1 : -1); ! } ! else { ! if (iIDSort == 0) ! return (lParam1 < lParam2 ? 1 : -1); ! if (iIDSort == 1) ! return (sID1 < sID2 ? -1 : 1); ! if (iIDSort == -1) ! return (sID1 < sID2 ? 1 : -1); } return 0; *************** *** 378,414 **** } this->m_clcCreatures.SetHotItem(iSelIndex); ! CCategorizedScriptBase * pObject = (CCategorizedScriptBase *) this->m_clcCreatures.GetItemData(iSelIndex); ! this->m_csNPCId.SetWindowText(pObject->m_csValue); ! if ( pObject->m_csFilename == _T("") ) ! return; ! // Is this an NPC or a spawn group? ! CDisplayedScriptBase * pNPC = dynamic_cast<CDisplayedScriptBase*>(pObject); ! if ( pNPC != NULL ) ! { ! WORD wID; ! if ( isdigit(pNPC->m_csValue.GetAt(0) ) ) ! { ! if ( ahextoi(pNPC->m_csValue) < 0x0400 && ahextoi(pNPC->m_csValue) != 0 ) ! wID = (WORD) ahextoi(pNPC->m_csValue); ! else ! wID = (WORD) DefLookup(pNPC->m_csDispID); ! } ! else ! { ! if ( DefLookup(pNPC->m_csValue) < 0x0400 && DefLookup(pNPC->m_csValue) != 0 ) ! wID = (WORD) DefLookup(pNPC->m_csValue); ! else ! wID = (WORD) DefLookup(pNPC->m_csDispID); ! } ! WORD wColor = (WORD) DefLookup(pNPC->m_csColor); ! m_Display.SetArtColor(wColor); ! m_Display.SetArtIndex(wID); ! } ! else if ( pObject->m_bType == TYPE_SPAWN ) ! { ! // What should we display for a spawn group? ! // Nothing for now ! } *pResult = 0; --- 357,371 ---- } this->m_clcCreatures.SetHotItem(iSelIndex); ! int index = m_clcCreatures.GetItemData(iSelIndex); ! CString sColor, sDispID; ! sColor = Main->m_pScriptsA->GetCharacterColor(index); ! sDispID = Main->m_pScriptsA->GetCharacterDispID(index); ! ! m_Display.SetArtColor((WORD) Main->m_pScriptsA->EvaluateDef(sColor)); ! if ( sDispID != _T("") ) ! m_Display.SetArtIndex((WORD) ahextoi(sDispID)); ! else ! m_Display.SetArtIndex(-1); *pResult = 0; *************** *** 426,463 **** void CSpawnTab::FillCategoryTree() { - HTREEITEM CategoryParent; - HTREEITEM SubsectionParent; - TV_INSERTSTRUCT InsertItem; - m_ctcNPC.DeleteAllItems(); ! if (!Main->m_pScriptsOld->m_olNPCs.IsEmpty()) { ! POSITION pos = Main->m_pScriptsOld->m_olNPCs.GetHeadPosition(); ! while (pos != NULL) ! { ! CCategory * pCategory = (CCategory *) Main->m_pScriptsOld->m_olNPCs.GetNext(pos); ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR *)LPCTSTR(pCategory->m_csName); ! InsertItem.item.cchTextMax = pCategory->m_csName.GetLength(); ! InsertItem.hParent = NULL; ! InsertItem.hInsertAfter = TVI_SORT; ! CategoryParent = this->m_ctcNPC.InsertItem(&InsertItem); ! if (!pCategory->m_SubsectionList.IsEmpty()) ! { ! POSITION sPos = pCategory->m_SubsectionList.GetHeadPosition(); ! while (sPos != NULL) ! { ! CSubsection * pSubsection = (CSubsection *) pCategory->m_SubsectionList.GetNext(sPos); ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR *)LPCTSTR(pSubsection->m_csName); ! InsertItem.item.cchTextMax = pSubsection->m_csName.GetLength(); ! InsertItem.hParent = CategoryParent; ! InsertItem.hInsertAfter = TVI_SORT; ! SubsectionParent = this->m_ctcNPC.InsertItem(&InsertItem); ! } ! } ! } } - m_iCatSeq = Main->m_pScriptsOld->m_iNCatSeq; } --- 383,416 ---- void CSpawnTab::FillCategoryTree() { m_ctcNPC.DeleteAllItems(); ! ! if ( Main->m_pScriptsA->IsValid() ) ! FillCategoryNode(m_pCategories, NULL); ! } ! ! void CSpawnTab::FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent) ! { ! HTREEITEM hItem; ! if ( pCategory != m_pCategories ) { ! // Insert this guy first ! TV_INSERTSTRUCT InsertItem; ! InsertItem.item.mask = TVIF_TEXT; ! InsertItem.item.pszText = (TCHAR*)LPCTSTR(pCategory->GetName()); ! InsertItem.item.cchTextMax = pCategory->GetName().GetLength(); ! InsertItem.hParent = hParent; ! InsertItem.hInsertAfter = TVI_SORT; ! hItem = m_ctcNPC.InsertItem(&InsertItem); ! m_ctcNPC.SetItemData(hItem, (DWORD) pCategory); ! } ! else ! hItem = hParent; ! // Now insert all of its children ! for ( int i = 0; i < pCategory->ChildCount(); i++ ) ! { ! CCategoryTree * pTree = pCategory->GetChild(i); ! if ( pTree ) ! FillCategoryNode(pTree, hItem); } } *************** *** 499,514 **** void CSpawnTab::LoadScripts() { - CString csScpPath = GetScriptPath(); - CWaitCursor hourglass; - - CFileReadProgress dlg; - dlg.Create(IDD_FILEREAD_PROGRESS); - Main->m_pScriptsOld->CategorizeNPCs(); - - // Now add all of the categories to the category list box - - FillCategoryTree(); } --- 452,459 ---- void CSpawnTab::LoadScripts() { CWaitCursor hourglass; + CategorizeNPCs(); + FillCategoryTree(); } *************** *** 557,696 **** this->m_iSearchCrit = iCrit; this->m_pSearchCategory = NULL; ! this->m_pSearchSubsection = NULL; ! this->m_pSearchNPC = NULL; } ! POSITION catPos; ! if ( this->m_pSearchCategory ) ! catPos = Main->m_pScriptsOld->m_olNPCs.Find( this->m_pSearchCategory ); ! else ! { ! if ( !bPrevious ) ! catPos = Main->m_pScriptsOld->m_olNPCs.GetHeadPosition(); ! else ! catPos = Main->m_pScriptsOld->m_olNPCs.GetTailPosition(); ! } ! while ( catPos != NULL ) { ! CCategory * pCategory; ! if ( !bPrevious ) ! pCategory = (CCategory *) Main->m_pScriptsOld->m_olNPCs.GetNext( catPos ); ! else ! pCategory = (CCategory *) Main->m_pScriptsOld->m_olNPCs.GetPrev( catPos ); ! if ( pCategory == NULL ) ! break; ! POSITION subPos; ! if ( this->m_pSearchSubsection ) ! subPos = pCategory->m_SubsectionList.Find( this->m_pSearchSubsection ); else { ! if ( !bPrevious ) ! subPos = pCategory->m_SubsectionList.GetHeadPosition(); ! else ! subPos = pCategory->m_SubsectionList.GetTailPosition(); ! } ! while ( subPos != NULL ) ! { ! CSubsection * pSubsection; ! if ( !bPrevious ) ! pSubsection = ( CSubsection *) pCategory->m_SubsectionList.GetNext( subPos ); ! else ! pSubsection = ( CSubsection *) pCategory->m_SubsectionList.GetPrev( subPos ); ! if ( pSubsection == NULL ) ! break; ! POSITION npcPos; ! if ( this->m_pSearchNPC ) { ! npcPos = pSubsection->m_ItemList.Find( this->m_pSearchNPC ); ! if ( npcPos ) ! { ! CCategorizedScriptBase * pNPC; ! if ( !bPrevious ) ! pNPC = ( CCategorizedScriptBase * ) pSubsection->m_ItemList.GetNext( npcPos ); ! else ! pNPC = ( CCategorizedScriptBase * ) pSubsection->m_ItemList.GetPrev( npcPos ); ! } } ! else { ! if ( !bPrevious ) ! npcPos = pSubsection->m_ItemList.GetHeadPosition(); ! else ! npcPos = pSubsection->m_ItemList.GetTailPosition(); } ! while ( npcPos != NULL ) { ! CCategorizedScriptBase * pNPC; ! if ( !bPrevious ) ! pNPC = ( CCategorizedScriptBase * ) pSubsection->m_ItemList.GetNext( npcPos ); ! else ! pNPC = ( CCategorizedScriptBase * ) pSubsection->m_ItemList.GetPrev( npcPos ); ! if ( pNPC == NULL ) ! break; ! CCategorizedScriptBase * pSelection = NULL; ! CString csValue, csTest; ! csTest = this->m_csSearchValue; ! csTest.MakeLower(); ! switch ( this->m_iSearchCrit ) { ! case 0: ! // ID ! csValue = pNPC->m_csValue; ! csValue.MakeLower(); ! if ( csValue.Find( csTest ) != -1 ) ! pSelection = pNPC; ! break; ! case 1: ! // Description ! csValue = pNPC->m_csDescription; ! csValue.Replace(_T("@"), pNPC->m_csSubsection); ! csValue.MakeLower(); ! if ( csValue.Find( csTest ) != -1 ) ! pSelection = pNPC; ! break; ! default: ! break; ! } ! if ( pSelection != NULL ) ! { ! HTREEITEM hRoot = this->m_ctcNPC.GetRootItem(); ! HTREEITEM hCat = this->m_ctcNPC.GetNextItem( hRoot, TVGN_NEXT ); ! while ( hCat != NULL ) ! { ! if ( this->m_ctcNPC.GetItemText( hCat ) == pCategory->m_csName ) ! { ! HTREEITEM hSub = this->m_ctcNPC.GetChildItem( hCat ); ! while ( hSub != NULL ) ! { ! if ( this->m_ctcNPC.GetItemText( hSub ) == pSubsection->m_csName ) ! { ! this->m_ctcNPC.SelectItem( hSub ); ! for ( int i = 0; i < this->m_clcCreatures.GetItemCount(); i++ ) ! { ! CCategorizedScriptBase * pNPC = (CCategorizedScriptBase *) this->m_clcCreatures.GetItemData(i); ! if ( pNPC == pSelection ) ! { ! this->m_clcCreatures.SetItemState( i, LVIS_SELECTED, LVIS_SELECTED ); ! this->m_clcCreatures.EnsureVisible( i, FALSE ); ! this->m_pSearchCategory = pCategory; ! this->m_pSearchNPC = pNPC; ! this->m_pSearchSubsection = pSubsection; ! return; ! } ! } ! return; ! } ! hSub = this->m_ctcNPC.GetNextItem( hSub, TVGN_NEXT ); ! } ! } ! hCat = this->m_ctcNPC.GetNextItem( hCat, TVGN_NEXT ); ! } ! return; } } - this->m_pSearchNPC = NULL; } - this->m_pSearchSubsection = NULL; } ! AxisMessageBox(locale->String(IDS_SPAWN_NOMATCH), MB_OK | MB_ICONINFORMATION); } --- 502,614 ---- this->m_iSearchCrit = iCrit; this->m_pSearchCategory = NULL; ! m_iSearchEntry = -1; } ! m_bSearchDirection = bPrevious; ! ! bool bFound = false; ! int iStart, iEnd; ! int iTotal = Main->m_pScriptsA->GetCharacterCount(); ! if ( bPrevious ) { ! if ( m_iSearchEntry == -1 ) ! iStart = iTotal; else + iStart = m_iSearchEntry - 1; + iEnd = -1; + for ( int i = iStart; i > iEnd; i-- ) { ! if ( CompareItem(i) ) { ! bFound = true; ! m_iSearchEntry = i; ! break; } ! } ! } ! else ! { ! iStart = m_iSearchEntry + 1; ! iEnd = iTotal; ! for ( int i = iStart; i < iEnd; i++ ) ! { ! if ( CompareItem(i) ) { ! bFound = true; ! m_iSearchEntry = i; ! break; } ! } ! } ! ! if ( bFound ) ! { ! HTREEITEM hItem = m_ctcNPC.GetRootItem(); ! while ( hItem != NULL ) ! { ! if ( FindSelectionInTree(hItem) ) ! return; ! hItem = m_ctcNPC.GetNextItem(hItem, TVGN_NEXT); ! } ! } ! ! AxisMessageBox(locale->String(IDS_SPAWN_NOMATCH), MB_OK | MB_ICONINFORMATION); ! return; ! } ! ! bool CSpawnTab::CompareItem(int index) ! { ! if ( index == -1 ) ! return false; ! if ( m_iSearchCrit == 0 ) ! { ! CString sID; ! // Compare IDs ! sID = Main->m_pScriptsA->GetCharacterID(index); ! if ( sID.Find(m_csSearchValue) != -1 ) ! return true; ! } ! else ! { ! CString sDescription; ! // Compare Descriptions ! sDescription = Main->m_pScriptsA->GetCharacterDescription(index); ! if ( sDescription.Find(m_csSearchValue) != -1 ) ! return true; ! } ! return false; ! } ! ! bool CSpawnTab::FindSelectionInTree(HTREEITEM hItem) ! { ! CCategoryTree * pTree = (CCategoryTree *) m_ctcNPC.GetItemData(hItem); ! // Is the item in one of the entries in this category? ! for ( int i = 0; i < pTree->EntryCount(); i++ ) ! { ! int index = pTree->GetEntry(i); ! if ( index == m_iSearchEntry ) ! { ! m_ctcNPC.SelectItem(hItem); ! for ( int i = 0; i < m_clcCreatures.GetItemCount(); i++ ) { ! index = m_clcCreatures.GetItemData(i); ! if ( index == m_iSearchEntry ) { ! m_clcCreatures.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); ! m_clcCreatures.EnsureVisible(i, FALSE); ! return true; } } } } ! ! // Is the category one of our children? ! HTREEITEM hChild = m_ctcNPC.GetChildItem(hItem); ! while ( hChild ) ! { ! if ( FindSelectionInTree(hChild) ) ! return true; ! hChild = m_ctcNPC.GetNextItem(hChild, TVGN_NEXT); ! } ! return false; } *************** *** 736,742 **** Localize(); - if ( Main->m_pScriptsOld->m_iNCatSeq != m_iCatSeq ) - this->FillCategoryTree(); - if ( Main->m_config.MulPath() == _T("") ) { --- 654,657 ---- *************** *** 747,758 **** m_Display.SetMulPath(Main->m_config.MulPath()); ! if ( Main->m_config.MulFile(Anim) != _T("") ) ! m_Display.SetCustomMulFile(Anim, Main->m_config.MulFile(Anim)); ! if ( Main->m_config.MulFile(AnimIdx) != _T("") ) ! m_Display.SetCustomMulFile(AnimIdx, Main->m_config.MulFile(AnimIdx)); ! if ( Main->m_config.MulFile(Anim2) != _T("") ) ! m_Display.SetCustomMulFile(Anim2, Main->m_config.MulFile(Anim2)); ! if ( Main->m_config.MulFile(Anim2Idx) != _T("") ) ! m_Display.SetCustomMulFile(Anim2Idx, Main->m_config.MulFile(Anim2Idx)); return CPropertyPage::OnSetActive(); --- 662,670 ---- m_Display.SetMulPath(Main->m_config.MulPath()); ! for ( int i = Map0; i < MulCount; i++ ) ! { ! if ( Main->m_config.MulFile(i) != _T("") ) ! m_Display.SetCustomMulFile(i, Main->m_config.MulFile(i)); ! } return CPropertyPage::OnSetActive(); *************** *** 788,789 **** --- 700,731 ---- locale->LocalizeWindow(IDD, IDC_INIT_SPAWNPOINT, (CWnd*)&m_bInit, (CWnd*)this); } + + void CSpawnTab::CategorizeNPCs() + { + if ( m_pCategories ) + delete m_pCategories; + + CFileReadProgress progress; + progress.Create(IDD_FILEREAD_PROGRESS); + progress.SetWindowText(_T("Categorizing...")); + progress.m_csMessage.SetWindowText(locale->String(IDS_CATNPCS)); + progress.SetRange32(0, Main->m_pScriptsA->GetCharacterCount()); + progress.SetPos(0); + m_pCategories = new CCategoryTree; + if ( Main->m_pScriptsA && Main->m_pScriptsA->IsValid() ) + { + for ( int i = 0; i < (int) Main->m_pScriptsA->GetCharacterCount(); i++ ) + { + CString sCategory; + sCategory = Main->m_pScriptsA->GetCharacterCategory(i); + if ( sCategory == _T("") ) + sCategory = _T("<none>"); + + CCategoryTree * pCategory = m_pCategories->FindNode(sCategory); + pCategory->AddEntry(i); + + if ( i % 5 == 0 ) + progress.SetPos(i); + } + } + } \ No newline at end of file Index: SPAWNTAB.H =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.H,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** SPAWNTAB.H 23 May 2003 05:30:38 -0000 1.7 --- SPAWNTAB.H 29 May 2003 21:23:12 -0000 1.8 *************** *** 3,7 **** ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2002 * * This program is free software; you can redistribute it and/or modify --- 3,7 ---- ********************************************************************** ! * Copyright (C) Philip A. Esterle 1998-2003 * * This program is free software; you can redistribute it and/or modify *************** *** 43,47 **** // ! #include "CNPC.h" ///////////////////////////////////////////////////////////////////////////// --- 43,47 ---- // ! #include "CategoryTree.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 111,119 **** int m_iSearchCrit; int m_iCatSeq; ! CCategory * m_pSearchCategory; ! CSubsection * m_pSearchSubsection; ! CCategorizedScriptBase * m_pSearchNPC; void Find(CString cs_string = _T(""), int iCrit = 0, bool bPrevious = false); void FindPrevious(); // Generated message map functions //{{AFX_MSG(CSpawnTab) --- 111,121 ---- int m_iSearchCrit; int m_iCatSeq; ! CCategoryTree * m_pSearchCategory; ! int m_iSearchEntry; ! bool m_bSearchDirection; void Find(CString cs_string = _T(""), int iCrit = 0, bool bPrevious = false); + bool FindSelectionInTree(HTREEITEM hItem); void FindPrevious(); + bool CompareItem(int index); // Generated message map functions //{{AFX_MSG(CSpawnTab) *************** *** 138,141 **** --- 140,146 ---- void Localize(void); + void CategorizeNPCs(); + CCategoryTree * m_pCategories; + void FillCategoryNode(CCategoryTree * pCategory, HTREEITEM hParent); }; Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** traveltab.cpp 29 May 2003 04:34:20 -0000 1.37 --- traveltab.cpp 29 May 2003 21:23:12 -0000 1.38 *************** *** 232,236 **** { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; - // TODO: Add your control notification handler code here this->m_clcLocations.SetHotItem(-1); --- 232,235 ---- *************** *** 461,467 **** if ( Main->m_pScriptsA->IsValid() ) - { FillCategoryNode(m_pCategories, NULL); - } } --- 460,464 ---- *************** *** 537,540 **** --- 534,538 ---- m_ceMapPlane.SetWindowText(_T("0")); } + // We need to add support for Malas here else { *************** *** 557,561 **** { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; - // TODO: Add your control notification handler code here if (pNMListView->uNewState & LVNI_SELECTED) --- 555,558 ---- *************** *** 658,662 **** } else ! Z = 0; m_crosshairIndex = m_TravelMap.AddDrawObject(X, Y, 1, 3, 0x00FFFFFF); --- 655,659 ---- } else ! Z = 0; m_crosshairIndex = m_TravelMap.AddDrawObject(X, Y, 1, 3, 0x00FFFFFF); *************** *** 904,919 **** m_TravelMap.SetClientPath(Main->m_config.MulPath()); ! if ( Main->m_config.MulFile(Map0) != _T("") ) ! m_TravelMap.SetCustomMulPath(Map0, Main->m_config.MulFile(Map0)); ! if ( Main->m_config.MulFile(Map2) != _T("") ) ! m_TravelMap.SetCustomMulPath(Map2, Main->m_config.MulFile(Map2)); ! if ( Main->m_config.MulFile(StaIdx0) != _T("") ) ! m_TravelMap.SetCustomMulPath(StaIdx0, Main->m_config.MulFile(StaIdx0)); ! if ( Main->m_config.MulFile(Statics0) != _T("") ) ! m_TravelMap.SetCustomMulPath(Statics0, Main->m_config.MulFile(Statics0)); ! if ( Main->m_config.MulFile(StaIdx2) != _T("") ) ! m_TravelMap.SetCustomMulPath(StaIdx2, Main->m_config.MulFile(StaIdx2)); ! if ( Main->m_config.MulFile(Statics2) != _T("") ) ! m_TravelMap.SetCustomMulPath(Statics2, Main->m_config.MulFile(Statics2)); if ( Main->m_config.ShowSpawnpoints() ) --- 901,909 ---- m_TravelMap.SetClientPath(Main->m_config.MulPath()); ! for ( int i = Map0; i < MulCount; i++ ) ! { ! if ( Main->m_config.MulFile(i) != _T("") ) ! m_TravelMap.SetCustomMulPath(i, Main->m_config.MulFile(i)); ! } if ( Main->m_config.ShowSpawnpoints() ) *************** *** 959,964 **** m_bSearchDirection = bPrevious; - //if ( FindInCategory(m_pSearchCategory, NULL, true) ) - bool bFound = false; int iStart, iEnd; --- 949,952 ---- *************** *** 983,997 **** else { ! iStart = m_iSearchEntry + 1; ! iEnd = iTotal; ! for ( int i = iStart; i < iEnd; i++ ) { ! if ( CompareItem(i) ) ! { ! bFound = true; ! m_iSearchEntry = i; ! break; ! } } } --- 971,985 ---- else { ! iStart = m_iSearchEntry + 1; ! iEnd = iTotal; ! for ( int i = iStart; i < iEnd; i++ ) ! { ! if ( CompareItem(i) ) { ! bFound = true; ! m_iSearchEntry = i; ! break; } + } } *************** *** 1010,1143 **** AxisMessageBox(locale->String(IDS_ITEMGEN_NOMATCH), MB_OK | MB_ICONINFORMATION); return; - } - - bool CTravelTab::FindInCategory(CCategoryTree * pCategory, CCategoryTree * pChildStart, bool bSearchParent) - { - // This function seems pretty inefficient....not using it at the moment - if ( pCategory == NULL ) - return false; - // If we are just starting, and are searching backwards, we need to set the - // parameters to the end of the list. - if ( m_bSearchDirection && m_pSearchCategory == m_pCategories && m_iSearchEntry == -1 && pCategory == m_pSearchCategory ) - { - // Find the last child - CCategoryTree * pTree = m_pSearchCategory; - while ( true ) - { - int iChildren = pTree->ChildCount(); - if ( iChildren ) - pTree = pTree->GetChild(iChildren - 1); - else - { - m_pSearchCategory = pTree; - break; - } - } - } - - // Check the entries - int iStart, iEnd; - if ( ( pChildStart == NULL ) && pCategory->EntryCount() ) - { - if ( m_bSearchDirection ) - { - if ( m_iSearchEntry == -1 ) - m_iSearchEntry = pCategory->EntryCount(); - if ( m_iSearchEntry > 0 ) - { - iStart = m_iSearchEntry - 1; - iEnd = -1; - for ( int i = iStart; i > iEnd; i-- ) - { - if ( CompareItem(pCategory->GetEntry(i)) ) - { - m_pSearchCategory = pCategory; - m_iSearchEntry = i; - return true; - } - } - } - } - else - { - if ( m_iSearchEntry < pCategory->EntryCount() ) - { - iStart = m_iSearchEntry + 1; - iEnd = pCategory->EntryCount(); - for ( int i = iStart; i < iEnd; i++ ) - { - if ( CompareItem(pCategory->GetEntry(i)) ) - { - m_pSearchCategory = pCategory; - m_iSearchEntry = i; - return true; - } - } - } - } - } - - // We didn't find the entry, so we need to reset the m_iSearchEntry value - m_iSearchEntry = -1; - - // Check the children - if ( pCategory->ChildCount() ) - { - if ( pChildStart != NULL ) - { - for ( int i = 0; i < pCategory->ChildCount(); i++ ) - { - CCategoryTree * pTest = pCategory->GetChild(i); - if ( pTest == pChildStart ) - { - if ( m_bSearchDirection ) - iStart = i - 1; - else - iStart = i + 1; - break; - } - } - } - else - { - if ( m_bSearchDirection ) - iStart = pCategory->ChildCount() - 1; - else - iStart = 0; - } - if ( m_bSearchDirection ) - { - iEnd = -1; - for ( int i = iStart; i > iEnd; i-- ) - { - CCategoryTree * pNextCategory = pCategory->GetChild(i); - if ( FindInCategory(pNextCategory) ) - return true; - } - } - else - { - iEnd = pCategory->ChildCount(); - for ( int i = iStart; i < iEnd; i++ ) - { - CCategoryTree * pNextCategory = pCategory->GetChild(i); - if ( FindInCategory(pNextCategory) ) - return true; - } - } - } - - if ( bSearchParent ) - { - // Now check the next/previous child of our parent - CCategoryTree * pParent = pCategory->GetParent(); - if ( pParent ) - { - return FindInCategory(pParent, pCategory, true); - } - } - - - return false; } --- 998,1001 ---- Index: traveltab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** traveltab.h 29 May 2003 04:34:21 -0000 1.13 --- traveltab.h 29 May 2003 21:23:12 -0000 1.14 *************** *** 103,107 **** bool m_bSearchDirection; void Find(CString csString = _T(""), int iCrit = 0, bool bSelect = true, bool bPrevious = false); - bool FindInCategory(CCategoryTree * pCategory, CCategoryTree * pChildStart = NULL, bool bSearchParent = false); bool FindSelectionInTree(HTREEITEM hItem); long m_crosshairIndex; --- 103,106 ---- |
From: Philip E. <pes...@us...> - 2003-05-29 21:35:52
|
Update of /cvsroot/sphere-axis/UOMap/Hlp In directory sc8-pr-cvs1:/tmp/cvs-serv29384/Hlp Added Files: Tag: v1_3-Stable UOMap.hm Log Message: Merged in changes from the trunk. Updated version to 1.3.1. --- NEW FILE: UOMap.hm --- // Commands (ID_* and IDM_*) // Prompts (IDP_*) // Resources (IDR_*) // Dialogs (IDD_*) HIDD_PROPPAGE_UOMAP 0x200C8 // Frame Controls (IDW_*) |
From: Philip E. <pes...@us...> - 2003-05-29 21:35:51
|
Update of /cvsroot/sphere-axis/UOMap In directory sc8-pr-cvs1:/tmp/cvs-serv29384 Modified Files: Tag: v1_3-Stable UOMap.rc UOMapCtl.cpp Log Message: Merged in changes from the trunk. Updated version to 1.3.1. Index: UOMap.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMap.rc,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -r1.15 -r1.15.2.1 *** UOMap.rc 14 May 2003 02:54:56 -0000 1.15 --- UOMap.rc 29 May 2003 21:35:47 -0000 1.15.2.1 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,0,0 ! PRODUCTVERSION 1,3,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,1,0 ! PRODUCTVERSION 1,3,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG Index: UOMapCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapCtl.cpp,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -r1.13 -r1.13.2.1 *** UOMapCtl.cpp 14 May 2003 02:54:56 -0000 1.13 --- UOMapCtl.cpp 29 May 2003 21:35:47 -0000 1.13.2.1 *************** *** 1197,1200 **** --- 1197,1217 ---- RegCloseKey(hKey); } + else + { + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Origin Worlds Online\\Ultima Online Third Dawn\\1.0"), 0, KEY_READ, &hKey); + if (lStatus == ERROR_SUCCESS) + { + unsigned char szExePath[MAX_PATH]; + DWORD dwType; + DWORD dwSize = sizeof(szExePath); + lStatus = RegQueryValueEx(hKey, _T("ExePath"), 0, &dwType, &szExePath[0], &dwSize); + if (lStatus == ERROR_SUCCESS) + { + m_csUOPath.Format(_T("%s"), szExePath); + m_csUOPath = m_csUOPath.Left(m_csUOPath.ReverseFind('\\') + 1); + } + RegCloseKey(hKey); + } + } csRadarFileName.Format(_T("%sradarcol.mul"), m_csUOPath); if (cfRadarFile.Open(csRadarFileName, CFile::modeRead | CFile::shareDenyNone)) *************** *** 2039,2041 **** } return 0xFFFFFFFF; ! } \ No newline at end of file --- 2056,2058 ---- } return 0xFFFFFFFF; ! } |
From: Philip E. <pes...@us...> - 2003-05-29 21:35:05
|
Update of /cvsroot/sphere-axis/UOArt In directory sc8-pr-cvs1:/tmp/cvs-serv28789 Modified Files: Tag: v1_3-Stable UOArt.rc UOArtCtl.cpp Added Files: Tag: v1_3-Stable UOArt.vcproj Log Message: Merged in changes from the trunk. Updated version to 1.3.1. --- NEW FILE: UOArt.vcproj --- <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.00" Name="UOArt" SccProjectName="" SccAuxPath="" SccLocalPath="" SccProvider="" Keyword="MFCProj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Unicode Release|Win32" OutputDirectory=".\ReleaseU" IntermediateDirectory=".\ReleaseU" ConfigurationType="2" UseOfMFC="2" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="1"> <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" PrecompiledHeaderFile=".\ReleaseU/UOArt.pch" AssemblerListingLocation=".\ReleaseU/" ObjectFile=".\ReleaseU/" ProgramDataBaseFileName=".\ReleaseU/" WarningLevel="3" SuppressStartupBanner="TRUE"/> <Tool Name="VCCustomBuildTool" Description="Registering ActiveX Control..." CommandLine="regsvr32 /s /c "$(TargetPath)" echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" " Outputs="$(OutDir)\regsvr32.trg"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile=".\ReleaseU/UOArt.ocx" LinkIncremental="1" SuppressStartupBanner="TRUE" ModuleDefinitionFile=".\UOArt.def" ProgramDatabaseFile=".\ReleaseU/UOArt.pdb" SubSystem="2" ImportLibrary=".\ReleaseU/UOArt.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\ReleaseU/UOArt.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_AFXDLL;NDEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" ConfigurationType="2" UseOfMFC="2" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" PrecompiledHeaderFile=".\Debug/UOArt.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool" Description="Registering ActiveX Control..." CommandLine="regsvr32 /s /c "$(TargetPath)" echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" " Outputs="$(OutDir)\regsvr32.trg"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile=".\Debug/UOArt.ocx" LinkIncremental="2" SuppressStartupBanner="TRUE" ModuleDefinitionFile=".\UOArt.def" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/UOArt.pdb" SubSystem="2" ImportLibrary=".\Debug/UOArt.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\Debug/UOArt.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_AFXDLL;_DEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Unicode Debug|Win32" OutputDirectory=".\DebugU" IntermediateDirectory=".\DebugU" ConfigurationType="2" UseOfMFC="2" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="1"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" PrecompiledHeaderFile=".\DebugU/UOArt.pch" AssemblerListingLocation=".\DebugU/" ObjectFile=".\DebugU/" ProgramDataBaseFileName=".\DebugU/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool" Description="Registering ActiveX Control..." CommandLine="regsvr32 /s /c "$(TargetPath)" echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" " Outputs="$(OutDir)\regsvr32.trg"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile=".\DebugU/UOArt.ocx" LinkIncremental="2" SuppressStartupBanner="TRUE" ModuleDefinitionFile=".\UOArt.def" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\DebugU/UOArt.pdb" SubSystem="2" ImportLibrary=".\DebugU/UOArt.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\DebugU/UOArt.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_AFXDLL;_DEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" ConfigurationType="2" UseOfMFC="2" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" PrecompiledHeaderFile=".\Release/UOArt.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" SuppressStartupBanner="TRUE"/> <Tool Name="VCCustomBuildTool" Description="Registering ActiveX Control..." CommandLine="regsvr32 /s /c "$(TargetPath)" echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" " Outputs="$(OutDir)\regsvr32.trg"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile=".\Release/UOArt.ocx" LinkIncremental="1" SuppressStartupBanner="TRUE" ModuleDefinitionFile=".\UOArt.def" SubSystem="2" ImportLibrary=".\Release/UOArt.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\Release/UOArt.tlb"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_AFXDLL;NDEBUG" Culture="1033"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> </Configurations> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File RelativePath=".\StdAfx.cpp"> <FileConfiguration Name="Unicode Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Unicode Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> </File> <File RelativePath=".\UOArt.cpp"> </File> <File RelativePath=".\UOArt.def"> </File> <File RelativePath=".\UOArt.odl"> <FileConfiguration Name="Unicode Release|Win32"> <Tool Name="VCMIDLTool" TargetEnvironment="1" HeaderFileName="UOArt_h.h"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCMIDLTool" TargetEnvironment="1" HeaderFileName="UOArt_h.h"/> </FileConfiguration> <FileConfiguration Name="Unicode Debug|Win32"> <Tool Name="VCMIDLTool" TargetEnvironment="1" HeaderFileName="UOArt_h.h"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCMIDLTool" TargetEnvironment="1" HeaderFileName="UOArt_h.h"/> </FileConfiguration> </File> <File RelativePath=".\UOArt.rc"> <FileConfiguration Name="Unicode Release|Win32"> <Tool Name="VCResourceCompilerTool" AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCResourceCompilerTool" AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> </FileConfiguration> <FileConfiguration Name="Unicode Debug|Win32"> <Tool Name="VCResourceCompilerTool" AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCResourceCompilerTool" AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> </FileConfiguration> </File> <File RelativePath=".\UOArtCtl.cpp"> </File> <File RelativePath=".\UOArtPpg.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath=".\Resource.h"> </File> <File RelativePath=".\StdAfx.h"> </File> <File RelativePath=".\UOArt.h"> </File> <File RelativePath=".\UOArtCtl.h"> </File> <File RelativePath=".\UOArtPpg.h"> </File> </Filter> <Filter Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> <File RelativePath=".\UOArt.ico"> </File> <File RelativePath=".\UOArtCtl.bmp"> </File> </Filter> <File RelativePath=".\ReadMe.txt"> </File> </Files> <Globals> </Globals> </VisualStudioProject> Index: UOArt.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArt.rc,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -r1.16 -r1.16.2.1 *** UOArt.rc 14 May 2003 02:55:11 -0000 1.16 --- UOArt.rc 29 May 2003 21:34:57 -0000 1.16.2.1 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,0,0 ! PRODUCTVERSION 1,3,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,3,1,0 ! PRODUCTVERSION 1,3,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG Index: UOArtCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.cpp,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -r1.20 -r1.20.2.1 *** UOArtCtl.cpp 14 May 2003 02:55:54 -0000 1.20 --- UOArtCtl.cpp 29 May 2003 21:34:58 -0000 1.20.2.1 *************** *** 1719,1722 **** --- 1719,1739 ---- RegCloseKey(hKey); } + else + { + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Origin Worlds Online\\Ultima Online Third Dawn\\1.0"), 0, KEY_READ, &hKey); + if (lStatus == ERROR_SUCCESS) + { + unsigned char szExePath[MAX_PATH]; + DWORD dwType; + DWORD dwSize = sizeof(szExePath); + lStatus = RegQueryValueEx(hKey, _T("ExePath"), 0, &dwType, &szExePath[0], &dwSize); + if (lStatus == ERROR_SUCCESS) + { + m_csUOPath.Format(_T("%s"), szExePath); + m_csUOPath = m_csUOPath.Left(m_csUOPath.ReverseFind('\\') + 1); + } + RegCloseKey(hKey); + } + } } |
From: Philip E. <pes...@us...> - 2003-05-29 21:22:36
|
Update of /cvsroot/sphere-axis/Axis/Scripts In directory sc8-pr-cvs1:/tmp/cvs-serv21549/Scripts Modified Files: Scripts.idl Sphere.cpp Sphere.h Log Message: Added two new methods to support brains. Index: Scripts.idl =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Scripts.idl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Scripts.idl 27 May 2003 04:26:31 -0000 1.3 --- Scripts.idl 29 May 2003 21:22:32 -0000 1.4 *************** *** 118,121 **** --- 118,123 ---- [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); }; Index: Sphere.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Sphere.cpp 27 May 2003 04:26:31 -0000 1.3 --- Sphere.cpp 29 May 2003 21:22:32 -0000 1.4 *************** *** 656,657 **** --- 656,675 ---- return S_OK; } + + STDMETHODIMP CSphere::GetBrainCount(ULONG* count) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } + + STDMETHODIMP CSphere::GetBrainDescription(ULONG index, BSTR* description) + { + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + + // TODO: Add your implementation code here + + return S_OK; + } Index: Sphere.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Scripts/Sphere.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Sphere.h 27 May 2003 04:26:31 -0000 1.3 --- Sphere.h 29 May 2003 21:22:32 -0000 1.4 *************** *** 146,149 **** --- 146,151 ---- STDMETHOD(AddDestination)(USHORT x, USHORT y, CHAR z, BYTE m); STDMETHOD(DeleteDestination)(ULONG index); + STDMETHOD(GetBrainCount)(ULONG* count); + STDMETHOD(GetBrainDescription)(ULONG index, BSTR* description); }; |
From: Philip E. <pes...@us...> - 2003-05-29 04:34:24
|
Update of /cvsroot/sphere-axis/Axis In directory sc8-pr-cvs1:/tmp/cvs-serv28269 Modified Files: Axis.sln traveltab.cpp traveltab.h Log Message: More fixes for Travel Tab to support Script modules. Index: Axis.sln =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.sln,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Axis.sln 27 May 2003 04:26:30 -0000 1.4 --- Axis.sln 29 May 2003 04:34:20 -0000 1.5 *************** *** 189,193 **** {81DF660C-76F9-4892-B538-7B56182BF21B}.Unicode Release.Build.0 = Release|Win32 {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.Debug.ActiveCfg = Debug|.NET - {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.Debug.Build.0 = Debug|.NET {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.FIPS 140 Debug.ActiveCfg = Debug|.NET {4AC8A7C0-5B42-44C8-A7FE-07F1EAF80A3C}.FIPS 140 Debug.Build.0 = Debug|.NET --- 189,192 ---- Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** traveltab.cpp 27 May 2003 22:32:58 -0000 1.36 --- traveltab.cpp 29 May 2003 04:34:20 -0000 1.37 *************** *** 604,631 **** void CTravelTab::OnEditgraymap() { ! if ( m_pEditDlg != NULL ) ! { ! // See if it has been closed ! if ( !m_pEditDlg->m_bIsActive ) ! { ! delete m_pEditDlg; ! m_pEditDlg = NULL; ! } ! else ! { ! m_pEditDlg->ShowWindow(SW_RESTORE); ! return; ! } ! } ! ! // m_pEditDlg should always be NULL at this point ! m_pEditDlg = new CEditGraymapDlg; ! m_pEditDlg->Create(IDD_EDITGRAYMAP_DLG, this); ! Main->SetLayeredWindow(m_pEditDlg->GetSafeHwnd()); ! ! m_pEditDlg->ShowWindow(SW_SHOW); ! ! if ( this->m_bWorldMapCreated ) ! this->m_dlgWorldMap.m_pMapEditor = m_pEditDlg; } --- 604,608 ---- void CTravelTab::OnEditgraymap() { ! Main->m_pScriptsA->InvokeRegionEditor((ULONG) -1); } *************** *** 918,923 **** BOOL CTravelTab::OnSetActive() { - TRACE(_T("CTravelTab::OnSetActive()\n")); - // Make sure the paths are set correctly if ( Main->m_config.MulPath() == _T("") ) --- 895,898 ---- *************** *** 981,990 **** m_pSearchCategory = m_pCategories; m_iSearchEntry = -1; - m_bSearchDirection = bPrevious; } ! if ( FindInCategory(m_pSearchCategory) ) { ! // Select the item we just found. } --- 956,1008 ---- m_pSearchCategory = m_pCategories; m_iSearchEntry = -1; } + m_bSearchDirection = bPrevious; + + //if ( FindInCategory(m_pSearchCategory, NULL, true) ) ! bool bFound = false; ! int iStart, iEnd; ! int iTotal = Main->m_pScriptsA->GetDestinationCount() + Main->m_pScriptsA->GetRegionCount(); ! if ( bPrevious ) { ! if ( m_iSearchEntry == -1 ) ! iStart = iTotal; ! else ! iStart = m_iSearchEntry - 1; ! iEnd = -1; ! for ( int i = iStart; i > iEnd; i-- ) ! { ! if ( CompareItem(i) ) ! { ! bFound = true; ! m_iSearchEntry = i; ! break; ! } ! } ! } ! else ! { ! iStart = m_iSearchEntry + 1; ! iEnd = iTotal; ! for ( int i = iStart; i < iEnd; i++ ) ! { ! if ( CompareItem(i) ) ! { ! bFound = true; ! m_iSearchEntry = i; ! break; ! } ! } ! } ! ! if ( bFound ) ! { ! HTREEITEM hItem = m_ctcCategoryTree.GetRootItem(); ! while ( hItem != NULL ) ! { ! if ( FindSelectionInTree(hItem) ) ! return; ! hItem = m_ctcCategoryTree.GetNextItem(hItem, TVGN_NEXT); ! } } *************** *** 994,1002 **** } ! bool CTravelTab::FindInCategory(CCategoryTree * pCategory) { // If we are just starting, and are searching backwards, we need to set the // parameters to the end of the list. ! if ( m_bSearchDirection == false && m_pSearchCategory == m_pCategories && m_iSearchEntry == -1 && pCategory == m_pSearchCategory ) { // Find the last child --- 1012,1023 ---- } ! bool CTravelTab::FindInCategory(CCategoryTree * pCategory, CCategoryTree * pChildStart, bool bSearchParent) { + // This function seems pretty inefficient....not using it at the moment + if ( pCategory == NULL ) + return false; // If we are just starting, and are searching backwards, we need to set the // parameters to the end of the list. ! if ( m_bSearchDirection && m_pSearchCategory == m_pCategories && m_iSearchEntry == -1 && pCategory == m_pSearchCategory ) { // Find the last child *************** *** 1015,1111 **** } - // Search the current tree and all of its children - CCategoryTree * pCurrentTree = m_pSearchCategory; - // Check the entries int iStart, iEnd; ! if ( m_bSearchDirection == false) { ! if ( m_iSearchEntry < 1 ) ! iStart = pCurrentTree->EntryCount(); ! else ! iStart = m_iSearchEntry - 1; ! iEnd = -1; ! for ( int i = iStart; i > iEnd; i-- ) { ! if ( CompareItem(pCurrentTree->GetEntry(i)) ) { ! m_pSearchCategory = pCurrentTree; ! m_iSearchEntry = i; ! return true; } } - } - else - { - if ( m_iSearchEntry < 0 ) - iStart = 0; else - iStart = m_iSearchEntry - 1; - iEnd = pCurrentTree->EntryCount(); - for ( int i = iStart; i < iEnd; i++ ) { ! if ( CompareItem(pCurrentTree->GetEntry(i)) ) { ! m_pSearchCategory = pCurrentTree; ! m_iSearchEntry = i; ! return true; } } } // Check the children ! if ( m_bSearchDirection == false ) { ! iStart = pCurrentTree->ChildCount(); ! iEnd = -1; ! for ( int i = iStart; i > iEnd; i-- ) { ! CCategoryTree * pCategory = pCurrentTree->GetChild(i); ! if ( FindInCategory(pCategory) ) ! return true; } ! } ! else ! { ! iStart = 0; ! iEnd = pCurrentTree->ChildCount(); ! for ( int i = iStart; i < iEnd; i++ ) { ! CCategoryTree * pCategory = pCurrentTree->GetChild(i); ! if ( FindInCategory(pCategory) ) ! return true; } ! } ! ! // Now check the next/previous child of our parent ! CCategoryTree * pParent = pCurrentTree->GetParent(); ! if ( pParent ) ! { ! if ( m_bSearchDirection == false ) { ! for ( int i = pParent->ChildCount() - 1; i > 0; i-- ) { ! CCategoryTree * pTest = pParent->GetChild(i); ! if ( pTest == pCategory ) ! { ! pTest = pParent->GetChild(i - 1); ! return ( FindInCategory(pTest) ); ! } } } else { ! for ( int i = 0; i < pParent->ChildCount() - 1; i++ ) { ! CCategoryTree * pTest = pParent->GetChild(i); ! if ( pTest == pCategory ) ! { ! pTest = pParent->GetChild(i + 1); ! return ( FindInCategory(pTest) ); ! } } } } return false; } --- 1036,1142 ---- } // Check the entries int iStart, iEnd; ! if ( ( pChildStart == NULL ) && pCategory->EntryCount() ) { ! if ( m_bSearchDirection ) { ! if ( m_iSearchEntry == -1 ) ! m_iSearchEntry = pCategory->EntryCount(); ! if ( m_iSearchEntry > 0 ) { ! iStart = m_iSearchEntry - 1; ! iEnd = -1; ! for ( int i = iStart; i > iEnd; i-- ) ! { ! if ( CompareItem(pCategory->GetEntry(i)) ) ! { ! m_pSearchCategory = pCategory; ! m_iSearchEntry = i; ! return true; ! } ! } } } else { ! if ( m_iSearchEntry < pCategory->EntryCount() ) { ! iStart = m_iSearchEntry + 1; ! iEnd = pCategory->EntryCount(); ! for ( int i = iStart; i < iEnd; i++ ) ! { ! if ( CompareItem(pCategory->GetEntry(i)) ) ! { ! m_pSearchCategory = pCategory; ! m_iSearchEntry = i; ! return true; ! } ! } } } } + // We didn't find the entry, so we need to reset the m_iSearchEntry value + m_iSearchEntry = -1; + // Check the children ! if ( pCategory->ChildCount() ) { ! if ( pChildStart != NULL ) { ! for ( int i = 0; i < pCategory->ChildCount(); i++ ) ! { ! CCategoryTree * pTest = pCategory->GetChild(i); ! if ( pTest == pChildStart ) ! { ! if ( m_bSearchDirection ) ! iStart = i - 1; ! else ! iStart = i + 1; ! break; ! } ! } } ! else { ! if ( m_bSearchDirection ) ! iStart = pCategory->ChildCount() - 1; ! else ! iStart = 0; } ! if ( m_bSearchDirection ) { ! iEnd = -1; ! for ( int i = iStart; i > iEnd; i-- ) { ! CCategoryTree * pNextCategory = pCategory->GetChild(i); ! if ( FindInCategory(pNextCategory) ) ! return true; } } else { ! iEnd = pCategory->ChildCount(); ! for ( int i = iStart; i < iEnd; i++ ) { ! CCategoryTree * pNextCategory = pCategory->GetChild(i); ! if ( FindInCategory(pNextCategory) ) ! return true; } } } + + if ( bSearchParent ) + { + // Now check the next/previous child of our parent + CCategoryTree * pParent = pCategory->GetParent(); + if ( pParent ) + { + return FindInCategory(pParent, pCategory, true); + } + } + + return false; } *************** *** 1123,1127 **** else sID = Main->m_pScriptsA->GetDestinationName(index); ! if ( sID.CompareNoCase(m_csSearchValue) == 0 ) return true; } --- 1154,1158 ---- else sID = Main->m_pScriptsA->GetDestinationName(index); ! if ( sID.Find(m_csSearchValue) != -1 ) return true; } *************** *** 1134,1140 **** else sDescription = Main->m_pScriptsA->GetDestinationDescription(index); ! if ( sDescription.CompareNoCase(m_csSearchValue) == 0 ) return true; } } --- 1165,1206 ---- else sDescription = Main->m_pScriptsA->GetDestinationDescription(index); ! if ( sDescription.Find(m_csSearchValue) != -1 ) return true; } + return false; + } + + bool CTravelTab::FindSelectionInTree(HTREEITEM hItem) + { + CCategoryTree * pTree = (CCategoryTree *) m_ctcCategoryTree.GetItemData(hItem); + // Is the item in one of the entries in this category? + for ( int i = 0; i < pTree->EntryCount(); i++ ) + { + int index = pTree->GetEntry(i); + if ( index == m_iSearchEntry ) + { + m_ctcCategoryTree.SelectItem(hItem); + for ( int i = 0; i < m_clcLocations.GetItemCount(); i++ ) + { + index = m_clcLocations.GetItemData(i); + if ( index == m_iSearchEntry ) + { + m_clcLocations.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); + m_clcLocations.EnsureVisible(i, FALSE); + return true; + } + } + } + } + + // Is the category one of our children? + HTREEITEM hChild = m_ctcCategoryTree.GetChildItem(hItem); + while ( hChild ) + { + if ( FindSelectionInTree(hChild) ) + return true; + hChild = m_ctcCategoryTree.GetNextItem(hChild, TVGN_NEXT); + } + return false; } Index: traveltab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** traveltab.h 27 May 2003 22:32:58 -0000 1.12 --- traveltab.h 29 May 2003 04:34:21 -0000 1.13 *************** *** 103,107 **** bool m_bSearchDirection; void Find(CString csString = _T(""), int iCrit = 0, bool bSelect = true, bool bPrevious = false); ! bool FindInCategory(CCategoryTree * pCategory); long m_crosshairIndex; bool m_bColorsLoaded; --- 103,108 ---- bool m_bSearchDirection; void Find(CString csString = _T(""), int iCrit = 0, bool bSelect = true, bool bPrevious = false); ! bool FindInCategory(CCategoryTree * pCategory, CCategoryTree * pChildStart = NULL, bool bSearchParent = false); ! bool FindSelectionInTree(HTREEITEM hItem); long m_crosshairIndex; bool m_bColorsLoaded; |
From: Philip E. <pes...@us...> - 2003-05-28 21:40:19
|
Update of /cvsroot/sphere-axis/UOMap In directory sc8-pr-cvs1:/tmp/cvs-serv1263 Modified Files: UOMapCtl.cpp Log Message: Merged in changes from Arya, author of Pandora's Box. Index: UOMapCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapCtl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** UOMapCtl.cpp 14 May 2003 02:54:56 -0000 1.13 --- UOMapCtl.cpp 28 May 2003 21:40:13 -0000 1.14 *************** *** 1197,1200 **** --- 1197,1217 ---- RegCloseKey(hKey); } + else + { + lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Origin Worlds Online\\Ultima Online Third Dawn\\1.0"), 0, KEY_READ, &hKey); + if (lStatus == ERROR_SUCCESS) + { + unsigned char szExePath[MAX_PATH]; + DWORD dwType; + DWORD dwSize = sizeof(szExePath); + lStatus = RegQueryValueEx(hKey, _T("ExePath"), 0, &dwType, &szExePath[0], &dwSize); + if (lStatus == ERROR_SUCCESS) + { + m_csUOPath.Format(_T("%s"), szExePath); + m_csUOPath = m_csUOPath.Left(m_csUOPath.ReverseFind('\\') + 1); + } + RegCloseKey(hKey); + } + } csRadarFileName.Format(_T("%sradarcol.mul"), m_csUOPath); if (cfRadarFile.Open(csRadarFileName, CFile::modeRead | CFile::shareDenyNone)) *************** *** 2039,2041 **** } return 0xFFFFFFFF; ! } \ No newline at end of file --- 2056,2058 ---- } return 0xFFFFFFFF; ! } |