summaryrefslogtreecommitdiff
path: root/core/io/file_access_pack.h
diff options
context:
space:
mode:
authorJoost Heitbrink <joostheitbrink@outlook.com>2019-11-30 17:22:22 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-01-06 13:13:17 +0100
commitdc61323b2ce5478b1fc07581e64f7b7fcfdaf239 (patch)
tree274e43b88e7e666418730cc522ef1db6c8ead375 /core/io/file_access_pack.h
parent845480497207839bef48997d152f00b60b6176a8 (diff)
PCK: Set VERSION_PATCH in header, factor out header magic
Unify pack file version and magic to avoid hardcoded literals. `version.py` now always includes `patch` even for the first release in a new stable branch (e.g. 3.2). The public name stays without the patch number, but `Engine.get_version_info()` already included `patch == 0`, and we can remove some extra handling of undefined `VERSION_PATCH` this way. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'core/io/file_access_pack.h')
-rw-r--r--core/io/file_access_pack.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 6ced2b2d4d..b6ea9c158f 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -37,6 +37,11 @@
#include "core/os/file_access.h"
#include "core/print_string.h"
+// Godot's packed file magic header ("GDPC" in ASCII).
+#define PACK_HEADER_MAGIC 0x43504447
+// The current packed file format version number.
+#define PACK_FORMAT_VERSION 1
+
class PackSource;
class PackedData {