Go to the documentation of this file.
24 #define Function(f) {#f, f}
138 {
"pers.lastweapon",
CLOFS(pers.lastweapon),
F_ITEM},
237 p = (
void *)(base + field->
ofs);
250 len = (
int)strlen(*(
char **)p) + 1;
279 if (*(
byte **)p ==
NULL)
282 index = *(
byte **)p - ((
byte *)
InitGame);
288 if (*(
byte **)p ==
NULL)
296 gi.
error (
"WriteEdict: unknown field type");
309 p = (
void *)(base + field->
ofs);
315 len = (
int)strlen(*(
char **)p) + 1;
316 fwrite (*(
char **)p, len, 1, f);
333 p = (
void *)(base + field->
ofs);
350 fread (*(
char **)p, len, 1, f);
381 *(
byte **)p = ((
byte *)
InitGame) + index;
394 gi.
error (
"ReadEdict: unknown field type");
422 fwrite (&temp,
sizeof(temp), 1, f);
442 fread (client,
sizeof(*client), 1, f);
473 f = fopen (filename,
"wb");
475 gi.
error (
"Couldn't open %s", filename);
477 memset (str, 0,
sizeof(str));
478 strcpy (str, __DATE__);
479 fwrite (str,
sizeof(str), 1, f);
499 f = fopen (filename,
"rb");
501 gi.
error (
"Couldn't open %s", filename);
503 fread (str,
sizeof(str), 1, f);
504 if (strcmp (str, __DATE__))
507 gi.
error (
"Savegame from an older version.\n");
546 fwrite (&temp,
sizeof(temp), 1, f);
578 fwrite (&temp,
sizeof(temp), 1, f);
599 fread (ent,
sizeof(*ent), 1, f);
639 f = fopen (filename,
"wb");
641 gi.
error (
"Couldn't open %s", filename);
645 fwrite (&
i,
sizeof(
i), 1, f);
649 fwrite (&base,
sizeof(base), 1, f);
660 fwrite (&
i,
sizeof(
i), 1, f);
664 fwrite (&
i,
sizeof(
i), 1, f);
694 f = fopen (filename,
"rb");
696 gi.
error (
"Couldn't open %s", filename);
707 fread (&
i,
sizeof(
i), 1, f);
711 gi.
error (
"ReadLevel: mismatched edict size");
715 fread (&base,
sizeof(base), 1, f);
723 if (fread (&entnum,
sizeof(entnum), 1, f) != 1)
726 gi.
error (
"ReadLevel: failed to read entnum");
737 memset (&ent->
area, 0,
sizeof(ent->
area));
761 if (strcmp(ent->
classname,
"target_crosslevel_target") == 0)
void(* dprintf)(char *fmt,...)
CONST PIXELFORMATDESCRIPTOR int
void WriteField2(FILE *f, field_t *field, byte *base)
void ReadField(FILE *f, field_t *field, byte *base)
cvar_t *(* cvar)(char *var_name, char *value, int flags)
void WriteGame(char *filename, qboolean autosave)
struct gclient_s * client
void WriteClient(FILE *f, gclient_t *client)
void ReadClient(FILE *f, gclient_t *client)
void WriteField1(FILE *f, field_t *field, byte *base)
void ReadLevel(char *filename)
cvar_t * spectator_password
void ReadLevelLocals(FILE *f)
void ReadEdict(FILE *f, edict_t *ent)
void WriteLevelLocals(FILE *f)
void *(* TagMalloc)(int size, int tag)
void WriteLevel(char *filename)
void(* error)(char *fmt,...)
void(* FreeTags)(int tag)
void SaveClientData(void)
void WriteEdict(FILE *f, edict_t *ent)
void(* linkentity)(edict_t *ent)
void ReadGame(char *filename)
void Com_sprintf(char *dest, int size, char *fmt,...)