Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Games

Classes

class  KODI::GAME::CGameClientCheevos
 
class  KODI::GAME::CGameClientDiscs
 Subsystem for the Disc Control Interface. More...
 
class  KODI::GAME::CGameClientDiscTransport
 
class  KODI::GAME::CGameClientStruct
 Helper class to have "C" struct created before other parts becomes his pointer. More...
 
class  KODI::GAME::CGameClient
 Interface between Kodi and Game add-ons. More...
 
class  KODI::GAME::IGameInputCallback
 Input callbacks. More...
 
class  KODI::GAME::CGameClientInGameSaves
 This class implements in-game saves. More...
 
class  KODI::GAME::CGameClientProperties
 C++ wrapper for properties to pass to the DLL. More...
 
class  KODI::GAME::CGameClientSubsystem
 Base class for game client subsystems. More...
 
class  KODI::GAME::CGameClientTranslator
 Translates data types from Game API to the corresponding format in Kodi. More...
 
class  KODI::GAME::CGameClientController
 A container for the layout of a controller connected to a game client input port. More...
 
class  KODI::GAME::CGameClientDevice
 Represents a device connected to a port. More...
 
class  KODI::GAME::CGameClientHardware
 Handles events for hardware such as reset buttons. More...
 
class  KODI::GAME::CGameClientInput
 
class  KODI::GAME::CGameClientJoystick
 Handles game controller events for games. More...
 
class  KODI::GAME::CGameClientKeyboard
 Handles keyboard events for games. More...
 
class  KODI::GAME::CGameClientMouse
 Handles mouse events for games. More...
 
class  KODI::GAME::CGameClientPort
 Represents a port that devices can connect to. More...
 
class  KODI::GAME::CGameClientTopology
 
class  KODI::GAME::CGameClientStreamAudio
 
class  KODI::GAME::CGameClientStreams
 
class  KODI::GAME::CGameClientStreamSwFramebuffer
 
class  KODI::GAME::CGameClientStreamVideo
 
class  KODI::GAME::IGameClientStream
 
class  KODI::GAME::CAgentController
 Class to represent the controller of a game player (a.k.a. agent) More...
 
class  KODI::GAME::CAgentInput
 Class to manage game-playing agents for a running game client. More...
 
class  KODI::GAME::CAgentJoystick
 Handles game controller events for game agent functionality. More...
 
class  KODI::GAME::CAgentKeyboard
 Handles keyboard events for game agent functionality. More...
 
class  KODI::GAME::CAgentMouse
 Handles mouse events for game agent functionality. More...
 
class  KODI::GAME::CGUIAgentControllerList
 
class  KODI::GAME::CGUIAgentWindow
 
class  KODI::GAME::IAgentControllerList
 A list populated by the controllers of game-playing agents (CGameAgent) More...
 
class  KODI::GAME::CController
 
class  KODI::GAME::CControllerLayout
 
class  KODI::GAME::CControllerManager
 
class  KODI::GAME::CControllerTranslator
 
class  KODI::GAME::CControllerInstaller
 
class  KODI::GAME::CControllerSelect
 
class  KODI::GAME::CGUIDialogAxisDetection
 
class  KODI::GAME::CGUIDialogButtonCapture
 
class  KODI::GAME::CGUIDialogIgnoreInput
 
class  KODI::GAME::CGUICardinalFeatureButton
 
class  KODI::GAME::CGUIControllerButton
 
class  KODI::GAME::CGUIFeatureButton
 
class  KODI::GAME::CGUIFeatureGroupTitle
 
class  KODI::GAME::CGUIFeatureSeparator
 
class  KODI::GAME::CGUIFeatureFactory
 
class  KODI::GAME::CGUIFeatureTranslator
 
class  KODI::GAME::CGUIGameController
 
class  KODI::GAME::CGUIGameControllerList
 
class  KODI::GAME::CGUIScalarFeatureButton
 
class  KODI::GAME::CGUISelectKeyButton
 
