Initial commit

This commit is contained in:
Hash Borgir
2024-04-16 21:45:38 -06:00
commit 3159020c38
533 changed files with 135446 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#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);
};
}
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace utils {
class screen {
public:
static void screen_to_world(int32_t sx, int32_t sy, int32_t& wx, int32_t& wy);
static void world_to_screen(int32_t wx, int32_t wy, int32_t& sx, int32_t& sy);
};
}
}