summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/Archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx/Archive.h')
-rw-r--r--StarsEx/Archive.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/StarsEx/Archive.h b/StarsEx/Archive.h
index ac22f28..1cf76e9 100644
--- a/StarsEx/Archive.h
+++ b/StarsEx/Archive.h
@@ -10,12 +10,18 @@
#ifndef Archive_h
#define Archive_h
+#include <cstdint>
+
+#include "Types.h"
+
// +------------------------------------------------------------------+
-#define VERSION 0x0010
-#define BLOCK_SIZE 1024
-#define FILE_BLOCK 1024
-#define NAMELEN 64
+namespace Archive
+{
+static constexpr std::uint32_t VERSION {0x0010};
+static constexpr std::size_t BLOCK_SIZE {1024};
+static constexpr std::size_t NAMELEN {64};
+}
// +------------------------------------------------------------------+
@@ -34,7 +40,7 @@ struct DataEntry
{
static const char* TYPENAME() { return "DataEntry"; }
- char name[NAMELEN];
+ char name[Archive::NAMELEN];
DWORD size_orig;
DWORD size_comp;
DWORD offset;
@@ -80,7 +86,7 @@ private:
BYTE* dirbuf;
// transient members:
- char datafile[NAMELEN];
+ char datafile[Archive::NAMELEN];
DWORD* block_map;
DWORD nblocks;