diff options
author | Strangerke | 2013-01-05 02:19:55 +0100 |
---|---|---|
committer | Strangerke | 2013-01-05 02:19:55 +0100 |
commit | 3ee199ad7a4cbd4b70064f3546c26e4cc0f4a8db (patch) | |
tree | a70c4b7e47b3b094e90763feacc3354740fc54a3 /engines/hopkins/graphics.cpp | |
parent | 0a25776dcac993f09ce2eaeb6c14b480b429d85b (diff) | |
download | scummvm-rg350-3ee199ad7a4cbd4b70064f3546c26e4cc0f4a8db.tar.gz scummvm-rg350-3ee199ad7a4cbd4b70064f3546c26e4cc0f4a8db.tar.bz2 scummvm-rg350-3ee199ad7a4cbd4b70064f3546c26e4cc0f4a8db.zip |
HOPKINS: Fix display in breakout game. Get rid of any int16 cast to make sure it's endian safe.
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 734e16ccaa..8521e3bf53 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1240,40 +1240,25 @@ void GraphicsManager::CopyAsm(const byte *surface) { void GraphicsManager::CopyAsm16(const byte *surface) { const byte *v1; byte *v2; - int v3; - byte *v5; - uint16 *v6; + byte *v6; int v; - uint16 *v8; - int v9; byte *v10; - const byte *v11; assert(_videoPtr); v1 = surface; v2 = 30 * WinScan + (byte *)_videoPtr->pixels; - v3 = 200; - do { - v11 = v1; + for (int y = 200; y; y--) { v10 = v2; - v9 = v3; - v5 = PAL_PIXELS; - for (int v4 = 320; v4; v4--) { + for (int x = 320; x; x--) { v = 2 * *v1; - v6 = (uint16 *)(v5 + 2 * *v1); - v = *v6; - *v2 = *v6; - v2[1] = v; - v8 = (uint16 *)(WinScan + v2); - *v8 = v; - v8[1] = v; + v6 = PAL_PIXELS + v; + v2[0] = v2[2] = v2[WinScan] = v2[WinScan + 2] = v6[0]; + v2[1] = v2[3] = v2[WinScan + 1] = v2[WinScan + 3] = v6[1]; ++v1; - v2 = (byte *)v8 - WinScan + 4; + v2 += 4; } - v1 = v11 + 320; v2 = WinScan * 2 + v10; - v3 = v9 - 1; - } while (v9 != 1); + } } void GraphicsManager::Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height) { |