From b36b0f8fa135beee0a50f16298692c1e076fa9b0 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sun, 13 Dec 2020 12:23:06 -0500 Subject: exe icon --- .gitignore | 1 + assets/icon.bmp | Bin 16522 -> 2442 bytes assets/icon.ico | Bin 0 -> 1406 bytes boxcatapult2d.rc | 1 + make.bat | 10 +++++----- util.cpp | 3 +++ 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 assets/icon.ico create mode 100644 boxcatapult2d.rc diff --git a/.gitignore b/.gitignore index e308a5c..23d9f82 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ TAGS *.xcf *.lib *.exp +*.res SDL2 box2d .vs* diff --git a/assets/icon.bmp b/assets/icon.bmp index 1c487a2..1775fb8 100644 Binary files a/assets/icon.bmp and b/assets/icon.bmp differ diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..07b4999 Binary files /dev/null and b/assets/icon.ico differ diff --git a/boxcatapult2d.rc b/boxcatapult2d.rc new file mode 100644 index 0000000..cd4466b --- /dev/null +++ b/boxcatapult2d.rc @@ -0,0 +1 @@ +icon ICON assets\icon.ico diff --git a/make.bat b/make.bat index 4fdc115..74c3851 100644 --- a/make.bat +++ b/make.bat @@ -6,10 +6,10 @@ if _%VCVARS% == _ ( if not exist obj mkdir obj SET CFLAGS=/nologo /W3 /D_CRT_SECURE_NO_WARNINGS /I SDL2/include /I box2d SDL2/lib/x64/SDL2main.lib SDL2/lib/x64/SDL2.lib opengl32.lib box2d.lib /MD +rc /nologo boxcatapult2d.rc if _%1 == _ ( - cl main.cpp /DDEBUG /DEBUG /Zi %CFLAGS% /Fo:obj/urbs /Fe:physics - cl sim.cpp /DDEBUG /DEBUG /LD %CFLAGS% /Fo:obj/sim /Fe:obj/sim - echo > obj\sim.dll_changed + cl main.cpp /DDEBUG /DEBUG /Zi %CFLAGS% /Fo:obj/urbs /Fe:boxcatapult2d boxcatapult2d.res + rem cl sim.cpp /DDEBUG /DEBUG /LD %CFLAGS% /Fo:obj/sim /Fe:obj/sim + rem echo > obj\sim.dll_changed ) -if _%1 == _release cl main.cpp /O2 %CFLAGS% /Fe:physics -if _%1 == _profile cl main.cpp /O2 /DPROFILE %CFLAGS% /Fe:physics +if _%1 == _release cl main.cpp /O2 %CFLAGS% /Fe:boxcatapult2d boxcatapult2d.res diff --git a/util.cpp b/util.cpp index 99aed75..4662724 100644 --- a/util.cpp +++ b/util.cpp @@ -1,3 +1,6 @@ +#if _WIN32 +#include +#endif #ifndef arr_count #define arr_count(a) (sizeof (a) / sizeof *(a)) #endif -- cgit v1.2.3