2018-09-20 01:27:47 +00:00
|
|
|
typedef struct hyperKaos HyperKaos;
|
2018-10-13 03:35:45 +00:00
|
|
|
typedef struct synergy Synergy;
|
2018-09-20 01:27:47 +00:00
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
typedef struct obstruction
|
|
|
|
{
|
|
|
|
SDL_Rect domain;
|
|
|
|
int tombStone;
|
|
|
|
} Obstruction;
|
|
|
|
|
|
|
|
Obstruction* newObstruction(int x, int y, int w, int h);
|
|
|
|
void deleteObstruction(Obstruction* target);
|
|
|
|
|
2018-09-20 01:27:47 +00:00
|
|
|
typedef struct fgImage
|
|
|
|
{
|
|
|
|
int frames;
|
|
|
|
int frameNow;
|
|
|
|
int dualLayer;
|
2018-12-21 03:14:26 +00:00
|
|
|
int tombStone;
|
2018-09-20 01:27:47 +00:00
|
|
|
|
|
|
|
SDL_Rect location;
|
|
|
|
SDL_Surface* spriteSheet;
|
|
|
|
} FGImage;
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
FGImage* newFGImage(int x, int y, int w, int h, int f, int dual, char* filename, int alpha);
|
|
|
|
void deleteFGImage(FGImage* target);
|
2018-09-20 01:27:47 +00:00
|
|
|
|
|
|
|
typedef struct warpZone
|
|
|
|
{
|
|
|
|
SDL_Rect location;
|
|
|
|
enum dataChunks chunk;
|
|
|
|
int destination;
|
|
|
|
int x, y;
|
2018-12-21 03:14:26 +00:00
|
|
|
int tombStone;
|
2018-09-20 01:27:47 +00:00
|
|
|
} WarpZone;
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
WarpZone* newWarpZone(int x, int y, int w, int h, enum dataChunks chunk, int dest, int dX, int dY);
|
|
|
|
void deleteWarpZone(WarpZone* target);
|
|
|
|
|
2018-09-20 01:27:47 +00:00
|
|
|
typedef struct room
|
|
|
|
{
|
|
|
|
SDL_Surface* spriteSheet;
|
|
|
|
SDL_Surface* bgImage;
|
|
|
|
int frameNo;
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
Obstruction** obstacle;
|
2018-09-20 01:27:47 +00:00
|
|
|
int numberOfObstacles;
|
|
|
|
int maxNumberOfObstacles;
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
FGImage** fgObject;
|
2018-09-20 01:27:47 +00:00
|
|
|
int numberOfObj;
|
|
|
|
int maxNumberOfObj;
|
|
|
|
int objSpeed;
|
|
|
|
int objIterator;
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
WarpZone** warps;
|
2018-09-20 01:27:47 +00:00
|
|
|
int numberOfWarps;
|
|
|
|
int maxNumberOfWarps;
|
|
|
|
|
|
|
|
HyperKaos** eventTriggers;
|
|
|
|
int numberOfTriggers;
|
|
|
|
int maxNumberOfTriggers;
|
|
|
|
|
2018-10-13 03:35:45 +00:00
|
|
|
Synergy** sigils;
|
|
|
|
int numberOfSigils;
|
|
|
|
int maxNumberOfSigils;
|
|
|
|
|
2018-09-20 01:27:47 +00:00
|
|
|
Player** people;
|
|
|
|
int numberOfPeople;
|
|
|
|
int maxNumberOfPeople;
|
|
|
|
|
|
|
|
} Room;
|
|
|
|
|
|
|
|
void warpto(Room* destination);
|
|
|
|
|
|
|
|
Room* newRoom(char* filename, int a);
|
|
|
|
void deleteRoom(Room* target);
|
|
|
|
|
|
|
|
void changeRSprite(Room* self, SDL_Rect* clip);
|
|
|
|
void animate(Room* self);
|
|
|
|
|
2018-12-21 03:14:26 +00:00
|
|
|
int checkCollision(Room* self, Player* player, Obstruction** box);
|
|
|
|
int checkWCollision(Room* self, SDL_Rect* player, WarpZone** warpBoxes, int* whichWarp);
|
2018-09-20 01:27:47 +00:00
|
|
|
int checkKCollision(Room* self, SDL_Rect* player, HyperKaos** triggers, int* whichTrigger, int* triggerType);
|
|
|
|
|
|
|
|
void addObstacle(Room* self, int x, int y, int w, int h);
|
|
|
|
void deleteObstacle(Room* self, int i);
|
|
|
|
|
2018-09-21 19:57:07 +00:00
|
|
|
void addFgObj(Room* self, int x, int y, int w, int h, char* filename, int f, int dual, int alpha);
|
2018-09-20 01:27:47 +00:00
|
|
|
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);
|
|
|
|
|
2018-10-13 03:35:45 +00:00
|
|
|
void addSigil(Room* self, Synergy* newSigil);
|
|
|
|
void deleteSigil(Room* self, int i);
|
|
|
|
|
2018-09-20 01:27:47 +00:00
|
|
|
void addPerson(Room* self, Player* newPlayer);
|
|
|
|
void deletePerson(Room* self, int i);
|
|
|
|
void drawPeople(Room* self);
|