viewport.c
changeset 988 2482369a61ff
parent 981 25c7b445dcb8
child 1070 bef634a62323
--- a/viewport.c	Wed Jan 12 00:50:08 2005 +0000
+++ b/viewport.c	Wed Jan 12 11:21:28 2005 +0000
@@ -8,6 +8,7 @@
 #include "station.h"
 #include "gfx.h"
 #include "town.h"
+#include "signs.h"
 
 #define VIEWPORT_DRAW_MEM (65536 * 2)
 
@@ -885,7 +886,7 @@
 	bottom = top + dpi->height;
 
 	if (dpi->zoom < 1) {
-		for(ss=_sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 					bottom > ss->sign.top &&
 					top < ss->sign.top + 12 &&
@@ -902,7 +903,7 @@
 	} else if (dpi->zoom == 1) {
 		right += 2;
 		bottom += 2;
-		for(ss=_sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 					bottom > ss->sign.top &&
 					top < ss->sign.top + 24 &&
@@ -920,7 +921,7 @@
 		right += 4;
 		bottom += 5;
 
-		for(ss=_sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 					bottom > ss->sign.top &&
 					top < ss->sign.top + 24 &&
@@ -1541,7 +1542,7 @@
 		x = x - vp->left + vp->virtual_left;
 		y = y - vp->top + vp->virtual_top;
 
-		for(ss = _sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 			    y >= ss->sign.top &&
 					y < ss->sign.top + 12 &&
@@ -1554,7 +1555,7 @@
 	} else if (vp->zoom == 1) {
 		x = (x - vp->left + 1) * 2 + vp->virtual_left;
 		y = (y - vp->top + 1) * 2 + vp->virtual_top;
-		for(ss = _sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 			    y >= ss->sign.top &&
 					y < ss->sign.top + 24 &&
@@ -1567,7 +1568,7 @@
 	} else {
 		x = (x - vp->left + 3) * 4 + vp->virtual_left;
 		y = (y - vp->top + 3) * 4 + vp->virtual_top;
-		for(ss = _sign_list; ss != endof(_sign_list); ss++) {
+		FOR_ALL_SIGNS(ss) {
 			if (ss->str &&
 			    y >= ss->sign.top &&
 					y < ss->sign.top + 24 &&