I am looking at moomapgen http://code.google.com/p/moomapgen/.
the size of struct s_colony is 272 bytes but when I look at the saved game in a hex editor the size between colony records is 361. The colonies Offset is at 0x25d. I am using version 1.40.
why is there a difference in the struct s_colony in struct.h and data in the file?
does someone have a "newer" colony structure?
struct s_colony is 272 bytes but colony record size is 361
packing and alingment issues
The small size is due the the fact the
struct Pop_Info has size 2 but in the file size 4
add
STRUCT_TYPE Pop_Info {
......
} __alignment__((__align__(4))) STRUCT_TYPE_END;
then just before producing[7]
there needs to be 5 bytes padding
char padding[5];
unsigned char producing[7];
Thanks openmoo2!!
struct Pop_Info has size 2 but in the file size 4
add
STRUCT_TYPE Pop_Info {
......
} __alignment__((__align__(4))) STRUCT_TYPE_END;
then just before producing[7]
there needs to be 5 bytes padding
char padding[5];
unsigned char producing[7];
Thanks openmoo2!!
Return to “Game Modifications”
Who is online
Users browsing this forum: No registered users and 3 guests