Public Member Functions | Data Fields

# CanalResolverObject Struct Reference

Resolver object for canals. More...

Inheritance diagram for CanalResolverObject:

## Public Member Functions
| CanalResolverObject (CanalFeature feature, TileIndex tile, CallbackID callback=CBID_NO_CALLBACK, uint32 callback_param1=0, uint32 callback_param2=0)
| Canal resolver constructor.
ScopeResolver * | GetScope (VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
| Get a resolver for the scope.
const SpriteGroup * | ResolveReal (const RealSpriteGroup *group) const
| Get the real sprites of the grf.
## Data Fields
CanalScopeResolver | canal_scope

## Detailed Description

Resolver object for canals.

Definition at line 33 of file newgrf_canal.cpp.

## Constructor & Destructor Documentation

CanalResolverObject::CanalResolverObject | ( | CanalFeature | feature,
|  | TileIndex | tile,
|  | CallbackID | callback = `CBID_NO_CALLBACK`,
|  | uint32 | callback_param1 = `0`,
|  | uint32 | callback_param2 = `0` |
| ) |  |  |

Canal resolver constructor.

Parameters:

  | feature | Which canal feature we want.
  | tile | Tile index of canal.
  | callback | Callback ID.
  | callback_param1 | First parameter (var 10) of the callback.
  | callback_param2 | Second parameter (var 18) of the callback.

Definition at line 124 of file newgrf_canal.cpp.

References WaterFeature::group, and ResolverObject::root_spritegroup.

## Member Function Documentation

ScopeResolver* CanalResolverObject::GetScope | ( | VarSpriteGroupScope | scope = `VSG_SCOPE_SELF`,
|  | byte | relative = `0` |
| ) |  |  | `[inline, virtual]`

Get a resolver for the scope.

Parameters:

  | scope | Scope to return.
  | relative | Additional parameter for VSG_SCOPE_RELATIVE.

Returns:
  The resolver for the requested scope.

Reimplemented from ResolverObject.

Definition at line 39 of file newgrf_canal.cpp.

References VSG_SCOPE_SELF.

const SpriteGroup * CanalResolverObject::ResolveReal | ( | const RealSpriteGroup * | group | ) | const`[virtual]`

Get the real sprites of the grf.

Parameters:

  | group | Group to get.

Returns:
  The available sprite group.

Reimplemented from ResolverObject.

Definition at line 104 of file newgrf_canal.cpp.

References RealSpriteGroup::loaded, and RealSpriteGroup::num_loaded.

The documentation for this struct was generated from the following file:

- src/newgrf_canal.cpp