2014-03-15 16:59:03 +00:00
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1993-1996 by id Software, Inc.
// Copyright (C) 1998-2000 by DooM Legacy Team.
2016-07-06 04:09:17 +00:00
// Copyright (C) 1999-2016 by Sonic Team Junior.
2014-03-15 16:59:03 +00:00
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file hu_stuff.h
/// \brief Heads up display
# ifndef __HU_STUFF_H__
# define __HU_STUFF_H__
# include "d_event.h"
# include "w_wad.h"
# include "r_defs.h"
//------------------------------------
// heads up font
//------------------------------------
2018-06-30 22:18:13 +00:00
# define HU_FONTSTART '\x19' // the first font character
2014-03-15 16:59:03 +00:00
# define HU_FONTEND '~'
# define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
2016-08-15 03:51:08 +00:00
// SRB2kart
# define KART_FONTSTART '\"' // the first font character
# define KART_FONTEND 'Z'
# define KART_FONTSIZE (KART_FONTEND - KART_FONTSTART + 1)
//
2014-03-15 16:59:03 +00:00
// Level title font
# define LT_FONTSTART '!' // the first font characters
# define LT_FONTEND 'Z' // the last font characters
# define LT_FONTSIZE (LT_FONTEND - LT_FONTSTART + 1)
# define CRED_FONTSTART '!' // the first font character
# define CRED_FONTEND 'Z' // the last font character
# define CRED_FONTSIZE (CRED_FONTEND - CRED_FONTSTART + 1)
# define HU_CROSSHAIRS 3 // maximum of 9 - see HU_Init();
extern char * shiftxform ; // english translation shift table
extern char english_shiftxform [ ] ;
//------------------------------------
// sorted player lines
//------------------------------------
typedef struct
{
UINT32 count ;
INT32 num ;
const char * name ;
} playersort_t ;
//------------------------------------
// chat stuff
//------------------------------------
# define HU_MAXMSGLEN 224
2016-08-15 03:51:08 +00:00
extern patch_t * hu_font [ HU_FONTSIZE ] , * kart_font [ KART_FONTSIZE ] , * tny_font [ HU_FONTSIZE ] ; // SRB2kart
2014-03-15 16:59:03 +00:00
extern patch_t * tallnum [ 10 ] ;
extern patch_t * nightsnum [ 10 ] ;
extern patch_t * lt_font [ LT_FONTSIZE ] ;
extern patch_t * cred_font [ CRED_FONTSIZE ] ;
extern patch_t * emeraldpics [ 7 ] ;
extern patch_t * tinyemeraldpics [ 7 ] ;
extern patch_t * rflagico ;
extern patch_t * bflagico ;
extern patch_t * rmatcico ;
extern patch_t * bmatcico ;
extern patch_t * tagico ;
extern patch_t * tallminus ;
2017-12-19 00:07:38 +00:00
extern patch_t * iconprefix [ MAXSKINS ] ;
2014-03-15 16:59:03 +00:00
2018-06-15 10:20:01 +00:00
# define CHAT_BUFSIZE 64 // that's enough messages, right? We'll delete the older ones when that gets out of hand.
2018-10-10 19:24:55 +00:00
# define OLDCHAT (cv_consolechat.value == 1 || dedicated || vid.width < 640)
2018-10-03 18:09:32 +00:00
# define CHAT_MUTE (cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this still allows to open the chat but not to type. That's used for scrolling and whatnot.
# define OLD_MUTE (OLDCHAT && cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this is used to prevent oldchat from opening when muted.
2018-08-03 22:01:09 +00:00
2018-06-15 10:20:01 +00:00
// some functions
2018-10-10 19:24:55 +00:00
void HU_AddChatText ( const char * text , boolean playsound ) ;
2018-06-15 10:20:01 +00:00
2014-03-15 16:59:03 +00:00
// set true when entering a chat message
extern boolean chat_on ;
// set true whenever the tab rankings are being shown for any reason
extern boolean hu_showscores ;
// init heads up data at game startup.
void HU_Init ( void ) ;
void HU_LoadGraphics ( void ) ;
// reset heads up when consoleplayer respawns.
2018-07-07 15:52:01 +00:00
void HU_Start ( void ) ;
2014-03-15 16:59:03 +00:00
boolean HU_Responder ( event_t * ev ) ;
void HU_Ticker ( void ) ;
void HU_Drawer ( void ) ;
char HU_dequeueChatChar ( void ) ;
void HU_Erase ( void ) ;
void HU_clearChatChars ( void ) ;
2018-06-15 10:20:01 +00:00
void HU_drawPing ( INT32 x , INT32 y , INT32 ping , boolean notext ) ; // Lat': Ping drawer for scoreboard.
2014-03-15 16:59:03 +00:00
void HU_DrawTeamTabRankings ( playersort_t * tab , INT32 whiteplayer ) ;
void HU_DrawDualTabRankings ( INT32 x , INT32 y , playersort_t * tab , INT32 scorelines , INT32 whiteplayer ) ;
2018-07-18 20:40:04 +00:00
void HU_DrawTabRankings ( INT32 x , INT32 y , playersort_t * tab , INT32 scorelines , INT32 whiteplayer , INT32 hilicol ) ;
2018-07-18 19:23:46 +00:00
//void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer);
//void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer);
2014-03-15 16:59:03 +00:00
void HU_DrawEmeralds ( INT32 x , INT32 y , INT32 pemeralds ) ;
INT32 HU_CreateTeamScoresTbl ( playersort_t * tab , UINT32 dmtotals [ ] ) ;
// CECHO interface.
void HU_ClearCEcho ( void ) ;
void HU_SetCEchoDuration ( INT32 seconds ) ;
void HU_SetCEchoFlags ( INT32 flags ) ;
void HU_DoCEcho ( const char * msg ) ;
// Demo playback info
extern UINT32 hu_demotime ;
2018-01-22 00:15:26 +00:00
extern UINT32 hu_demolap ;
2014-03-15 16:59:03 +00:00
# endif