From 443163fc15088ab226234e9a4509eb3183574217 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 9 Oct 2005 20:19:21 +0000 Subject: Handle blinking text in ENDOOM lumps properly. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 183 --- textscreen/txt_main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'textscreen/txt_main.c') 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) -- cgit v1.2.3