#ifndef VDENGINE_H
#define VDENGINE_H



/* **********************************************************************************************************************
   Included Header Files
   **********************************************************************************************************************/

#include "VDMapEditor.h"
#include "VDNPCEditor.h"
#include "VDDirect3D.h"
#include "VDInput.h"
#include "VDWorld.h"
#include "VDEntity.h"
#include "VDNPC.h"
#include "Resource.h"
#include "VDDialogue.h"


/* **********************************************************************************************************************
   Global Constants
   **********************************************************************************************************************/

#define VD_ENGINE_CLASS_NAME "VDEngine"
#define VD_MAP_EDITOR_CLASS_NAME "VDMapEditor"
#define VD_NPC_EDITOR_CLASS_NAME "VDNPCEditor"




/* **********************************************************************************************************************
   VDMapMaker
   **********************************************************************************************************************/

class VDEngine {
public:
    VDEngine();
    virtual ~VDEngine();

    void Run(HINSTANCE instance);
    void RegisterWindows(HINSTANCE instance);
    void ProcessMenu(HINSTANCE instance, MSG message);
    void OpenMap();
    void ClearMap();
    void SaveMap();
    void ProcessWorldEditing();
    void VDOpenFile(HWND window, LPSTR filter, LPSTR fileName);
    void VDSaveFile(HWND window, LPSTR filter, LPSTR fileName);
    void LoadNPCs();
    void CreateTileTexture();  // TODO - should this be in VDMapEditor?

           VDNPC GetNPC(LPCSTR name);
private:
             BOOL vdEngineRunning;
     VDMapEditor* mapEditor;
     VDNPCEditor* npcEditor;
      VDDirect3D* graphics;
         VDInput* input;
         VDWorld* world;
        VDEntity* user;
        VDEntity* worldOffset;
    vector<VDNPC> npcs;
              int width, height;
            POINT actualMousePosition;
};



#endif  // VDENGINE_H