revert: reinclude branding, preserve only localized menu str, remove dvar

This commit is contained in:
Rim 2025-03-21 19:04:31 -04:00
parent be65046ec7
commit 9f7e9738ac
4 changed files with 18 additions and 18 deletions

View File

@ -308,7 +308,7 @@ pchsource "src/client/std_include.cpp"
linkoptions {"/IGNORE:4254", "/DYNAMICBASE:NO", "/SAFESEH:NO", "/LARGEADDRESSAWARE", "/LAST:.main", "/PDBCompress"}
files {"./src/client/**.rc", "./src/client/**.hpp", "./src/client/**.cpp", "./src/client/resources/**.*"}
removefiles {"src/client/component/updater.cpp", "src/client/component/updater.hpp", "src/client/component/branding.cpp", "src/client/component/branding.cpp"}
removefiles {"src/client/component/updater.cpp", "src/client/component/updater.hpp"}
-- filter { "configurations:Release", "files:src/client/component/updater.cpp" }
-- flags { "ExcludeFromBuild" }
@ -365,9 +365,9 @@ group "Dependencies"
dependencies.projects()
-- filter "projects:client"
-- removefiles {"src/client/component/updater.cpp", "src/client/component/updater.hpp", "src/client/component/branding.cpp", "src/client/component/branding.cpp"}
-- removefiles {"src/client/component/updater.cpp", "src/client/component/updater.hpp"}
-- filter {}
-- filter {"projects:client", "configurations:Release", "files:src/client/component/updater.cpp", "src/client/component/branding.cpp"}
-- filter {"projects:client", "configurations:Release", "files:src/client/component/updater.cpp"}
-- flags {"ExcludeFromBuild"}
-- filter {}

View File

@ -2,17 +2,17 @@
#include "loader/component_loader.hpp"
#include "localized_strings.hpp"
#include "scheduler.hpp"
#include "version.hpp"
// #include "scheduler.hpp"
// #include "version.hpp"
#include "game/game.hpp"
#include "game/dvars.hpp"
#include "utils/hook.hpp"
#include <utils/string.hpp>
// #include "game/dvars.hpp"
// #include "utils/hook.hpp"
// #include <utils/string.hpp>
namespace branding
{
namespace
/* namespace
{
utils::hook::detour ui_get_formatted_build_number_hook;
const char* ui_get_formatted_build_number_stub()
@ -20,7 +20,7 @@ namespace branding
const auto build_num = ui_get_formatted_build_number_hook.invoke<const char*>();
return utils::string::va("%s (%s)", VERSION, build_num);
}
}
} */
class component final : public component_interface
{
@ -34,11 +34,11 @@ namespace branding
localized_strings::override("LUA_MENU_LEGAL_COPYRIGHT", "IW7-MOD");
//localized_strings::override("MENU_SP_CAMPAIGN", "IW7-MOD: CAMPAIGN");
//localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "IW7-MOD: MULTIPLAYER");
//localized_strings::override("LUA_MENU_ALIENS_CAPS", "IW7-MOD: ZOMBIES");
// localized_strings::override("MENU_SP_CAMPAIGN", "IW7-MOD: CAMPAIGN");
// localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "IW7-MOD: MULTIPLAYER");
// localized_strings::override("LUA_MENU_ALIENS_CAPS", "IW7-MOD: ZOMBIES");
scheduler::once([]()
/* scheduler::once([]()
{
dvars::branding = game::Dvar_RegisterBool("branding", false, game::DvarFlags::DVAR_FLAG_SAVED, "Show branding");
}, scheduler::pipeline::renderer);
@ -77,7 +77,7 @@ namespace branding
}
}, scheduler::pipeline::renderer);
ui_get_formatted_build_number_hook.create(0x140CD1170, ui_get_formatted_build_number_stub);
ui_get_formatted_build_number_hook.create(0x140CD1170, ui_get_formatted_build_number_stub); */
}
};
}

View File

@ -18,7 +18,7 @@ namespace dvars
game::dvar_t* con_inputDvarInactiveValueColor = nullptr;
game::dvar_t* con_inputCmdMatchColor = nullptr;
game::dvar_t* branding = nullptr;
// game::dvar_t* branding = nullptr;
game::dvar_t* lui_debug = nullptr;

View File

@ -15,7 +15,7 @@ namespace dvars
extern game::dvar_t* con_inputDvarInactiveValueColor;
extern game::dvar_t* con_inputCmdMatchColor;
extern game::dvar_t* branding;
// extern game::dvar_t* branding;
extern game::dvar_t* lui_debug;