summaryrefslogtreecommitdiff
path: root/src/graphic/graphic.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 17:49:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 17:49:01 +0000
commit8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1 (patch)
tree800d8d02db775b5f263eaee92c5cbf021d800e9f /src/graphic/graphic.h
parentc92d7c1188febd7c5af15fa710ab06c3af4dede5 (diff)
downloadmana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.gz
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.bz2
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.xz
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.zip
Cleaned up includes, separated engine from graphics and single buffer now
used throughout application, cleaned up shop functions.
Diffstat (limited to 'src/graphic/graphic.h')
-rw-r--r--src/graphic/graphic.h46
1 files changed, 36 insertions, 10 deletions
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h
index 970b09c9..7de6bd3a 100644
--- a/src/graphic/graphic.h
+++ b/src/graphic/graphic.h
@@ -24,12 +24,12 @@
#ifndef _GRAPHIC_H
#define _GRAPHIC_H
-#include "../game.h"
+class Graphics;
+
#include "../map.h"
-#include "../being.h"
-#include "../gui/buy.h"
#include "../gui/npc.h"
#include "../gui/npc_text.h"
+#include "../gui/buy.h"
#include "../gui/sell.h"
#include "../gui/buysell.h"
#include "../gui/chat.h"
@@ -40,14 +40,15 @@
#include "../gui/npc.h"
#include "../gui/status.h"
#include "../gui/stats.h"
+#include "../gui/skill.h"
#include "../resources/resourcemanager.h"
#include "spriteset.h"
#include <allegro.h>
+#include <guichan/allegro.hpp>
#define TILE_SIZE 32
extern BITMAP *buffer;
-extern int page_num;
extern char speech[255];
extern char npc_text[1000];
extern char skill_points[10];
@@ -86,15 +87,40 @@ class BuySellListener : public gcn::ActionListener {
void action(const std::string& eventId);
};
-class GraphicEngine {
+/**
+ * A central point of control for graphics.
+ */
+class Graphics : public gcn::AllegroGraphics {
+ public:
+ /**
+ * Constructor.
+ */
+ Graphics();
+
+ /**
+ * Destructor.
+ */
+ ~Graphics();
+
+ /**
+ * Updates the screen. This is done by either copying the buffer to the
+ * screen or swapping pages.
+ */
+ void updateScreen();
+};
+
+/**
+ * Game engine that does the main drawing.
+ */
+class Engine {
private:
Spriteset *tileset, *emotionset, *npcset, *monsterset;
- BITMAP *buffer;
-
+
public:
- GraphicEngine();
- ~GraphicEngine();
- void refresh();
+ Engine();
+ ~Engine();
+
+ void draw();
};
#endif