From 36e4722922ed6d92bac3ef7fe6d45511fb1a17c2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 19 Dec 2015 22:40:57 +0100 Subject: WAGE: Fix polygon rendering --- engines/wage/design.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/wage') diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 42dca86b11..8b3a661e47 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -212,7 +212,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo int y2 = y1; int x2 = x1; int b = in.readSByte(); - if (b == (byte)0x80) { + if ((b & 0xff) == 0x80) { y2 = in.readSint16BE(); numBytes -= 3; } else { @@ -220,7 +220,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo numBytes -= 1; } b = in.readSByte(); - if (b == (byte) 0x80) { + if ((b & 0xff) == 0x80) { x2 = in.readSint16BE(); numBytes -= 3; } else { -- cgit v1.2.3