123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include "Precompiled.h"
- #include "globaldata.h"
- #ifdef __GNUG__
- #pragma implementation "m_bbox.h"
- #endif
- #include "m_bbox.h"
- #include "doomtype.h"
- void M_ClearBox (fixed_t *box)
- {
- box[BOXTOP] = box[BOXRIGHT] = MININT;
- box[BOXBOTTOM] = box[BOXLEFT] = MAXINT;
- }
- void
- M_AddToBox
- ( fixed_t* box,
- fixed_t x,
- fixed_t y )
- {
- if (x<box[BOXLEFT])
- box[BOXLEFT] = x;
- else if (x>box[BOXRIGHT])
- box[BOXRIGHT] = x;
- if (y<box[BOXBOTTOM])
- box[BOXBOTTOM] = y;
- else if (y>box[BOXTOP])
- box[BOXTOP] = y;
- }
|