A QwVirtualSprite with a stored position and frame number. More...
#include <QwSpriteField.h>
Inherits QwVirtualSprite.
This is a template class which allows any numerical class to be used as the stored coordinate type of a QwVirtualSprite. Two derived classes, QwSprite and QwRealSprite provide \t integer and \t double instantiations of this class.
Create a QwPositionedSprite The sprite in initially at (0,0) on the current spritefield
(see constructor for QwSpriteField), using the 0th sequence frame.
Note that you must call setSequence(QwSpritePixmapSequence*) before
doing anything else with the sprite.
Create a QwPositionedSprite The sprite in initially at (0,0) on the current spritefield
(see constructor for QwSpriteField), using the 0th sequence frame.
Destruct the sprite.
It is removed from its QwSpriteField in this process.
Returns the X-position, in COORD units rather than the integer pixel
coordinates used by the graphical engine.
Returns the Y-position, in COORD units rather than the integer pixel
coordinates used by the graphical engine.
Returns the index into the QwPositionedSprite See also: moveTo(COORD,COORD,int).
Set the animation frame used for displaying the sprite to
the given index into the QwPositionedSprite See also: moveTo(COORD,COORD,int).
Returns the number of frames in the QwPositionedSprite Move the sprite from its current position by the given amounts.
Move the sprite to the given absolute position.
See also: moveBy(COORD,COORD) and moveTo(COORD,COORD,int).
Set both the position and the frame of the sprite.
Similar to QwVirtualSprite::neighbourhood(int x, int y, QwSpritePixmap*), but
the image is specified by index rather than actual value.
Similar to QwVirtualSprite::neighbourhood(QwSpritePixmap*), but
the image is specified by index rather than actual value.
Same as QwVirtualSprite::neighbourhood(int x, int y).
Returns 2.
See also: QwSpriteFieldGraphic::rtti().
Set the sequence of images used for displaying the sprite. Note that
the sequence should have enough images for the sprites current frame()
to be valid.
Similar to QwVirtualSprite::wouldHit(QwSpriteFieldGraphic&, int x, int y, QwSpritePixmap*),
but the image is specified by index rather than actual value.
Returns the stored horizontal position of the sprite.
Set the horizontal position of the sprite.
See also: moveTo(COORD,COORD).
Returns the stored vertical position of the sprite.
Set the vertical position of the sprite.
See also: moveTo(COORD,COORD).
Returns the stored z of the sprite.
Sets the stored z of the sprite.
This file is
copyright © 1995-97
Warwick Allison.
It was generated from the following files:
QwPositionedSprite::QwPositionedSprite ( QwSpritePixmapSequence * seq )
QwPositionedSprite::~QwPositionedSprite ()
[virtual]
COORD QwPositionedSprite::exact_x () const
COORD QwPositionedSprite::exact_y () const
int QwPositionedSprite::frame () const
void QwPositionedSprite::frame ( int f )
int QwPositionedSprite::frameCount () const
void QwPositionedSprite::moveBy ( COORD dx, COORD dy )
void QwPositionedSprite::moveTo ( COORD nx, COORD ny )
void QwPositionedSprite::moveTo ( COORD nx, COORD ny, int nf )
[virtual]
Pix QwPositionedSprite::neighbourhood ( COORD nx, COORD ny, int nframe ) const
Pix QwPositionedSprite::neighbourhood ( int nframe ) const
Pix QwPositionedSprite::neighbourhood ( int nx, int ny ) const
int QwPositionedSprite::rtti () const
[virtual]
void QwPositionedSprite::setSequence ( QwSpritePixmapSequence * seq )
bool QwPositionedSprite::wouldHit ( QwSpriteFieldGraphic & other, COORD x, COORD y, int frame ) const
int QwPositionedSprite::x () const
[virtual]
void QwPositionedSprite::x ( COORD nx )
int QwPositionedSprite::y () const
[virtual]
void QwPositionedSprite::y ( COORD ny )
int QwPositionedSprite::z () const
[virtual]
void QwPositionedSprite::z ( int a )
Generated at 09:21, 1998/12/09 for Qt version 1.4 by the warwick at Troll Tech