Преглед изворни кода

Archive data format and quick atom-editor syntax fix.

Florian DORMONT пре 10 година
родитељ
комит
461225a5fc
2 измењених фајлова са 39 додато и 2 уклоњено
  1. 37 0
      info/archive_structure.md
  2. 2 2
      info/map_serialization.md

+ 37 - 0
info/archive_structure.md

@@ -0,0 +1,37 @@
+# Walrus RPG PIAF (PIAF is an Archive Format)
+## Control Header
+```markdown
+WRPG_PIAF_MAGIC_HEADER : "WRPGPIAF"          <=> 8 bytes (not \0 terminated)
+WRPG_PIAF_CHECKSUM     :  unsigned long long <=> 8 bytes
+WRPG_PIAF_VERSION      :  unsigned int       <=> 4 bytes
+WRPG_PIAF_NB_FILES     :  unsigned int       <=> 4 bytes
+WRPG_PIAF_DATA_SIZE    :  unsigned int       <=> 4 bytes
+<padding>              :  <filler>           <=> 4 bytes
+```
+Effective size : 32 bytes.
+
+## File table
+```markdown
+WRPG_PIAF_FILENAME         : char[8]      <=> 8 bytes (not \0 terminated)
+WRPG_PIAF_FILETYPE         : enumeration  <=> 4 bytes
+WRPG_PIAF_COMPRESSION_TYPE : enumeration  <=> 4 bytes
+WRPG_PIAF_FILESIZE         : unsigned int <=> 4 bytes
+WPRG_PIAF_DATA_OFFSET      : unsigned int <=> 4 bytes
+```
+Effective size = 24 bytes per file.
+
+## File types
+```markdown
+0 = UNKNOWN
+1 = MAP
+2 = EVENT_LIST
+3 = TEXT
+4 = SPRITESHEET
+```
+
+## Compression types
+```markdown
+0 = RAW
+1 = ZLIB
+2 = RLE (?)
+```

+ 2 - 2
info/map_serialization.md

@@ -1,4 +1,4 @@
-```
+```markdown
 MAP_MAGIC_HEADER : 'WRPG_MAP'    <=> 8 bytes
 MAP_WIDTH        : unsigned int  <=> 4 bytes
 MAP_HEIGHT       : unsigned int  <=> 4 bytes
@@ -15,7 +15,7 @@ Size for a map of n*m * l layers = 24 bytes + up to n*m*l*4 bytes
 ```
 
 Loader draft:
-```
+```c++
 struct Map_Data {
     char magic_string[8];
     unsigned width : 4;