diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-06-14 00:43:02 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-06-14 00:43:02 +0200 |
commit | 83aaa48b85e8ebf04badeb0aaf7aa419372235e7 (patch) | |
tree | 7af54ab633aa5d0d69793eba5f1544408e281d14 /src/tools/vmap4_assembler/TileAssembler.cpp | |
parent | 6533de31005fc9680d9f2b61a4d8ea4958fc8edc (diff) |
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
Diffstat (limited to 'src/tools/vmap4_assembler/TileAssembler.cpp')
-rw-r--r-- | src/tools/vmap4_assembler/TileAssembler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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 } |