(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.

This commit is contained in:
peter1138
2008-04-29 21:31:29 +00:00
parent 1d01390fa6
commit a00371c8db
49 changed files with 654 additions and 435 deletions

View File

@@ -22,6 +22,7 @@
#include "player_func.h"
#include "order_func.h"
#include "oldpool_func.h"
#include "core/alloc_func.hpp"
#include "table/strings.h"
@@ -50,12 +51,14 @@ DEFINE_OLD_POOL_GENERIC(Group, Group)
Group::Group(PlayerID owner)
{
this->owner = owner;
this->num_engines = CallocT<uint16>(GetEnginePoolSize());
}
Group::~Group()
{
free(this->name);
this->owner = INVALID_PLAYER;
free(this->num_engines);
}
bool Group::IsValid() const