Skip to content

Commit

Permalink
version 1.18.3.18143
Browse files Browse the repository at this point in the history
  • Loading branch information
cbucher committed May 23, 2018
1 parent ae3e2be commit 42e3cbc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
21 changes: 14 additions & 7 deletions Console/AboutDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CAboutDlg :
unsigned char ColorB[256];
unsigned char ColorA[256];

int plasma[256][256];
unsigned char plasma[256][256];

CAboutDlg()
{
Expand All @@ -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<int>(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<unsigned char>(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)
) );
}
}

Expand All @@ -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));
Expand All @@ -108,19 +113,21 @@ 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<unsigned char *>(bmdPlasma.Scan0);

int paletteShift = int(::GetTickCount() / 16);
DWORD paletteShift = ::GetTickCount() / 16;

for( int ypos = 0; ypos < rectVersion.Height(); ++ypos )
{
unsigned char * startdest = dest;

for( int xpos = 0; xpos < rectVersion.Width(); ++xpos )
{
int color = static_cast<int>(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<DWORD>(plasma[X][Y] + paletteShift) & 0xff;
// ARGB little endian
*dest++ = ColorB[color]; // blue
*dest++ = ColorG[color]; // green
Expand Down
2 changes: 2 additions & 0 deletions Console/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

//////////////////////////////////////////////////////////////////////////////

#define _USE_MATH_DEFINES

#include <atlbase.h>
#include <atlcoll.h>
#include <atlstr.h>
Expand Down
8 changes: 4 additions & 4 deletions shared/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 42e3cbc

Please sign in to comment.