forked from farbrausch/fr_public
-
Notifications
You must be signed in to change notification settings - Fork 2
/
_startconsole.hpp
50 lines (35 loc) · 1.84 KB
/
_startconsole.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Written by Fabian "ryg" Giesen.
// I hereby place this code in the public domain.
#ifndef __STARTCONSOLE_HPP__
#define __STARTCONSOLE_HPP__
/****************************************************************************/
/*** ***/
/*** Forwards ***/
/*** ***/
/****************************************************************************/
/****************************************************************************/
/*** ***/
/*** Main Program ***/
/*** ***/
/****************************************************************************/
// implement this to write a program
sInt sAppMain(sInt argc,sChar **argv);
/****************************************************************************/
struct sSystem_
{
// init/exit/debug
void Log(sChar *); // print out debug string
sNORETURN void Abort(sChar *msg); // terminate now
void Tag(); // called by broker (in a direct hackish fashion)
// console io
void PrintF(sChar *format,...);
// file
sU8 *LoadFile(sChar *name,sInt &size); // load file entirely, return size
sU8 *LoadFile(sChar *name); // load file entirely
sChar *LoadText(sChar *name); // load file entirely and add trailing zero
sBool SaveFile(sChar *name,sU8 *data,sInt size); // save file entirely
// misc
sInt GetTime();
};
extern sSystem_ *sSystem;
#endif