5 * Created by Alyssa Milburn on Tue May 25 2004.
6 * Copyright (c) 2004 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
30 #include <boost/weak_ptr.hpp>
37 boost::weak_ptr
<class Room
> first
, second
;
43 std::map
<boost::weak_ptr
<Room
>,RoomDoor
*> doors
;
44 unsigned int x_left
, x_right
, y_left_ceiling
, y_right_ceiling
;
45 unsigned int y_left_floor
, y_right_floor
;
47 std::vector
<std::pair
<unsigned int, unsigned int> > floorpoints
;
49 Line left
, right
, top
, bot
;
54 caosVar temp
, lite
, radn
, ontr
, intr
, pres
, hsrc
, lsrc
, rsrc
, psrc
;
55 caosVar floorvalue
, dropstatus
;
61 class MetaRoom
*metaroom
;
63 float ca
[CA_COUNT
], catemp
[CA_COUNT
];
65 bool containsPoint(float x
, float y
) {
66 if (x
> (float)x_right
|| x
< (float)x_left
) { return false; }
67 if (bot
.pointAtX(x
).y
< y
) { return false; }
68 if (top
.pointAtX(x
).y
> y
) { return false; }
72 bool containsPoint(Point p
) { return containsPoint(p
.x
, p
.y
); }
74 float floorYatX(float x
);
77 Room(unsigned int x_l
, unsigned int x_r
, unsigned int y_l_t
, unsigned int y_r_t
, unsigned int y_l_b
, unsigned int y_r_b
);
82 void renderBorders(class Surface
*surf
, int xoffset
, int yoffset
, unsigned int col
);