diff options
author | James Brown | 2004-03-01 04:05:10 +0000 |
---|---|---|
committer | James Brown | 2004-03-01 04:05:10 +0000 |
commit | b77231a9a365cdcbb268101141b99200e11173b7 (patch) | |
tree | 2b0189830d366b077f5aefffe9f64c3ecc5d05b1 /sword1/screen.cpp | |
parent | 267a96ba4fb854643b55ba1f80607bbfd18b284b (diff) | |
download | scummvm-rg350-b77231a9a365cdcbb268101141b99200e11173b7.tar.gz scummvm-rg350-b77231a9a365cdcbb268101141b99200e11173b7.tar.bz2 scummvm-rg350-b77231a9a365cdcbb268101141b99200e11173b7.zip |
Fix from Roever for bug #892827
svn-id: r13107
Diffstat (limited to 'sword1/screen.cpp')
-rw-r--r-- | sword1/screen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp index faac076d3d..c037b1ae72 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -943,7 +943,7 @@ void Screen::plotYUV(byte *lut, int width, int height, byte *const *dat) { for (y = 0; y < height; y += 2) { for (x = 0; x < width; x += 2) { - int i = ((((dat[2][cpos] + ROUNDADD) >> SHIFT) * BITDEPTH) + ((dat[1][cpos] + ROUNDADD)>>SHIFT)) * BITDEPTH; + int i = ((((dat[2][cpos] + ROUNDADD) >> SHIFT) * (BITDEPTH+1)) + ((dat[1][cpos] + ROUNDADD)>>SHIFT)) * (BITDEPTH+1); cpos++; buf[linepos ] = lut[i + ((dat[0][ ypos ] + ROUNDADD) >> SHIFT)]; |