OpenTTD Source: src/story_base.h File Reference

OpenTTD Source 14.0-RC3

Data Structures | Typedefs | Enumerations | Functions | Variables
story_base.h File Reference
`#include "company_type.h"`
`#include "story_type.h"`
`#include "timer/timer_game_calendar.h"`
`#include "gfx_type.h"`
`#include "vehicle_type.h"`
`#include "core/pool_type.hpp"`

Go to the source code of this file.

## Data Structures
struct | StoryPageButtonData
| Helper to construct packed "id" values for button-type StoryPageElement. More...
struct | StoryPageElement
| Struct about story page elements. More...
struct | StoryPage
| Struct about stories, current and completed. More...

## Typedefs
typedef Pool< StoryPageElement, StoryPageElementID, 64, 64000 > | StoryPageElementPool
typedef Pool< StoryPage, StoryPageID, 64, 64000 > | StoryPagePool

## Enumerations
enum | StoryPageElementType : byte { SPET_TEXT = 0, SPET_LOCATION, SPET_GOAL, SPET_BUTTON_PUSH, SPET_BUTTON_TILE, SPET_BUTTON_VEHICLE, SPET_END, INVALID_SPET = 0xFF }
enum | StoryPageButtonFlags : byte { SPBF_NONE = 0, SPBF_FLOAT_LEFT = 1 << 0, SPBF_FLOAT_RIGHT = 1 << 1 }
| Flags available for buttons.
enum | StoryPageButtonCursor : byte { SPBC_MOUSE, SPBC_ZZZ, SPBC_BUOY, SPBC_QUERY, SPBC_HQ, SPBC_SHIP_DEPOT, SPBC_SIGN, SPBC_TREE, SPBC_BUY_LAND, SPBC_LEVEL_LAND, SPBC_TOWN, SPBC_INDUSTRY, SPBC_ROCKY_AREA, SPBC_DESERT, SPBC_TRANSMITTER, SPBC_AIRPORT, SPBC_DOCK, SPBC_CANAL, SPBC_LOCK, SPBC_RIVER, SPBC_AQUEDUCT, SPBC_BRIDGE, SPBC_RAIL_STATION, SPBC_TUNNEL_RAIL, SPBC_TUNNEL_ELRAIL, SPBC_TUNNEL_MONO, SPBC_TUNNEL_MAGLEV, SPBC_AUTORAIL, SPBC_AUTOELRAIL, SPBC_AUTOMONO, SPBC_AUTOMAGLEV, SPBC_WAYPOINT, SPBC_RAIL_DEPOT, SPBC_ELRAIL_DEPOT, SPBC_MONO_DEPOT, SPBC_MAGLEV_DEPOT, SPBC_CONVERT_RAIL, SPBC_CONVERT_ELRAIL, SPBC_CONVERT_MONO, SPBC_CONVERT_MAGLEV, SPBC_AUTOROAD, SPBC_AUTOTRAM, SPBC_ROAD_DEPOT, SPBC_BUS_STATION, SPBC_TRUCK_STATION, SPBC_ROAD_TUNNEL, SPBC_CLONE_TRAIN, SPBC_CLONE_ROADVEH, SPBC_CLONE_SHIP, SPBC_CLONE_AIRPLANE, SPBC_DEMOLISH, SPBC_LOWERLAND, SPBC_RAISELAND, SPBC_PICKSTATION, SPBC_BUILDSIGNALS, SPBC_END, INVALID_SPBC = 0xFF }
| Mouse cursors usable by story page buttons.

## Functions
bool | IsValidStoryPageButtonCursor (StoryPageButtonCursor cursor)
| Checks if a StoryPageButtonCursor value is valid. More...

## Variables
StoryPageElementPool | _story_page_element_pool
StoryPagePool | _story_page_pool
uint32_t | _story_page_element_next_sort_value
uint32_t | _story_page_next_sort_value

## Detailed Description

StoryPage base class.

Definition in file story_base.h.

## Enumeration Type Documentation

## ◆ StoryPageElementType

enum StoryPageElementType : byte

Enumerator
SPET_TEXT | A text element.
SPET_LOCATION | An element that references a tile along with a one-line text.
SPET_GOAL | An element that references a goal.
SPET_BUTTON_PUSH | A push button that triggers an immediate event.
SPET_BUTTON_TILE | A button that allows the player to select a tile, and triggers an event with the tile.
SPET_BUTTON_VEHICLE | A button that allows the player to select a vehicle, and triggers an event wih the vehicle.

Definition at line 30 of file story_base.h.

## Function Documentation

## ◆ IsValidStoryPageButtonCursor()

bool IsValidStoryPageButtonCursor | ( | StoryPageButtonCursor | cursor | ) |
| inline

Checks if a StoryPageButtonCursor value is valid.

Parameters

  wc | The value to check

Returns
  true if the given value is a valid StoryPageButtonCursor.

Definition at line 116 of file story_base.h.

Referenced by StoryPageButtonData::GetCursor().