Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
|
static void | TH_DrawString (char *dst, int x, int y, char *src, size_t len) |
|
static void | TH_DrawCenterString (char *dst, int x, int y, char *src, size_t len) |
|
static void | TH_DrawNumber (char *dst, int x, int y, int width, int value) |
|
static void | TH_DrawLayoutString (char *dst, const char *s) |
|
static void | SCR_ScoreShot_f (void) |
|
static void | SCR_ScoreDump_f (void) |
|
void | CL_InitAscii (void) |
|
◆ CL_RTX_SHADERBALLS
#define CL_RTX_SHADERBALLS 1 |
◆ TH_HEIGHT
◆ TH_WIDTH
◆ CL_InitAscii()
◆ SCR_ScoreDump_f()
Definition at line 348 of file ascii.c.
354 Com_Printf(
"Must be in a level.\n");
358 memset(buffer,
' ',
sizeof(buffer));
367 Com_Printf(
"%s\n", buffer);
Referenced by CL_InitAscii().
◆ SCR_ScoreShot_f()
Definition at line 293 of file ascii.c.
296 char path[MAX_OSPATH];
302 Com_Printf(
"Must be in a level.\n");
308 "scoreshots/",
Cmd_Argv(1),
".txt");
314 for (i = 0; i < 1000; i++) {
315 Q_snprintf(path,
sizeof(path),
"scoreshots/quake%03d.txt", i);
316 ret =
FS_FOpenFile(path, &f, FS_MODE_WRITE | FS_FLAG_TEXT | FS_FLAG_EXCL);
320 if (ret != Q_ERR_EXIST) {
321 Com_EPrintf(
"Couldn't exclusively open %s for writing: %s\n",
328 Com_EPrintf(
"All scoreshot slots are full.\n");
333 memset(buffer,
' ',
sizeof(buffer));
341 FS_Write(buffer,
sizeof(buffer), f);
345 Com_Printf(
"Wrote %s.\n", path);
Referenced by CL_InitAscii().
◆ TH_DrawCenterString()
static void TH_DrawCenterString |
( |
char * |
dst, |
|
|
int |
x, |
|
|
int |
y, |
|
|
char * |
src, |
|
|
size_t |
len |
|
) |
| |
|
static |
◆ TH_DrawLayoutString()
static void TH_DrawLayoutString |
( |
char * |
dst, |
|
|
const char * |
s |
|
) |
| |
|
static |
Definition at line 92 of file ascii.c.
94 char buffer[MAX_QPATH];
111 if (token[0] ==
'x') {
112 if (token[1] ==
'l') {
118 if (token[1] ==
'r') {
124 if (token[1] ==
'v') {
126 x =
TH_WIDTH / 2 - 20 + atoi(token) / 8;
131 if (token[0] ==
'y') {
132 if (token[1] ==
't') {
138 if (token[1] ==
'b') {
144 if (token[1] ==
'v') {
146 y =
TH_HEIGHT / 2 - 15 + atoi(token) / 8;
152 if (!strcmp(token,
"pic")) {
158 if (!strcmp(token,
"client")) {
160 int score, ping, time;
163 x =
TH_WIDTH / 2 - 20 + atoi(token) / 8;
165 y =
TH_HEIGHT / 2 - 15 + atoi(token) / 8;
169 if (value < 0 || value >= MAX_CLIENTS) {
170 Com_Error(ERR_DROP,
"%s: invalid client index", __func__);
183 len = strlen(ci->
name);
185 len =
Q_scnprintf(buffer,
sizeof(buffer),
"Score: %i", score);
187 len =
Q_scnprintf(buffer,
sizeof(buffer),
"Ping: %i", ping);
189 len =
Q_scnprintf(buffer,
sizeof(buffer),
"Time: %i", time);
194 if (!strcmp(token,
"ctf")) {
199 x =
TH_WIDTH / 2 - 20 + atoi(token) / 8;
201 y =
TH_HEIGHT / 2 - 15 + atoi(token) / 8;
205 if (value < 0 || value >= MAX_CLIENTS) {
206 Com_Error(ERR_DROP,
"%s: invalid client index", __func__);
218 len =
Q_scnprintf(buffer,
sizeof(buffer),
"%3d %3d %-12.12s",
219 score, ping, ci->
name);
224 if (!strcmp(token,
"picn")) {
230 if (!strcmp(token,
"num")) {
236 if (value < 0 || value >= MAX_STATS) {
237 Com_Error(ERR_DROP,
"%s: invalid stat index", __func__);
244 if (!strcmp(token,
"stat_string")) {
247 if (index < 0 || index >= MAX_STATS) {
248 Com_Error(ERR_DROP,
"%s: invalid string index", __func__);
251 if (index < 0 || index >= MAX_CONFIGSTRINGS) {
252 Com_Error(ERR_DROP,
"%s: invalid string index", __func__);
259 if (!strncmp(token,
"cstring", 7)) {
266 if (!strncmp(token,
"string", 6)) {
273 if (!strcmp(token,
"if")) {
276 if (value < 0 || value >= MAX_STATS) {
277 Com_Error(ERR_DROP,
"%s: invalid stat index", __func__);
281 while (strcmp(token,
"endif")) {
Referenced by SCR_ScoreDump_f(), and SCR_ScoreShot_f().
◆ TH_DrawNumber()
◆ TH_DrawString()
static void TH_DrawString |
( |
char * |
dst, |
|
|
int |
x, |
|
|
int |
y, |
|
|
char * |
src, |
|
|
size_t |
len |
|
) |
| |
|
static |
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
qhandle_t FS_EasyOpenFile(char *buf, size_t size, unsigned mode, const char *dir, const char *name, const char *ext)
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
void Cmd_AddCommand(const char *name, xcommand_t function)
const char * Q_ErrorString(qerror_t error)
static void SCR_ScoreDump_f(void)
static void TH_DrawLayoutString(char *dst, const char *s)
ssize_t FS_FOpenFile(const char *name, qhandle_t *f, unsigned mode)
void Com_Error(error_type_t type, const char *fmt,...)
char layout[MAX_NET_STRING]
static void SCR_ScoreShot_f(void)
clientinfo_t clientinfo[MAX_CLIENTS]
static void TH_DrawString(char *dst, int x, int y, char *src, size_t len)
ssize_t FS_Write(const void *buf, size_t len, qhandle_t f)
char * COM_Parse(const char **data_p)
void FS_FCloseFile(qhandle_t f)
static void TH_DrawCenterString(char *dst, int x, int y, char *src, size_t len)
size_t Q_scnprintf(char *dest, size_t size, const char *fmt,...)
static void TH_DrawNumber(char *dst, int x, int y, int width, int value)