hyperkaos/Room.h

104 lines
2.4 KiB
C
Raw Permalink Normal View History

typedef struct hyperKaos HyperKaos;
typedef struct synergy Synergy;
typedef struct obstruction
{
SDL_Rect domain;
int tombStone;
} Obstruction;
Obstruction* newObstruction(int x, int y, int w, int h);
void deleteObstruction(Obstruction* target);
typedef struct fgImage
{
int frames;
int frameNow;
int dualLayer;
int tombStone;
SDL_Rect location;
SDL_Surface* spriteSheet;
} FGImage;
FGImage* newFGImage(int x, int y, int w, int h, int f, int dual, char* filename, int alpha);
void deleteFGImage(FGImage* target);
typedef struct warpZone
{
SDL_Rect location;
enum dataChunks chunk;
int destination;
int x, y;
int tombStone;
} WarpZone;
WarpZone* newWarpZone(int x, int y, int w, int h, enum dataChunks chunk, int dest, int dX, int dY);
void deleteWarpZone(WarpZone* target);
typedef struct room
{
SDL_Surface* spriteSheet;
SDL_Rect clip;
int frameNo;
Obstruction** obstacle;
int numberOfObstacles;
int maxNumberOfObstacles;
FGImage** fgObject;
int numberOfObj;
int maxNumberOfObj;
int objSpeed;
int objIterator;
WarpZone** warps;
int numberOfWarps;
int maxNumberOfWarps;
HyperKaos** eventTriggers;
int numberOfTriggers;
int maxNumberOfTriggers;
Synergy** sigils;
int numberOfSigils;
int maxNumberOfSigils;
Player** people;
int numberOfPeople;
int maxNumberOfPeople;
} Room;
void warpto(Room* destination);
Room* newRoom(char* filename, int a);
void deleteRoom(Room* target);
void animate(Room* self);
int checkCollision(Room* self, Player* player, Obstruction** box);
int checkWCollision(Room* self, Player* player, WarpZone** warpBoxes, int* whichWarp);
int checkKCollision(Room* self, Player* player, HyperKaos** triggers, int* whichTrigger, int* triggerType, int iType);
void addObstacle(Room* self, int x, int y, int w, int h);
void deleteObstacle(Room* self, int i);
void addFgObj(Room* self, int x, int y, int w, int h, char* filename, int f, int dual, int alpha);
void deleteFgObj(Room* self, int i);
void drawFgObjects1(Room* self);
void drawFgObjects2(Room* self);
void addWarp(Room* self, int x, int y, int w, int h, enum dataChunks toChunk, int toRoom, int toX, int toY);
void deleteWarp(Room* self, int i);
void addTrigger(Room* self, HyperKaos* newTrigger);
void deleteTrigger(Room* self, int i);
void addSigil(Room* self, Synergy* newSigil);
void deleteSigil(Room* self, int i);
void addPerson(Room* self, Player* newPlayer);
void deletePerson(Room* self, int i);
void drawPeople(Room* self);