Changeset - r17766:77ea4fd04a5a
[Not reviewed]
master
0 3 0
terkhen - 13 years ago 2011-06-12 20:36:33
terkhen@openttd.org
(svn r22561) -Codechange: Remove constness from Object in ResolverObject.
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/newgrf_object.cpp
Show inline comments
 
@@ -361,7 +361,7 @@ static const SpriteGroup *GetObjectSprit
 
/**
 
 * Returns a resolver object to be used with feature 0F spritegroups.
 
 */
 
static void NewObjectResolver(ResolverObject *res, const ObjectSpec *spec, const Object *o, TileIndex tile, uint8 view = 0)
 
static void NewObjectResolver(ResolverObject *res, const ObjectSpec *spec, Object *o, TileIndex tile, uint8 view = 0)
 
{
 
	res->GetRandomBits = ObjectGetRandomBits;
 
	res->GetTriggers   = ObjectGetTriggers;
 
@@ -395,7 +395,7 @@ static void NewObjectResolver(ResolverOb
 
 * @param view     The view of the object (only used when o == NULL).
 
 * @return The result of the callback.
 
 */
 
uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, const ObjectSpec *spec, const Object *o, TileIndex tile, uint8 view)
 
uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, const ObjectSpec *spec, Object *o, TileIndex tile, uint8 view)
 
{
 
	ResolverObject object;
 
	NewObjectResolver(&object, spec, o, tile, view);
 
@@ -444,7 +444,7 @@ static void DrawTileLayout(const TileInf
 
void DrawNewObjectTile(TileInfo *ti, const ObjectSpec *spec)
 
{
 
	ResolverObject object;
 
	const Object *o = Object::GetByTile(ti->tile);
 
	Object *o = Object::GetByTile(ti->tile);
 
	NewObjectResolver(&object, spec, o, ti->tile);
 

	
 
	const SpriteGroup *group = SpriteGroup::Resolve(GetObjectSpriteGroup(spec, o), &object);
src/newgrf_object.h
Show inline comments
 
@@ -95,7 +95,7 @@ typedef NewGRFClass<ObjectSpec, ObjectCl
 
/** Mapping of purchase for objects. */
 
static const CargoID CT_PURCHASE_OBJECT = 1;
 

	
 
uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, const ObjectSpec *spec, const Object *o, TileIndex tile, uint8 view = 0);
 
uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, const ObjectSpec *spec, Object *o, TileIndex tile, uint8 view = 0);
 

	
 
void DrawNewObjectTile(TileInfo *ti, const ObjectSpec *spec);
 
void DrawNewObjectTileInGUI(int x, int y, const ObjectSpec *spec, uint8 view);
src/newgrf_spritegroup.h
Show inline comments
 
@@ -371,7 +371,7 @@ struct ResolverObject {
 
			TileIndex tile;                ///< Tile for the callback, only valid for airporttile callbacks.
 
		} airport;
 
		struct {
 
			const struct Object *o;        ///< The object the callback is ran for.
 
			struct Object *o;              ///< The object the callback is ran for.
 
			TileIndex tile;                ///< The tile related to the object.
 
			uint8 view;                    ///< The view of the object.
 
		} object;
0 comments (0 inline, 0 general)