MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetSetIndex

Method GetSetIndex

src/music_gui.cpp:197–202  ·  view source on GitHub ↗

* Get set index from current playlist position. * @return current set index, or UINT_MAX if nothing is selected. */

Source from the content-addressed store, hash-verified

195 * @return current set index, or UINT_MAX if nothing is selected.
196 */
197uint MusicSystem::GetSetIndex()
198{
199 return static_cast<size_t>(this->playlist_position) < this->active_playlist.size()
200 ? this->active_playlist[this->playlist_position].set_index
201 : UINT_MAX;
202}
203
204/**
205 * Enable shuffle mode.

Callers 2

ShuffleMethod · 0.95
UnshuffleMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected