Odamex
Setting the Standard in Multiplayer Doom
client/src/v_text.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*- 
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: v_text.h 1788 2010-08-24 04:42:57Z russellrice $
00005 //
00006 // Copyright (C) 1998-2006 by Randy Heit (ZDoom 1.22).
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // DESCRIPTION:
00020 //      V_TEXT
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 
00025 #ifndef __V_TEXT_H__
00026 #define __V_TEXT_H__
00027 
00028 #include "doomtype.h"
00029 
00030 struct brokenlines_s {
00031         int width;
00032         char *string;
00033 };
00034 typedef struct brokenlines_s brokenlines_t;
00035 
00036 #define CR_BRICK                        0
00037 #define CR_TAN                          1
00038 #define CR_GRAY                         2
00039 #define CR_GREY                         2
00040 #define CR_GREEN                        3
00041 #define CR_BROWN                        4
00042 #define CR_GOLD                         5
00043 #define CR_RED                          6
00044 #define CR_BLUE                         7
00045 #define CR_ORANGE                       8
00046 #define CR_YELLOW                       9
00047 #define CR_WHITE                        10
00048 #define NUM_TEXT_COLORS         11
00049 
00050 #define TEXTCOLOR_BRICK         "\x8aA"
00051 #define TEXTCOLOR_TAN           "\x8aB"
00052 #define TEXTCOLOR_GRAY          "\x8aC"
00053 #define TEXTCOLOR_GREY          "\x8aC"
00054 #define TEXTCOLOR_GREEN         "\x8aD"
00055 #define TEXTCOLOR_BROWN         "\x8aE"
00056 #define TEXTCOLOR_GOLD          "\x8aF"
00057 #define TEXTCOLOR_RED           "\x8aG"
00058 #define TEXTCOLOR_BLUE          "\x8aH"
00059 #define TEXTCOLOR_ORANGE        "\x8aI"
00060 #define TEXTCOLOR_WHITE         "\x8aJ"
00061 #define TEXTCOLOR_YELLOW        "\x8aK"
00062 
00063 #define TEXTCOLOR_NORMAL        "\x8a-"
00064 #define TEXTCOLOR_BOLD          "\x8a+"
00065 
00066 int V_StringWidth (const byte *str);
00067 inline int V_StringWidth (const char *str) { return V_StringWidth ((const byte *)str); }
00068 
00069 brokenlines_t *V_BreakLines (int maxwidth, const byte *str);
00070 void V_FreeBrokenLines (brokenlines_t *lines);
00071 inline brokenlines_t *V_BreakLines (int maxwidth, const char *str) { return V_BreakLines (maxwidth, (const byte *)str); }
00072 
00073 void V_InitConChars (byte transcolor);
00074 
00075 #endif //__V_TEXT_H__
00076 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends