-#include "glwindow.h"
-
-/*
- * A trigger that exits whenever it's trigged (used when we change big things
- * such as starting a new tournament, and it's not really worth doing a clean
- * change).
- */
-class ExitTrigger : pqxx::trigger {
-public:
- ExitTrigger(pqxx::connection_base &conn, const PGSTD::string &name)
- : pqxx::trigger(conn, name) {}
- virtual ~ExitTrigger() throw () {}
+#include <tinyptc.h>
+#include "flagtrigger.h"
+#include "widestring.h"
+#include "fetch_current_tournament.h"
+#include "fetch_list_of_active_groups.h"
+#include "fetch_group.h"
+#include "fonts.h"
+#include "groupscreen.h"
+#include "splitscreen.h"
+#include "rotatescreen.h"
+
+Tournament active_tournament;
+std::vector<SkeletonGroup> active_groups;
+std::vector<GenericScreen *> screens;
+SplitScreen *mainscreen = NULL;
+unsigned char framebuf[800 * 600 * 4], screenbuf[800 * 600 * 4];
+
+void init(pqxx::connection &conn)
+{
+ for (std::vector<GenericScreen *>::const_iterator i = screens.begin(); i != screens.end(); ++i) {
+ delete *i;
+ }
+ screens.erase(screens.begin(), screens.end());
+
+ delete mainscreen;