summaryrefslogtreecommitdiff
path: root/disaster_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-15 11:46:49 +0000
committertron <tron@openttd.org>2005-11-15 11:46:49 +0000
commit3bf8d2ccbbf75533c3578bfebde1238b7293b3ad (patch)
tree0bba4bcbec8dbc4fc490bfa7376a2ee15cd3556c /disaster_cmd.c
parent66d44766a7cb4f8ba61ece7ab9e932d7ba99c1d3 (diff)
downloadopenttd-3bf8d2ccbbf75533c3578bfebde1238b7293b3ad.tar.xz
(svn r3190) Turn some loops into canonical for loop form
Diffstat (limited to 'disaster_cmd.c')
-rw-r--r--disaster_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/disaster_cmd.c b/disaster_cmd.c
index 1f4c72098..ff4d6712a 100644
--- a/disaster_cmd.c
+++ b/disaster_cmd.c
@@ -904,9 +904,9 @@ static void Disaster7_Init(void)
{
int index = GB(Random(), 0, 4);
Industry *i;
- int maxloop = 15;
+ uint m;
- do {
+ for (m = 0; m < 15; m++) {
FOR_ALL_INDUSTRIES(i) {
if (i->xy != 0 && i->type == IT_COAL_MINE && --index < 0) {
@@ -917,17 +917,17 @@ static void Disaster7_Init(void)
{
TileIndex tile = i->xy;
TileIndexDiff step = TileOffsByDir(GB(Random(), 0, 2));
+ uint n;
- int count = 30;
- do {
+ for (n = 0; n < 30; i++) {
DisasterClearSquare(tile);
tile = TILE_MASK(tile + step);
- } while (--count);
+ }
}
return;
}
}
- } while (--maxloop != 0);
+ }
}
static DisasterInitProc * const _disaster_initprocs[] = {