diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-06-23 18:07:42 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-06-23 18:07:42 +0200 |
| commit | a7bcede17b4c10e172c7877fc2ce89862dc454af (patch) | |
| tree | d89b8ff274d18d67d695c5f320a1d079e1bb26b6 /le/le_entry_table_entry.hpp | |
| parent | 0f2d7c9ed9dfa3716840fc112bd53e5ec6b6315b (diff) | |
| download | openwar-a7bcede17b4c10e172c7877fc2ce89862dc454af.tar.gz openwar-a7bcede17b4c10e172c7877fc2ce89862dc454af.tar.bz2 openwar-a7bcede17b4c10e172c7877fc2ce89862dc454af.zip | |
adds alot more binary parsing.
Diffstat (limited to 'le/le_entry_table_entry.hpp')
| -rw-r--r-- | le/le_entry_table_entry.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/le/le_entry_table_entry.hpp b/le/le_entry_table_entry.hpp new file mode 100644 index 0000000..209c1bb --- /dev/null +++ b/le/le_entry_table_entry.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include "types.hpp" + +#include <boost/variant.hpp> + +#include <vector> + +namespace le { + +using binparse::Value8; +using binparse::Value16; +using binparse::Offset16; +using binparse::Offset32; + +struct EntryPoint { + binparse::Value8 flags; + boost::variant<Offset16, Offset32> entry; +}; + +struct EntryTableEntry { + + Value8 nr_entries; + Value8 flags; + Value16 object_index; + std::vector<EntryPoint> entries; +}; + +EntryTableEntry parse_entry_table_entry(std::istream& is); + +std::ostream& operator<<(std::ostream& os, EntryTableEntry const& entry); + +} |
