////////////////////////////////////////////////////////////////////////////////
// MechWarrior4Reader.h
// MechWarrior 4 resource file parser - todo: does not work yet, incomplete, work in progress
// Copyright Bjoern Ganster
// Developed since 2023

#ifndef MechWarrior4Reader__H
#define MechWarrior4Reader__H

#include "Archive.h"
#include "XMLTree.h"

#include <iostream>

class MW4ResourceFileReader : public MWArchive {
public:
	// Constructor
	MW4ResourceFileReader();

	// Destructor
	~MW4ResourceFileReader() OVERRIDE;

	// Open file
	bool open(const PathChar* PRJFN, bool readOnly = true) OVERRIDE;

	// Close file
	void close() OVERRIDE;

	// Read bufSize bytes from file numbered index at offset into buf
	bool getFileChunk(size_t index, size_t offset, void* buf, size_t bufSize) OVERRIDE;

protected:
	MemoryBlock mMb;
};

#endif
