Changeset - r3720:46ea3bac69e0
[Not reviewed]
master
0 2 0
peter1138 - 18 years ago 2006-05-02 18:56:07
peter1138@openttd.org
(svn r4691) - Codechange: don't use unnamed unions as GCC 2.95.ancient won't compile it. Needed for our MorphOS user ;)
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
newgrf_engine.c
Show inline comments
 
@@ -400,13 +400,13 @@ 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;
 
}
 

	
 

	
 
static uint32 VehicleGetRandomBits(const ResolverObject *object)
 
{
 
	return GRV(object) == NULL ? 0 : GRV(object)->random_bits;
 
@@ -623,13 +623,13 @@ static uint32 VehicleGetVariable(const R
 
	return -1;
 
}
 

	
 

	
 
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;
 

	
 
	if (v == NULL) {
 
		*in_motion = false;
 
		return 0;
 
@@ -660,14 +660,14 @@ static inline void NewVehicleResolver(Re
 
	res->GetRandomBits = &VehicleGetRandomBits;
 
	res->GetTriggers   = &VehicleGetTriggers;
 
	res->SetTriggers   = &VehicleSetTriggers;
 
	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;
 
	res->callback_param2 = 0;
 
	res->last_value      = 0;
 
	res->trigger         = 0;
newgrf_spritegroup.h
Show inline comments
 
@@ -172,13 +172,13 @@ typedef struct ResolverObject {
 
		} vehicle;
 
		struct {
 
			TileIndex tile;
 
			const struct Station *st;
 
			const struct StationSpec *statspec;
 
		} station;
 
	};
 
	} u;
 

	
 
	uint32 (*GetRandomBits)(const struct ResolverObject*);
 
	uint32 (*GetTriggers)(const struct ResolverObject*);
 
	void (*SetTriggers)(const struct ResolverObject*, int);
 
	uint32 (*GetVariable)(const struct ResolverObject*, byte, byte);
 
	uint32 (*ResolveReal)(const struct ResolverObject*, uint, uint, bool*);
0 comments (0 inline, 0 general)