Big buffer
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -132,3 +132,13 @@ src/cc/rogue/rogue
|
|||||||
src/cc/rogue/rogue.so
|
src/cc/rogue/rogue.so
|
||||||
|
|
||||||
src/cc/rogue/test.zip
|
src/cc/rogue/test.zip
|
||||||
|
|
||||||
|
src/rogue.530623577502174316.0
|
||||||
|
|
||||||
|
src/rogue.530623577502174316.pack
|
||||||
|
|
||||||
|
src/rogue.530623577502174316.player
|
||||||
|
|
||||||
|
src/checkfile
|
||||||
|
|
||||||
|
src/log
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ void restore_player(struct rogue_state *rs)
|
|||||||
int32_t i,total = 0; THING *obj;
|
int32_t i,total = 0; THING *obj;
|
||||||
//rs->P.gold = purse;
|
//rs->P.gold = purse;
|
||||||
max_hp = rs->P.hitpoints;
|
max_hp = rs->P.hitpoints;
|
||||||
|
//pstats.s_hpt = max_hp;
|
||||||
pstats.s_str = rs->P.strength & 0xffff;
|
pstats.s_str = rs->P.strength & 0xffff;
|
||||||
if ( (max_stats.s_str= (rs->P.strength >> 16) & 0xffff) == 0 )
|
if ( (max_stats.s_str= (rs->P.strength >> 16) & 0xffff) == 0 )
|
||||||
max_stats.s_str = 16;
|
max_stats.s_str = 16;
|
||||||
|
|||||||
@@ -160,6 +160,18 @@ 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 )
|
||||||
|
{
|
||||||
|
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 )
|
while ( c == 'Q' && rs->ind < rs->numkeys )
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"Got 'Q' next (%c)\n",rs->keystrokes[rs->ind]); sleep(2);
|
//fprintf(stderr,"Got 'Q' next (%c)\n",rs->keystrokes[rs->ind]); sleep(2);
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ death(struct rogue_state *rs,char monst)
|
|||||||
//struct tm *localtime(const time_t *);
|
//struct tm *localtime(const time_t *);
|
||||||
if ( rs->guiflag == 0 )
|
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);
|
rs->replaydone = (uint32_t)time(NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ playit(struct rogue_state *rs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( rs->needflush != 0 && rs->num > 1024 )
|
if ( rs->needflush != 0 && rs->num > 8000 )
|
||||||
{
|
{
|
||||||
if ( flushkeystrokes(rs) == 0 )
|
if ( flushkeystrokes(rs) == 0 )
|
||||||
rs->needflush = 0;
|
rs->needflush = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user