diff -r 443f6f7abcfb -r e6cfc44266af src/Graphics.cc --- a/src/Graphics.cc Tue Jan 20 23:24:04 2009 +0200 +++ b/src/Graphics.cc Tue Jan 20 23:30:18 2009 +0200 @@ -16,11 +16,11 @@ ); } -Graphics::Graphics (Engine &engine, GameState &state, PixelCoordinate resolution, bool fullscreen) : - CL_DisplayWindow(GRAPHICS_WINDOW_TITLE, resolution.x, resolution.y, fullscreen, true), +Graphics::Graphics (Engine &engine, GameState &state, const GraphicsConfiguration &config) : + CL_DisplayWindow(GRAPHICS_WINDOW_TITLE, config.resolution.x, config.resolution.y, config.fullscreen, true), engine(engine), state(state), - resolution(resolution), + resolution(config.resolution), fullscreen_resolution(0, 0), window_resolution(0, 0), update_timer(GRAPHICS_UPDATE_INTERVAL_MS), input(get_ic()->get_keyboard()), @@ -42,7 +42,7 @@ state.setEventHandler(this); // set correct resolution - if (fullscreen) { + if (config.fullscreen) { fullscreen_resolution = resolution; } else { @@ -175,7 +175,7 @@ PixelCoordinate target = player->getCoordinate() - PixelCoordinate(resolution.x / 2, (resolution.y - 100) / 2); // ...but keep the world in view - PixelCoordinate max = state.world.getDimensions() - resolution + PixelCoordinate(0, 100); + PixelCoordinate max = state.terrain.getDimensions() - resolution + PixelCoordinate(0, 100); // ...by limiting the value to 0...max camera = PixelCoordinate(