-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.c
55 lines (37 loc) · 1.19 KB
/
main.c
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
#include "headers.h"
unsigned int GameRunning = 1;
unsigned int GameTime = 0;
int main( int argc, char *argv[] )
{
srand( time( NULL ) );
init_user_input( );
init_messages( );
win_startup( );
add_message( "CyberOS uKernel started (18.75.0.9)." );
add_message( "CortextLink detected... attached." );
add_message( "Process slots available... 4." );
add_message( "" );
add_message( "Type help for more information." );
add_chat_message( "Chat connection opened." );
add_chat_message( "You're back..." );
add_chat_message( "Let's start with something simple." );
add_chat_message( "Your task is to kill the drone" );
add_chat_message( "passenger. An ingress node is" );
add_chat_message( "available through 151.98.15.3." );
add_chat_message( "Find your way to the drone" );
add_chat_message( "through this network..." );
init_system( 0 );
win_update( );
while ( GameRunning )
{
unsigned long long start = getTimestamp( );
handle_user_input( );
system_simulate( );
// Update the window
win_update( );
while ( getTimestamp( ) < start + MS_PER_FRAME );
GameTime++;
}
win_shutdown( );
return 0;
}