class  KODI::GAME::CGUIThrottleButton
 
class  KODI::GAME::CGUIWheelButton
 
class  KODI::GAME::CControllerActivity
 Class to hold state about the current activity of a controller. More...
 
class  KODI::GAME::CControllerState
 Stores the input state of a controller. More...
 
class  KODI::GAME::CDefaultButtonMap
 A fallback buttonmap to be used with the default keyboard profile. More...
 
class  KODI::GAME::CDefaultKeyboardTranslator
 
class  KODI::GAME::CDefaultMouseTranslator
 
class  KODI::GAME::CInputSink
 
class  KODI::GAME::CPhysicalFeature
 
class  KODI::GAME::CPhysicalTopology
 Represents the physical topology of controller add-ons. More...
 
class  KODI::GAME::CGUIGameControllerProvider
 Controller list provider for the IAgentList control in the Player Viewer (GameAgents) window. More...
 
struct  KODI::GAME::ControllerVertex
 Vertex in the grid of controllers. More...
 
struct  KODI::GAME::ControllerColumn
 Column of controllers in the grid. More...
 
class  KODI::GAME::CControllerGrid
 Class to encapsulate grid operations. More...
 
class  KODI::GAME::CControllerHub
 A branch in the controller tree. More...
 
class  KODI::GAME::CControllerNode
 Node in the controller tree. More...
 
class  KODI::GAME::CGUIConfigurationWizard
 
class  KODI::GAME::CGUIControllerList
 
class  KODI::GAME::CGUIControllerWindow
 
class  KODI::GAME::CGUIFeatureList
 
class  KODI::GAME::IControllerList
 A list populated by installed controllers for the controller configuration window. More...
 
class  KODI::GAME::IFeatureList
 A list populated by the controller's features. More...
 
class  KODI::GAME::IFeatureButton
 A GUI button in a feature list (IFeatureList) More...
 
class  KODI::GAME::IConfigurationWizard
 A wizard to direct user input. More...
 
class  KODI::GAME::CGameClientTable
 The gameclient table, which remembers which emulator to open a game with. More...
 
class  KODI::GAME::CGameDatabase
 The database of everything Kodi remembers about games. More...
 
class  KODI::GAME::CDialogGameDiscManager
 Dialog for managing multi-disc game media during gameplay. More...
 
class  KODI::GAME::CDiscManagerActions
 
class  KODI::GAME::CDiscManagerButtons
 
class  KODI::GAME::CDiscManagerDiscList
 
class  KODI::GAME::CDiscManagerGame
 
class  KODI::GAME::CDiscManagerMenu
 
class  KODI::GAME::CGUIDialogSelectGameClient
 
class  KODI::GAME::CGUIDialogSelectSavestate
 
class  KODI::GAME::CDialogGameAchievements
 Lists the achievements of the currently-playing game. More...
 
class  KODI::GAME::CDialogGameAdvancedSettings
 
class  KODI::GAME::CDialogGameIndicators
 The corner indicators shown over a running game. More...
 
class  KODI::GAME::CDialogGameLeaderboardEntries
 The standings of one leaderboard. More...
 
class  KODI::GAME::CDialogGameLeaderboards
 The leaderboards of the game being played. More...
 
class  KODI::GAME::CDialogGameOSD
 
class  KODI::GAME::CDialogGameSaves
 
class  KODI::GAME::CDialogGameStretchMode
 
class  KODI::GAME::CDialogGameVideoFilter
 
class  KODI::GAME::CDialogGameVideoRotation
 
class  KODI::GAME::CDialogGameVideoSelect
 
class  KODI::GAME::CDialogGameVolume
 
class  KODI::GAME::CDialogInGameSaves
 
class  KODI::GAME::CGameServices
 
class  KODI::GAME::CGameSettings
 
class  KODI::GAME::CGameUtils
 Game related utilities. More...
 
class  KODI::GAME::CGUIActivePortList
 
class  KODI::GAME::IActivePortList
 A list populated by input ports on a game console. More...
 
