2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2002-03-21 16:12:02 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-03-21 16:12:02 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-02-19 17:48:19 +00:00
|
|
|
#ifndef SCUMM_BOXES_H
|
|
|
|
#define SCUMM_BOXES_H
|
2002-05-01 00:13:03 +00:00
|
|
|
|
2003-05-15 21:57:38 +00:00
|
|
|
#include "common/rect.h"
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
namespace Scumm {
|
|
|
|
|
2012-02-04 17:34:08 +00:00
|
|
|
#define SIZEOF_BOX_V0 5
|
2003-05-09 21:46:34 +00:00
|
|
|
#define SIZEOF_BOX_V2 8
|
|
|
|
#define SIZEOF_BOX_V3 18
|
2002-03-21 16:12:02 +00:00
|
|
|
#define SIZEOF_BOX 20
|
2003-05-09 21:46:34 +00:00
|
|
|
#define SIZEOF_BOX_V8 52
|
2002-05-01 00:13:03 +00:00
|
|
|
|
2002-08-15 16:46:29 +00:00
|
|
|
typedef enum {
|
|
|
|
kBoxXFlip = 0x08,
|
|
|
|
kBoxYFlip = 0x10,
|
2003-11-01 01:17:15 +00:00
|
|
|
kBoxIgnoreScale = 0x20,
|
2002-08-15 16:46:29 +00:00
|
|
|
kBoxPlayerOnly = 0x20,
|
|
|
|
kBoxLocked = 0x40,
|
2002-12-25 00:36:04 +00:00
|
|
|
kBoxInvisible = 0x80
|
2002-08-15 16:46:29 +00:00
|
|
|
} BoxFlags;
|
|
|
|
|
2002-03-21 16:12:02 +00:00
|
|
|
struct BoxCoords { /* Box coordinates */
|
2003-10-02 17:43:02 +00:00
|
|
|
Common::Point ul;
|
|
|
|
Common::Point ur;
|
|
|
|
Common::Point ll;
|
|
|
|
Common::Point lr;
|
2002-03-21 16:12:02 +00:00
|
|
|
};
|
|
|
|
|
2006-10-18 13:33:42 +00:00
|
|
|
int getClosestPtOnBox(const BoxCoords &box, int x, int y, int16& outX, int16& outY);
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|
|
|
|
|
2002-07-16 17:59:28 +00:00
|
|
|
#endif
|