Callers changed. s_char purge.
struct emp_qelem *);
/* move.c */
extern int check_lmines(coord, coord, double);
-extern int move_ground(s_char *, struct sctstr *, struct sctstr *,
+extern int move_ground(struct sctstr *, struct sctstr *,
double, s_char *,
- int (*)(s_char *, coord, coord, s_char *),
+ int (*)(coord, coord, char *),
int, int *);
extern int fly_map(coord, coord);
/* mslsub.c */
#include "optlist.h"
#include "commands.h"
-static int explore_map(s_char *what, coord curx, coord cury, s_char *arg);
+static int explore_map(coord curx, coord cury, char *arg);
int
explore(void)
int own, mob;
int justtook;
coord x, y;
- s_char *p;
+ char *p;
int n;
int left;
- s_char buf[1024];
- s_char prompt[128];
+ char buf[1024];
+ char prompt[128];
if (!(ip = whatitem(player->argp[1], "explore with what? (civ/mil) ")))
return RET_SYN;
* Now parse the path and return ending sector.
*/
dam = 1;
- mcost = move_ground((s_char *)ip, §, &endsect,
- weight, player->argp[4],
+ mcost = move_ground(§, &endsect, weight, player->argp[4],
explore_map, 1, &dam);
if (dam) {
left = effdamage(amount, dam);
if (left < amount) {
if (left) {
- pr("%d of the %s you were exploring with were destroyed!\nOnly %d %s made it to %s\n", amount - left, ip->i_name, left, ip->i_name, xyas(endsect.sct_x, endsect.sct_y, player->cnum));
+ pr("%d of the %s you were exploring with were destroyed!\n"
+ "Only %d %s made it to %s\n",
+ amount - left, ip->i_name, left, ip->i_name,
+ xyas(endsect.sct_x, endsect.sct_y, player->cnum));
} else {
pr("All of the %s you were exploring with were destroyed!\n", ip->i_name);
}
/*ARGSUSED*/
static int
-explore_map(s_char *what, coord curx, coord cury, s_char *arg)
+explore_map(coord curx, coord cury, char *arg)
{
struct nstr_sect ns;
struct sctstr sect;
#include "commands.h"
-static int cmd_move_map(s_char *what, coord curx, coord cury, s_char *arg);
+static int cmd_move_map(coord curx, coord cury, char *arg);
int
move(void)
int istest = 0;
int n;
coord x, y;
- s_char *p;
- s_char prompt[1024];
- s_char buf[1024];
+ char *p;
+ char prompt[1024];
+ char buf[1024];
istest = *player->argp[0] == 't';
dam = (istest ? 0 : 1);
if (dam && !chance(weight / 200.0))
dam = 0;
- mcost = move_ground((s_char *)ip, §, &endsect,
- weight, player->argp[4],
+ mcost = move_ground(§, &endsect, weight, player->argp[4],
cmd_move_map, 0, &dam);
if (dam) {
*/
/*ARGSUSED*/
static int
-cmd_move_map(s_char *what, coord curx, coord cury, s_char *arg)
+cmd_move_map(coord curx, coord cury, char *arg)
{
player->argp[0] = "map";
player->argp[1] = arg;
#include "land.h"
#include "commands.h"
-static int tran_map(s_char *what, coord curx, coord cury, s_char *arg);
+static int tran_map(coord curx, coord cury, char *arg);
static int tran_nuke(void);
static int tran_plane(void);
int
tran(void)
{
- s_char *what;
- s_char buf[1024];
+ char *what;
+ char buf[1024];
- what =
- getstarg(player->argp[1], "transport what (nuke or plane): ", buf);
+ what = getstarg(player->argp[1], "transport what (nuke or plane): ",
+ buf);
if (what == 0)
return RET_SYN;
if (*what == 'n')
coord x, y;
coord dstx, dsty;
int found;
- s_char *p;
+ char *p;
int nuketype;
int moving;
struct nukstr nuke;
struct sctstr endsect;
int mcost, dam;
struct nstr_item nstr;
- s_char buf[1024];
+ char buf[1024];
if (!(p = getstarg(player->argp[2], "from sector : ", buf)))
return RET_SYN;
return RET_FAIL;
}
dam = 0;
- mcost = move_ground((s_char *)&nuke, §, &endsect,
- (double)ncp->n_weight * moving,
+ mcost = move_ground(§, &endsect, (double)ncp->n_weight * moving,
player->argp[5], tran_map, 0, &dam);
if (mcost < 0)
return RET_FAIL;
}
dam = 1;
- mcost = move_ground((s_char *)&plane, §, &endsect,
- (double)weight,
+ mcost = move_ground(§, &endsect, (double)weight,
player->argp[3], tran_map, 0, &dam);
dam /= count;
if (mcost < 0)
*/
/*ARGSUSED*/
static int
-tran_map(s_char *what, coord curx, coord cury, s_char *arg)
+tran_map(coord curx, coord cury, char *arg)
{
player->argp[0] = "map";
player->argp[1] = arg;
#include "damage.h"
#include "prototypes.h"
-static int move_map(s_char *what, coord curx, coord cury, s_char *arg);
+static int move_map(coord curx, coord cury, char *arg);
int
-move_ground(s_char *what, struct sctstr *start, struct sctstr *end,
- double weight, s_char *path,
- int (*map)(s_char *, coord, coord, s_char *), int exploring,
+move_ground(struct sctstr *start, struct sctstr *end,
+ double weight, char *path,
+ int (*map)(coord, coord, char *), int exploring,
int *dam)
{
struct sctstr sect, ending_sect;
coord curx, cury, oldx, oldy;
coord tmpx, tmpy;
coord dx, dy;
- s_char *movstr;
+ char *movstr;
double sect_mcost;
double total_mcost;
double mv_cost;
int intcost;
int takedam = *dam;
int out = 0;
- s_char bpath[512];
- s_char buf2[512];
- s_char prompt[128];
- s_char buf[1024];
+ char bpath[512];
+ char buf2[512];
+ char prompt[128];
+ char buf[1024];
*end = *start;
if (mobility <= 0.0)
oldy = cury;
if (!movstr || *movstr == 0) {
if (exploring) {
- map(what, curx, cury, NULL);
+ map(curx, cury, NULL);
} else {
- move_map(what, curx, cury, NULL);
+ move_map(curx, cury, NULL);
}
sprintf(prompt, "<%.1f: %c %s> ", mobility,
dchr[sect.sct_type].d_mnem,
movstr++;
if (dir == DIR_MAP) {
if (!exploring)
- map(what, curx, cury, movstr + 1);
+ map(curx, cury, movstr + 1);
*movstr = 0;
continue;
} else if (dir == DIR_STOP)
/*ARGSUSED*/
static int
-move_map(s_char *what, coord curx, coord cury, s_char *arg)
+move_map(coord curx, coord cury, char *arg)
{
struct nstr_sect ns;
struct sctstr sect;