diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-05-22 15:06:55 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-05-22 15:06:55 +0000 |
| commit | 9ba8e6cf38da5196ed7bc878fe452952f3e10638 (patch) | |
| tree | ea59837e22970274abac0ece2071e79189256901 /docs/articles/map_format.txt | |
| parent | 90bcda3c10411ee4c1c65a494ec7c08dfdea01b4 (diff) | |
| download | zcatch-9ba8e6cf38da5196ed7bc878fe452952f3e10638.tar.gz zcatch-9ba8e6cf38da5196ed7bc878fe452952f3e10638.zip | |
moved docs
Diffstat (limited to 'docs/articles/map_format.txt')
| -rw-r--r-- | docs/articles/map_format.txt | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/docs/articles/map_format.txt b/docs/articles/map_format.txt new file mode 100644 index 00000000..7583a5b7 --- /dev/null +++ b/docs/articles/map_format.txt @@ -0,0 +1,100 @@ +Title: Map File Format + +Group: Structure +(start code) +int ID // should be "MAPP" +int version // should be 2 +int size +int swaplen + +int num_item_types +int num_items +int num_raw_data + +int item_size +int data_size + +types { + int typeid + int start + int num +} * (num_item_types) + +item_offsets { + int offset +} * (num_items) + +raw_data_offsets { + int offset +} * (num_raw_data) + +item { + int type_and_id + int size + datai { + int data + } * (size/4) +} * (num_items) + +raw_data { + byte d +} * X +(end) + +Notes: + * swaplen tells how much of the data that should be swapped + * types.start is an index into offsets + * item.size must be a multiple of 4 + * the types must be sorted by type id + * special typeid of 0xffff means raw data, and there fore should always come last + +Could change: + * item.size could be removed + +Section: Registered Item Types + +Group: Image (0x8010) +(start code) +image { + int width + int height + int raw_data_index +} + +pixel_data { + byte r + byte g + byte b + byte a +} * (width * height) +(end) + +Group: Tilemap (0x8020) +(start code) +tilemap { + int image + int width + int height + int x + int y + int scale + int raw_data_index +} + +data { + byte data +} * (width * height) +(end) + +Group: Collision (0x8030) +(start code) +collision { + int width + int height + int raw_data_index +} + +data { + byte data +} * (width * height) +(end) |