/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
#include "map.h"
#include "optlist.h"
#include "path.h"
-#include "empobj.h"
#include "unit.h"
static void pr_leader_change(struct empobj *leader);
int skip = 0;
char buf[1024];
char prompt[128];
- char scanspace[1024];
char pathtaken[1024]; /* Doubtful we'll have a path longer than this */
char *pt = pathtaken;
char bmap_flag;
type = leader->ef_type;
pr("%s is %s\n",
type == EF_SHIP ? "Flagship" : "Leader",
- obj_nameof(leader));
+ unit_nameof(leader));
if (player->argp[2]) {
strcpy(buf, player->argp[2]);
- cp = unit_path(*together, leader, buf);
+ cp = unit_path(*together, leader, buf, sizeof(buf));
}
*pt = '\0';
continue;
}
if (cp)
- cp = unit_path(*together, leader, cp);
+ cp = unit_path(*together, leader, buf, sizeof(buf));
}
if (type == EF_SHIP) {
rad_map_set(player->cnum, leader->x, leader->y, leader->effic,
cp++;
continue;
}
- ac = parse(cp, scanspace, player->argp, NULL, NULL, NULL);
+ ac = parse(cp, player->argbuf, player->argp, NULL, NULL, NULL);
if (ac <= 0) {
player->argp[0] = "";
cp = NULL;
* fall through
*/
case 'M':
- do_map(bmap_flag, leader->ef_type, player->argp[1],
- player->argp[2]);
+ display_region_map(bmap_flag, type, leader->x, leader->y,
+ player->argp[1], player->argp[2]);
skip = 1;
continue;
case 'f':
{
pr("Changing %s to %s\n",
leader->ef_type == EF_SHIP ? "flagship" : "leader",
- obj_nameof(leader));
+ unit_nameof(leader));
}
static struct empobj *