ScummVM API documentation
Ultima::Ultima8::MusicProcess Class Referenceabstract
Inheritance diagram for Ultima::Ultima8::MusicProcess:
Ultima::Ultima8::Process Ultima::Ultima8::CruMusicProcess Ultima::Ultima8::U8MusicProcess

Public Member Functions

virtual void playMusic (int track)=0
 Play some background music. Does not change the current track if combat music is active. If another track is currently queued, just queues this track for play.
 
virtual void playCombatMusic (int track)=0
 Play some combat music - the last played track will be remembered.
 
virtual void queueMusic (int track)=0
 Queue a track to start once the current one finishes.
 
virtual void unqueueMusic ()=0
 Clear any queued track (does not affect currently playing track)
 
virtual void restoreMusic ()=0
 Restore the last requested non-combat track (eg, at the end of combat)
 
virtual void fadeMusic (uint16 length)=0
 Fades out the music over the specified time (in milliseconds)
 
virtual bool isFading ()=0
 Returns true if the music is currently fading.
 
virtual void saveTrackState ()=0
 Save the current track state - used when the menu is opened.
 
virtual void restoreTrackState ()=0
 Bring back the track state from before it was put on hold.
 
virtual bool isPlaying ()=0
 Is a track currently playing?
 
virtual void pauseMusic ()=0
 Pause the currently playing track.
 
virtual void unpauseMusic ()=0
 Resume the current track after pausing.
 
 INTRINSIC (I_playMusic)
 
 INTRINSIC (I_stopMusic)
 
 INTRINSIC (I_pauseMusic)
 
 INTRINSIC (I_unpauseMusic)
 
- Public Member Functions inherited from Ultima::Ultima8::Process
virtual void run ()=0
 
 Process (ObjId _itemNum=0, uint16 type=0)
 
uint32 getProcessFlags () const
 
bool is_active () const
 
bool is_terminated () const
 
bool is_suspended () const
 
void fail ()
 terminate the process and recursively fail all processes waiting for it
 
virtual void terminate ()
 terminate the process. This wakes up all processes waiting for it.
 
void terminateDeferred ()
 terminate next frame
 
void setRunPaused ()
 run even when paused
 
void waitFor (ProcId pid)
 suspend until process 'pid' returns. If pid is 0, suspend indefinitely
 
void waitFor (Process *proc)
 suspend until process returns. If proc is 0, suspend indefinitely
 
void suspend ()
 suspend process
 
void wakeUp (uint32 result)
 Wake up when the process we were waiting for has finished.
 
virtual void onWakeUp ()
 A hook to add aditional behavior on wakeup, before anything else happens.
 
void setItemNum (ObjId it)
 
void setType (uint16 ty)
 
void setTicksPerRun (uint32 val)
 
ProcId getPid () const
 
ObjId getItemNum () const
 
uint16 getType () const
 
uint32 getTicksPerRun () const
 
virtual Common::String dumpInfo () const
 dump some info about this process to a string
 
bool loadData (Common::ReadStream *rs, uint32 version)
 load Process data
 
virtual void saveData (Common::WriteStream *ws)
 save Process data
 
bool validateWaiters () const
 

Static Public Member Functions

static MusicProcessget_instance ()
 Get the current instance of the Music Processes.
 

Protected Member Functions

virtual void playMusic_internal (int track)=0
 

Static Protected Attributes

static MusicProcess_theMusicProcess
 

Additional Inherited Members

- Public Types inherited from Ultima::Ultima8::Process
enum  processflags {
  PROC_ACTIVE = 0x0001, PROC_SUSPENDED = 0x0002, PROC_TERMINATED = 0x0004, PROC_TERM_DEFERRED = 0x0008,
  PROC_FAILED = 0x0010, PROC_RUNPAUSED = 0x0020, PROC_TERM_DISPOSE = 0x0040, PROC_PREVENT_SAVE = 0x0080
}
 
- Protected Attributes inherited from Ultima::Ultima8::Process
ProcId _pid
 process id
 
uint32 _flags
 
uint32 _ticksPerRun
 
ObjId _itemNum
 item we are assigned to
 
uint16 _type
 
uint32 _result
 process result
 
Std::vector< ProcId > _waiting
 

Member Function Documentation

◆ playMusic_internal()

virtual void Ultima::Ultima8::MusicProcess::playMusic_internal ( int  track)
protectedpure virtual

Play a music track

Parameters
trackThe track number to play. Pass 0 to stop music

Implemented in Ultima::Ultima8::CruMusicProcess.


The documentation for this class was generated from the following file: