sphere-axis-commits Mailing List for Axis for Sphere (Page 27)
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...> - 2002-05-29 19:15:05
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv16239 Modified Files: Axis.txt ColorSelectionDlg.cpp ColorSelectionDlg.h drewsky.rc resource.h Log Message: Added a combo box containing internal hue names to the Color Selection dialog. Also, these internal names can be exported as DEFS Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** Axis.txt 29 May 2002 16:44:34 -0000 1.31 --- Axis.txt 29 May 2002 19:14:58 -0000 1.32 *************** *** 25,28 **** --- 25,30 ---- ============================================================================= Changes in version 0.13.2 (in development) + · Added a combo box containing internal hue names to the Color Selection dialog. Also, these internal names can be + exported as DEFS. · Added Adron's roofing system. See roofing.txt for more information. · The remote console dialog and tray icon now show the profile being used. Index: ColorSelectionDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ColorSelectionDlg.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** ColorSelectionDlg.cpp 10 May 2002 19:22:11 -0000 1.10 --- ColorSelectionDlg.cpp 29 May 2002 19:14:58 -0000 1.11 *************** *** 51,54 **** --- 51,55 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CColorSelectionDlg) + DDX_Control(pDX, IDC_HUELIST, m_ccbHues); DDX_Control(pDX, IDC_TYPELIST, m_ccbTypeList); DDX_Control(pDX, IDC_ARTINDEX, m_ceArtIndex); *************** *** 72,75 **** --- 73,78 ---- ON_LBN_SELCHANGE(IDC_TYPELIST, OnSelchangeTypelist) ON_EN_CHANGE(IDC_ARTINDEX, OnChangeArtindex) + ON_CBN_SELCHANGE(IDC_HUELIST, OnSelchangeHuelist) + ON_BN_CLICKED(IDC_EXPORTHUES, OnExporthues) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 86,89 **** --- 89,93 ---- this->m_sShade.SetPos(25); m_preview.SetDrawFlags(0); + FillHueNames(); UpdatePalette(); LoadSettings(); *************** *** 454,456 **** --- 458,520 ---- DWORD dwValue = Main->GetRegistryDword("ColorPreviewArtType", 0); this->m_ccbTypeList.SetCurSel(dwValue); + } + + void CColorSelectionDlg::FillHueNames() + { + for (int i = 0; i <= Main->m_aHueGroups.GetUpperBound(); i++ ) + { + CHueGroup * pHueGroup = (CHueGroup *) Main->m_aHueGroups.GetAt(i); + if ( pHueGroup ) + { + for ( int j = 0; j < 8; j++ ) + { + CString csHueName = pHueGroup->Hues[j].cName; + CString csTest = csHueName; + csTest.MakeLower(); + if ( csTest.SpanIncluding("abcdefghijklmnopqrstuvwxyz 1234567890#()->_") == csTest && csTest != "") + { + int iIndex = m_ccbHues.AddString(csHueName); + m_ccbHues.SetItemData(iIndex, (i * 8) + j); + } + } + } + } + } + + void CColorSelectionDlg::OnSelchangeHuelist() + { + int iSel = this->m_ccbHues.GetCurSel(); + CString csHueIndex, csHueName; + csHueIndex.Format("%04x", m_ccbHues.GetItemData(iSel)); + m_ccbHues.GetLBText(iSel, csHueName); + m_csColorIndex.SetWindowText(csHueIndex); + m_csHueName.SetWindowText(csHueName); + UpdateSpectrum(); + SaveSettings(); + } + + void CColorSelectionDlg::OnExporthues() + { + CStdioFile csfOut; + if ( !csfOut.Open("axishuedefs.scp", CFile::modeCreate | CFile::typeText | CFile::shareDenyNone | CFile::modeWrite) ) + { + AfxMessageBox("Unable to open file axishuedefs.scp for writing!", MB_OK | MB_ICONEXCLAMATION); + return; + } + for ( int i = 0; i < m_ccbHues.GetCount(); i++ ) + { + CString csHue; + m_ccbHues.GetLBText(i, csHue); + csHue.Replace(" ", "_"); + csHue.Replace("#", ""); + csHue.Replace("(", ""); + csHue.Replace(")", ""); + csHue.Replace("->", "_"); + csHue.MakeUpper(); + CString csOutput; + csOutput.Format("%-32s0%x\n", csHue, m_ccbHues.GetItemData(i)); + csfOut.WriteString(csOutput); + } + csfOut.Close(); + AfxMessageBox("Hue Defs have been exported to axishuedefs.scp in your Axis folder.", MB_OK); } Index: ColorSelectionDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ColorSelectionDlg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ColorSelectionDlg.h 1 May 2002 03:33:09 -0000 1.4 --- ColorSelectionDlg.h 29 May 2002 19:14:59 -0000 1.5 *************** *** 47,50 **** --- 47,51 ---- //{{AFX_DATA(CColorSelectionDlg) enum { IDD = IDD_COLOR_DLG }; + CComboBox m_ccbHues; CComboBox m_ccbTypeList; CEdit m_ceArtIndex; *************** *** 68,71 **** --- 69,73 ---- // Implementation protected: + void FillHueNames(); void LoadSettings(); void SaveSettings(); *************** *** 85,88 **** --- 87,92 ---- afx_msg void OnSelchangeTypelist(); afx_msg void OnChangeArtindex(); + afx_msg void OnSelchangeHuelist(); + afx_msg void OnExporthues(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** drewsky.rc 29 May 2002 16:44:34 -0000 1.41 --- drewsky.rc 29 May 2002 19:14:59 -0000 1.42 *************** *** 1781,1785 **** STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Color Selection" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,421,7,50,14 --- 1781,1785 ---- STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Color Selection" ! FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,421,7,50,14 *************** *** 1807,1810 **** --- 1807,1813 ---- "{0904F7B3-2339-44C9-857C-6EB6CFEFA3B6}",WS_TABSTOP,319, 91,148,199 + COMBOBOX IDC_HUELIST,316,43,110,125,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Export Defs",IDC_EXPORTHUES,429,42,42,14 END *************** *** 2978,2982 **** 0x504e, 0x7343, "\000" IDC_COLORPREVIEW, 0x376, 28, 0 ! 0x0000, 0x0000, 0x0000, 0x0001, 0x1a39, 0x0000, 0x2627, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0 --- 2981,2985 ---- 0x504e, 0x7343, "\000" IDC_COLORPREVIEW, 0x376, 28, 0 ! 0x0000, 0x0000, 0x0000, 0x0001, 0x16f2, 0x0000, 0x2162, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0 Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** resource.h 29 May 2002 16:44:34 -0000 1.28 --- resource.h 29 May 2002 19:14:59 -0000 1.29 *************** *** 120,123 **** --- 120,124 ---- #define IDC_AS_CLIENTBROWSE 1001 #define IDC_ADD 1001 + #define IDC_EXPORTHUES 1001 #define IDC_BUTTON6 1002 #define IDC_SETHEARALL 1002 *************** *** 755,758 **** --- 756,760 ---- #define IDC_FILE_FILTER 1062 #define IDC_Y2 1062 + #define IDC_HUELIST 1062 #define IDC_RADIO6 1063 #define IDC_EDIT5 1063 *************** *** 1295,1300 **** --- 1297,1304 ---- #define IDC_TEST 1393 #define IDC_AS_STARTLAUNCHER 1394 + #define IDC_ROOFIMAGE 1394 #define IDC_AS_DEFUALTCLIENT 1395 #define IDC_AS_DEFUALTMULPATH 1396 + #define IDC_ROOFTYPE 1396 #define IDC_AS_AVAILABLESCRIPTS 1398 #define IDC_AS_ALLOWMULTIPLE 1399 *************** *** 1314,1319 **** #define IDC_STATIC_LABEL14 1413 #define IDC_STATIC_LABEL15 1414 - #define IDC_ROOFIMAGE 1394 - #define IDC_ROOFTYPE 1396 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 --- 1318,1321 ---- |
From: Philip E. <pes...@us...> - 2002-05-29 16:44:38
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv12549 Modified Files: Axis.txt install.bat Drewsky.dsp drewsky.rc MISCTAB.CPP MISCTAB.H resource.h settingstab.cpp traveltab.cpp Added Files: RoofImage.cpp RoofImage.h roofing.txt RoofingDlg.cpp RoofingDlg.h rooftiles.cfg Log Message: Merging in the roofing branch --- NEW FILE: roofing.txt --- ******************** * Axis Roofing * ******************** This functionality was added to Axis by Adron. With this tool you can generate all slanted roof forms known to me. The tiles to use should be defined in the file rooftiles.cfg. You'll find a short explanation of how to define them in there as well as the ones I had the patience to type in. To install it, simply copy the axis.exe and rooftiles.cfg found in the archive to your Axis directory. If you want to be able to go back to regular Axis you should make a backup of axis.exe first. When you run the modified Axis you will find a Roofing button on the Misc page. Clicking this button opens the Roofing dialog. There you define the roof that you want generated by specifying rectangular parts. T or X shaped roofs can be generated. To increase the generation speed of roofs you should insert a special function into your scripts. This function allows Roofing to specify locations for tiles with a single command. If you don't add this function you will have to check the box "No script support", and roofing won't be optimal. The function is f_roof_target, defined as follows: [FUNCTION f_roof_target] SRC.NEWITEM=i_gold VAR.ACT=<SRC.ACT.UID> SRC.ACT.P=<ARGS> SRC.LAST TRY UID.<VAR.ACT>.REMOVE ****************** * Defining parts * ****************** The simplest way to define a roof part is to input the coordinates of the north-west and south-east corner of it in the X1,Y1 and X2,Y2 boxes. For a roof slanted to the east/west, check "Goes up". For a roof slanted to the north/south, uncheck it. For a roof that slants in all directions check Tent roof. To find the coordinates, stand in the right spot and type ".where". The right coordinates to use in most cases are marked 1 and 2 here: ******************** *1 * * * * * * * ******************** 2 For T parts that extend from the main roof there is an alternate way of defining them. If the roof defined above was to have a T part as pictured below, you could give the coordinates of 3 and 4. ******************** *1 * * * * * * * ****** ******* * * 2 * * ********* 3 4 When giving coordinates in the second way, "Goes up" specifies which direction the roof goes from the line through 3 and 4. "Goes up" means the roof proceeds in increasing X or Y, not "Goes up" means it goes decreasing X or Y. If you make a mistake adding a part you can remove it with Remove Last. If you want to restart from scratch, use Clear. *********************** * Generating the roof * *********************** Once you have defined the roof parts and are happy with the way they look in the preview square, you can Generate the roof. To be able to generate the roof, Roofing needs two more pieces of information: What set of tiles to use, and what height to place the lowest roof tiles at. Pick the tile set (as defined in rooftiles.cfg) and input the height. Height 20 is normal roof height for houses with a floor at height 0 and walls starting at height 1. You can then either Generate the roof directly or do a Test generation first. A Test generation will only place the corner tiles of the roof so you can see if placement looks right. After placing the corner tiles you have the option of placing the remaining tiles too or abort. You will have to manually remove the corner tiles if you choose to abort. ****************** * Copyright info * ****************** ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 * Parts Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** Axis.txt 28 May 2002 22:08:40 -0000 1.30 --- Axis.txt 29 May 2002 16:44:34 -0000 1.31 *************** *** 25,28 **** --- 25,29 ---- ============================================================================= Changes in version 0.13.2 (in development) + · Added Adron's roofing system. See roofing.txt for more information. · The remote console dialog and tray icon now show the profile being used. · DEFS are listed instead of IDs (if defined) in the Item and Spawn tabs. Index: install.bat =================================================================== RCS file: /cvsroot/sphere-axis/Axis/install.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** install.bat 12 May 2002 18:58:18 -0000 1.1 --- install.bat 29 May 2002 16:44:34 -0000 1.2 *************** *** 16,18 **** copy ..\UOArt\%2\UOArt.ocx install\ copy AMPatch\%3\AMPatch.exe install\ ! copy LICENSE install\ \ No newline at end of file --- 16,20 ---- copy ..\UOArt\%2\UOArt.ocx install\ copy AMPatch\%3\AMPatch.exe install\ ! copy LICENSE install\ ! copy rooftiles.cfg install\ ! copy roofing.txt install\ \ No newline at end of file Index: Drewsky.dsp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.dsp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** Drewsky.dsp 20 May 2002 19:14:43 -0000 1.25 --- Drewsky.dsp 29 May 2002 16:44:34 -0000 1.26 *************** *** 411,414 **** --- 411,422 ---- # Begin Source File + SOURCE=.\RoofImage.cpp + # End Source File + # Begin Source File + + SOURCE=.\RoofingDlg.cpp + # End Source File + # Begin Source File + SOURCE=.\ScriptEditDlg.cpp # End Source File *************** *** 760,763 **** --- 768,779 ---- # Begin Source File + SOURCE=.\RoofImage.h + # End Source File + # Begin Source File + + SOURCE=.\RoofingDlg.h + # End Source File + # Begin Source File + SOURCE=.\ScriptEditDlg.h # End Source File *************** *** 975,980 **** --- 991,1008 ---- SOURCE=.\ReadMe.txt # End Source File + # Begin Source File + + SOURCE=.\rooftiles.cfg + # End Source File # End Target # End Project + # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} + # 2:21:DefaultSinkHeaderFile:uomap.h + # 2:16:DefaultSinkClass:CUOMap + # End Section + # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} + # 2:21:DefaultSinkHeaderFile:uoart.h + # 2:16:DefaultSinkClass:CUOArt + # End Section # Section drewsky : {2B360722-F116-4004-A71A-5E14B4C4873E} # 2:5:Class:CUOMap *************** *** 986,996 **** # 2:10:HeaderFile:uoart.h # 2:8:ImplFile:uoart.cpp - # End Section - # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} - # 2:21:DefaultSinkHeaderFile:uoart.h - # 2:16:DefaultSinkClass:CUOArt - # End Section - # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} - # 2:21:DefaultSinkHeaderFile:uomap.h - # 2:16:DefaultSinkClass:CUOMap # End Section --- 1014,1016 ---- Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** drewsky.rc 29 May 2002 03:58:53 -0000 1.40 --- drewsky.rc 29 May 2002 16:44:34 -0000 1.41 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. - // Last compiled 5/28/2002 at 21:12:22 // #include "resource.h" --- 1,3 ---- *************** *** 89,93 **** ICON IDR_MAINFRAME,IDC_STATIC,11,13,20,20 LTEXT "Static",IDC_ABOUTTITLE,40,7,133,8,SS_NOPREFIX ! LTEXT "© 1998-2002 Philip A. Esterle",IDC_STATIC,40,18,94,8 DEFPUSHBUTTON "OK",IDOK,217,7,32,14,WS_GROUP LTEXT "Built on",IDC_STATIC,40,29,24,8 --- 88,93 ---- ICON IDR_MAINFRAME,IDC_STATIC,11,13,20,20 LTEXT "Static",IDC_ABOUTTITLE,40,7,133,8,SS_NOPREFIX ! LTEXT "© 1998-2002 Philip A. Esterle + parts © 2002 Adron", ! IDC_STATIC,40,18,168,8 DEFPUSHBUTTON "OK",IDOK,217,7,32,14,WS_GROUP LTEXT "Built on",IDC_STATIC,40,29,24,8 *************** *** 559,573 **** FONT 8, "MS Sans Serif" BEGIN - GROUPBOX "Spells",IDC_STATIC,7,2,213,27 COMBOBOX IDC_SPELL_LIST,12,12,112,68,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CTEXT "00",IDC_SPELL_ID,125,14,37,10,SS_SUNKEN PUSHBUTTON "Cast Spell",IDC_CAST_SPELL,163,11,53,14 - GROUPBOX "Music",IDC_STATIC,7,31,213,27 COMBOBOX IDC_MIDI_LIST,12,41,112,67,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CTEXT "00",IDC_MUSIC_ID,124,43,37,10,SS_SUNKEN PUSHBUTTON "Play Music",IDC_PLAYMIDI,163,40,53,14 - GROUPBOX "Sound Effects",IDC_STATIC,7,55,292,27 COMBOBOX IDC_SFX_LIST,12,65,202,61,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP --- 559,570 ---- *************** *** 575,582 **** SS_SUNKEN PUSHBUTTON "Play Sound",IDC_PLAY_SFX,245,64,50,14 - GROUPBOX "Broadcast",IDC_STATIC,7,79,292,27 EDITTEXT IDC_YELL,12,88,228,14,ES_AUTOHSCROLL PUSHBUTTON "Broadcast It",IDC_YELLIT,245,88,50,14 ! GROUPBOX "Other Commands",IDC_STATIC,302,2,90,104 PUSHBUTTON "Suicide",IDC_SUICIDE,306,12,40,14 PUSHBUTTON "Follow",IDC_FOLLOW,306,27,40,14 --- 572,580 ---- SS_SUNKEN PUSHBUTTON "Play Sound",IDC_PLAY_SFX,245,64,50,14 EDITTEXT IDC_YELL,12,88,228,14,ES_AUTOHSCROLL PUSHBUTTON "Broadcast It",IDC_YELLIT,245,88,50,14 ! PUSHBUTTON "Show Remote Console",IDC_RCONSOLE,222,12,77,14 ! PUSHBUTTON "Start Sphere Server",IDC_STARTTUS,222,27,77,14 ! PUSHBUTTON "Export Categories",IDC_EXPORTCATS,222,41,77,14 PUSHBUTTON "Suicide",IDC_SUICIDE,306,12,40,14 PUSHBUTTON "Follow",IDC_FOLLOW,306,27,40,14 *************** *** 588,596 **** PUSHBUTTON "Bark",IDC_BARK,349,27,40,14 PUSHBUTTON "AllShow",IDC_ALLSHOW,349,42,40,14 - PUSHBUTTON "Show Remote Console",IDC_RCONSOLE,222,12,77,14 PUSHBUTTON "Nuke Char",IDC_NUKECHAR,349,57,40,14 ! PUSHBUTTON "Start Sphere Server",IDC_STARTTUS,222,27,77,14 ! PUSHBUTTON "Export Categories",IDC_EXPORTCATS,222,41,77,14 ! PUSHBUTTON "Underwear",IDC_UNDERWEAR2,349,72,40,14 END --- 586,597 ---- PUSHBUTTON "Bark",IDC_BARK,349,27,40,14 PUSHBUTTON "AllShow",IDC_ALLSHOW,349,42,40,14 PUSHBUTTON "Nuke Char",IDC_NUKECHAR,349,57,40,14 ! PUSHBUTTON "Roofing",IDC_ROOFING,349,72,40,14 ! PUSHBUTTON "Underwear",IDC_UNDERWEAR2,349,87,40,14 ! GROUPBOX "Spells",IDC_STATIC,7,2,213,27 ! GROUPBOX "Music",IDC_STATIC,7,31,213,27 ! GROUPBOX "Sound Effects",IDC_STATIC,7,55,292,27 ! GROUPBOX "Broadcast",IDC_STATIC,7,79,292,27 ! GROUPBOX "Other Commands",IDC_STATIC,302,2,90,104 END *************** *** 2319,2322 **** --- 2320,2354 ---- END + IDD_ROOFING DIALOG DISCARDABLE 0, 0, 243, 221 + STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Roofing" + FONT 8, "MS Sans Serif" + BEGIN + LTEXT "X1",IDC_STATIC,23,149,10,8 + EDITTEXT IDC_X1,39,147,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Y1",IDC_STATIC,82,149,10,8 + EDITTEXT IDC_Y1,98,147,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "X2",IDC_STATIC,23,169,10,8 + EDITTEXT IDC_X2,39,167,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Y2",IDC_STATIC,82,169,10,8 + EDITTEXT IDC_Y2,98,167,33,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Goes &up",IDC_UP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 143,148,55,11 + DEFPUSHBUTTON "&Add Part",IDC_ADD,98,188,53,15,WS_DISABLED + PUSHBUTTON "&Remove Last",IDC_REMOVELAST,19,188,53,15,WS_DISABLED + PUSHBUTTON "&Clear",IDC_CLEAR,173,17,41,15,WS_DISABLED + COMBOBOX IDC_ROOFTYPE,159,41,77,64,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + LTEXT "&Height",IDC_STATIC,163,94,23,10 + EDITTEXT IDC_HEIGHT,192,93,35,12,ES_AUTOHSCROLL | ES_NUMBER + PUSHBUTTON "&Generate",IDC_GENERATE,195,114,41,15,WS_DISABLED + CONTROL "",IDC_ROOFIMAGE,"Static",SS_BLACKFRAME,7,7,146,130 + CONTROL "&Tent roof",IDC_TENT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,143,168,55,11 + PUSHBUTTON "Test",IDC_TESTGEN,156,114,35,15,WS_DISABLED + CONTROL "No script support",IDC_NOSCRIPT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,167,205,69,9 + END + #ifndef _MAC *************** *** 2900,2903 **** --- 2932,2951 ---- TOPMARGIN, 7 BOTTOMMARGIN, 303 + END + + IDD_ROOFING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 236 + VERTGUIDE, 33 + VERTGUIDE, 39 + VERTGUIDE, 92 + VERTGUIDE, 98 + VERTGUIDE, 143 + TOPMARGIN, 7 + BOTTOMMARGIN, 214 + HORZGUIDE, 99 + HORZGUIDE, 153 + HORZGUIDE, 173 END END Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** MISCTAB.CPP 16 May 2002 01:31:57 -0000 1.13 --- MISCTAB.CPP 29 May 2002 16:44:34 -0000 1.14 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 696,699 **** --- 697,701 ---- ON_BN_CLICKED(IDC_RCONSOLE, OnRconsole) ON_BN_CLICKED(IDC_NUKECHAR, OnNukechar) + ON_BN_CLICKED(IDC_ROOFING, OnRoofing) ON_BN_CLICKED(IDC_STARTTUS, OnStarttus) ON_BN_CLICKED(IDC_EXPORTCATS, OnExportcats) *************** *** 925,928 **** --- 927,936 ---- { SendToUO(".nukechar"); + } + + void CMiscTab::OnRoofing() + { + void ShowRoofing(); + ShowRoofing(); } Index: MISCTAB.H =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.H,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MISCTAB.H 8 May 2002 15:44:18 -0000 1.4 --- MISCTAB.H 29 May 2002 16:44:34 -0000 1.5 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 104,107 **** --- 105,109 ---- afx_msg void OnRconsole(); afx_msg void OnNukechar(); + afx_msg void OnRoofing(); afx_msg void OnStarttus(); afx_msg void OnExportcats(); Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** resource.h 23 May 2002 23:25:51 -0000 1.27 --- resource.h 29 May 2002 16:44:34 -0000 1.28 *************** *** 87,90 **** --- 87,91 ---- #define IDD_REMOTE_CONSOLE_LOGIN_DLG 232 #define IDD_ADDITIONAL_SETTINGS 233 + #define IDD_ROOFING 234 #define IDC_BUTTON1 1001 #define IDC_BLOCK 1001 *************** *** 118,121 **** --- 119,123 ---- #define IDC_STATIC_ART_ADD 1001 #define IDC_AS_CLIENTBROWSE 1001 + #define IDC_ADD 1001 #define IDC_BUTTON6 1002 #define IDC_SETHEARALL 1002 *************** *** 141,144 **** --- 143,147 ---- #define IDC_STATIC_ART_REMOVE 1002 #define IDC_AS_MULBROWSE 1002 + #define IDC_CLEAR 1002 #define IDC_BUTTON2 1003 #define IDC_SETALLMOVE 1003 *************** *** 164,167 **** --- 167,171 ---- #define IDC_CHANGECLIENT 1003 #define IDC_AS_NEWPROFILE 1003 + #define IDC_TESTGEN 1003 #define IDC_BUTTON3 1004 #define IDC_UNBLOCK 1004 *************** *** 180,183 **** --- 184,188 ---- #define IDC_LAUNCH_STATIC_TOOL 1004 #define IDC_AS_EDITPROFILE 1004 + #define IDC_REMOVELAST 1004 #define IDC_BUTTON4 1005 #define IDC_FIX 1005 *************** *** 195,198 **** --- 200,204 ---- #define IDC_REFRESHCATEGORIES 1005 #define IDC_AS_DELETEPROFILE 1005 + #define IDC_GENERATE 1005 #define IDC_BUTTON5 1006 #define IDC_SETDETAIL 1006 *************** *** 277,280 **** --- 283,287 ---- #define IDC_RC_ACCOUNT 1015 #define IDC_UNDERWEAR2 1015 + #define IDC_ROOFING 1016 #define IDC_BUTTON16 1016 #define IDC_NUKE 1016 *************** *** 401,404 **** --- 408,412 ---- #define IDC_AS_SPAWNMSG 1033 #define IDC_REMOTESPAWNS 1033 + #define IDC_UP 1033 #define IDC_BUTTON33 1034 #define IDC_CHECK2 1034 *************** *** 412,415 **** --- 420,424 ---- #define IDC_DRAWRECTS 1034 #define IDC_CUSTOM_CMD_34 1034 + #define IDC_TENT 1034 #define IDC_BUTTON34 1035 #define IDC_CHECK3 1035 *************** *** 423,426 **** --- 432,436 ---- #define IDC_NPCNOINDEX 1035 #define IDC_AS_DISPLAYITEMS 1035 + #define IDC_NOSCRIPT 1035 #define IDC_BUTTON35 1036 #define IDC_CHECK4 1036 *************** *** 623,626 **** --- 633,637 ---- #define IDC_ACCT 1059 #define IDC_LICENSE 1059 + #define IDC_X1 1059 #define IDC_RADIO3 1060 #define IDC_EDIT2 1060 *************** *** 664,667 **** --- 675,679 ---- #define IDC_MC_Y 1060 #define IDC_PWD 1060 + #define IDC_X2 1060 #define IDC_RADIO4 1061 #define IDC_EDIT3 1061 *************** *** 704,707 **** --- 716,720 ---- #define IDC_COMMAND_SEND 1061 #define IDC_TYPELIST 1061 + #define IDC_Y1 1061 #define IDC_RADIO5 1062 #define IDC_EDIT4 1062 *************** *** 741,744 **** --- 754,758 ---- #define IDC_ITEMCOMBO 1062 #define IDC_FILE_FILTER 1062 + #define IDC_Y2 1062 #define IDC_RADIO6 1063 #define IDC_EDIT5 1063 *************** *** 767,770 **** --- 781,785 ---- #define IDC_NPCSPEECH 1063 #define IDC_SAVEPARITY 1063 + #define IDC_HEIGHT 1063 #define IDC_RADIO7 1064 #define IDC_SLIDERVALUE 1064 *************** *** 1299,1302 **** --- 1314,1319 ---- #define IDC_STATIC_LABEL14 1413 #define IDC_STATIC_LABEL15 1414 + #define IDC_ROOFIMAGE 1394 + #define IDC_ROOFTYPE 1396 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 1331,1335 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 #define _APS_NEXT_CONTROL_VALUE 1415 --- 1348,1352 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 235 #define _APS_NEXT_COMMAND_VALUE 32809 #define _APS_NEXT_CONTROL_VALUE 1415 Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** settingstab.cpp 28 May 2002 22:08:40 -0000 1.22 --- settingstab.cpp 29 May 2002 16:44:34 -0000 1.23 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 67,70 **** --- 68,72 ---- m_pAcctDlg = NULL; //}}AFX_DATA_INIT + m_pDlgStaticTool = 0; } Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** traveltab.cpp 16 May 2002 01:31:57 -0000 1.15 --- traveltab.cpp 29 May 2002 16:44:34 -0000 1.16 *************** *** 124,127 **** --- 124,128 ---- m_TravelMap.SetZoomLevel((short) zoom); + m_TravelMap.SetDrawStatics(1); Recenter((short) X, (short) Y); |
From: Philip E. <pes...@us...> - 2002-05-29 15:48:02
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv6310 Modified Files: Tag: roofing Drewsky.dsp drewsky.rc MISCTAB.CPP MISCTAB.H resource.h settingstab.cpp traveltab.cpp Added Files: Tag: roofing readme.txt RoofImage.cpp RoofImage.h RoofingDlg.cpp RoofingDlg.h rooftiles.cfg Log Message: Committing adron's roofing changes --- NEW FILE: readme.txt --- ******************** * Axis Roofing * ******************** This is Axis with Roofing. It is based on a CVS copy of Axis downloaded on 2002-05-04. Once it has reached a stable state it may hopefully be included in the main Axis distribution. Source code is available as per GPL. With this tool you can generate all slanted roof forms known to me. The tiles to use should be defined in the file rooftiles.cfg. You'll find a short explanation of how to define them in there as well as the ones I had the patience to type in. To install it, simply copy the axis.exe and rooftiles.cfg found in the archive to your Axis directory. If you want to be able to go back to regular Axis you should make a backup of axis.exe first. When you run the modified Axis you will find a Roofing button on the Misc page. Clicking this button opens the Roofing dialog. There you define the roof that you want generated by specifying rectangular parts. T or X shaped roofs can be generated. To increase the generation speed of roofs you should insert a special function into your scripts. This function allows Roofing to specify locations for tiles with a single command. If you don't add this function you will have to check the box "No script support", and roofing won't be optimal. The function is f_roof_target, defined as follows: [FUNCTION f_roof_target] SRC.NEWITEM=i_gold VAR.ACT=<SRC.ACT.UID> SRC.ACT.P=<ARGS> SRC.LAST TRY UID.<VAR.ACT>.REMOVE ****************** * Defining parts * ****************** The simplest way to define a roof part is to input the coordinates of the north-west and south-east corner of it in the X1,Y1 and X2,Y2 boxes. For a roof slanted to the east/west, check "Goes up". For a roof slanted to the north/south, uncheck it. For a roof that slants in all directions check Tent roof. To find the coordinates, stand in the right spot and type ".where". The right coordinates to use in most cases are marked 1 and 2 here: ******************** *1 * * * * * * * ******************** 2 For T parts that extend from the main roof there is an alternate way of defining them. If the roof defined above was to have a T part as pictured below, you could give the coordinates of 3 and 4. ******************** *1 * * * * * * * ****** ******* * * 2 * * ********* 3 4 When giving coordinates in the second way, "Goes up" specifies which direction the roof goes from the line through 3 and 4. "Goes up" means the roof proceeds in increasing X or Y, not "Goes up" means it goes decreasing X or Y. If you make a mistake adding a part you can remove it with Remove Last. If you want to restart from scratch, use Clear. *********************** * Generating the roof * *********************** Once you have defined the roof parts and are happy with the way they look in the preview square, you can Generate the roof. To be able to generate the roof, Roofing needs two more pieces of information: What set of tiles to use, and what height to place the lowest roof tiles at. Pick the tile set (as defined in rooftiles.cfg) and input the height. Height 20 is normal roof height for houses with a floor at height 0 and walls starting at height 1. You can then either Generate the roof directly or do a Test generation first. A Test generation will only place the corner tiles of the roof so you can see if placement looks right. After placing the corner tiles you have the option of placing the remaining tiles too or abort. You will have to manually remove the corner tiles if you choose to abort. ****************** * Copyright info * ****************** ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 * Parts Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** --- NEW FILE: RoofImage.cpp --- // RoofImage.cpp : implementation file // /* ********************************************************************** * Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #include "stdafx.h" #include "drewsky.h" #include "RoofImage.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRoofImage CRoofImage::CRoofImage() { m_data = 0; m_w = m_h = 0; } CRoofImage::~CRoofImage() { if(m_data) delete [] m_data; } BEGIN_MESSAGE_MAP(CRoofImage, CStatic) //{{AFX_MSG_MAP(CRoofImage) ON_WM_PAINT() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRoofImage message handlers void CRoofImage::OnPaint() { CPaintDC dc(this); // device context for painting CRect rc; GetClientRect(&rc); dc.FillSolidRect(&rc, RGB(0xc0, 0xc0, 0xc0)); if(m_data && m_w && m_h) { int dw, dh; dw = rc.Width() / m_w; dh = rc.Height() / m_h; if(dh > dw) dh = dw; else dw = dh; CPoint base; base.x = (rc.Width() - m_w * dw) / 2; base.y = (rc.Height() - m_h * dh) / 2; int i, j, p = 0; for(j = 0; j < m_h; j++) { rc.top = j * dh + base.y; rc.bottom = (j+1) * dh + base.y; for(i = 0; i < m_w; i++) { rc.left = i * dw + base.x; rc.right = (i+1) * dw + base.x; if(m_data[p] > 0) { dc.FillSolidRect(&rc, RGB(0, 0, (m_data[p] * 10) + 100)); } else if(m_data[p] < 0) { dc.FillSolidRect(&rc, RGB((-m_data[p] * 10) + 100, 0, 0)); } p++; } } } } --- NEW FILE: RoofImage.h --- #if !defined(AFX_ROOFIMAGE_H__4435E472_30C7_4D86_8F17_1457D2CBD22F__INCLUDED_) #define AFX_ROOFIMAGE_H__4435E472_30C7_4D86_8F17_1457D2CBD22F__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // RoofImage.h : header file // /* ********************************************************************** * Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ ///////////////////////////////////////////////////////////////////////////// // CRoofImage window class CRoofImage : public CStatic { // Construction public: CRoofImage(); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CRoofImage) //}}AFX_VIRTUAL // Implementation public: int m_h; int m_w; char * m_data; virtual ~CRoofImage(); // Generated message map functions protected: //{{AFX_MSG(CRoofImage) afx_msg void OnPaint(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ROOFIMAGE_H__4435E472_30C7_4D86_8F17_1457D2CBD22F__INCLUDED_) --- NEW FILE: RoofingDlg.cpp --- // RoofingDlg.cpp : implementation file // /* ********************************************************************** * Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #include "stdafx.h" #include "drewsky.h" #include "RoofingDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRoofingDlg dialog CRoofingDlg::CRoofingDlg(CWnd* pParent /*=NULL*/) : CDialog(CRoofingDlg::IDD, pParent) { //{{AFX_DATA_INIT(CRoofingDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT FILE *f = fopen("rooftiles.cfg", "rt"); if(!f) return; char line[128]; int flags, id; TileSet *ts = 0; while(fgets(line, 128, f)) { if(line[0] == '[') { ts = new TileSet; ts->name = strtok(line, "[]\r\n"); m_tilesets.AddTail(ts); } else if(ts && sscanf(line, "%x %x", &flags, &id) == 2) { ts->tiles.AddTail(TileMask(flags, (short)id)); } } fclose(f); } void CRoofingDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CRoofingDlg) DDX_Control(pDX, IDC_TESTGEN, m_testgen); DDX_Control(pDX, IDC_NOSCRIPT, m_noscript); DDX_Control(pDX, IDC_TENT, m_tent); DDX_Control(pDX, IDC_ROOFTYPE, m_rooftype); DDX_Control(pDX, IDC_CLEAR, m_clear); DDX_Control(pDX, IDC_REMOVELAST, m_removelast); DDX_Control(pDX, IDC_HEIGHT, m_height); DDX_Control(pDX, IDC_GENERATE, m_generate); DDX_Control(pDX, IDC_ADD, m_add); DDX_Control(pDX, IDC_UP, m_up); DDX_Control(pDX, IDC_ROOFIMAGE, m_roofimage); DDX_Control(pDX, IDC_Y2, m_y2); DDX_Control(pDX, IDC_Y1, m_y1); DDX_Control(pDX, IDC_X2, m_x2); DDX_Control(pDX, IDC_X1, m_x1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CRoofingDlg, CDialog) //{{AFX_MSG_MAP(CRoofingDlg) ON_BN_CLICKED(IDC_ADD, OnAdd) ON_BN_CLICKED(IDC_CLEAR, OnClear) ON_BN_CLICKED(IDC_GENERATE, OnGenerate) ON_BN_CLICKED(IDC_REMOVELAST, OnRemovelast) ON_EN_CHANGE(IDC_X1, OnChangeX1) ON_EN_CHANGE(IDC_X2, OnChangeX2) ON_EN_CHANGE(IDC_Y1, OnChangeY1) ON_EN_CHANGE(IDC_Y2, OnChangeY2) ON_EN_CHANGE(IDC_HEIGHT, OnChangeHeight) ON_BN_CLICKED(IDC_TESTGEN, OnTestgen) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRoofingDlg message handlers void ShowRoofing() { CRoofingDlg dlg; dlg.DoModal(); } void CRoofingDlg::OnAdd() { Edge e; e.rc.left = GetDlgItemInt(IDC_X1); e.rc.top = GetDlgItemInt(IDC_Y1); e.rc.right = GetDlgItemInt(IDC_X2); e.rc.bottom = GetDlgItemInt(IDC_Y2); e.up = !!m_up.GetCheck(); e.tent = !!m_tent.GetCheck(); e.rc.NormalizeRect(); if(e.rc.Height() && e.rc.Width()) { if(!e.up && (e.rc.bottom - e.rc.top) % 2 || e.up && (e.rc.right - e.rc.left) % 2) { if(MessageBox("This roof isn't odd wide - it'll look weird. Do it anyway?", 0, MB_YESNO) == IDNO) return; } } else if(!e.rc.Height() && !e.rc.Width()) { MessageBox("Can't add an empty rectangle"); return; } else if(e.rc.Height() && (e.rc.bottom - e.rc.top) % 2 || e.rc.Width() && (e.rc.right - e.rc.left) % 2) { if(MessageBox("This roof isn't odd wide - it'll look weird. Do it anyway?", 0, MB_YESNO) == IDNO) return; } POSITION pos; pos = m_edges.GetHeadPosition(); while(pos) { Edge& eo = m_edges.GetNext(pos); if(eo.rc == e.rc && eo.up == e.up) { MessageBox("You have already added these coordinates"); return; } } m_edges.AddTail(e); if(!Calculate()) { MessageBox("Sorry, can't roof those coordinates"); m_edges.RemoveTail(); Calculate(); } CheckRemove(); CheckGenerate(); m_roofimage.RedrawWindow(); } void CRoofingDlg::OnClear() { m_edges.RemoveAll(); Calculate(); CheckRemove(); CheckGenerate(); m_roofimage.RedrawWindow(); } // Generate the roof height map in m_roofimage.m_data bool CRoofingDlg::Calculate() { int i; POSITION pos; CRect bounds; pos = m_edges.GetHeadPosition(); if(m_roofimage.m_data) delete [] m_roofimage.m_data; m_roofimage.m_data = 0; if(!pos) { return true; } bounds = m_edges.GetNext(pos).rc; while(pos) { Edge& e = m_edges.GetNext(pos); if(bounds.left > e.rc.left) bounds.left = e.rc.left; if(bounds.top > e.rc.top) bounds.top = e.rc.top; if(bounds.right < e.rc.right) bounds.right = e.rc.right; if(bounds.bottom < e.rc.bottom) bounds.bottom = e.rc.bottom; } if(bounds.Width() > 150 || bounds.Height() > 150) return false; m_roofimage.m_w = bounds.Width()+3; m_roofimage.m_h = bounds.Height()+3; m_roofimage.m_data = new char[m_roofimage.m_w * m_roofimage.m_h]; memset(m_roofimage.m_data, 0, m_roofimage.m_w * m_roofimage.m_h); m_base = bounds.TopLeft() + CPoint(-1, -1); pos = m_edges.GetHeadPosition(); bounds -= m_base; while(pos) { Edge e = m_edges.GetNext(pos); e.rc -= m_base; if(e.rc.Width() && e.rc.Height()) { if(e.up) { for(i = 0; i < e.rc.Height()+1; i++) { AddVX(e.rc.left, e.rc.right, e.rc.top + i, e.tent ? min(i+1, e.rc.Height() + 1 - i) : 1000); } } else { for(i = 0; i < e.rc.Width()+1; i++) { AddVY(e.rc.top, e.rc.bottom, e.rc.left + i, e.tent ? min(i+1, e.rc.Width() + 1 - i) : 1000); } } } else if(e.rc.Width()) { int maxh = e.tent ? 1 : 1000; if(e.up) { while(1) { if(!AddVX(e.rc.left, e.rc.right, e.rc.top, maxh)) break; maxh++; if(++e.rc.top >= bounds.bottom) return false; } } else { while(1) { if(!AddVX(e.rc.left, e.rc.right, e.rc.top, maxh)) break; maxh++; if(--e.rc.top < 0) return false; } } } else { int maxh = e.tent ? 1 : 1000; if(e.up) { while(1) { if(!AddVY(e.rc.top, e.rc.bottom, e.rc.left, maxh)) break; maxh++; if(++e.rc.left >= bounds.right) return false; } } else { while(1) { if(!AddVY(e.rc.top, e.rc.bottom, e.rc.left, maxh)) break; maxh++; if(--e.rc.left < 0) return false; } } } } return true; } // Add V formed roof, but only if higher than existing roof // return whether anything was added bool CRoofingDlg::AddVX(int x1, int x2, int y, int hlimit) { bool added = false; int h = 1; while(x2 >= x1) { if(m_roofimage.m_data[x2 + y*m_roofimage.m_w] < h) { m_roofimage.m_data[x2 + y*m_roofimage.m_w] = h; added = true; } if(m_roofimage.m_data[x1 + y*m_roofimage.m_w] < h) { m_roofimage.m_data[x1 + y*m_roofimage.m_w] = h; added = true; } x1++, x2--; if(h < hlimit) h++; } return added; } // Add V formed roof, but only if higher than existing roof // return whether anything was added bool CRoofingDlg::AddVY(int y1, int y2, int x, int hlimit) { bool added = false; int h = 1; while(y2 >= y1) { if(m_roofimage.m_data[x + y2*m_roofimage.m_w] < h) { m_roofimage.m_data[x + y2*m_roofimage.m_w] = h; added = true; } if(m_roofimage.m_data[x + y1*m_roofimage.m_w] < h) { m_roofimage.m_data[x + y1*m_roofimage.m_w] = h; added = true; } y1++, y2--; if(h < hlimit) h++; } return added; } void CRoofingDlg::OnGenerate() { Generate(NOTEST); } void CRoofingDlg::OnRemovelast() { m_edges.RemoveTail(); Calculate(); CheckRemove(); m_roofimage.RedrawWindow(); } void CRoofingDlg::OnChangeX1() { CheckAdd(); } void CRoofingDlg::OnChangeX2() { CheckAdd(); } void CRoofingDlg::OnChangeY1() { CheckAdd(); } void CRoofingDlg::OnChangeY2() { CheckAdd(); } void CRoofingDlg::CheckAdd() { if(m_x1.GetWindowTextLength() && m_x2.GetWindowTextLength() && m_y1.GetWindowTextLength() && m_y2.GetWindowTextLength()) { m_add.EnableWindow(true); } else { m_add.EnableWindow(false); } } void CRoofingDlg::CheckGenerate() { if(m_roofimage.m_w && m_roofimage.m_h && m_roofimage.m_data && m_height.GetWindowTextLength()) { m_generate.EnableWindow(true); m_testgen.EnableWindow(true); } else { m_generate.EnableWindow(false); m_testgen.EnableWindow(false); } } void CRoofingDlg::CheckRemove() { if(m_edges.IsEmpty()) { m_removelast.EnableWindow(false); m_clear.EnableWindow(false); } else { m_removelast.EnableWindow(true); m_clear.EnableWindow(true); } } short CRoofingDlg::LookupID(unsigned flags) { POSITION pos; pos = m_tileset->tiles.GetHeadPosition(); while(pos) { TileMask& tm = m_tileset->tiles.GetNext(pos); if((flags & ~tm.flags) == 0) return tm.id; } return 0; } unsigned CRoofingDlg::Compare(char middle, char relative) { if(relative == 0) return EMPTY; if(relative < 0) relative = -relative; if(relative == middle) return EVEN; if(relative < middle) return LOWER; if(relative > middle) return HIGHER; return 0; } void CRoofingDlg::OnChangeHeight() { CheckGenerate(); } CRoofingDlg::~CRoofingDlg() { while(!m_tilesets.IsEmpty()) { delete m_tilesets.RemoveHead(); } } BOOL CRoofingDlg::OnInitDialog() { CDialog::OnInitDialog(); POSITION pos; TileSet *ts = 0; pos = m_tilesets.GetHeadPosition(); while(pos) { ts = m_tilesets.GetNext(pos); m_rooftype.AddString(ts->name); } m_rooftype.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CRoofingDlg::OnTestgen() { if(Generate(TEST)) { if(MessageBox("Would you like to generate the remaining pieces?", 0, MB_YESNO) == IDYES) { Generate(REST); } } } bool CRoofingDlg::Generate(testmodes testmode) { bool usescript = !m_noscript.GetCheck(); int seltype = m_rooftype.GetCurSel(); if(seltype == CB_ERR) { MessageBox("You must select a tile set"); return false; } CString seltypename; m_rooftype.GetLBText(seltype, seltypename); POSITION pos; pos = m_tilesets.GetHeadPosition(); while(pos) { TileSet* ts = m_tilesets.GetNext(pos); if(seltypename == ts->name) { m_tileset = ts; break; } } short *roofids = new short[m_roofimage.m_w * m_roofimage.m_h]; int i; bool fail = false; for(i = 0; i < m_roofimage.m_w * m_roofimage.m_h; i++) { if(m_roofimage.m_data[i] < 0) m_roofimage.m_data[i] = -m_roofimage.m_data[i]; } for(i = 0; i < m_roofimage.m_w * m_roofimage.m_h; i++) { if(m_roofimage.m_data[i] == 0) { roofids[i] = 0; } else { unsigned flags; flags = GetFlags(m_roofimage.m_data + i - m_roofimage.m_w, m_roofimage.m_data + i, m_roofimage.m_data + i + m_roofimage.m_w); roofids[i] = LookupID(flags); if(roofids[i] == 0) { m_roofimage.m_data[i] = -m_roofimage.m_data[i]; fail = true; } if(testmode) { bool corner = !(flags & ~0x88878778) || !(flags & ~0x88887877) || !(flags & ~0x77878888) || !(flags & ~0x87787888) || !(flags & ~0x87777777) || !(flags & ~0x77877777) || !(flags & ~0x77777877) || !(flags & ~0x77777778); if(testmode == TEST && !corner) roofids[i] = 0; if(testmode == REST && corner) roofids[i] = 0; } } } if(fail) { m_roofimage.RedrawWindow(); if(MessageBox("Generation failed, missing roof pieces marked red - generate anyway?", 0, MB_YESNO) == IDNO) { delete [] roofids; return false; } } int baseheight = GetDlgItemInt(IDC_HEIGHT); int j, p = 0; int dx, dy; CString cmd; for(j = 0; j < m_roofimage.m_h; j++) { for(i = 0; i < m_roofimage.m_w; i++, p++) { if(!roofids[p]) continue; for(dx = 1; dx + i < m_roofimage.m_w; dx++) if(roofids[p + dx] != roofids[p] || m_roofimage.m_data[p] != m_roofimage.m_data[p + dx]) break; for(dy = 1; dy + j < m_roofimage.m_h; dy++) if(roofids[p + m_roofimage.m_w * dy] != roofids[p] || m_roofimage.m_data[p] != m_roofimage.m_data[p + m_roofimage.m_w * dy]) break; dx--, dy--; if(dx > 0 || dy > 0) { cmd.Format(".tile %d 0%x", baseheight + 3 * m_roofimage.m_data[p] - 3, (unsigned short)roofids[p]); SendToUO(cmd); if(usescript) { cmd.Format(".f_roof_target %d,%d", m_base.x + i, m_base.y + j); SendToUO(cmd); } else { cmd.Format(".go %d,%d", m_base.x + i, m_base.y + j); SendToUO(cmd); SendToUO(".self"); } if(dy > dx) { if(usescript) { cmd.Format(".f_roof_target %d,%d", m_base.x + i, m_base.y + j + dy); SendToUO(cmd); } else { cmd.Format(".go %d,%d", m_base.x + i, m_base.y + j + dy); SendToUO(cmd); SendToUO(".self"); } while(dy >= 0) { roofids[p + m_roofimage.m_w * dy--] = 0; } } else { if(usescript) { cmd.Format(".f_roof_target %d,%d", m_base.x + i + dx, m_base.y + j); SendToUO(cmd); } else { cmd.Format(".go %d,%d", m_base.x + i + dx, m_base.y + j); SendToUO(cmd); SendToUO(".self"); } while(dx >= 0) { roofids[p + dx--] = 0; } i += dx; p += dx; } } else { cmd.Format(".static 0%x", (unsigned short)roofids[p]); SendToUO(cmd); if(usescript) { cmd.Format(".f_roof_target %d,%d,%d", m_base.x + i, m_base.y + j, baseheight + 3 * m_roofimage.m_data[p] - 3 - 1); SendToUO(cmd); } else { cmd.Format(".go %d,%d,%d", m_base.x + i, m_base.y + j, baseheight + 3 * m_roofimage.m_data[p] - 3 - 1); SendToUO(cmd); SendToUO(".self"); } roofids[p] = 0; } } } delete [] roofids; return true; } unsigned CRoofingDlg::GetFlags(char *pline, char *line, char *nline) { unsigned flags = 0; flags |= Compare(line[0], pline[-1]); flags <<= 4; flags |= Compare(line[0], pline[0]); flags <<= 4; flags |= Compare(line[0], pline[1]); flags <<= 4; flags |= Compare(line[0], line[-1]); flags <<= 4; flags |= Compare(line[0], line[1]); flags <<= 4; flags |= Compare(line[0], nline[-1]); flags <<= 4; flags |= Compare(line[0], nline[0]); flags <<= 4; flags |= Compare(line[0], nline[1]); return flags; } --- NEW FILE: RoofingDlg.h --- #if !defined(AFX_ROOFINGDLG_H__4ABBCED2_5D10_4A1E_8D2E_F7D32A8C0137__INCLUDED_) #define AFX_ROOFINGDLG_H__4ABBCED2_5D10_4A1E_8D2E_F7D32A8C0137__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // RoofingDlg.h : header file // /* ********************************************************************** * Copyright (C) Adron 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * ********************************************************************** */ #include "RoofImage.h" ///////////////////////////////////////////////////////////////////////////// // CRoofingDlg dialog class CRoofingDlg : public CDialog { // Construction public: enum testmodes {NOTEST=0, TEST=1, REST=2}; unsigned GetFlags(char *pline, char *line, char *nline); bool Generate(testmodes testmode); virtual ~CRoofingDlg(); CPoint m_base; unsigned Compare(char middle, char relative); short LookupID(unsigned flags); void CheckRemove(); void CheckGenerate(); void CheckAdd(); bool AddVY(int y1, int y2, int x, int hlimit=1000); bool AddVX(int x1, int x2, int y, int hlimit=1000); bool Calculate(); struct Edge { CRect rc; // Corners bool up; // Goes in up direction ? bool tent; // Tent style roof ? }; struct TileMask { unsigned flags; short id; TileMask(unsigned f, short i) : flags(f), id(i) {} TileMask() : flags(0), id(0) {} }; struct TileSet { CString name; CList<TileMask, TileMask&> tiles; }; CList<TileSet*, TileSet*&> m_tilesets; CList<Edge, Edge&> m_edges; CRoofingDlg(CWnd* pParent = NULL); // standard constructor TileSet *m_tileset; enum flagsenum {LOWER=1, HIGHER=2, EVEN=4, EMPTY=8}; // Dialog Data //{{AFX_DATA(CRoofingDlg) enum { IDD = IDD_ROOFING }; CButton m_testgen; CButton m_noscript; CButton m_tent; CComboBox m_rooftype; CButton m_clear; CButton m_removelast; CEdit m_height; CButton m_generate; CButton m_add; CButton m_up; CRoofImage m_roofimage; CEdit m_y2; CEdit m_y1; CEdit m_x2; CEdit m_x1; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CRoofingDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CRoofingDlg) afx_msg void OnAdd(); afx_msg void OnClear(); afx_msg void OnGenerate(); afx_msg void OnRemovelast(); afx_msg void OnChangeX1(); afx_msg void OnChangeX2(); afx_msg void OnChangeY1(); afx_msg void OnChangeY2(); afx_msg void OnChangeHeight(); virtual BOOL OnInitDialog(); afx_msg void OnTestgen(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ROOFINGDLG_H__4ABBCED2_5D10_4A1E_8D2E_F7D32A8C0137__INCLUDED_) --- NEW FILE: rooftiles.cfg --- # Definition file for Roofer # Use this to specify what tiles to use depending on surrounding tiles # # Syntax: # <flags> <itemid> # # The flags specify conditions for each of the surrounding tiles. # Each flag position corresponds to one tile like this: # # Flag # # 12345678 # # Position # # 123 # 4 5 # 678 # # # # The flags are a hex bitmask of valid relations for the tile: # 1 = Tile is lower # 2 = Tile is higher # 4 = Tile is same height # 8 = No tile in this position # # Some of the most used combinations are: # # f = 1 + 2 + 4 + 8 = any tile # c = 4 + 8 = same height or no tile # a = 2 + 8 = higher or no tile # 9 = 1 + 8 = lower or no tile # # # # An example: # # 9c9cc9c9 5ae # # 9c9 # c c # 9c9 # # Tileid 5ae will be used when the direct neighbours are at the same height # and the diagonal neighbours are lower - the top center piece of an X roof # It can be used even if any of the neighbours are missing # # [Thatch Roof] fcfa9fcf 5a4 fcf99fcf 5a5 fcf9afcf 5a6 fafccf9f 5a7 f9fccf9f 5a8 f9fccfaf 5a9 aaaca9ca 5aa ac9acaaa 5ab 9cacaaaa 5ac aaaacac9 5ad 9c9cc9c9 5ae 9c9cc999 5af 999cc9c9 5b0 9c9c99c9 5b1 9c99c9c9 5b2 9c9ccaaa 5a9 aaacc9c9 5a7 9caca9ca 5a6 ac9acac9 5a4 [Wooden Shingles] dcd99dcd 5c2 ecdedecd 5c3 dcededce 5c4 a2ac29ca 5c5 ac92ca2a 5c6 9cac2a2a 5c7 a2a2cac9 5c8 9c9cc9c9 5c9 9c9cc999 5ca 999cc9c9 5cb 9c9c99c9 5cc 9c99c9c9 5cd d9dccd9d 5ce eeeccddd 5cf dddcceee 5d0 dcc9cdc1 5c2 dc19cdcc 5c2 1cdc9ccd 5c2 ccdc91cd 5c2 cc1ccd9d 5ce 1ccccd9d 5ce d9dcccc1 5ce d9dcc1cc 5ce [Blue Tent Roof] 74712747 5ff 71744727 600 72744717 601 74721747 602 71744717 603 64141111 604 11141641 605 11114146 606 14614111 607 11111111 608 11141111 609 11114111 60a 74711747 64c 14111111 64d 11111141 64e f4782f47 60b f8f44727 60c 74f2874f 60d 72744f8f 60e 24848888 60f 88884842 610 88848248 611 84284888 612 74744717 613 71744747 614 74741747 633 74714747 634 [Blue Tent Roof (incomplete)] fcf9afcf 5ff f9fccfaf 600 fafccf9f 601 fcfa9fcf 602 f9fccf9f 603 ac9c9999 604 999c9ac9 605 9999c9ca 606 9ca9c999 607 99999999 608 999c9999 609 9999c999 60a fcf99fcf 64c 9c999999 64d 999999c9 64e [White Tent Roof (incomplete)] fcf9afcf 65e f9fccfaf 65f fafccf9f 660 fcfa9fcf 661 f9fccf9f 662 ac9c9999 663 999c9ac9 664 9999c9ca 665 9ca9c999 666 99999999 667 999c9999 668 9999c999 669 fcf99fcf 648 9c999999 649 999999c9 64a [Green Tent Roof (incomplete)] fcf9afcf 617 f9fccfaf 618 fafccf9f 619 fcfa9fcf 61a f9fccf9f 61b ac9c9999 61c 999c9ac9 61d 9999c9ca 61e 9ca9c999 61f 99999999 620 999c9999 621 9999c999 622 fcf99fcf 64f 9c999999 650 999999c9 651 Index: Drewsky.dsp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.dsp,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -r1.22 -r1.22.2.1 *** Drewsky.dsp 1 May 2002 04:21:46 -0000 1.22 --- Drewsky.dsp 29 May 2002 15:47:57 -0000 1.22.2.1 *************** *** 59,63 **** # Begin Special Build Tool SOURCE="$(InputPath)" ! PostBuild_Cmds=copy Release\axis.exe install\ copy axis.txt install\ copy hlp\axis.hlp install\ copy hlp\axis.cnt install\ copy ..\axissvr\gwhogsvr\axissvr.exe install\ copy ..\axissvr\axissvr.cfg install\ copy ..\UOMap\Release\UOMap.ocx install\ copy ..\UOArt\Release\UOArt.ocx install\ copy AMPatch\Release\AMPatch.exe install\ copy LICENSE install\ # End Special Build Tool --- 59,63 ---- # Begin Special Build Tool SOURCE="$(InputPath)" ! PostBuild_Cmds=copy Release\axis.exe install\ copy axis.txt install\ copy hlp\axis.hlp install\ copy hlp\axis.cnt install\ copy ..\axissvr\gwhogsvr\axissvr.exe install\ copy ..\axissvr\axissvr.cfg install\ copy ..\UOMap\Release\UOMap.ocx install\ copy ..\UOArt\Release\UOArt.ocx install\ copy AMPatch\Release\AMPatch.exe install\ copy LICENSE install\ # End Special Build Tool *************** *** 118,122 **** SOURCE="$(InputPath)" PostBuild_Desc=Moving files to install directory ! PostBuild_Cmds=copy Release\axis.exe install\ copy axis.txt install\ copy hlp\axis.hlp install\ copy hlp\axis.cnt install\ copy ..\axissvr\gwhogsvr\axissvr.exe install\ copy ..\axissvr\axissvr.cfg install\ # End Special Build Tool --- 118,122 ---- SOURCE="$(InputPath)" PostBuild_Desc=Moving files to install directory ! PostBuild_Cmds=copy Release\axis.exe install\ copy axis.txt install\ copy hlp\axis.hlp install\ copy hlp\axis.cnt install\ copy ..\axissvr\gwhogsvr\axissvr.exe install\ copy ..\axissvr\axissvr.cfg install\ # End Special Build Tool *************** *** 407,410 **** --- 407,418 ---- # Begin Source File + SOURCE=.\RoofImage.cpp + # End Source File + # Begin Source File + + SOURCE=.\RoofingDlg.cpp + # End Source File + # Begin Source File + SOURCE=.\ScriptEditDlg.cpp # End Source File *************** *** 752,755 **** --- 760,771 ---- # Begin Source File + SOURCE=.\RoofImage.h + # End Source File + # Begin Source File + + SOURCE=.\RoofingDlg.h + # End Source File + # Begin Source File + SOURCE=.\ScriptEditDlg.h # End Source File *************** *** 967,972 **** --- 983,1000 ---- SOURCE=.\ReadMe.txt # End Source File + # Begin Source File + + SOURCE=.\rooftiles.cfg + # End Source File # End Target # End Project + # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} + # 2:21:DefaultSinkHeaderFile:uomap.h + # 2:16:DefaultSinkClass:CUOMap + # End Section + # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} + # 2:21:DefaultSinkHeaderFile:uoart.h + # 2:16:DefaultSinkClass:CUOArt + # End Section # Section drewsky : {2B360722-F116-4004-A71A-5E14B4C4873E} # 2:5:Class:CUOMap *************** *** 978,988 **** # 2:10:HeaderFile:uoart.h # 2:8:ImplFile:uoart.cpp - # End Section - # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} - # 2:21:DefaultSinkHeaderFile:uoart.h - # 2:16:DefaultSinkClass:CUOArt - # End Section - # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} - # 2:21:DefaultSinkHeaderFile:uomap.h - # 2:16:DefaultSinkClass:CUOMap # End Section --- 1006,1008 ---- Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -C2 -r1.25 -r1.25.2.1 *** drewsky.rc 2 May 2002 22:19:57 -0000 1.25 --- drewsky.rc 29 May 2002 15:47:58 -0000 1.25.2.1 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // Last compiled 5/2/2002 at 16:17:10 #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // #include "resource.h" *************** *** 88,92 **** ICON IDR_MAINFRAME,IDC_STATIC,11,13,20,20 LTEXT "Static",IDC_ABOUTTITLE,40,7,133,8,SS_NOPREFIX ! LTEXT "© 1998-2002 Philip A. Esterle",IDC_STATIC,40,18,94,8 DEFPUSHBUTTON "OK",IDOK,217,7,32,14,WS_GROUP LTEXT "Built on",IDC_STATIC,40,29,24,8 --- 88,93 ---- ICON IDR_MAINFRAME,IDC_STATIC,11,13,20,20 LTEXT "Static",IDC_ABOUTTITLE,40,7,133,8,SS_NOPREFIX ! LTEXT "© 1998-2002 Philip A. Esterle + parts © 2002 Adron", ! IDC_STATIC,40,18,168,8 DEFPUSHBUTTON "OK",IDOK,217,7,32,14,WS_GROUP LTEXT "Built on",IDC_STATIC,40,29,24,8 *************** *** 589,592 **** --- 590,594 ---- PUSHBUTTON "Start Sphere Server",IDC_STARTTUS,222,27,77,14 PUSHBUTTON "Export Categories",IDC_EXPORTCATS,222,41,77,14 + PUSHBUTTON "Roofing",IDC_ROOFING,349,72,40,14 END *************** *** 2244,2247 **** --- 2246,2280 ---- END + IDD_ROOFING DIALOG DISCARDABLE 0, 0, 243, 221 + STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Roofing" + FONT 8, "MS Sans Serif" + BEGIN + LTEXT "X1",IDC_STATIC,23,149,10,8 + EDITTEXT IDC_X1,39,147,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Y1",IDC_STATIC,82,149,10,8 + EDITTEXT IDC_Y1,98,147,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "X2",IDC_STATIC,23,169,10,8 + EDITTEXT IDC_X2,39,167,33,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Y2",IDC_STATIC,82,169,10,8 + EDITTEXT IDC_Y2,98,167,33,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Goes &up",IDC_UP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 143,148,55,11 + DEFPUSHBUTTON "&Add Part",IDC_ADD,98,188,53,15,WS_DISABLED + PUSHBUTTON "&Remove Last",IDC_REMOVELAST,19,188,53,15,WS_DISABLED + PUSHBUTTON "&Clear",IDC_CLEAR,173,17,41,15,WS_DISABLED + COMBOBOX IDC_ROOFTYPE,159,41,77,64,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + LTEXT "&Height",IDC_STATIC,163,94,23,10 + EDITTEXT IDC_HEIGHT,192,93,35,12,ES_AUTOHSCROLL | ES_NUMBER + PUSHBUTTON "&Generate",IDC_GENERATE,195,114,41,15,WS_DISABLED + CONTROL "",IDC_ROOFIMAGE,"Static",SS_BLACKFRAME,7,7,146,130 + CONTROL "&Tent roof",IDC_TENT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,143,168,55,11 + PUSHBUTTON "Test",IDC_TESTGEN,156,114,35,15,WS_DISABLED + CONTROL "No script support",IDC_NOSCRIPT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,167,205,69,9 + END + #ifndef _MAC *************** *** 2817,2820 **** --- 2850,2869 ---- TOPMARGIN, 7 BOTTOMMARGIN, 82 + END + + IDD_ROOFING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 236 + VERTGUIDE, 33 + VERTGUIDE, 39 + VERTGUIDE, 92 + VERTGUIDE, 98 + VERTGUIDE, 143 + TOPMARGIN, 7 + BOTTOMMARGIN, 214 + HORZGUIDE, 99 + HORZGUIDE, 153 + HORZGUIDE, 173 END END Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -r1.5 -r1.5.2.1 *** MISCTAB.CPP 1 May 2002 03:33:10 -0000 1.5 --- MISCTAB.CPP 29 May 2002 15:47:58 -0000 1.5.2.1 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 683,686 **** --- 684,688 ---- ON_BN_CLICKED(IDC_RCONSOLE, OnRconsole) ON_BN_CLICKED(IDC_NUKECHAR, OnNukechar) + ON_BN_CLICKED(IDC_ROOFING, OnRoofing) ON_BN_CLICKED(IDC_STARTTUS, OnStarttus) ON_BN_CLICKED(IDC_EXPORTCATS, OnExportcats) *************** *** 913,916 **** --- 915,924 ---- { SendToUO(".nukechar"); + } + + void CMiscTab::OnRoofing() + { + void ShowRoofing(); + ShowRoofing(); } Index: MISCTAB.H =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.H,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -r1.3 -r1.3.2.1 *** MISCTAB.H 1 May 2002 03:33:10 -0000 1.3 --- MISCTAB.H 29 May 2002 15:47:58 -0000 1.3.2.1 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 95,98 **** --- 96,100 ---- afx_msg void OnRconsole(); afx_msg void OnNukechar(); + afx_msg void OnRoofing(); afx_msg void OnStarttus(); afx_msg void OnExportcats(); Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -r1.22 -r1.22.2.1 *** resource.h 2 May 2002 22:19:57 -0000 1.22 --- resource.h 29 May 2002 15:47:58 -0000 1.22.2.1 *************** *** 86,89 **** --- 86,90 ---- #define IDD_STATIC_ART_CRITERIA 229 #define IDD_REMOTE_CONSOLE_LOGIN_DLG 232 + #define IDD_ROOFING 233 #define IDC_BUTTON1 1001 #define IDC_BLOCK 1001 *************** *** 116,119 **** --- 117,121 ---- #define IDC_STATIC_ADD 1001 #define IDC_STATIC_ART_ADD 1001 + #define IDC_ADD 1001 #define IDC_BUTTON6 1002 #define IDC_SETHEARALL 1002 *************** *** 138,141 **** --- 140,144 ---- #define IDC_STATIC_REMOVE 1002 #define IDC_STATIC_ART_REMOVE 1002 + #define IDC_CLEAR 1002 #define IDC_BUTTON2 1003 #define IDC_SETALLMOVE 1003 *************** *** 160,163 **** --- 163,167 ---- #define IDC_MOREP 1003 #define IDC_CHANGECLIENT 1003 + #define IDC_TESTGEN 1003 #define IDC_BUTTON3 1004 #define IDC_UNBLOCK 1004 *************** *** 175,178 **** --- 179,183 ---- #define IDC_RC_LOG 1004 #define IDC_LAUNCH_STATIC_TOOL 1004 + #define IDC_REMOVELAST 1004 #define IDC_BUTTON4 1005 #define IDC_FIX 1005 *************** *** 189,192 **** --- 194,198 ---- #define IDC_RC_VERBOSE 1005 #define IDC_REFRESHCATEGORIES 1005 + #define IDC_GENERATE 1005 #define IDC_BUTTON5 1006 #define IDC_SETDETAIL 1006 *************** *** 270,273 **** --- 276,280 ---- #define IDC_CUSTOM_CMD_15 1015 #define IDC_RC_ACCOUNT 1015 + #define IDC_ROOFING 1015 #define IDC_BUTTON16 1016 #define IDC_NUKE 1016 *************** *** 390,393 **** --- 397,401 ---- #define IDC_STATIC_EXISTING 1033 #define IDC_SAVEPWD 1033 + #define IDC_UP 1033 #define IDC_BUTTON33 1034 #define IDC_CHECK2 1034 *************** *** 401,404 **** --- 409,413 ---- #define IDC_DRAWRECTS 1034 #define IDC_CUSTOM_CMD_34 1034 + #define IDC_TENT 1034 #define IDC_BUTTON34 1035 #define IDC_CHECK3 1035 *************** *** 411,414 **** --- 420,424 ---- #define IDC_CUSTOM_CMD_35 1035 #define IDC_NPCNOINDEX 1035 + #define IDC_NOSCRIPT 1035 #define IDC_BUTTON35 1036 #define IDC_CHECK4 1036 *************** *** 602,605 **** --- 612,616 ---- #define IDC_ACCT 1059 #define IDC_LICENSE 1059 + #define IDC_X1 1059 #define IDC_RADIO3 1060 #define IDC_EDIT2 1060 *************** *** 643,646 **** --- 654,658 ---- #define IDC_MC_Y 1060 #define IDC_PWD 1060 + #define IDC_X2 1060 #define IDC_RADIO4 1061 #define IDC_EDIT3 1061 *************** *** 683,686 **** --- 695,699 ---- #define IDC_COMMAND_SEND 1061 #define IDC_TYPELIST 1061 + #define IDC_Y1 1061 #define IDC_RADIO5 1062 #define IDC_EDIT4 1062 *************** *** 720,723 **** --- 733,737 ---- #define IDC_ITEMCOMBO 1062 #define IDC_FILE_FILTER 1062 + #define IDC_Y2 1062 #define IDC_RADIO6 1063 #define IDC_EDIT5 1063 *************** *** 746,749 **** --- 760,764 ---- #define IDC_NPCSPEECH 1063 #define IDC_SAVEPARITY 1063 + #define IDC_HEIGHT 1063 #define IDC_RADIO7 1064 #define IDC_SLIDERVALUE 1064 *************** *** 1252,1255 **** --- 1267,1272 ---- #define IDC_COLORPREVIEW 1392 #define IDC_TEST 1393 + #define IDC_ROOFIMAGE 1394 + #define IDC_ROOFTYPE 1396 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 1284,1290 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 233 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1394 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 1301,1307 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 235 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1397 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -r1.15 -r1.15.2.1 *** settingstab.cpp 2 May 2002 22:19:57 -0000 1.15 --- settingstab.cpp 29 May 2002 15:47:58 -0000 1.15.2.1 *************** *** 4,7 **** --- 4,8 ---- ********************************************************************** * Copyright (C) Philip A. Esterle 1998-2002 + * Modified by Adron 2002 * * This program is free software; you can redistribute it and/or modify *************** *** 65,68 **** --- 66,70 ---- m_bResourcesOnly = FALSE; //}}AFX_DATA_INIT + m_pDlgStaticTool = 0; } Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -r1.12 -r1.12.2.1 *** traveltab.cpp 2 May 2002 22:19:57 -0000 1.12 --- traveltab.cpp 29 May 2002 15:47:58 -0000 1.12.2.1 *************** *** 124,127 **** --- 124,128 ---- m_TravelMap.SetZoomLevel((short) zoom); + m_TravelMap.SetDrawStatics(1); Recenter((short) X, (short) Y); |
From: Philip E. <pes...@us...> - 2002-05-29 03:59:33
|
Update of /cvsroot/sphere-axis/UOMap In directory usw-pr-cvs1:/tmp/cvs-serv4506 Modified Files: UOMap.rc Log Message: new build Index: UOMap.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMap.rc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** UOMap.rc 28 May 2002 19:13:01 -0000 1.7 --- UOMap.rc 29 May 2002 03:59:31 -0000 1.8 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // Last compiled 5/28/2002 at 20:56:59 #include "resource.h" *************** *** 55,60 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,3 ! PRODUCTVERSION 1,2,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 55,60 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,4 ! PRODUCTVERSION 1,2,0,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 74,78 **** VALUE "CompanyName", "MCI WorldCom\0" VALUE "FileDescription", "UOMap ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 3\0" VALUE "InternalName", "UOMap\0" VALUE "LegalCopyright", "Copyright (C) 2001\0" --- 74,78 ---- VALUE "CompanyName", "MCI WorldCom\0" VALUE "FileDescription", "UOMap ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 4\0" VALUE "InternalName", "UOMap\0" VALUE "LegalCopyright", "Copyright (C) 2001\0" *************** *** 82,86 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOMap ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 3\0" VALUE "SpecialBuild", "\0" END --- 82,86 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOMap ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 4\0" VALUE "SpecialBuild", "\0" END |
From: Philip E. <pes...@us...> - 2002-05-29 03:59:20
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv4430 Modified Files: UOArt.rc UOArt.opt Log Message: new build Index: UOArt.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArt.rc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** UOArt.rc 16 May 2002 01:22:45 -0000 1.8 --- UOArt.rc 29 May 2002 03:59:17 -0000 1.9 *************** *** 1,4 **** /* ! // Last compiled 5/15/2002 at 19:22:1 ********************************************************************** --- 1,4 ---- /* ! // Last compiled 5/28/2002 at 20:57:23 ********************************************************************** *************** *** 101,106 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,5 ! PRODUCTVERSION 1,2,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 101,106 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,6 ! PRODUCTVERSION 1,2,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 120,124 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "UOArt ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 5\0" VALUE "InternalName", "UOArt\0" VALUE "LegalCopyright", "Copyright (C) 2000, 2001\0" --- 120,124 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "UOArt ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 6\0" VALUE "InternalName", "UOArt\0" VALUE "LegalCopyright", "Copyright (C) 2000, 2001\0" *************** *** 128,132 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOArt ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 5\0" VALUE "SpecialBuild", "\0" END --- 128,132 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOArt ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 6\0" VALUE "SpecialBuild", "\0" END Index: UOArt.opt =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArt.opt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 Binary files /tmp/cvsJsSBLe and /tmp/cvsUo5lZi differ |
From: Philip E. <pes...@us...> - 2002-05-29 03:58:57
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv4315 Modified Files: drewsky.rc Log Message: new build Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** drewsky.rc 25 May 2002 02:42:20 -0000 1.39 --- drewsky.rc 29 May 2002 03:58:53 -0000 1.40 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // Last compiled 5/24/2002 at 20:36:16 // #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // Last compiled 5/28/2002 at 21:12:22 // #include "resource.h" *************** *** 2327,2332 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,14 ! PRODUCTVERSION 0,13,1,14 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 2327,2332 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,15 ! PRODUCTVERSION 0,13,1,15 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 2346,2350 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 14\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" --- 2346,2350 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 15\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" *************** *** 2353,2357 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 14\0" VALUE "SpecialBuild", "\0" END --- 2353,2357 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 15\0" VALUE "SpecialBuild", "\0" END |
From: Philip E. <pes...@us...> - 2002-05-29 03:12:07
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv25449 Modified Files: uomap.cpp uomap.h Log Message: Added support for new method in UOMap control Index: uomap.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/uomap.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** uomap.cpp 14 May 2002 20:03:35 -0000 1.8 --- uomap.cpp 29 May 2002 03:12:00 -0000 1.9 *************** *** 49,53 **** { short result; ! GetProperty(0x1, VT_I2, (void*)&result); return result; } --- 49,53 ---- { short result; ! GetProperty(0x2, VT_I2, (void*)&result); return result; } *************** *** 55,59 **** void CUOMap::SetZoomLevel(short propVal) { ! SetProperty(0x1, VT_I2, propVal); } --- 55,59 ---- void CUOMap::SetZoomLevel(short propVal) { ! SetProperty(0x2, VT_I2, propVal); } *************** *** 61,65 **** { short result; ! GetProperty(0x2, VT_I2, (void*)&result); return result; } --- 61,65 ---- { short result; ! GetProperty(0x3, VT_I2, (void*)&result); return result; } *************** *** 67,71 **** void CUOMap::SetXCenter(short propVal) { ! SetProperty(0x2, VT_I2, propVal); } --- 67,71 ---- void CUOMap::SetXCenter(short propVal) { ! SetProperty(0x3, VT_I2, propVal); } *************** *** 73,77 **** { short result; ! GetProperty(0x3, VT_I2, (void*)&result); return result; } --- 73,77 ---- { short result; ! GetProperty(0x4, VT_I2, (void*)&result); return result; } *************** *** 79,83 **** void CUOMap::SetYCenter(short propVal) { ! SetProperty(0x3, VT_I2, propVal); } --- 79,83 ---- void CUOMap::SetYCenter(short propVal) { ! SetProperty(0x4, VT_I2, propVal); } *************** *** 85,89 **** { BOOL result; ! GetProperty(0x4, VT_BOOL, (void*)&result); return result; } --- 85,89 ---- { BOOL result; ! GetProperty(0x5, VT_BOOL, (void*)&result); return result; } *************** *** 91,95 **** void CUOMap::SetDrawStatics(BOOL propVal) { ! SetProperty(0x4, VT_BOOL, propVal); } --- 91,107 ---- void CUOMap::SetDrawStatics(BOOL propVal) { ! SetProperty(0x5, VT_BOOL, propVal); ! } ! ! short CUOMap::GetMapFile() ! { ! short result; ! GetProperty(0x1, VT_I2, (void*)&result); ! return result; ! } ! ! void CUOMap::SetMapFile(short propVal) ! { ! SetProperty(0x1, VT_I2, propVal); } *************** *** 99,108 **** void CUOMap::ZoomIn() { ! InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOMap::ZoomOut() { ! InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } --- 111,120 ---- void CUOMap::ZoomIn() { ! InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void CUOMap::ZoomOut() { ! InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } *************** *** 111,115 **** static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } --- 123,127 ---- static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } *************** *** 119,123 **** static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, direction, distance); } --- 131,135 ---- static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, direction, distance); } *************** *** 127,131 **** static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } --- 139,143 ---- static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } *************** *** 135,139 **** static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } --- 147,151 ---- static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } *************** *** 143,147 **** static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } --- 155,159 ---- static BYTE parms[] = VTS_PI2 VTS_PI2; ! InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x, y); } *************** *** 152,156 **** static BYTE parms[] = VTS_I2; ! InvokeHelper(0xc, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; --- 164,168 ---- static BYTE parms[] = VTS_I2; ! InvokeHelper(0xd, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; *************** *** 162,166 **** static BYTE parms[] = VTS_I2; ! InvokeHelper(0xd, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; --- 174,178 ---- static BYTE parms[] = VTS_I2; ! InvokeHelper(0xe, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; *************** *** 172,176 **** static BYTE parms[] = VTS_I2; ! InvokeHelper(0xe, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; --- 184,188 ---- static BYTE parms[] = VTS_I2; ! InvokeHelper(0xf, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x); return result; *************** *** 182,186 **** static BYTE parms[] = VTS_I2; ! InvokeHelper(0xf, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; --- 194,198 ---- static BYTE parms[] = VTS_I2; ! InvokeHelper(0x10, DISPATCH_METHOD, VT_I2, (void*)&result, parms, y); return result; *************** *** 192,196 **** static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x10, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x, y); return result; --- 204,208 ---- static BYTE parms[] = VTS_I2 VTS_I2; ! InvokeHelper(0x11, DISPATCH_METHOD, VT_I2, (void*)&result, parms, x, y); return result; *************** *** 202,206 **** static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x11, DISPATCH_METHOD, VT_I4, (void*)&result, parms, x, y, type, size, color); return result; --- 214,218 ---- static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x12, DISPATCH_METHOD, VT_I4, (void*)&result, parms, x, y, type, size, color); return result; *************** *** 212,216 **** static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x12, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, type, size, color); return result; --- 224,228 ---- static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x13, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, type, size, color); return result; *************** *** 222,226 **** static BYTE parms[] = VTS_I4; ! InvokeHelper(0x13, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; --- 234,238 ---- static BYTE parms[] = VTS_I4; ! InvokeHelper(0x14, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; *************** *** 229,233 **** void CUOMap::RemoveDrawObjects() { ! InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } --- 241,245 ---- void CUOMap::RemoveDrawObjects() { ! InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } *************** *** 237,241 **** static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x15, DISPATCH_METHOD, VT_I4, (void*)&result, parms, xleft, ytop, width, height, mode, color); return result; --- 249,253 ---- static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x16, DISPATCH_METHOD, VT_I4, (void*)&result, parms, xleft, ytop, width, height, mode, color); return result; *************** *** 244,248 **** void CUOMap::RemoveDrawRects() { ! InvokeHelper(0x16, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } --- 256,260 ---- void CUOMap::RemoveDrawRects() { ! InvokeHelper(0x17, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } *************** *** 252,256 **** static BYTE parms[] = VTS_I4; ! InvokeHelper(0x17, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; --- 264,268 ---- static BYTE parms[] = VTS_I4; ! InvokeHelper(0x18, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, index); return result; *************** *** 262,266 **** static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x18, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, width, height, mode, color); return result; --- 274,278 ---- static BYTE parms[] = VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I2 VTS_I4; ! InvokeHelper(0x19, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, x, y, width, height, mode, color); return result; *************** *** 271,275 **** static BYTE parms[] = VTS_BSTR; ! InvokeHelper(0x19, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszClientPath); } --- 283,287 ---- static BYTE parms[] = VTS_BSTR; ! InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, pszClientPath); } *************** *** 278,282 **** { long result; ! InvokeHelper(0x1a, DISPATCH_METHOD, VT_I4, (void*)&result, NULL); return result; } --- 290,309 ---- { long result; ! InvokeHelper(0x1b, DISPATCH_METHOD, VT_I4, (void*)&result, NULL); return result; + } + + short CUOMap::GetMapfile() + { + short result; + InvokeHelper(0x1c, DISPATCH_METHOD, VT_I2, (void*)&result, NULL); + return result; + } + + void CUOMap::SetMapfile(short MapFile) + { + static BYTE parms[] = + VTS_I2; + InvokeHelper(0x1d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, + MapFile); } Index: uomap.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/uomap.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** uomap.h 14 May 2002 20:03:35 -0000 1.9 --- uomap.h 29 May 2002 03:12:01 -0000 1.10 *************** *** 30,36 **** // CUOMap wrapper class ! #ifndef __UOMAP_H__ ! #define __UOMAP_H__ ! class CUOMap : public CWnd --- 30,35 ---- // CUOMap wrapper class ! #ifndef __UOMAP_CTRL__ ! #define __UOMAP_CTRL__ class CUOMap : public CWnd *************** *** 70,73 **** --- 69,74 ---- BOOL GetDrawStatics(); void SetDrawStatics(BOOL); + short GetMapFile(); + void SetMapFile(short); // Operations *************** *** 95,98 **** --- 96,101 ---- void SetClientPath(LPCTSTR pszClientPath); long GetCenterBlock(); + short GetMapfile(); + void SetMapfile(short MapFile); }; |
From: Philip E. <pes...@us...> - 2002-05-28 22:08:46
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv22566 Modified Files: Axis.txt drewskyps.cpp drewskyps.h RemoteConsoleDlg.cpp settingstab.cpp Log Message: The remote console dialog and tray icon now show the profile being used. Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** Axis.txt 28 May 2002 16:33:17 -0000 1.29 --- Axis.txt 28 May 2002 22:08:40 -0000 1.30 *************** *** 25,28 **** --- 25,29 ---- ============================================================================= Changes in version 0.13.2 (in development) + · The remote console dialog and tray icon now show the profile being used. · DEFS are listed instead of IDs (if defined) in the Item and Spawn tabs. · The Account Manager window is now modeless, minimizable, and resizeable. Index: drewskyps.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewskyps.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** drewskyps.cpp 16 May 2002 01:31:57 -0000 1.7 --- drewskyps.cpp 28 May 2002 22:08:40 -0000 1.8 *************** *** 177,181 **** m_nid.uCallbackMessage = WM_USER; m_nid.hIcon = m_hIcon; ! strcpy(m_nid.szTip, Main->GetVersionTitle()); Shell_NotifyIcon(NIM_ADD, &m_nid); m_bModeless = 1; --- 177,183 ---- m_nid.uCallbackMessage = WM_USER; m_nid.hIcon = m_hIcon; ! CString csTip; ! csTip.Format("%s (%s)", Main->GetVersionTitle(), Main->GetProfileString()); ! strcpy(m_nid.szTip, csTip); Shell_NotifyIcon(NIM_ADD, &m_nid); m_bModeless = 1; *************** *** 275,277 **** --- 277,293 ---- } RegCloseKey( hKey ); + } + + void CDrewskyPS::UpdateTip() + { + m_nid.cbSize = sizeof(m_nid); + m_nid.hWnd = this->GetSafeHwnd(); + m_nid.uID = 1; + m_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + m_nid.uCallbackMessage = WM_USER; + m_nid.hIcon = m_hIcon; + CString csTip; + csTip.Format("%s (%s)", Main->GetVersionTitle(), Main->GetProfileString()); + strcpy(m_nid.szTip, csTip); + Shell_NotifyIcon(NIM_MODIFY, &m_nid); } Index: drewskyps.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewskyps.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** drewskyps.h 1 May 2002 03:33:11 -0000 1.3 --- drewskyps.h 28 May 2002 22:08:40 -0000 1.4 *************** *** 63,66 **** --- 63,67 ---- // Implementation public: + void UpdateTip(); void ReloadScripts(); NOTIFYICONDATA m_nid; Index: RemoteConsoleDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteConsoleDlg.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** RemoteConsoleDlg.cpp 10 May 2002 19:22:47 -0000 1.8 --- RemoteConsoleDlg.cpp 28 May 2002 22:08:40 -0000 1.9 *************** *** 173,176 **** --- 173,180 ---- KillTimer(nIDEvent); } + CString csTitle; + csTitle.Format("Remote Console - %s (%s)", Main->GetProfileString(), m_rConsole->IsConnected() ? "connected" : "not connected"); + this->SetWindowText(csTitle); + CDialog::OnTimer(nIDEvent); } Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** settingstab.cpp 25 May 2002 02:42:20 -0000 1.21 --- settingstab.cpp 28 May 2002 22:08:40 -0000 1.22 *************** *** 330,333 **** --- 330,334 ---- CDrewskyPS * hParent = (CDrewskyPS *)this->GetParent(); hParent->ReloadScripts(); + hParent->UpdateTip(); } |
From: Philip E. <pes...@us...> - 2002-05-28 19:13:32
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv6220 Modified Files: UOArtCtl.cpp UOArtCtl.h Log Message: Support for map2 and statics2 Index: UOArtCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** UOArtCtl.cpp 15 May 2002 20:37:12 -0000 1.14 --- UOArtCtl.cpp 28 May 2002 19:13:29 -0000 1.15 *************** *** 598,602 **** break; case ART_MAPPREVIEW: ! if ( m_dwArtIndex >= 0x60000 ) return; break; --- 598,602 ---- break; case ART_MAPPREVIEW: ! if ( m_dwArtIndex >= 0x6E100 ) return; break; *************** *** 604,607 **** --- 604,616 ---- if ( m_sArtType == ART_MAPPREVIEW ) { + // Which map are we on? + m_wDrawFlags = m_wDrawFlags & 0x00FF; // Mask out the map flags + if ( dwIndex > 0x60000 ) + { + m_wDrawFlags |= F_MAP2; + dwIndex -= 0x60000; + } + else + m_wDrawFlags |= F_MAP0; // Draw the surrounding blocks as well. // Determine the x and y values of the block. *************** *** 816,823 **** break; case ART_MAPPREVIEW: ! csDataFile = m_saMulPaths.GetAt(VERFILE_STATICS0); ! csIndexFile = m_saMulPaths.GetAt(VERFILE_STAIDX0); ! csMapFile = m_saMulPaths.GetAt(VERFILE_MAP0); ! dwVerdataSection = VERFILE_STATICS0; LoadArtData(); if ( (m_wDrawFlags & F_SHOWTERRAIN) ) --- 825,842 ---- break; case ART_MAPPREVIEW: ! if ( m_wDrawFlags & F_MAP0 ) ! { ! csDataFile = m_saMulPaths.GetAt(VERFILE_STATICS0); ! csIndexFile = m_saMulPaths.GetAt(VERFILE_STAIDX0); ! csMapFile = m_saMulPaths.GetAt(VERFILE_MAP0); ! dwVerdataSection = VERFILE_STATICS0; ! } ! else ! { ! csDataFile = m_saMulPaths.GetAt(VERFILE_STATICS2); ! csIndexFile = m_saMulPaths.GetAt(VERFILE_STAIDX2); ! csMapFile = m_saMulPaths.GetAt(VERFILE_MAP2); ! dwVerdataSection = VERFILE_STATICS2; ! } LoadArtData(); if ( (m_wDrawFlags & F_SHOWTERRAIN) ) Index: UOArtCtl.h =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** UOArtCtl.h 12 May 2002 16:19:57 -0000 1.10 --- UOArtCtl.h 28 May 2002 19:13:29 -0000 1.11 *************** *** 230,233 **** --- 230,235 ---- #define F_SHOWSTATICS 0x0020 #define F_SHOWDYNAMICS 0x0040 + #define F_MAP0 0x0100 + #define F_MAP2 0x0200 void ReadRegistry(); void DrawArt(short sArtType, CRect bounds, DWORD dwArtIndex, short dx, short dy, short dz, WORD wColor = 0, WORD wFlags = 0); |
From: Philip E. <pes...@us...> - 2002-05-28 19:13:10
|
Update of /cvsroot/sphere-axis/UOMap In directory usw-pr-cvs1:/tmp/cvs-serv5723 Modified Files: Resource.h UOMap.odl UOMap.rc UOMapCtl.cpp UOMapCtl.h UOMapPpg.cpp UOMapPpg.h Log Message: Support for map2 and statics2. Index: Resource.h =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/Resource.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Resource.h 1 May 2002 03:42:44 -0000 1.2 --- Resource.h 28 May 2002 19:13:01 -0000 1.3 *************** *** 1,25 **** - /* - $Id$ - - ********************************************************************** - * Copyright (C) Philip A. Esterle 2000-2002 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - ********************************************************************** - - */ - //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. --- 1,2 ---- *************** *** 35,38 **** --- 12,16 ---- #define IDC_MAPY 203 #define IDC_ZOOMLEVEL 204 + #define IDC_MAPFILE 205 // Next default values for new objects *************** *** 42,46 **** #define _APS_NEXT_RESOURCE_VALUE 201 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 205 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 20,24 ---- #define _APS_NEXT_RESOURCE_VALUE 201 #define _APS_NEXT_COMMAND_VALUE 32768 ! #define _APS_NEXT_CONTROL_VALUE 206 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: UOMap.odl =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMap.odl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** UOMap.odl 1 Sep 2001 17:32:19 -0000 1.3 --- UOMap.odl 28 May 2002 19:13:01 -0000 1.4 *************** *** 28,35 **** //{{AFX_ODL_PROP(CUOMapCtrl) [id(DISPID_READYSTATE), readonly] long ReadyState; ! [id(1)] short ZoomLevel; ! [id(2)] short xCenter; ! [id(3)] short yCenter; ! [id(4)] boolean DrawStatics; //}}AFX_ODL_PROP --- 28,36 ---- //{{AFX_ODL_PROP(CUOMapCtrl) [id(DISPID_READYSTATE), readonly] long ReadyState; ! [id(2)] short ZoomLevel; ! [id(3)] short xCenter; ! [id(4)] short yCenter; ! [id(5)] boolean DrawStatics; ! [id(1)] short MapFile; //}}AFX_ODL_PROP *************** *** 38,63 **** // Use extreme caution when editing this section. //{{AFX_ODL_METHOD(CUOMapCtrl) ! [id(5)] void ZoomIn(); ! [id(6)] void ZoomOut(); ! [id(7)] void SetCenter(short x, short y); ! [id(8)] void Scroll(short direction, short distance); ! [id(9)] void CtrlToMap(short* x, short* y); ! [id(10)] void MapToCtrl(short* x, short* y); ! [id(11)] void GetCenter(short* x, short* y); ! [id(12)] short CtrlToMapX(short x); ! [id(13)] short CtrlToMapY(short y); ! [id(14)] short MapToCtrlX(short x); ! [id(15)] short MapToCtrlY(short y); ! [id(16)] short GetMapHeight(short x, short y); ! [id(17)] long AddDrawObject(short x, short y, short type, short size, long color); ! [id(18)] boolean RemoveDrawObject(short x, short y, short type, short size, long color); ! [id(19)] boolean RemoveDrawObjectAt(long index); ! [id(20)] void RemoveDrawObjects(); ! [id(21)] long AddDrawRect(short xleft, short ytop, short width, short height, short mode, long color); ! [id(22)] void RemoveDrawRects(); ! [id(23)] boolean RemoveDrawRectAt(long index); ! [id(24)] boolean RemoveDrawRect(short x, short y, short width, short height, short mode, long color); ! [id(25)] void SetClientPath(BSTR pszClientPath); ! [id(26)] long GetCenterBlock(); //}}AFX_ODL_METHOD }; --- 39,66 ---- // Use extreme caution when editing this section. //{{AFX_ODL_METHOD(CUOMapCtrl) ! [id(6)] void ZoomIn(); ! [id(7)] void ZoomOut(); ! [id(8)] void SetCenter(short x, short y); ! [id(9)] void Scroll(short direction, short distance); ! [id(10)] void CtrlToMap(short* x, short* y); ! [id(11)] void MapToCtrl(short* x, short* y); ! [id(12)] void GetCenter(short* x, short* y); ! [id(13)] short CtrlToMapX(short x); ! [id(14)] short CtrlToMapY(short y); ! [id(15)] short MapToCtrlX(short x); ! [id(16)] short MapToCtrlY(short y); ! [id(17)] short GetMapHeight(short x, short y); ! [id(18)] long AddDrawObject(short x, short y, short type, short size, long color); ! [id(19)] boolean RemoveDrawObject(short x, short y, short type, short size, long color); ! [id(20)] boolean RemoveDrawObjectAt(long index); ! [id(21)] void RemoveDrawObjects(); ! [id(22)] long AddDrawRect(short xleft, short ytop, short width, short height, short mode, long color); ! [id(23)] void RemoveDrawRects(); ! [id(24)] boolean RemoveDrawRectAt(long index); ! [id(25)] boolean RemoveDrawRect(short x, short y, short width, short height, short mode, long color); ! [id(26)] void SetClientPath(BSTR pszClientPath); ! [id(27)] long GetCenterBlock(); ! [id(28)] short GetMapfile(); ! [id(29)] void SetMapfile(short mapfile); //}}AFX_ODL_METHOD }; Index: UOMap.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMap.rc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** UOMap.rc 12 May 2002 16:18:18 -0000 1.6 --- UOMap.rc 28 May 2002 19:13:01 -0000 1.7 *************** *** 1,27 **** - /* - // Last compiled 5/12/2002 at 10:17:1 - - ********************************************************************** - * Copyright (C) Philip A. Esterle 2000-2002 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - ********************************************************************** - - */ - //Microsoft Developer Studio generated resource script. ! // Last compiled 4/30/2002 at 22:11:0 #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // #include "resource.h" *************** *** 143,146 **** --- 120,125 ---- LTEXT "Initial Zoom Level",IDC_STATIC,7,41,56,8 EDITTEXT IDC_ZOOMLEVEL,77,39,35,12,ES_AUTOHSCROLL + LTEXT "Mapfile",IDC_STATIC,40,55,24,8 + EDITTEXT IDC_MAPFILE,77,53,35,12,ES_AUTOHSCROLL | ES_NUMBER END Index: UOMapCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapCtl.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** UOMapCtl.cpp 12 May 2002 16:17:52 -0000 1.6 --- UOMapCtl.cpp 28 May 2002 19:13:01 -0000 1.7 *************** *** 39,44 **** #endif ! #define UO_X_SIZE 6144 ! #define UO_Y_SIZE 4096 #define UO_X_CENTER (UO_X_SIZE / 2) #define UO_Y_CENTER (UO_Y_SIZE / 2) --- 39,44 ---- #endif ! #define UO_X_SIZE m_maxX ! #define UO_Y_SIZE m_maxY #define UO_X_CENTER (UO_X_SIZE / 2) #define UO_Y_CENTER (UO_Y_SIZE / 2) *************** *** 122,125 **** --- 122,126 ---- BEGIN_DISPATCH_MAP(CUOMapCtrl, COleControl) //{{AFX_DISPATCH_MAP(CUOMapCtrl) + DISP_PROPERTY_EX(CUOMapCtrl, "MapFile", GetMapfile, SetMapfile, VT_I2) DISP_PROPERTY_EX(CUOMapCtrl, "ZoomLevel", GetZoomLevel, SetZoomLevel, VT_I2) DISP_PROPERTY_EX(CUOMapCtrl, "xCenter", GetXCenter, SetXCenter, VT_I2) *************** *** 148,151 **** --- 149,154 ---- DISP_FUNCTION(CUOMapCtrl, "SetClientPath", SetClientPath, VT_EMPTY, VTS_BSTR) DISP_FUNCTION(CUOMapCtrl, "GetCenterBlock", GetCenterBlock, VT_I4, VTS_NONE) + DISP_FUNCTION(CUOMapCtrl, "GetMapfile", GetMapfile, VT_I2, VTS_NONE) + DISP_FUNCTION(CUOMapCtrl, "SetMapfile", SetMapfile, VT_EMPTY, VTS_I2) DISP_STOCKPROP_READYSTATE() //}}AFX_DISPATCH_MAP *************** *** 285,288 **** --- 288,295 ---- SetModifiedFlag(); LoadRadarcol(); + + m_mulfile = 0; + m_maxX = 6144; + m_maxY = 4096; } *************** *** 334,342 **** COleControl::DoPropExchange(pPX); - // TODO: Call PX_ functions for each persistent custom property. PX_Bool(pPX, _T("DrawStatics"), m_bDrawStatics, FALSE); PX_Short(pPX, _T("xCenter"), m_xCenter, UO_X_CENTER); PX_Short(pPX, _T("yCenter"), m_yCenter, UO_Y_CENTER); PX_Short(pPX, _T("ZoomLevel"), m_zoomLevel, 0); } --- 341,349 ---- COleControl::DoPropExchange(pPX); PX_Bool(pPX, _T("DrawStatics"), m_bDrawStatics, FALSE); PX_Short(pPX, _T("xCenter"), m_xCenter, UO_X_CENTER); PX_Short(pPX, _T("yCenter"), m_yCenter, UO_Y_CENTER); PX_Short(pPX, _T("ZoomLevel"), m_zoomLevel, 0); + PX_Short(pPX, _T("MapFile"), m_mapfile, 0); } *************** *** 540,550 **** CString csStaticFileName; ! csMapFileName.Format(_T("%smap0.mul"), m_csUOPath); if (!cfMapFile.Open(csMapFileName, CFile::modeRead | CFile::shareDenyNone)) return; if ( bDrawStatics ) { ! csStaticIdxName.Format(_T("%sstaidx0.mul"), m_csUOPath); ! csStaticFileName.Format(_T("%sstatics0.mul"), m_csUOPath); if (!cfStaticIdx.Open(csStaticIdxName, CFile::modeRead | CFile::shareDenyNone)) { --- 547,557 ---- CString csStaticFileName; ! csMapFileName.Format(_T("%smap%d.mul"), m_csUOPath, m_mulfile); if (!cfMapFile.Open(csMapFileName, CFile::modeRead | CFile::shareDenyNone)) return; if ( bDrawStatics ) { ! csStaticIdxName.Format(_T("%sstaidx%d.mul"), m_csUOPath, m_mulfile); ! csStaticFileName.Format(_T("%sstatics%d.mul"), m_csUOPath, m_mulfile); if (!cfStaticIdx.Open(csStaticIdxName, CFile::modeRead | CFile::shareDenyNone)) { *************** *** 1325,1329 **** CFile fMap; CString csMapFile; ! csMapFile.Format(_T("%smap0.mul"), m_csUOPath); if ( !fMap.Open(csMapFile, CFile::modeRead | CFile::typeBinary | CFile::shareDenyNone) ) return 0; --- 1332,1336 ---- CFile fMap; CString csMapFile; ! csMapFile.Format(_T("%smap%d.mul"), m_csUOPath, m_mulfile); if ( !fMap.Open(csMapFile, CFile::modeRead | CFile::typeBinary | CFile::shareDenyNone) ) return 0; *************** *** 1474,1476 **** --- 1481,1513 ---- long lBlock = ( m_xCenter / 8 ) * 512 + ( m_yCenter / 8); return lBlock; + } + + short CUOMapCtrl::GetMapfile() + { + return m_mulfile; + } + + void CUOMapCtrl::SetMapfile(short mapfile) + { + switch ( mapfile ) + { + case 0: + m_maxX = 6144; + m_maxY = 4096; + break; + case 2: + m_maxX = 2304; + m_maxY = 1600; + break; + default: + // Don't know about this one + return; + } + // Make sure the current coords are within the bounds + if ( m_xCenter > m_maxX ) + m_xCenter = UO_X_CENTER; + if ( m_yCenter > m_maxY ) + m_yCenter = UO_Y_CENTER; + m_mulfile = mapfile; + SetInvalid(); } Index: UOMapCtl.h =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapCtl.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** UOMapCtl.h 1 May 2002 03:42:44 -0000 1.4 --- UOMapCtl.h 28 May 2002 19:13:01 -0000 1.5 *************** *** 117,120 **** --- 117,125 ---- CPoint m_ptMouse; + int m_maxX; + int m_maxY; + + short m_mulfile; + DECLARE_OLECREATE_EX(CUOMapCtrl) // Class factory and guid DECLARE_OLETYPELIB(CUOMapCtrl) // GetTypeInfo *************** *** 134,137 **** --- 139,143 ---- // Dispatch maps //{{AFX_DISPATCH(CUOMapCtrl) + short m_mapfile; afx_msg short GetZoomLevel(); afx_msg void SetZoomLevel(short nNewValue); *************** *** 164,167 **** --- 170,175 ---- afx_msg void SetClientPath(LPCTSTR pszClientPath); afx_msg long GetCenterBlock(); + afx_msg short GetMapfile(); + afx_msg void SetMapfile(short mapfile); //}}AFX_DISPATCH DECLARE_DISPATCH_MAP() *************** *** 182,211 **** enum { //{{AFX_DISP_ID(CUOMapCtrl) ! dispidZoomLevel = 1L, ! dispidXCenter = 2L, ! dispidYCenter = 3L, ! dispidDrawStatics = 4L, ! dispidZoomIn = 5L, ! dispidZoomOut = 6L, ! dispidSetCenter = 7L, ! dispidScroll = 8L, ! dispidCtrlToMap = 9L, ! dispidMapToCtrl = 10L, ! dispidGetCenter = 11L, ! dispidCtrlToMapX = 12L, ! dispidCtrlToMapY = 13L, ! dispidMapToCtrlX = 14L, ! dispidMapToCtrlY = 15L, ! dispidGetMapHeight = 16L, ! dispidAddDrawObject = 17L, ! dispidRemoveDrawObject = 18L, ! dispidRemoveDrawObjectAt = 19L, ! dispidRemoveDrawObjects = 20L, ! dispidAddDrawRect = 21L, ! dispidRemoveDrawRects = 22L, ! dispidRemoveDrawRectAt = 23L, ! dispidRemoveDrawRect = 24L, ! dispidSetClientPath = 25L, ! dispidGetCenterBlock = 26L, //}}AFX_DISP_ID }; --- 190,222 ---- enum { //{{AFX_DISP_ID(CUOMapCtrl) ! dispidZoomLevel = 2L, ! dispidXCenter = 3L, ! dispidYCenter = 4L, ! dispidDrawStatics = 5L, ! dispidMapFile = 1L, ! dispidZoomIn = 6L, ! dispidZoomOut = 7L, ! dispidSetCenter = 8L, ! dispidScroll = 9L, ! dispidCtrlToMap = 10L, ! dispidMapToCtrl = 11L, ! dispidGetCenter = 12L, ! dispidCtrlToMapX = 13L, ! dispidCtrlToMapY = 14L, ! dispidMapToCtrlX = 15L, ! dispidMapToCtrlY = 16L, ! dispidGetMapHeight = 17L, ! dispidAddDrawObject = 18L, ! dispidRemoveDrawObject = 19L, ! dispidRemoveDrawObjectAt = 20L, ! dispidRemoveDrawObjects = 21L, ! dispidAddDrawRect = 22L, ! dispidRemoveDrawRects = 23L, ! dispidRemoveDrawRectAt = 24L, ! dispidRemoveDrawRect = 25L, ! dispidSetClientPath = 26L, ! dispidGetCenterBlock = 27L, ! dispidGetMapfile = 28L, ! dispidSetMapfile = 29L, //}}AFX_DISP_ID }; Index: UOMapPpg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapPpg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UOMapPpg.cpp 1 May 2002 03:42:44 -0000 1.2 --- UOMapPpg.cpp 28 May 2002 19:13:01 -0000 1.3 *************** *** 81,84 **** --- 81,85 ---- m_yCenter = 0; m_sZoomLevel = 0; + m_iMapfile = 0; //}}AFX_DATA_INIT *************** *** 103,106 **** --- 104,109 ---- DDP_Text(pDX, IDC_ZOOMLEVEL, m_sZoomLevel, _T("ZoomLevel") ); DDX_Text(pDX, IDC_ZOOMLEVEL, m_sZoomLevel); + DDP_Text(pDX, IDC_MAPFILE, m_iMapfile, _T("MapFile")); + DDX_Text(pDX, IDC_MAPFILE, m_iMapfile); //}}AFX_DATA_MAP DDP_PostProcessing(pDX); Index: UOMapPpg.h =================================================================== RCS file: /cvsroot/sphere-axis/UOMap/UOMapPpg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UOMapPpg.h 1 May 2002 03:42:44 -0000 1.2 --- UOMapPpg.h 28 May 2002 19:13:01 -0000 1.3 *************** *** 50,53 **** --- 50,54 ---- short m_yCenter; short m_sZoomLevel; + int m_iMapfile; //}}AFX_DATA |
From: Philip E. <pes...@us...> - 2002-05-28 16:33:23
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv14602 Modified Files: Axis.txt CNPC.CPP itemgentab.cpp SPAWNTAB.CPP Log Message: DEFS are listed instead of IDs (if defined) in the Item and Spawn tabs. Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** Axis.txt 25 May 2002 02:46:29 -0000 1.28 --- Axis.txt 28 May 2002 16:33:17 -0000 1.29 *************** *** 25,28 **** --- 25,29 ---- ============================================================================= Changes in version 0.13.2 (in development) + · DEFS are listed instead of IDs (if defined) in the Item and Spawn tabs. · The Account Manager window is now modeless, minimizable, and resizeable. · Axissvr should handle paths in the ALLOWEDPATHS directive better. Specify the complete relative paths (e.g. scripts:scripts\test:etc) Index: CNPC.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CNPC.CPP,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** CNPC.CPP 14 May 2002 20:03:34 -0000 1.9 --- CNPC.CPP 28 May 2002 16:33:17 -0000 1.10 *************** *** 246,249 **** --- 246,250 ---- */ } + m_csDefName = csValue; break; case 1: Index: itemgentab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** itemgentab.cpp 16 May 2002 01:31:57 -0000 1.12 --- itemgentab.cpp 28 May 2002 16:33:17 -0000 1.13 *************** *** 140,144 **** LoadScripts(); this->m_clcItems.InsertColumn(0, "Item Description", LVCFMT_LEFT, 140, -1); ! this->m_clcItems.InsertColumn(1, "ID", LVCFMT_LEFT, 75, -1); WORD wFlags = 0; --- 140,144 ---- LoadScripts(); this->m_clcItems.InsertColumn(0, "Item Description", LVCFMT_LEFT, 140, -1); ! this->m_clcItems.InsertColumn(1, "ID", LVCFMT_LEFT, 140, -1); WORD wFlags = 0; *************** *** 356,361 **** { CSObject * pObject = (CSObject *) pSubsection->m_ItemList.GetNext(pos); this->m_clcItems.InsertItem(iCount, pObject->m_csDescription, 0); ! this->m_clcItems.SetItemText(iCount, 1, pObject->m_csValue); this->m_clcItems.SetItemData(iCount, (DWORD)pObject); iCount++; --- 356,367 ---- { CSObject * pObject = (CSObject *) 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 != "" ) ! 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++; Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** SPAWNTAB.CPP 16 May 2002 01:31:57 -0000 1.12 --- SPAWNTAB.CPP 28 May 2002 16:33:17 -0000 1.13 *************** *** 121,125 **** LoadScripts(); this->m_clcCreatures.InsertColumn(0, "NPC Type", LVCFMT_LEFT, 120, -1); ! this->m_clcCreatures.InsertColumn(1, "ID", LVCFMT_LEFT, 60, -1); CString csValue; --- 121,125 ---- LoadScripts(); this->m_clcCreatures.InsertColumn(0, "NPC Type", LVCFMT_LEFT, 120, -1); ! this->m_clcCreatures.InsertColumn(1, "ID", LVCFMT_LEFT, 120, -1); CString csValue; *************** *** 284,289 **** { CSObject * pObject = (CSObject *) pSubsection->m_ItemList.GetNext(pos); this->m_clcCreatures.InsertItem(iCount, pObject->m_csDescription, 0); ! this->m_clcCreatures.SetItemText(iCount, 1, pObject->m_csValue); this->m_clcCreatures.SetItemData(iCount, (DWORD)pObject); iCount++; --- 284,301 ---- { CSObject * pObject = (CSObject *) pSubsection->m_ItemList.GetNext(pos); + CString csDef; + if ( pObject->m_bType == TYPE_CHAR ) + { + CNPC npc; + npc.CopyBase(pObject); + npc.Load(); + csDef = npc.m_csDefName; + } + this->m_clcCreatures.InsertItem(iCount, pObject->m_csDescription, 0); ! if ( csDef != "" ) ! 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++; |
From: Piotr B. <pio...@us...> - 2002-05-27 07:57:18
|
Update of /cvsroot/sphere-axis/UOMap In directory usw-pr-cvs1:/tmp/cvs-serv29550 Added Files: UOMap.dsw Log Message: The DSW file was missing here all the time, adding in a super basic one here cant hurt anything --- NEW FILE: UOMap.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "UOMap"=".\UOMap.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### |
From: Philip E. <pes...@us...> - 2002-05-25 02:46:32
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv30583 Modified Files: Axis.txt Log Message: Updated release notes. Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** Axis.txt 21 May 2002 20:53:04 -0000 1.27 --- Axis.txt 25 May 2002 02:46:29 -0000 1.28 *************** *** 25,28 **** --- 25,29 ---- ============================================================================= Changes in version 0.13.2 (in development) + · The Account Manager window is now modeless, minimizable, and resizeable. · Axissvr should handle paths in the ALLOWEDPATHS directive better. Specify the complete relative paths (e.g. scripts:scripts\test:etc) · Changes to the way profiles are loaded. Multiple local profiles can be specified, and local profiles can use remote |
From: Philip E. <pes...@us...> - 2002-05-25 02:42:27
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv30118 Modified Files: drewsky.rc AccountDlg.cpp AccountDlg.h settingstab.cpp settingstab.h Log Message: New build with resizable Account Dialog Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** drewsky.rc 23 May 2002 23:25:51 -0000 1.38 --- drewsky.rc 25 May 2002 02:42:20 -0000 1.39 *************** *** 1,3 **** --- 1,4 ---- //Microsoft Developer Studio generated resource script. + // Last compiled 5/24/2002 at 20:36:16 // #include "resource.h" *************** *** 2326,2331 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,12 ! PRODUCTVERSION 0,13,1,12 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 2327,2332 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,14 ! PRODUCTVERSION 0,13,1,14 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 2345,2349 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 12\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" --- 2346,2350 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 14\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" *************** *** 2352,2356 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 12\0" VALUE "SpecialBuild", "\0" END --- 2353,2357 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 14\0" VALUE "SpecialBuild", "\0" END Index: AccountDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** AccountDlg.cpp 23 May 2002 23:25:51 -0000 1.8 --- AccountDlg.cpp 25 May 2002 02:42:20 -0000 1.9 *************** *** 189,192 **** --- 189,270 ---- GetWindowRect(m_crOriginal); + m_cbCancel.GetWindowRect(m_crCancel); + m_cbOK.GetWindowRect(m_crOK); + m_csLabel1.GetWindowRect(m_crLabel1); + m_csLabel2.GetWindowRect(m_crLabel2); + m_csLabel3.GetWindowRect(m_crLabel3); + m_csLabel4.GetWindowRect(m_crLabel4); + m_csLabel5.GetWindowRect(m_crLabel5); + m_csLabel6.GetWindowRect(m_crLabel6); + m_csLabel7.GetWindowRect(m_crLabel7); + m_csLabel8.GetWindowRect(m_crLabel8); + m_csLabel9.GetWindowRect(m_crLabel9); + m_csLabel10.GetWindowRect(m_crLabel10); + m_csLabel11.GetWindowRect(m_crLabel11); + m_csLabel12.GetWindowRect(m_crLabel12); + m_csLabel13.GetWindowRect(m_crLabel13); + m_csLabel14.GetWindowRect(m_crLabel14); + m_csLabel15.GetWindowRect(m_crLabel15); + m_csQueue.GetWindowRect(m_crQueue); + m_cbParam.GetWindowRect(m_crParam); + m_cbNew.GetWindowRect(m_crNew); + m_cbDelete.GetWindowRect(m_crDelete); + m_csFirstIP.GetWindowRect(m_crFirstIP); + m_ceComment.GetWindowRect(m_crComment); + m_clbUpdates.GetWindowRect(m_crUpdates); + m_csTime.GetWindowRect(m_crTime); + m_cePassword.GetWindowRect(m_crPassword); + m_clbPriv.GetWindowRect(m_crPriv); + m_ccbLevel.GetWindowRect(m_crLevel); + m_csUID.GetWindowRect(m_crUID); + m_csLastTime.GetWindowRect(m_crLastTime); + m_csLastIP.GetWindowRect(m_crLastIP); + m_csLastDate.GetWindowRect(m_crLastDate); + m_ceLang.GetWindowRect(m_crLang); + m_csFirstDate.GetWindowRect(m_crFirstDate); + m_csFailures.GetWindowRect(m_crFailures); + m_ceEmail.GetWindowRect(m_crEmail); + m_ceChat.GetWindowRect(m_crChat); + m_clbAcctList.GetWindowRect(m_crAcctList); + + ScreenToClient(m_crOK); + ScreenToClient(m_crCancel); + ScreenToClient(m_crQueue); + ScreenToClient(m_crParam); + ScreenToClient(m_crNew); + ScreenToClient(m_crDelete); + ScreenToClient(m_crFirstIP); + ScreenToClient(m_crComment); + ScreenToClient(m_crUpdates); + ScreenToClient(m_crTime); + ScreenToClient(m_crPassword); + ScreenToClient(m_crPriv); + ScreenToClient(m_crLevel); + ScreenToClient(m_crUID); + ScreenToClient(m_crLastTime); + ScreenToClient(m_crLastIP); + ScreenToClient(m_crLastDate); + ScreenToClient(m_crLang); + ScreenToClient(m_crFirstDate); + ScreenToClient(m_crFailures); + ScreenToClient(m_crEmail); + ScreenToClient(m_crChat); + ScreenToClient(m_crAcctList); + ScreenToClient(m_crLabel1); + ScreenToClient(m_crLabel2); + ScreenToClient(m_crLabel3); + ScreenToClient(m_crLabel4); + ScreenToClient(m_crLabel5); + ScreenToClient(m_crLabel6); + ScreenToClient(m_crLabel7); + ScreenToClient(m_crLabel8); + ScreenToClient(m_crLabel9); + ScreenToClient(m_crLabel10); + ScreenToClient(m_crLabel11); + ScreenToClient(m_crLabel12); + ScreenToClient(m_crLabel13); + ScreenToClient(m_crLabel14); + ScreenToClient(m_crLabel15); + return TRUE; // return TRUE unless you set the focus to a control *************** *** 371,374 **** --- 449,453 ---- delete pAcct; } + m_clbAcctList.ResetContent(); } *************** *** 655,668 **** dy = crNew.Height() - m_crOriginal.Height(); - int dx1 = dx / 2; - int dx2 = dx - dx1; int dy1 = dy / 2; int dy2 = dy - dy1; ! // Resize the accounts and queue windows ! ! // Move the rest of the windows CDialog::OnSize(nType, cx, cy); this->Invalidate(); } --- 734,792 ---- dy = crNew.Height() - m_crOriginal.Height(); int dy1 = dy / 2; int dy2 = dy - dy1; ! if ( m_clbAcctList.GetSafeHwnd() != NULL ) ! { ! // Resize the accounts and queue windows ! m_clbAcctList.MoveWindow(m_crAcctList.left, m_crAcctList.top, m_crAcctList.Width() + dx, m_crAcctList.Height() + dy1); ! m_clbUpdates.MoveWindow(m_crUpdates.left, m_crUpdates.top + dy1, m_crUpdates.Width() + dx, m_crUpdates.Height() + dy2); ! // Move the rest of the windows ! // Left side stuff ! RepositionWindow(&m_cbNew, m_crNew, 0, dy1); ! RepositionWindow(&m_cbDelete, m_crDelete, 0, dy1); ! RepositionWindow(&m_csQueue, m_crQueue, 0, dy1); ! // Right side stuff ! RepositionWindow(&m_cbCancel, m_crCancel, dx, 0); ! RepositionWindow(&m_cbOK, m_crOK, dx, 0); ! RepositionWindow(&m_csLabel1, m_crLabel1, dx, 0); ! RepositionWindow(&m_csLabel2, m_crLabel2, dx, 0); ! RepositionWindow(&m_csLabel3, m_crLabel3, dx, 0); ! RepositionWindow(&m_csLabel4, m_crLabel4, dx, 0); ! RepositionWindow(&m_csLabel5, m_crLabel5, dx, 0); ! RepositionWindow(&m_csLabel6, m_crLabel6, dx, 0); ! RepositionWindow(&m_csLabel7, m_crLabel7, dx, 0); ! RepositionWindow(&m_csLabel8, m_crLabel8, dx, 0); ! RepositionWindow(&m_csLabel9, m_crLabel9, dx, 0); ! RepositionWindow(&m_csLabel10, m_crLabel10, dx, 0); ! RepositionWindow(&m_csLabel11, m_crLabel11, dx, 0); ! RepositionWindow(&m_csLabel12, m_crLabel12, dx, 0); ! RepositionWindow(&m_csLabel13, m_crLabel13, dx, 0); ! RepositionWindow(&m_csLabel14, m_crLabel14, dx, 0); ! RepositionWindow(&m_csLabel15, m_crLabel15, dx, 0); ! RepositionWindow(&m_cbParam, m_crParam , dx, 0); ! RepositionWindow(&m_csFirstIP, m_crFirstIP, dx, 0); ! RepositionWindow(&m_ceComment, m_crComment, dx, 0); ! RepositionWindow(&m_csTime, m_crTime, dx, 0); ! RepositionWindow(&m_cePassword, m_crPassword, dx, 0); ! RepositionWindow(&m_clbPriv, m_crPriv, dx, 0); ! RepositionWindow(&m_ccbLevel, m_crLevel, dx, 0); ! RepositionWindow(&m_csUID, m_crUID, dx, 0); ! RepositionWindow(&m_csLastTime, m_crLastTime, dx, 0); ! RepositionWindow(&m_csLastIP, m_crLastIP, dx, 0); ! RepositionWindow(&m_csLastDate, m_crLastDate, dx, 0); ! RepositionWindow(&m_ceLang, m_crLang, dx, 0); ! RepositionWindow(&m_csFirstDate, m_crFirstDate, dx, 0); ! RepositionWindow(&m_csFailures, m_crFailures, dx, 0); ! RepositionWindow(&m_ceEmail, m_crEmail, dx, 0); ! RepositionWindow(&m_ceChat, m_crChat, dx, 0); ! } CDialog::OnSize(nType, cx, cy); this->Invalidate(); + } + + void CAccountDlg::RepositionWindow(CWnd * pWnd, CRect rect, int dx, int dy) + { + pWnd->MoveWindow(rect.left + dx, rect.top + dy, rect.Width(), rect.Height()); } Index: AccountDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** AccountDlg.h 23 May 2002 23:25:51 -0000 1.4 --- AccountDlg.h 25 May 2002 02:42:20 -0000 1.5 *************** *** 94,97 **** --- 94,98 ---- // Implementation protected: + void RepositionWindow(CWnd * pWnd, CRect rect, int dx, int dy); void TouchAccount(); bool m_bIsChanging; *************** *** 100,103 **** --- 101,109 ---- CRect m_crOriginal; + CRect m_crOK, m_crCancel, m_crQueue, m_crParam, m_crNew, m_crDelete, m_crFirstIP, m_crComment; + CRect m_crUpdates, m_crTime, m_crPassword, m_crPriv, m_crLevel, m_crUID, m_crLastTime, m_crLastIP; + CRect m_crLastDate, m_crLang, m_crFirstDate, m_crFailures, m_crEmail, m_crChat, m_crAcctList; + CRect m_crLabel1, m_crLabel2, m_crLabel3, m_crLabel4, m_crLabel5, m_crLabel6, m_crLabel7, m_crLabel8; + CRect m_crLabel9, m_crLabel10, m_crLabel11, m_crLabel12, m_crLabel13, m_crLabel14, m_crLabel15; Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** settingstab.cpp 23 May 2002 23:25:51 -0000 1.20 --- settingstab.cpp 25 May 2002 02:42:20 -0000 1.21 *************** *** 66,70 **** m_pDlgStaticTool = NULL; m_pAcctDlg = NULL; - m_bDeleteAcctDlg = false; //}}AFX_DATA_INIT } --- 66,69 ---- *************** *** 661,669 **** void CSettingsTab::OnAcctedit() { ! if ( m_bDeleteAcctDlg ) { delete m_pAcctDlg; m_pAcctDlg = NULL; - m_bDeleteAcctDlg = false; } if ( m_pAcctDlg == NULL ) --- 660,668 ---- void CSettingsTab::OnAcctedit() { ! if ( m_pAcctDlg && !m_pAcctDlg->IsWindowVisible() ) { + m_pAcctDlg->DestroyWindow(); delete m_pAcctDlg; m_pAcctDlg = NULL; } if ( m_pAcctDlg == NULL ) Index: settingstab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** settingstab.h 23 May 2002 23:25:51 -0000 1.12 --- settingstab.h 25 May 2002 02:42:20 -0000 1.13 *************** *** 51,55 **** class CStaticToolDlg * m_pDlgStaticTool; class CAccountDlg * m_pAcctDlg; - bool m_bDeleteAcctDlg; // Dialog Data --- 51,54 ---- |
From: Philip E. <pes...@us...> - 2002-05-23 23:25:56
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv17279 Modified Files: AccountDlg.cpp AccountDlg.h drewsky.rc resource.h settingstab.cpp settingstab.h Log Message: beginnings of feature request 553431 Index: AccountDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** AccountDlg.cpp 14 May 2002 20:03:34 -0000 1.7 --- AccountDlg.cpp 23 May 2002 23:25:51 -0000 1.8 *************** *** 30,33 **** --- 30,34 ---- #include "AddValueDialog.h" #include "RemoteConnection.h" + #include "SettingsTab.h" #ifdef _DEBUG *************** *** 78,81 **** --- 79,85 ---- } + CAccountDlg::~CAccountDlg() + { + } void CAccountDlg::DoDataExchange(CDataExchange* pDX) *************** *** 83,86 **** --- 87,111 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAccountDlg) + DDX_Control(pDX, IDOK, m_cbOK); + DDX_Control(pDX, IDCANCEL, m_cbCancel); + DDX_Control(pDX, IDC_STATIC_LABEL9, m_csLabel9); + DDX_Control(pDX, IDC_STATIC_LABEL8, m_csLabel8); + DDX_Control(pDX, IDC_STATIC_LABEL7, m_csLabel7); + DDX_Control(pDX, IDC_STATIC_LABEL6, m_csLabel6); + DDX_Control(pDX, IDC_STATIC_LABEL5, m_csLabel5); + DDX_Control(pDX, IDC_STATIC_LABEL4, m_csLabel4); + DDX_Control(pDX, IDC_STATIC_LABEL3, m_csLabel3); + DDX_Control(pDX, IDC_STATIC_LABEL2, m_csLabel2); + DDX_Control(pDX, IDC_STATIC_LABEL15, m_csLabel15); + DDX_Control(pDX, IDC_STATIC_LABEL14, m_csLabel14); + DDX_Control(pDX, IDC_STATIC_LABEL13, m_csLabel13); + DDX_Control(pDX, IDC_STATIC_LABEL12, m_csLabel12); + DDX_Control(pDX, IDC_STATIC_LABEL11, m_csLabel11); + DDX_Control(pDX, IDC_STATIC_LABEL10, m_csLabel10); + DDX_Control(pDX, IDC_STATIC_LABEL1, m_csLabel1); + DDX_Control(pDX, IDC_QUEUELABEL, m_csQueue); + DDX_Control(pDX, IDC_PARAMBOX, m_cbParam); + DDX_Control(pDX, IDC_NEWACCT, m_cbNew); + DDX_Control(pDX, IDC_DELETEACCT, m_cbDelete); DDX_Control(pDX, IDC_ACCTFIRSTIP, m_csFirstIP); DDX_Control(pDX, IDC_CHATCOMMENT, m_ceComment); *************** *** 117,120 **** --- 142,146 ---- ON_EN_CHANGE(IDC_ACCTPWD, OnChangeAcctpwd) ON_EN_CHANGE(IDC_CHATCOMMENT, OnChangeChatcomment) + ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 159,162 **** --- 185,193 ---- this->m_csTime.SetWindowText(""); this->m_csUID.SetWindowText(""); + + // Get the rects for the controls here + GetWindowRect(m_crOriginal); + + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE *************** *** 606,608 **** --- 637,668 ---- return; } + } + + void CAccountDlg::OnSize(UINT nType, int cx, int cy) + { + // Make sure we aren't trying to be narrower or shorter than the original + if ( cx < m_crOriginal.Width() ) + cx = m_crOriginal.Width(); + if ( cy < m_crOriginal.Height() ) + cy = m_crOriginal.Height(); + + int dx, dy; + dx = 0; dy = 0; + CRect crNew; + GetWindowRect(crNew); + ScreenToClient(crNew); + dx = crNew.Width() - m_crOriginal.Width(); + dy = crNew.Height() - m_crOriginal.Height(); + + int dx1 = dx / 2; + int dx2 = dx - dx1; + int dy1 = dy / 2; + int dy2 = dy - dy1; + + // Resize the accounts and queue windows + + // Move the rest of the windows + + CDialog::OnSize(nType, cx, cy); + this->Invalidate(); } Index: AccountDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AccountDlg.h 1 May 2002 03:33:09 -0000 1.3 --- AccountDlg.h 23 May 2002 23:25:51 -0000 1.4 *************** *** 39,46 **** --- 39,68 ---- public: CAccountDlg(CWnd* pParent = NULL); // standard constructor + ~CAccountDlg(); // Dialog Data //{{AFX_DATA(CAccountDlg) enum { IDD = IDD_ACCOUNT_DLG }; + CButton m_cbOK; + CButton m_cbCancel; + CStatic m_csLabel9; + CStatic m_csLabel8; + CStatic m_csLabel7; + CStatic m_csLabel6; + CStatic m_csLabel5; + CStatic m_csLabel4; + CStatic m_csLabel3; + CStatic m_csLabel2; + CStatic m_csLabel15; + CStatic m_csLabel14; + CStatic m_csLabel13; + CStatic m_csLabel12; + CStatic m_csLabel11; + CStatic m_csLabel10; + CStatic m_csLabel1; + CStatic m_csQueue; + CButton m_cbParam; + CButton m_cbNew; + CButton m_cbDelete; CStatic m_csFirstIP; CEdit m_ceComment; *************** *** 77,80 **** --- 99,105 ---- void Unload(); + CRect m_crOriginal; + + // Generated message map functions //{{AFX_MSG(CAccountDlg) *************** *** 92,95 **** --- 117,121 ---- afx_msg void OnChangeAcctpwd(); afx_msg void OnChangeChatcomment(); + afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** drewsky.rc 16 May 2002 01:31:57 -0000 1.37 --- drewsky.rc 23 May 2002 23:25:51 -0000 1.38 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // Last compiled 5/15/2002 at 19:22:53 #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // #include "resource.h" *************** *** 1858,1863 **** END ! IDD_ACCOUNT_DLG DIALOG DISCARDABLE 0, 0, 274, 279 ! STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Account Manager" FONT 8, "MS Sans Serif" --- 1858,1864 ---- END ! IDD_ACCOUNT_DLG DIALOG DISCARDABLE 0, 0, 274, 278 ! STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ! WS_THICKFRAME CAPTION "Account Manager" FONT 8, "MS Sans Serif" *************** *** 1868,1885 **** LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "Accounts",IDC_STATIC,7,7,31,8 ! LISTBOX IDC_ACCTUPDATES,7,218,104,54,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP ! LTEXT "Accounts in update queue",IDC_STATIC,7,207,84,8 ! GROUPBOX "Account Parameters",IDC_STATIC,113,23,154,249 PUSHBUTTON "New Acct",IDC_NEWACCT,7,191,45,13 PUSHBUTTON "Delete Acct",IDC_DELETEACCT,55,191,53,13 ! LTEXT "Password",IDC_STATIC,119,34,32,8 ! LTEXT "Priv Flags",IDC_STATIC,119,50,32,8 ! LTEXT "Chat Name",IDC_STATIC,119,111,36,8 ! LTEXT "Language",IDC_STATIC,119,125,33,8 ! LTEXT "Email",IDC_STATIC,119,138,18,8 ! LTEXT "Email Failures",IDC_STATIC,119,151,44,8 ! LTEXT "Comment",IDC_STATIC,119,167,30,8 EDITTEXT IDC_ACCTPWD,157,33,105,12,ES_AUTOHSCROLL LISTBOX IDC_ACCTPRIV,157,50,105,42,LBS_NOINTEGRALHEIGHT | --- 1869,1886 ---- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "Accounts",IDC_STATIC,7,7,31,8 ! LISTBOX IDC_ACCTUPDATES,7,217,104,54,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP ! LTEXT "Accounts in update queue",IDC_QUEUELABEL,7,207,84,8 ! GROUPBOX "Account Parameters",IDC_PARAMBOX,113,22,154,249 PUSHBUTTON "New Acct",IDC_NEWACCT,7,191,45,13 PUSHBUTTON "Delete Acct",IDC_DELETEACCT,55,191,53,13 ! LTEXT "Password",IDC_STATIC_LABEL1,119,34,32,8 ! LTEXT "Priv Flags",IDC_STATIC_LABEL2,119,50,32,8 ! LTEXT "Chat Name",IDC_STATIC_LABEL4,119,111,36,8 ! LTEXT "Language",IDC_STATIC_LABEL5,119,125,33,8 ! LTEXT "Email",IDC_STATIC_LABEL6,119,138,18,8 ! LTEXT "Email Failures",IDC_STATIC_LABEL7,119,152,44,8 ! LTEXT "Comment",IDC_STATIC_LABEL8,119,167,30,8 EDITTEXT IDC_ACCTPWD,157,33,105,12,ES_AUTOHSCROLL LISTBOX IDC_ACCTPRIV,157,50,105,42,LBS_NOINTEGRALHEIGHT | *************** *** 1889,1902 **** EDITTEXT IDC_ACCTEMAIL,157,137,105,12,ES_AUTOHSCROLL EDITTEXT IDC_CHATCOMMENT,157,165,105,12,ES_AUTOHSCROLL ! LTEXT "PLevel",IDC_STATIC,119,95,23,8 COMBOBOX IDC_ACCTLEVEL,157,94,105,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Last Character UID",IDC_STATIC,119,182,62,8 ! LTEXT "Total Connect Time",IDC_STATIC,119,194,63,8 ! LTEXT "Last IP",IDC_STATIC,119,207,23,8 ! LTEXT "Last Connect Time",IDC_STATIC,119,221,60,8 ! LTEXT "Last Connect Date",IDC_STATIC,119,234,60,8 ! LTEXT "First Connect IP",IDC_STATIC,119,247,51,8 ! LTEXT "First Connect Date",IDC_STATIC,119,260,60,8 LTEXT "Static",IDC_ACCTLASTUID,191,182,71,8 LTEXT "Static",IDC_ACCTTIME,191,194,71,8 --- 1890,1903 ---- EDITTEXT IDC_ACCTEMAIL,157,137,105,12,ES_AUTOHSCROLL EDITTEXT IDC_CHATCOMMENT,157,165,105,12,ES_AUTOHSCROLL ! LTEXT "PLevel",IDC_STATIC_LABEL3,119,95,23,8 COMBOBOX IDC_ACCTLEVEL,157,94,105,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Last Character UID",IDC_STATIC_LABEL9,119,182,62,8 ! LTEXT "Total Connect Time",IDC_STATIC_LABEL10,119,194,63,8 ! LTEXT "Last IP",IDC_STATIC_LABEL11,119,207,23,8 ! LTEXT "Last Connect Time",IDC_STATIC_LABEL12,119,221,60,8 ! LTEXT "Last Connect Date",IDC_STATIC_LABEL13,119,234,60,8 ! LTEXT "First Connect IP",IDC_STATIC_LABEL14,119,247,51,8 ! LTEXT "First Connect Date",IDC_STATIC_LABEL15,119,260,60,8 LTEXT "Static",IDC_ACCTLASTUID,191,182,71,8 LTEXT "Static",IDC_ACCTTIME,191,194,71,8 *************** *** 2769,2773 **** RIGHTMARGIN, 267 TOPMARGIN, 7 ! BOTTOMMARGIN, 272 END --- 2770,2774 ---- RIGHTMARGIN, 267 TOPMARGIN, 7 ! BOTTOMMARGIN, 271 END Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** resource.h 15 May 2002 22:18:48 -0000 1.26 --- resource.h 23 May 2002 23:25:51 -0000 1.27 *************** *** 1284,1287 **** --- 1284,1302 ---- #define IDC_AS_AVAILABLESCRIPTS 1398 #define IDC_AS_ALLOWMULTIPLE 1399 + #define IDC_QUEUELABEL 1400 + #define IDC_PARAMBOX 1401 + #define IDC_STATIC_LABEL3 1402 + #define IDC_STATIC_LABEL4 1403 + #define IDC_STATIC_LABEL5 1404 + #define IDC_STATIC_LABEL6 1405 + #define IDC_STATIC_LABEL7 1406 + #define IDC_STATIC_LABEL8 1407 + #define IDC_STATIC_LABEL9 1408 + #define IDC_STATIC_LABEL10 1409 + #define IDC_STATIC_LABEL11 1410 + #define IDC_STATIC_LABEL12 1411 + #define IDC_STATIC_LABEL13 1412 + #define IDC_STATIC_LABEL14 1413 + #define IDC_STATIC_LABEL15 1414 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 1318,1322 **** #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1400 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 1333,1337 ---- #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1415 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** settingstab.cpp 22 May 2002 22:55:26 -0000 1.19 --- settingstab.cpp 23 May 2002 23:25:51 -0000 1.20 *************** *** 65,68 **** --- 65,70 ---- m_bResourcesOnly = FALSE; m_pDlgStaticTool = NULL; + m_pAcctDlg = NULL; + m_bDeleteAcctDlg = false; //}}AFX_DATA_INIT } *************** *** 75,78 **** --- 77,85 ---- delete m_pDlgStaticTool; } + if ( m_pAcctDlg ) + { + m_pAcctDlg->DestroyWindow(); + delete m_pAcctDlg; + } } *************** *** 654,659 **** void CSettingsTab::OnAcctedit() { ! CAccountDlg dlg; ! dlg.DoModal(); } --- 661,676 ---- void CSettingsTab::OnAcctedit() { ! if ( m_bDeleteAcctDlg ) ! { ! delete m_pAcctDlg; ! m_pAcctDlg = NULL; ! m_bDeleteAcctDlg = false; ! } ! if ( m_pAcctDlg == NULL ) ! { ! m_pAcctDlg = new CAccountDlg; ! m_pAcctDlg->Create(IDD_ACCOUNT_DLG, (CWnd *)this); ! } ! m_pAcctDlg->ShowWindow(SW_SHOW); } Index: settingstab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** settingstab.h 14 May 2002 20:03:35 -0000 1.11 --- settingstab.h 23 May 2002 23:25:51 -0000 1.12 *************** *** 50,53 **** --- 50,55 ---- BOOL m_bDeleteStaticTool; class CStaticToolDlg * m_pDlgStaticTool; + class CAccountDlg * m_pAcctDlg; + bool m_bDeleteAcctDlg; // Dialog Data |
From: Philip E. <pes...@us...> - 2002-05-22 22:55:30
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv16324 Modified Files: AdditionalSettingsDlg.cpp AdditionalSettingsDlg.h settingstab.cpp Log Message: more updates for selective file loading; activated the additional settings dlg Index: AdditionalSettingsDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AdditionalSettingsDlg.cpp 20 May 2002 19:14:42 -0000 1.3 --- AdditionalSettingsDlg.cpp 22 May 2002 22:55:26 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- #include "drewsky.h" #include "AdditionalSettingsDlg.h" + #include "RemoteProfileDlg.h" #ifdef _DEBUG *************** *** 82,85 **** --- 83,100 ---- ON_BN_CLICKED(IDC_AS_MULBROWSE, OnAsMulbrowse) ON_BN_CLICKED(IDC_AS_CLIENTBROWSE, OnAsClientbrowse) + ON_NOTIFY(NM_RCLICK, IDC_AS_CUSTOMMULS, OnChangeCustommuls) + ON_BN_CLICKED(IDC_AS_USESAMEPATHASCLIENT, OnAsUsesamepathasclient) + ON_NOTIFY(NM_DBLCLK, IDC_AS_CUSTOMMULS, OnChangeCustommuls) + ON_BN_CLICKED(IDC_AS_3DROOMVIEW, OnAs3droomview) + ON_BN_CLICKED(IDC_AS_ALLOWMULTIPLE, OnAsAllowmultiple) + ON_BN_CLICKED(IDC_AS_DISPLAYITEMS, OnAsDisplayitems) + ON_BN_CLICKED(IDC_AS_ONTOP, OnAsOntop) + ON_BN_CLICKED(IDC_AS_RADAR, OnAsRadar) + ON_BN_CLICKED(IDC_AS_SCALE, OnAsScale) + ON_BN_CLICKED(IDC_AS_SHOWCHARS, OnAsShowchars) + ON_BN_CLICKED(IDC_AS_SHOWSPAWNS, OnAsShowspawns) + ON_BN_CLICKED(IDC_AS_SPAWNMSG, OnAsSpawnmsg) + ON_BN_CLICKED(IDC_AS_STARTLAUNCHER, OnAsStartlauncher) + ON_BN_CLICKED(IDC_AS_SYSCLOSE, OnAsSysclose) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 107,111 **** csText.Format("%s%s", csUOPath, csUOExe); m_csDefaultClient.SetWindowText(csText); ! m_csDefaultMulPath.SetWindowText(csUOPath); // List the mulfiles --- 122,126 ---- csText.Format("%s%s", csUOPath, csUOExe); m_csDefaultClient.SetWindowText(csText); ! m_csDefaultMulPath.SetWindowText(Main->GetRegistryString("MulPath", csUOPath)); // List the mulfiles *************** *** 113,150 **** m_clcMuls.InsertColumn(1, "Custom Filename", LVCFMT_LEFT, 255, 1); ! m_clcMuls.InsertItem(0, "map0"); ! m_clcMuls.InsertItem(1, "staidx0"); ! m_clcMuls.InsertItem(2, "statics0"); ! m_clcMuls.InsertItem(3, "artidx"); ! m_clcMuls.InsertItem(4, "art"); ! m_clcMuls.InsertItem(5, "animidx"); ! m_clcMuls.InsertItem(6, "anim"); ! m_clcMuls.InsertItem(7, "soundidx"); ! m_clcMuls.InsertItem(8, "sound"); ! m_clcMuls.InsertItem(9, "texidx"); ! m_clcMuls.InsertItem(10, "texmaps"); ! m_clcMuls.InsertItem(11, "gumpidx"); ! m_clcMuls.InsertItem(12, "gumpart"); ! m_clcMuls.InsertItem(13, "multiidx"); ! m_clcMuls.InsertItem(14, "multi"); ! m_clcMuls.InsertItem(15, "skillsidx"); ! m_clcMuls.InsertItem(16, "skills"); ! m_clcMuls.InsertItem(17, "lightidx"); ! m_clcMuls.InsertItem(18, "light"); ! m_clcMuls.InsertItem(30, "tiledata"); ! m_clcMuls.InsertItem(31, "animdata"); ! m_clcMuls.InsertItem(32, "hues"); ! m_clcMuls.InsertItem(33, "animinfo"); ! m_clcMuls.InsertItem(34, "fonts"); ! m_clcMuls.InsertItem(35, "radarcol"); ! m_clcMuls.InsertItem(36, "verdata"); ! m_clcMuls.InsertItem(37, "map2"); ! m_clcMuls.InsertItem(38, "staidx2"); ! m_clcMuls.InsertItem(39, "statics2"); // Are there any local profiles in the registry? HKEY hKey; LONG lStatus; ! int iIndex = 0; lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Local Profiles", 0, KEY_ALL_ACCESS, &hKey); if ( lStatus == ERROR_SUCCESS ) --- 128,211 ---- m_clcMuls.InsertColumn(1, "Custom Filename", LVCFMT_LEFT, 255, 1); ! int iIndex = 0; ! iIndex = m_clcMuls.InsertItem(0, "map0"); ! m_clcMuls.SetItemData(iIndex, 0); ! iIndex = m_clcMuls.InsertItem(1, "staidx0"); ! m_clcMuls.SetItemData(iIndex, 1); ! iIndex = m_clcMuls.InsertItem(2, "statics0"); ! m_clcMuls.SetItemData(iIndex, 2); ! iIndex = m_clcMuls.InsertItem(3, "artidx"); ! m_clcMuls.SetItemData(iIndex, 3); ! iIndex = m_clcMuls.InsertItem(4, "art"); ! m_clcMuls.SetItemData(iIndex, 4); ! iIndex = m_clcMuls.InsertItem(5, "animidx"); ! m_clcMuls.SetItemData(iIndex, 5); ! iIndex = m_clcMuls.InsertItem(6, "anim"); ! m_clcMuls.SetItemData(iIndex, 6); ! iIndex = m_clcMuls.InsertItem(7, "soundidx"); ! m_clcMuls.SetItemData(iIndex, 7); ! iIndex = m_clcMuls.InsertItem(8, "sound"); ! m_clcMuls.SetItemData(iIndex, 8); ! iIndex = m_clcMuls.InsertItem(9, "texidx"); ! m_clcMuls.SetItemData(iIndex, 9); ! iIndex = m_clcMuls.InsertItem(10, "texmaps"); ! m_clcMuls.SetItemData(iIndex, 10); ! iIndex = m_clcMuls.InsertItem(11, "gumpidx"); ! m_clcMuls.SetItemData(iIndex, 11); ! iIndex = m_clcMuls.InsertItem(12, "gumpart"); ! m_clcMuls.SetItemData(iIndex, 12); ! iIndex = m_clcMuls.InsertItem(13, "multiidx"); ! m_clcMuls.SetItemData(iIndex, 13); ! iIndex = m_clcMuls.InsertItem(14, "multi"); ! m_clcMuls.SetItemData(iIndex, 14); ! iIndex = m_clcMuls.InsertItem(15, "skillsidx"); ! m_clcMuls.SetItemData(iIndex, 15); ! iIndex = m_clcMuls.InsertItem(16, "skills"); ! m_clcMuls.SetItemData(iIndex, 16); ! iIndex = m_clcMuls.InsertItem(17, "lightidx"); ! m_clcMuls.SetItemData(iIndex, 17); ! iIndex = m_clcMuls.InsertItem(18, "light"); ! m_clcMuls.SetItemData(iIndex, 18); ! iIndex = m_clcMuls.InsertItem(30, "tiledata"); ! m_clcMuls.SetItemData(iIndex, 30); ! iIndex = m_clcMuls.InsertItem(31, "animdata"); ! m_clcMuls.SetItemData(iIndex, 31); ! iIndex = m_clcMuls.InsertItem(32, "hues"); ! m_clcMuls.SetItemData(iIndex, 32); ! iIndex = m_clcMuls.InsertItem(33, "animinfo"); ! m_clcMuls.SetItemData(iIndex, 33); ! iIndex = m_clcMuls.InsertItem(34, "fonts"); ! m_clcMuls.SetItemData(iIndex, 34); ! iIndex = m_clcMuls.InsertItem(35, "radarcol"); ! m_clcMuls.SetItemData(iIndex, 35); ! iIndex = m_clcMuls.InsertItem(36, "verdata"); ! m_clcMuls.SetItemData(iIndex, 36); ! iIndex = m_clcMuls.InsertItem(37, "map2"); ! m_clcMuls.SetItemData(iIndex, 37); ! iIndex = m_clcMuls.InsertItem(38, "staidx2"); ! m_clcMuls.SetItemData(iIndex, 38); ! iIndex = m_clcMuls.InsertItem(39, "statics2"); ! m_clcMuls.SetItemData(iIndex, 39); ! ! for ( int i = 0; i < 40; i++ ) ! { ! // Get the custom mul entries out of the registry ! CString csRegVal; ! csRegVal.Format("Mul%ld", i); ! CString csPath = Main->GetRegistryString(csRegVal); ! if ( csPath != "" ) ! { ! for ( int j = 0; j < m_clcMuls.GetItemCount(); j++ ) ! { ! if ( m_clcMuls.GetItemData(j) == (DWORD) i ) ! m_clcMuls.SetItemText(j, 1, csPath); ! } ! } ! } // Are there any local profiles in the registry? HKEY hKey; LONG lStatus; ! iIndex = 0; lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Local Profiles", 0, KEY_ALL_ACCESS, &hKey); if ( lStatus == ERROR_SUCCESS ) *************** *** 240,264 **** void CAdditionalSettingsDlg::OnAsNewprofile() { ! } void CAdditionalSettingsDlg::OnAsEditprofile() { ! } void CAdditionalSettingsDlg::OnAsDeleteprofile() { ! } void CAdditionalSettingsDlg::OnAsMulbrowse() { ! } void CAdditionalSettingsDlg::OnAsClientbrowse() { ! } --- 301,469 ---- void CAdditionalSettingsDlg::OnAsNewprofile() { ! CRemoteProfileDlg dlg; ! if ( dlg.DoModal() != IDOK ) ! return; ! CString csKey, csRmtPwd, csPwd; ! csPwd = Encrypt(dlg.m_csPwd); ! int iTimeout = atoi(dlg.m_csReceiveTimeout); ! int iRemoteSpawns = dlg.m_bRemoteSpawns ? 1 : 0; ! if ( iTimeout < 1000 ) ! iTimeout = 1000; ! switch ( dlg.m_iProfile ) ! { ! case 0: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Port", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Root Directory", dlg.m_csBaseDir, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("Read Remote Spawnpoints", (DWORD) iRemoteSpawns, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! case 1: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! ! } ! CString csProfile; ! csProfile.Format("%s: %s", dlg.m_iProfile == 0 ? "Local" : "Remote", dlg.m_csName); ! this->m_clbProfiles.AddString(csProfile); ! this->m_clbProfiles.SelectString(-1, csProfile); } void CAdditionalSettingsDlg::OnAsEditprofile() { ! int iSel = this->m_clbProfiles.GetCurSel(); ! if ( iSel == -1 ) ! return; ! CString csProfile; ! m_clbProfiles.GetText(iSel, csProfile); ! CRemoteProfileDlg dlg; ! if ( csProfile.Find("Remote:") == 0 ) ! { ! dlg.m_csName = csProfile.Mid(8); ! dlg.m_csHogPort = Main->m_csAxissvrPort; ! dlg.m_csIP = Main->m_csServerIP; ! dlg.m_csPwd = Main->m_csPassword; ! dlg.m_csTusPort = Main->m_csSpherePort; ! dlg.m_csUsername = Main->m_csUserID; ! dlg.m_csReceiveTimeout.Format("%ld", Main->m_iReceiveTimeout); ! dlg.m_iProfile = 1; ! } ! else ! { ! dlg.m_csName = csProfile.Mid(7); ! dlg.m_csHogPort = Main->m_csAxissvrPort; ! dlg.m_csIP = Main->m_csServerIP; ! dlg.m_csPwd = Main->m_csPassword; ! dlg.m_csTusPort = Main->m_csSpherePort; ! dlg.m_csUsername = Main->m_csUserID; ! dlg.m_csReceiveTimeout.Format("%ld", Main->m_iReceiveTimeout); ! dlg.m_csBaseDir = Main->m_csRootDirectory; ! dlg.m_bRemoteSpawns = Main->m_dwRemoteSpawns ? true : false; ! dlg.m_iProfile = 0; ! } ! ! if ( dlg.DoModal() != IDOK ) ! return; ! int iRemoteSpawns = dlg.m_bRemoteSpawns ? 1 : 0; ! int iTimeout = atoi(dlg.m_csReceiveTimeout); ! if ( iTimeout < 1000 ) ! iTimeout = 1000; ! ! CString csKey, csRmtPwd, csPwd; ! csPwd = Encrypt(dlg.m_csPwd); ! ! switch ( dlg.m_iProfile ) ! { ! case 0: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Port", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Root Directory", dlg.m_csBaseDir, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("Read Remote Spawns", (DWORD) iRemoteSpawns, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! case 1: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! } } void CAdditionalSettingsDlg::OnAsDeleteprofile() { ! int iSel = this->m_clbProfiles.GetCurSel(); ! if ( iSel == -1 ) ! return; ! CString csKey; ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", Main->GetProfileString()); ! Main->DeleteRegistryKey(csKey); ! this->m_clbProfiles.DeleteString( iSel ); ! Main->m_csUserID = ""; ! Main->m_csPassword = ""; ! Main->m_csSpherePort = ""; ! Main->m_csAxissvrPort = ""; ! Main->m_csServerIP = ""; ! Main->GetProfileString() = ""; ! Main->m_iReceiveTimeout = 60000; ! Main->m_dwRemoteSpawns = 0; } void CAdditionalSettingsDlg::OnAsMulbrowse() { ! CFileDialog dlg(TRUE, "exe", "map0.mul", 0, "Ultima Online client files (*.mul)|*.mul|All files (*.*)|*.*||"); ! if ( dlg.DoModal() == IDOK ) ! { ! CString csPath = dlg.GetPathName(); ! csPath.SetAt(csPath.ReverseFind('\\'), 0x00); ! Main->PutRegistryString("MulPath", csPath); ! m_csDefaultMulPath.SetWindowText(csPath); ! } } void CAdditionalSettingsDlg::OnAsClientbrowse() { ! CFileDialog dlg(TRUE, "exe", "client.exe", 0, "Application files (*.exe)|*.exe|All files (*.*)|*.*||"); ! if ( dlg.DoModal() == IDOK ) ! { ! csUOExe = dlg.GetPathName(); ! Main->PutRegistryString("Default client", dlg.GetPathName()); ! m_csDefaultClient.SetWindowText(csUOExe); ! if ( m_cbMulPathFromClient.GetCheck() ) ! { ! CString csPath = csUOExe; ! csPath.SetAt(csUOExe.ReverseFind('\\'), 0x00); ! m_csDefaultMulPath.SetWindowText(csPath); ! } ! } } *************** *** 401,403 **** --- 606,729 ---- UpdateProfile(); CDialog::OnOK(); + } + + void CAdditionalSettingsDlg::OnChangeCustommuls(NMHDR* pNMHDR, LRESULT* pResult) + { + *pResult = 0; + // Get the current selected mul and the specified file + POSITION pos = m_clcMuls.GetFirstSelectedItemPosition(); + if ( pos == NULL ) + return; + int iSel = m_clcMuls.GetNextSelectedItem(pos); + CString csMul, csPath, csFile; + csMul = m_clcMuls.GetItemText(iSel, 0); + csPath = m_clcMuls.GetItemText(iSel, 1); + if ( csPath.Find("\\") != -1 ) + csFile = csPath.Mid(csPath.ReverseFind('\\') + 1); + else + csFile = csPath; + // Pop up a file dialog to select the custom mul + CFileDialog dlg(TRUE, "mul", csFile, 0, "Ultima Online Client files (*.mul; *.idx)|*.mul;*.idx|All Files (*.*)|*.*||"); + if ( dlg.DoModal() == IDOK ) + { + csPath = dlg.GetPathName(); + m_clcMuls.SetItemText(iSel, 1, csPath); + int iData = m_clcMuls.GetItemData(iSel); + CString csRegVal; + csRegVal.Format("Mul%ld", iData); + Main->PutRegistryString(csRegVal, csPath); + } + // If the user cancelled, ask if we should use the default + else + { + if ( AfxMessageBox("Should Axis use the default client file?", MB_YESNO, MB_ICONQUESTION) == IDYES ) + { + m_clcMuls.SetItemText(iSel, 1, ""); + int iData = m_clcMuls.GetItemData(iSel); + CString csRegVal; + csRegVal.Format("Mul%ld", iData); + Main->PutRegistryString(csRegVal, csPath); + } + } + return; + } + + void CAdditionalSettingsDlg::OnAsUsesamepathasclient() + { + if ( this->m_cbMulPathFromClient.GetCheck() ) + { + CString csClientPath; + m_csDefaultClient.GetWindowText(csClientPath); + csClientPath.SetAt(csClientPath.ReverseFind('\\'), 0x00); + m_csDefaultMulPath.SetWindowText(csClientPath); + m_cbMulBrowse.EnableWindow(FALSE); + } + else + m_cbMulBrowse.EnableWindow(TRUE); + } + + void CAdditionalSettingsDlg::OnAs3droomview() + { + UpdateData(); + Main->PutRegistryDword("3DRoomView", m_b3DRoomView); + } + + void CAdditionalSettingsDlg::OnAsAllowmultiple() + { + UpdateData(); + Main->PutRegistryDword("AllowMultipleInstances", m_bAllowMultiple); + } + + void CAdditionalSettingsDlg::OnAsDisplayitems() + { + UpdateData(); + Main->PutRegistryDword("DrawItems", m_bDisplayItems); + } + + void CAdditionalSettingsDlg::OnAsOntop() + { + UpdateData(); + Main->PutRegistryDword("AlwaysOnTop", m_bAlwaysOnTop); + } + + void CAdditionalSettingsDlg::OnAsRadar() + { + UpdateData(); + Main->PutRegistryDword("ShowRadar", m_bShowRadarMap); + } + + void CAdditionalSettingsDlg::OnAsScale() + { + UpdateData(); + Main->PutRegistryDword("ScaleItems", m_bScaleItems); + } + + void CAdditionalSettingsDlg::OnAsShowchars() + { + UpdateData(); + Main->PutRegistryDword("DrawChars", m_bShowChars); + } + + void CAdditionalSettingsDlg::OnAsShowspawns() + { + UpdateData(); + Main->PutRegistryDword("ShowSpawnpoints", m_bShowSpawns); + } + + void CAdditionalSettingsDlg::OnAsSpawnmsg() + { + UpdateData(); + Main->PutRegistryDword("SpawnMessage", m_bSpawnMessage); + } + + void CAdditionalSettingsDlg::OnAsStartlauncher() + { + UpdateData(); + Main->PutRegistryDword("StartLauncher", m_bStartLauncher); + } + + void CAdditionalSettingsDlg::OnAsSysclose() + { + UpdateData(); + Main->PutRegistryDword("SysClose", m_bSysClose); } Index: AdditionalSettingsDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AdditionalSettingsDlg.h 20 May 2002 19:14:42 -0000 1.3 --- AdditionalSettingsDlg.h 22 May 2002 22:55:26 -0000 1.4 *************** *** 78,81 **** --- 78,94 ---- afx_msg void OnAsClientbrowse(); virtual void OnOK(); + afx_msg void OnChangeCustommuls(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnAsUsesamepathasclient(); + afx_msg void OnAs3droomview(); + afx_msg void OnAsAllowmultiple(); + afx_msg void OnAsDisplayitems(); + afx_msg void OnAsOntop(); + afx_msg void OnAsRadar(); + afx_msg void OnAsScale(); + afx_msg void OnAsShowchars(); + afx_msg void OnAsShowspawns(); + afx_msg void OnAsSpawnmsg(); + afx_msg void OnAsStartlauncher(); + afx_msg void OnAsSysclose(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** settingstab.cpp 15 May 2002 22:18:48 -0000 1.18 --- settingstab.cpp 22 May 2002 22:55:26 -0000 1.19 *************** *** 788,796 **** { // Open up the main configuration dialog. - #ifdef _DEBUG CAdditionalSettingsDlg dlg; dlg.DoModal(); - #else - AfxMessageBox("This function is still in development.", MB_OK); - #endif } --- 788,792 ---- |
From: Philip E. <pes...@us...> - 2002-05-21 20:53:08
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv12185 Modified Files: Axis.txt Log Message: updated release notes Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** Axis.txt 16 May 2002 22:06:12 -0000 1.26 --- Axis.txt 21 May 2002 20:53:04 -0000 1.27 *************** *** 25,28 **** --- 25,29 ---- ============================================================================= Changes in version 0.13.2 (in development) + · Axissvr should handle paths in the ALLOWEDPATHS directive better. Specify the complete relative paths (e.g. scripts:scripts\test:etc) · Changes to the way profiles are loaded. Multiple local profiles can be specified, and local profiles can use remote consoles and remote spawnpoints. |
From: Philip E. <pes...@us...> - 2002-05-21 17:24:38
|
Update of /cvsroot/sphere-axis/axissvr In directory usw-pr-cvs1:/tmp/cvs-serv32703 Modified Files: axissvr.cfg gwhogsvr.cpp Log Message: Improved handling of subdirectories in the GetDirInfo function. Index: axissvr.cfg =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/axissvr.cfg,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** axissvr.cfg 21 Apr 2001 01:42:43 -0000 1.1.1.1 --- axissvr.cfg 21 May 2002 17:02:17 -0000 1.2 *************** *** 37,41 **** # ALLOWEDPATHS specifies the relative paths which can be accessed with the # raw editor function in the Axis client. Multiple paths can be specified, and ! # should be delimited by a colon. ALLOWEDPATHS speech:log # --- 37,42 ---- # ALLOWEDPATHS specifies the relative paths which can be accessed with the # raw editor function in the Axis client. Multiple paths can be specified, and ! # should be delimited by a colon. If you wish to use subdiretories, use the ! # complete relative path (e.g. scripts:scripts/test:scripts/speech:etc) ALLOWEDPATHS speech:log # Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** gwhogsvr.cpp 15 May 2002 03:22:29 -0000 1.11 --- gwhogsvr.cpp 21 May 2002 17:02:17 -0000 1.12 *************** *** 39,43 **** #endif ! #define SVR_VERSION "0.13.0.1" #ifdef WIN32 #define SVR_PLATFORM "Win32" --- 39,43 ---- #endif ! #define SVR_VERSION "0.13.0.2" #ifdef WIN32 #define SVR_PLATFORM "Win32" *************** *** 2250,2253 **** --- 2250,2257 ---- char szPath[MAX_PATH]; sprintf(szPath, "%s", pszPathname); + // Make sure the slashes are in the correct direction + for ( int i = 0; i < strlen(szPath); i++ ) + if ( szPath[i] == '\\' ) + szPath[i] = '/'; if ( szPath[strlen(szPath) - 1] == '/' ) szPath[strlen(szPath) - 1] = 0x00; *************** *** 2256,2259 **** --- 2260,2264 ---- { // Handle the error + printf("Unable to open directdory %s\n", szPath); Send(sock, szEOF, strlen(szEOF)); return; *************** *** 2269,2273 **** struct stat filestat; memset(&filestat, 0x00, sizeof(filestat)); ! sprintf(szEntry, "%s/%s", szPath, direntp->d_name); stat(szEntry, &filestat); --- 2274,2281 ---- struct stat filestat; memset(&filestat, 0x00, sizeof(filestat)); ! if ( strcmp(szPath, ".") == 0 ) ! sprintf(szEntry, direntp->d_name); ! else ! sprintf(szEntry, "%s/%s", szPath, direntp->d_name); stat(szEntry, &filestat); *************** *** 2280,2284 **** while ( pszTok != NULL ) { ! if ( strcmp(pszTok, direntp->d_name) == 0 ) { bAllowed = TRUE; --- 2288,2292 ---- while ( pszTok != NULL ) { ! if ( strcmp(pszTok, szEntry) == 0 ) { bAllowed = TRUE; |
From: Philip E. <pes...@us...> - 2002-05-20 19:32:34
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv27483 Modified Files: AdditionalSettingsDlg.cpp AdditionalSettingsDlg.h CScriptObjects.cpp Drewsky.cpp Drewsky.dsp Drewsky.h remoteconnection.cpp remoteconnection.h Log Message: code changes to support selective file loading Index: AdditionalSettingsDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AdditionalSettingsDlg.cpp 14 May 2002 20:03:34 -0000 1.2 --- AdditionalSettingsDlg.cpp 20 May 2002 19:14:42 -0000 1.3 *************** *** 32,35 **** --- 32,44 ---- m_bAllowMultiple = FALSE; //}}AFX_DATA_INIT + + m_hFolderIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_FOLDER)); + m_hDocIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_DOC)); + + m_ilIcons.Create(16, 16, ILC_MASK, 0, 1); + m_iFolderIndex = m_ilIcons.Add(m_hFolderIcon); + m_iDocIndex = m_ilIcons.Add(m_hDocIcon); + + m_iCurProfileSel = -1; } *************** *** 67,70 **** --- 76,85 ---- BEGIN_MESSAGE_MAP(CAdditionalSettingsDlg, CDialog) //{{AFX_MSG_MAP(CAdditionalSettingsDlg) + ON_LBN_SELCHANGE(IDC_AS_PROFILES, OnSelchangeAsProfiles) + ON_BN_CLICKED(IDC_AS_NEWPROFILE, OnAsNewprofile) + ON_BN_CLICKED(IDC_AS_EDITPROFILE, OnAsEditprofile) + ON_BN_CLICKED(IDC_AS_DELETEPROFILE, OnAsDeleteprofile) + ON_BN_CLICKED(IDC_AS_MULBROWSE, OnAsMulbrowse) + ON_BN_CLICKED(IDC_AS_CLIENTBROWSE, OnAsClientbrowse) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 144,148 **** CString csProfile; csProfile.Format("Local: %s", szBuffer); ! this->m_clbProfiles.AddString(szBuffer); } iIndex++; --- 159,163 ---- CString csProfile; csProfile.Format("Local: %s", szBuffer); ! this->m_clbProfiles.AddString(csProfile); } iIndex++; *************** *** 165,169 **** CString csProfile; csProfile.Format("Remote: %s", szBuffer); ! this->m_clbProfiles.AddString(szBuffer); } iIndex++; --- 180,184 ---- CString csProfile; csProfile.Format("Remote: %s", szBuffer); ! this->m_clbProfiles.AddString(csProfile); } iIndex++; *************** *** 173,176 **** --- 188,403 ---- UpdateData(FALSE); + + m_ctcScripts.SetImageList(&m_ilIcons, TVSIL_NORMAL); + return TRUE; + } + + void CAdditionalSettingsDlg::OnSelchangeAsProfiles() + { + int iSel = this->m_clbProfiles.GetCurSel(); + if ( m_iCurProfileSel != -1 && m_iCurProfileSel != iSel ) + UpdateProfile(); + m_iCurProfileSel = iSel; + if ( iSel == -1 ) + { + this->m_cbDeleteProfile.EnableWindow(FALSE); + this->m_cbEditProfile.EnableWindow(FALSE); + this->m_ctcScripts.DeleteAllItems(); + return; + } + this->m_cbDeleteProfile.EnableWindow(TRUE); + this->m_cbEditProfile.EnableWindow(TRUE); + m_ctcScripts.DeleteAllItems(); + + // Populate the tree control with the scripts available to this profile + CString csProfile; + m_clbProfiles.GetText(iSel, csProfile); + if (csProfile.Find("Local:") == 0 ) + { + // Local profile + // Find the root directory of this profile + CString csKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\") + _T(csProfile.Mid(7)); + CString csRoot = Main->GetRegistryString("Root Directory", "", HKEY_LOCAL_MACHINE, csKey); + CStringArray csaSelectedScripts; + Main->GetRegistryMultiSz("Selected Scripts", &csaSelectedScripts, HKEY_LOCAL_MACHINE, csKey); + // Make a node in the tree control for this directory + HTREEITEM hRoot = m_ctcScripts.InsertItem(csRoot); + ParseDirectory(LPCTSTR(csRoot), hRoot, &csaSelectedScripts); + } + else + { + // Remote profile + CString csKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\") + _T(csProfile.Mid(8)); + CRemoteConnection remote(csProfile.Mid(8)); + CStringArray csaSelectedScripts; + Main->GetRegistryMultiSz("Selected Scripts", &csaSelectedScripts, HKEY_LOCAL_MACHINE, csKey); + HTREEITEM hRoot = m_ctcScripts.InsertItem(""); + ParseRemoteDirectory("." , hRoot, &csaSelectedScripts, &remote); + } + } + + void CAdditionalSettingsDlg::OnAsNewprofile() + { + + } + + void CAdditionalSettingsDlg::OnAsEditprofile() + { + + } + + void CAdditionalSettingsDlg::OnAsDeleteprofile() + { + + } + + void CAdditionalSettingsDlg::OnAsMulbrowse() + { + + } + + void CAdditionalSettingsDlg::OnAsClientbrowse() + { + + } + + void CAdditionalSettingsDlg::ParseDirectory(LPCTSTR pszPath, HTREEITEM hNode, CStringArray *pSelections) + { + WIN32_FIND_DATA findData; + memset(&findData, 0x00, sizeof(findData)); + CString csTestFile; + csTestFile.Format("%s\\*", pszPath); + HANDLE hSearch = FindFirstFile(csTestFile, &findData); + if ( hSearch != INVALID_HANDLE_VALUE ) + { + BOOL bStatus = TRUE; + while (bStatus) + { + if ( findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) + { + // Recurse this + if ( strcmp(findData.cFileName, "..") == 0 || strcmp(findData.cFileName, ".") == 0 ) + { + // Ignore this one + } + else + { + HTREEITEM hBranch = m_ctcScripts.InsertItem(findData.cFileName, m_iFolderIndex, m_iFolderIndex, hNode); + CString csNewPath; + csNewPath.Format("%s\\%s", pszPath, findData.cFileName); + ParseDirectory(csNewPath, hBranch, pSelections); + } + } + else + { + CString csFileName = _T(findData.cFileName); + if ( csFileName.Right(4).CompareNoCase(".scp") == 0) + { + CString csFullPath; + csFullPath.Format("%s\\%s", pszPath, findData.cFileName); + HTREEITEM hNewItem = m_ctcScripts.InsertItem(findData.cFileName, m_iDocIndex, m_iDocIndex, hNode); + if ( IsSelected(pSelections, csFullPath ) ) + m_ctcScripts.SetCheck(hNewItem); + + } + } + bStatus = FindNextFile(hSearch, &findData); + } + FindClose(hSearch); + } + } + + void CAdditionalSettingsDlg::ParseRemoteDirectory(LPCTSTR pszPath, HTREEITEM hNode, CStringArray * pSelections, CRemoteConnection * pRemote) + { + CStringArray csaFiles, csaDirectories; + pRemote->GetDirectory(pszPath, &csaFiles, &csaDirectories); + int i; + for ( i = 0; i <= csaDirectories.GetUpperBound(); i++ ) + { + if ( csaDirectories.GetAt(i) == "." || csaDirectories.GetAt(i) == ".." ) + continue; + HTREEITEM hBranch = m_ctcScripts.InsertItem(csaDirectories.GetAt(i), m_iFolderIndex, m_iFolderIndex, hNode); + CString csNewPath; + csNewPath.Format("%s\\%s", pszPath, csaDirectories.GetAt(i)); + if ( csNewPath.Find(".\\") == 0 ) + csNewPath = csNewPath.Mid(2); + ParseRemoteDirectory(csNewPath, hBranch, pSelections, pRemote); + } + for ( i = 0; i <= csaFiles.GetUpperBound(); i++ ) + { + if ( csaFiles.GetAt(i).Right(4).CompareNoCase(".scp") == 0 ) + { + CString csFullPath; + csFullPath.Format("%s\\%s", pszPath, csaFiles.GetAt(i)); + if ( csFullPath.Find(".\\") == 0 ) + csFullPath = csFullPath.Mid(2); + HTREEITEM hNewItem = m_ctcScripts.InsertItem(csaFiles.GetAt(i), m_iDocIndex, m_iDocIndex, hNode); + if ( IsSelected(pSelections, csFullPath) ) + m_ctcScripts.SetCheck(hNewItem); + } + } + } + + void CAdditionalSettingsDlg::UpdateProfile() + { + if ( m_iCurProfileSel == -1 ) + return; + CString csProfile; + this->m_clbProfiles.GetText(m_iCurProfileSel, csProfile); + CStringArray aSelectedScripts; + HTREEITEM hRoot = m_ctcScripts.GetRootItem(); + CString csRootDir = m_ctcScripts.GetItemText(hRoot); + GetSelections(hRoot, csRootDir, &aSelectedScripts); + + CString csProfileKey; + if (csProfile.Find("Local:") == 0 ) + { + // Local profile + csProfileKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\") + _T(csProfile.Mid(7)); + } + else + { + // Remote profile + csProfileKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\") + _T(csProfile.Mid(8)); + } + Main->PutRegistryMultiSz("Selected Scripts", &aSelectedScripts, HKEY_LOCAL_MACHINE, csProfileKey); + } + + void CAdditionalSettingsDlg::GetSelections(HTREEITEM hNode, CString csRootDir, CStringArray *pSelections) + { + HTREEITEM hChild = m_ctcScripts.GetNextItem(hNode, TVGN_CHILD); + while (hChild != NULL ) + { + CString csPath; + if ( csRootDir != "" ) + csPath = csRootDir + _T("\\") + m_ctcScripts.GetItemText(hChild); + else + csPath = m_ctcScripts.GetItemText(hChild); + if ( m_ctcScripts.ItemHasChildren(hChild) ) + GetSelections(hChild, csPath, pSelections); + else + { + // This is a script file + if ( m_ctcScripts.GetCheck(hChild) ) + pSelections->Add(csPath); + } + hChild = m_ctcScripts.GetNextItem(hChild, TVGN_NEXT); + } + } + + bool CAdditionalSettingsDlg::IsSelected(CStringArray * pSelections, CString csFile) + { + for ( int i = 0; i <= pSelections->GetUpperBound(); i++ ) + { + if ( csFile == pSelections->GetAt(i) ) + return true; + } + return false; + } + + void CAdditionalSettingsDlg::OnOK() + { + UpdateProfile(); + CDialog::OnOK(); } Index: AdditionalSettingsDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AdditionalSettingsDlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AdditionalSettingsDlg.h 14 May 2002 20:03:34 -0000 1.2 --- AdditionalSettingsDlg.h 20 May 2002 19:14:42 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- // + #include "RemoteConnection.h" + ///////////////////////////////////////////////////////////////////////////// // CAdditionalSettingsDlg dialog *************** *** 54,61 **** --- 56,81 ---- // Implementation protected: + int m_iCurProfileSel; + CImageList m_ilIcons; + int m_iFolderIndex; + int m_iDocIndex; + HICON m_hDocIcon; + HICON m_hFolderIcon; + void ParseDirectory(LPCTSTR pszPath, HTREEITEM hNode, CStringArray * pSelections); + void ParseRemoteDirectory(LPCTSTR pszPath, HTREEITEM hNode, CStringArray * pSelections, CRemoteConnection * pRemote); + bool IsSelected(CStringArray * pSelections, CString csFile); + void UpdateProfile(); + void GetSelections(HTREEITEM hNode, CString csRootDir, CStringArray * pSelections); // Generated message map functions //{{AFX_MSG(CAdditionalSettingsDlg) virtual BOOL OnInitDialog(); + afx_msg void OnSelchangeAsProfiles(); + afx_msg void OnAsNewprofile(); + afx_msg void OnAsEditprofile(); + afx_msg void OnAsDeleteprofile(); + afx_msg void OnAsMulbrowse(); + afx_msg void OnAsClientbrowse(); + virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: CScriptObjects.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CScriptObjects.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** CScriptObjects.cpp 16 May 2002 01:31:57 -0000 1.17 --- CScriptObjects.cpp 20 May 2002 19:14:42 -0000 1.18 *************** *** 2466,2469 **** --- 2466,2470 ---- e->Delete(); } + m_pDlg->SetPos(csfInput.GetLength()); csfInput.Close(); DestroyProgressDialog(); *************** *** 2492,2495 **** --- 2493,2520 ---- if ( Main->GetProfileType() == PROFILE_REMOTE ) { + CStringArray csaScripts; + CString csKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\") + Main->GetProfileString(); + Main->GetRegistryMultiSz("Selected Scripts", &csaScripts, HKEY_LOCAL_MACHINE, csKey); + if ( csaScripts.GetSize() > 0 ) + { + // Load the specified scripts + this->m_bNewFormat = true; + m_pRemote->SetDialog(m_pDlg); + for ( int i = 0; i <= csaScripts.GetUpperBound(); i++ ) + { + m_pRemote->UpdateFile(csaScripts.GetAt(i)); + CString csLocalFile; + csLocalFile.Format("%s\\%s", Main->GetProfileString(), csaScripts.GetAt(i)); + LoadFile(csLocalFile); + } + // Categorize everything + CategorizeLocations(); + CategorizeItems(); + CategorizeNPCs(); + this->m_bDeleteDialog = true; + DestroyProgressDialog(); + // We're done + return; + } #ifdef _AXIS m_pRemote->SetDialog(m_pDlg); *************** *** 2501,2504 **** --- 2526,2549 ---- else { + // Local profile + // Has the user selected particular scripts to load? + CStringArray csaScripts; + CString csKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\") + Main->GetProfileString(); + Main->GetRegistryMultiSz("Selected Scripts", &csaScripts, HKEY_LOCAL_MACHINE, csKey); + if ( csaScripts.GetSize() > 0 ) + { + // Load the specified scripts + this->m_bNewFormat = true; + for ( int i = 0; i <= csaScripts.GetUpperBound(); i++ ) + LoadFile(csaScripts.GetAt(i)); + // Categorize everything + CategorizeLocations(); + CategorizeItems(); + CategorizeNPCs(); + this->m_bDeleteDialog = true; + DestroyProgressDialog(); + // We're done + return; + } // Load the INI file first Main->m_log.Add("Reading server INI file from working directory"); Index: Drewsky.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** Drewsky.cpp 15 May 2002 22:18:48 -0000 1.13 --- Drewsky.cpp 20 May 2002 19:14:43 -0000 1.14 *************** *** 567,569 **** --- 567,654 ---- } return PROFILE_UNDEFINED; + } + + void CDrewskyApp::PutRegistryMultiSz(CString csValue, CStringArray * pStrings, HKEY hMainKey, CString csSubKey) + { + HKEY hKey; + DWORD dwDisp; + LONG lStatus = RegCreateKeyEx(hMainKey, csSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); + + // Find out how much space we need to allocate for the string buffer + int i = 0; + int iLength = 0; + for ( i = 0; i <= pStrings->GetUpperBound(); i++ ) + iLength += ( pStrings->GetAt(i).GetLength() + 1); + + char * pszStrings = new char [iLength + 1]; + + memset(pszStrings, 0x00, iLength + 1); + char * ptr = pszStrings; + for ( i = 0; i <= pStrings->GetUpperBound(); i++ ) + { + memcpy(ptr, LPCTSTR(pStrings->GetAt(i)), pStrings->GetAt(i).GetLength()); + ptr += pStrings->GetAt(i).GetLength() + 1; + } + + if ( lStatus != ERROR_SUCCESS ) + { + m_log.Add("Unable to open registry key %s for writing. Last error was %s", csSubKey, strerror(lStatus) ); + return; + } + lStatus = RegSetValueEx(hKey, csValue, 0, REG_MULTI_SZ, ((BYTE *) pszStrings), iLength ); + if ( lStatus != ERROR_SUCCESS ) + m_log.Add("Error writing value %s to the registry. Last error was %s", csValue, strerror(lStatus) ); + RegCloseKey(hKey); + + delete [] pszStrings; + } + + void CDrewskyApp::GetRegistryMultiSz(CString csValue, CStringArray * pStrings, HKEY hMainKey, CString csSubKey) + { + // Make sure the input array is empty + pStrings->RemoveAll(); + + HKEY hKey; + if ( RegOpenKeyEx(hMainKey, csSubKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS ) + return; + DWORD dwType, dwSize; + // Need to find out how big the buffer is + dwSize = 0; + LONG lStatus = RegQueryValueEx(hKey, LPCTSTR(csValue), 0, &dwType, NULL, &dwSize); + + if ( dwSize == 0 ) + { + RegCloseKey(hKey); + return; + } + + char * pszBuffer = new char [dwSize]; + memset(pszBuffer, 0x00, dwSize); + lStatus = RegQueryValueEx(hKey, LPCTSTR(csValue), 0, &dwType, (BYTE*) pszBuffer, &dwSize); + char * pDataPtr = pszBuffer; + + if ( lStatus != ERROR_SUCCESS ) + { + if ( lStatus == ERROR_FILE_NOT_FOUND ) + m_log.Add("Unable to find value %s in the registry.", csValue); + else + m_log.Add("Error reading value %s from registry. Last error was %s", csValue, strerror(GetLastError()) ); + } + else + { + // parse the registry value + DWORD dwOffset = 0; + while ( dwOffset < dwSize ) + { + CString csValue = _T(pDataPtr); + pStrings->Add(csValue); + pDataPtr += csValue.GetLength() + 1; + dwOffset += csValue.GetLength() + 1; + } + + } + if ( dwType != REG_MULTI_SZ ) + m_log.Add("Registry value of wrong type for %s. Type was %ld, expected %ld", csValue, dwType, REG_MULTI_SZ); + RegCloseKey(hKey); + delete [] pszBuffer; } Index: Drewsky.dsp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.dsp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** Drewsky.dsp 12 May 2002 18:58:18 -0000 1.24 --- Drewsky.dsp 20 May 2002 19:14:43 -0000 1.25 *************** *** 9,18 **** !MESSAGE use the Export Makefile command and run !MESSAGE ! !MESSAGE NMAKE /f "drewsky.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE ! !MESSAGE NMAKE /f "drewsky.mak" CFG="drewsky - Win32 Future Debug" !MESSAGE !MESSAGE Possible choices for configuration are: --- 9,18 ---- !MESSAGE use the Export Makefile command and run !MESSAGE ! !MESSAGE NMAKE /f "Drewsky.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE ! !MESSAGE NMAKE /f "Drewsky.mak" CFG="drewsky - Win32 Future Debug" !MESSAGE !MESSAGE Possible choices for configuration are: *************** *** 977,980 **** --- 977,985 ---- # End Target # End Project + # Section drewsky : {2B360722-F116-4004-A71A-5E14B4C4873E} + # 2:5:Class:CUOMap + # 2:10:HeaderFile:uomap.h + # 2:8:ImplFile:uomap.cpp + # End Section # Section drewsky : {EF8782A5-4E77-4990-A8C7-0E28C52E90CF} # 2:5:Class:CUOArt *************** *** 982,996 **** # 2:8:ImplFile:uoart.cpp # End Section - # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} - # 2:21:DefaultSinkHeaderFile:uomap.h - # 2:16:DefaultSinkClass:CUOMap - # End Section # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} # 2:21:DefaultSinkHeaderFile:uoart.h # 2:16:DefaultSinkClass:CUOArt # End Section ! # Section drewsky : {2B360722-F116-4004-A71A-5E14B4C4873E} ! # 2:5:Class:CUOMap ! # 2:10:HeaderFile:uomap.h ! # 2:8:ImplFile:uomap.cpp # End Section --- 987,996 ---- # 2:8:ImplFile:uoart.cpp # End Section # Section drewsky : {0904F7B3-2339-44C9-857C-6EB6CFEFA3B6} # 2:21:DefaultSinkHeaderFile:uoart.h # 2:16:DefaultSinkClass:CUOArt # End Section ! # Section drewsky : {2AC21540-4C63-4663-BF24-D1DBD9205223} ! # 2:21:DefaultSinkHeaderFile:uomap.h ! # 2:16:DefaultSinkClass:CUOMap # End Section Index: Drewsky.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** Drewsky.h 15 May 2002 22:18:48 -0000 1.10 --- Drewsky.h 20 May 2002 19:14:43 -0000 1.11 *************** *** 72,75 **** --- 72,77 ---- CString GetRegistryString(CString csValue, CString csDefault = _T(""), HKEY hMainKey = HKEY_LOCAL_MACHINE, CString csSubKey = "Software\\Menasoft\\GM Tools"); DWORD GetRegistryDword(CString csValue, DWORD dwDefault = 0, HKEY hMainKey = HKEY_LOCAL_MACHINE, CString csSubKey = "Software\\Menasoft\\GM Tools"); + void PutRegistryMultiSz(CString csValue, CStringArray * pStrings, HKEY hMainKey = HKEY_LOCAL_MACHINE, CString csSubKey = "SOFTWARE\\Menasoft\\GM Tools"); + void GetRegistryMultiSz(CString csValue, CStringArray * pStrings, HKEY hMainKey = HKEY_LOCAL_MACHINE, CString csSubKey = "SOFTWARE\\Menasoft\\GM Tools"); void SetDialogColors(); CScriptObjects * m_pScripts; Index: remoteconnection.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/remoteconnection.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** remoteconnection.cpp 14 May 2002 20:03:34 -0000 1.19 --- remoteconnection.cpp 20 May 2002 19:14:43 -0000 1.20 *************** *** 75,108 **** CRemoteConnection::CRemoteConnection() { ! int iPort = atoi(Main->m_csAxissvrPort); ! if (iPort == 0) ! iPort = 4006; ! Main->m_log.Add("Connecting to remote server on IP %s, port %ld", Main->m_csServerIP, iPort); ! m_bDeleteWindow = false; ! m_pDlg = NULL; ! if ( m_pDlg == NULL ) ! { ! m_bDeleteWindow = true; ! m_pDlg = new CFileReadProgress; ! m_pDlg->Create(IDD_FILEREAD_PROGRESS); ! } ! if ( m_pDlg ) ! m_pDlg->m_csMessage.SetWindowText("Connecting to remote server..."); ! m_sock.m_hSocket = socket(AF_INET, SOCK_STREAM, 0); ! setsockopt(m_sock.m_hSocket, SOL_SOCKET, SO_DONTLINGER, "1", 1); ! if ( m_sock.Connect(Main->m_csServerIP, iPort) ) ! m_bIsValid = true; ! else ! m_bIsValid = false; ! // For some reason, if we don't wait here, we'll likely kill hogsvr with a broken pipe. ! if ( m_bIsValid ) ! m_bIsValid = this->Logon(); ! else ! { ! CString csMessage; ! Main->m_log.Add("Unable to connect to axis server running on IP %s, port %ld", Main->m_csServerIP, iPort); ! csMessage.Format("Unable to connect to axissvr running on IP %s, port %ld.", Main->m_csServerIP, iPort ); ! AfxMessageBox(csMessage, MB_OK | MB_ICONSTOP ); ! } } --- 75,87 ---- CRemoteConnection::CRemoteConnection() { ! // Use default profile ! ReadProfile(Main->GetProfileString()); ! Initialize(); ! } ! ! CRemoteConnection::CRemoteConnection(CString csProfile) ! { ! ReadProfile(csProfile); ! Initialize(); } *************** *** 128,132 **** return false; } ! Send(Main->m_csUserID, strlen(Main->m_csUserID)); ZeroMemory(szBuffer, sizeof(szBuffer)); rc = Receive(szBuffer, sizeof(szBuffer)); --- 107,111 ---- return false; } ! Send(m_csUsername, strlen(m_csUsername)); ZeroMemory(szBuffer, sizeof(szBuffer)); rc = Receive(szBuffer, sizeof(szBuffer)); *************** *** 136,140 **** return false; } ! Send(Main->m_csPassword, strlen(Main->m_csPassword)); ZeroMemory(szBuffer, sizeof(szBuffer)); rc = Receive(szBuffer, sizeof(szBuffer)); --- 115,119 ---- return false; } ! Send(m_csPassword, strlen(m_csPassword)); ZeroMemory(szBuffer, sizeof(szBuffer)); rc = Receive(szBuffer, sizeof(szBuffer)); *************** *** 540,544 **** // Didn't get the entire file....delete the temporary file Main->m_log.Add("EOF message never received from remote server for file %s", csRemoteFileName); ! CFile::Remove(csLocalFile); } if ( m_pDlg ) --- 519,530 ---- // Didn't get the entire file....delete the temporary file Main->m_log.Add("EOF message never received from remote server for file %s", csRemoteFileName); ! try ! { ! CFile::Remove(csLocalFile); ! } ! catch (CFileException * e) ! { ! e->Delete(); ! } } if ( m_pDlg ) *************** *** 846,850 **** return rc; } ! if ( i++ > Main->m_iReceiveTimeout ) { Main->m_log.Add("Timeout exceeded while receiving incoming packet."); --- 832,836 ---- return rc; } ! if ( i++ > m_iReceiveTimeout ) { Main->m_log.Add("Timeout exceeded while receiving incoming packet."); *************** *** 883,887 **** return nRead; } ! if ( i++ > Main->m_iReceiveTimeout ) { Main->m_log.Add("Timeout exceeded while receiving data from remote server."); --- 869,873 ---- return nRead; } ! if ( i++ > m_iReceiveTimeout ) { Main->m_log.Add("Timeout exceeded while receiving data from remote server."); *************** *** 1231,1233 **** m_bDeleteWindow = false; m_pDlg = pDlg; ! } \ No newline at end of file --- 1217,1298 ---- m_bDeleteWindow = false; m_pDlg = pDlg; ! } ! ! void CRemoteConnection::Initialize() ! { ! Main->m_log.Add("Connecting to remote server on IP %s, port %ld", m_csIP, m_iRemotePort); ! m_bDeleteWindow = false; ! m_pDlg = NULL; ! if ( m_pDlg == NULL ) ! { ! m_bDeleteWindow = true; ! m_pDlg = new CFileReadProgress; ! m_pDlg->Create(IDD_FILEREAD_PROGRESS); ! } ! if ( m_pDlg ) ! m_pDlg->m_csMessage.SetWindowText("Connecting to remote server..."); ! m_sock.m_hSocket = socket(AF_INET, SOCK_STREAM, 0); ! setsockopt(m_sock.m_hSocket, SOL_SOCKET, SO_DONTLINGER, "1", 1); ! if ( m_sock.Connect(m_csIP, m_iRemotePort) ) ! m_bIsValid = true; ! else ! m_bIsValid = false; ! // For some reason, if we don't wait here, we'll likely kill hogsvr with a broken pipe. ! if ( m_bIsValid ) ! m_bIsValid = this->Logon(); ! else ! { ! CString csMessage; ! Main->m_log.Add("Unable to connect to axis server running on IP %s, port %ld", m_csIP, m_iRemotePort); ! csMessage.Format("Unable to connect to axissvr running on IP %s, port %ld.", m_csIP, m_iRemotePort ); ! AfxMessageBox(csMessage, MB_OK | MB_ICONSTOP ); ! } ! } ! ! void CRemoteConnection::ReadProfile(CString csProfile) ! { ! CString csKey = _T("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\") + csProfile; ! m_iRemotePort = atoi(Main->GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey)); ! m_csIP = Main->GetRegistryString("ServerIP", "", HKEY_LOCAL_MACHINE, csKey); ! m_csPassword = Encrypt(Main->GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey)); ! m_csUsername = Main->GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); ! m_iReceiveTimeout = Main->GetRegistryDword("ReceiveTimeout", 60000, HKEY_LOCAL_MACHINE, csKey); ! } ! ! void CRemoteConnection::UpdateFile(CString csRemoteName) ! { ! if ( !m_bIsValid ) ! return; ! CString csFile; ! if ( csRemoteName.GetAt(0) == '\\' || csRemoteName.GetAt(0) == '/' ) ! csFile = csRemoteName.Mid(1); ! else ! csFile = csRemoteName; ! csFile.Replace('/', '\\'); ! csFile.Replace(':', '!'); ! // Is this a directory? ! if ( csFile.ReverseFind('\\') == csFile.GetLength() - 1) ! return; ! else ! { ! CString csLocalFile; ! csLocalFile.Format("%s\\%s", Main->GetProfileString(), csFile); ! char szCmd[MAX_PATH]; ! sprintf(szCmd, "GFCS%s", csRemoteName); ! Send(szCmd, strlen(szCmd)); ! char szBuffer[MAX_PATH]; ! memset(&szBuffer[0], 0x00, sizeof(szBuffer)); ! Receive(&szBuffer[0], sizeof(szBuffer)); ! int iChk = atoi(szBuffer); ! CString csMessage; ! csMessage.Format("Checking for an updated version of %s", csRemoteName); ! if ( m_pDlg ) ! m_pDlg->m_csMessage.SetWindowText(csMessage); ! int iTest = GetChecksum(csLocalFile); ! if ( iChk != iTest ) ! { ! Main->m_log.Add("Checksum for file %s did not match...local = %ld, remote = %ld", csLocalFile, iTest, iChk); ! GetCustomFile(csRemoteName, csLocalFile); ! } ! } ! } Index: remoteconnection.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/remoteconnection.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** remoteconnection.h 1 May 2002 03:33:11 -0000 1.3 --- remoteconnection.h 20 May 2002 19:14:43 -0000 1.4 *************** *** 37,44 **** --- 37,46 ---- { public: + void UpdateFile(CString csRemoteName); void StartTUS(); BYTE m_protocolLevel; bool SendCustomFile(CString csFileName, CString csTmpFile, CSObject * pObject = NULL ); CRemoteConnection(); + CRemoteConnection(CString csProfile); virtual ~CRemoteConnection(); bool IsValid() {return m_bIsValid;}; *************** *** 59,62 **** --- 61,72 ---- CFileReadProgress * m_pDlg; bool m_bDeleteWindow; + void ReadProfile(CString csProfile); + void Initialize(); + + int m_iRemotePort; + CString m_csPassword; + int m_iReceiveTimeout; + CString m_csIP; + CString m_csUsername; }; |
From: Philip E. <pes...@us...> - 2002-05-16 22:06:17
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv23823 Modified Files: Axis.txt Log Message: updated release notes Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** Axis.txt 10 May 2002 19:24:12 -0000 1.25 --- Axis.txt 16 May 2002 22:06:12 -0000 1.26 *************** *** 25,28 **** --- 25,32 ---- ============================================================================= Changes in version 0.13.2 (in development) + · Changes to the way profiles are loaded. Multiple local profiles can be specified, and local profiles can use remote + consoles and remote spawnpoints. + · Fixed bug in Remote Console window where doing a pause/resync after disconnecting would automatically reconnect + to the console without prompting for the username/password. · Tweaked the remote console a bit. Errors should be more visible, and hopefully more useful. · Fixed a crash bug that occurs when the default client is in a directory that doesn't contain the mul files. |
From: Philip E. <pes...@us...> - 2002-05-16 01:32:01
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv15894 Modified Files: CScriptObjects.cpp drewsky.rc drewskyps.cpp flagsbrainstab.cpp itemgentab.cpp MISCTAB.CPP RemoteProfileDlg.cpp SPAWNTAB.CPP SPAWNTAB.H traveltab.cpp Log Message: bugfixes and new build (0.13.1.12) Index: CScriptObjects.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CScriptObjects.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** CScriptObjects.cpp 15 May 2002 22:18:48 -0000 1.16 --- CScriptObjects.cpp 16 May 2002 01:31:57 -0000 1.17 *************** *** 57,61 **** m_pDlg = NULL; ! if ( Main->GetProfileType() == PROFILE_REMOTE && !Main->m_bNoScripts ) m_pRemote = new CRemoteConnection; else --- 57,61 ---- m_pDlg = NULL; ! if ( Main->GetProfileType() == PROFILE_REMOTE ) m_pRemote = new CRemoteConnection; else *************** *** 168,172 **** void CScriptObjects::LoadDefs() { ! if ( Main->m_bNoScripts ) return; if ( m_bDefsLoaded ) --- 168,172 ---- void CScriptObjects::LoadDefs() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bDefsLoaded ) *************** *** 297,301 **** void CScriptObjects::LoadItems() { ! if ( Main->m_bNoScripts ) return; if ( m_bItemsLoaded ) --- 297,301 ---- void CScriptObjects::LoadItems() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bItemsLoaded ) *************** *** 456,460 **** void CScriptObjects::LoadNPCs() { ! if ( Main->m_bNoScripts ) return; if ( m_bNPCsLoaded ) --- 456,460 ---- void CScriptObjects::LoadNPCs() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bNPCsLoaded ) *************** *** 615,619 **** void CScriptObjects::LoadTemplates() { ! if ( Main->m_bNoScripts ) return; if ( m_bTemplatesLoaded ) --- 615,619 ---- void CScriptObjects::LoadTemplates() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bTemplatesLoaded ) *************** *** 814,818 **** void CScriptObjects::LoadMap() { ! if ( Main->m_bNoScripts ) return; if ( m_bMapLoaded ) --- 814,818 ---- void CScriptObjects::LoadMap() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bMapLoaded ) *************** *** 981,985 **** void CScriptObjects::LoadTriggers() { ! if ( Main->m_bNoScripts ) return; if ( m_bTriggersLoaded ) --- 981,985 ---- void CScriptObjects::LoadTriggers() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bTriggersLoaded ) *************** *** 1135,1139 **** void CScriptObjects::LoadLocations() { ! if ( Main->m_bNoScripts ) return; if ( m_bLocationsLoaded ) --- 1135,1139 ---- void CScriptObjects::LoadLocations() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bLocationsLoaded ) *************** *** 1236,1240 **** void CScriptObjects::LoadNames() { ! if ( Main->m_bNoScripts ) return; if ( m_bNamesLoaded ) --- 1236,1240 ---- void CScriptObjects::LoadNames() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bNamesLoaded ) *************** *** 1372,1376 **** void CScriptObjects::LoadSpeechBlocks() { ! if ( Main->m_bNoScripts ) return; if ( m_bSpeechLoaded ) --- 1372,1376 ---- void CScriptObjects::LoadSpeechBlocks() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( m_bSpeechLoaded ) *************** *** 1967,1971 **** bool CScriptObjects::LoadFile(CString csFile) { ! if ( Main->m_bNoScripts ) return true; csFile.Replace('/', '\\'); --- 1967,1971 ---- bool CScriptObjects::LoadFile(CString csFile) { ! if ( Main->GetProfileType() == PROFILE_NONE ) return true; csFile.Replace('/', '\\'); *************** *** 2473,2477 **** void CScriptObjects::LoadAll() { ! if ( Main->m_bNoScripts ) return; CString csLoadFile; --- 2473,2477 ---- void CScriptObjects::LoadAll() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; CString csLoadFile; Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** drewsky.rc 15 May 2002 22:18:48 -0000 1.36 --- drewsky.rc 16 May 2002 01:31:57 -0000 1.37 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // Last compiled 5/15/2002 at 19:22:53 #include "resource.h" *************** *** 2325,2330 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,11 ! PRODUCTVERSION 0,13,1,11 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 2325,2330 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,13,1,12 ! PRODUCTVERSION 0,13,1,12 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 2344,2348 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 11\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" --- 2344,2348 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "axis MFC Application\0" ! VALUE "FileVersion", "0, 13, 1, 12\0" VALUE "InternalName", "axis\0" VALUE "LegalCopyright", "Copyright (C) 1998-2002\0" *************** *** 2351,2355 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 11\0" VALUE "SpecialBuild", "\0" END --- 2351,2355 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "Axis\0" ! VALUE "ProductVersion", "0, 13, 1, 12\0" VALUE "SpecialBuild", "\0" END Index: drewskyps.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewskyps.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** drewskyps.cpp 10 May 2002 19:23:50 -0000 1.6 --- drewskyps.cpp 16 May 2002 01:31:57 -0000 1.7 *************** *** 245,253 **** _unlink( RMT_TRIGGER_FILE ); */ ! if ( Main->m_bNoScripts ) return; if ( Main->m_pScripts ) delete Main->m_pScripts; ! if ( !Main->m_bNoScripts ) { Main->m_pScripts = new CScriptObjects; --- 245,253 ---- _unlink( RMT_TRIGGER_FILE ); */ ! if ( Main->GetProfileType() == PROFILE_NONE ) return; if ( Main->m_pScripts ) delete Main->m_pScripts; ! if ( Main->GetProfileType() != PROFILE_NONE ) { Main->m_pScripts = new CScriptObjects; Index: flagsbrainstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/flagsbrainstab.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** flagsbrainstab.cpp 5 May 2002 16:37:42 -0000 1.5 --- flagsbrainstab.cpp 16 May 2002 01:31:57 -0000 1.6 *************** *** 709,715 **** this->m_ccbSkills.ResetContent(); - Main->m_pScripts->LoadDefs(); - Main->m_pScripts->LoadTables(); - for ( int i = 0; i < Main->m_pScripts->m_tables.m_skills.GetSize(); i++ ) { --- 709,712 ---- Index: itemgentab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/itemgentab.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** itemgentab.cpp 6 May 2002 04:11:10 -0000 1.11 --- itemgentab.cpp 16 May 2002 01:31:57 -0000 1.12 *************** *** 615,627 **** void CItemGenTab::LoadScripts() { - Main->m_pScripts->LoadItems(); - Main->m_pScripts->LoadTemplates(); - - Main->m_pScripts->CategorizeItems(); - - // Now add all of the categories to the category list box - FillCategoryTree(); - } --- 615,619 ---- Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** MISCTAB.CPP 15 May 2002 22:18:48 -0000 1.12 --- MISCTAB.CPP 16 May 2002 01:31:57 -0000 1.13 *************** *** 830,836 **** this->m_ccSpellList.ResetContent(); - //Main->m_pScripts->LoadDefs(); - //Main->m_pScripts->LoadTables(); - // Fill the spells list for ( int i = 1; i < Main->m_pScripts->m_tables.m_spells.GetSize(); i++ ) --- 830,833 ---- Index: RemoteProfileDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteProfileDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** RemoteProfileDlg.cpp 15 May 2002 22:18:48 -0000 1.4 --- RemoteProfileDlg.cpp 16 May 2002 01:31:57 -0000 1.5 *************** *** 156,162 **** m_bRemoteSpawns = this->m_cbRemoteSpawns.GetCheck() ? true : false; ! this->m_ceHogPort.EnableWindow(m_bRemoteSpawns); ! this->m_cePwd.EnableWindow(m_bRemoteSpawns); ! this->m_ceUsername.EnableWindow(m_bRemoteSpawns); ! this->m_ceReceiveTimeout.EnableWindow(m_bRemoteSpawns); } --- 156,165 ---- m_bRemoteSpawns = this->m_cbRemoteSpawns.GetCheck() ? true : false; ! if ( this->m_iProfile == 0 ) ! { ! this->m_ceHogPort.EnableWindow(m_bRemoteSpawns); ! this->m_cePwd.EnableWindow(m_bRemoteSpawns); ! this->m_ceUsername.EnableWindow(m_bRemoteSpawns); ! this->m_ceReceiveTimeout.EnableWindow(m_bRemoteSpawns); ! } } Index: SPAWNTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.CPP,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** SPAWNTAB.CPP 10 May 2002 00:06:21 -0000 1.11 --- SPAWNTAB.CPP 16 May 2002 01:31:57 -0000 1.12 *************** *** 64,67 **** --- 64,68 ---- //{{AFX_DATA_INIT(CSpawnTab) //}}AFX_DATA_INIT + m_iCatSeq = 0; } *************** *** 462,466 **** } } ! } --- 463,467 ---- } } ! m_iCatSeq = Main->m_pScripts->m_iMCatSeq; } *************** *** 506,512 **** CWaitCursor hourglass; - Main->m_pScripts->LoadNPCs(); - Main->m_pScripts->LoadTables(); - CFileReadProgress dlg; dlg.Create(IDD_FILEREAD_PROGRESS); --- 507,510 ---- *************** *** 736,738 **** --- 734,743 ---- { SendToUO(".shrink"); + } + + BOOL CSpawnTab::OnSetActive() + { + if ( Main->m_pScripts->m_iMCatSeq != m_iCatSeq ) + this->FillCategoryTree(); + return CPropertyPage::OnSetActive(); } Index: SPAWNTAB.H =================================================================== RCS file: /cvsroot/sphere-axis/Axis/SPAWNTAB.H,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** SPAWNTAB.H 8 May 2002 15:44:18 -0000 1.5 --- SPAWNTAB.H 16 May 2002 01:31:57 -0000 1.6 *************** *** 85,88 **** --- 85,89 ---- public: virtual BOOL PreTranslateMessage(MSG* pMsg); + virtual BOOL OnSetActive(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support *************** *** 93,96 **** --- 94,98 ---- CString m_csSearchValue; int m_iSearchCrit; + int m_iCatSeq; CCategory * m_pSearchCategory; CSubsection * m_pSearchSubsection; Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** traveltab.cpp 15 May 2002 22:18:48 -0000 1.14 --- traveltab.cpp 16 May 2002 01:31:57 -0000 1.15 *************** *** 884,888 **** void CTravelTab::LoadScripts() { ! if ( Main->m_bNoScripts ) return; CWaitCursor hourglass; --- 884,888 ---- void CTravelTab::LoadScripts() { ! if ( Main->GetProfileType() == PROFILE_NONE ) return; CWaitCursor hourglass; *************** *** 894,905 **** if (Main->m_dwShowSpawnpoints) - { - // Read the local NPC and Item tables - Main->m_pScripts->LoadItems(); - Main->m_pScripts->LoadNPCs(); - Main->m_pScripts->LoadTables(); - Main->m_pScripts->LoadTemplates(); OnReloadspawns(); - } dlgProgress.EndDialog(IDOK); --- 894,898 ---- |
From: Philip E. <pes...@us...> - 2002-05-16 01:22:49
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv13932 Modified Files: UOArt.rc UOArt.opt Log Message: New build Index: UOArt.rc =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArt.rc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** UOArt.rc 12 May 2002 16:20:15 -0000 1.7 --- UOArt.rc 16 May 2002 01:22:45 -0000 1.8 *************** *** 1,4 **** /* ! // Last compiled 5/12/2002 at 10:19:9 ********************************************************************** --- 1,4 ---- /* ! // Last compiled 5/15/2002 at 19:22:1 ********************************************************************** *************** *** 101,106 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,4 ! PRODUCTVERSION 1,2,0,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 101,106 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1,2,0,5 ! PRODUCTVERSION 1,2,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 120,124 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "UOArt ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 4\0" VALUE "InternalName", "UOArt\0" VALUE "LegalCopyright", "Copyright (C) 2000, 2001\0" --- 120,124 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "UOArt ActiveX Control Module\0" ! VALUE "FileVersion", "1, 2, 0, 5\0" VALUE "InternalName", "UOArt\0" VALUE "LegalCopyright", "Copyright (C) 2000, 2001\0" *************** *** 128,132 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOArt ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 4\0" VALUE "SpecialBuild", "\0" END --- 128,132 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "UOArt ActiveX Control Module\0" ! VALUE "ProductVersion", "1, 2, 0, 5\0" VALUE "SpecialBuild", "\0" END Index: UOArt.opt =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArt.opt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 Binary files /tmp/cvs3HBdZX and /tmp/cvsetT4qL differ |
From: Philip E. <pes...@us...> - 2002-05-15 22:18:53
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv5251 Modified Files: common.cpp CScriptObjects.cpp Drewsky.cpp Drewsky.h drewsky.rc MISCTAB.CPP RemoteConsole.cpp RemoteProfileDlg.cpp RemoteProfileDlg.h resource.h settingstab.cpp traveltab.cpp Log Message: More mods related to the multiple local profiles bit. Allowed for local scripts/remote console/ remote spawns. Index: common.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/common.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** common.cpp 14 May 2002 20:03:34 -0000 1.17 --- common.cpp 15 May 2002 22:18:48 -0000 1.18 *************** *** 2828,2835 **** char szPath[MAX_PATH]; memset(szPath, 0x00, sizeof(szPath)); ! getcwd(szPath, sizeof(szPath)); strcat(szPath, "\\"); csPath = _T(szPath); ! BOOL bStatus = csfIni.Open(INI_FILE, CFile::modeRead | CFile::shareDenyNone ); if ( !bStatus ) return csPath; --- 2828,2839 ---- char szPath[MAX_PATH]; memset(szPath, 0x00, sizeof(szPath)); ! if ( Main->m_csRootDirectory == "" ) ! getcwd(szPath, sizeof(szPath)); ! else ! sprintf(szPath, "%s", Main->m_csRootDirectory); strcat(szPath, "\\"); csPath = _T(szPath); ! CString csIni = csPath + _T(INI_FILE); ! BOOL bStatus = csfIni.Open(csIni, CFile::modeRead | CFile::shareDenyNone ); if ( !bStatus ) return csPath; Index: CScriptObjects.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/CScriptObjects.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** CScriptObjects.cpp 14 May 2002 20:03:34 -0000 1.15 --- CScriptObjects.cpp 15 May 2002 22:18:48 -0000 1.16 *************** *** 2478,2483 **** bool bFoundScripts = false; char cwd[MAX_PATH]; ! int cwdSize = sizeof(cwd); ! getcwd(&cwd[0], cwdSize); Main->m_log.Add("Current working directory is %s", cwd); --- 2478,2489 ---- bool bFoundScripts = false; char cwd[MAX_PATH]; ! memset(&cwd[0], 0x00, MAX_PATH); ! if ( Main->GetProfileType() == PROFILE_LOCAL ) ! sprintf(cwd, "%s", Main->m_csRootDirectory); ! if ( cwd[0] == 0x00 ) ! { ! int cwdSize = sizeof(cwd); ! getcwd(&cwd[0], cwdSize); ! } Main->m_log.Add("Current working directory is %s", cwd); *************** *** 2498,2501 **** --- 2504,2509 ---- Main->m_log.Add("Reading server INI file from working directory"); csLoadFile.Format("%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; *************** *** 2775,2777 **** delete m_pDlg; m_pDlg = NULL; ! } \ No newline at end of file --- 2783,2785 ---- delete m_pDlg; m_pDlg = NULL; ! } \ No newline at end of file Index: Drewsky.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** Drewsky.cpp 14 May 2002 20:03:34 -0000 1.12 --- Drewsky.cpp 15 May 2002 22:18:48 -0000 1.13 *************** *** 128,131 **** --- 128,132 ---- m_dwItemSpawnColor = 0x0000FF00; m_dwNoNPCAnimations = 0; + m_dwRemoteSpawns = 0; m_iReceiveTimeout = 60000; m_dwDialogColor = GetSysColor(COLOR_3DFACE); *************** *** 190,199 **** { CString csKey; ! m_log.Add("Retrieving remote profiles"); csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", GetProfileString()); m_csUserID = GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); m_csPassword = GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); m_csServerIP = GetRegistryString("ServerIP", "", HKEY_LOCAL_MACHINE, csKey); - m_csMonPassword = GetRegistryString("MonPassword", "", HKEY_LOCAL_MACHINE, csKey); m_csAxissvrPort = GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey); m_csSpherePort = GetRegistryString("TusPort", "2593", HKEY_LOCAL_MACHINE, csKey); --- 191,199 ---- { CString csKey; ! m_log.Add("Retrieving remote profile"); csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", GetProfileString()); m_csUserID = GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); m_csPassword = GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); m_csServerIP = GetRegistryString("ServerIP", "", HKEY_LOCAL_MACHINE, csKey); m_csAxissvrPort = GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey); m_csSpherePort = GetRegistryString("TusPort", "2593", HKEY_LOCAL_MACHINE, csKey); *************** *** 203,207 **** m_csPassword = Encrypt(m_csPassword); ! m_csMonPassword = Encrypt(m_csMonPassword); } --- 203,224 ---- m_csPassword = Encrypt(m_csPassword); ! } ! if ( GetProfileType() == PROFILE_LOCAL ) ! { ! CString csKey; ! m_log.Add("Retrieving local profile"); ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", GetProfileString()); ! m_csRootDirectory = GetRegistryString("Root Directory", "", HKEY_LOCAL_MACHINE, csKey); ! m_csServerIP = GetRegistryString("ServerIP", "127.0.0.1", HKEY_LOCAL_MACHINE, csKey); ! m_csSpherePort = GetRegistryString("Port", "2593", HKEY_LOCAL_MACHINE, csKey); ! m_csUserID = GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); ! m_csPassword = GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); ! m_csAxissvrPort = GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey); ! m_dwRemoteSpawns = GetRegistryDword("Read Remote Spawnpoints", 0, HKEY_LOCAL_MACHINE, csKey); ! m_iReceiveTimeout = (int) GetRegistryDword("ReceiveTimeout", 60000, HKEY_LOCAL_MACHINE, csKey); ! if ( m_iReceiveTimeout < 1000 ) ! m_iReceiveTimeout = 1000; ! ! m_csPassword = Encrypt(m_csPassword); } Index: Drewsky.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Drewsky.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Drewsky.h 14 May 2002 20:03:34 -0000 1.9 --- Drewsky.h 15 May 2002 22:18:48 -0000 1.10 *************** *** 98,101 **** --- 98,102 ---- DWORD m_dwDialogColor; DWORD m_dwTextColor; + DWORD m_dwRemoteSpawns; bool m_bNoScripts; CStringArray m_saSpells; *************** *** 105,108 **** --- 106,110 ---- bool m_bKeepGoing; bool m_bSeerMode; + CString m_csRootDirectory; CString m_csUserID; CString m_csPassword; *************** *** 111,115 **** CString m_csAxissvrPort; CString m_csProfile; - CString m_csMonPassword; CRemoteConsole * m_pRConsole; CString m_csPosition; --- 113,116 ---- Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** drewsky.rc 14 May 2002 20:03:34 -0000 1.35 --- drewsky.rc 15 May 2002 22:18:48 -0000 1.36 *************** *** 639,651 **** WS_VISIBLE PUSHBUTTON "Refresh Categories",IDC_REFRESHCATEGORIES,369,29,85,13 - GROUPBOX "Actions",IDC_STATIC,283,2,75,112 - GROUPBOX "Profiles",IDC_STATIC,168,2,113,112 - LTEXT "NPC Spawn Color",IDC_STATIC,374,69,58,8,NOT WS_GROUP - LTEXT "Item Spawn Color",IDC_STATIC,374,80,56,8,NOT WS_GROUP - CONTROL "",IDC_NPC_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | - SS_SUNKEN,362,69,10,9 - CONTROL "",IDC_ITEM_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | - SS_SUNKEN,362,80,10,9 - GROUPBOX "Command Mode",IDC_STATIC,360,91,113,23 CONTROL "dot",IDC_CMDMODE0,"Button",BS_AUTORADIOBUTTON | WS_GROUP,361,101,26,10 --- 639,642 ---- *************** *** 654,665 **** CONTROL "slash",IDC_CMDMODE2,"Button",BS_AUTORADIOBUTTON,440,101, 32,10 CONTROL "",IDC_DIALOG_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | SS_SUNKEN | NOT WS_VISIBLE,362,49,10,9 CONTROL "",IDC_TEXT_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | SS_SUNKEN | NOT WS_VISIBLE,362,59,10,9 LTEXT "Interface Dialog Color",IDC_STATIC,374,49,69,8,NOT WS_VISIBLE ! LTEXT "Interface Text Color",IDC_STATIC,374,59,63,8,NOT ! WS_VISIBLE END --- 645,665 ---- CONTROL "slash",IDC_CMDMODE2,"Button",BS_AUTORADIOBUTTON,440,101, 32,10 + LTEXT "Interface Text Color",IDC_STATIC,374,59,63,8,NOT + WS_VISIBLE + LTEXT "NPC Spawn Color",IDC_STATIC,374,69,58,8,NOT WS_GROUP + LTEXT "Item Spawn Color",IDC_STATIC,374,80,56,8,NOT WS_GROUP CONTROL "",IDC_DIALOG_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | SS_SUNKEN | NOT WS_VISIBLE,362,49,10,9 CONTROL "",IDC_TEXT_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | SS_SUNKEN | NOT WS_VISIBLE,362,59,10,9 + CONTROL "",IDC_NPC_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | + SS_SUNKEN,362,69,10,9 + CONTROL "",IDC_ITEM_COLOR,"Static",SS_BLACKFRAME | SS_NOTIFY | + SS_SUNKEN,362,80,10,9 LTEXT "Interface Dialog Color",IDC_STATIC,374,49,69,8,NOT WS_VISIBLE ! GROUPBOX "Actions",IDC_STATIC,283,2,75,112 ! GROUPBOX "Profiles",IDC_STATIC,168,2,113,112 ! GROUPBOX "Command Mode",IDC_STATIC,360,91,113,23 END *************** *** 1821,1850 **** END ! IDD_REMOTEPROFILEDLG DIALOG DISCARDABLE 0, 0, 175, 172 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Remote Profile" FONT 8, "MS Sans Serif" BEGIN ! DEFPUSHBUTTON "OK",IDOK,118,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,118,24,50,14 ! RTEXT "Name",IDC_STATIC,65,49,20,8 ! RTEXT "Server IP",IDC_STATIC,55,64,30,8 ! RTEXT "Sphere Server Port",IDC_STATIC,7,79,78,8 ! RTEXT "Username",IDC_STATIC,52,94,33,8 ! RTEXT "Password",IDC_STATIC,53,109,32,8 ! RTEXT "Axis Server Port",IDC_STATIC,32,124,53,8 ! RTEXT "RemoteAdmin Password",IDC_STATIC,7,139,78,8 ! EDITTEXT IDC_RMTPROFILE_NAME,88,46,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_IP,88,61,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_TUSPORT,88,76,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_USERNAME,88,91,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_PASSWORD,88,106,80,14,ES_PASSWORD | ! ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_HOGPORT,88,121,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_RMTPWD,88,136,80,14,ES_PASSWORD | ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_RECEIVETIMEOUT,88,151,80,14, ES_AUTOHSCROLL | ES_NUMBER ! LTEXT "Receive Timeout (ms)",IDC_STATIC,15,154,70,8 END --- 1821,1859 ---- END ! IDD_REMOTEPROFILEDLG DIALOG DISCARDABLE 0, 0, 182, 199 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Script Profile" FONT 8, "MS Sans Serif" BEGIN ! CONTROL "Local",IDC_RADIO_LOCAL,"Button",BS_AUTORADIOBUTTON | ! BS_NOTIFY | WS_GROUP | WS_TABSTOP,13,20,33,10 ! CONTROL "Remote",IDC_RADIO_REMOTE,"Button",BS_AUTORADIOBUTTON | ! BS_NOTIFY | WS_GROUP,68,20,42,10 ! EDITTEXT IDC_RMTPROFILE_NAME,91,43,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_IP,91,58,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_TUSPORT,91,72,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_LOCALPROFILE_BASEDIR,91,92,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_USERNAME,90,130,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_PASSWORD,90,145,80,14,ES_PASSWORD | ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_HOGPORT,90,160,80,14,ES_AUTOHSCROLL ! EDITTEXT IDC_RMTPROFILE_RECEIVETIMEOUT,90,175,80,14, ES_AUTOHSCROLL | ES_NUMBER ! DEFPUSHBUTTON "OK",IDOK,125,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,125,24,50,14 ! RTEXT "Name",IDC_STATIC,69,45,20,8 ! RTEXT "Server IP",IDC_STATIC,59,61,30,8 ! RTEXT "Sphere Server Port",IDC_STATIC,27,75,61,8 ! RTEXT "Username",IDC_STATIC,54,133,33,8 ! RTEXT "Password",IDC_STATIC,55,148,32,8 ! RTEXT "Axis Server Port",IDC_STATIC,36,163,51,8 ! LTEXT "Receive Timeout (ms)",IDC_STATIC,17,178,70,8 ! GROUPBOX "Remote Settings",IDC_STATIC,7,122,168,70 ! GROUPBOX "Local Settings",IDC_STATIC,7,85,168,37 ! GROUPBOX "Profile Type",IDC_STATIC,7,9,110,27 ! RTEXT "Base Script Directory",IDC_STATIC,22,95,67,8 ! CONTROL "Load Spawnpoints from Remote Server",IDC_REMOTESPAWNS, ! "Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,30, ! 108,141,9 END *************** *** 2750,2756 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 168 TOPMARGIN, 7 ! BOTTOMMARGIN, 165 END --- 2759,2765 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 175 TOPMARGIN, 7 ! BOTTOMMARGIN, 191 END Index: MISCTAB.CPP =================================================================== RCS file: /cvsroot/sphere-axis/Axis/MISCTAB.CPP,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** MISCTAB.CPP 14 May 2002 20:03:34 -0000 1.11 --- MISCTAB.CPP 15 May 2002 22:18:48 -0000 1.12 *************** *** 830,835 **** this->m_ccSpellList.ResetContent(); ! Main->m_pScripts->LoadDefs(); ! Main->m_pScripts->LoadTables(); // Fill the spells list --- 830,835 ---- this->m_ccSpellList.ResetContent(); ! //Main->m_pScripts->LoadDefs(); ! //Main->m_pScripts->LoadTables(); // Fill the spells list *************** *** 856,860 **** { CDef * pDef = (CDef *) Main->m_pScripts->m_aDefs.GetAt(i); ! if ( pDef && pDef->m_csGroup == "MIDIS" ) { int index = this->m_ccbMusicList.AddString(pDef->m_csValue); --- 856,860 ---- { CDef * pDef = (CDef *) Main->m_pScripts->m_aDefs.GetAt(i); ! if ( pDef && pDef->m_csValue.Find("MIDI") != -1 ) { int index = this->m_ccbMusicList.AddString(pDef->m_csValue); Index: RemoteConsole.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteConsole.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** RemoteConsole.cpp 14 May 2002 20:03:35 -0000 1.9 --- RemoteConsole.cpp 15 May 2002 22:18:48 -0000 1.10 *************** *** 44,50 **** CString csSavePath; // Try to find out where to connect to ! if (Main->GetProfileType() == PROFILE_REMOTE) { m_csHostAddress = Main->m_csServerIP; CRemoteConnection remote; m_nHostPort = (UINT) remote.GetRemotePort(); --- 44,52 ---- CString csSavePath; // Try to find out where to connect to ! if (Main->GetProfileType() == PROFILE_REMOTE || Main->GetProfileType() == PROFILE_LOCAL) { m_csHostAddress = Main->m_csServerIP; + m_nHostPort = (UINT) atoi(Main->m_csSpherePort); + /* CRemoteConnection remote; m_nHostPort = (UINT) remote.GetRemotePort(); *************** *** 56,59 **** --- 58,62 ---- m_nHostPort = 2593; } + */ } else Index: RemoteProfileDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteProfileDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** RemoteProfileDlg.cpp 1 May 2002 03:33:10 -0000 1.3 --- RemoteProfileDlg.cpp 15 May 2002 22:18:48 -0000 1.4 *************** *** 47,54 **** m_csName = _T(""); m_csPwd = _T(""); - m_csRmtPwd = _T(""); m_csUsername = _T(""); m_csTusPort = _T(""); m_csReceiveTimeout = _T("60000"); //}}AFX_DATA_INIT } --- 47,56 ---- m_csName = _T(""); m_csPwd = _T(""); m_csUsername = _T(""); m_csTusPort = _T(""); m_csReceiveTimeout = _T("60000"); + m_csBaseDir = _T(""); + m_iProfile = 0; + m_bRemoteSpawns = false; //}}AFX_DATA_INIT } *************** *** 59,65 **** CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CRemoteProfileDlg) DDX_Control(pDX, IDC_RMTPROFILE_USERNAME, m_ceUsername); DDX_Control(pDX, IDC_RMTPROFILE_TUSPORT, m_ceTusPort); - DDX_Control(pDX, IDC_RMTPROFILE_RMTPWD, m_ceRmtPwd); DDX_Control(pDX, IDC_RMTPROFILE_PASSWORD, m_cePwd); DDX_Control(pDX, IDC_RMTPROFILE_NAME, m_ceName); --- 61,71 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CRemoteProfileDlg) + DDX_Control(pDX, IDC_REMOTESPAWNS, m_cbRemoteSpawns); + DDX_Control(pDX, IDC_RADIO_REMOTE, m_cbRemote); + DDX_Control(pDX, IDC_RADIO_LOCAL, m_cbLocal); + DDX_Control(pDX, IDC_RMTPROFILE_RECEIVETIMEOUT, m_ceReceiveTimeout); + DDX_Control(pDX, IDC_LOCALPROFILE_BASEDIR, m_ceBaseDir); DDX_Control(pDX, IDC_RMTPROFILE_USERNAME, m_ceUsername); DDX_Control(pDX, IDC_RMTPROFILE_TUSPORT, m_ceTusPort); DDX_Control(pDX, IDC_RMTPROFILE_PASSWORD, m_cePwd); DDX_Control(pDX, IDC_RMTPROFILE_NAME, m_ceName); *************** *** 70,77 **** DDX_Text(pDX, IDC_RMTPROFILE_NAME, m_csName); DDX_Text(pDX, IDC_RMTPROFILE_PASSWORD, m_csPwd); - DDX_Text(pDX, IDC_RMTPROFILE_RMTPWD, m_csRmtPwd); DDX_Text(pDX, IDC_RMTPROFILE_USERNAME, m_csUsername); DDX_Text(pDX, IDC_RMTPROFILE_TUSPORT, m_csTusPort); DDX_Text(pDX, IDC_RMTPROFILE_RECEIVETIMEOUT, m_csReceiveTimeout); //}}AFX_DATA_MAP } --- 76,83 ---- DDX_Text(pDX, IDC_RMTPROFILE_NAME, m_csName); DDX_Text(pDX, IDC_RMTPROFILE_PASSWORD, m_csPwd); DDX_Text(pDX, IDC_RMTPROFILE_USERNAME, m_csUsername); DDX_Text(pDX, IDC_RMTPROFILE_TUSPORT, m_csTusPort); DDX_Text(pDX, IDC_RMTPROFILE_RECEIVETIMEOUT, m_csReceiveTimeout); + DDX_Text(pDX, IDC_LOCALPROFILE_BASEDIR, m_csBaseDir); //}}AFX_DATA_MAP } *************** *** 80,83 **** --- 86,92 ---- BEGIN_MESSAGE_MAP(CRemoteProfileDlg, CDialog) //{{AFX_MSG_MAP(CRemoteProfileDlg) + ON_BN_CLICKED(IDC_RADIO_LOCAL, OnRadioLocal) + ON_BN_CLICKED(IDC_RADIO_REMOTE, OnRadioRemote) + ON_BN_CLICKED(IDC_REMOTESPAWNS, OnRemotespawns) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 90,97 **** CDialog::OnInitDialog(); UpdateData(false); if ( this->m_csName != "" ) this->m_ceName.EnableWindow(FALSE); ! ! // TODO: Add extra initialization here return TRUE; // return TRUE unless you set the focus to a control --- 99,114 ---- CDialog::OnInitDialog(); UpdateData(false); + this->m_cbRemoteSpawns.SetCheck(m_bRemoteSpawns ? 1 : 0); + EnableWindows(m_iProfile == 0 ? true : false); + OnRemotespawns(); if ( this->m_csName != "" ) + { this->m_ceName.EnableWindow(FALSE); ! this->m_cbLocal.EnableWindow(FALSE); ! this->m_cbRemote.EnableWindow(FALSE); ! } ! this->m_cbLocal.SetCheck(m_iProfile == 0 ); ! this->m_cbRemote.SetCheck(m_iProfile == 1 ); ! return TRUE; // return TRUE unless you set the focus to a control *************** *** 102,105 **** --- 119,162 ---- { UpdateData(true); + if ( m_cbLocal.GetCheck() == 1 ) + m_iProfile = 0; + else + m_iProfile = 1; + m_bRemoteSpawns = m_cbRemoteSpawns.GetCheck() ? true : false; CDialog::OnOK(); + } + + void CRemoteProfileDlg::OnRadioLocal() + { + this->m_cbRemote.SetCheck(0); + EnableWindows(true); + + OnRemotespawns(); + } + + void CRemoteProfileDlg::OnRadioRemote() + { + this->m_cbLocal.SetCheck(0); + EnableWindows(false); + } + + void CRemoteProfileDlg::EnableWindows(bool bLocal) + { + this->m_ceBaseDir.EnableWindow(bLocal); + this->m_cbRemoteSpawns.EnableWindow(bLocal); + + this->m_ceHogPort.EnableWindow(!bLocal); + this->m_cePwd.EnableWindow(!bLocal); + this->m_ceUsername.EnableWindow(!bLocal); + this->m_ceReceiveTimeout.EnableWindow(!bLocal); + } + + void CRemoteProfileDlg::OnRemotespawns() + { + m_bRemoteSpawns = this->m_cbRemoteSpawns.GetCheck() ? true : false; + + this->m_ceHogPort.EnableWindow(m_bRemoteSpawns); + this->m_cePwd.EnableWindow(m_bRemoteSpawns); + this->m_ceUsername.EnableWindow(m_bRemoteSpawns); + this->m_ceReceiveTimeout.EnableWindow(m_bRemoteSpawns); } Index: RemoteProfileDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/RemoteProfileDlg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** RemoteProfileDlg.h 1 May 2002 03:33:10 -0000 1.4 --- RemoteProfileDlg.h 15 May 2002 22:18:48 -0000 1.5 *************** *** 43,50 **** //{{AFX_DATA(CRemoteProfileDlg) enum { IDD = IDD_REMOTEPROFILEDLG }; CEdit m_ceRemoteAccount; CEdit m_ceUsername; CEdit m_ceTusPort; - CEdit m_ceRmtPwd; CEdit m_cePwd; CEdit m_ceName; --- 43,54 ---- //{{AFX_DATA(CRemoteProfileDlg) enum { IDD = IDD_REMOTEPROFILEDLG }; + CButton m_cbRemoteSpawns; + CButton m_cbRemote; + CButton m_cbLocal; + CEdit m_ceReceiveTimeout; + CEdit m_ceBaseDir; CEdit m_ceRemoteAccount; CEdit m_ceUsername; CEdit m_ceTusPort; CEdit m_cePwd; CEdit m_ceName; *************** *** 55,62 **** CString m_csName; CString m_csPwd; - CString m_csRmtPwd; CString m_csUsername; CString m_csTusPort; CString m_csReceiveTimeout; //}}AFX_DATA --- 59,68 ---- CString m_csName; CString m_csPwd; CString m_csUsername; CString m_csTusPort; CString m_csReceiveTimeout; + CString m_csBaseDir; + int m_iProfile; + bool m_bRemoteSpawns; //}}AFX_DATA *************** *** 71,74 **** --- 77,81 ---- // Implementation protected: + void EnableWindows(bool bLocal); // Generated message map functions *************** *** 76,79 **** --- 83,89 ---- virtual BOOL OnInitDialog(); virtual void OnOK(); + afx_msg void OnRadioLocal(); + afx_msg void OnRadioRemote(); + afx_msg void OnRemotespawns(); //}}AFX_MSG DECLARE_MESSAGE_MAP() *************** *** 84,85 **** --- 94,96 ---- #endif // !defined(AFX_REMOTEPROFILEDLG_H__FD7E0E66_DB23_11D3_A38A_00805FD91B8C__INCLUDED_) + Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** resource.h 14 May 2002 20:03:35 -0000 1.25 --- resource.h 15 May 2002 22:18:48 -0000 1.26 *************** *** 400,403 **** --- 400,404 ---- #define IDC_SAVEPWD 1033 #define IDC_AS_SPAWNMSG 1033 + #define IDC_REMOTESPAWNS 1033 #define IDC_BUTTON33 1034 #define IDC_CHECK2 1034 *************** *** 568,571 **** --- 569,573 ---- #define IDC_NSO_COPYBASE 1058 #define IDC_INDOORS 1058 + #define IDC_RADIO_LOCAL 1058 #define IDC_RADIO2 1059 #define IDC_EDIT1 1059 *************** *** 817,820 **** --- 819,823 ---- #define IDC_WOP9 1067 #define IDC_CLIENTLIST 1067 + #define IDC_RADIO_REMOTE 1067 #define IDC_RADIO11 1068 #define IDC_BESERKBRAIN 1068 *************** *** 826,829 **** --- 829,833 ---- #define IDC_FORCESAVE 1068 #define IDC_BUYVALUEMAX 1068 + #define IDC_LOCALPROFILE_NAME 1068 #define IDC_RADIO12 1069 #define IDC_UNDEADBRAIN 1069 *************** *** 835,838 **** --- 839,843 ---- #define IDC_SHUTDOWN_NOW 1069 #define IDC_SELLVALUEMAX 1069 + #define IDC_LOCALPROFILE_IP 1069 #define IDC_RADIO13 1070 #define IDC_DRAGONBRAIN 1070 *************** *** 843,846 **** --- 848,852 ---- #define IDC_WOP12 1070 #define IDC_BROADCAST 1070 + #define IDC_LOCALPROFILE_PORT 1070 #define IDC_RADIO14 1071 #define IDC_OFFDUTYBRAIN 1071 *************** *** 851,854 **** --- 857,861 ---- #define IDC_WOP13 1071 #define IDC_PROFILE_INFO 1071 + #define IDC_LOCALPROFILE_BASEDIR 1071 #define IDC_FLAG_VALUE 1072 #define IDC_NPCHPMIN 1072 Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** settingstab.cpp 14 May 2002 20:03:35 -0000 1.17 --- settingstab.cpp 15 May 2002 22:18:48 -0000 1.18 *************** *** 174,178 **** { CString csProfile; ! csProfile.Format("Local: %", szBuffer); this->m_clcRmtProfiles.AddString(csProfile); } --- 174,178 ---- { CString csProfile; ! csProfile.Format("Local: %s", szBuffer); this->m_clcRmtProfiles.AddString(csProfile); } *************** *** 182,185 **** --- 182,186 ---- } // Read the existing remote profiles from the registry + iIndex = 0; lStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles", 0, KEY_ALL_ACCESS, &hKey); if ( lStatus == ERROR_SUCCESS ) *************** *** 416,436 **** return; CString csKey, csRmtPwd, csPwd; - csRmtPwd = Encrypt(dlg.m_csRmtPwd); csPwd = Encrypt(dlg.m_csPwd); int iTimeout = atoi(dlg.m_csReceiveTimeout); if ( iTimeout < 1000 ) iTimeout = 1000; ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("MonPassword", csRmtPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! this->m_clcRmtProfiles.AddString(dlg.m_csName); ! this->m_clcRmtProfiles.SelectString(-1, dlg.m_csName); } --- 417,459 ---- return; CString csKey, csRmtPwd, csPwd; csPwd = Encrypt(dlg.m_csPwd); int iTimeout = atoi(dlg.m_csReceiveTimeout); + int iRemoteSpawns = dlg.m_bRemoteSpawns ? 1 : 0; if ( iTimeout < 1000 ) iTimeout = 1000; ! switch ( dlg.m_iProfile ) ! { ! case 0: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Port", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Root Directory", dlg.m_csBaseDir, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("Read Remote Spawnpoints", (DWORD) iRemoteSpawns, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! case 1: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! } ! CString csProfile; ! csProfile.Format("%s: %s", dlg.m_iProfile == 0 ? "Local" : "Remote", dlg.m_csName); ! this->m_clcRmtProfiles.AddString(csProfile); ! this->m_clcRmtProfiles.SelectString(-1, csProfile); } *************** *** 442,455 **** CRemoteProfileDlg dlg; dlg.m_csName = Main->GetProfileString(); ! dlg.m_csHogPort = Main->m_csAxissvrPort; ! dlg.m_csIP = Main->m_csServerIP; ! dlg.m_csPwd = Main->m_csPassword; ! dlg.m_csRmtPwd = Main->m_csMonPassword; ! dlg.m_csTusPort = Main->m_csSpherePort; ! dlg.m_csUsername = Main->m_csUserID; ! dlg.m_csReceiveTimeout.Format("%ld", Main->m_iReceiveTimeout); if ( dlg.DoModal() != IDOK ) return; int iTimeout = atoi(dlg.m_csReceiveTimeout); if ( iTimeout < 1000 ) --- 465,494 ---- CRemoteProfileDlg dlg; dlg.m_csName = Main->GetProfileString(); ! if ( Main->GetProfileType() == PROFILE_REMOTE ) ! { ! dlg.m_csHogPort = Main->m_csAxissvrPort; ! dlg.m_csIP = Main->m_csServerIP; ! dlg.m_csPwd = Main->m_csPassword; ! dlg.m_csTusPort = Main->m_csSpherePort; ! dlg.m_csUsername = Main->m_csUserID; ! dlg.m_csReceiveTimeout.Format("%ld", Main->m_iReceiveTimeout); ! dlg.m_iProfile = 1; ! } ! else ! { ! dlg.m_csHogPort = Main->m_csAxissvrPort; ! dlg.m_csIP = Main->m_csServerIP; ! dlg.m_csPwd = Main->m_csPassword; ! dlg.m_csTusPort = Main->m_csSpherePort; ! dlg.m_csUsername = Main->m_csUserID; ! dlg.m_csReceiveTimeout.Format("%ld", Main->m_iReceiveTimeout); ! dlg.m_csBaseDir = Main->m_csRootDirectory; ! dlg.m_bRemoteSpawns = Main->m_dwRemoteSpawns ? true : false; ! dlg.m_iProfile = 0; ! } if ( dlg.DoModal() != IDOK ) return; + int iRemoteSpawns = dlg.m_bRemoteSpawns ? 1 : 0; int iTimeout = atoi(dlg.m_csReceiveTimeout); if ( iTimeout < 1000 ) *************** *** 457,472 **** CString csKey, csRmtPwd, csPwd; - csRmtPwd = Encrypt(dlg.m_csRmtPwd); csPwd = Encrypt(dlg.m_csPwd); ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("MonPassword", csRmtPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); this->OnSelchangeRemoteprofiles(); --- 496,530 ---- CString csKey, csRmtPwd, csPwd; csPwd = Encrypt(dlg.m_csPwd); ! switch ( dlg.m_iProfile ) ! { ! case 0: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", dlg.m_csName); ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Port", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Root Directory", dlg.m_csBaseDir, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("Read Remote Spawns", (DWORD) iRemoteSpawns, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! case 1: ! { ! csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Remote Profiles\\%s", dlg.m_csName); ! ! Main->PutRegistryString("Username", dlg.m_csUsername, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("Password", csPwd, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("ServerIP", dlg.m_csIP, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("HoGPort", dlg.m_csHogPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryString("TUSPort", dlg.m_csTusPort, HKEY_LOCAL_MACHINE, csKey); ! Main->PutRegistryDword("ReceiveTimeout", (DWORD) iTimeout, HKEY_LOCAL_MACHINE, csKey); ! } ! break; ! } this->OnSelchangeRemoteprofiles(); *************** *** 487,493 **** Main->m_csAxissvrPort = ""; Main->m_csServerIP = ""; - Main->m_csMonPassword = ""; Main->GetProfileString() = ""; Main->m_iReceiveTimeout = 60000; } --- 545,551 ---- Main->m_csAxissvrPort = ""; Main->m_csServerIP = ""; Main->GetProfileString() = ""; Main->m_iReceiveTimeout = 60000; + Main->m_dwRemoteSpawns = 0; } *************** *** 496,511 **** { int iSel = this->m_clcRmtProfiles.GetCurSel(); ! if ( iSel == -1 ) ! { ! Main->m_csUserID = ""; ! Main->m_csPassword = ""; ! Main->m_csSpherePort = ""; ! Main->m_csAxissvrPort = ""; ! Main->m_csServerIP = ""; ! Main->m_csMonPassword = ""; ! Main->GetProfileString() = ""; ! Main->m_iReceiveTimeout = 60000; ! return; ! } this->m_clcRmtProfiles.GetText( iSel, Main->m_csProfile ); switch ( Main->GetProfileType() ) --- 554,568 ---- { int iSel = this->m_clcRmtProfiles.GetCurSel(); ! // Clear out all of the values ! Main->m_csUserID = ""; ! Main->m_csPassword = ""; ! Main->m_csSpherePort = ""; ! Main->m_csAxissvrPort = ""; ! Main->m_csServerIP = ""; ! Main->GetProfileString() = ""; ! Main->m_iReceiveTimeout = 60000; ! Main->m_csRootDirectory = ""; ! Main->m_dwRemoteSpawns = 0; ! this->m_clcRmtProfiles.GetText( iSel, Main->m_csProfile ); switch ( Main->GetProfileType() ) *************** *** 525,529 **** Main->m_csAxissvrPort = Main->GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey); Main->m_csSpherePort = Main->GetRegistryString("TusPort", "2593", HKEY_LOCAL_MACHINE, csKey); - Main->m_csMonPassword = Main->GetRegistryString("MonPassword", "", HKEY_LOCAL_MACHINE, csKey); Main->m_iReceiveTimeout = (int) Main->GetRegistryDword("ReceiveTimeout", 60000, HKEY_LOCAL_MACHINE, csKey); --- 582,585 ---- *************** *** 531,535 **** Main->m_iReceiveTimeout = 1000; Main->m_csPassword = Encrypt(Main->m_csPassword); - Main->m_csMonPassword = Encrypt(Main->m_csMonPassword); } this->m_cbRPDelete.EnableWindow(TRUE); --- 587,590 ---- *************** *** 537,540 **** --- 592,611 ---- break; case PROFILE_LOCAL: + { + CString csKey; + csKey.Format("SOFTWARE\\Menasoft\\GM Tools\\Local Profiles\\%s", Main->GetProfileString()); + Main->m_csUserID = Main->GetRegistryString("Username", "", HKEY_LOCAL_MACHINE, csKey); + Main->m_csPassword = Main->GetRegistryString("Password", "", HKEY_LOCAL_MACHINE, csKey); + Main->m_csServerIP = Main->GetRegistryString("ServerIP", "", HKEY_LOCAL_MACHINE, csKey); + Main->m_csAxissvrPort = Main->GetRegistryString("HogPort", "4006", HKEY_LOCAL_MACHINE, csKey); + Main->m_csSpherePort = Main->GetRegistryString("Port", "2593", HKEY_LOCAL_MACHINE, csKey); + Main->m_csRootDirectory = Main->GetRegistryString("Root Directory", "", HKEY_LOCAL_MACHINE, csKey); + Main->m_dwRemoteSpawns = Main->GetRegistryDword("Read Remote Spawns", 0, HKEY_LOCAL_MACHINE, csKey); + + Main->m_iReceiveTimeout = (int) Main->GetRegistryDword("ReceiveTimeout", 60000, HKEY_LOCAL_MACHINE, csKey); + if ( Main->m_iReceiveTimeout < 1000 ) + Main->m_iReceiveTimeout = 1000; + Main->m_csPassword = Encrypt(Main->m_csPassword); + } this->m_cbRPDelete.EnableWindow(TRUE); this->m_cbRPEdit.EnableWindow(TRUE); Index: traveltab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/traveltab.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** traveltab.cpp 14 May 2002 20:03:35 -0000 1.13 --- traveltab.cpp 15 May 2002 22:18:48 -0000 1.14 *************** *** 680,686 **** // First we need to find the location of the world files CStdioFile csfIniFile; ! if (!csfIniFile.Open(INI_FILE, CFile::modeRead | CFile::shareDenyNone)) { ! sprintf(szBuf, "Error -- Could not open %s%s", INI_FILE, crlf); return; } --- 680,687 ---- // First we need to find the location of the world files CStdioFile csfIniFile; ! CString csIni = Main->m_csRootDirectory + _T(INI_FILE); ! if (!csfIniFile.Open(csIni, CFile::modeRead | CFile::shareDenyNone)) { ! sprintf(szBuf, "Error -- Could not open %s%s", csIni, crlf); return; } *************** *** 928,932 **** m_crosshairIndex = m_TravelMap.AddDrawObject(x, y, 1, 3, 0x00FFFFFF); ! if ( Main->GetProfileType() == PROFILE_REMOTE ) { CRemoteConnection remote; --- 929,933 ---- m_crosshairIndex = m_TravelMap.AddDrawObject(x, y, 1, 3, 0x00FFFFFF); ! if ( Main->GetProfileType() == PROFILE_REMOTE || ( Main->GetProfileType() == PROFILE_LOCAL && Main->m_dwRemoteSpawns ) ) { CRemoteConnection remote; |
From: Philip E. <pes...@us...> - 2002-05-15 20:37:16
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv3630 Modified Files: UOArtCtl.cpp Log Message: Fixed bug in NPC display where the gfx got garbled if the height of the artwork exceeded the height of the control. Index: UOArtCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** UOArtCtl.cpp 15 May 2002 20:05:59 -0000 1.13 --- UOArtCtl.cpp 15 May 2002 20:37:12 -0000 1.14 *************** *** 1162,1190 **** Y++; previousLine = wLineNum; ! if ( Y >= 0 ) { ! for ( int j = 0; j < wRunLength; j++ ) { ! BYTE bIndex = 0; ! memcpy(&bIndex, &bData[dwOffset], 1); ! dwOffset++; ! DWORD dwColor = BlendColors(wPalette[bIndex], m_wAppliedColour, false); { ! BYTE r, g, b; ! b = (BYTE) ((dwColor >> 16) & 0xFF); ! g = (BYTE) ((dwColor >> 8) & 0xFF); ! r = (BYTE) ((dwColor) & 0xFF); ! X = m_xOffset + (bounds.Width() / 2 ) + offset + j; ! if ( X >= 0 && X < bounds.Width() && Y >=0 && Y < bounds.Height() ) ! { ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3), b); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 1, g); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 2, r); ! } } } } - else - fData.Seek( wRunLength, CFile::current ); } delete [] frameOffsets; --- 1162,1185 ---- Y++; previousLine = wLineNum; ! for ( int j = 0; j < wRunLength; j++ ) { ! BYTE bIndex = 0; ! memcpy(&bIndex, &bData[dwOffset], 1); ! dwOffset++; ! DWORD dwColor = BlendColors(wPalette[bIndex], m_wAppliedColour, false); { ! BYTE r, g, b; ! b = (BYTE) ((dwColor >> 16) & 0xFF); ! g = (BYTE) ((dwColor >> 8) & 0xFF); ! r = (BYTE) ((dwColor) & 0xFF); ! X = m_xOffset + (bounds.Width() / 2 ) + offset + j; ! if ( X >= 0 && X < bounds.Width() && Y >=0 && Y < bounds.Height() ) { ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3), b); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 1, g); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 2, r); } } } } delete [] frameOffsets; |
From: Philip E. <pes...@us...> - 2002-05-15 20:06:04
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv23020 Modified Files: UOArtCtl.cpp Log Message: Fixed bug that prevented art from being displayed when no path was set. Index: UOArtCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** UOArtCtl.cpp 12 May 2002 16:19:57 -0000 1.12 --- UOArtCtl.cpp 15 May 2002 20:05:59 -0000 1.13 *************** *** 364,370 **** m_wDrawFlags = 0; - InitializeMulPaths(); ReadRegistry(); LoadVerdataIndex(); LoadHues(); --- 364,370 ---- m_wDrawFlags = 0; ReadRegistry(); + InitializeMulPaths(); LoadVerdataIndex(); LoadHues(); |