Skip to content

Commit

Permalink
Add an icon
Browse files Browse the repository at this point in the history
  • Loading branch information
RalXYZ committed Jan 27, 2020
1 parent 87e33a2 commit 411199a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Snake/Snake.rc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ IDR_MAP05 TEXT "map05.bin"

IDR_MAP06 TEXT "map06.bin"


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "icon.ico"

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////

Expand Down
3 changes: 3 additions & 0 deletions Snake/Snake.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@
<None Include="map05.bin" />
<None Include="map06.bin" />
</ItemGroup>
<ItemGroup>
<Image Include="icon.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
5 changes: 5 additions & 0 deletions Snake/Snake.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Image Include="icon.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
Binary file added Snake/icon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion Snake/maps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
int mapNumber = 0;
int spawnNumber = 0;

maps mapResource[] = { (IDR_MAP00), (IDR_MAP01), (IDR_MAP02), (IDR_MAP03), (IDR_MAP04), (IDR_MAP05), (IDR_MAP06) };
maps mapResource[]{ (IDR_MAP00), (IDR_MAP01), (IDR_MAP02), (IDR_MAP03), (IDR_MAP04), (IDR_MAP05), (IDR_MAP06) };
3 changes: 2 additions & 1 deletion Snake/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
#define IDR_MAP04 106
#define IDR_MAP05 107
#define IDR_MAP06 108
#define IDI_ICON1 109

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
Expand Down

0 comments on commit 411199a

Please sign in to comment.