-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move rwviewer into rwgame with imgui #719
base: main
Are you sure you want to change the base?
Conversation
rwgame/RWViewer.cpp
Outdated
std::transform(filename.begin(), filename.end(), filename.begin(), | ||
::tolower); | ||
if (!filename.compare("text")) { | ||
textPath = p; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: std::move
?
rwgame/RWViewer.cpp
Outdated
throw std::runtime_error("text directory not found in gamedata path"); | ||
} | ||
std::vector<std::string> names; | ||
for (const rwfs::path& p : rwfs::directory_iterator(textPath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: allocate memory for all at once?
rwgame/RWViewer.cpp
Outdated
auto langName = p.filename().string(); | ||
std::transform(langName.begin(), langName.end(), langName.begin(), | ||
::tolower); | ||
names.push_back(langName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: std::move
?
rwgame/RWViewer.cpp
Outdated
if (ImGui::Selectable(it->second.second.c_str(), false, | ||
ImGuiSelectableFlags_AllowDoubleClick)) { | ||
if (ImGui::IsMouseDoubleClicked(0)) { | ||
strncpy(previewStr_, it->second.second.c_str(), 512); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::copy_n
Codecov Report
@@ Coverage Diff @@
## master #719 +/- ##
==========================================
+ Coverage 18.12% 18.72% +0.59%
==========================================
Files 252 229 -23
Lines 22938 22211 -727
Branches 5769 5795 +26
==========================================
Hits 4158 4158
+ Misses 17659 16935 -724
+ Partials 1121 1118 -3
Continue to review full report at Codecov.
|
ec695f5
to
76fa233
Compare
36faf5a
to
3950d8c
Compare
3950d8c
to
2247757
Compare
Access with `--viewer`, this replaces the Qt based tool
2247757
to
69afb86
Compare
This removes a lot of stuff that's needed just for Qt and simplifies the code.
A few things left to match functionality with rwviewer
Free-cam map viewer
Make it possible to remove viewed objects