]> git.mxchange.org Git - flightgear.git/commitdiff
Activate the hi res screen capture functionality again, however it is no
authorcurt <curt>
Mon, 27 Sep 2004 02:39:54 +0000 (02:39 +0000)
committercurt <curt>
Mon, 27 Sep 2004 02:39:54 +0000 (02:39 +0000)
longer working 100% correctly. :-(

src/GUI/gui.h
src/GUI/gui_funcs.cxx
src/Main/fg_commands.cxx
src/Main/renderer.cxx

index 1683e15c97741ed3ac1a027ac845015c1b4aea83..2ce8bd6a2a331e015bd60d3e5a4310e46e3b0555 100644 (file)
@@ -60,6 +60,7 @@ extern void reInit(puObject *);
 extern void dumpSnapShot(puObject *);
 #ifdef TR_HIRES_SNAP
 extern void dumpHiResSnapShot(puObject *);
+extern void fgHiResDump();
 #endif
 #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
 extern void printScreen(puObject *);
index 7989cd0f71775dea73d579df362bbd4809ee5986..0672588d8bef644132aaecaa6f26969a50a28a77 100644 (file)
@@ -521,7 +521,7 @@ void fgHiResDump()
     static int count = 1;
 
     static const SGPropertyNode *master_freeze
-       = fgGetNode("/sim/freeze/master");
+        = fgGetNode("/sim/freeze/master");
 
     bool freeze = master_freeze->getBoolValue();
     if ( !freeze ) {
@@ -550,6 +550,9 @@ void fgHiResDump()
     ssgSetCamera( (sgVec4 *)globals->get_current_view()->get_VIEW() );
     ssgSetFOV( globals->get_current_view()->get_h_fov(),
               globals->get_current_view()->get_v_fov() );
+    cout << "FOV = " << globals->get_current_view()->get_h_fov()
+         << ", " << globals->get_current_view()->get_v_fov() << endl;
     // ssgSetNearFar( 10.0f, 120000.0f );
     ssgSetNearFar( 0.5f, 1200000.0f );
 
@@ -559,7 +562,7 @@ void fgHiResDump()
     // support any image size
 
     // This should be a requester to get multiplier from user
-    int multiplier = 3;
+    int multiplier = fgGetInt("/sim/startup/hires-multiplier", 3);
     int width = fgGetInt("/sim/startup/xsize");
     int height = fgGetInt("/sim/startup/ysize");
        
index ca3171f8b2ae84618972fddb4f262d3257e54a32..da40d00533496256c57ded3186e4cd89239288be 100644 (file)
@@ -456,6 +456,17 @@ do_screen_capture (const SGPropertyNode * arg)
 }
 
 
+/**
+ * Built-in command: hires capture screen.
+ */
+static bool
+do_hires_screen_capture (const SGPropertyNode * arg)
+{
+  fgHiResDump();
+  return true;
+}
+
+
 /**
  * Reload the tile cache.
  */
@@ -1244,6 +1255,7 @@ static struct {
     { "preferences-load", do_preferences_load },
     { "view-cycle", do_view_cycle },
     { "screen-capture", do_screen_capture },
+    { "hires-screen-capture", do_hires_screen_capture },
     { "tile-cache-reload", do_tile_cache_reload },
     { "set-sea-level-air-temp-degc", do_set_sea_level_degc },
     { "set-outside-air-temp-degc", do_set_oat_degc },
index 6fcbe0165a13f0aae11d18a7f0b8612e8c5c597c..e03ae8d260312ddb08483f92e9f655ba02fc04d1 100644 (file)
@@ -908,11 +908,11 @@ FGRenderer::resize( int width, int height ) {
       }
 
       ssgSetFOV( viewmgr->get_current_view()->get_h_fov(),
-               viewmgr->get_current_view()->get_v_fov() );
+                 viewmgr->get_current_view()->get_v_fov() );
 
 #ifdef FG_USE_CLOUDS_3D
       sgClouds3d->Resize( viewmgr->get_current_view()->get_h_fov(),
-               viewmgr->get_current_view()->get_v_fov() );
+                          viewmgr->get_current_view()->get_v_fov() );
 #endif
     }