38 #include "table/strings.h" 
  117   assert(o->
town != NULL);
 
  148 #define GetCompanyHQSize GetAnimationFrame 
  150 #define IncreaseCompanyHQSize IncreaseAnimationStage 
  162   (val = 0, score < 170) ||
 
  163   (val++, score < 350) ||
 
  164   (val++, score < 520) ||
 
  165   (val++, score < 720) ||
 
  180   FOR_ALL_OBJECTS(obj) {
 
  183     if (owner != c->
index) 
continue;
 
  189     const Livery *l = c->livery;
 
  212   uint8 view = 
GB(p2, 0, 2);
 
  224   int size_x = 
GB(spec->
size, 
HasBit(view, 0) ? 4 : 0, 4);
 
  225   int size_y = 
GB(spec->
size, 
HasBit(view, 0) ? 0 : 4, 4);
 
  276         if (ret.
Failed()) 
return ret;
 
  294   if (cost.
Failed()) 
return cost;
 
  359 static void DrawTile_Object(
TileInfo *ti)
 
  378       dts = &_objects[type];
 
  385         case SPR_FLAT_BARE_LAND:          DrawClearLandTile(ti, 0); 
break;
 
  386         case SPR_FLAT_1_THIRD_GRASS_TILE: DrawClearLandTile(ti, 1); 
break;
 
  387         case SPR_FLAT_2_THIRD_GRASS_TILE: DrawClearLandTile(ti, 2); 
break;
 
  388         case SPR_FLAT_GRASS_TILE:         DrawClearLandTile(ti, 3); 
break;
 
  399           dtss->image.
sprite, palette,
 
  400           ti->
x + dtss->
delta_x, ti->
y + dtss->delta_y,
 
  401           dtss->size_x, dtss->size_y,
 
  402           dtss->size_z, ti->
z + dtss->
delta_z,
 
  414 static int GetSlopePixelZ_Object(
TileIndex tile, uint x, uint y)
 
  441     MakeWaterKeepingClass(tile_cur, 
GetTileOwner(tile_cur));
 
  459     if (coa->area.Intersects(ta)) 
return coa;
 
  488     } 
else if (_game_mode == GM_EDITOR) {
 
  523       if (flags & DC_EXEC) {
 
  536   cleared_area->
area = ta;
 
  543 static void AddAcceptedCargo_Object(
TileIndex tile, 
CargoArray &acceptance, uint32 *always_accepted)
 
  555   acceptance[CT_PASSENGERS] += 
max(1U, level);
 
  556   SetBit(*always_accepted, CT_PASSENGERS);
 
  562   acceptance[CT_MAIL] += 
max(1U, level / 2);
 
  563   SetBit(*always_accepted, CT_MAIL);
 
  579 static void TileLoop_Object(
TileIndex tile)
 
  603   if (
GB(r, 0, 8) < (256 / 4 / (6 - level))) {
 
  604     uint amt = 
GB(r, 0, 8) / 8 / 4 + 1;
 
  612   if (
GB(r, 8, 8) < (196 / 4 / (6 - level))) {
 
  613     uint amt = 
GB(r, 8, 8) / 8 / 4 + 1;
 
  625 static bool ClickTile_Object(
TileIndex tile)
 
  633 static void AnimateTile_Object(
TileIndex tile)
 
  660   int perimeter = (
GB(r, 16, 16) % (2 * (maxx + maxy))) - maxy;
 
  662   for (dir = 
DIAGDIR_NE; perimeter > 0; dir++) {
 
  678   for (
int j = 0; j < 19; j++) {
 
  709 void GenerateObjects()
 
  715   uint num_water_tiles = 0;
 
  717     for (uint x = 0; x < 
MapMaxX(); x++) {
 
  721     for (uint y = 1; y < 
MapMaxY() - 1; y++) {
 
  773   bool do_clear = 
false;
 
  837   GetSlopePixelZ_Object,       
 
  839   AddAcceptedCargo_Object,     
 
  841   GetTileTrackStatus_Object,   
 
  845   ChangeTileOwner_Object,      
 
  848   GetFoundation_Object,        
 
  849   TerraformTile_Object,