- remove third argument from ttyplay_main

- kludge to not run strip_gfx when stripped == NO_GRAPHICS
- other random fixes


git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@221 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-02-03 02:55:24 +00:00
parent e4ede2e885
commit c0afaba270
5 changed files with 11 additions and 9 deletions

View File

@ -38,6 +38,9 @@
time option - see README for details.
* A giant code cleanup that centralizes necessary globals, removes
unnecessary variables and #defines...
* Improved stripgfx feature to allow in-session graphic strip
toggling. Still a bit unreliable though, but works better than
before.
1.3.10 (2003/10/22)
* Added a mode flag to the open call for inprogress lock files.

View File

@ -43,7 +43,6 @@ COMMENT ^#.*
{MALSTRING} {
yytext[yyleng - 1] = '\0'; /* remove trailing newline */
/* yytext already contains a newline, no need for one here */
fprintf(stderr, "%s:%d:%d: unterminated string constant: %s\n", config, line, col - yyleng + 1, yytext);
return TYPE_MALSTRING;
}

View File

@ -489,9 +489,9 @@ inprogressmenu ()
clear ();
drawbanner (1, 1);
mvprintw (3, 1,
"During playback, hit 'q' to return here, 'm' to send mail (requires login)");
"During playback, hit 'q' to return here, 'm' to send mail (requires login),");
mvaddstr (4, 1,
"(Use capital letter of selection to strip DEC graphics, VERY experimental!)");
"'s' to toggle graphic-set stripping for DEC, IBM, and none.");
mvaddstr (5, 1, "The following games are in progress:");
/* clean old games and list good ones */
@ -551,7 +551,7 @@ inprogressmenu ()
clear ();
refresh ();
endwin ();
ttyplay_main (ttyrecname, 1, 0);
ttyplay_main (ttyrecname, 1);
initcurses ();
}
}

View File

@ -50,7 +50,7 @@
#include "stripgfx.h"
off_t seek_offset_clrscr;
int bstripgfx;
int stripped = NO_GRAPHICS;
struct timeval
timeval_diff (struct timeval tv1, struct timeval tv2)
@ -161,7 +161,6 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
int counter = 0;
fd_set readfs;
struct timeval zerotime;
static int stripped = NO_GRAPHICS;
zerotime.tv_sec = 0;
zerotime.tv_usec = 0;
@ -233,6 +232,7 @@ ttywrite (char *buf, int len)
for (i = 0; i < len; i++)
{
if (stripped != NO_GRAPHICS)
buf[i] = strip_gfx (buf[i]);
}
@ -390,7 +390,7 @@ ttypeek (FILE * fp, double speed)
int
ttyplay_main (char *ttyfile, int mode, int rstripgfx)
ttyplay_main (char *ttyfile, int mode)
{
double speed = 1.0;
ReadFunc read_func = ttyread;

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "ttyrec.h"
int ttyplay_main (char *ttyfile, int mode, int rstripgfx);
int ttyplay_main (char *ttyfile, int mode);
typedef double (*WaitFunc) (struct timeval prev,
struct timeval cur, double speed);