]> git.pond.sub.org Git - empserver/commit
Fix computation of map buffer indexes
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Aug 2008 01:56:28 +0000 (21:56 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Aug 2008 12:54:04 +0000 (08:54 -0400)
commit3ca882714da08866e8d082f9e26ece3dce1ea05e
tree6eba074ddce0607964edbeb02088db3249593b12
parent42a8b315e5f7db5a35c0ffc8952c05a264e1ab82
Fix computation of map buffer indexes

The correct method to compute indexes into a map buffer for a struct
range is deltx(), delty().

path() used deltax(), deltay() instead, which yield correct results
only for indexes up to half the world size.  Pathes spanning larger
areas were screwed up.

sona(), radmap2(), satmap() also used deltax(), deltay(), but only
with arguments where those yield correct results.

draw_map() used xnorm(), ynorm() instead, which is correct, but less
clear and less efficient.
src/lib/commands/path.c
src/lib/commands/sona.c
src/lib/subs/maps.c
src/lib/subs/radmap.c
src/lib/subs/satmap.c