-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added trivial support for DEM subfile
- Loading branch information
Showing
7 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "gimglib.h" | ||
|
||
void dump_dem (struct subfile_struct *sf) | ||
{ | ||
struct garmin_dem *header = (struct garmin_gmp *)sf->header; | ||
|
||
assert(sf->typeid == ST_DEM); | ||
|
||
dump_comm(sf->header); | ||
|
||
printf("=== DEM HEADER ===\n"); | ||
printf("Flags: 0x%x\n", header->flags); | ||
printf("Zoom Levels: 0x%x\n", header->zoom_levels); | ||
printf("Reserved: 0x%x\n", header->reserved0); | ||
printf("Record Size: 0x%x\n", header->record_size); | ||
printf("Points to Block 3: 0x%x\n", header->points_to_block3); | ||
printf("Reserved: 0x%x\n", header->reserved2); | ||
|
||
if (header->comm.hlen > sizeof(struct garmin_gmp)) | ||
printf("from 0x%lx to 0x%x (0x%lx bytes): %s\n", | ||
sizeof(struct garmin_gmp), header->comm.hlen - 1, | ||
header->comm.hlen - sizeof(struct garmin_gmp), | ||
dump_unknown_bytes((uint8_t *)header + sizeof(struct garmin_gmp), header->comm.hlen - sizeof(struct garmin_gmp))); | ||
|
||
return; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters