(XYOFFSET): Returned twice the value it should.

(finish_sects): Allocated twice as much space as needed, to make it
work with the broken XYOFFSET().
This commit is contained in:
Markus Armbruster 2007-07-28 07:06:55 +00:00
parent e09f50a7d3
commit 6d9e78af4c
2 changed files with 4 additions and 10 deletions

View file

@ -36,9 +36,8 @@
#include "types.h"
/* Used to calculate an offset into an array. Used for
dynamically sizing the world. */
#define XYOFFSET(x, y) (((y) * WORLD_X) + (x))
/* Fast version of sctoff() for normalized arguments: */
#define XYOFFSET(x, y) (((y) * WORLD_X + (x)) / 2)
#define XNORM(x) \
(((x) < 0) ? ((WORLD_X - (-(x) % WORLD_X)) % WORLD_X) : ((x) % WORLD_X))