-#include "app/globals.h"
-#include "tile.h"
-#include "scene.h"
-#include "utils/lispreader.h"
-#include "math/vector.h"
-#include "video/drawing_context.h"
-
-/** Dirty little helper to create a surface from a snipped of lisp:
- *
- * "filename"
- * (region "filename" x y w h)
- */
-static
-Surface* create_surface(lisp_object_t* cur)
-{
- if (lisp_string_p(cur))
- {
- return new Surface(datadir + "/images/tilesets/" + lisp_string(cur),
- true);
- }
- else if (lisp_cons_p(cur) && lisp_symbol_p(lisp_car(cur)))
- {
- lisp_object_t* sym = lisp_car(cur);
- lisp_object_t* data = lisp_cdr(cur);
-
- if (strcmp(lisp_symbol(sym), "region") == 0)
- {
- if (lisp_list_length(data) == 5) // (image-region filename x y w h)
- {
- return new Surface(datadir + "/images/tilesets/" + lisp_string(lisp_car(data)),
- lisp_integer(lisp_list_nth(data, 1)),
- lisp_integer(lisp_list_nth(data, 2)),
- lisp_integer(lisp_list_nth(data, 3)),
- lisp_integer(lisp_list_nth(data, 4)),
- true);
- }
- else
- {
- std::cout << "Tile: Type mispatch, should be '(region \"somestring\" x y w h)'" << std::endl;
- return 0;
- }
- }
- else
- {
- std::cout << "Tile: Unhandled tag: " << lisp_symbol(sym) << std::endl;
- return 0;
- }
- }
+#include "lisp/lisp.hpp"
+#include "tile.hpp"
+#include "resources.hpp"
+#include "timer.hpp"
+#include "math/vector.hpp"
+#include "video/drawing_context.hpp"
+#include "log.hpp"