]> git.street.me.uk Git - andy/viking.git/blobdiff - src/mapcache.c
Add function to get a trackpoint by distance along a track.
[andy/viking.git] / src / mapcache.c
index b6a2c2b3ff025ceddb4723a37621066a2bd7c56a..7b731bc311f71a743ddf59ad083baf0daa4f419c 100644 (file)
@@ -58,7 +58,7 @@ static VikLayerParamScale params_scales[] = {
 };
 
 static VikLayerParam prefs[] = {
 };
 
 static VikLayerParam prefs[] = {
-  { VIKING_PREFERENCES_NAMESPACE "mapcache_size", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Map cache memory size (MB):"), VIK_LAYER_WIDGET_HSCALE, params_scales, NULL, NULL },
+  { VIK_LAYER_NUM_TYPES, VIKING_PREFERENCES_NAMESPACE "mapcache_size", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Map cache memory size (MB):"), VIK_LAYER_WIDGET_HSCALE, params_scales, NULL, NULL },
 };
 
 void a_mapcache_init ()
 };
 
 void a_mapcache_init ()
@@ -124,7 +124,7 @@ static void list_add_entry ( gchar *key )
   }
 }
 
   }
 }
 
-void a_mapcache_add ( GdkPixbuf *pixbuf, gint x, gint y, gint z, guint8 type, guint zoom, guint8 alpha, gdouble xshrinkfactor, gdouble yshrinkfactor )
+void a_mapcache_add ( GdkPixbuf *pixbuf, gint x, gint y, gint z, guint16 type, guint zoom, guint8 alpha, gdouble xshrinkfactor, gdouble yshrinkfactor )
 {
   gchar *key = g_strdup_printf ( HASHKEY_FORMAT_STRING, x, y, z, type, zoom, alpha, xshrinkfactor, yshrinkfactor );
   static int tmp = 0;
 {
   gchar *key = g_strdup_printf ( HASHKEY_FORMAT_STRING, x, y, z, type, zoom, alpha, xshrinkfactor, yshrinkfactor );
   static int tmp = 0;
@@ -155,14 +155,14 @@ void a_mapcache_add ( GdkPixbuf *pixbuf, gint x, gint y, gint z, guint8 type, gu
   if ( (++tmp == 100 ))  { g_print("DEBUG: queue count=%d size=%u\n", queue_count, queue_size ); tmp=0; }
 }
 
   if ( (++tmp == 100 ))  { g_print("DEBUG: queue count=%d size=%u\n", queue_count, queue_size ); tmp=0; }
 }
 
-GdkPixbuf *a_mapcache_get ( gint x, gint y, gint z, guint8 type, guint zoom, guint8 alpha, gdouble xshrinkfactor, gdouble yshrinkfactor )
+GdkPixbuf *a_mapcache_get ( gint x, gint y, gint z, guint16 type, guint zoom, guint8 alpha, gdouble xshrinkfactor, gdouble yshrinkfactor )
 {
   static char key[48];
   g_snprintf ( key, sizeof(key), HASHKEY_FORMAT_STRING, x, y, z, type, zoom, alpha, xshrinkfactor, yshrinkfactor );
   return g_hash_table_lookup ( cache, key );
 }
 
 {
   static char key[48];
   g_snprintf ( key, sizeof(key), HASHKEY_FORMAT_STRING, x, y, z, type, zoom, alpha, xshrinkfactor, yshrinkfactor );
   return g_hash_table_lookup ( cache, key );
 }
 
-void a_mapcache_remove_all_shrinkfactors ( gint x, gint y, gint z, guint8 type, guint zoom )
+void a_mapcache_remove_all_shrinkfactors ( gint x, gint y, gint z, guint16 type, guint zoom )
 {
   char key[40];
   List *loop = queue_tail;
 {
   char key[40];
   List *loop = queue_tail;