Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd91f70
)
Make sure to round up the scaling
author
Bill Lash
<william.lash@gmail.com>
Wed, 2 Oct 2019 02:56:47 +0000
(21:56 -0500)
committer
Bill Lash
<william.lash@gmail.com>
Wed, 2 Oct 2019 02:56:47 +0000
(21:56 -0500)
Use ceil to make sure to round up the scaling increment to get all
of the picture
src/sdl/sf_video.c
patch
|
blob
|
history
diff --git
a/src/sdl/sf_video.c
b/src/sdl/sf_video.c
index 2d47520e2aa787c273b8f95c786b94963b2aab40..135ef1df6670b508c80a64884e3885bad47e1c0d 100644
(file)
--- a/
src/sdl/sf_video.c
+++ b/
src/sdl/sf_video.c
@@
-600,9
+600,9
@@
void os_draw_picture(int picture, int y, int x)
sf_flushdisplay();
for (yy = 0; yy < eh * m_gfxScale_h; yy++) {
- int ys =
yy / m_gfxScale_h
;
+ int ys =
ceil(yy / m_gfxScale_h)
;
for (xx = 0; xx < ew * m_gfxScale_w; xx++) {
- int xs =
xx / m_gfxScale_w
;
+ int xs =
ceil(xx / m_gfxScale_w)
;
int index = pic->pixels[ys * pic->width + xs];
if (index != pic->transparentcolor)
sf_wpixel(x + xx, y + yy,