Skip to content

Commit bb09f88

Browse files
committed
Update cute_aseprite
1 parent e435f54 commit bb09f88

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
path = vendor/raylib
33
url = https://github.com/raysan5/raylib.git
44
ignore = dirty
5+
[submodule "vendor/cute_headers"]
6+
path = vendor/cute_headers
7+
url = https://github.com/RandyGaul/cute_headers.git

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.11)
22
project (raylib-aseprite
3-
VERSION 4.0.0
3+
VERSION 4.0.1
44
DESCRIPTION "raylib-aseprite"
55
HOMEPAGE_URL "https://github.com/robloach/raylib-aseprite"
66
LANGUAGES C)

include/cute_aseprite.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,10 +908,7 @@ ase_t* cute_aseprite_load_from_memory(const void* memory, int size, void* mem_ct
908908
CUTE_ASEPRITE_ASSERT(bpp == 1);
909909
ase->mode = ASE_MODE_INDEXED;
910910
}
911-
if (s_read_uint32(s) & 1) {
912-
// Layer opacity has valid value.
913-
// Ok... So?
914-
}
911+
uint32_t valid_layer_opacity = s_read_uint32(s) & 1;
915912
int speed = s_read_uint16(s);
916913
s_skip(s, sizeof(uint32_t) * 2); // Spec says skip these bytes, as they're zero'd.
917914
ase->transparent_palette_entry_index = s_read_uint8(s);
@@ -963,6 +960,7 @@ ase_t* cute_aseprite_load_from_memory(const void* memory, int size, void* mem_ct
963960
int blend_mode = (int)s_read_uint16(s);
964961
if (blend_mode) CUTE_ASEPRITE_WARNING("Unknown blend mode encountered.");
965962
layer->opacity = s_read_uint8(s) / 255.0f;
963+
if (!valid_layer_opacity) layer->opacity = 1.0f;
966964
s_skip(s, 3); // For future use (set to zero).
967965
layer->name = s_read_string(s);
968966
last_udata = &layer->udata;

vendor/cute_headers

Submodule cute_headers added at 788a96d

0 commit comments

Comments
 (0)