1. 17 Mar, 2021 12 commits
  2. 16 Mar, 2021 3 commits
    • James Westman's avatar
      tests: Add memory cache tests · 9a4ea412
      James Westman authored
      9a4ea412
    • James Westman's avatar
      memory-cache: Make private · 5efe7105
      James Westman authored
      Since ShumateMemoryCache is used internally by the map layer, and can't
      be included in a map source chain, it no longer needs to be public API.
      Also, it is no longer derivable.
      5efe7105
    • James Westman's avatar
      memory-cache: Remove as a map source · 142d3071
      James Westman authored
      ShumateMemoryCache still exists, but it is no longer a subclass of
      ShumateMapSource. Instead, it is used internally by the map layer to
      cache tile textures.
      
      This commit BREAKS memory caching because shumate_map_source_fill_tile
      is not a proper async function--there is no way to register a callback.
      This makes it difficult to populate the cache. I will make it a proper
      async function after I've removed more map sources, then fix this issue.
      
      Part of #15.
      142d3071
  3. 13 Mar, 2021 6 commits
  4. 11 Mar, 2021 2 commits
    • James Westman's avatar
      Rewrite ShumateMarkerLayer selection logic · 8def5e81
      James Westman authored
      Selecting and unselecting map markers is now done entirely through the
      ShumateMarkerLayer rather than the individual ShumateMarkers. This makes
      the code simpler and matches how e.g. GtkListBox works.
      
      Some notable changes:
      - The ShumateMarker methods for selecting and unselecting a marker have been
        removed and replaced with methods in ShumateMarkerLayer.
      - Setting the selection mode to GTK_SELECTION_NONE no longer sets the
        selectable property of children to FALSE.
      - Added marker-selected and marker-unselected signals to
        ShumateMarkerLayer.
      - Selecting a marker properly deselects the other markers in
        GTK_SELECTION_SINGLE mode.
      8def5e81
    • James Westman's avatar
      tests: Add tests for ShumateMarkerLayer · deba962b
      James Westman authored
      deba962b
  5. 10 Mar, 2021 12 commits
  6. 09 Mar, 2021 5 commits
    • Georges Basile Stavracas Neto's avatar
      map-layer: Shift row and columns when possible · 8744b93f
      Georges Basile Stavracas Neto authored
      Every time the top-left tile changes the row or column it's displaying, *all*
      other tiles change too. This incurs all tiles reloading every time the viewport
      is moved enough, which flickers and makes up for a bad experience.
      
      Fix that by shifting rows and columns by a certain amount to avoid making all
      tiles reload.
      8744b93f
    • Georges Basile Stavracas Neto's avatar
      map-layer: Rename some variables · 240815cb
      Georges Basile Stavracas Neto authored
      While technically the latitude and longitude that ShumateViewport reports
      is indeed relative to its center, this is an implementation detail. It gets
      confusing when we mix map coordinates with geographic coordinates and actor
      coordinates.
      
      Rename 'center_' to 'latitude_' in the allocation function.
      240815cb
    • Georges Basile Stavracas Neto's avatar
      map-layer: Allocate columns, then rows · 996a0a1b
      Georges Basile Stavracas Neto authored
      My totally westener brain is hardwired to think of it the same way I
      read text: top-left to bottom-right. The current allocation code goes
      top-bottom and left-right, and that's making me think of it wrongly
      way too many times.
      
      Allocate top-left to bottom-right through each column then row.
      996a0a1b
    • Georges Basile Stavracas Neto's avatar
      map-layer: Use row & column terminology when dealing with tiles · 8ce6bfc1
      Georges Basile Stavracas Neto authored
      It is super confusing that sometimes, some of the (x,y) are about tile coordinates,
      and other times they're pixels in actor coordinates.
      
      Resolve this confusion by using row & column when dealing with tiles.
      8ce6bfc1
    • Georges Basile Stavracas Neto's avatar
      map-layer: Trivial cleanup · e8e7feef
      Georges Basile Stavracas Neto authored
      Replace the else condition with a continue in the if(), and
      reduce indentation.
      e8e7feef