Skip to content

Commit

Permalink
removes iconski.png
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-1amstudios committed Nov 6, 2023
1 parent dbd122e commit 9a044f6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 60 deletions.
6 changes: 5 additions & 1 deletion .github/scripts/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Binary file removed resources/ICONSKI.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/skifree_decomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
42 changes: 0 additions & 42 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 10 additions & 10 deletions tools/make-osx-icns.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9a044f6

Please sign in to comment.