mirror of
https://gitlab.com/hashborgir/d2tweaks-rnd2k.git
synced 2024-12-02 21:55:58 +00:00
31 lines
523 B
C
31 lines
523 B
C
|
#pragma once
|
||
|
|
||
|
#include <istream>
|
||
|
|
||
|
namespace diablo2 {
|
||
|
namespace structures {
|
||
|
struct file_handle;
|
||
|
}
|
||
|
|
||
|
namespace utils {
|
||
|
class mpq_ifstream : public std::istream {
|
||
|
class mpq_streambuf : public std::streambuf {
|
||
|
structures::file_handle* m_handle;
|
||
|
char m_data;
|
||
|
public:
|
||
|
explicit mpq_streambuf(const std::string& path);
|
||
|
~mpq_streambuf();
|
||
|
|
||
|
protected:
|
||
|
int_type underflow() override;
|
||
|
};
|
||
|
|
||
|
mpq_streambuf m_streambuf;
|
||
|
public:
|
||
|
explicit mpq_ifstream(const std::string& path);
|
||
|
|
||
|
|
||
|
};
|
||
|
}
|
||
|
}
|