Created
June 28, 2013 14:36
-
-
Save ChadSki/5885159 to your computer and use it in GitHub Desktop.
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
from portabletypes cimport * | |
cdef: | |
struct MapData: | |
uint32_t map_magic | |
uint32_t scenario_magic | |
uint32_t globalsOffset | |
uint32_t modelCount | |
uint32_t bitmapCount | |
uint32_t machCount | |
uint32_t vehiCount | |
uint32_t scenCount | |
uint32_t itmcCount | |
struct MemoryBuffer: | |
char *data | |
uint32_t length | |
uint32_t offset | |
struct MapHeader: | |
char[4] integrity # these chars ought to read 'daeh', | |
# which is 'head' in reverse | |
uint32_t game_version # xbox = 5 | |
# trial = 6 | |
# full = 7 | |
# ce = 609 | |
uint32_t map_size # size of the .map file in chars | |
char[4] unk_12 | |
uint32_t index_offset # index header's location | |
# valid on disk, invalid in memory | |
uint32_t meta_size | |
char[8] unk_24 | |
char[32] map_name | |
char[64] map_build # version information | |
uint32_t map_type # SP/MP, I forget the values | |
struct IndexHeader: | |
uint32_t memory_offset # used to determine map magic | |
uint32_t base_tag_ident # the starting 'scnr' tag | |
uint32_t map_id | |
uint32_t tag_count | |
uint32_t verticie_count | |
uint32_t verticie_offset | |
uint32_t indicie_count | |
uint32_t indicie_offset | |
uint32_t model_data_length | |
uint32_t unk_36 | |
struct IndexEntry: | |
char[4] first_type | |
char[4] second_type | |
char[4] third_type | |
uint32_t ident | |
uint32_t name_offset_raw | |
uint32_t meta_offset_raw | |
uint32_t indexed | |
char[4] unk_28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment