Loading

Paste #pf9vovwqj

  1. Option 1:
  2. Define road/tramtype using different "allocate label" properties.
  3. 0x07: Allocate road label
  4. 0x08: Allocate tram label
  5.  
  6. RoadTypeReserveInfo:
  7.  case 0x07: GetRoadTypeByLabel(rtl, ROADTYPE_ROAD, false);
  8.             rt = AllocateRoadType(rtl, ROADTYPE_ROAD);
  9.  case 0x08: GetRoadTypeByLabel(rtl, ROADTYPE_TRAM, false);
  10.             rt = AllocateRoadType(rtl, ROADTYPE_TRAM);
  11.  
  12.  
  13. Option 2:
  14. Flag in property 0x10.
  15.  
  16. RoadTypeReserveInfo:
  17. Labels are not immediately allocated, but only collected per GRF:
  18. RoadTypeReserveInfo also collects the road/tram flag.
  19.  
  20. After the reservation pass, stuff are really allocated.
  21.  
  22. Problem: This breaks GRF loading stages, and essentially adds a second reservation stage. GRFs cannot properly test for already defined labels.
  23.  
  24.  
  25. => Option 1 is superior.

Comments