Screwing around with some settings
This commit is contained in:
@@ -51,7 +51,11 @@ void ClientApplication::Init(int argc, char** argv) {
|
|||||||
if (SDL_Init(SDL_INIT_VIDEO)) {
|
if (SDL_Init(SDL_INIT_VIDEO)) {
|
||||||
throw(std::runtime_error("Failed to initialize SDL"));
|
throw(std::runtime_error("Failed to initialize SDL"));
|
||||||
}
|
}
|
||||||
BaseScene::SetScreen(config.Int("screen.w"), config.Int("screen.h"), 0, (config.Bool("screen.f")) ? SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN : SDL_HWSURFACE|SDL_DOUBLEBUF);
|
int w = config.Int("client.screen.w");
|
||||||
|
int h = config.Int("client.screen.h");
|
||||||
|
int f = config.Bool("client.screen.f") ? SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN : SDL_HWSURFACE|SDL_DOUBLEBUF;
|
||||||
|
|
||||||
|
BaseScene::SetScreen(w ? w : 800, h ? h : 600, 0, f);
|
||||||
|
|
||||||
//initialize SDL_net
|
//initialize SDL_net
|
||||||
if (SDLNet_Init()) {
|
if (SDLNet_Init()) {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "raster_font.hpp"
|
#include "raster_font.hpp"
|
||||||
#include "button.hpp"
|
#include "button.hpp"
|
||||||
|
|
||||||
|
//TODO: The options screen needs to be USED
|
||||||
class OptionsMenu : public BaseScene {
|
class OptionsMenu : public BaseScene {
|
||||||
public:
|
public:
|
||||||
//Public access members
|
//Public access members
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ void Restart::Update(double delta) {
|
|||||||
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(10)) {
|
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(10)) {
|
||||||
QuitEvent();
|
QuitEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while(network.Receive()) {
|
||||||
|
//EAT INCOMING PACKETS
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Restart::RenderFrame() {
|
void Restart::RenderFrame() {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
class Region {
|
class Region {
|
||||||
public:
|
public:
|
||||||
typedef unsigned short type_t;
|
typedef unsigned char type_t;
|
||||||
|
|
||||||
Region() = delete;
|
Region() = delete;
|
||||||
Region(int x, int y);
|
Region(int x, int y);
|
||||||
|
|||||||
+10
-11
@@ -1,13 +1,18 @@
|
|||||||
#configuration of the programs
|
#configuration of the programs
|
||||||
|
|
||||||
|
#server specific settings
|
||||||
server.host = 255.255.255.255
|
server.host = 255.255.255.255
|
||||||
server.port = 21795
|
server.port = 21795
|
||||||
server.name = local
|
server.name = local
|
||||||
|
|
||||||
server.dbname = database.db
|
server.dbname = database.db
|
||||||
|
|
||||||
screen.w = 800
|
#client specific settings
|
||||||
screen.h = 600
|
client.screen.f = false
|
||||||
screen.f = false
|
|
||||||
|
client.username = Kayne Ruse
|
||||||
|
client.handle = Ratstail91
|
||||||
|
client.avatar = elliot2.bmp
|
||||||
|
|
||||||
#directories
|
#directories
|
||||||
dir.fonts = rsc/graphics/fonts/
|
dir.fonts = rsc/graphics/fonts/
|
||||||
@@ -16,15 +21,9 @@ dir.sprites = rsc/graphics/sprites/
|
|||||||
dir.tilesets = rsc/graphics/tilesets/
|
dir.tilesets = rsc/graphics/tilesets/
|
||||||
dir.interface = rsc/graphics/interface/
|
dir.interface = rsc/graphics/interface/
|
||||||
dir.scripts = rsc/scripts/
|
dir.scripts = rsc/scripts/
|
||||||
|
dir.maps = rsc/maps/
|
||||||
|
|
||||||
#map system
|
#map system
|
||||||
map.pager.width = 20
|
map.savename = servermap
|
||||||
map.pager.height = 20
|
|
||||||
map.pager.depth = 3
|
|
||||||
|
|
||||||
#player options
|
|
||||||
client.username = Kayne Ruse
|
|
||||||
client.handle = Ratstail91
|
|
||||||
client.avatar = elliot2.bmp
|
|
||||||
|
|
||||||
#debugging
|
#debugging
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 768 KiB |
@@ -78,8 +78,7 @@ void ServerApplication::Init(int argc, char** argv) {
|
|||||||
//setup the map object
|
//setup the map object
|
||||||
regionPager.GetAllocator()->SetLuaState(luaState);
|
regionPager.GetAllocator()->SetLuaState(luaState);
|
||||||
regionPager.GetFormat()->SetLuaState(luaState);
|
regionPager.GetFormat()->SetLuaState(luaState);
|
||||||
//TODO: config parameter
|
regionPager.GetFormat()->SetSaveDir(config["dir.maps"] + config["map.savename"]);
|
||||||
regionPager.GetFormat()->SetSaveDir("save/mapname/");
|
|
||||||
std::cout << "Prepared the map system" << std::endl;
|
std::cout << "Prepared the map system" << std::endl;
|
||||||
|
|
||||||
//push the pager onto the lua registry
|
//push the pager onto the lua registry
|
||||||
|
|||||||
Reference in New Issue
Block a user