diff options
author | darkvater <darkvater@openttd.org> | 2004-11-14 20:50:38 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-11-14 20:50:38 +0000 |
commit | ec434b208e6e67f98f7795f1a9d6154df888c6b2 (patch) | |
tree | b22ee0fd86834db94fcab89aec21e066ec29e70e /sprite.h | |
parent | c2193ce1a8f1e9acdada4675222d290fcf6640b7 (diff) | |
download | openttd-ec434b208e6e67f98f7795f1a9d6154df888c6b2.tar.xz |
(svn r610) -newgrf: Support for some basic deterministical spritegroups regarding stations. Waypoints look changes based on year now :^) (pasky).
Diffstat (limited to 'sprite.h')
-rw-r--r-- | sprite.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -76,7 +76,7 @@ struct DeterministicSpriteGroup { // And apply it to this: byte num_ranges; - struct DeterministicSpriteGroupRanges *ranges; // Dynamically allocated + struct DeterministicSpriteGroupRange *ranges; // Dynamically allocated // Dynamically allocated, this is the sole owner struct SpriteGroup *default_group; @@ -95,16 +95,22 @@ struct SpriteGroup { } g; }; -struct DeterministicSpriteGroupRanges { +struct DeterministicSpriteGroupRange { struct SpriteGroup group; - byte range_low; - byte range_high; + byte low; + byte high; }; /* This is a temporary helper for SpriteGroup users not supporting variational * sprite groups yet - it just traverses those cowardly, always taking the * default choice until it hits a real sprite group, returning it. */ static struct RealSpriteGroup *TriviallyGetRSG(struct SpriteGroup *sg); +/* This takes value (probably of the variable specified in the group) and + * chooses corresponding SpriteGroup accordingly to the given + * DeterministicSpriteGroup. */ +struct SpriteGroup *EvalDeterministicSpriteGroup(struct DeterministicSpriteGroup *dsg, int value); +/* Get value of a common deterministic SpriteGroup variable. */ +int GetDeterministicSpriteValue(byte var); |