equal
deleted
inserted
replaced
171 |
171 |
172 #define CHANCE16(a,b) ((uint16)Random() <= (uint16)((65536 * a) / b)) |
172 #define CHANCE16(a,b) ((uint16)Random() <= (uint16)((65536 * a) / b)) |
173 #define CHANCE16R(a,b,r) ((uint16)(r=Random()) <= (uint16)((65536 * a) / b)) |
173 #define CHANCE16R(a,b,r) ((uint16)(r=Random()) <= (uint16)((65536 * a) / b)) |
174 #define CHANCE16I(a,b,v) ((uint16)(v) <= (uint16)((65536 * a) / b)) |
174 #define CHANCE16I(a,b,v) ((uint16)(v) <= (uint16)((65536 * a) / b)) |
175 |
175 |
|
176 #define FIND_CATCHMENT_RADIUS(st,rad) \ |
|
177 {\ |
|
178 if (st->bus_tile || st->lorry_tile || (st->airport_tile && st->airport_type == AT_OILRIG)) rad = 3; \ |
|
179 if (st->train_tile || (st->airport_tile && (st->airport_type == AT_HELIPORT || st->airport_type == AT_SMALL))) rad = 4; \ |
|
180 if (st->dock_tile || (st->airport_tile && st->airport_type == AT_LARGE)) rad = 5; \ |
|
181 if (st->airport_tile && st->airport_type == AT_METROPOLITAN) rad = 6; \ |
|
182 if (st->airport_tile && st->airport_type == AT_INTERNATIONAL) rad = 8; } |
|
183 |
|
184 |
|
185 |
176 #define BEGIN_TILE_LOOP(var,w,h,tile) \ |
186 #define BEGIN_TILE_LOOP(var,w,h,tile) \ |
177 {int h_cur = h; \ |
187 {int h_cur = h; \ |
178 uint var = tile; \ |
188 uint var = tile; \ |
179 do { \ |
189 do { \ |
180 int w_cur = w; \ |
190 int w_cur = w; \ |