[Tux4kids-commits] [SCM] tuxhistory - Educational history game branch, master, updated. 9de823950e6b9f9e99e8c36b0b6359f4691ec4c3

julio (none) julio at julio-desktop.
Tue Jun 15 21:53:54 UTC 2010


The following commit has been merged in the master branch:
commit 9de823950e6b9f9e99e8c36b0b6359f4691ec4c3
Author: julio <julio at julio-desktop.(none)>
Date:   Tue Jun 15 16:53:13 2010 -0500

    Minor fixes

diff --git a/src/fileops.h b/src/fileops.h
index 77c380b..242d253 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -136,7 +136,7 @@ enum{
     CENTER_1,
     BORDER_S_EVEN,
     NUM_COMPTILDE
-}
+};
 
 enum {
     HIGHSEAS_BORDER_E_ODD,
@@ -356,7 +356,7 @@ enum {
     PRAIRIE_CENTER_1,
     PRAIRIE_BORDER_S_EVEN,
     NUM_TERRAINS
-}
+};
 
 /* Names for game sounds (formerly in sounds.h): */
 enum {
diff --git a/src/fileops_media.c b/src/fileops_media.c
index 9fa00e6..354775c 100644
--- a/src/fileops_media.c
+++ b/src/fileops_media.c
@@ -71,8 +71,7 @@ int load_image_data()
   "comets/bonus_cometex"
   };
 
-  static char* terrain_filenames[NUM_TERRAINS]
-  {
+  static char* terrain_filenames[NUM_TERRAINS] = {
     "terrain/highSeas/border_E_odd.png",//HIGHSEA
     "terrain/highSeas/border_SW_even.png",
     "terrain/highSeas/border_NW_odd.png",
@@ -289,7 +288,7 @@ int load_image_data()
     "terrain/prairie/border_N_odd.png",
     "terrain/prairie/center1.png",
     "terrain/prairie/border_S_even.png"
-  }
+  };
 
 
   /* Load static images: */
@@ -330,7 +329,8 @@ int load_image_data()
   k = 0;
   for (i = 0; i < NUM_TERRAINS; i++)
   {
-    terrain[j][k] = LoadImage(terrain_filenames[i], IMG_ALPHA);
+    terrain[i] = LoadImage(terrain_filenames[i], IMG_ALPHA);
+    /*terrain[j][k] = LoadImage(terrain_filenames[i], IMG_ALPHA);
     if (++k > NUM_COMPTILDE)
     {
         k=0;
@@ -339,7 +339,7 @@ int load_image_data()
     if (j > NUM_OF_TERRAINS)
     {
         break;
-    }
+    }*/
    }
 
 
diff --git a/src/setup.c b/src/setup.c
index e5154eb..88c634d 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -68,7 +68,7 @@ int fs_res_y = 0;
 SDL_Surface* screen;
 SDL_Surface* images[NUM_IMAGES];
 sprite* sprites[NUM_SPRITES];
-SDL_Surface* terrain[NUM_OF_TERRAINS][NUM_COMPTILDE];
+SDL_Surface* terrain[NUM_TERRAINS];
 /* Need special handling to generate flipped versions of images. This
    is a slightly ugly hack arising from the use of the enum trick for
    NUM_IMAGES. */
diff --git a/src/tuxhistory.h b/src/tuxhistory.h
index 13b0e10..5744822 100644
--- a/src/tuxhistory.h
+++ b/src/tuxhistory.h
@@ -62,7 +62,8 @@ extern SDL_Color yellow;
 extern SDL_Surface* screen; /* declared in setup.c; also used in game.c, options.c, fileops.c, credits.c, titlescreen.c */
 extern SDL_Surface* images[];    /* declared in setup.c, used in same files as screen */
 extern sprite* sprites[];
-extern SDL_Surface* terrain[][];
+extern SDL_Surface* flipped_images[];
+extern SDL_Surface* terrain[];
 
 #define NUM_BLENDED_IGLOOS 15
 extern SDL_Surface* blended_igloos[];

-- 
tuxhistory - Educational history game



More information about the Tux4kids-commits mailing list