Skip to content

Move rwviewer into rwgame with imgui#719

Open
danhedron wants to merge 4 commits intorwengine:mainfrom
danhedron:ingame-viewer
Open

Move rwviewer into rwgame with imgui#719
danhedron wants to merge 4 commits intorwengine:mainfrom
danhedron:ingame-viewer

Conversation

@danhedron
Copy link
Copy Markdown
Member

@danhedron danhedron commented May 27, 2019

This removes a lot of stuff that's needed just for Qt and simplifies the code.

Screenshot from 2019-05-27 22-25-13
Screenshot from 2019-05-27 22-25-58

A few things left to match functionality with rwviewer

  • Free-cam map viewer

  • Make it possible to remove viewed objects

std::transform(filename.begin(), filename.end(), filename.begin(),
::tolower);
if (!filename.compare("text")) {
textPath = p;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: std::move?

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)) {
Copy link
Copy Markdown

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?

auto langName = p.filename().string();
std::transform(langName.begin(), langName.end(), langName.begin(),
::tolower);
names.push_back(langName);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: std::move?

if (ImGui::Selectable(it->second.second.c_str(), false,
ImGuiSelectableFlags_AllowDoubleClick)) {
if (ImGui::IsMouseDoubleClicked(0)) {
strncpy(previewStr_, it->second.second.c_str(), 512);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::copy_n

@codecov
Copy link
Copy Markdown

codecov bot commented May 27, 2019

Codecov Report

❌ Patch coverage is 0% with 567 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.72%. Comparing base (51b7264) to head (69afb86).
⚠️ Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
rwgame/viewer/RWViewer.cpp 0.00% 285 Missing ⚠️
rwgame/viewer/RWViewerWindows.cpp 0.00% 163 Missing ⚠️
rwgame/RWGame.cpp 0.00% 99 Missing ⚠️
rwgame/main.cpp 0.00% 7 Missing ⚠️
rwgame/viewer/RWViewer.hpp 0.00% 5 Missing ⚠️
rwgame/viewer/RWViewerWindows.hpp 0.00% 5 Missing ⚠️
rwgame/RWImGui.cpp 0.00% 2 Missing ⚠️
rwgame/RWConfig.inc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danhedron danhedron force-pushed the ingame-viewer branch 2 times, most recently from ec695f5 to 76fa233 Compare May 28, 2019 23:04
@danhedron danhedron force-pushed the ingame-viewer branch 2 times, most recently from 36faf5a to 3950d8c Compare June 19, 2019 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants