aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/initdevice.cpp6
-rw-r--r--src/client/main.cpp12
2 files changed, 16 insertions, 2 deletions
diff --git a/src/client/initdevice.cpp b/src/client/initdevice.cpp
index 40a1e30..22b88d1 100644
--- a/src/client/initdevice.cpp
+++ b/src/client/initdevice.cpp
@@ -183,9 +183,13 @@ IrrlichtDevice* spawnIrrDevice(lua_State* L, char *path){
printf("Failed to open lua file:%s\n", filename);
}
settingsFromTable(L,&p);
+ printf("Creating device...");
IrrlichtDevice* dev = createDeviceEx(p);
- if(!dev)
+ printf("[OK]\n");
+ if(!dev){
+ printf("Failed to create device\n");
exit(1);
+ }
dev->setWindowCaption(L"Brokengine");
lua_pop(L,1);
return dev;
diff --git a/src/client/main.cpp b/src/client/main.cpp
index 2d93828..d6184e0 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -153,20 +153,30 @@ int main(int argc, char *argv[]){
printf("Failed to initalize device\n");
return 1;
}
+ printf("Changing working directory...");
device->getFileSystem()->changeWorkingDirectoryTo(path);
+ printf("[OK]\n");
//ILogger* log = device->getLogger();
//log->setLogLevel(ELL_NONE);
//Loads libraries for interfaceing with irrlicht
+ printf("Loading lua libs...");
assert(lua_gettop(L) == 0);
luaL_openlibs(state);
assert(lua_gettop(L) == 0);
+ printf("[OK]\n");
+ printf("Loading lua libs...");
loadIrrLibs(state,device);
assert(lua_gettop(L) == 0);
+ printf("[OK]\n");
+ printf("Loading networking libs...");
loadNetLibs(state);
assert(lua_gettop(L) == 0);
+ printf("[OK]\n");
+ printf("Loading shared libs...");
loadCommonLibs(state);
assert(lua_gettop(L) == 0);
- printf("Loadded irr libs...\n");
+ printf("[OK]\n");
+ printf("All libs loaded.\n");
//Sets the global event handeler
printf("Creating event receiver\n");
GlobalEventReceiver ger = GlobalEventReceiver(device);