changeset 2091:10d63f13abcb

Remove some data duplication from structs.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Sep 2019 13:56:17 +0300
parents a8684a02f42e
children 16fb6263ff34
files mapsearch.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Sun Sep 01 19:20:47 2019 +0300
+++ b/mapsearch.c	Thu Sep 05 13:56:17 2019 +0300
@@ -73,7 +73,6 @@
 
 typedef struct
 {
-    char *map;
     int mx, my, wx, wy;
     LocMarker *marker;
     int nname;
@@ -901,7 +900,7 @@
             vstr = th_strdup_printf(
                 "%s[\"%s\",%d,%d,%d,%d]%s",
                 vstart,
-                match->map,
+                match->marker->file->continent,
                 match->mx, match->my,
                 match->wx, match->wy,
                 vend);
@@ -914,7 +913,7 @@
             vstr = th_strdup_printf(
                 "%s[\"%s\",%d,%d,%d,%d,%d,%d,[",
                 vstart,
-                match->map,
+                match->marker->file->continent,
                 match->mx, match->my,
                 match->wx, match->wy,
                 match->marker->flags,
@@ -1138,7 +1137,6 @@
                 // Okay, add the match to our list
                 MAPMatch *match = &matches[nmatches++];
 
-                match->map = info->locFile.continent;
                 match->mx = ox + 1 + centerX;
                 match->my = oy + 1 + centerY;
                 match->wx = optWorldXC + info->locFile.xoffs + ox + centerX;
@@ -1218,7 +1216,6 @@
 
                 match->marker = marker;
                 match->nname = nname;
-                match->map = info->locFile.continent;
                 match->mx = marker->xc + 1;
                 match->my = marker->yc + 1;
                 match->wx = optWorldXC + info->locFile.xoffs + marker->xc;