equal
deleted
inserted
replaced
376 case 0x47: |
376 case 0x47: |
377 case 0x49: return 0x2110000; // Platforms, tracks & position |
377 case 0x49: return 0x2110000; // Platforms, tracks & position |
378 case 0x42: return 0; // Rail type (XXX Get current type from GUI?) |
378 case 0x42: return 0; // Rail type (XXX Get current type from GUI?) |
379 case 0x43: return _current_player; // Station owner |
379 case 0x43: return _current_player; // Station owner |
380 case 0x44: return 2; // PBS status |
380 case 0x44: return 2; // PBS status |
381 case 0xFA: return max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); // Build date |
381 case 0xFA: return clamp(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Build date, clamped to a 16 bit value |
382 } |
382 } |
383 |
383 |
384 *available = false; |
384 *available = false; |
385 return UINT_MAX; |
385 return UINT_MAX; |
386 } |
386 } |
418 case 0xF1: return st->airport_type; |
418 case 0xF1: return st->airport_type; |
419 case 0xF2: return st->truck_stops->status; |
419 case 0xF2: return st->truck_stops->status; |
420 case 0xF3: return st->bus_stops->status; |
420 case 0xF3: return st->bus_stops->status; |
421 case 0xF6: return st->airport_flags; |
421 case 0xF6: return st->airport_flags; |
422 case 0xF7: return GB(st->airport_flags, 8, 8); |
422 case 0xF7: return GB(st->airport_flags, 8, 8); |
423 case 0xFA: return max(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); |
423 case 0xFA: return clamp(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); |
424 } |
424 } |
425 |
425 |
426 /* Handle cargo variables with parameter, 0x60 to 0x65 */ |
426 /* Handle cargo variables with parameter, 0x60 to 0x65 */ |
427 if (variable >= 0x60 && variable <= 0x65) { |
427 if (variable >= 0x60 && variable <= 0x65) { |
428 CargoID c = GetCargoTranslation(parameter, object->u.station.statspec->grffile); |
428 CargoID c = GetCargoTranslation(parameter, object->u.station.statspec->grffile); |