A sequence of QwSpritePixmap to have multiple frames for animation. More...
#include <QwSpriteField.h>
This allows sprite objects to have multiple frames for animation.
QwSpritePixmaps for sprite objects are collected into QwSpritePixmapSequences, which are the set of images a sprite will use, indexed by the sprite's frame. This allows sprites to simply have animated forms.
Construct a QwSpritePixmapSequence from QPixmaps.
Construct a QwSpritePixmapSequence from files.
The framecount parameter sets the number of frames to be loaded for this image. The filenames should be printf-style strings such as "foo%03d.ppm" or "animdir/%4d.pbm". The actual filenames are formed by sprintf-ing a string with each integer from 0 to framecount-1, eg. foo000.ppm, foo001.ppm, foo002.ppm, etc.
Destructs the pixmap sequence.
Returns the length of the sequence.
Returns the i-th pixmap in the sequence.
Constructor failure check. Currently not implemented. Exceptions would be a better solution.
When testing sprite collision detection with QwSpriteField::exact(Pix), the default is to use the image mask of the sprite. By using readCollisionMasks(const char*), an alternate mask can be used. Also, by using QwVirtualSprite::setPixelCollisionPrecision(int), the resolution of the collision mask can be different to the resolution of the pixel coordinates of the sprites.
The filename is a printf-style string, as per the constructor for QwSpritePixmapSequence.
The image must be a PBM file, with a HOTSPOT comment as described in QwSpritePixmap::QwSpritePixmap(const char*, const char*).
See also: QwVirtualSprite::setPixelCollisionPrecision(int).
Deletes the i-th pixmap and replaces it by p. Note that p becomes owned by the sequence - it will be deleted later.
This file is copyright © 1995-97 Warwick Allison.
It was generated from the following files: