ref: 443163fc15088ab226234e9a4509eb3183574217
parent: c8b201dd2ad041eda3147b59abaacb2d2359c6d5
author: Simon Howard <[email protected]>
date: Sun Oct 9 16:19:21 EDT 2005
Handle blinking text in ENDOOM lumps properly. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 183
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_system.c 148 2005-10-02 03:23:54Z fraggle $
+// $Id: i_system.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.13 2005/10/09 20:19:21 fraggle
+// Handle blinking text in ENDOOM lumps properly.
+//
// Revision 1.12 2005/10/02 03:23:54 fraggle
// Fix the length of time that ENDOOM is displayed for
//
@@ -66,7 +69,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_system.c 148 2005-10-02 03:23:54Z fraggle $";
+rcsid[] = "$Id: i_system.c 183 2005-10-09 20:19:21Z fraggle $";
#include <stdlib.h>
@@ -191,8 +194,6 @@
screendata = TXT_GetScreenData();
memcpy(screendata, endoom_data, 4000);
- TXT_UpdateScreen();
-
// Wait for 10 seconds, or until a keypress or mouse click
waiting = true;
@@ -200,9 +201,11 @@
while (waiting && I_GetTime() < start_ms + 350)
{
+ TXT_UpdateScreen();
+
if (!SDL_PollEvent(&ev))
{
- I_Sleep(100);
+ I_Sleep(50);
continue;
}
--- 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
//
@@ -117,6 +120,16 @@
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];