summaryrefslogtreecommitdiff
path: root/le/le_entry_table.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-07-05 17:51:21 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-07-05 17:51:21 +0200
commit06336eaddcc6a8f9cc578d8f059117c3aa535c9f (patch)
tree4884cc68161df06112a49a04007fa6d03775d507 /le/le_entry_table.hpp
parentb80a82fcc9edc73057796005cede4eea8380e193 (diff)
downloadopenwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.tar.gz
openwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.tar.bz2
openwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.zip
Made the interface somewhat more consistant.
Diffstat (limited to 'le/le_entry_table.hpp')
-rw-r--r--le/le_entry_table.hpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/le/le_entry_table.hpp b/le/le_entry_table.hpp
index f31f542..ad2bbe5 100644
--- a/le/le_entry_table.hpp
+++ b/le/le_entry_table.hpp
@@ -1,15 +1,32 @@
#pragma once
-#include "le_entry_table_entry.hpp"
+#include "types.hpp"
+
+#include <boost/variant.hpp>
#include <map>
#include <iostream>
+#include <vector>
namespace le {
+using namespace binparse;
+
struct EntryTable
{
- std::map<uint32_t, EntryTableEntry> entries;
+ struct Entry {
+ struct EntryPoint {
+ Value8 flags;
+ boost::variant<Offset16, Offset32> entry;
+ };
+
+ Value8 nr_entries;
+ Value8 flags;
+ Value16 object_index;
+ std::vector<EntryPoint> entries;
+ };
+
+ std::map<uint32_t, EntryTable::Entry> entries;
};
EntryTable parse_entry_table(std::istream& is, binparse::Offset32 offset);