WAGE: Simplify polygon reading code
This commit is contained in:
parent
33b8a265c5
commit
9d9fefb17a
1 changed files with 2 additions and 2 deletions
|
@ -297,7 +297,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in,
|
||||||
int y2 = y1;
|
int y2 = y1;
|
||||||
int x2 = x1;
|
int x2 = x1;
|
||||||
int b = in.readSByte();
|
int b = in.readSByte();
|
||||||
if ((b & 0xff) == 0x80) {
|
if (b == -128) {
|
||||||
y2 = in.readSint16BE();
|
y2 = in.readSint16BE();
|
||||||
numBytes -= 3;
|
numBytes -= 3;
|
||||||
} else {
|
} else {
|
||||||
|
@ -305,7 +305,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in,
|
||||||
numBytes -= 1;
|
numBytes -= 1;
|
||||||
}
|
}
|
||||||
b = in.readSByte();
|
b = in.readSByte();
|
||||||
if ((b & 0xff) == 0x80) {
|
if (b == -128) {
|
||||||
x2 = in.readSint16BE();
|
x2 = in.readSint16BE();
|
||||||
numBytes -= 3;
|
numBytes -= 3;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue