hyperkaos/Kaos.h

137 lines
2.3 KiB
C
Raw Permalink Normal View History

typedef struct player Player;
typedef struct hyperKaos HyperKaos;
typedef struct kaos
{
void* kType;
void (*run)(struct kaos* self);
void (*destroy)(struct kaos* self);
struct kaos* next;
} Kaos;
typedef struct kaos_Conversation
{
Kaos* core;
int index;
} Conversation;
typedef struct kaos_Choice
{
Kaos* core;
SDL_Surface* question;
SDL_Surface* answ1;
SDL_Surface* answ2;
HyperKaos* path1;
HyperKaos* path2;
} Choice;
typedef struct kaos_Manip
{
Kaos* core;
Player* target;
int xSpd, ySpd;
} Manip;
typedef struct kaos_Look
{
Kaos* core;
Player* target;
char dir;
} Look;
typedef struct kaos_FaceEachother
{
Kaos* core;
Player* p1;
Player* p2;
} FaceEachother;
#ifdef SOUND_ON
typedef struct kaos_PlaySound
{
Kaos* core;
int i;
} PlaySound;
#endif
typedef struct kaos_Teleport
{
Kaos* core;
Player* target;
int x, y;
SDL_Surface* aura;
} Teleport;
typedef struct kaos_Erase
{
Kaos* core;
char type;
int index;
} Erase;
typedef struct kaos_Wait
{
Kaos* core;
char type;
int frames;
} Wait;
typedef struct kaos_Spell_Beam
{
Kaos* core;
SDL_Surface* aura;
} Spell_Beam;
typedef struct kaos_Spell_Flash
{
Kaos* core;
SDL_Surface* aura;
} Spell_Flash;
Kaos* rawKaos();
Kaos* newConversation(char* args);
void runConversation(Kaos* self);
void deleteConversation(Kaos* target);
Kaos* newChoice(char* args);
void runChoice(Kaos* self);
void deleteChoice(Kaos* target);
Kaos* newManip(char* args);
void runManip(Kaos* self);
void deleteManip(Kaos* target);
Kaos* newLook(char* args);
void runLook(Kaos* self);
void deleteLook(Kaos* target);
Kaos* newTeleport(char* args);
void runTeleport(Kaos* self);
void deleteTeleport(Kaos* target);
Kaos* newFaceEachother(char* args);
void runFaceEachother(Kaos* self);
void deleteFaceEachother(Kaos* target);
#ifdef SOUND_ON
Kaos* newPlaySound(char* args);
void runPlaySound(Kaos* self);
void deletePlaySound(Kaos* target);
#endif
Kaos* newErase(char* args);
void runErase(Kaos* self);
void deleteErase(Kaos* target);
Kaos* newWait(char* args);
void runWait(Kaos* self);
void deleteWait(Kaos* target);
Kaos* newSpell_Beam();
void runSpell_Beam(Kaos* self);
void deleteSpell_Beam(Kaos* target);
Kaos* newSpell_Flash();
void runSpell_Flash(Kaos* self);
void deleteSpell_Flash(Kaos* target);