OpenTTD Source 20260208-master-g43af8e94d0
viewport_cmd.h File Reference

Command definitions related to viewports. More...

#include "command_type.h"
#include "viewport_type.h"

Go to the source code of this file.

Functions

CommandCost CmdScrollViewport (DoCommandFlags flags, TileIndex tile, ViewportScrollTarget target, uint32_t ref)
 Scroll players main viewport.

Detailed Description

Command definitions related to viewports.

Definition in file viewport_cmd.h.

Function Documentation

◆ CmdScrollViewport()

CommandCost CmdScrollViewport ( DoCommandFlags flags,
TileIndex tile,
ViewportScrollTarget target,
uint32_t ref )

Scroll players main viewport.

Parameters
flagstype of operation
tiletile to center viewport on
targetViewportScrollTarget of scroll target
refcompany or client id depending on the target
Returns
the cost of this operation or an error

Definition at line 3620 of file viewport.cpp.

References _current_company, _local_company, _network_own_client_id, CMD_ERROR, Execute, OWNER_DEITY, ResetObjectToPlace(), ScrollMainWindowToTile(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), VST_CLIENT, VST_COMPANY, and VST_EVERYONE.