#ifndef __SPRITE_H
#define __SPRITE_H
#include
#include
#include "include\vga256.h"
struct Sprite {
int startXoff, startYoff; /* Offset copying position */
int lenXcopy, lenYcopy; /* Actual dimensions to copy */
char far *displayMem; /* Buffer sprite is modifying */
int X, Y; /* Sprite's current location */
int lastX, lastY; /* Sprite's last location */
int width, height; /* Sprite's dimensions */
int minX, minY; /* Minimum limits */
int maxX, maxY; /* Maximum limits */
int currFrame; /* current frame in animation */
int noOfFrames; /* total number of frames in animation */
char far **frames; /* array of sprite images for animation */
char far *background; /* background stored for dirty rectangle */
int imgDynamic; /* flags if images are static or dynamic */
int visible; /* flags if Sprite is or isn't visible */
int backTransparent; /* opaque or transparent background */
int status; /* Sprite status, varies by game rules */
int animThreshold; /* animation threshold, varies */
int moveThreshold; /* move threshold, varies */
int clock; /* sprite's clock */
void far *otherData; /* Extra data */
};
#ifdef __cplusplus
extern "C" {
#endif
int InitSprite(struct Sprite *thisSpr, int w, int h,
int numFrames, int dynamic, int drtyRect);
void DestroySprite(struct Sprite *thisSpr);
void SpriteShow(struct Sprite *thisSpr);
void SpriteHide(struct Sprite *thisSpr);
void SpriteSetImage(struct Sprite *thisSpr, void far *bitmap, int fraNum);
int SpriteRedimension(struct Sprite *thisSpr, int w, int h, int drtyRect);
int SpriteChangeNumFrames(struct Sprite *thisSpr, int numFrames);
#ifdef __cplusplus
}
#endif
#endif /* __SPRITE_H */
               (
geocities.com/garyneal_71)