moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / felib / rect.h
blobb85845eb49b7406b1ba035873990754a2667698e
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #ifndef __FELIB_RECT_H__
13 #define __FELIB_RECT_H__
15 #include "v2.h"
18 struct rect {
19 rect () {}
20 rect (int X1, int Y1, int X2, int Y2) : X1(X1), Y1(Y1), X2(X2), Y2(Y2) {}
21 rect (v2 V1, v2 V2) : X1(V1.X), Y1(V1.Y), X2(V2.X), Y2(V2.Y) {}
22 rect operator+(v2 V) const { return rect(X1+V.X, Y1+V.Y, X2+V.X, Y2+V.Y); }
24 int X1, Y1, X2, Y2;
28 #endif