|
|
3f9996 |
#ifndef HELI_SPRITE_H
|
|
|
3f9996 |
#define HELI_SPRITE_H
|
|
|
3f9996 |
|
|
|
3f9996 |
|
|
|
3f9996 |
#include "common.h"
|
|
|
dba3fc |
#include "animation.h"
|
|
|
dba3fc |
|
|
|
3f9996 |
|
|
|
3f9996 |
typedef struct _Sprite *Sprite;
|
|
|
44355f |
typedef void (*SpriteCallback)(Sprite sprite);
|
|
|
3f9996 |
|
|
|
3f9996 |
|
|
|
3f9996 |
typedef enum _Collider {
|
|
|
3f9996 |
COLLIDER_RECTANGLE,
|
|
|
3f9996 |
COLLIDER_CIRCLE
|
|
|
3f9996 |
} Collider;
|
|
|
3f9996 |
|
|
|
8935bc |
|
|
|
3f9996 |
Sprite createSprite(double x, double y);
|
|
|
3f9996 |
Sprite createSpriteEx(double x, double y, double width, double height);
|
|
|
3f9996 |
|
|
|
3f9996 |
void spriteDestroy(Sprite sprite);
|
|
|
8535a3 |
void spriteDestroyTimer(Sprite sprite, double lifetime);
|
|
|
3f9996 |
|
|
|
53e18e |
Sprite spriteClone(Sprite sprite);
|
|
|
53e18e |
|
|
|
3f9996 |
double spriteGetX(Sprite sprite);
|
|
|
3f9996 |
void spriteSetX(Sprite sprite, double x);
|
|
|
3f9996 |
double spriteGetY(Sprite sprite);
|
|
|
3f9996 |
void spriteSetY(Sprite sprite, double y);
|
|
|
f80a0a |
void spriteSetXY(Sprite sprite, double x, double y);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetVelocityX(Sprite sprite);
|
|
|
3f9996 |
void spriteSetVelocityX(Sprite sprite, double x);
|
|
|
3f9996 |
double spriteGetVelocityY(Sprite sprite);
|
|
|
3f9996 |
void spriteSetVelocityY(Sprite sprite, double y);
|
|
|
f80a0a |
void spriteSetVelocityXY(Sprite sprite, double x, double y);
|
|
|
f80a0a |
|
|
|
f80a0a |
double spriteGetAccelerationX(Sprite sprite);
|
|
|
f80a0a |
void spriteSetAccelerationX(Sprite sprite, double x);
|
|
|
f80a0a |
double spriteGetAccelerationY(Sprite sprite);
|
|
|
f80a0a |
void spriteSetAccelerationY(Sprite sprite, double y);
|
|
|
f80a0a |
void spriteSetAccelerationXY(Sprite sprite, double x, double y);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetScale(Sprite sprite);
|
|
|
3f9996 |
void spriteSetScale(Sprite sprite, double scale);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetWidth(Sprite sprite);
|
|
|
3f9996 |
void spriteSetWidth(Sprite sprite, double width);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetHeight(Sprite sprite);
|
|
|
3f9996 |
void spriteSetHeight(Sprite sprite, double height);
|
|
|
3f9996 |
|
|
|
3f9996 |
int spriteGetRotateToDirection(Sprite sprite);
|
|
|
3f9996 |
void spriteSetRotateToDirection(Sprite sprite, int rotateToDirection);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetRotation(Sprite sprite);
|
|
|
3f9996 |
void spriteSetRotation(Sprite sprite, double rotation);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetRotationSpeed(Sprite sprite);
|
|
|
3f9996 |
void spriteSetRotationSpeed(Sprite sprite, double rotationSpeed);
|
|
|
3f9996 |
|
|
|
3f9996 |
int spriteGetMirrorX(Sprite sprite);
|
|
|
3f9996 |
void spriteSetMirrorX(Sprite sprite, int mirrorX);
|
|
|
3f9996 |
|
|
|
3f9996 |
int spriteGetMirrorY(Sprite sprite);
|
|
|
3f9996 |
void spriteSetMirrorY(Sprite sprite, int mirrorY);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetDepth(Sprite sprite);
|
|
|
3f9996 |
void spriteSetDepth(Sprite sprite, double depth);
|
|
|
3f9996 |
|
|
|
8535a3 |
int spriteGetVisible(Sprite sprite);
|
|
|
8535a3 |
void spriteSetVisible(Sprite sprite, int visible);
|
|
|
3f9996 |
|
|
|
6eadb0 |
int spriteGetFrozen(Sprite sprite);
|
|
|
6eadb0 |
void spriteSetFrozen(Sprite sprite, int frozen);
|
|
|
6eadb0 |
|
|
|
3f9996 |
int spriteGetDebug(Sprite sprite);
|
|
|
3f9996 |
void spriteSetDebug(Sprite sprite, int debug);
|
|
|
3f9996 |
|
|
|
f80a0a |
int spriteOverlap(Sprite a, Sprite b);
|
|
|
f80a0a |
int spriteCollide(Sprite a, Sprite b);
|
|
|
53e18e |
int spriteIsPointInside(Sprite sprite, double x, double y);
|
|
|
53e18e |
|
|
|
f80a0a |
double spriteGetTouchWeight(Sprite sprite);
|
|
|
f80a0a |
double spriteGetTouchWeightX(Sprite sprite);
|
|
|
f80a0a |
double spriteGetTouchWeightY(Sprite sprite);
|
|
|
f80a0a |
double spriteGetTouchFriction(Sprite sprite);
|
|
|
f80a0a |
void spriteResetTouch(Sprite sprite);
|
|
|
f80a0a |
|
|
|
3f9996 |
double spriteGetBounciness(Sprite sprite);
|
|
|
3f9996 |
void spriteSetBounciness(Sprite sprite, double bounciness);
|
|
|
44355f |
double spriteGetBouncinessThreshold(Sprite sprite);
|
|
|
44355f |
void spriteSetBouncinessThreshold(Sprite sprite, double bouncinessThreshold);
|
|
|
44355f |
|
|
|
f80a0a |
double spriteGetFriction(Sprite sprite);
|
|
|
f80a0a |
void spriteSetFriction(Sprite sprite, double friction);
|
|
|
f80a0a |
double spriteGetAirFriction(Sprite sprite);
|
|
|
f80a0a |
void spriteSetAirFriction(Sprite sprite, double friction);
|
|
|
f80a0a |
|
|
|
f80a0a |
int spriteGetMassLevel(Sprite sprite);
|
|
|
f80a0a |
void spriteSetMassLevel(Sprite sprite, int massLevel);
|
|
|
44355f |
|
|
|
f80a0a |
double spriteGetColliderSensitiveDistance(Sprite sprite);
|
|
|
f80a0a |
void spriteSetColliderSensitiveDistance(Sprite sprite, double distance);
|
|
|
3f9996 |
|
|
|
f8c1ea |
void spriteSetCollider(Sprite sprite, Collider type, double xOffset, double yOffset, double rotationOffset);
|
|
|
f8c1ea |
void spriteSetColliderCircle(Sprite sprite, double xOffset, double yOffset, double radius);
|
|
|
f8c1ea |
void spriteSetColliderRectangle(
|
|
|
f8c1ea |
Sprite sprite, double xOffset, double yOffset, double rotationOffset,
|
|
|
f8c1ea |
double width, double height, double cornersRadius );
|
|
|
f8c1ea |
void spriteSetColliderEx(
|
|
|
f8c1ea |
Sprite sprite, Collider type,
|
|
|
f8c1ea |
double xOffset, double yOffset, double rotationOffset,
|
|
|
f8c1ea |
double width, double height, double radius);
|
|
|
3f9996 |
|
|
|
f8dca4 |
Animation spriteGetAnimation(Sprite sprite);
|
|
|
dba3fc |
void spriteSetAnimation(Sprite sprite, Animation animation);
|
|
|
8935bc |
void spriteSetNoAnimation(Sprite sprite);
|
|
|
dba3fc |
|
|
|
d4e89f |
void spriteSetShapeColor(Sprite sprite, unsigned int colorCode);
|
|
|
d4e89f |
void spriteSetTintColor(Sprite sprite, unsigned int colorCode);
|
|
|
3f9996 |
|
|
|
3f9996 |
void spriteSetSpeedAndDirection(Sprite sprite, double speed, double angle);
|
|
|
3f9996 |
double spriteGetSpeed(Sprite sprite);
|
|
|
3f9996 |
double spriteGetDirection(Sprite sprite);
|
|
|
3f9996 |
void spritePointTo(Sprite sprite, double x, double y);
|
|
|
909bc2 |
void spriteMoveBy(Sprite sprite, double dx, double dy);
|
|
|
909bc2 |
void spriteMoveToDirection(Sprite sprite, double distance, double angle);
|
|
|
3f9996 |
|
|
|
3f9996 |
double spriteGetScaledWidth(Sprite sprite);
|
|
|
3f9996 |
double spriteGetScaledHeight(Sprite sprite);
|
|
|
3f9996 |
|
|
|
44355f |
int spriteGetUserTag(Sprite sprite);
|
|
|
44355f |
void spriteSetUserTag(Sprite sprite, int tag);
|
|
|
44355f |
const char* spriteGetUserText(Sprite sprite);
|
|
|
44355f |
void spriteSetUserText(Sprite sprite, const char *text);
|
|
|
44355f |
void* spriteGetUserData(Sprite sprite);
|
|
|
44355f |
void spriteSetUserData(Sprite sprite, void *data);
|
|
|
44355f |
|
|
|
44355f |
void spriteSetDestroy(Sprite sprite, SpriteCallback destroy);
|
|
|
44355f |
|
|
|
6eadb0 |
void spriteDraw(Sprite sprite);
|
|
|
6eadb0 |
|
|
|
3f9996 |
|
|
|
3f9996 |
#endif
|