Simplify call to memset in config_init(). Don't link to FreeType,
[neverball] / share / image.c
index 6162f0d..3cbb83a 100644 (file)
@@ -1,4 +1,4 @@
-/*   
+/*
  * Copyright (C) 2003 Robert Kooima
  *
  * NEVERBALL is  free software; you can redistribute  it and/or modify
 
 /*---------------------------------------------------------------------------*/
 
-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;
@@ -183,7 +185,7 @@ GLuint make_image_from_file(int *W, int *H,
         if (h) *h = src->h;
 
         /* Create a new destination surface. */
-        
+
         if ((dst = SDL_CreateRGBSurface(SDL_SWSURFACE, w2, h2, 32,
                                         RMASK, GMASK, BMASK, AMASK)))
         {
@@ -237,7 +239,7 @@ GLuint make_image_from_font(int *W, int *H,
             if (h) *h = src->h;
 
             /* Create a new destination surface. */
-            
+
             if ((dst = SDL_CreateRGBSurface(SDL_SWSURFACE, w2, h2, 32,
                                             RMASK, GMASK, BMASK, AMASK)))
             {