// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
+#include <cmath>
#include <cassert>
#include <iostream>
-#include "globals.h"
+#include "app/globals.h"
#include "tile.h"
#include "scene.h"
-#include "lispreader.h"
-#include "vector.h"
-#include "screen/drawing_context.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:
*
if (lisp_string_p(cur))
{
return new Surface(datadir + "/images/tilesets/" + lisp_string(cur),
- USE_ALPHA);
+ true);
}
else if (lisp_cons_p(cur) && lisp_symbol_p(lisp_car(cur)))
{
lisp_integer(lisp_list_nth(data, 2)),
lisp_integer(lisp_list_nth(data, 3)),
lisp_integer(lisp_list_nth(data, 4)),
- USE_ALPHA);
+ true);
}
else
{
reader.read_int("anim-speed", anim_speed);
reader.read_int("next-tile", next_tile);
+ slope_angle = 0;
+ reader.read_float("slope-angle", slope_angle);
+ if(slope_angle != 0)
+ { // convert angle to radians from degrees:
+ slope_angle = (slope_angle * M_PI) / 180;
+ attributes |= SOLID;
+ }
+
// FIXME: make images and editor_images a sprite
images = create_surfaces(reader.read_lisp("images"));
editor_images = create_surfaces(reader.read_lisp("editor-images"));