Imported the rsc directory from prototype-1
@@ -1,2 +1,20 @@
|
|||||||
serverport=1991
|
#configuration of the programs
|
||||||
servername=foobar
|
server.host = 127.0.0.1
|
||||||
|
server.port = 1991
|
||||||
|
server.name = foobar
|
||||||
|
|
||||||
|
screen.w = 800
|
||||||
|
screen.h = 600
|
||||||
|
screen.f = false
|
||||||
|
|
||||||
|
#directories
|
||||||
|
fonts = rsc/graphics/fonts
|
||||||
|
logos = rsc/graphics/logos
|
||||||
|
sprites = rsc/graphics/sprites
|
||||||
|
tilesets = rsc/graphics/tilesets
|
||||||
|
interface = rsc/graphics/interface
|
||||||
|
|
||||||
|
#debugging
|
||||||
|
debug = true
|
||||||
|
avatar = elliot2.bmp
|
||||||
|
handle = UserName
|
||||||
|
|||||||
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 540 KiB |
@@ -23,8 +23,16 @@ void ServerApplication::Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configUtil.Load("rsc/config.cfg");
|
configUtil.Load("rsc/config.cfg");
|
||||||
netUtil.Open(configUtil.Int("serverport"), sizeof(Packet));
|
|
||||||
running = true;
|
//check the port is valid
|
||||||
|
if (configUtil.Int("server.port") <= 0) {
|
||||||
|
throw(runtime_error("Cannot open the server on an invalid port or port 0"));
|
||||||
|
}
|
||||||
|
cout << "Opening on port " << configUtil["server.port"] << endl;
|
||||||
|
netUtil.Open(configUtil.Int("server.port"), sizeof(Packet));
|
||||||
|
|
||||||
|
//disabled for debugging
|
||||||
|
// running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::Proc() {
|
void ServerApplication::Proc() {
|
||||||
|
|||||||