diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-07-05 17:51:21 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-07-05 17:51:21 +0200 |
| commit | 06336eaddcc6a8f9cc578d8f059117c3aa535c9f (patch) | |
| tree | 4884cc68161df06112a49a04007fa6d03775d507 /le/le_entry_table.hpp | |
| parent | b80a82fcc9edc73057796005cede4eea8380e193 (diff) | |
| download | openwar-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.hpp | 21 |
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); |
