Skip to content

Commit

Permalink
Try a different transparency color for BigCroaker #1
Browse files Browse the repository at this point in the history
  • Loading branch information
periwinkle9 committed Jul 19, 2023
1 parent f51945c commit 26b37df
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
Binary file modified DDrawTransparencyTest.rc
Binary file not shown.
1 change: 1 addition & 0 deletions DDrawTransparencyTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
</ItemGroup>
<ItemGroup>
<Image Include="croaker.bmp" />
<Image Include="croaker2.bmp" />
<Image Include="DDrawTransparencyTest.ico" />
<Image Include="roach.bmp" />
<Image Include="roach_scaled.bmp" />
Expand Down
3 changes: 3 additions & 0 deletions DDrawTransparencyTest.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<Image Include="roach_scaled.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="croaker2.bmp">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="rcdata1.bin">
Expand Down
Binary file added croaker2.bmp
Binary file not shown.
6 changes: 3 additions & 3 deletions load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ BOOL loadRoachClipRight()
BOOL loadFrog1()
{
// Using BitBlt
HANDLE handle = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BIGCROAKER), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
HANDLE handle = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BIGCROAKER2), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
if (handle == NULL)
return FALSE;

Expand Down Expand Up @@ -188,8 +188,8 @@ BOOL loadFrog1()
DeleteDC(hdc);

DDCOLORKEY colorKey;
colorKey.dwColorSpaceLowValue = 0;
colorKey.dwColorSpaceHighValue = 0;
colorKey.dwColorSpaceLowValue = 0x01010101u; // Hopefully this should work regardless of color format
colorKey.dwColorSpaceHighValue = 0x01010101u;
if (frogSurface1->SetColorKey(DDCKEY_SRCBLT, &colorKey) != DD_OK)
return FALSE;

Expand Down
3 changes: 2 additions & 1 deletion resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
#define IDB_BIGCROAKER 132
#define IDB_ROACHCLIPRIGHT 133
#define IDR_ROACHCLIPLEFT 139
#define IDB_BIGCROAKER2 140
#define IDC_STATIC -1

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 140
#define _APS_NEXT_RESOURCE_VALUE 141
#define _APS_NEXT_COMMAND_VALUE 32772
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
Expand Down

0 comments on commit 26b37df

Please sign in to comment.