Lazily committing the entire splice at once (read more)

(this message is copied from my blog)

So I took the lazy route and just committed the entire splice between the jam branch and the development branch all at once. It is exactly as terrible as you think it is, but I've been out of coding for 2 weeks, and I want to get some shit done. I'll pick through each piece one by one, by comparing the diffs from the develop branch to the current jam-merge branch.

Those developers I met on Monday said they were impressed by my ability to manage a large codebase, but if they saw this I'd expect they'd probably take that back.

And oh god it's been 3 weeks since I touched the main branch WTF?
This commit is contained in:
Kayne Ruse
2014-07-30 22:34:48 +10:00
parent 414a0896c9
commit 03f1723d88
31 changed files with 548 additions and 398 deletions
+29 -3
View File
@@ -47,9 +47,6 @@
void ClientApplication::Init(int argc, char** argv) {
std::cout << "Beginning " << argv[0] << std::endl;
//load the prerequisites
config.Load("rsc\\config.cfg");
//-------------------------
//Initialize the APIs
//-------------------------
@@ -67,10 +64,38 @@ void ClientApplication::Init(int argc, char** argv) {
network.Open(0);
std::cout << "Initialized SDL_net" << std::endl;
//initialize lua
lua = luaL_newstate();
if (!lua) {
throw(std::runtime_error("Failed to initialize lua"));
}
luaL_openlibs(lua);
std::cout << "Initialized lua" << std::endl;
if (luaL_dofile(lua, "rsc\\setup.lua")) {
throw(std::runtime_error("Failed to initialize lua's startup script"));
}
std::cout << "Initialized lua's setup script" << std::endl;
//-------------------------
//Setup the screen
//-------------------------
lua_getglobal(lua, "config");
lua_getfield(lua, 1, "screen");
lua_getfield(lua, 2, "width");
lua_getfield(lua, 2, "height");
lua_getfield(lua, 2, "fullscreen");
int w = lua_tointeger(lua, 3);
int h = lua_tointeger(lua, 4);
int f = lua_toboolean(lua, 5);
lua_pop(lua, 5);
BaseScene::SetScreen(w ? w : 800, h ? h : 600, 0, f ? SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN : SDL_HWSURFACE|SDL_DOUBLEBUF);
std::cout << "Initialized the screen" << std::endl;
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;
@@ -149,6 +174,7 @@ void ClientApplication::Proc() {
void ClientApplication::Quit() {
std::cout << "Shutting down" << std::endl;
lua_close(lua);
network.Close();
SDLNet_Quit();
SDL_Quit();