2010-02-15 23:26:55 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 1996-2001 Id Software, Inc.
|
2014-09-22 08:55:46 +00:00
|
|
|
Copyright (C) 2010-2014 QuakeSpasm developers
|
2010-02-15 23:26:55 +00:00
|
|
|
|
|
|
|
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 the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
*/
|
bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h,
d_ifacea.h, draw.h, gl_texmgr.h, glquake.h, image.h, input.h, keys.h, mathlib.h,
menu.h, modelgen.h, net.h, net_dgrm.h, net_loop.h, net_sdlnet.h, net_udp.h,
net_wins.h, platform.h, pr_comp.h, progdefs.h, progs.h, protocol.h, quakedef.h,
render.h, resource.h, sbar.h, screen.h, server.h, sound.h, spritegn.h, sys.h,
vid.h, view.h, wad.h, world.h, zone.h: added include guards to the headers.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +00:00
|
|
|
|
|
|
|
#ifndef _QUAKE_SYS_H
|
|
|
|
#define _QUAKE_SYS_H
|
|
|
|
|
2010-02-15 23:26:55 +00:00
|
|
|
// sys.h -- non-portable functions
|
|
|
|
|
2010-06-22 11:01:24 +00:00
|
|
|
void Sys_Init (void);
|
|
|
|
|
2010-02-15 23:26:55 +00:00
|
|
|
//
|
|
|
|
// file IO
|
|
|
|
//
|
|
|
|
|
2011-12-12 16:01:01 +00:00
|
|
|
// returns the file size or -1 if file is not present.
|
2010-02-15 23:26:55 +00:00
|
|
|
// the file should be in BINARY mode for stupid OSs that care
|
2021-07-10 19:13:56 +00:00
|
|
|
qofs_t Sys_FileOpenRead (const char *path, int *hndl);
|
2010-08-29 02:22:55 +00:00
|
|
|
int Sys_FileOpenWrite (const char *path);
|
2017-09-17 02:12:53 +00:00
|
|
|
int Sys_FileOpenStdio (FILE *file);
|
|
|
|
|
2010-02-15 23:26:55 +00:00
|
|
|
void Sys_FileClose (int handle);
|
2021-07-10 19:13:56 +00:00
|
|
|
void Sys_FileSeek (int handle, qofs_t position);
|
2010-02-15 23:26:55 +00:00
|
|
|
int Sys_FileRead (int handle, void *dest, int count);
|
2010-08-29 02:22:55 +00:00
|
|
|
int Sys_FileWrite (int handle,const void *data, int count);
|
|
|
|
void Sys_mkdir (const char *path);
|
2010-02-15 23:26:55 +00:00
|
|
|
|
2022-10-25 07:35:20 +00:00
|
|
|
int Sys_FileType (const char *path);
|
|
|
|
/* returns an FS entity type, i.e. FS_ENT_FILE or FS_ENT_DIRECTORY.
|
|
|
|
* returns FS_ENT_NONE (0) if no such file or directory is present. */
|
|
|
|
|
2010-02-15 23:26:55 +00:00
|
|
|
//
|
|
|
|
// system IO
|
|
|
|
//
|
2017-07-28 12:50:10 +00:00
|
|
|
FUNC_NORETURN void Sys_Quit (void);
|
|
|
|
FUNC_NORETURN void Sys_Error (const char *error, ...) FUNC_PRINTF(1,2);
|
2010-02-15 23:26:55 +00:00
|
|
|
// an error will cause the entire program to exit
|
2017-07-28 20:11:03 +00:00
|
|
|
#ifdef __WATCOMC__
|
|
|
|
#pragma aux Sys_Error aborts;
|
|
|
|
#pragma aux Sys_Quit aborts;
|
|
|
|
#endif
|
2010-02-15 23:26:55 +00:00
|
|
|
|
2017-07-28 12:50:10 +00:00
|
|
|
void Sys_Printf (const char *fmt, ...) FUNC_PRINTF(1,2);
|
2010-02-15 23:26:55 +00:00
|
|
|
// send text to the console
|
|
|
|
|
2011-12-12 16:01:01 +00:00
|
|
|
double Sys_DoubleTime (void);
|
2010-02-15 23:26:55 +00:00
|
|
|
|
2011-12-12 12:02:37 +00:00
|
|
|
const char *Sys_ConsoleInput (void);
|
2010-02-15 23:26:55 +00:00
|
|
|
|
2011-12-12 16:01:01 +00:00
|
|
|
void Sys_Sleep (unsigned long msecs);
|
|
|
|
// yield for about 'msecs' milliseconds.
|
2010-02-15 23:26:55 +00:00
|
|
|
|
|
|
|
void Sys_SendKeyEvents (void);
|
|
|
|
// Perform Key_Event () callbacks until the input que is empty
|
|
|
|
|
bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h,
d_ifacea.h, draw.h, gl_texmgr.h, glquake.h, image.h, input.h, keys.h, mathlib.h,
menu.h, modelgen.h, net.h, net_dgrm.h, net_loop.h, net_sdlnet.h, net_udp.h,
net_wins.h, platform.h, pr_comp.h, progdefs.h, progs.h, protocol.h, quakedef.h,
render.h, resource.h, sbar.h, screen.h, server.h, sound.h, spritegn.h, sys.h,
vid.h, view.h, wad.h, world.h, zone.h: added include guards to the headers.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +00:00
|
|
|
#endif /* _QUAKE_SYS_H */
|
2010-02-15 23:26:55 +00:00
|
|
|
|