summaryrefslogtreecommitdiff
path: root/textscreen/txt_main.c
diff options
context:
space:
mode:
authorSimon Howard2005-10-09 20:19:21 +0000
committerSimon Howard2005-10-09 20:19:21 +0000
commit443163fc15088ab226234e9a4509eb3183574217 (patch)
tree5735a0e980edc59fb92a35b306447ec772b06ad4 /textscreen/txt_main.c
parentc8b201dd2ad041eda3147b59abaacb2d2359c6d5 (diff)
downloadchocolate-doom-443163fc15088ab226234e9a4509eb3183574217.tar.gz
chocolate-doom-443163fc15088ab226234e9a4509eb3183574217.tar.bz2
chocolate-doom-443163fc15088ab226234e9a4509eb3183574217.zip
Handle blinking text in ENDOOM lumps properly.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 183
Diffstat (limited to 'textscreen/txt_main.c')
-rw-r--r--textscreen/txt_main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/textscreen/txt_main.c b/textscreen/txt_main.c
index 530e4bd3..049549e3 100644
--- a/textscreen/txt_main.c
+++ b/textscreen/txt_main.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: txt_main.c 181 2005-10-09 16:42:46Z fraggle $
+// $Id: txt_main.c 183 2005-10-09 20:19:21Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.3 2005/10/09 20:19:21 fraggle
+// Handle blinking text in ENDOOM lumps properly.
+//
// Revision 1.2 2005/10/09 16:42:46 fraggle
// Cannot do arithmetic on void pointers in standard C
//
@@ -118,6 +121,16 @@ static inline void UpdateCharacter(int x, int y)
fg = p[1] & 0xf;
bg = (p[1] >> 4) & 0xf;
+ if (bg & 0x8)
+ {
+ // blinking
+
+ bg &= ~0x8;
+
+ if (SDL_GetTicks() % 500 < 250)
+ fg = bg;
+ }
+
p = &int10_font_16[character * CHAR_H];
s = ((unsigned char *) screen->pixels)