diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-02 18:56:07 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-02 18:56:07 +0000 |
commit | 60b3d37dfff376735044eb504fd7a9c5f1ae8037 (patch) | |
tree | 2fcc78592122cf59c8be4ab0da3d69552c9a17d9 | |
parent | f9316c5a6587364900e3148bd2e4b5d118caf08d (diff) | |
download | openttd-60b3d37dfff376735044eb504fd7a9c5f1ae8037.tar.xz |
(svn r4691) - Codechange: don't use unnamed unions as GCC 2.95.ancient won't compile it. Needed for our MorphOS user ;)
-rw-r--r-- | newgrf_engine.c | 8 | ||||
-rw-r--r-- | newgrf_spritegroup.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/newgrf_engine.c b/newgrf_engine.c index f57079fb6..16a2f1289 100644 --- a/newgrf_engine.c +++ b/newgrf_engine.c @@ -403,7 +403,7 @@ enum { /* Vehicle Resolver Functions */ static inline const Vehicle *GRV(const ResolverObject *object) { - return object->scope == VSG_SCOPE_SELF ? object->vehicle.self : object->vehicle.parent; + return object->scope == VSG_SCOPE_SELF ? object->u.vehicle.self : object->u.vehicle.parent; } @@ -626,7 +626,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by static uint32 VehicleResolveReal(const ResolverObject *object, uint num_loaded, uint num_loading, bool *in_motion) { - const Vehicle *v = object->vehicle.self; + const Vehicle *v = object->u.vehicle.self; uint totalsets; uint set; @@ -663,8 +663,8 @@ static inline void NewVehicleResolver(ResolverObject *res, const Vehicle *v) res->GetVariable = &VehicleGetVariable; res->ResolveReal = &VehicleResolveReal; - res->vehicle.self = v; - res->vehicle.parent = (v != NULL && v->type == VEH_Train) ? GetFirstVehicleInChain(v) : v; + res->u.vehicle.self = v; + res->u.vehicle.parent = (v != NULL && v->type == VEH_Train) ? GetFirstVehicleInChain(v) : v; res->callback = 0; res->callback_param1 = 0; diff --git a/newgrf_spritegroup.h b/newgrf_spritegroup.h index 36680f451..4716fcafd 100644 --- a/newgrf_spritegroup.h +++ b/newgrf_spritegroup.h @@ -175,7 +175,7 @@ typedef struct ResolverObject { const struct Station *st; const struct StationSpec *statspec; } station; - }; + } u; uint32 (*GetRandomBits)(const struct ResolverObject*); uint32 (*GetTriggers)(const struct ResolverObject*); |