Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::image::sprite_tag Structure
C++
struct sprite_tag {
  S_32 curx, cury;
  S_32 hotx, hoty;
  Image image;
  fixed scalex, scaley;
  float angle;
  S_32 minx, maxx;
  S_32 miny, maxy;
  PSPRITE_METHOD pSpriteMethod;
};
Members 
Description 
S_32 curx; 
Current location of the sprite's origin. Current location of the sprite's origin. 
S_32 cury; 
Current location of the sprite's origin. Current location of the sprite's origin. 
S_32 hotx; 
current x and current y for placement on image. 
S_32 hoty; 
current x and current y for placement on image. 
Image image; 
int of bitmap hotspot... centers cur on hot 
fixed scalex; 
curx,y are kept for moving the sprite independantly 
fixed scaley; 
curx,y are kept for moving the sprite independantly 
float angle; 
radians for now... (used internally, set by blot rotated sprite) should consider keeping the angle of rotation and also should cosider keeping velocity/acceleration but then limits would have to be kept also... so perhaps the game module should keep such silly factors... but then couldn't it also keep curx, cury ? though hotx hoty is the actual origin to rotate this image about, and to draw ON curx 0 cury 0 int orgx, orgy; // rotated origin of bitmap. 
S_32 maxx; 
after being drawn the min(x,y) and max(x,y) are set. 
S_32 minx; 
after being drawn the min(x,y) and max(x,y) are set. 
S_32 maxy; 
after draw, these are the extent of the sprite. 
S_32 miny; 
after draw, these are the extent of the sprite. 
PSPRITE_METHOD pSpriteMethod; 
after draw, these are the extent of the sprite. 

A simple wrapper to add dynamic changing position and orientation to an image. Sprites can be output at any angle.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!