Loading ...
Sorry, an error occurred while loading the content.

889RE: [cc2-dev-l] FCW format and existing FCW->SVG code

Expand Messages
  • Joseph Slayton
    Feb 19, 2012
    • 0 Attachment
      Make sure that your compiler is honoring the #pragma pack() that defines the structure packing. Also make sure that it's not padding the structure to the next packing boundary (for example, natural packing for Pentium Pro and later processors is 8-byte or 16-byte cache lines; some compilers will pack a 36-byte structure to 40 bytes to force 8-byte alignment in some cases).
       
      > To: cc2-dev-l@yahoogroups.com
      > From: bcholmes2001@...
      > Date: Sun, 19 Feb 2012 01:09:23 +0000
      > Subject: [cc2-dev-l] FCW format and existing FCW->SVG code
      >
      > Hi,
      >
      > I'm trying to understand the FCW file format, and I'm using the existing FCW to SVG source code (from the attachments area) as a base. Sadly, it's making me very confused, and I was hoping that clear things up for me.
      >
      > I get the overall structure of the code -- my question is a really nitty-gritty.
      >
      > When I process each block in the source, I'm able to see the size and type of each block. For example, a type 6 block seems to map to a basic circle (the structure of which is defined in the header.h file). The common header of each block takes about 28 bytes. In addition to the common header, there are three float values, indicating the x, y, and radius of the circle.
      >
      > The part that confuses me is that when I try to run this code against some FCW maps, the circle blocks are consistently identifying themselves as 36 byte blocks, whereas the struct seems to be defining a 40-bytes construct.
      >
      > Am I somehow miscounting this? (I've done all the obvious things, I think -- I've sizeof'ed Cir2 and double-checked the logic in the file.
      >
      > Is this just something that never worked correctly in the original code? Or was the code written against a version of the file format that's no longer valid?
      >
      > Any help would be appreciated.
      >
      > BC
      >
    • Show all 10 messages in this topic