updated file format

This commit is contained in:
2025-03-31 19:22:52 +02:00
parent 5ea47ddd25
commit d5ac79559e
5 changed files with 78 additions and 30 deletions

View File

@@ -37,6 +37,8 @@ _Repeat for every avaible actions._
The settings file has the following format:
- The versions of the file format, stored with 1 byte
- The previous maximum pieces size selected, stored with 1 byte
- The number of the chosen keybinds (from 0 to 4), stored with 1 byte
- The DAS of the player, stored with 1 byte
- The ARR of the player, stored with 1 byte
@@ -47,8 +49,11 @@ The settings file has the following format:
- The last selected width of the board, stored with 1 byte
- The last selected height of the board, stored with 1 byte
- The uniformity mode (0 for default distribution, 1 for uniformous distribution, 2 for custom distribution), stored with 1 byte
- For each size, store the custom proportion (from 0 to 10) (15x1 byte total)
- For each size, store the custom proportion (from 0 to 20) (15x1 byte total)
- Every selected pieces
- For every groupe of piece (ALL, CONVEX, HOLELESS, OTHER), use 1 byte for the type (once again converted from an Enum) and 1 byte for the size
- For every single piece, use 1 byte for (the size + encoding that it is a single piece),
and 3 bytes to store the number of the piece (allows number up to 16M, size 15 has 6M pieces).
The current file format version is 10.
If the file starts with a number lower than that, it will be regenerated upon launching the game.