aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJoseph Pacheco-Corwin <hammersamatom@gmail.com>2019-01-29 23:00:00 +0000
committerKevin O'Connor <kevin@koconnor.net>2019-02-04 21:20:27 -0500
commit63d69674666eb78153ecc6a7e2ede4305ad7c966 (patch)
tree3df18d32548f2c81cd1b509e095e1a9180a2a0bd /src/util.h
parent34fe8660ec42e18f768fb1f5e645c7a59620e2ed (diff)
downloadseabios-hppa-63d69674666eb78153ecc6a7e2ede4305ad7c966.zip
seabios-hppa-63d69674666eb78153ecc6a7e2ede4305ad7c966.tar.gz
seabios-hppa-63d69674666eb78153ecc6a7e2ede4305ad7c966.tar.bz2
bootsplash: Added support for 16/24/32bpp in one function
Specifically added support for 16 and 32bpp files, in addition to 24bpp. The function bmp_show() in bmp.c has had the hardcoded check for 24bpp replaced with a general bpp check that uses a % to check for remainder, and returns 1 if the remainder is >0. The previous method for adjusting the BMP data (raw_data_format_adjust_24bpp) relied on a preset 3*bytes_per_line_src, this has been changed and the multiplication is now performed in the function's arguments. This change still allows someone else to reuse the same function for 1/2/4bpp support if necessary. The file util.h has been modified to reflect this decision. The changes to raw_data_format_adjust() is based on an abandoned patch by Gert Menke (submitted March 14, 2017), credit to them for that change and the addition of *bpp to bmp_get_info(). Signed-off-by: Joseph S. Pacheco-Corwin <hammersamatom@gmail.com>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 6dd080f..9c06850 100644
--- a/src/util.h
+++ b/src/util.h
@@ -12,7 +12,7 @@ void handle_1553(struct bregs *regs);
// bmp.c
struct bmp_decdata *bmp_alloc(void);
int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size);
-void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height);
+void bmp_get_info(struct bmp_decdata *bmp, int *width, int *height, int *bpp);
int bmp_show(struct bmp_decdata *bmp, unsigned char *pic, int width
, int height, int depth, int bytes_per_line_dest);