Logfp
This commit is contained in:
@@ -467,7 +467,7 @@ over:
|
||||
ntimes++;
|
||||
}
|
||||
if ( fp2 == 0 )
|
||||
fp2 = fopen("commands","wb");
|
||||
rs->logfp = fp2 = fopen("commands","wb");
|
||||
if ( fp2 != 0 )
|
||||
{
|
||||
fprintf(fp2,"after if (%c).%d seed.%llu\n",ch,ch,(long long)seed);
|
||||
|
||||
@@ -190,6 +190,7 @@ char *actionfunc_str(char *str,void *ptr)
|
||||
else strcpy(str,"no match");
|
||||
return(str);
|
||||
}
|
||||
|
||||
void
|
||||
do_fuses(struct rogue_state *rs,int flag,FILE *fp)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@ void
|
||||
doctor(struct rogue_state *rs,int arg)
|
||||
{
|
||||
register int lv, ohp;
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"doctor\n");
|
||||
|
||||
lv = pstats.s_lvl;
|
||||
ohp = pstats.s_hpt;
|
||||
@@ -52,6 +54,8 @@ doctor(struct rogue_state *rs,int arg)
|
||||
void
|
||||
swander(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"swander\n");
|
||||
start_daemon(rollwand, 0, BEFORE);
|
||||
}
|
||||
|
||||
@@ -63,6 +67,8 @@ int between = 0;
|
||||
void
|
||||
rollwand(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"rollwand\n");
|
||||
if (++between >= 4)
|
||||
{
|
||||
if (roll(1, 6) == 4)
|
||||
@@ -82,6 +88,8 @@ rollwand(struct rogue_state *rs,int arg)
|
||||
void
|
||||
unconfuse(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"unconfuse\n");
|
||||
player.t_flags &= ~ISHUH;
|
||||
msg(rs,"you feel less %s now", choose_str("trippy", "confused"));
|
||||
}
|
||||
@@ -94,6 +102,8 @@ void
|
||||
unsee(struct rogue_state *rs,int arg)
|
||||
{
|
||||
register THING *th;
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"unsee\n");
|
||||
|
||||
for (th = mlist; th != NULL; th = next(th))
|
||||
if (on(*th, ISINVIS) && see_monst(th))
|
||||
@@ -108,6 +118,8 @@ unsee(struct rogue_state *rs,int arg)
|
||||
void
|
||||
sight(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"sight\n");
|
||||
if (on(player, ISBLIND))
|
||||
{
|
||||
extinguish(sight);
|
||||
@@ -126,6 +138,8 @@ sight(struct rogue_state *rs,int arg)
|
||||
void
|
||||
nohaste(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"nohaste\n");
|
||||
player.t_flags &= ~ISHASTE;
|
||||
msg(rs,"you feel yourself slowing down");
|
||||
}
|
||||
@@ -139,6 +153,8 @@ stomach(struct rogue_state *rs,int arg)
|
||||
{
|
||||
register int oldfood;
|
||||
int orig_hungry = hungry_state;
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"stomach\n");
|
||||
|
||||
if (food_left <= 0)
|
||||
{
|
||||
@@ -195,6 +211,8 @@ come_down(struct rogue_state *rs,int arg)
|
||||
register THING *tp;
|
||||
register bool seemonst;
|
||||
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"come_down\n");
|
||||
if (!on(player, ISHALU))
|
||||
return;
|
||||
|
||||
@@ -245,6 +263,8 @@ visuals(struct rogue_state *rs,int arg)
|
||||
|
||||
if (!after || (running && jump))
|
||||
return;
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"visuals\n");
|
||||
/*
|
||||
* change the things
|
||||
*/
|
||||
@@ -288,6 +308,8 @@ visuals(struct rogue_state *rs,int arg)
|
||||
void
|
||||
land(struct rogue_state *rs,int arg)
|
||||
{
|
||||
if ( rs->logfp != 0 )
|
||||
fprintf(rs->logfp,"land\n");
|
||||
player.t_flags &= ~ISLEVIT;
|
||||
msg(rs,choose_str("bummer! You've hit the ground",
|
||||
"you float gently to the ground"));
|
||||
|
||||
@@ -365,6 +365,7 @@ struct rogue_state
|
||||
char *keystrokes,*keystrokeshex;
|
||||
uint32_t needflush,replaydone;
|
||||
int32_t numkeys,ind,num,guiflag,counter,sleeptime,playersize,restoring,lastnum;
|
||||
FILE *logfp;
|
||||
struct rogue_player P;
|
||||
char buffered[10000];
|
||||
uint8_t playerdata[10000];
|
||||
|
||||
Reference in New Issue
Block a user