summaryrefslogtreecommitdiff
path: root/newgrf_spritegroup.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-28 20:04:57 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-28 20:04:57 +0000
commitd23e380d6ae716cac42e5484d9ee92aad36bac24 (patch)
tree882c805b9f0ef4ddf347b28d39d09a7328d9f506 /newgrf_spritegroup.c
parent9415828900d9528475eebf92c0762642f3ad3b7f (diff)
downloadopenttd-d23e380d6ae716cac42e5484d9ee92aad36bac24.tar.xz
(svn r4611) - NewGRF: introduce new vehicle sprite group resolver code. This also fixes some known bugs (e.g. the 'Standard Five' in UKRS is now the correct colour)
Diffstat (limited to 'newgrf_spritegroup.c')
-rw-r--r--newgrf_spritegroup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/newgrf_spritegroup.c b/newgrf_spritegroup.c
index 4f8cf4b22..cac7bbb20 100644
--- a/newgrf_spritegroup.c
+++ b/newgrf_spritegroup.c
@@ -71,7 +71,7 @@ void InitializeSpriteGroupPool(void)
}
-static const SpriteGroup *ResolveReal(const SpriteGroup *group, ResolverObject *object)
+static inline const SpriteGroup *ResolveReal(const SpriteGroup *group, ResolverObject *object)
{
bool in_motion;
uint set;
@@ -84,7 +84,7 @@ static const SpriteGroup *ResolveReal(const SpriteGroup *group, ResolverObject *
}
-static uint32 GetVariable(const ResolverObject *object, byte variable, byte parameter)
+static inline uint32 GetVariable(const ResolverObject *object, byte variable, byte parameter)
{
/* Return common variables */
switch (variable) {
@@ -112,7 +112,7 @@ static uint32 GetVariable(const ResolverObject *object, byte variable, byte para
/* Evaluate an adjustment for a variable of the given size. This is a bit of
* an unwieldy macro, but it saves triplicating the code. */
#define BUILD_EVAL_ADJUST(size, usize) \
-static size EvalAdjust_ ## size(const DeterministicSpriteGroupAdjust *adjust, size last_value, size value) \
+static inline size EvalAdjust_ ## size(const DeterministicSpriteGroupAdjust *adjust, size last_value, size value) \
{ \
value >>= adjust->shift_num; \
value &= adjust->and_mask; \
@@ -150,7 +150,7 @@ BUILD_EVAL_ADJUST(int16, uint16)
BUILD_EVAL_ADJUST(int32, uint32)
-static const SpriteGroup *ResolveVariable(const SpriteGroup *group, ResolverObject *object)
+static inline const SpriteGroup *ResolveVariable(const SpriteGroup *group, ResolverObject *object)
{
static SpriteGroup nvarzero;
const SpriteGroup *target;
@@ -196,7 +196,7 @@ static const SpriteGroup *ResolveVariable(const SpriteGroup *group, ResolverObje
}
-static const SpriteGroup *ResolveRandom(const SpriteGroup *group, ResolverObject *object)
+static inline const SpriteGroup *ResolveRandom(const SpriteGroup *group, ResolverObject *object)
{
byte mask;
byte index;