Compare commits
2 commits
ea6bf5b582
...
7531dc88ac
Author | SHA1 | Date | |
---|---|---|---|
7531dc88ac | |||
e0647b907a |
7 changed files with 15 additions and 12 deletions
|
@ -52,8 +52,11 @@ add_executable(MassBuilderSaveTool WIN32
|
||||||
${Assets})
|
${Assets})
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
add_compile_definitions(MANAGER_DEBUG_BUILD)
|
add_compile_definitions(SAVETOOL_DEBUG_BUILD)
|
||||||
endif()
|
endif()
|
||||||
|
add_compile_definitions(SAVETOOL_VERSION="1.0.0"
|
||||||
|
SAVETOOL_CODENAME="Agonising Quark"
|
||||||
|
SUPPORTED_GAME_VERSION="0.7.6")
|
||||||
|
|
||||||
target_link_options(MassBuilderSaveTool PRIVATE -static -static-libgcc -static-libstdc++)
|
target_link_options(MassBuilderSaveTool PRIVATE -static -static-libgcc -static-libstdc++)
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
extern const ImVec2 center_pivot = {0.5f, 0.5f};
|
extern const ImVec2 center_pivot = {0.5f, 0.5f};
|
||||||
|
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
#include <Corrade/Utility/Tweakable.h>
|
#include <Corrade/Utility/Tweakable.h>
|
||||||
|
|
||||||
#define tw CORRADE_TWEAKABLE
|
#define tw CORRADE_TWEAKABLE
|
||||||
|
@ -48,10 +48,10 @@ Utility::Tweakable tweak;
|
||||||
|
|
||||||
SaveTool::SaveTool(const Arguments& arguments):
|
SaveTool::SaveTool(const Arguments& arguments):
|
||||||
Platform::Sdl2Application{arguments,
|
Platform::Sdl2Application{arguments,
|
||||||
Configuration{}.setTitle("M.A.S.S. Builder Save Tool version rewrite-0.0.1")
|
Configuration{}.setTitle("M.A.S.S. Builder Save Tool " SAVETOOL_VERSION " (\"" SAVETOOL_CODENAME "\")")
|
||||||
.setSize({960, 720})}
|
.setSize({960, 720})}
|
||||||
{
|
{
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
tweak.enable("", "../../");
|
tweak.enable("", "../../");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ void SaveTool::handleFileAction(efsw::WatchID watch_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveTool::drawEvent() {
|
void SaveTool::drawEvent() {
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
tweak.update();
|
tweak.update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ void SaveTool::drawGui() {
|
||||||
drawAbout();
|
drawAbout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
if(_demoWindow) {
|
if(_demoWindow) {
|
||||||
ImGui::ShowDemoWindow(&_demoWindow);
|
ImGui::ShowDemoWindow(&_demoWindow);
|
||||||
}
|
}
|
||||||
|
@ -410,7 +410,7 @@ void SaveTool::drawDisclaimer() {
|
||||||
|
|
||||||
ImGui::Bullet();
|
ImGui::Bullet();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextUnformatted("This version of the application was tested on M.A.S.S. Builder early access version 0.7.6. It may or may not work with other versions of the game.");
|
ImGui::TextUnformatted("This version of the application was tested on M.A.S.S. Builder early access version " SUPPORTED_GAME_VERSION ". It may or may not work with other versions of the game.");
|
||||||
|
|
||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ class SaveTool: public Platform::Sdl2Application, public efsw::FileWatchListener
|
||||||
UiState _uiState{UiState::Disclaimer};
|
UiState _uiState{UiState::Disclaimer};
|
||||||
|
|
||||||
bool _aboutPopup{false};
|
bool _aboutPopup{false};
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
bool _demoWindow{false};
|
bool _demoWindow{false};
|
||||||
bool _styleEditor{false};
|
bool _styleEditor{false};
|
||||||
bool _metricsWindow{false};
|
bool _metricsWindow{false};
|
||||||
|
|
|
@ -306,7 +306,7 @@ void SaveTool::drawResearchInventory() {
|
||||||
ImGui::TableSetColumnIndex(0); \
|
ImGui::TableSetColumnIndex(0); \
|
||||||
ImGui::TextUnformatted(name); \
|
ImGui::TextUnformatted(name); \
|
||||||
ImGui::TableSetColumnIndex(1); \
|
ImGui::TableSetColumnIndex(1); \
|
||||||
ImGui::TextDisabled("Unavailable as of M.A.S.S. Builder version 0.7.6");
|
ImGui::TextDisabled("Unavailable as of M.A.S.S. Builder version " SUPPORTED_GAME_VERSION);
|
||||||
|
|
||||||
#define matRow(name, var, getter, setter) \
|
#define matRow(name, var, getter, setter) \
|
||||||
ImGui::TableNextRow(); \
|
ImGui::TableNextRow(); \
|
||||||
|
|
|
@ -47,7 +47,7 @@ void SaveTool::drawAbout() {
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableSetColumnIndex(1);
|
ImGui::TableSetColumnIndex(1);
|
||||||
ImGui::Text("%s (<insert codename here>)", SDL_GetWindowTitle(window()));
|
ImGui::TextUnformatted(SDL_GetWindowTitle(window()));
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ void SaveTool::drawMainMenu() {
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MANAGER_DEBUG_BUILD
|
#ifdef SAVETOOL_DEBUG_BUILD
|
||||||
if(ImGui::BeginMenu("Debug tools")) {
|
if(ImGui::BeginMenu("Debug tools")) {
|
||||||
ImGui::MenuItem("ImGui demo window", nullptr, &_demoWindow);
|
ImGui::MenuItem("ImGui demo window", nullptr, &_demoWindow);
|
||||||
ImGui::MenuItem("ImGui style editor", nullptr, &_styleEditor);
|
ImGui::MenuItem("ImGui style editor", nullptr, &_styleEditor);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
#ifndef MANAGER_DEBUG_BUILD
|
#ifndef SAVETOOL_DEBUG_BUILD
|
||||||
std::ofstream output{"out.txt", std::ios::trunc|std::ios::out};
|
std::ofstream output{"out.txt", std::ios::trunc|std::ios::out};
|
||||||
|
|
||||||
Utility::Debug d{&output};
|
Utility::Debug d{&output};
|
||||||
|
|
Loading…
Reference in a new issue