(svn r2532) - Fix: Don't waste space using an int where a byte would suffice. (ludde)
authorhackykid
Fri, 08 Jul 2005 19:02:26 +0000
changeset 2023 f5b397c0967d
parent 2022 766563992bd3
child 2024 bf9efcb99c6f
(svn r2532) - Fix: Don't waste space using an int where a byte would suffice. (ludde)
table/autorail.h
viewport.c
--- a/table/autorail.h	Fri Jul 08 17:46:10 2005 +0000
+++ b/table/autorail.h	Fri Jul 08 19:02:26 2005 +0000
@@ -50,7 +50,7 @@
 
 // maps each pixel of a tile (16x16) to a selection type
 // (0,0) is the top corner, (16,16) the bottom corner
-const int AutorailPiece[16][16] = {
+const byte AutorailPiece[16][16] = {
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
--- a/viewport.c	Fri Jul 08 17:46:10 2005 +0000
+++ b/viewport.c	Fri Jul 08 19:02:26 2005 +0000
@@ -1875,7 +1875,7 @@
 /* returns the best autorail highlight type from map coordinates */
 static byte GetAutorailHT(int x, int y)
 {
-	int i;
+	byte i;
 	i = AutorailPiece[x&0xF][y&0xF];
 	return HT_RAIL | i;
 }