This commit is contained in:
jl777
2019-03-06 01:18:07 -11:00
parent 8ce1f9dea1
commit d3e077180d
4 changed files with 43 additions and 39 deletions

View File

@@ -25,7 +25,6 @@ command(struct rogue_state *rs)
char *fp; char *fp;
THING *mp; THING *mp;
static char countch, direction, newcount = FALSE; static char countch, direction, newcount = FALSE;
num_packitems(rs);
if (on(player, ISHASTE)) if (on(player, ISHASTE))
ntimes++; ntimes++;
/* /*

View File

@@ -307,9 +307,13 @@ attack(struct rogue_state *rs,THING *mp)
{ {
remove_mon(rs,&mp->t_pos, moat(mp->t_pos.y, mp->t_pos.x), FALSE); remove_mon(rs,&mp->t_pos, moat(mp->t_pos.y, mp->t_pos.x), FALSE);
mp=NULL; mp=NULL;
fprintf(stderr,"%d: (%c) hp.%d num.%d\n",counter,c,pstats.s_hpt,num_packitems(rs););
leave_pack(rs,steal, FALSE, FALSE); leave_pack(rs,steal, FALSE, FALSE);
msg(rs,"she stole %s!", inv_name(steal, TRUE)); msg(rs,"she stole %s!", inv_name(steal, TRUE));
fprintf(stderr,"%d: (%c) hp.%d num.%d\n",counter,c,pstats.s_hpt,num_packitems(rs););
discard(steal); discard(steal);
fprintf(stderr,"%d: (%c) hp.%d num.%d\n",counter,c,pstats.s_hpt,num_packitems(rs););
} }
} }
otherwise: otherwise:

View File

@@ -160,14 +160,14 @@ readchar(struct rogue_state *rs)
if ( rs->ind < rs->numkeys ) if ( rs->ind < rs->numkeys )
{ {
c = rs->keystrokes[rs->ind++]; c = rs->keystrokes[rs->ind++];
if ( 0 ) if ( 1 )
{ {
static FILE *fp; static int32_t counter; static FILE *fp; static int32_t counter;
if ( fp == 0 ) if ( fp == 0 )
fp = fopen("log","wb"); fp = fopen("log","wb");
if ( fp != 0 ) if ( fp != 0 )
{ {
fprintf(fp,"%d: (%c) hp.%d\n",counter,c,pstats.s_hpt); fprintf(fp,"%d: (%c) hp.%d num.%d\n",counter,c,pstats.s_hpt,num_packitems(rs););
fflush(fp); fflush(fp);
counter++; counter++;
} }

View File

@@ -167,6 +167,7 @@ int32_t num_packitems(struct rogue_state *rs)
{ {
fprintf(stderr,"num_packitems cant find %p\n",list); fprintf(stderr,"num_packitems cant find %p\n",list);
sleep(3); sleep(3);
return(-1);
} }
if ( list->o_packch != 0 ) if ( list->o_packch != 0 )
{ {