OpenTTD Source 20241224-master-gee860a5c8e
object_base.h File Reference

Base for all objects. More...

#include "core/pool_type.hpp"
#include "object_type.h"
#include "tilearea_type.h"
#include "town_type.h"
#include "timer/timer_game_calendar.h"

Go to the source code of this file.

Data Structures

struct  Object
 An object, such as transmitter, on the map. More...
 
struct  ClearedObjectArea
 Keeps track of removed objects during execution/testruns of commands. More...
 

Typedefs

typedef Pool< Object, ObjectID, 64, 0xFF0000 > ObjectPool
 

Functions

ClearedObjectAreaFindClearedObject (TileIndex tile)
 Find the entry in _cleared_object_areas which occupies a certain tile.
 

Variables

ObjectPool _object_pool
 
std::vector< ClearedObjectArea_cleared_object_areas
 

Detailed Description

Base for all objects.

Definition in file object_base.h.

Typedef Documentation

◆ ObjectPool

typedef Pool<Object, ObjectID, 64, 0xFF0000> ObjectPool

Definition at line 19 of file object_base.h.

Function Documentation

◆ FindClearedObject()

ClearedObjectArea * FindClearedObject ( TileIndex  tile)

Find the entry in _cleared_object_areas which occupies a certain tile.

Parameters
tileTile of interest
Returns
Occupying entry, or nullptr if none

Definition at line 531 of file object_cmd.cpp.

Referenced by CmdBuildTunnel(), CmdLandscapeClear(), and CmdTerraformLand().

Variable Documentation

◆ _cleared_object_areas

std::vector<ClearedObjectArea> _cleared_object_areas
extern

Definition at line 524 of file object_cmd.cpp.