src/Application.cc
changeset 408 e6cfc44266af
parent 397 13fa0546ef87
child 409 1a03ff151abc
--- a/src/Application.cc	Tue Jan 20 23:24:04 2009 +0200
+++ b/src/Application.cc	Tue Jan 20 23:30:18 2009 +0200
@@ -56,8 +56,8 @@
     arg_port = NETWORK_PORT_STR;
     arg_server = false;
     arg_connect = "";
-    arg_fullscreen = GRAPHICS_FULLSCREEN;
-    arg_resolution = PixelCoordinate(GRAPHICS_RESOLUTION_WIDTH, GRAPHICS_RESOLUTION_HEIGHT);
+    graphics.fullscreen = GRAPHICS_FULLSCREEN;
+    graphics.resolution = PixelCoordinate(GRAPHICS_RESOLUTION_WIDTH, GRAPHICS_RESOLUTION_HEIGHT);
 
     // extra state
     bool resolution_default = true;
@@ -93,14 +93,14 @@
                 break;
 
             case ARG_FULLSCREEN:
-                arg_fullscreen = true;
+                graphics.fullscreen = true;
                 
                 // choose best resolution unless explicitly set
                 if (resolution_default) {
                     const CL_DisplayMode best_mode = Graphics::getBestMode();
                     const CL_Size best_resolution = best_mode.get_resolution();
 
-                    arg_resolution = PixelCoordinate(best_resolution.width, best_resolution.height);
+                    graphics.resolution = PixelCoordinate(best_resolution.width, best_resolution.height);
                 }
 
                 break;
@@ -147,7 +147,7 @@
         throw ArgumentError("invalid format for --resolution");
     
     // store as PixelCoordinate
-    arg_resolution = PixelCoordinate(w, h);
+    graphics.resolution = PixelCoordinate(w, h);
 }
         
 void Main::dump_display_modes (void) {
@@ -183,7 +183,7 @@
         
         // setup graphics
         if (arg_graphics)
-            engine.setupGraphics(arg_resolution, arg_fullscreen);
+            engine.setupGraphics(graphics);
 
         // setup either network server, client or singleplayer
         if (arg_server) {