(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

2
ai.c
View File

@@ -121,7 +121,7 @@ static int AiChooseTrainToBuild(byte railtype, int32 money, byte flag)
int i;
for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
RailVehicleInfo *rvi = &rail_vehinfo(i);
const RailVehicleInfo *rvi = rail_vehinfo(i);
Engine *e = DEREF_ENGINE(i);
if (e->railtype != railtype || rvi->flags & RVI_WAGON