25 #include "common/formats/json.h" 26 #include "common/hashmap.h" 27 #include "common/rect.h" 28 #include "math/vector2d.h" 29 #include "math/matrix4.h" 31 #include "twp/objectanimation.h" 40 uint operator()(Twp::Facing val)
const {
return (uint)val; }
53 Vector2i(
int x_,
int y_) : x(x_), y(y_) {}
54 Vector2i(
float x_,
float y_) : x(round(x_)), y(round(y_)) {}
55 explicit Vector2i(
const Math::Vector2d &p) : x(round(p.getX())), y(round(p.getY())) {}
56 explicit operator Math::Vector2d()
const {
57 return Math::Vector2d(x, y);
78 template<
typename T,
class DL = Common::DefaultDeleter<T> >
82 Facing getFacing(
int dir, Facing facing);
83 Facing flip(Facing facing);
95 for (
size_t i = 0; i < array.
size(); i++) {
105 for (
size_t i = 0; i < array.
size(); i++) {
106 if (array[i].
get() == o) {
119 for (
size_t i = 1; i < values.
size(); i++) {
120 if (values[i] < min) {
131 for (
size_t i = 0; i < arr.
size(); i++) {
132 result[arr.
size() - 1 - i] = arr[i];
143 void scale(Math::Matrix4 &m,
const Math::Vector2d &v);
144 Math::Vector2d operator*(
const Math::Vector2d &v,
float f);
145 float distance(
const Math::Vector2d &p1,
const Math::Vector2d &p2);
146 float distanceSquared(
const Math::Vector2d &p1,
const Math::Vector2d &p2);
147 float distanceToSegment(
const Math::Vector2d &p,
const Math::Vector2d &v,
const Math::Vector2d &w);
148 float dot(
const Math::Vector2d &u,
const Math::Vector2d &v);
149 float length(
const Math::Vector2d &v);
150 bool lineSegmentsCross(
const Math::Vector2d &a,
const Math::Vector2d &b,
const Math::Vector2d &c,
const Math::Vector2d &d);
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
bool empty() const
Definition: array.h:351
Definition: algorithm.h:29
size_type size() const
Definition: array.h:315
Definition: achievements_tables.h:27