[Sphere-axis-commits] CVS: Axis readme.txt,NONE,1.1.2.1 RoofImage.cpp,NONE,1.1.2.1 RoofImage.h,NONE,
Brought to you by:
pesterle
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); |