Dariusz Olszewski's changes to support compiling for PocketPC. This
[sgt/puzzles] / net.c
diff --git a/net.c b/net.c
index ad970b6..bf0f7e7 100644 (file)
--- a/net.c
+++ b/net.c
 #define PREFERRED_TILE_SIZE 32
 #define TILE_SIZE (ds->tilesize)
 #define TILE_BORDER 1
+#ifdef SMALL_SCREEN
+#define WINDOW_OFFSET 4
+#else
 #define WINDOW_OFFSET 16
+#endif
 
 #define ROTATE_TIME 0.13F
 #define FLASH_FRAME 0.07F
@@ -150,12 +154,16 @@ static const struct game_params net_presets[] = {
     {7, 7, FALSE, TRUE, 0.0},
     {9, 9, FALSE, TRUE, 0.0},
     {11, 11, FALSE, TRUE, 0.0},
+#ifndef SMALL_SCREEN
     {13, 11, FALSE, TRUE, 0.0},
+#endif
     {5, 5, TRUE, TRUE, 0.0},
     {7, 7, TRUE, TRUE, 0.0},
     {9, 9, TRUE, TRUE, 0.0},
     {11, 11, TRUE, TRUE, 0.0},
+#ifndef SMALL_SCREEN
     {13, 11, TRUE, TRUE, 0.0},
+#endif
 };
 
 static int game_fetch_preset(int i, char **name, game_params **params)
@@ -521,9 +529,7 @@ static int net_solver(int w, int h, unsigned char *tiles,
      * classes) by finding the representative of each tile and
      * setting equivalence[one]=the_other.
      */
-    equivalence = snewn(w * h, int);
-    for (i = 0; i < w*h; i++)
-       equivalence[i] = i;            /* initially all distinct */
+    equivalence = snew_dsf(w * h);
 
     /*
      * On a non-wrapping grid, we instantly know that all the edges
@@ -2826,7 +2832,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize)
 #endif
 
 const struct game thegame = {
-    "Net", "games.net",
+    "Net", "games.net", "net",
     default_params,
     game_fetch_preset,
     decode_params,