Blob Blame Raw
#ifndef HELI_GROUP_H
#define HELI_GROUP_H


#include "sprite.h"


typedef struct _Group *Group;


Group createGroup();
Group createEdgesGroup();
Group createEdgesGroupEx(double x1, double y1, double x2, double y2, double borderWidth);

void groupDestroy(Group group);
void groupDestroyEx(Group group, int destroySprites);

void groupAdd(Group group, Sprite sprite);
void groupRemove(Group group, Sprite sprite);
void groupClear(Group group);
void groupClearEx(Group group, int destroySprites);
int groupContains(Group group, Sprite sprite);
int groupGetCount(Group group);
Sprite groupGet(Group group, int i);

int groupOverlap(Group group, Sprite sprite);
int groupCollide(Group group, Sprite sprite, double bounciness);
int groupBounceOff(Group group, Sprite sprite, double bounciness);
int groupPush(Group group, Sprite sprite, double bounciness);
int groupCollideEx(Group group, Sprite sprite, int keepVelocityGroup, int keepVelocitySprite, double bounciness);

int groupOverlapGroup(Group a, Group b);
int groupCollideGroup(Group a, Group b, double bounciness);
int groupBounceOffGroup(Group group, Group other, double bounciness);
int groupPushGroup(Group group, Group other, double bounciness);
int groupCollideGroupEx(Group a, Group b, int keepVelocityA, int keepVelocityB, double bounciness);

double groupGetMinDepth(Group group);
double groupGetMaxDepth(Group group);

void groupDestroyEach(Group group);
void groupDestroyTimerEach(Group group, double lifetime);

void groupSetVisibleEach(Group group, int visible);
void groupSetWidthEach(Group group, double width);
void groupSetHeightEach(Group group, double height);
void groupSetDepthEach(Group group, double depth);
void groupSetVelocityXEach(Group group, double x);
void groupSetVelocityYEach(Group group, double y);
void groupSetVelocityEach(Group group, double x, double y);
void groupSetLifetimeEach(Group group, double lifetime);
void groupSetRotateToDirectionEach(Group group, int rotateToDirection);
void groupSetRotationEach(Group group, double rotation);
void groupSetRotationSpeedEach(Group group, double rotationSpeed);
void groupSetScaleEach(Group group, double scale);
void groupSetMirrorXEach(Group group, int mirrorX);
void groupSetMirrorYEach(Group group, int mirrorY);
void groupPointToEach(Group group, double x, double y);
void groupSetSpeedAndDirectionEach(Group group, double speed, double angle);
void groupSetAnimationEach(Group group, const char *path);
void groupSetShapeColorEach(Group group, const char *color);
void groupSetTintColorEach(Group group, const char *color);
void groupSetColliderEach(Group group, Collider type, double xOffset, double yOffset);
void groupSetColliderEachEx(Group group, Collider type, double xOffset, double yOffset,
							double widthOrRadius, double height, double rotationOffset);


#endif