mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
remove redundant files
This commit is contained in:
parent
9f69abff14
commit
cff964427a
12 changed files with 0 additions and 826 deletions
146
nq/include/cmd.h
146
nq/include/cmd.h
|
@ -1,146 +0,0 @@
|
|||
/*
|
||||
cmd.h
|
||||
|
||||
@description@
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __cmd_h
|
||||
#define __cmd_h
|
||||
|
||||
#include "qtypes.h"
|
||||
#include "cvar.h"
|
||||
|
||||
//===========================================================================
|
||||
|
||||
/*
|
||||
|
||||
Any number of commands can be added in a frame, from several different sources.
|
||||
Most commands come from either keybindings or console line input, but remote
|
||||
servers can also send across commands and entire text files can be execed.
|
||||
|
||||
The + command line options are also added to the command buffer.
|
||||
|
||||
The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute ();
|
||||
|
||||
*/
|
||||
|
||||
|
||||
void Cbuf_Init (void);
|
||||
// allocates an initial text buffer that will grow as needed
|
||||
|
||||
void Cbuf_AddText (char *text);
|
||||
// as new commands are generated from the console or keybindings,
|
||||
// the text is added to the end of the command buffer.
|
||||
|
||||
void Cbuf_InsertText (char *text);
|
||||
// when a command wants to issue other commands immediately, the text is
|
||||
// inserted at the beginning of the buffer, before any remaining unexecuted
|
||||
// commands.
|
||||
|
||||
void Cbuf_Execute (void);
|
||||
// Pulls off \n terminated lines of text from the command buffer and sends
|
||||
// them through Cmd_ExecuteString. Stops when the buffer is empty.
|
||||
// Normally called once per frame, but may be explicitly invoked.
|
||||
// Do not call inside a command function!
|
||||
|
||||
//===========================================================================
|
||||
|
||||
/*
|
||||
|
||||
Command execution takes a null terminated string, breaks it into tokens,
|
||||
then searches for a command or variable that matches the first token.
|
||||
|
||||
Commands can come from three sources, but the handler functions may choose
|
||||
to dissallow the action or forward it to a remote server if the source is
|
||||
not apropriate.
|
||||
|
||||
*/
|
||||
|
||||
typedef void (*xcommand_t) (void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
src_client, // came in over a net connection as a clc_stringcmd
|
||||
// host_client will be valid during this state.
|
||||
src_command // from the command buffer
|
||||
} cmd_source_t;
|
||||
|
||||
extern cmd_source_t cmd_source;
|
||||
|
||||
void Cmd_Init (void);
|
||||
|
||||
void Cmd_AddCommand (char *cmd_name, xcommand_t function);
|
||||
// called by the init functions of other parts of the program to
|
||||
// register commands and functions to call for them.
|
||||
// The cmd_name is referenced later, so it should not be in temp memory
|
||||
|
||||
qboolean Cmd_Exists (char *cmd_name);
|
||||
// used by the cvar code to check for cvar / command name overlap
|
||||
|
||||
char *Cmd_CompleteCommand (char *partial);
|
||||
// attempts to match a partial command for automatic command line completion
|
||||
// returns NULL if nothing fits
|
||||
|
||||
int Cmd_Argc (void);
|
||||
char *Cmd_Argv (int arg);
|
||||
char *Cmd_Args (void);
|
||||
// The functions that execute commands get their parameters with these
|
||||
// functions. Cmd_Argv () will return an empty string, not a NULL
|
||||
// if arg > argc, so string operations are allways safe.
|
||||
|
||||
int Cmd_CheckParm (char *parm);
|
||||
// Returns the position (1 to argc-1) in the command's argument list
|
||||
// where the given parameter apears, or 0 if not present
|
||||
|
||||
void Cmd_TokenizeString (char *text);
|
||||
// Takes a null terminated string. Does not need to be /n terminated.
|
||||
// breaks the string up into arg tokens.
|
||||
|
||||
void Cmd_ExecuteString (char *text, cmd_source_t src);
|
||||
// Parses a single line of text into arguments and tries to execute it.
|
||||
// The text can come from the command buffer, a remote client, or stdin.
|
||||
|
||||
void Cmd_ForwardToServer (void);
|
||||
// adds the current command line as a clc_stringcmd to the client message.
|
||||
// things like godmode, noclip, etc, are commands directed to the server,
|
||||
// so when they are typed in at the console, they will need to be forwarded.
|
||||
|
||||
void Cmd_Print (char *text);
|
||||
// used by command functions to send output to either the graphics console or
|
||||
// passed as a print message to the client
|
||||
|
||||
void Cmd_StuffCmds_f (void);
|
||||
|
||||
void Cbuf_Execute_Sets (void);
|
||||
void Cmd_Exec_File (char *path);
|
||||
|
||||
|
||||
#define MAX_COM_TOKEN 1024
|
||||
extern char com_token[MAX_COM_TOKEN];
|
||||
char *COM_Parse (char *data);
|
||||
|
||||
extern struct cvar_s *cl_warncmd;
|
||||
|
||||
#endif __cmd_h
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
compat.h
|
||||
|
||||
Miscellaneous compability stuff
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_H
|
||||
#define _COMPAT_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
#ifndef max
|
||||
# define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef min
|
||||
# define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef bound
|
||||
# define bound(a,b,c) (max(a, min(b, c)))
|
||||
#endif
|
||||
/* This fixes warnings when compiling with -pedantic */
|
||||
#if defined(__GNUC__) && !defined(inline)
|
||||
# define inline __inline__
|
||||
#endif
|
||||
|
||||
/* These may be underscored... */
|
||||
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(__BORLANDC__)
|
||||
# define kbhit _kbhit
|
||||
#endif
|
||||
|
||||
/* If we don't have them in the C-library we declare them to avoid warnings */
|
||||
#if ! (defined(HAVE_SNPRINTF) || defined(HAVE__SNPRINTF))
|
||||
extern int snprintf(char * s, size_t maxlen, const char *format, ...);
|
||||
#endif
|
||||
#if ! (defined(HAVE_VSNPRINTF) || defined(HAVE__VSNPRINTF))
|
||||
extern int vsnprintf(char *s, size_t maxlen, const char *format, va_list arg);
|
||||
#endif
|
||||
|
||||
#endif // _COMPAT_H
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
console.h
|
||||
|
||||
@description@
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __console_h
|
||||
#define __console_h
|
||||
|
||||
#include "qtypes.h"
|
||||
|
||||
//
|
||||
// console
|
||||
//
|
||||
extern int con_totallines;
|
||||
extern int con_backscroll;
|
||||
extern qboolean con_forcedup; // because no entities to refresh
|
||||
extern qboolean con_initialized;
|
||||
extern byte *con_chars;
|
||||
extern int con_notifylines; // scan lines to clear for notify lines
|
||||
|
||||
void Con_DrawCharacter (int cx, int line, int num);
|
||||
|
||||
void Con_CheckResize (void);
|
||||
void Con_Init (void);
|
||||
void Con_DrawConsole (int lines, qboolean drawinput);
|
||||
void Con_Print (char *txt);
|
||||
void Con_Printf (char *fmt, ...);
|
||||
void Con_DPrintf (char *fmt, ...);
|
||||
void Con_SafePrintf (char *fmt, ...);
|
||||
void Con_Clear_f (void);
|
||||
void Con_DrawNotify (void);
|
||||
void Con_ClearNotify (void);
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
void Con_NotifyBox (char *text); // during startup for sound / cd warnings
|
||||
|
||||
#endif // __console_h
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
gcc_attr.h
|
||||
|
||||
GCC __attribute__ protection for lame compilers.
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _GCC_ATTR_H
|
||||
#define _GCC_ATTR_H
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#endif // _GCC_ATTR_H
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
mdfour.h
|
||||
|
||||
an implementation of MD4 designed for use in the SMB authentication
|
||||
protocol
|
||||
|
||||
Copyright (C) Andrew Tridgell 1997-1998
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _MDFOUR_H
|
||||
#define _MDFOUR_H
|
||||
|
||||
#include "uint32.h"
|
||||
|
||||
#define MDFOUR_DIGEST_BYTES 16
|
||||
|
||||
struct mdfour {
|
||||
uint32 A, B, C, D;
|
||||
uint32 totalN;
|
||||
};
|
||||
|
||||
void mdfour_begin(struct mdfour *md); // old: MD4Init
|
||||
void mdfour_update(struct mdfour *md, unsigned char *in, int n); //old: MD4Update
|
||||
void mdfour_result(struct mdfour *md, unsigned char *out); // old: MD4Final
|
||||
void mdfour(unsigned char *out, unsigned char *in, int n);
|
||||
|
||||
#endif // _MDFOUR_H
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
qargs.h
|
||||
|
||||
(description)
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
||||
Please see the file "AUTHORS" for a list of contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __qargs_h
|
||||
#define __qargs_h
|
||||
|
||||
#include <qtypes.h>
|
||||
|
||||
extern int com_argc;
|
||||
extern char **com_argv;
|
||||
extern char *com_cmdline;
|
||||
|
||||
int COM_CheckParm (char *parm);
|
||||
void COM_AddParm (char *parm);
|
||||
|
||||
void COM_Init (void);
|
||||
void COM_InitArgv (int argc, char **argv);
|
||||
|
||||
#endif // __qargs_h
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
qendian.h
|
||||
|
||||
(description)
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
||||
Please see the file "AUTHORS" for a list of contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _QENDIAN_H
|
||||
#define _QENDIAN_H
|
||||
|
||||
#include "qtypes.h"
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
||||
#define Q_MAXCHAR ((char)0x7f)
|
||||
#define Q_MAXSHORT ((short)0x7fff)
|
||||
#define Q_MAXINT ((int)0x7fffffff)
|
||||
#define Q_MAXLONG ((int)0x7fffffff)
|
||||
#define Q_MAXFLOAT ((int)0x7fffffff)
|
||||
|
||||
#define Q_MINCHAR ((char)0x80)
|
||||
#define Q_MINSHORT ((short)0x8000)
|
||||
#define Q_MININT ((int)0x80000000)
|
||||
#define Q_MINLONG ((int)0x80000000)
|
||||
#define Q_MINFLOAT ((int)0x7fffffff)
|
||||
|
||||
//============================================================================
|
||||
|
||||
extern qboolean bigendien;
|
||||
extern short (*BigShort) (short l);
|
||||
extern short (*LittleShort) (short l);
|
||||
extern int (*BigLong) (int l);
|
||||
extern int (*LittleLong) (int l);
|
||||
extern float (*BigFloat) (float l);
|
||||
extern float (*LittleFloat) (float l);
|
||||
|
||||
short ShortSwap (short l);
|
||||
short ShortNoSwap (short l);
|
||||
int LongSwap (int l);
|
||||
int LongNoSwap (int l);
|
||||
float FloatSwap (float f);
|
||||
float FloatNoSwap (float f);
|
||||
|
||||
//============================================================================
|
||||
|
||||
#endif // _QENDIAN_H
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
quakefs.h
|
||||
|
||||
quake virtual filesystem definitions
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
||||
Please see the file "AUTHORS" for a list of contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _QUAKEFS_H
|
||||
#define _QUAKEFS_H
|
||||
|
||||
#include "qtypes.h"
|
||||
#include "quakeio.h"
|
||||
#include "cvar.h"
|
||||
|
||||
//============================================================================
|
||||
|
||||
#define MAX_OSPATH 128 // max length of a filesystem pathname
|
||||
|
||||
extern cvar_t *fs_userpath;
|
||||
extern cvar_t *fs_sharepath;
|
||||
|
||||
extern int com_filesize;
|
||||
struct cache_user_s;
|
||||
|
||||
extern char com_gamedir[MAX_OSPATH];
|
||||
extern char gamedirfile[MAX_OSPATH];
|
||||
|
||||
void COM_WriteFile (char *filename, void *data, int len);
|
||||
int COM_FOpenFile (char *filename, QFile **gzfile);
|
||||
void COM_CloseFile (QFile *h);
|
||||
int COM_filelength (QFile *f);
|
||||
void COM_FileBase (char *in, char *out);
|
||||
void COM_DefaultExtension (char *path, char *extension);
|
||||
char *COM_SkipPath (char *pathname);
|
||||
void COM_StripExtension (char *in, char *out);
|
||||
|
||||
byte *COM_LoadStackFile (char *path, void *buffer, int bufsize);
|
||||
byte *COM_LoadTempFile (char *path);
|
||||
byte *COM_LoadHunkFile (char *path);
|
||||
void COM_LoadCacheFile (char *path, struct cache_user_s *cu);
|
||||
void COM_CreatePath (char *path);
|
||||
void COM_Gamedir (char *dir);
|
||||
void COM_InitFilesystem (void);
|
||||
void COM_Path_f (void);
|
||||
void COM_Maplist_f (void);
|
||||
|
||||
#endif // _QUAKEFS_H
|
|
@ -1 +0,0 @@
|
|||
timestamp
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
sys.h
|
||||
|
||||
@description@
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// file IO
|
||||
//
|
||||
|
||||
// returns the file size
|
||||
// return -1 if file is not present
|
||||
// the file should be in BINARY mode for stupid OSs that care
|
||||
int Sys_FileOpenRead (char *path, int *hndl);
|
||||
|
||||
int Sys_FileOpenWrite (char *path);
|
||||
void Sys_FileClose (int handle);
|
||||
void Sys_FileSeek (int handle, int position);
|
||||
int Sys_FileRead (int handle, void *dest, int count);
|
||||
int Sys_FileWrite (int handle, void *data, int count);
|
||||
int Sys_FileTime (char *path);
|
||||
void Sys_mkdir (char *path);
|
||||
|
||||
//
|
||||
// memory protection
|
||||
//
|
||||
void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length);
|
||||
|
||||
//
|
||||
// system IO
|
||||
//
|
||||
void Sys_DebugLog(char *file, char *fmt, ...);
|
||||
|
||||
void __attribute__((noreturn)) Sys_Error (char *error, ...);
|
||||
// an error will cause the entire program to exit
|
||||
|
||||
void Sys_Printf (char *fmt, ...);
|
||||
// send text to the console
|
||||
|
||||
void Sys_Quit (void);
|
||||
|
||||
double Sys_DoubleTime (void);
|
||||
|
||||
char *Sys_ConsoleInput (void);
|
||||
|
||||
void Sys_Sleep (void);
|
||||
// called to yield for a little bit so as
|
||||
// not to hog cpu when paused or debugging
|
||||
|
||||
void Sys_LowFPPrecision (void);
|
||||
void Sys_HighFPPrecision (void);
|
||||
void Sys_SetFPCW (void);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
uint32.h
|
||||
|
||||
Definitions for portable (?) unsigned int
|
||||
|
||||
Copyright (C) 2000 Jeff Teunissen <d2deek@pmail.net>
|
||||
|
||||
Author: Jeff Teunissen <d2deek@pmail.net>
|
||||
Date: 01 Jan 2000
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _UINT32_H
|
||||
#define _UINT32_H
|
||||
|
||||
#ifndef int32
|
||||
#if (SIZEOF_INT == 4)
|
||||
#define int32 int
|
||||
#elif (SIZEOF_LONG == 4)
|
||||
#define int32 long
|
||||
#elif (SIZEOF_SHORT == 4)
|
||||
#define int32 short
|
||||
#else
|
||||
/* I hope this works */
|
||||
#define int32 int
|
||||
#define LARGE_INT32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef uint32
|
||||
#define uint32 unsigned int32
|
||||
#endif
|
||||
|
||||
#endif // _UINT32_H
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
zone.h
|
||||
|
||||
@description@
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __zone_h
|
||||
#define __zone_h
|
||||
|
||||
/*
|
||||
memory allocation
|
||||
|
||||
|
||||
H_??? The hunk manages the entire memory block given to quake. It must be
|
||||
contiguous. Memory can be allocated from either the low or high end in a
|
||||
stack fashion. The only way memory is released is by resetting one of the
|
||||
pointers.
|
||||
|
||||
Hunk allocations should be given a name, so the Hunk_Print () function
|
||||
can display usage.
|
||||
|
||||
Hunk allocations are guaranteed to be 16 byte aligned.
|
||||
|
||||
The video buffers are allocated high to avoid leaving a hole underneath
|
||||
server allocations when changing to a higher video mode.
|
||||
|
||||
|
||||
Z_??? Zone memory functions used for small, dynamic allocations like text
|
||||
strings from command input. There is only about 48K for it, allocated at
|
||||
the very bottom of the hunk.
|
||||
|
||||
Cache_??? Cache memory is for objects that can be dynamically loaded and
|
||||
can usefully stay persistant between levels. The size of the cache
|
||||
fluctuates from level to level.
|
||||
|
||||
To allocate a cachable object
|
||||
|
||||
|
||||
Temp_??? Temp memory is used for file loading and surface caching. The size
|
||||
of the cache memory is adjusted so that there is a minimum of 512k remaining
|
||||
for temp memory.
|
||||
|
||||
|
||||
------ Top of Memory -------
|
||||
|
||||
high hunk allocations
|
||||
|
||||
<--- high hunk reset point held by vid
|
||||
|
||||
video buffer
|
||||
|
||||
z buffer
|
||||
|
||||
surface cache
|
||||
|
||||
<--- high hunk used
|
||||
|
||||
cachable memory
|
||||
|
||||
<--- low hunk used
|
||||
|
||||
client and server low hunk allocations
|
||||
|
||||
<-- low hunk reset point held by host
|
||||
|
||||
startup hunk allocations
|
||||
|
||||
Zone block
|
||||
|
||||
----- Bottom of Memory -----
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
void Memory_Init (void *buf, int size);
|
||||
|
||||
void Z_Free (void *ptr);
|
||||
void *Z_Malloc (int size); // returns 0 filled memory
|
||||
void *Z_TagMalloc (int size, int tag);
|
||||
|
||||
void Z_DumpHeap (void);
|
||||
void Z_CheckHeap (void);
|
||||
int Z_FreeMemory (void);
|
||||
|
||||
void *Hunk_Alloc (int size); // returns 0 filled memory
|
||||
void *Hunk_AllocName (int size, char *name);
|
||||
|
||||
void *Hunk_HighAllocName (int size, char *name);
|
||||
|
||||
int Hunk_LowMark (void);
|
||||
void Hunk_FreeToLowMark (int mark);
|
||||
|
||||
int Hunk_HighMark (void);
|
||||
void Hunk_FreeToHighMark (int mark);
|
||||
|
||||
void *Hunk_TempAlloc (int size);
|
||||
|
||||
void Hunk_Check (void);
|
||||
|
||||
typedef struct cache_user_s
|
||||
{
|
||||
void *data;
|
||||
} cache_user_t;
|
||||
|
||||
void Cache_Flush (void);
|
||||
|
||||
void *Cache_Check (cache_user_t *c);
|
||||
// returns the cached data, and moves to the head of the LRU list
|
||||
// if present, otherwise returns NULL
|
||||
|
||||
void Cache_Free (cache_user_t *c);
|
||||
|
||||
void *Cache_Alloc (cache_user_t *c, int size, char *name);
|
||||
// Returns NULL if all purgable data was tossed and there still
|
||||
// wasn't enough room.
|
||||
|
||||
void Cache_Report (void);
|
||||
|
||||
#endif // __zone_h
|
Loading…
Reference in a new issue