changeset 2179:0ae4f2215134

Adjust output.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 12 Oct 2019 21:12:20 +0300
parents dbcfc30a6079
children e03560a7dccc
files mkcitymap.c
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mkcitymap.c	Sat Oct 12 20:45:25 2019 +0300
+++ b/mkcitymap.c	Sat Oct 12 21:12:20 2019 +0300
@@ -129,14 +129,14 @@
 }
 
 
-const char *getCityLocationType(int flags)
+const char *getCityLocationType(const LocMarker *marker)
 {
-    switch (flags & LOCF_M_MASK)
+    switch (marker->flags & LOCF_M_MASK)
     {
 //        case LOCF_M_CITY:   return "special";
         case LOCF_M_PCITY:  return "special";
         default:
-            switch (flags & LOCF_T_MASK)
+            switch (marker->flags & LOCF_T_MASK)
             {
                 case LOCF_T_SHRINE:  return "shop";
                 case LOCF_T_GUILD:   return "guild";
@@ -187,7 +187,7 @@
             fprintf(outFile,
                 "<a class=\"ltloc lt%s lt%d\" id=\"listloc%d_%d\" href=\"?%d_%d\" "
                 "onmouseover=\"%s('%d_%d');\" onmouseout=\"qn();\">",
-                getCityLocationType(marker->flags),
+                getCityLocationType(marker),
                 marker->align,
                 marker->xc, marker->yc,
                 marker->xc, marker->yc,
@@ -211,20 +211,21 @@
 
         fprintf(outFile,
         "<div class=\"tooltip\" id=\"tt%d_%d\">"
-        "<div class=\"holder lt%s lt%d\">",
+        "<div class=\"holder\">"
+        "<h1>%s</h1>",
         marker->xc, marker->yc,
-        locGetLocationType(marker->flags),
-        marker->align);
+        marker->names[0].name);
 
-        if (marker->names[0].name != NULL)
+/*
+        if (marker->flags != 0)
         {
-            fprintf(outFile, "<h1>%s</h1>", marker->names[0].name);
+            fprintf(outFile, "%s",
+                getCityLocationType(marker));
         }
+*/
 
         if (marker->nnames > 1)
         {
-            fprintf(outFile, "<br />");
-
             for (int i = 1; i < marker->nnames; i++)
             {
                 fprintf(outFile, "%s%s",