Skip to content

Commit aa1091d

Browse files
committed
todos in code
1 parent be3a87e commit aa1091d

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

src/resource/archive/ArchiveManager.cpp

+21-21
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,27 @@ std::shared_ptr<File> ArchiveManager::LoadFile(uint64_t hash) {
6262
return archive->LoadFile(hash);
6363
}
6464

65-
std::shared_ptr<File> ArchiveManager::LoadFileRaw(const std::string& filePath) {
66-
if (filePath == "") {
67-
return nullptr;
68-
}
69-
70-
const auto archive = mFileToArchive[CRC64(filePath.c_str())];
71-
if (archive == nullptr) {
72-
return nullptr;
73-
}
74-
75-
return archive->LoadFileRaw(filePath);
76-
}
77-
78-
std::shared_ptr<File> ArchiveManager::LoadFileRaw(uint64_t hash) {
79-
const auto archive = mFileToArchive[hash];
80-
if (archive == nullptr) {
81-
return nullptr;
82-
}
83-
84-
return archive->LoadFileRaw(hash);
85-
}
65+
// std::shared_ptr<File> ArchiveManager::LoadFileRaw(const std::string& filePath) {
66+
// if (filePath == "") {
67+
// return nullptr;
68+
// }
69+
70+
// const auto archive = mFileToArchive[CRC64(filePath.c_str())];
71+
// if (archive == nullptr) {
72+
// return nullptr;
73+
// }
74+
75+
// return archive->LoadFileRaw(filePath);
76+
// }
77+
78+
// std::shared_ptr<File> ArchiveManager::LoadFileRaw(uint64_t hash) {
79+
// const auto archive = mFileToArchive[hash];
80+
// if (archive == nullptr) {
81+
// return nullptr;
82+
// }
83+
84+
// return archive->LoadFileRaw(hash);
85+
// }
8686

8787
bool ArchiveManager::HasFile(const std::string& filePath) {
8888
return HasFile(CRC64(filePath.c_str()));

src/resource/archive/ArchiveManager.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class ArchiveManager {
2121
bool IsArchiveLoaded();
2222
std::shared_ptr<File> LoadFile(const std::string& filePath);
2323
std::shared_ptr<File> LoadFile(uint64_t hash);
24-
std::shared_ptr<File> LoadFileRaw(const std::string& filePath);
25-
std::shared_ptr<File> LoadFileRaw(uint64_t hash);
24+
// std::shared_ptr<File> LoadFileRaw(const std::string& filePath);
25+
// std::shared_ptr<File> LoadFileRaw(uint64_t hash);
2626
bool HasFile(const std::string& filePath);
2727
bool HasFile(uint64_t hash);
2828
std::shared_ptr<std::vector<std::string>> ListFiles(const std::string& filter);

src/window/gui/GameOverlay.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ GameOverlay::~GameOverlay() {
1616
}
1717

1818
void GameOverlay::LoadFont(const std::string& name, const std::string& path, float fontSize) {
19+
// font resource type in gui
1920
ImGuiIO& io = ImGui::GetIO();
2021
std::shared_ptr<File> font = Context::GetInstance()->GetResourceManager()->GetArchiveManager()->LoadFileRaw(path);
2122
if (font->IsLoaded) {

src/window/gui/Gui.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ void Gui::ImGuiBackendInit() {
230230
}
231231

232232
void Gui::LoadTextureFromRawImage(const std::string& name, const std::string& path) {
233+
// GuiTexture (put in Gui)
233234
const auto res = Context::GetInstance()->GetResourceManager()->GetArchiveManager()->LoadFileRaw(path);
234235

235236
if (!res) {

0 commit comments

Comments
 (0)