#include <allegro.h>
#include <string.h>
#include <math.h>
#include "aldumb.h"
#include "standards.h"
#include "rotk2.h"
#include "sounds.h"

//#include "CCharacter.h"

#ifndef crevengescript
#define crevengescript

#include "CObject.h"
#include "CParts.h"
#include "CAnim.h"
#include "CTile.h"
#include "CTileSet.h"
#include "CDialog.h"
#include "CObjectSet.h"
#include "CCinematic.h"
//#include "CMapObjects.h"

#define MAX_COMMANDS    30


class CMapObject;
class CCharacter;
class CCinematic;
//#include "CCharacter.h"
//#include "CMapObject.h"

/*class CMapObject;
class CObject;*/

typedef struct
{
    //the condition that causes this command to execute
    char condition[25];
    //the type of object this command is designed to act on, ie animations, enemies properties, etc
    char acting_on[25];
    //the action that is carried out
    char action[75];         
    
    //misc parameters
    int p1,p2,p3;
    
    bool exist;
    
}ScriptCommand;

class CRevengeScript
{
private:
    ScriptCommand command[MAX_COMMANDS];
    int number_of_commands;
    int num;
    bool paused;

public:
    void init(void);
    bool load_script(char *filename);
    void display_script(BITMAP * backgr);
    
    //checks all commands and does those are nessecary on the passed object
    void check_condition(CMapObject *object, CMapObject *player, CParts *parts, CDialog *dialog, CCinematic *ingameCin);
    
    void check_acting_on(int n, CMapObject *object, CMapObject *player, CParts *parts, CDialog *dialog, CCinematic *ingameCin);

    void do_anim_actions(int n, CMapObject *object);
    //void check_action(int n,CMapObject *object, CCharacter *player);
    

};



#endif