class  KODI::GAME::CPhysicalPort
 
class  KODI::GAME::CPortInput
 
class  KODI::GAME::CPortManager
 
class  KODI::GAME::CPortNode
 Collection of nodes that can be connected to this port. More...
 
class  KODI::GAME::CGUIPortWindow
 
class  KODI::GAME::IPortList
 A list populated by controller ports for the port setup window. More...
 
class  KODI::GAME::CGameInfoTag
 
class  KODI::GAME::CGUIViewStateWindowGames
 
class  KODI::GAME::CGUIWindowGames
 

Typedefs

using KODI::GAME::ControllerPtr = std::shared_ptr<CController>
 Smart pointer to a game controller (CController)
 
using KODI::GAME::ControllerVector = std::vector<ControllerPtr>
 Vector of smart pointers to a game controller (CController)
 
using KODI::GAME::ControllerGrid = std::vector<ControllerColumn>
 Collection of controllers in a grid layout.
 
using KODI::GAME::CControllerTree = CControllerHub
 Collection of ports on a console.
 
using KODI::GAME::GameClientPtr = std::shared_ptr<CGameClient>
 Smart pointer to a game client (CGameClient)
 
using KODI::GAME::GameClientVector = std::vector<GameClientPtr>
 Vector of smart pointers to a game client (CGameClient)
 
using KODI::GAME::GameClientPortPtr = std::unique_ptr<CGameClientPort>
 Smart pointer to an input port for a game client (CGameClientPort)
 
using KODI::GAME::GameClientPortVec = std::vector<GameClientPortPtr>
 Vector of smart pointers to input ports for a game client (CGameClientPort)
 
using KODI::GAME::GameClientDevicePtr = std::unique_ptr<CGameClientDevice>
 Smart pointer to an input device for a game client (CGameClientDevice)
 
using KODI::GAME::GameClientDeviceVec = std::vector<GameClientDevicePtr>
 Vector of smart pointers to input devices for a game client (CGameClientDevice)
 
using KODI::GAME::GameAgentPtr = std::shared_ptr<CGameAgent>
 Smart pointer to a game-playing agent (CGameAgent)
 
using KODI::GAME::GameAgentVec = std::vector<GameAgentPtr>
 Vector of smart pointers to game-playing agents (CGameAgent)
 

Enumerations

enum class  KODI::RETRO::STRETCHMODE {
  KODI::RETRO::STRETCHMODE::Normal , KODI::RETRO::STRETCHMODE::Normal1x1 , KODI::RETRO::STRETCHMODE::Stretch4x3 , KODI::RETRO::STRETCHMODE::Stretch16x9 ,
  KODI::RETRO::STRETCHMODE::Fullscreen , KODI::RETRO::STRETCHMODE::Integer , KODI::RETRO::STRETCHMODE::Integer1x1 , KODI::RETRO::STRETCHMODE::Original ,
  KODI::RETRO::STRETCHMODE::Zoom
}
 Methods for stretching the game to the viewing area. More...
 
enum class  KODI::GAME::PORT_TYPE { KODI::GAME::PORT_TYPE::UNKNOWN , KODI::GAME::PORT_TYPE::KEYBOARD , KODI::GAME::PORT_TYPE::MOUSE , KODI::GAME::PORT_TYPE::CONTROLLER }
 Type of input provided by a hardware or controller port. More...
 
enum class  KODI::GAME::BUTTON_TYPE {
  KODI::GAME::BUTTON_TYPE::UNKNOWN , KODI::GAME::BUTTON_TYPE::BUTTON , KODI::GAME::BUTTON_TYPE::ANALOG_STICK , KODI::GAME::BUTTON_TYPE::RELATIVE_POINTER ,
  KODI::GAME::BUTTON_TYPE::WHEEL , KODI::GAME::BUTTON_TYPE::THROTTLE , KODI::GAME::BUTTON_TYPE::SELECT_KEY
}
 Types of button controls that can populate the feature list. More...
 

Functions

