Changeset - r13156:3067a72f5e13
[Not reviewed]
master
0 2 0
frosch - 15 years ago 2009-09-30 18:54:33
frosch@openttd.org
(svn r17671) -Codechange: Move ResolverObject::info_view into u.vehicle as it is only needed for them.
2 files changed with 4 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/newgrf_engine.cpp
Show inline comments
 
@@ -724,7 +724,7 @@ static uint32 VehicleGetVariable(const R
 
		case 0x1C: return v->y_pos;
 
		case 0x1D: return GB(v->y_pos, 8, 8);
 
		case 0x1E: return v->z_pos;
 
		case 0x1F: return object->info_view ? DIR_W : v->direction;
 
		case 0x1F: return object->u.vehicle.info_view ? DIR_W : v->direction;
 
		case 0x28: return v->cur_image;
 
		case 0x29: return GB(v->cur_image, 8, 8);
 
		case 0x32: return v->vehstatus;
 
@@ -862,8 +862,7 @@ static inline void NewVehicleResolver(Re
 
	res->u.vehicle.parent = (v != NULL) ? v->First() : v;
 

	
 
	res->u.vehicle.self_type = engine_type;
 

	
 
	res->info_view = false;
 
	res->u.vehicle.info_view = false;
 

	
 
	res->callback        = CBID_NO_CALLBACK;
 
	res->callback_param1 = 0;
 
@@ -945,7 +944,7 @@ SpriteID GetRotorOverrideSprite(EngineID
 

	
 
	NewVehicleResolver(&object, engine, v);
 

	
 
	object.info_view = info_view;
 
	object.u.vehicle.info_view = info_view;
 

	
 
	const SpriteGroup *group = GetWagonOverrideSpriteSet(engine, CT_DEFAULT, engine);
 
	group = SpriteGroup::Resolve(group, &object);
src/newgrf_spritegroup.h
Show inline comments
 
@@ -296,8 +296,6 @@ struct ResolverObject {
 
	uint32 reseed;
 
	VarSpriteGroupScope scope;
 

	
 
	bool info_view; ///< Indicates if the item is being drawn in an info window
 

	
 
	BaseStorageArray *psa; ///< The persistent storage array of this resolved object.
 

	
 
	const GRFFile *grffile; ///< GRFFile the resolved SpriteGroup belongs to
 
@@ -307,6 +305,7 @@ struct ResolverObject {
 
			const struct Vehicle *self;
 
			const struct Vehicle *parent;
 
			EngineID self_type;
 
			bool info_view;                ///< Indicates if the item is being drawn in an info window
 
		} vehicle;
 
		struct {
 
			TileIndex tile;
0 comments (0 inline, 0 general)