mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-01 06:23:35 +01:00
bopti: fix p4 stride omission from 1384c54b5
This commit is contained in:
parent
d8b85a9fab
commit
36d66a6317
1 changed files with 4 additions and 2 deletions
|
@ -59,11 +59,13 @@ void bopti_render(bopti_image_t const *img, struct box *box)
|
||||||
uint16_t const *palette = data;
|
uint16_t const *palette = data;
|
||||||
data += 32;
|
data += 32;
|
||||||
|
|
||||||
|
int true_width = img->width + (img->width & 1);
|
||||||
|
|
||||||
/* Due to nibble alignment being a hassle, in this function the
|
/* Due to nibble alignment being a hassle, in this function the
|
||||||
input stride is expressed in pixels. */
|
input stride is expressed in pixels. */
|
||||||
int in = img->width - w + (img->width & 1);
|
int in = true_width - w;
|
||||||
/* Also we don't move pointers, we just use pixel offsets. */
|
/* Also we don't move pointers, we just use pixel offsets. */
|
||||||
int offset = img->width * box->top + box->left;
|
int offset = true_width * box->top + box->left;
|
||||||
|
|
||||||
bopti_p4(data, target, w, h, in, out, palette, img->alpha,
|
bopti_p4(data, target, w, h, in, out, palette, img->alpha,
|
||||||
offset);
|
offset);
|
||||||
|
|
Loading…
Reference in a new issue