Skip to content

Commit

Permalink
Add smaller resources for Chalk
Browse files Browse the repository at this point in the history
  • Loading branch information
C-D-Lewis committed Nov 3, 2015
1 parent 13236aa commit 3152a6a
Show file tree
Hide file tree
Showing 21 changed files with 5 additions and 3 deletions.
File renamed without changes
Binary file added resources/images/num_0~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_1~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_2~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_3~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_4~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_5~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_6~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_7~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_8~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/images/num_9~round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/big_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ static void load_digit_image_into_slot(int slot_number, int digit_value) {
s_images[slot_number] = gbitmap_create_with_resource(IMAGE_RESOURCE_IDS[digit_value]);

const int x_offset = (bounds.size.w - (2 * tile_bounds.size.w)) / 2;
const int y_offset = (bounds.size.h - (2 * tile_bounds.size.h)) / 2;
BitmapLayer *bitmap_layer = bitmap_layer_create(
GRect(x_offset + ((slot_number % 2) * tile_bounds.size.w),
(slot_number / 2) * tile_bounds.size.h, tile_bounds.size.w, tile_bounds.size.h));
GRect(x_offset + ((slot_number % 2) * tile_bounds.size.w),
y_offset + ((slot_number / 2) * tile_bounds.size.h),
tile_bounds.size.w, tile_bounds.size.h));
s_image_layers[slot_number] = bitmap_layer;
bitmap_layer_set_bitmap(bitmap_layer, s_images[slot_number]);

Expand All @@ -55,7 +57,7 @@ static void unload_digit_image_from_slot(int slot_number) {
layer_remove_from_parent(bitmap_layer_get_layer(s_image_layers[slot_number]));
bitmap_layer_destroy(s_image_layers[slot_number]);
gbitmap_destroy(s_images[slot_number]);

// This is now an empty slot
s_image_slot_state[slot_number] = EMPTY_SLOT;
}
Expand Down

0 comments on commit 3152a6a

Please sign in to comment.