diff options
author | Filippos Karapetis | 2009-09-07 16:18:05 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-09-07 16:18:05 +0000 |
commit | 8fa0b431ee64b7c9105051981c6a62f30983e6fc (patch) | |
tree | a6814e9fcf6e2bc803b1cdcf2a9c22430bc2d7b7 /engines/sci/gfx/gfx_tools.cpp | |
parent | bebc76b4d8fd25ef84f22a7500df7e74b9714ddc (diff) | |
download | scummvm-rg350-8fa0b431ee64b7c9105051981c6a62f30983e6fc.tar.gz scummvm-rg350-8fa0b431ee64b7c9105051981c6a62f30983e6fc.tar.bz2 scummvm-rg350-8fa0b431ee64b7c9105051981c6a62f30983e6fc.zip |
Merged xfact and yfact into scaleFactor - it doesn't really make sense to multiply one dimension with an integer multiplier which is different to the multiplier of the other dimension, otherwise we'll end up with funny looking and squashed resolutions like 640x200 or 320x400. Also, removed the now-unused pixelFormat member variable of the graphics driver struct
svn-id: r44003
Diffstat (limited to 'engines/sci/gfx/gfx_tools.cpp')
-rw-r--r-- | engines/sci/gfx/gfx_tools.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/sci/gfx/gfx_tools.cpp b/engines/sci/gfx/gfx_tools.cpp index 2a6550598e..34632260b3 100644 --- a/engines/sci/gfx/gfx_tools.cpp +++ b/engines/sci/gfx/gfx_tools.cpp @@ -46,9 +46,8 @@ void gfx_clip_box_basic(rect_t *box, int maxx, int maxy) { gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &format, Palette *palette, int flags) { gfx_mode_t *mode = (gfx_mode_t *)malloc(sizeof(gfx_mode_t)); - mode->xfact = xfact; - mode->yfact = yfact; - mode->format = format; + mode->scaleFactor = xfact; + mode->scaleFactor = yfact; mode->palette = palette; return mode; @@ -177,8 +176,8 @@ gfx_pixmap_t *gfx_pixmap_alloc_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode) { pixmap->width = pixmap->index_width; pixmap->height = pixmap->index_height; } else { - pixmap->width = pixmap->index_width * mode->xfact; - pixmap->height = pixmap->index_height * mode->yfact; + pixmap->width = pixmap->index_width * mode->scaleFactor; + pixmap->height = pixmap->index_height * mode->scaleFactor; } size = pixmap->width * pixmap->height; @@ -207,8 +206,8 @@ gfx_pixmap_t *gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode int linewidth; int xl, yl; int i, yc; - int xfact = mode->xfact; - int yfact = mode->yfact; + int xfact = mode->scaleFactor; + int yfact = mode->scaleFactor; if (xfact == 1 && yfact == 1) return pixmap; |