ScummVM API documentation
Ultima::Ultima8::SpriteProcess Class Reference

Creates a Sprite. Animates it. Destroys it. More...

#include <sprite_process.h>

Inheritance diagram for Ultima::Ultima8::SpriteProcess:
Ultima::Ultima8::Process

Public Member Functions

 SpriteProcess (int shape, int frame, int last_frame, int repeats, int delay, int x, int y, int z, bool delayed_init=false)
 
 ~SpriteProcess (void) override
 The SpriteProcess destructor.
 
void move (int x, int y, int z)
 Move the sprite to a new location.
 
void run () override
 The SpriteProcess run function.
 
 INTRINSIC (I_createSprite)
 
bool loadData (Common::ReadStream *rs, uint32 version)
 
void saveData (Common::WriteStream *ws) override
 save Process data
 
- Public Member Functions inherited from Ultima::Ultima8::Process
 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
 
bool validateWaiters () const
 

Protected Member Functions

void init ()
 

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
 

Detailed Description

Creates a Sprite. Animates it. Destroys it.

Constructor & Destructor Documentation

◆ SpriteProcess()

Ultima::Ultima8::SpriteProcess::SpriteProcess ( int  shape,
int  frame,
int  last_frame,
int  repeats,
int  delay,
int  x,
int  y,
int  z,
bool  delayed_init = false 
)

SpriteProcess Constructor

Parameters
shapeThe shape to use
frameThe initial/first frame of the sprite animation
last_frameThe last frame of the sprite animation
repeatsThe number of times to play the sprite animation
delayThe number of runs to wait before incrementing the frame
xX coord of the sprite in the world
yY coord of the sprite in the world
zZ coord of the sprite in the world
delayed_initif true, wait with initialization until first run

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