Browse Source

Big buffer

pull/4/head
jl777 5 years ago
parent
commit
0594b52df2
  1. 10
      .gitignore
  2. 1
      src/cc/rogue/init.c
  3. 12
      src/cc/rogue/io.c
  4. 2
      src/cc/rogue/rip.c
  5. 2
      src/cc/rogue/rogue.c

10
.gitignore

@ -132,3 +132,13 @@ src/cc/rogue/rogue
src/cc/rogue/rogue.so
src/cc/rogue/test.zip
src/rogue.530623577502174316.0
src/rogue.530623577502174316.pack
src/rogue.530623577502174316.player
src/checkfile
src/log

1
src/cc/rogue/init.c

@ -34,6 +34,7 @@ void restore_player(struct rogue_state *rs)
int32_t i,total = 0; THING *obj;
//rs->P.gold = purse;
max_hp = rs->P.hitpoints;
//pstats.s_hpt = max_hp;
pstats.s_str = rs->P.strength & 0xffff;
if ( (max_stats.s_str= (rs->P.strength >> 16) & 0xffff) == 0 )
max_stats.s_str = 16;

12
src/cc/rogue/io.c

@ -160,6 +160,18 @@ readchar(struct rogue_state *rs)
if ( rs->ind < rs->numkeys )
{
c = rs->keystrokes[rs->ind++];
if ( 0 )
{
static FILE *fp; static int32_t counter;
if ( fp == 0 )
fp = fopen("log","wb");
if ( fp != 0 )
{
fprintf(fp,"%d: (%c) hp.%d\n",counter,c,pstats.s_hpt);
fflush(fp);
counter++;
}
}
while ( c == 'Q' && rs->ind < rs->numkeys )
{
//fprintf(stderr,"Got 'Q' next (%c)\n",rs->keystrokes[rs->ind]); sleep(2);

2
src/cc/rogue/rip.c

@ -238,7 +238,7 @@ death(struct rogue_state *rs,char monst)
//struct tm *localtime(const time_t *);
if ( rs->guiflag == 0 )
{
fprintf(stderr,"death during replay\n");
fprintf(stderr,"death during replay by (%c)\n",monst); //sleep(3);
rs->replaydone = (uint32_t)time(NULL);
return;
}

2
src/cc/rogue/rogue.c

@ -607,7 +607,7 @@ playit(struct rogue_state *rs)
}
else
{
if ( rs->needflush != 0 && rs->num > 1024 )
if ( rs->needflush != 0 && rs->num > 8000 )
{
if ( flushkeystrokes(rs) == 0 )
rs->needflush = 0;

Loading…
Cancel
Save