Isle
|
[AI] Playlist structure representing an indexed list of object IDs with next-item selection strategies (loop, once, random etc). More...
#include <legostate.h>
Public Types | |
enum | Mode { e_loop , e_once , e_random , e_loopSkipFirst } |
[AI] Playback/select mode for playlist sequencing [AI] More... | |
Public Member Functions | |
Playlist () | |
[AI] Initializes playlist with no object IDs and default mode (loop). More... | |
Playlist (MxU32 *p_objectIds, MxS16 p_length, MxS16 p_mode) | |
[AI] Initialize a Playlist using specific object IDs, length, and mode. More... | |
Playlist & | operator= (const Playlist &p_playlist) |
[AI] Assignment operator to copy playlist state (pointers and counters only; does not deep-copy IDs array). More... | |
MxU32 | Next () |
[AI] Retrieves the object ID at the current position, advances next index according to playlist mode. More... | |
MxBool | Contains (MxU32 p_objectId) |
[AI] Checks if playlist contains an object ID. More... | |
Public Attributes | |
MxU32 * | m_objectIds |
[AI] Pointer to array of object IDs. Not owned; just used for lookup. [AI] More... | |
MxS16 | m_length |
[AI] Number of IDs in the playlist. [AI] More... | |
MxS16 | m_mode |
[AI] Selection/iteration mode (as in Mode). [AI] More... | |
MxS16 | m_nextIndex |
[AI] Current index for next selection (suitable for sequential/random access). [AI] More... | |
[AI] Playlist structure representing an indexed list of object IDs with next-item selection strategies (loop, once, random etc).
[AI]
This is used for e.g. playing sounds, animations or other events in sequence or randomly. [AI]
Definition at line 36 of file legostate.h.
[AI] Playback/select mode for playlist sequencing [AI]
Definition at line 40 of file legostate.h.
|
inline |
[AI] Initializes playlist with no object IDs and default mode (loop).
[AI]
Definition at line 52 of file legostate.h.
[AI] Initialize a Playlist using specific object IDs, length, and mode.
p_objectIds | Pointer to array of object IDs for playlist [AI] |
p_length | Total number of object IDs [AI] |
p_mode | Playlist's sequencing mode, as per Mode enum [AI] |
Definition at line 67 of file legostate.h.
[AI] Checks if playlist contains an object ID.
[AI]
p_objectId | The object ID to look for [AI] |
[AI] Linear search through current range. [AI]
Definition at line 51 of file legostate.cpp.
MxU32 LegoState::Playlist::Next | ( | ) |
[AI] Retrieves the object ID at the current position, advances next index according to playlist mode.
[AI]
[AI] e_loop: cycles round, e_once: stops incrementing, e_random: picks randomly, e_loopSkipFirst: starts from 1 after first loop. [AI]
Definition at line 10 of file legostate.cpp.
[AI] Assignment operator to copy playlist state (pointers and counters only; does not deep-copy IDs array).
[AI]
p_playlist | Source playlist to copy from [AI] |
[AI] Copies the pointer to object ID array, length, next index, and mode. [AI]
Definition at line 83 of file legostate.h.
MxS16 LegoState::Playlist::m_length |
[AI] Number of IDs in the playlist. [AI]
Definition at line 108 of file legostate.h.
MxS16 LegoState::Playlist::m_mode |
[AI] Selection/iteration mode (as in Mode). [AI]
Definition at line 109 of file legostate.h.
MxS16 LegoState::Playlist::m_nextIndex |
[AI] Current index for next selection (suitable for sequential/random access). [AI]
Definition at line 110 of file legostate.h.
MxU32* LegoState::Playlist::m_objectIds |
[AI] Pointer to array of object IDs. Not owned; just used for lookup. [AI]
Definition at line 107 of file legostate.h.