(svn r20638) -Codechange: split object.h

This commit is contained in:
rubidium
2010-08-27 22:21:23 +00:00
parent 01927590a5
commit 3e9e1b8e65
11 changed files with 133 additions and 72 deletions

View File

@@ -30,6 +30,7 @@
#include "core/pool_func.hpp"
#include "object_map.h"
#include "object_base.h"
#include "newgrf_object.h"
#include "date_func.h"
#include "table/strings.h"
@@ -49,17 +50,6 @@ void InitializeObjects()
_object_pool.CleanPool();
}
/* static */ const ObjectSpec *ObjectSpec::Get(ObjectType index)
{
assert(index < OBJECT_MAX);
return &_original_objects[index];
}
/* static */ const ObjectSpec *ObjectSpec::GetByTile(TileIndex tile)
{
return ObjectSpec::Get(GetObjectType(tile));
}
void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town)
{
const ObjectSpec *spec = ObjectSpec::Get(type);