1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(svn r920) Replace vehicle info macros with inline functions and add asserts to check limits

This commit is contained in:
tron
2004-12-03 21:57:05 +00:00
parent 5149373467
commit 56dd31f33b
10 changed files with 104 additions and 76 deletions

View File

@@ -65,7 +65,7 @@ static void engine_drawing_loop(int *x, int *y, int *pos, int *sel,
for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
const Engine *e = DEREF_ENGINE(i);
const RailVehicleInfo *rvi = &rail_vehinfo(i);
const RailVehicleInfo *rvi = rail_vehinfo(i);
if (e->railtype != railtype || !(rvi->flags & RVI_WAGON) != is_engine ||
!HASBIT(e->player_avail, _local_player))
@@ -128,7 +128,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
WP(w,buildtrain_d).sel_engine = selected_id;
if (selected_id != -1) {
const RailVehicleInfo *rvi = &rail_vehinfo(selected_id);
const RailVehicleInfo *rvi = rail_vehinfo(selected_id);
Engine *e;
YearMonthDay ymd;