22#ifndef COMMON_WINEXE_NE_H
23#define COMMON_WINEXE_NE_H
25#include "common/formats/winexe.h"
26#include "common/list.h"
27#include "common/str.h"
42class SeekableReadStream;
46 static constexpr uint16 kFlagSingleData = 1;
47 static constexpr uint16 kFlagMultipleData = 2;
48 static constexpr uint16 kFlagLinkError = 0x2000u;
49 static constexpr uint16 kFlagLibModule = 0x8000u;
67 static constexpr uint32 kInvalidAddress = 0xFFFFFFFF;
91 uint32 getAutomaticSegmentIndex()
const {
return _autoSegmentIndex; }
94 VersionInfo *parseVersionInfo(SeekableReadStream *stream)
override;
111 SeekableReadStream *_exe;
112 DisposeAfterUse::Flag _disposeFileHandle;
114 uint32 _autoSegmentIndex = 0;
115 Array<NESegment> _segments;
118 List<Resource> _resources;
120 typedef HashMap<WinResourceID, Common::String, WinResourceID_Hash, WinResourceID_EqualTo> IDMap;
121 typedef HashMap<WinResourceID, IDMap, WinResourceID_Hash, WinResourceID_EqualTo> TypeMap;
125 uint32 getResourceTableOffset();
127 bool readResourceTable(uint32 offset);
130 bool readNameTable(uint32 offset, uint32 size);
133 const Resource *findResource(
const WinResourceID &type,
const WinResourceID &
id)
const;
136 static String getResourceString(SeekableReadStream &exe, uint32 offset);
Definition: winexe_ne.h:62
bool loadFromEXE(SeekableReadStream *stream, DisposeAfterUse::Flag disposeFileHandle=DisposeAfterUse::YES) override
SeekableReadStream * getResource(const WinResourceID &type, const WinResourceID &id) override
const Array< WinResourceID > getIDList(const WinResourceID &type) const override
String loadString(uint32 stringID) override
const Array< NESegment > & getSegments() const
Definition: winexe_ne.h:88
virtual bool loadFromEXE(const Path &fileName)
Definition: algorithm.h:29
Definition: winexe_ne.h:45