summaryrefslogtreecommitdiff
path: root/splashscreen/src/bitmap_funcs.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-06-02 12:56:17 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-06-02 12:56:17 +0000
commit1d4c82315785aa0d61216483bae4a2511d303bea (patch)
tree29a2ad00472365527cbcb5ebb1004bb9f60f9735 /splashscreen/src/bitmap_funcs.cpp
parentcc3c75d89cc4658ed9903775e422523873d697e0 (diff)
fixed sounds playing
fixed random splash cosmetic fix git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@136 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'splashscreen/src/bitmap_funcs.cpp')
-rw-r--r--splashscreen/src/bitmap_funcs.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/splashscreen/src/bitmap_funcs.cpp b/splashscreen/src/bitmap_funcs.cpp
index 20a1427..09ded3a 100644
--- a/splashscreen/src/bitmap_funcs.cpp
+++ b/splashscreen/src/bitmap_funcs.cpp
@@ -203,7 +203,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha)
if (!png2dibConvertor) {
return false;
}
-
+
if ((hFile = CreateFile(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE)
if ((hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != NULL)
if ((ppMap = (BYTE*)MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 )) != NULL)
@@ -214,7 +214,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha)
param.pSource = ppMap;
param.cbSourceSize = cbFileSize;
param.pResult = &pDib;
-
+
if (png2dibConvertor((char*)param.pSource, param.cbSourceSize, param.pResult))
pDibBits = (BYTE*)(pDib+1);
else
@@ -303,7 +303,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha)
MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
- (alpha.getWidth() == width) &&
+ (alpha.getWidth() == width) &&
(alpha.getHeight() == height) )
{
for (int i = 0; i < width*height; i++)
@@ -326,12 +326,12 @@ void MyBitmap::allocate(int w, int h)
BITMAPINFO bi;
- bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
- bi.bmiHeader.biWidth = w;
- bi.bmiHeader.biHeight = -h;
- bi.bmiHeader.biPlanes = 1;
- bi.bmiHeader.biBitCount = 32;
- bi.bmiHeader.biCompression = BI_RGB;
+ bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
+ bi.bmiHeader.biWidth = w;
+ bi.bmiHeader.biHeight = -h;
+ bi.bmiHeader.biPlanes = 1;
+ bi.bmiHeader.biBitCount = 32;
+ bi.bmiHeader.biCompression = BI_RGB;
if (dcBmp)
{
@@ -339,9 +339,9 @@ void MyBitmap::allocate(int w, int h)
DeleteDC(dcBmp);
}
- hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0);
- dcBmp = CreateCompatibleDC(0);
- hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp);
+ hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0);
+ dcBmp = CreateCompatibleDC(0);
+ hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp);
}
void MyBitmap::free()