summaryrefslogtreecommitdiff
path: root/sprite.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-20 13:33:40 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-20 13:33:40 +0000
commit9ed8c6d4acea5c41246d3fa54301d4a0cc814985 (patch)
treea4293081de1ea050c6764d3a8961ef11264725aa /sprite.h
parent62145d16b55aaf13451f7c6595d4675ff0499b47 (diff)
downloadopenttd-9ed8c6d4acea5c41246d3fa54301d4a0cc814985.tar.xz
(svn r4483) - NewGRF: Dynamically allocate memory for 'real' spritegroups. This removes the limit of 16 loading/unloading states, although will result in less memory usage as most of the time the full fixed allocation wasn't used.
Diffstat (limited to 'sprite.h')
-rw-r--r--sprite.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/sprite.h b/sprite.h
index 877e3c9e8..cba95de44 100644
--- a/sprite.h
+++ b/sprite.h
@@ -32,8 +32,6 @@ typedef struct DrawTileSprites {
typedef struct SpriteGroup SpriteGroup;
typedef struct RealSpriteGroup {
- // XXX: Would anyone ever need more than 16 spritesets? Maybe we should
- // use even less, now we take whole 8kb for custom sprites table, oh my!
byte sprites_per_set; // means number of directions - 4 or 8
// Loaded = in motion, loading = not moving
@@ -43,10 +41,10 @@ typedef struct RealSpriteGroup {
// with small amount of cargo whilst loading is for stations with a lot
// of da stuff.
- byte loaded_count;
- SpriteGroup *loaded[16]; // sprite ids
- byte loading_count;
- SpriteGroup *loading[16]; // sprite ids
+ byte loaded_count; ///< Number of loaded groups
+ SpriteGroup **loaded; ///< List of loaded groups (can be SpriteIDs or Callback results)
+ byte loading_count; ///< Number of loading groups
+ SpriteGroup **loading; ///< List of loading groups (can be SpriteIDs or Callback results)
} RealSpriteGroup;
/* Shared by deterministic and random groups. */