Nuclide
Software Development Kit for id Tech
text.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016-2022 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
23typedef struct
24{
25 string m_strMessage;
26 float m_flPosX;
27 float m_flPosY;
29 vector m_vecColor1;
30 vector m_vecColor2;
31 float m_flFadeIn;
34 float m_flFXTime;
35 float m_flTime;
36} hudText_t;
37
40
41#define TEXTQUEUE_MAX 6
42
45
48
58void GameText_Draw(void);
59
69void GameMessage_Setup(string strMessage, int iChannel);
70
74void GameText_Parse(void);
75
79void GameMessage_Parse(void);
80 // end of client
void GameText_Draw(void)
Used by Nuclide to draw all active text channels to the screen.
Definition: text.qc:150
void GameMessage_Setup(string strMessage, int iChannel)
Places a message within a specified channel.
Definition: text.qc:262
void GameText_Parse(void)
Used by Nuclide to parse a message delivered by the game_text entity.
Definition: text.qc:235
void GameMessage_Parse(void)
Used by Nuclide to parse a message delivered by the env_message entity.
Definition: text.qc:312
Definition of a text channel.
Definition: text.h:24
float m_flFadeOut
Time in seconds it takes for the text to fade out.
Definition: text.h:32
int m_iEffect
Effect to use when rendering the text.
Definition: text.h:28
float m_flTime
The time that's passed on the active channel.
Definition: text.h:35
float m_flHoldTime
Time in seconds on which we'll hold onto the text.
Definition: text.h:33
vector m_vecColor2
Secondary text color for use with effects.
Definition: text.h:30
string m_strMessage
the message contents.
Definition: text.h:25
float m_flPosY
Normalized starting position on the X-axis.
Definition: text.h:27
float m_flFXTime
Time in seconds that it takes for the effect to finish.
Definition: text.h:34
float m_flFadeIn
Time in seconds it takes for the text to fade in.
Definition: text.h:31
float m_flPosX
Normalized starting position on the X-axis.
Definition: text.h:26
vector m_vecColor1
Primary text color.
Definition: text.h:29
int g_textqueue_count
Definition: text.h:47
hudText_t g_textqueue[6]
this is reserved for channel 0
Definition: text.h:44
#define TEXTQUEUE_MAX
Definition: text.h:41
int g_textqueue_next
Definition: text.h:46
hudText_t g_textchannels[6]
Global pool of text channels.
Definition: text.h:39