hi!
I've fixed wood removing ( since it was offered to :))
The two implementations I see in map.c are too complex IMHO
( and as I can see are not correct ). Anyway -- I'll
give simple explanation below and please correct me if
I'm wrong :)
First of all -- remove wood at x,y and then fix neighbors
( only N,W,S,E -- i.e. side neighbors )
fixing is done in this way:
check only side neighbors for wood ( there's no need to check corners!
NE,NW,SE,SW )
and calculate 4 bit number:
-1-
8-2
-4-
And you'll get 0..15 as result
and map needed tile from 16-field Wood table ( The common mistake is
to check corner tiles and to get 8-bit value and map it into 256-field
table?! )
There are 4 invalid tiles/fields: 0, 2, 8, 10.
and these should be removed too ( recursively )
This gives nice result even in this situation:
-W in the original WC2 you'll see just two pines
WW
W- here you'll get three pines ( one between WW place )
However the result is right -- just could be fixed accordingly
to the original game (well, there is one not significant problem
connected with this -- I can explain it if someone is interested).
P! Vladi.