forked from revivalizer/rekkrunchy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_startconsole.hpp
54 lines (38 loc) · 1.92 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
51
52
53
54
// 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
namespace rekkrunchy
{
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