Files
oboe/osx/classes/location.h
Niemand f198b4899d Added include guards to all class headers.
Removed unnecessary or potentially harmful compiler flags. 
Added alignment attribute to all old struct members. 
Removed some unused variables. 
Made some switch statements handle all or more cases. 
Removed using declarations in favor of fully qualified names. 
Fixed a couple of assignments in conditionals that should have been comparisons. 
Eliminated linker warnings by restoring default linking of standard libraries. 
Fixed some comparisons between signed and unsigned integers. 

Note: No testing has been done, in particular of old file I/O. This should be checked for regression caused by alteration of old struct definitions. 


git-svn-id: http://openexile.googlecode.com/svn/trunk@63 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-22 03:01:05 +00:00

48 lines
885 B
C

/*
* location.h
* BoE
*
* Created by Celtic Minstrel on 20/04/09.
*
*/
#ifndef LOCATION_H
#define LOCATION_H
struct rectangle;
struct location {
char x,y;
location();
location(char a, char b);
bool in(rectangle r);
};
struct rectangle {
char top, left, bottom, right;
rectangle();
rectangle(location tl, location br);
rectangle(char t, char l, char b, char r);
bool contains(location p);
};
struct shortloc {
short x,y;
};
bool operator == (location p1,location p2);
bool operator != (location p1,location p2);
bool operator == (rectangle r1, rectangle r2);
bool operator != (rectangle r1, rectangle r2);
short dist(location p1,location p2);
short vdist(location p1,location p2);
location loc(char a, char b);
location loc();
rectangle rect();
rectangle rect(location tl, location br);
rectangle rect(char top, char left, char bottom, char right);
#endif