#pragma once class Actor; class Map; class Gui; #include "libtcod.hpp" class Engine { public: enum GameStatus { STARTUP, IDLE, NEW_TURN, VICTORY, DEFEAT, QUIT } gameStatus; int screenWidth; int screenHeight; TCOD_mouse_t mouse; TCODList actors; Actor* player; Map* map; Gui* gui; int fovRadius; tcod::Context *context; tcod::Console* console; Engine(int screenWidth, int screenHeight, tcod::Context *context, tcod::Console *console); void init(); ~Engine(); bool update(); void render(bool present = true); void sendToBack(Actor* actor); Actor* getClosestMonster(int x, int y, float range) const; bool pickATile(int* x, int* y, float maxRange = 0.0f); Actor* getActor(int x, int y) const; void load(); void save(); private: bool computeFov; }; extern Engine *engine;