diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-05 16:58:42 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-05 16:58:42 +0400 |
commit | f6883a2c09507d0acb9ccbf0156e5948211dc480 (patch) | |
tree | 7789b4fecd6b2e846f070e2e0bdb1e16ea7555e9 /src/apps/mplayerc/libpng.h | |
parent | e9b446380bc3bc122e3e3a1d0622163a5f1920a3 (diff) |
astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2103 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/libpng.h')
-rw-r--r-- | src/apps/mplayerc/libpng.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/apps/mplayerc/libpng.h b/src/apps/mplayerc/libpng.h index 01894be0b..bd306944e 100644 --- a/src/apps/mplayerc/libpng.h +++ b/src/apps/mplayerc/libpng.h @@ -25,8 +25,8 @@ struct png_t
{
- unsigned char* data;
- unsigned int size, pos;
+ unsigned char* data;
+ unsigned int size, pos;
};
#ifdef __cplusplus
@@ -39,31 +39,31 @@ extern "C" unsigned char* DecompressPNG(struct png_t* png, int* w, int* h); class CMPCPngImage : public CImage
{
public:
- bool LoadFromResource(UINT id)
- {
- bool ret = false;
+ bool LoadFromResource(UINT id)
+ {
+ bool ret = false;
- CStringA str;
- if(LoadResource(id, str, _T("FILE")))
- {
- struct png_t png;
- png.data = (unsigned char*)(LPCSTR)str;
- png.size = str.GetLength();
- int w, h;
- if(BYTE* p = DecompressPNG(&png, &w, &h))
- {
- if(Create(w, -h, 32))
- {
- for(int y = 0; y < h; y++)
- memcpy(GetPixelAddress(0, y), &p[w*4*y], w*4);
- ret = true;
- }
+ CStringA str;
+ if(LoadResource(id, str, _T("FILE")))
+ {
+ struct png_t png;
+ png.data = (unsigned char*)(LPCSTR)str;
+ png.size = str.GetLength();
+ int w, h;
+ if(BYTE* p = DecompressPNG(&png, &w, &h))
+ {
+ if(Create(w, -h, 32))
+ {
+ for(int y = 0; y < h; y++)
+ memcpy(GetPixelAddress(0, y), &p[w*4*y], w*4);
+ ret = true;
+ }
- free(p);
- }
- }
+ free(p);
+ }
+ }
- return ret;
- }
+ return ret;
+ }
};
#endif /* __cplusplus */
|