oops, forgot to attach overlay.{h,cpp} !
[Tsunagari.git] / src / overlay.cpp
blobb5b5e2a8ba4a9e2272448283c4bea3c33d0656fd
1 /*********************************
2 ** Tsunagari Tile Engine **
3 ** overlay.cpp **
4 ** Copyright 2011-2012 OmegaSDG **
5 *********************************/
7 #include "area.h"
8 #include "overlay.h"
10 Overlay::Overlay()
11 : Entity()
15 Overlay::~Overlay()
19 void Overlay::teleport(int x, int y)
21 r.x = x;
22 r.y = y;
25 void Overlay::move(int x, int y)
27 fromTile = NULL;
28 destTile = NULL;
30 // XXX: Find nearest facing.
31 //setFacing(ivec2(x, y));
33 // XXX: Hack for facing. Shouldn't need to set.
34 setFacing(ivec2(0, 1));
36 // Copied from Entity::preMove()
37 destCoord = r + rcoord(x, y, 0);
39 moving = true;
41 // Start moving animation.
42 //setPhase("moving " + getFacing());
44 // Movement happens over time. See updateTile().