From 9a044f676686860f6bdd2da1970fac258be711de Mon Sep 17 00:00:00 2001 From: Jeff Harris <1063652+jeff-1amstudios@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:41:40 +1300 Subject: [PATCH] removes iconski.png --- .github/scripts/build-macos.sh | 6 ++++- CMakeLists.txt | 18 +++++++++----- resources/ICONSKI.png | Bin 606 -> 0 bytes src/skifree_decomp.c | 2 +- src/types.h | 42 --------------------------------- tools/make-osx-icns.sh | 20 ++++++++-------- 6 files changed, 28 insertions(+), 60 deletions(-) delete mode 100644 resources/ICONSKI.png diff --git a/.github/scripts/build-macos.sh b/.github/scripts/build-macos.sh index db91901..ea4c170 100755 --- a/.github/scripts/build-macos.sh +++ b/.github/scripts/build-macos.sh @@ -12,7 +12,11 @@ else fi # install deps -# dont use brew as it installs sdl as .dylib not as a framework and breaks the .app package build + +# required for converting ICO file to PNG +brew install imagemagick + +# dont use brew for SDL as it installs sdl as .dylib not as a framework and breaks the .app package build #brew install SDL2 sdl2_image sdl2_ttf curl -Lo SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-${SDL2_VERSION}.dmg diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c51146..67f6566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,19 @@ file(GLOB resource_files "resources/*.bmp") if (APPLE) - # generate icns file + # generate png file from ico add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/ski32.icns" - COMMAND "${CMAKE_SOURCE_DIR}/tools/make-osx-icns.sh" - DEPENDS "resources/ICONSKI.png" + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ICONSKI.png + COMMAND convert + ARGS -flatten ${CMAKE_SOURCE_DIR}/resources/ICONSKI.ICO ${CMAKE_CURRENT_BINARY_DIR}/ICONSKI.PNG + DEPENDS ${CMAKE_SOURCE_DIR}/resources/ICONSKI.ICO + ) + + # generate icns file from png + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ski32.icns + COMMAND ${CMAKE_SOURCE_DIR}/tools/make-osx-icns.sh + DEPENDS ICONSKI.png ) set(skifree_sdl_ICON ${CMAKE_CURRENT_BINARY_DIR}/ski32.icns) @@ -68,8 +76,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2TTF_INCLUDE_DIR} ) -message("hello world") -message(${SDL2IMAGE_INCLUDE_DIR}, ${SDL2TTF_INCLUDE_DIR}) # Add compiler errors/warnings flags if(MSVC) target_link_options(${PROJECT_NAME} PRIVATE /subsystem:windows /ENTRY:mainCRTStartup) diff --git a/resources/ICONSKI.png b/resources/ICONSKI.png deleted file mode 100644 index e5a9c9e7eb024b235931b286e6343ce80136d4c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vO2U$sR$z3=CCj3=9n|3=F@3LJcn% z7)lKo7+xhXFj&oCU=S~uvn$XBC?OZ%6XFV_f#5$707(!8(FYD3XlQ5v^1O46t^=hR zOM?7@862M7NCR<_yxm=x(zt66iq|buVd=3)lIi4(u!I7BjeTtw4}XMdwT4T3(*!-QVs`XI@(P(fj<51ct|Iu`h&V zmMI8GWMq1u`Fg)xRlxtiqy+@PvLQm=3 zSsUtB{oj9Bzfr4bQLUAOB`~N|OI#yLQW8s2t&)pUffR$0fswJUfu*jINr;iLm9dGH zk&(86ft7*5r@fz&Q8eV{r(~v8;?~go!0SFxg9hA&lFZ!H;*!MN0^EA8e9Z=GVPNod L^>bP0l+XkK#vjj^ diff --git a/src/skifree_decomp.c b/src/skifree_decomp.c index 3575fce..1caa857 100644 --- a/src/skifree_decomp.c +++ b/src/skifree_decomp.c @@ -3643,7 +3643,7 @@ BOOL createBitmapSheets(HDC param_1) { // return FALSE; // } // bitmapSourceDC = CreateCompatibleDC(param_1); - for (resourceId = 1; (uint16_t)resourceId < NUM_SPRITES; resourceId++) { + for (resourceId = 1; resourceId < NUM_SPRITES; resourceId++) { sprite = &sprites[resourceId]; bitmap = loadBitmapResource(resourceId); if (bitmap == (HBITMAP)0x0) { diff --git a/src/types.h b/src/types.h index 0f6ad39..dc67259 100644 --- a/src/types.h +++ b/src/types.h @@ -101,46 +101,4 @@ typedef struct int rightFrameNo; } PlayerTurnFrameNoLookupTbl; -#define NUM_ACTORS 100 -#define NUM_SPRITES 90 -#define NUM_STRINGS 20 -#define NUM_PERM_OBJECTS 256 -#define SMALL_TEXTURE_ATLAS_MAX_SIZE 32 - -// Actor bit flags - -#define FLAG_1 1 -#define FLAG_2 2 -#define FLAG_4 4 -#define FLAG_8 8 -#define FLAG_10 0x10 -#define FLAG_20 0x20 -#define FLAG_40 0x40 -#define FLAG_80 0x80 - -#define BORDER_LEFT 0 -#define BORDER_RIGHT 1 -#define BORDER_TOP 2 -#define BORDER_BOTTOM 3 - -#define ACTOR_TYPE_0_PLAYER 0 -#define ACTOR_TYPE_1_BEGINNER 1 -#define ACTOR_TYPE_2_DOG 2 -#define ACTOR_TYPE_3_SNOWBOARDER 3 -#define ACTOR_TYPE_4_CHAIRLIFT 4 -#define ACTOR_TYPE_5_YETI_TOP 5 -#define ACTOR_TYPE_6_YETI_BOTTOM 6 -#define ACTOR_TYPE_7_YETI_LEFT 7 -#define ACTOR_TYPE_8_YETI_RIGHT 8 -#define ACTOR_TYPE_9_TREE_ON_FIRE 9 -#define ACTOR_TYPE_10_WALKING_TREE 10 // a -#define ACTOR_TYPE_11_MOGULS 11 // b -#define ACTOR_TYPE_12_SLALOM_FLAG 12 // c -#define ACTOR_TYPE_13_TREE 13 // d -#define ACTOR_TYPE_14_ROCK_STUMP 14 // e -#define ACTOR_TYPE_15_BUMP 15 // f -#define ACTOR_TYPE_16_JUMP 16 // 10 -#define ACTOR_TYPE_17_SIGN 17 // 11 -#define ACTOR_TYPE_18_NOTHING 18 // 12 - #endif // SKIFREE_DECOMP_TYPES_H diff --git a/tools/make-osx-icns.sh b/tools/make-osx-icns.sh index af8f230..414e53b 100755 --- a/tools/make-osx-icns.sh +++ b/tools/make-osx-icns.sh @@ -1,12 +1,12 @@ mkdir ski32.iconset -sips -z 16 16 ../resources/ICONSKI.png --out ski32.iconset/icon_16x16.png -sips -z 32 32 ../resources/ICONSKI.png --out ski32.iconset/icon_16x16@2x.png -sips -z 32 32 ../resources/ICONSKI.png --out ski32.iconset/icon_32x32.png -sips -z 64 64 ../resources/ICONSKI.png --out ski32.iconset/icon_32x32@2x.png -sips -z 128 128 ../resources/ICONSKI.png --out ski32.iconset/icon_128x128.png -sips -z 256 256 ../resources/ICONSKI.png --out ski32.iconset/icon_128x128@2x.png -sips -z 256 256 ../resources/ICONSKI.png --out ski32.iconset/icon_256x256.png -sips -z 512 512 ../resources/ICONSKI.png --out ski32.iconset/icon_256x256@2x.png -sips -z 512 512 ../resources/ICONSKI.png --out ski32.iconset/icon_512x512.png -sips -z 1024 1024 ../resources/ICONSKI.png --out ski32.iconset/icon_512x512@2x.png +sips -z 16 16 ICONSKI.png --out ski32.iconset/icon_16x16.png +sips -z 32 32 ICONSKI.png --out ski32.iconset/icon_16x16@2x.png +sips -z 32 32 ICONSKI.png --out ski32.iconset/icon_32x32.png +sips -z 64 64 ICONSKI.png --out ski32.iconset/icon_32x32@2x.png +sips -z 128 128 ICONSKI.png --out ski32.iconset/icon_128x128.png +sips -z 256 256 ICONSKI.png --out ski32.iconset/icon_128x128@2x.png +sips -z 256 256 ICONSKI.png --out ski32.iconset/icon_256x256.png +sips -z 512 512 ICONSKI.png --out ski32.iconset/icon_256x256@2x.png +sips -z 512 512 ICONSKI.png --out ski32.iconset/icon_512x512.png +sips -z 1024 1024 ICONSKI.png --out ski32.iconset/icon_512x512@2x.png iconutil -c icns ski32.iconset