/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* maps.c: Map routines
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
+ * Markus Armbruster, 2004-2008
* Ron Koenderink, 2006
*/
}
}
if (!bitmap)
- bitmap = malloc((WORLD_X * WORLD_Y) / 8);
+ bitmap = malloc(WORLD_SZ() / 8);
if (!wmapbuf || !wmap || !bitmap) {
pr("Memory error, tell the deity.\n");
logerror("malloc failed in draw_map\n");
struct sctstr sect;
if (!player->god) {
- memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
+ memset(bitmap, 0, WORLD_SZ() / 8);
bitinit2(nsp, bitmap, player->cnum);
}
while (nxtsct(nsp, §) && !player->aborted) {
int changed = 0;
if (!player->god) {
- memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
+ memset(bitmap, 0, WORLD_SZ() / 8);
bitinit2(nsp, bitmap, player->cnum);
}
while (nxtsct(nsp, §) && !player->aborted) {
struct sctstr sect;
snxtsct_rewind(nsp);
- if (!player->god) {
- memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
- bitinit2(nsp, bitmap, player->cnum);
- }
while (nxtsct(nsp, §) && !player->aborted) {
- if (!player->god && !emp_getbit(nsp->x, nsp->y, bitmap))
- continue;
if (sect.sct_own == player->cnum)
wmap[nsp->dy][nsp->dx] |= 0x80;
}
np = getnatp(player->cnum);
sprintf(coordinates, "%d:%d,%d:%d",
- xrel(np, curx - 10), xrel(np, curx + 11),
- yrel(np, cury - 5), yrel(np, cury + 6));
+ xrel(np, curx - 10), xrel(np, curx + 10),
+ yrel(np, cury - 5), yrel(np, cury + 5));
arg = coordinates;
map_flag_arg = NULL;
} else {