Loading

Paste #p9z28syhz

  1. /**
  2.  * Append an orthogonal area of cleared tiles in _cleared_object_areas, then return the pointer.
  3.  * @param cleared_tile The tile being cleared, which then causes the whole area to be cleared.
  4.  * @param ta_tile The top most tile of the area to be appended as cleared.
  5.  * @param w The width (x) of the area to be appended as cleared.
  6.  * @param h The height (y) of the area to be appended as cleared.
  7.  * @return The pointer to _cleared_object_areas with the appended cleared area.
  8.  */
  9. ClearedObjectArea *MakeClearedObjectArea(TileIndex cleared_tile, TileIndex ta_tile, uint w, uint h)
  10. {
  11.     ClearedObjectArea *coa = FindClearedObject(cleared_tile);
  12.     if (coa == NULL) {
  13.         coa = _cleared_object_areas.Append();
  14.         coa->first_tile = cleared_tile;
  15.         coa->area = TileArea(ta_tile, w, h);
  16.     }
  17.     return coa;
  18. }

Version history

Revision # Author Created at
p41r06sx1 Anonymous 25 Sep 2016, 19:08:19 UTC Diff
pmp6dybbk Anonymous 25 Sep 2016, 16:14:41 UTC Diff

Comments