Turn w and h parameters of image_snap into local variables.
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 5 Jul 2006 16:26:54 +0000 (16:26 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 5 Jul 2006 16:26:54 +0000 (16:26 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@488 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/main.c
ball/set.c
putt/main.c
share/image.c
share/image.h

index 3e22d45..843fc75 100644 (file)
@@ -57,8 +57,7 @@ static void shot(void)
 
     sprintf(filename, _("screen%02d.png"), num++);
 
-    image_snap(filename, config_get_d(CONFIG_WIDTH),
-               config_get_d(CONFIG_HEIGHT));
+    image_snap(filename);
 }
 
 /*---------------------------------------------------------------------------*/
index 9e0cb6f..bcf953e 100644 (file)
@@ -646,8 +646,7 @@ void level_snap(int i)
         game_draw(1, 0);
         SDL_GL_SwapBuffers();
 
-        image_snap(filename, config_get_d(CONFIG_WIDTH),
-                   config_get_d(CONFIG_HEIGHT));
+        image_snap(filename);
 
         if (shadow)
             config_set_d(CONFIG_SHADOW, 1);
index a36bef4..e4108f5 100644 (file)
@@ -59,7 +59,7 @@ static int shot(void)
 
     sprintf(filename, "screen%02d.png", num++);
 
-    image_snap(filename, config_get_d(CONFIG_WIDTH), config_get_d(CONFIG_HEIGHT));
+    image_snap(filename);
 
     return 1;
 }
index 2ea521a..3cbb83a 100644 (file)
 
 /*---------------------------------------------------------------------------*/
 
-void image_snap(char *filename, int w, int h)
+void image_snap(char *filename)
 {
     FILE       *filep  = NULL;
     png_structp writep = NULL;
     png_infop   infop  = NULL;
     png_bytep  *bytep  = NULL;
 
+    int w = config_get_d(CONFIG_WIDTH);
+    int h = config_get_d(CONFIG_HEIGHT);
     int i;
 
     unsigned char *p = NULL;
index fe2ca9d..87f286f 100644 (file)
@@ -6,7 +6,7 @@
 
 /*---------------------------------------------------------------------------*/
 
-void   image_snap(char *, int, int);
+void   image_snap(char *);
 void   image_size(int *, int *, int, int);
 
 GLuint make_image_from_surf(int *, int *, SDL_Surface *);