bool KODI::GAME::IsTimeFormat (const std::string &format)
 Turn a raw leaderboard value into something readable.
 
std::string KODI::GAME::FormatRelativeDate (std::time_t submitted, std::time_t now)
 How long ago something was submitted, in words.
 
std::string KODI::GAME::RankMedal (unsigned int rank)
 Which medal a place on a leaderboard earns, if any.
 
void KODI::GAME::SaveLeaderboardEntries (unsigned int leaderboardId, const std::string &account, const std::vector< LeaderboardEntry > &entries)
 Remember a leaderboard's standings between sessions.
 
bool KODI::GAME::LoadLeaderboardEntries (unsigned int leaderboardId, const std::string &account, std::vector< LeaderboardEntry > &entries)
 Read back standings kept from a previous session.
 
void KODI::GAME::ForgetLeaderboardEntries (unsigned int leaderboardId)
 Forget a leaderboard's kept standings.
 
void KODI::GAME::ClearLeaderboardEntries ()
 Forget every leaderboard's kept standings.
 

Variables

constexpr auto KODI::GAME::GAME_CLIENT_RESOURCES_DIRECTORY = "resources"
 Name of the resources directory for game clients.
 
constexpr unsigned int MAX_PORT_COUNT = 12
 The maximum port count, chosen to allow for two Saturn 6 Player Adapters.
 

Detailed Description

Everything about RetroPlayer.

Typedef Documentation

◆ CControllerTree

Collection of ports on a console.

◆ ControllerGrid

Collection of controllers in a grid layout.

◆ ControllerPtr

using KODI::GAME::ControllerPtr = std::shared_ptr<CController>

Smart pointer to a game controller (CController)

◆ ControllerVector

Vector of smart pointers to a game controller (CController)

◆ GameAgentPtr

using KODI::GAME::GameAgentPtr = std::shared_ptr<CGameAgent>

Smart pointer to a game-playing agent (CGameAgent)

◆ GameAgentVec

using KODI::GAME::GameAgentVec = std::vector<GameAgentPtr>

Vector of smart pointers to game-playing agents (CGameAgent)

◆ GameClientDevicePtr

Smart pointer to an input device for a game client (CGameClientDevice)

◆ GameClientDeviceVec

Vector of smart pointers to input devices for a game client (CGameClientDevice)

◆ GameClientPortPtr

Smart pointer to an input port for a game client (CGameClientPort)

◆ GameClientPortVec

Vector of smart pointers to input ports for a game client (CGameClientPort)

◆ GameClientPtr

using KODI::GAME::GameClientPtr = std::shared_ptr<CGameClient>

Smart pointer to a game client (CGameClient)

◆ GameClientVector

Vector of smart pointers to a game client (CGameClient)

Enumeration Type Documentation

◆ BUTTON_TYPE

enum class KODI::GAME::BUTTON_TYPE
strong

Types of button controls that can populate the feature list.

Enumerator
UNKNOWN 
BUTTON 
ANALOG_STICK 
RELATIVE_POINTER 
WHEEL 
THROTTLE 
SELECT_KEY 

◆ PORT_TYPE

enum class KODI::GAME::PORT_TYPE
strong

Type of input provided by a hardware or controller port.

Enumerator
UNKNOWN 
KEYBOARD 
MOUSE 
CONTROLLER 

◆ STRETCHMODE

enum class KODI::RETRO::STRETCHMODE
strong

Methods for stretching the game to the viewing area.

Enumerator
Normal 

Show the game at its normal aspect ratio.

Normal1x1 

Show the game at 1:1 PAR.

Stretch4x3 

Stretch the game to maintain a 4:3 aspect ratio.

Stretch16x9 

Stretch the game to maintain a 16:9 aspect ratio.

Fullscreen 

Stretch the game to fill the viewing area.

Integer 

Stretch the game by multiplying the original vertical size by an integer value while keeping the original PAR.

Integer1x1 

Stretch the game by multiplying the original pixel dimensions by an integer value at 1:1 PAR.

