(svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent.

This commit is contained in:
frosch
2018-03-11 13:19:41 +00:00
parent 2a3d0cea50
commit 29dca1be3b
23 changed files with 145 additions and 220 deletions

View File

@@ -21,7 +21,16 @@ struct RailTypeScopeResolver : public ScopeResolver {
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
RailTypeScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context);
/**
* Constructor of the railtype scope resolvers.
* @param ro Surrounding resolver.
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
*/
RailTypeScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context)
: ScopeResolver(ro), tile(tile), context(context)
{
}
/* virtual */ uint32 GetRandomBits() const;
/* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const;