docs: sync book.bin/section.bin version refs to source (#2169)
This commit is contained in:
+2
-2
@@ -898,7 +898,7 @@ rm -rf /path/to/sd/.crosspoint/epub_<hash>/sections/
|
|||||||
|
|
||||||
**Current Versions** (as of docs/file-formats.md):
|
**Current Versions** (as of docs/file-formats.md):
|
||||||
- `book.bin`: **Version 5** (metadata structure)
|
- `book.bin`: **Version 5** (metadata structure)
|
||||||
- `section.bin`: **Version 12** (layout structure)
|
- `section.bin`: **Version 24** (layout structure)
|
||||||
|
|
||||||
**Version Increment Rules**:
|
**Version Increment Rules**:
|
||||||
1. **ALWAYS increment version** BEFORE changing binary structure
|
1. **ALWAYS increment version** BEFORE changing binary structure
|
||||||
@@ -908,7 +908,7 @@ rm -rf /path/to/sd/.crosspoint/epub_<hash>/sections/
|
|||||||
**Example** (incrementing section format version):
|
**Example** (incrementing section format version):
|
||||||
```cpp
|
```cpp
|
||||||
// lib/Epub/Epub/Section.cpp
|
// lib/Epub/Epub/Section.cpp
|
||||||
static constexpr uint8_t SECTION_FILE_VERSION = 13; // Was 12, now 13
|
static constexpr uint8_t SECTION_FILE_VERSION = 25; // Was 24, now 25
|
||||||
|
|
||||||
// Add new field to structure
|
// Add new field to structure
|
||||||
struct PageLine {
|
struct PageLine {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## `book.bin`
|
## `book.bin`
|
||||||
|
|
||||||
### Version 3
|
### Version 5
|
||||||
|
|
||||||
ImHex Pattern:
|
ImHex Pattern:
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ import std.string;
|
|||||||
import std.core;
|
import std.core;
|
||||||
|
|
||||||
// === Configuration ===
|
// === Configuration ===
|
||||||
#define EXPECTED_VERSION 3
|
#define EXPECTED_VERSION 5
|
||||||
#define MAX_STRING_LENGTH 65535
|
#define MAX_STRING_LENGTH 65535
|
||||||
|
|
||||||
// === String Structure ===
|
// === String Structure ===
|
||||||
@@ -34,6 +34,7 @@ fn format_string(String s) {
|
|||||||
struct Metadata {
|
struct Metadata {
|
||||||
String title [[comment("Book title")]];
|
String title [[comment("Book title")]];
|
||||||
String author [[comment("Book author")]];
|
String author [[comment("Book author")]];
|
||||||
|
String language [[comment("Book language code")]];
|
||||||
String coverItemHref [[comment("Path to cover image")]];
|
String coverItemHref [[comment("Path to cover image")]];
|
||||||
String textReferenceHref [[comment("Path to guided first text reference")]];
|
String textReferenceHref [[comment("Path to guided first text reference")]];
|
||||||
} [[comment("Book metadata information")]];
|
} [[comment("Book metadata information")]];
|
||||||
|
|||||||
Reference in New Issue
Block a user