summaryrefslogtreecommitdiff
path: root/sprite.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-10-04 20:38:26 +0000
committerpeter1138 <peter1138@openttd.org>2005-10-04 20:38:26 +0000
commitd1591e864d2cc68ef7c1bfaa4d35093e64ae5a24 (patch)
treebcbf57a70d93521f7bd3ab8c7435ae0250cbd8e6 /sprite.h
parent9fabe008a0c3edc750f72e9eb1e9b424455e3028 (diff)
downloadopenttd-d1591e864d2cc68ef7c1bfaa4d35093e64ae5a24.tar.xz
(svn r3015) -NewGRF: Add a new sprite group result type, and support loading of callbacks results within random and "real" groups. (Not fully supported yet.)
Diffstat (limited to 'sprite.h')
-rw-r--r--sprite.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sprite.h b/sprite.h
index 2bacfd734..2e1938cac 100644
--- a/sprite.h
+++ b/sprite.h
@@ -44,9 +44,9 @@ typedef struct RealSpriteGroup {
// of da stuff.
byte loaded_count;
- uint16 loaded[16]; // sprite ids
+ SpriteGroup *loaded[16]; // sprite ids
byte loading_count;
- uint16 loading[16]; // sprite ids
+ SpriteGroup *loading[16]; // sprite ids
} RealSpriteGroup;
/* Shared by deterministic and random groups. */
@@ -114,11 +114,17 @@ typedef struct CallbackResultSpriteGroup {
uint16 result;
} CallbackResultSpriteGroup;
+typedef struct ResultSpriteGroup {
+ uint16 result;
+ byte sprites;
+} ResultSpriteGroup;
+
typedef enum SpriteGroupType {
SGT_REAL,
SGT_DETERMINISTIC,
SGT_RANDOMIZED,
SGT_CALLBACK,
+ SGT_RESULT,
} SpriteGroupType;
struct SpriteGroup {
@@ -129,6 +135,7 @@ struct SpriteGroup {
DeterministicSpriteGroup determ;
RandomizedSpriteGroup random;
CallbackResultSpriteGroup callback;
+ ResultSpriteGroup result;
} g;
};