From 83aaa48b85e8ebf04badeb0aaf7aa419372235e7 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 14 Jun 2020 00:43:02 +0200 Subject: Tools/vmap extractor: Various fixes * Fixed output file name case normalization - exclude names built from file ids (starting with FILE) * Skip antiportal WMO groups Closes #23972 Closes #24798 --- src/tools/vmap4_assembler/TileAssembler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/tools/vmap4_assembler/TileAssembler.cpp') diff --git a/src/tools/vmap4_assembler/TileAssembler.cpp b/src/tools/vmap4_assembler/TileAssembler.cpp index 0fb597cb59e..b2ae3e8a6a2 100644 --- a/src/tools/vmap4_assembler/TileAssembler.cpp +++ b/src/tools/vmap4_assembler/TileAssembler.cpp @@ -395,18 +395,17 @@ namespace VMAP // temporary use defines to simplify read/check code (close file and return at fail) #define READ_OR_RETURN(V, S) if (fread((V), (S), 1, rf) != 1) { \ - fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); } + fclose(rf); printf("%s readfail, op = %s\n", __FUNCTION__, #V); return(false); } #define READ_OR_RETURN_WITH_DELETE(V, S) if (fread((V), (S), 1, rf) != 1) { \ - fclose(rf); printf("readfail, op = %i\n", readOperation); delete[] V; return(false); }; + fclose(rf); printf("%s readfail, op = %s\n", __FUNCTION__, #V); delete[] V; return(false); }; #define CMP_OR_RETURN(V, S) if (strcmp((V), (S)) != 0) { \ - fclose(rf); printf("cmpfail, %s!=%s\n", V, S);return(false); } + fclose(rf); printf("%s cmpfail, %s!=%s\n", __FUNCTION__, V, S);return(false); } bool GroupModel_Raw::Read(FILE* rf) { char blockId[5]; blockId[4] = 0; int blocksize; - int readOperation = 0; READ_OR_RETURN(&mogpflags, sizeof(uint32)); READ_OR_RETURN(&GroupWMOID, sizeof(uint32)); @@ -511,7 +510,6 @@ namespace VMAP char ident[9]; ident[8] = '\0'; - int readOperation = 0; READ_OR_RETURN(&ident, 8); CMP_OR_RETURN(ident, RAW_VMAP_MAGIC); @@ -536,5 +534,6 @@ namespace VMAP // drop of temporary use defines #undef READ_OR_RETURN + #undef READ_OR_RETURN_WITH_DELETE #undef CMP_OR_RETURN } -- cgit v1.2.3