summaryrefslogtreecommitdiff
path: root/src/newgrf_spritegroup.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
committersmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
commit62a7948af0ca9eb3b190a54918201e1075edcbbc (patch)
tree27a79b7850682cd43cac2462c3410ed8b567c4b2 /src/newgrf_spritegroup.h
parent04723b240ebc7384954f73590be517ad2a47ce04 (diff)
downloadopenttd-62a7948af0ca9eb3b190a54918201e1075edcbbc.tar.xz
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r--src/newgrf_spritegroup.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index 1e745480b..ebaa908ea 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -11,7 +11,7 @@
#include "gfx_type.h"
#include "engine_type.h"
#include "tile_type.h"
-#include "oldpool.h"
+#include "core/pool.hpp"
#include "newgrf_cargo.h"
#include "newgrf_callbacks.h"
@@ -184,10 +184,11 @@ enum SpriteGroupType {
};
typedef uint32 SpriteGroupID;
-DECLARE_OLD_POOL(SpriteGroup, SpriteGroup, 9, 250)
+typedef Pool<SpriteGroup, SpriteGroupID, 512, 64000> SpriteGroupPool;
+extern SpriteGroupPool _spritegroup_pool;
/* Common wrapper for all the different sprite group types */
-struct SpriteGroup : PoolItem<SpriteGroup, SpriteGroupID, &_SpriteGroup_pool> {
+struct SpriteGroup : SpriteGroupPool::PoolItem<&_spritegroup_pool> {
SpriteGroup(SpriteGroupType type = SGT_INVALID) :
type(type)
{
@@ -206,8 +207,6 @@ struct SpriteGroup : PoolItem<SpriteGroup, SpriteGroupID, &_SpriteGroup_pool> {
TileLayoutSpriteGroup layout;
IndustryProductionSpriteGroup indprod;
} g;
-
- inline bool IsValid() const { return this->type != SGT_INVALID; }
};