Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
vegaserver.cpp
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
*/
16
17
/*
18
* Vegastrike Network Server Main - written by Stephane Vaxelaire <svax@free.fr>
19
*/
20
21
#include <iostream>
22
#include <stdlib.h>
23
#include "
vs_globals.h
"
24
#include "
networking/netserver.h
"
25
#include "
cmd/script/mission.h
"
26
#include "
force_feedback.h
"
27
#include "
lin_time.h
"
28
#include "
options.h
"
29
//#ifndef _WIN32
30
//#include <fenv.h>
31
//#endif
32
char
SERVER
= 1;
33
Universe
*
_Universe
;
34
LeakVector< Mission* >
active_missions
;
35
36
vs_options
game_options
;
37
38
void
VSExit
(
int
code )
39
{
40
VSServer
->
closeAllSockets
();
41
exit( 1 );
42
}
43
44
int
main
(
int
argc,
char
**argv )
45
{
46
//#ifndef _WIN32
47
//feenableexcept(FE_DIVBYZERO|FE_INVALID);//|FE_OVERFLOW|FE_UNDERFLOW)
48
//#endif
49
VSFileSystem::ChangeToProgramDirectory
( argv[0] );
50
51
//Stupid static variable somewhere, so need to initialize it twice.
52
InitTime
();
53
setNewTime
( 0 );
54
setNewTime
( ( (
double
) time( NULL ) )-
VEGA_EPOCH
);
55
VSServer
=
new
NetServer
;
56
//Fake forcefeedback
57
forcefeedback
=
new
ForceFeedback
();
58
59
VSServer
->
start
( argc, argv );
60
61
delete
VSServer
;
62
63
return
0;
64
}
65
src
vegaserver.cpp
Generated on Fri May 29 2015 23:07:39 for Vegastrike 0.5.1 rc1 by
1.8.4