diff options
author | 2015-10-26 22:52:36 +0800 | |
---|---|---|
committer | 2015-10-26 22:52:36 +0800 | |
commit | 3bd383baf6a17e734329e1fc677c7e86283db772 (patch) | |
tree | 69a9148087577f797624ceb9c71323a2563d6bb4 /hgehelp/hgerect.cpp | |
parent | 543e4f570be9b279ba558ca61cc02cda251af384 (diff) | |
download | bullet-lab-remix-3bd383baf6a17e734329e1fc677c7e86283db772.tar.xz |
Added support for relative line numbers.
Added instructions for, brk and cont. (They are still untested...)
Parser code cleanup. Removed garbage output to stderr.
Reorganize the repository structure.
Updated BLR2 code move it into archive.
Added BLR1 files.
Diffstat (limited to 'hgehelp/hgerect.cpp')
-rw-r--r-- | hgehelp/hgerect.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/hgehelp/hgerect.cpp b/hgehelp/hgerect.cpp deleted file mode 100644 index 303286c..0000000 --- a/hgehelp/hgerect.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* -** Haaf's Game Engine 1.7 -** Copyright (C) 2003-2007, Relish Games -** hge.relishgames.com -** -** hgeRect helper class implementation -*/ - - -#include "hgerect.h" -#include <math.h> - - -void hgeRect::Encapsulate(float x, float y) -{ - if(bClean) - { - x1=x2=x; - y1=y2=y; - bClean=false; - } - else - { - if(x<x1) x1=x; - if(x>x2) x2=x; - if(y<y1) y1=y; - if(y>y2) y2=y; - } -} - -bool hgeRect::TestPoint(float x, float y) const -{ - if(x>=x1 && x<x2 && y>=y1 && y<y2) return true; - - return false; -} - -bool hgeRect::Intersect(const hgeRect *rect) const -{ - if(fabs(x1 + x2 - rect->x1 - rect->x2) < (x2 - x1 + rect->x2 - rect->x1)) - if(fabs(y1 + y2 - rect->y1 - rect->y2) < (y2 - y1 + rect->y2 - rect->y1)) - return true; - - return false; -} |