Original 

Show the game at its original size (humorous for old consoles on 4K TVs)

Zoom 

Show the game at its normal aspect ratio but zoom to fill the viewing area.

Function Documentation

◆ ClearLeaderboardEntries()

void KODI::GAME::ClearLeaderboardEntries ( )

Forget every leaderboard's kept standings.

Offered to the player because the kept copies are the only thing between them and a fresh answer, and a table that has been beaten in the last few minutes is otherwise a week away from being asked for again.

◆ ForgetLeaderboardEntries()

void KODI::GAME::ForgetLeaderboardEntries ( unsigned int leaderboardId)

Forget a leaderboard's kept standings.

Called when the player's own standing on it changes. The kept page was fetched before they submitted, so it is wrong rather than merely old, and leaving it would show them a table they are no longer in the right place in until it aged out a week later.

◆ FormatRelativeDate()

std::string KODI::GAME::FormatRelativeDate ( std::time_t submitted,
std::time_t now )

How long ago something was submitted, in words.

A leaderboard is read down a column, and "3 months ago" is taken in at a glance where a date has to be worked out against today's. The exact date is still published alongside for anyone who wants it.

Parameters
submittedWhen it was submitted, as a unix timestamp
nowThe current time, passed in so the result can be tested
Returns
The age in words, or an empty string if the timestamp is unusable

◆ IsTimeFormat()

bool KODI::GAME::IsTimeFormat ( const std::string & format)

Turn a raw leaderboard value into something readable.

RetroAchievements sends scores as plain integers and says separately how to read them: 9000 is nine thousand points on one leaderboard and two and a half minutes on another. Both leaderboard dialogs need this.

Follows rcheevos, which is what formats the same game's live tracker inside the add-on. The two would otherwise write one leaderboard's values two ways.

Parameters
scoreThe value as sent
formatThe leaderboard's format, as the server names it. Anything unrecognised is shown as a plain number, since a wrong unit reads worse than none.

Whether a leaderboard measures a duration rather than a quantity

Every format FormatLeaderboardScore() reads as a time is named here, so that what a value looks like and what the board is called cannot disagree.

◆ LoadLeaderboardEntries()

bool KODI::GAME::LoadLeaderboardEntries ( unsigned int leaderboardId,
const std::string & account,
std::vector< LeaderboardEntry > & entries )

Read back standings kept from a previous session.

Parameters
leaderboardIdThe leaderboard
accountThe RetroAchievements account the standings were read for
[out]entriesFilled in if anything was kept and it is still fresh
Returns
False if nothing was kept, or what was kept has gone stale

◆ RankMedal()

std::string KODI::GAME::RankMedal ( unsigned int rank)

Which medal a place on a leaderboard earns, if any.

Returns
"gold", "silver", "bronze", or an empty string below third. Given to the skin as a property so it can colour the rank however it likes, rather than being drawn here.

◆ SaveLeaderboardEntries()

void KODI::GAME::SaveLeaderboardEntries ( unsigned int leaderboardId,
const std::string & account,
const std::vector< LeaderboardEntry > & entries )

Remember a leaderboard's standings between sessions.

Standings are a request each and change slowly - a table that has stood for months will not have moved because Kodi restarted. Keeping them means reopening a leaderboard already looked at costs nothing, and a game with thirty of them is not thirty requests every time.

Written to userdata rather than a database: there are few of them, they are small, and losing them costs one refetch.

Parameters
leaderboardIdThe leaderboard
accountThe RetroAchievements account the standings were read for
entriesIts standings, as fetched

Variable Documentation

◆ GAME_CLIENT_RESOURCES_DIRECTORY

auto KODI::GAME::GAME_CLIENT_RESOURCES_DIRECTORY = "resources"
constexpr

Name of the resources directory for game clients.

◆ MAX_PORT_COUNT

unsigned int MAX_PORT_COUNT = 12
constexpr

The maximum port count, chosen to allow for two Saturn 6 Player Adapters.