]> skyeroc.xyz Git - dgamelaunch/commitdiff
- remove third argument from ttyplay_main
authorJoshua Kwan <joshk@triplehelix.org>
Tue, 3 Feb 2004 02:55:24 +0000 (02:55 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Tue, 3 Feb 2004 02:55:24 +0000 (02:55 +0000)
- 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

Changelog
config.l
dgamelaunch.c
ttyplay.c
ttyplay.h

index 6c252838adbafc5158677cd370133c728434bccb..a656c4802561cbf133a243e0dfa11b41a6c35b57 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -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.
index 4da5e22217471c4b8d7b03070dc3d1c0a7ee92d2..fedf2bb53727c9e831b0435c761b7b6d758a70b8 100644 (file)
--- a/config.l
+++ b/config.l
@@ -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; 
 }
index 5e967764f148424f2cfec963036231346a46883c..98ce64834bf4c9251ad0110895111130c72a6f12 100644 (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 ();
             }
         }
index 29a7b20ceb2019ebc85502f9b32033794d425429..b07cdc4d363413d13c1ec6df6360d916aaf7947d 100644 (file)
--- a/ttyplay.c
+++ b/ttyplay.c
@@ -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,7 +232,8 @@ ttywrite (char *buf, int len)
 
   for (i = 0; i < len; i++)
   {
-    buf[i] = strip_gfx (buf[i]);
+    if (stripped != NO_GRAPHICS)
+      buf[i] = strip_gfx (buf[i]);
   }
 
   fwrite (buf, 1, len, stdout);
@@ -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;
index 042f58a979c3871fcfd07d730ef27183e40f4bc6..1dd36e85b411c8a800c89e6f4de05693bc2b2cde 100644 (file)
--- a/ttyplay.h
+++ b/ttyplay.h
@@ -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);