Changeset - r3790:3671bbaff1d1
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-05-09 06:52:28
peter1138@openttd.org
(svn r4786) - Newstations: in GetPlatformInfo() ensure negative values are only four bits
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
newgrf_station.c
Show inline comments
 
@@ -213,8 +213,8 @@ uint32 GetPlatformInfo(Axis axis, byte t
 
	if (centred) {
 
		x -= platforms / 2;
 
		y -= length / 2;
 
		SB(retval,  0, 4, clamp(y, -8, 7));
 
		SB(retval,  4, 4, clamp(x, -8, 7));
 
		SB(retval,  0, 4, y & 0xF);
 
		SB(retval,  4, 4, x & 0xF);
 
	} else {
 
		SB(retval,  0, 4, y);
 
		SB(retval,  4, 4, length - y - 1);
0 comments (0 inline, 0 general)