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, int massLevel);

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);

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

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

Sprite groupSpriteByPoint(Group group, double x, double y, int onlyVisible);

void groupDraw(Group group);

int groupOverlap(Group group, Sprite sprite);
int groupCollide(Group group, Sprite sprite);
int groupOverlapGroup(Group a, Group b);
int groupCollideGroup(Group a, Group b);
int groupOverlapBetween(Group group);
int groupCollideBetween(Group group);
void groupResetTouch(Group group);

void groupSetBouncinessEach(Group group, double bounciness);
void groupSetBouncinessThresholdEach(Group group, double bouncinessThreshold);
void groupSetFrictionEach(Group group, double friction);
void groupSetAirFrictionEach(Group group, double friction);
void groupSetMassLevelEach(Group group, int massLevel);

void groupSetVisibleEach(Group group, int visible);
void groupSetFrozenEach(Group group, int frozen);
void groupSetDebugEach(Group group, int debug);
void groupSetWidthEach(Group group, double width);
void groupSetHeightEach(Group group, double height);
void groupSetDepthEach(Group group, double depth);
void groupSetXEach(Group group, double x);
void groupSetYEach(Group group, double y);
void groupSetXYEach(Group group, double x, double y);
void groupSetVelocityXEach(Group group, double x);
void groupSetVelocityYEach(Group group, double y);
void groupSetVelocityEach(Group group, double x, double y);
void groupSetAccelerationXEach(Group group, double x);
void groupSetAccelerationYEach(Group group, double y);
void groupSetAccelerationEach(Group group, double x, double y);
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, Animation animation);
void groupSetNoAnimationEach(Group group);
void groupSetShapeColorEach(Group group, unsigned int colorCode);
void groupSetTintColorEach(Group group, unsigned int colorCode);

void groupSetUserTagEach(Group group, int tag);
void groupSetUserTextEach(Group group, const char *text);
void groupSetUserDataEach(Group group, void *data);
void groupSetDestroyEach(Group group, SpriteCallback destroy);

void groupSetColliderSensitiveDistance(Group group, double distance);
void groupSetColliderEach(Group group, Collider type, double xOffset, double yOffset, double rotationOffset);
void groupSetColliderCircleEach(Group group, double xOffset, double yOffset, double radius);
void groupSetColliderRectangleEach(
	Group group, double xOffset, double yOffset, double rotationOffset,
	double width, double height, double cornersRadius );
void groupSetColliderEachEx(
	Group group, Collider type,
	double xOffset, double yOffset, double rotationOffset,
	double width, double height, double radius);


#endif