Permalink
Browse files

Revert "Merge commit '3fff4c532c363ac933c9'"

This reverts commit fb920a3, reversing
changes made to 5f711c8.
  • Loading branch information...
1 parent 5af96f8 commit 07792acff259be0b0c114e504b059be40f3707db @nickgammon committed Sep 16, 2010
Showing with 391 additions and 425 deletions.
  1. +1 −1 ProcessPreviousLine.cpp
  2. +14 −14 dialogs/ColourPickerDlg.cpp
  3. +1 −1 dialogs/DebugWorldInputDlg.cpp
  4. +1 −1 doc.cpp
  5. +10 −10 miniwindow.cpp
  6. +1 −1 miniwindow.h
  7. +361 −394 scripting/lua_methods.cpp
  8. +1 −2 scripting/methods.cpp
  9. +1 −1 stdafx.h
View
@@ -746,7 +746,7 @@ assemble the full text of the original line.
if (!m_LineList.IsEmpty ())
{
m_pCurrentLine = m_LineList.GetTail ();
- if (((m_pCurrentLine->flags & COMMENT) == 0) ||
+ if ((m_pCurrentLine->flags & COMMENT == 0) ||
m_pCurrentLine->hard_return)
m_pCurrentLine = NULL;
}
@@ -160,8 +160,8 @@ int iResult = 0;
case eColourHue:
{
- double hue1 = clr1.GetHue ();
- double hue2 = clr2.GetHue ();
+ float hue1 = clr1.GetHue ();
+ float hue2 = clr2.GetHue ();
if (hue1 < hue2)
{
iResult = -1;
@@ -177,16 +177,16 @@ int iResult = 0;
// hue the same - fall through and compare saturation (then luminance)
case eColourSaturation:
{
- double saturation1 = clr1.GetSaturation ();
- double saturation2 = clr2.GetSaturation ();
+ float saturation1 = clr1.GetSaturation ();
+ float saturation2 = clr2.GetSaturation ();
if (saturation1 < saturation2)
iResult = -1;
else if (saturation1 > saturation2)
iResult = 1;
else
{ // saturation the same - compare luminance
- double luminance1 = clr1.GetLuminance ();
- double luminance2 = clr2.GetLuminance ();
+ float luminance1 = clr1.GetLuminance ();
+ float luminance2 = clr2.GetLuminance ();
if (luminance1 < luminance2)
iResult = -1;
else if (luminance1 > luminance2)
@@ -197,16 +197,16 @@ int iResult = 0;
case eColourLuminance:
{
- double luminance1 = clr1.GetLuminance ();
- double luminance2 = clr2.GetLuminance ();
+ float luminance1 = clr1.GetLuminance ();
+ float luminance2 = clr2.GetLuminance ();
if (luminance1 < luminance2)
iResult = -1;
else if (luminance1 > luminance2)
iResult = 1;
else
{ // luminance the same - compare saturation
- double saturation1 = clr1.GetSaturation ();
- double saturation2 = clr2.GetSaturation ();
+ float saturation1 = clr1.GetSaturation ();
+ float saturation2 = clr2.GetSaturation ();
if (saturation1 < saturation2)
iResult = -1;
else if (saturation1 > saturation2)
@@ -334,9 +334,9 @@ CColor clr;
clr.SetColor (m_ctlSwatch.m_colour);
-double fHue = clr.GetHue ();
-double fSaturation = clr.GetSaturation ();
-double fLuminance = clr.GetLuminance ();
+float fHue = clr.GetHue ();
+float fSaturation = clr.GetSaturation ();
+float fLuminance = clr.GetLuminance ();
CString strName;
@@ -549,7 +549,7 @@ LRESULT CColourPickerDlg::OnKickIdle(WPARAM, LPARAM)
void CColourPickerDlg::OnRandom()
{
- m_ctlSwatch.m_colour = (COLORREF) (genrand () * (double) 0x1000000);
+ m_ctlSwatch.m_colour = genrand () * (double) 0x1000000;
m_ctlSwatch.RedrawWindow ();
ShowName ();
@@ -208,7 +208,7 @@ CInsertUnicodeDlg dlg;
unsigned char utf8 [10];
-int iLen = _pcre_ord2utf8 ((int) dlg.m_iCode, utf8);
+int iLen = _pcre_ord2utf8 (dlg.m_iCode, utf8);
CString strText;
View
@@ -6043,7 +6043,7 @@ void CMUSHclientDoc::SendWindowSizes (const int iNewWidth)
pmyView->GetTextRect (&r);
- WORD height = (WORD) ((r.bottom - r.top - m_iPixelOffset) / m_FontHeight);
+ WORD height = (r.bottom - r.top - m_iPixelOffset) / m_FontHeight;
// now tell them our size
unsigned char p [] = { IAC, SB, TELOPT_NAWS,
View
@@ -618,7 +618,7 @@ long CMiniWindow::Font (LPCTSTR FontId, // eg. "inventory"
CFont * pFont = new CFont;
- int lfHeight = -MulDiv(Size ? (int) Size : 10, dc.GetDeviceCaps(LOGPIXELSY), 72);
+ int lfHeight = -MulDiv(Size ? Size : 10.0, dc.GetDeviceCaps(LOGPIXELSY), 72);
if (pFont->CreateFont (lfHeight,
0, // int nWidth,
@@ -1293,7 +1293,7 @@ long CMiniWindow::WritePng (LPCTSTR FileName, const BITMAPINFO * bmi, unsigned c
long bpl = BytesPerLine (bmi->bmiHeader.biWidth, 24);
- unsigned long row;
+ long row;
unsigned char * p = pData;
// have to reverse row order
@@ -1925,7 +1925,7 @@ long CMiniWindow::ImageOp(short Action,
} // end of CMiniWindow::ImageOp
-long CMiniWindow::CreateImage(LPCTSTR ImageId, WORD Row1, WORD Row2, WORD Row3, WORD Row4, WORD Row5, WORD Row6, WORD Row7, WORD Row8)
+long CMiniWindow::CreateImage(LPCTSTR ImageId, long Row1, long Row2, long Row3, long Row4, long Row5, long Row6, long Row7, long Row8)
{
ImageMapIterator it = m_Images.find (ImageId);
@@ -2679,12 +2679,12 @@ static void MakeTexture (const COLORREF Multiplier,
const long iHeight)
{
- ULONG rval = GetRValue (Multiplier),
+ long rval = GetRValue (Multiplier),
gval = GetGValue (Multiplier),
bval = GetBValue (Multiplier);
- ULONG row, col;
- ULONG c;
+ long row, col;
+ long c;
int increment = BytesPerLine (iWidth, 24);
@@ -2695,9 +2695,9 @@ static void MakeTexture (const COLORREF Multiplier,
for (row = 0; row < iHeight; row++)
{
c = col ^ row;
- p [0] = (unsigned char) (c * bval);
- p [1] = (unsigned char) (c * gval);
- p [2] = (unsigned char) (c * rval);
+ p [0] = c * bval;
+ p [1] = c * gval;
+ p [2] = c * rval;
p += increment;
} // end of each row
} // end of each column
@@ -2969,7 +2969,7 @@ static void Noise (unsigned char * inbuf, long iWidth, long iHeight, long iPerLi
for (i = 0; i < count; i++)
{
c = *pi;
- c += (long) ((128 - genrand () * 256) * threshold);
+ c += (128 - genrand () * 256) * threshold;
*pi++ = CLAMP (c);
}
View
@@ -228,7 +228,7 @@ class CMiniWindow
long EllipseWidth, long EllipseHeight);
long CreateImage(LPCTSTR ImageId,
- WORD Row1, WORD Row2, WORD Row3, WORD Row4, WORD Row5, WORD Row6, WORD Row7, WORD Row8);
+ long Row1, long Row2, long Row3, long Row4, long Row5, long Row6, long Row7, long Row8);
long BlendImage(LPCTSTR ImageId,
long Left, long Top, long Right, long Bottom,
Oops, something went wrong.

0 comments on commit 07792ac

Please sign in to comment.