The turn.right.blk file is a custom Russian block data file containing the style, relationship and flip coordinate transformation of each block. The head 8 bytes of the file is data file identification information: which includes: 0-2 bytes: BLK, indicating that the file is indeed a data file of the Russian square; 3-6 bytes: for version information. 7 bytes: The number of Russian squares included in the data file. The head information of the data file is now, but now it is not judged except for 7-byte (ie). The subsequent part of the file is the square structure, and the c is defined as follows: / * Define the structure of each block * /
#if! defined _block_h_ # define _block_h_ # define block_version & h01000000 // Main version number, secondary version, attached version, additional 2 # define block_size 6 // Take a number of bytes occupied when files #define block_header_size 8 // Storage file header Information size struct _block {// Note: These fields have a prior part of the storage file. Unsigned int nextid: 8; int width: 4; // Don't, because Width and Height are not possible <= 0, so 0 means 1, such as one square high 0, width 2, actually represents high 1, Wide 3. INTHEIGHT: 4; INT OFFSETY: 4; INT OFFSETX: 4; Unsigned Int Elements; // Whether you are entity};
Typedef _Block Block; #ENDIF should not be, because Width is not possible <= 0, so 0 represents 1, such as one block is 0, wide 2, actually represents high 1, width 3. Demonstration content of the specific documentation is shown below: 7 bytes of this demonstration are hexadecimal 13, indicating that there are 19 squares, in fact, the demonstration has a 33 square block (different transformations of the same shape). The file name is called turn.right.blk because the square format of the file is the clockwise impultered format I have used. If you are not used to modify it.