I've thought about this many times; Never did it. Here's an idea:
find symbol center. Store it as TP.
Find Walls. Store as TPA.
and now just simply find four points.
Draw a vertical line from the TP, and the first point up and the first point down should be the top and bottom walls of the furnace.
Draw a horizontal line and you should find yourself the right and left walls ;)
Then you can easily find the center of the room ;)
Give it a go, and let me know if it works :p I might have some work to do in AK soon :)
e: If you're not sure how to do it, here's an inefficient way:
Function FindRoom(WallTPA: TPointArray; Symbol: TPoint): TPoint;
var
i: integer
Room : TBox;
begin
while Room.x1 = 0 do
begin
inc(i)
Symbol.x - i;
if PointInTPA(Point(Symbol.x-i, Symbol.y)) then
Room.x1 := Symbol.x - i;
end;
end;
Perhaps it would be much faster to sort through the WallTPA first. Find all the points that have the same x value as your Symbol and then just get the two closest ones to your point. An algorithm similar to bubblesort short be fast enough. Remeber that you'll need one point above and one below.
(Repeat process with y coord)
var
x, y, i: integer;
b: boolean;
begin
b := true;
x := 500000;
while b do
begin
b := false;
for i := 0 to High(WallTPA) do
if WallTPA[i].x < x then
if WallTPA[i].x > Symbol.x then // for finding the point above.
begin
x := WallTPA[i].x ;
b := true;
end;
end;
e2: Heh, I'll definitely be using something like this next time I do an Alkharider.. :)
~RM