diff --git a/common/debug.cpp b/common/debug.cpp index a9fdb40e..c6df3010 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -6,12 +6,12 @@ #define LC_MAX_DEBUG_LINES 100 -typedef struct +struct LC_DEBUG_LINE { - Vector3 pt1; - Vector3 pt2; - Vector3 color; -} LC_DEBUG_LINE; + lcVector3 pt1; + lcVector3 pt2; + lcVector3 color; +}; static LC_DEBUG_LINE DebugLines[LC_MAX_DEBUG_LINES]; static int NumDebugLines; @@ -21,7 +21,7 @@ void ClearDebugLines() NumDebugLines = 0; } -void AddDebugLine(const Vector3& pt1, const Vector3& pt2, const Vector3& Color) +void AddDebugLine(const lcVector3& pt1, const lcVector3& pt2, const lcVector3& Color) { if (NumDebugLines == LC_MAX_DEBUG_LINES-1) return; @@ -34,14 +34,14 @@ void AddDebugLine(const Vector3& pt1, const Vector3& pt2, const Vector3& Color) #define LC_MAX_DEBUG_QUADS 100 -typedef struct +struct LC_DEBUG_QUAD { - Vector3 pt1; - Vector3 pt2; - Vector3 pt3; - Vector3 pt4; - Vector4 color; -} LC_DEBUG_QUAD; + lcVector3 pt1; + lcVector3 pt2; + lcVector3 pt3; + lcVector3 pt4; + lcVector4 color; +}; static LC_DEBUG_QUAD DebugQuads[LC_MAX_DEBUG_QUADS]; static int NumDebugQuads; @@ -51,7 +51,7 @@ void ClearDebugQuads() NumDebugQuads = 0; } -void AddDebugQuad(const Vector3& pt1, const Vector3& pt2, const Vector3& pt3, const Vector3& pt4, const Vector4& Color) +void AddDebugQuad(const lcVector3& pt1, const lcVector3& pt2, const lcVector3& pt3, const lcVector3& pt4, const lcVector4& Color) { if (NumDebugQuads == LC_MAX_DEBUG_QUADS-1) return; diff --git a/common/debug.h b/common/debug.h index 90b65173..3a12a192 100644 --- a/common/debug.h +++ b/common/debug.h @@ -1,17 +1,18 @@ #ifndef _DEBUG_H_ #define _DEBUG_H_ + #ifdef LC_DEBUG -#include "algebra.h" +#include "lc_math.h" void RenderDebugPrimitives(); -void AddDebugLine(const Vector3& pt1, const Vector3& pt2, const Vector3& Color); +void AddDebugLine(const lcVector3& pt1, const lcVector3& pt2, const lcVector3& Color); void ClearDebugLines(); -void AddDebugQuad(const Vector3& pt1, const Vector3& pt2, const Vector3& pt3, const Vector3& pt4, const Vector4& Color); +void AddDebugQuad(const lcVector3& pt1, const lcVector3& pt2, const lcVector3& pt3, const lcVector3& pt4, const lcVector4& Color); void ClearDebugQuads(); - #endif // LC_DEBUG + #endif // _DEBUG_H_ diff --git a/version.mk b/version.mk index 353f11df..c62b4d61 100644 --- a/version.mk +++ b/version.mk @@ -1,5 +1,5 @@ MAJOR := 0 -MINOR := 76 -PATCHLVL := 2 +MINOR := 77 +PATCHLVL := 0 VERSIONTAG := VERSION := $(MAJOR).$(MINOR).$(PATCHLVL) diff --git a/win/Clrpick.cpp b/win/Clrpick.cpp index d2bbe9c0..d58863a6 100644 --- a/win/Clrpick.cpp +++ b/win/Clrpick.cpp @@ -16,10 +16,8 @@ static char THIS_FILE[] = __FILE__; CColorPicker::CColorPicker() { m_bActive = FALSE; - m_bDefaultText = FALSE; - m_bCustomText = FALSE; - m_crColor = GetSysColor(COLOR_3DFACE); - SetColorIndex (-1); + m_nColor = -1; + SetColorIndex(-1); } CColorPicker::~CColorPicker() @@ -110,7 +108,16 @@ void CColorPicker::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) // Fill remaining area with colour rect.right -= m_ArrowRect.Width()-1; - CBrush brush(((state & ODS_DISABLED) || m_crColor == CLR_DEFAULT) ? ::GetSysColor(COLOR_3DFACE) : m_crColor); + COLORREF brushColor; + if ((state & ODS_DISABLED) || m_nColor == -1) + brushColor = ::GetSysColor(COLOR_3DFACE); + else + { + float* Value = gColorList[m_nColor].Value; + brushColor = RGB(Value[0] * 255.0f, Value[1] * 255.0f, Value[2] * 255.0f); + } + + CBrush brush(brushColor); CBrush* pOldBrush = (CBrush*) pDC->SelectObject(&brush); pDC->SelectStockObject(NULL_PEN); pDC->Rectangle(rect); @@ -156,12 +163,6 @@ int CColorPicker::GetColorIndex() void CColorPicker::SetColorIndex(int nColor) { - if (nColor != -1) - { - float* Value = gColorList[nColor].Value; - m_crColor = RGB(Value[0] * 255.0f, Value[1] * 255.0f, Value[2] * 255.0f); - } - if (m_nColor != nColor) { m_nColor = nColor; diff --git a/win/Tools.cpp b/win/Tools.cpp index 8078cb65..fed71c9c 100644 --- a/win/Tools.cpp +++ b/win/Tools.cpp @@ -253,7 +253,6 @@ BOOL FolderBrowse(CString *strFolder, LPCSTR lpszTitle, HWND hWndOwner) #ifdef LC_HAVE_3DSFTK #include "3dsftk\inc\3dsftk.h" -#include "globals.h" #include "project.h" #include "piece.h" #include "pieceinf.h" diff --git a/win/clrpick.h b/win/clrpick.h index e141380a..f79e7b9b 100644 --- a/win/clrpick.h +++ b/win/clrpick.h @@ -1,20 +1,8 @@ -#if !defined(AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_) -#define AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -// ColorPicker.h : header file -// +#ifndef _CLRPICK_H_ +#define _CLRPICK_H_ #include "ClrPopup.h" -///////////////////////////////////////////////////////////////////////////// -// CColorPicker window - -//void AFXAPI DDX_ColorPicker(CDataExchange *pDX, int nIDC, COLORREF& crColor); - class CColorPicker : public CButton { // Construction @@ -26,8 +14,6 @@ public: public: int GetColorIndex(); void SetColorIndex(int nColor); - BOOL m_bDefaultText; - BOOL m_bCustomText; // Operations public: @@ -53,7 +39,6 @@ protected: BOOL m_bActive; // Is the dropdown active? CRect m_ArrowRect; int m_nColor; - COLORREF m_crColor; // Generated message map functions protected: @@ -67,9 +52,4 @@ protected: DECLARE_MESSAGE_MAP() }; -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_) +#endif // _CLRPICK_H_ diff --git a/win/clrpopup.h b/win/clrpopup.h index 3949440d..ac6ddfbe 100644 --- a/win/clrpopup.h +++ b/win/clrpopup.h @@ -58,9 +58,7 @@ protected: int m_nBoxSize, m_nMargin; int m_nCurrentSel; int m_nChosenColorSel; - BOOL m_bDefaultText; - BOOL m_bCustomText; - CRect m_CustomTextRect, m_DefaultTextRect, m_WindowRect; + CRect m_WindowRect; CFont m_Font; CPalette m_Palette; int m_nInitialColor, m_nColor; diff --git a/win/config.h b/win/config.h index 50fb2b1a..496b43b8 100644 --- a/win/config.h +++ b/win/config.h @@ -1,17 +1,15 @@ // // LeoCAD configuration // -// Auto-generated file, DO NOT EDIT -// #ifndef _CONFIG_H_ #define _CONFIG_H_ #define LC_VERSION_MAJOR 0 -#define LC_VERSION_MINOR 76 -#define LC_VERSION_PATCH 2 +#define LC_VERSION_MINOR 77 +#define LC_VERSION_PATCH 0 #define LC_VERSION_OSNAME "Windows" -#define LC_VERSION_TEXT "0.76.2" +#define LC_VERSION_TEXT "0.77" #define LC_VERSION_TAG "" #define LC_INSTALL_PREFIX "C:\\leocad" #define LC_POINTER_TO_INT(p) ((lcint32)(p)) diff --git a/win/print.h b/win/print.h index c9b54ec8..2ca3c334 100644 --- a/win/print.h +++ b/win/print.h @@ -1,12 +1,16 @@ +#ifndef _PRINT_H_ +#define _PRINT_H_ + BOOL CALLBACK _AfxAbortProc(HDC, int); UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax); #define AFX_IDD_PRINTDLG 30722 -typedef struct { +struct PRINT_PARAMS +{ CWnd* pParent; CFrameWndEx* pMainFrame; -} PRINT_PARAMS; +}; class CPrintingDialog : public CDialog { @@ -24,3 +28,4 @@ public: UINT PrintCatalogFunction (LPVOID pv); UINT PrintPiecesFunction (LPVOID pv); +#endif // _PRINT_H_