git-svn-id: http://bladebattles.com/kurok/SVN@11 20cd92bb-ff49-0410-b73e-96a06e42c3b9
[kurok.git] / sys.h
blob6486a114abbff8df5fb17b61aa368388cae7b3aa
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 // sys.h -- non-portable functions
23 // file IO
26 // returns the file size
27 // return -1 if file is not present
28 // the file should be in BINARY mode for stupid OSs that care
29 int Sys_FileOpenRead (char *path, int *hndl);
31 int Sys_FileOpenWrite (char *path);
32 void Sys_FileClose (int handle);
33 void Sys_FileSeek (int handle, int position);
34 int Sys_FileRead (int handle, void *dest, int count);
35 int Sys_FileWrite (int handle, void *data, int count);
36 int Sys_FileTime (char *path);
37 void Sys_mkdir (char *path);
40 // memory protection
42 void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length);
45 // system IO
47 void Sys_DebugLog(char *file, char *fmt, ...);
49 void Sys_Error (char *error, ...);
50 // an error will cause the entire program to exit
52 void Sys_Printf (char *fmt, ...);
53 // send text to the console
55 void Sys_Quit (void);
57 double Sys_FloatTime (void);
59 char *Sys_ConsoleInput (void);
61 void Sys_Sleep (void);
62 // called to yield for a little bit so as
63 // not to hog cpu when paused or debugging
65 void Sys_SendKeyEvents (void);
66 // Perform Key_Event () callbacks until the input que is empty
68 void Sys_LowFPPrecision (void);
69 void Sys_HighFPPrecision (void);
70 void Sys_SetFPCW (void);