From 42e3cbca0a41d2c60783eea70ccf922b2a527207 Mon Sep 17 00:00:00 2001 From: cbucher Date: Wed, 23 May 2018 21:56:50 +0200 Subject: [PATCH] version 1.18.3.18143 --- Console/AboutDlg.h | 21 ++++++++++++++------- Console/stdafx.h | 2 ++ shared/version.h | 8 ++++---- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Console/AboutDlg.h b/Console/AboutDlg.h index 1c753ccd..514b8e34 100644 --- a/Console/AboutDlg.h +++ b/Console/AboutDlg.h @@ -57,7 +57,7 @@ class CAboutDlg : unsigned char ColorB[256]; unsigned char ColorA[256]; - int plasma[256][256]; + unsigned char plasma[256][256]; CAboutDlg() { @@ -72,7 +72,12 @@ class CAboutDlg : for( int y = 0; y < 256; y++ ) for( int x = 0; x < 256; x++ ) { - plasma[y][x] = 128 + static_cast(128.0 * (sin(x / 16.0) + sin(y / 8.0) + sin((x + y) / 16.0) + sin(sqrt(double(x * x + y * y)) / 8.0))) / 4; + plasma[y][x] = 128 + + static_cast(32.0 * (sin(x / 16.0) + + sin(y / 32.0) + + sin(sqrt((x - 128.0) * (x - 128.0) + (y - 128.0) * (y - 128.0)) / 8.0) + + sin(sqrt(x * x + y * y) / 8.0) + ) ); } } @@ -92,11 +97,11 @@ class CAboutDlg : //get the BitmapData Gdiplus::BitmapData bmData; bmpIcon.LockBits(&rectBounds, Gdiplus::ImageLockModeRead, - bmpIcon.GetPixelFormat(), &bmData); + bmpIcon.GetPixelFormat(), &bmData); // create a new 32 bit bitmap using the bitmapData Gdiplus::Bitmap bmpIconAlpha(bmData.Width, bmData.Height, bmData.Stride, - PixelFormat32bppARGB, (BYTE*)bmData.Scan0); + PixelFormat32bppARGB, (BYTE*)bmData.Scan0); bmpIcon.UnlockBits(&bmData); CWindow staticMessage(GetDlgItem(IDC_STATIC)); @@ -108,11 +113,11 @@ class CAboutDlg : Gdiplus::Rect rectPlasmaBounds(0, 0, bmpPlasma.GetWidth(), bmpPlasma.GetHeight()); Gdiplus::BitmapData bmdPlasma; bmpPlasma.LockBits(&rectPlasmaBounds, Gdiplus::ImageLockModeWrite, - bmpPlasma.GetPixelFormat(), &bmdPlasma); + bmpPlasma.GetPixelFormat(), &bmdPlasma); unsigned char * dest = static_cast(bmdPlasma.Scan0); - int paletteShift = int(::GetTickCount() / 16); + DWORD paletteShift = ::GetTickCount() / 16; for( int ypos = 0; ypos < rectVersion.Height(); ++ypos ) { @@ -120,7 +125,9 @@ class CAboutDlg : for( int xpos = 0; xpos < rectVersion.Width(); ++xpos ) { - int color = static_cast(plasma[ypos % 256][xpos % 256] + paletteShift) % 256; + DWORD X = ((xpos + ColorG[(ypos + paletteShift) & 0xff]) / 2) & 0xff; + DWORD Y = ((ypos + ColorG[(xpos + paletteShift) & 0xff]) / 2) & 0xff; + DWORD color = static_cast(plasma[X][Y] + paletteShift) & 0xff; // ARGB little endian *dest++ = ColorB[color]; // blue *dest++ = ColorG[color]; // green diff --git a/Console/stdafx.h b/Console/stdafx.h index e53348f0..8f355b08 100644 --- a/Console/stdafx.h +++ b/Console/stdafx.h @@ -20,6 +20,8 @@ ////////////////////////////////////////////////////////////////////////////// +#define _USE_MATH_DEFINES + #include #include #include diff --git a/shared/version.h b/shared/version.h index b7cc99f0..34a7e0b5 100644 --- a/shared/version.h +++ b/shared/version.h @@ -3,13 +3,13 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 18 #define VERSION_BUILD 3 -#define VERSION_BUILD2 18120 -#define VERSION_FILE "1.18.3.18120" -#define VERSION_PRODUCT "1.18.3.18120 beta0" +#define VERSION_BUILD2 18143 +#define VERSION_FILE "1.18.3.18143" +#define VERSION_PRODUCT "1.18.3.18143" #define VERSION_COPYRIGHT "Copyright (C) 2011-2018 Bucher Christophe" #ifndef _WIN32 -VERSION = 1.18.3.18120 +VERSION = 1.18.3.18143 #endif