Skip to content

Commit

Permalink
Fix hires cockpit image display (#271) (#272)
Browse files Browse the repository at this point in the history
Strip map height is a 16 bit value. Cast to `br_uint_16 *`, so that the
upper 8 bits don't get lost.

This fixes cockpit image rendering for -hires mode, where said images
have heights exceeding 255px.
  • Loading branch information
zear committed Dec 16, 2022
1 parent 578a976 commit 716b98c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DETHRACE/common/loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ tS8* ConvertPixToStripMap(br_pixelmap* pThe_br_map) {
temp_strip_image = BrMemAllocate(pThe_br_map->row_bytes * pThe_br_map->height, kMem_strip_image);
current_size = 2;

*temp_strip_image = pThe_br_map->height;
*(br_uint_16 *)temp_strip_image = pThe_br_map->height;
current_strip_pointer = temp_strip_image;

for (i = 0; i < pThe_br_map->height; i++) {
Expand Down

0 comments on commit 716b98c

Please sign in to comment.