Nuclide
Software Development Kit for id Technology
sentences.h
1/*
2 * Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
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
76#ifdef SERVER
77#define DYNAMIC_SENTENCES
78
79#ifdef DYNAMIC_SENTENCES
80 string *g_sentences;
82#else
83 #define SENTENCES_LIMIT 1024
84 string g_sentences[SENTENCES_LIMIT];
86#endif
87
89string Sentences_GetSamples(string);
91int Sentences_GetID(string);
92
93
94#endif
95
96#ifdef CLIENT
98string Sentences_GetString(int id);
99
101void Sentences_Shutdown(void);
102
103#endif
104 // end of sentences
106
108void Sentences_Init(void);
109
110var hashtable g_hashsentences;
string * g_sentences
Definition: sentences.h:80
void Sentences_Shutdown(void)
Called by CSQC_Shutdown() when the client game exits to clear the sentences buffer.
Definition: sentences.qc:40
int Sentences_GetID(string)
Returns the shared network ID for a given sentence.
Definition: sentences.qc:283
string Sentences_GetString(int id)
Gets the sentences string for a given id.
Definition: sentences.qc:163
int g_sentences_count
Definition: sentences.h:81
string Sentences_GetSamples(string)
Returns a string of sample for a given sentence.
Definition: sentences.qc:149