2020-11-21 15:58:51 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* @file StrFileReader.h
|
|
|
|
* Utility class to read a .STR file and extract the full file name.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2021-01-06 20:04:15 -05:00
|
|
|
namespace decompiler {
|
2020-11-21 15:58:51 -05:00
|
|
|
class StrFileReader {
|
|
|
|
public:
|
|
|
|
explicit StrFileReader(const std::string& file_path);
|
|
|
|
int chunk_count() const;
|
|
|
|
const std::vector<u8>& get_chunk(int idx) const;
|
|
|
|
std::string get_full_name(const std::string& short_name) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::vector<u8>> m_chunks;
|
|
|
|
};
|
2021-01-06 20:04:15 -05:00
|
|
|
} // namespace decompiler
|