maint: rebrand

This commit is contained in:
Diavolo 2023-12-02 23:21:06 +01:00
parent 5f8c9e540f
commit cdf12853c6
32 changed files with 74 additions and 105 deletions

View File

@ -42,7 +42,7 @@ jobs:
uses: ammaraskar/msvc-problem-matcher@master
- name: Build ${{matrix.configuration}}
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=x64 build/boiii.sln
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=x64 build/t7x.sln
- name: Upload ${{matrix.configuration}} symbols
if: matrix.configuration == 'Release' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
@ -50,7 +50,7 @@ jobs:
with:
name: ${{matrix.configuration}} Symbols
path: |
build/bin/x64/${{matrix.configuration}}/boiii.pdb
build/bin/x64/${{matrix.configuration}}/t7x.pdb
- name: Upload ${{matrix.configuration}} binary
if: matrix.configuration == 'Release' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
@ -58,7 +58,7 @@ jobs:
with:
name: ${{matrix.configuration}} Binary
path: |
build/bin/x64/${{matrix.configuration}}/boiii.exe
build/bin/x64/${{matrix.configuration}}/t7x.exe
- name: Upload ${{matrix.configuration}} data artifacts
if: matrix.configuration == 'Release' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
@ -98,19 +98,19 @@ jobs:
run: ssh-keyscan -H ${{ secrets.BOIII_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts
- name: Remove old data files
run: ssh ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }} rm -rf ${{ env.BOIII_MASTER_PATH }}/boiii/data/*
run: ssh ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }} rm -rf ${{ env.BOIII_MASTER_PATH }}/t7x/data/*
- name: Upload BOIII binary
run: rsync -avz boiii.exe ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }}:${{ env.BOIII_MASTER_PATH }}/boiii/
- name: Upload T7x binary
run: rsync -avz t7x.exe ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }}:${{ env.BOIII_MASTER_PATH }}/t7x/
- name: Upload data files
run: rsync -avz ./data/ ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }}:${{ env.BOIII_MASTER_PATH }}/boiii/data/
run: rsync -avz ./data/ ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }}:${{ env.BOIII_MASTER_PATH }}/t7x/data/
- name: Publish changes
run: ssh ${{ secrets.BOIII_MASTER_SSH_USER }}@${{ secrets.BOIII_MASTER_SSH_ADDRESS }} ${{ secrets.BOIII_MASTER_SSH_CHANGE_PUBLISH_COMMAND }}
- name: Prepare cleanup
run: echo "" > boiii.exe
run: echo "" > t7x.exe
- name: Cleanup
uses: actions/upload-artifact@v3.1.3
@ -118,4 +118,4 @@ jobs:
name: Release Binary
retention-days: 1
path: |
boiii.exe
t7x.exe

View File

@ -1,7 +1,7 @@
# What is BOIII ☄️
# What is T7x ☄️
BOIII is a game modification for Call of Duty: Black Ops 3.
The Steam version of Black Ops 3 is required to be owned and installed for BOIII to work. You can get it from <a href="https://store.steampowered.com/app/311210/Call_of_Duty_Black_Ops_III/">here</a>.
T7x is a game modification for Call of Duty: Black Ops 3.
The Steam version of Black Ops 3 is required to be owned and installed for T7x to work. You can get it from <a href="https://store.steampowered.com/app/311210/Call_of_Duty_Black_Ops_III/">here</a>.
## Writeups & Articles

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title>BOIII</title>
<title>T7x</title>
<style>
* {
@ -124,7 +124,7 @@
><span style="color: #dc2626">I</span>
</h1>
<div class="button" onclick="window.external.runGame()">Play</div>
<div class="button" onclick="window.external.openUrl('https://boiii.re')">
<div class="button" onclick="window.external.openUrl('https://bo3.eu')">
About
</div>
</div>

View File

@ -27,7 +27,7 @@ CoD.LobbyButtons.STATS = {
stringRef = "STATS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "BoiiiStatsMenu", controller)
OpenPopup(menu, "T7xStatsMenu", controller)
end,
customId = "btnMPStats"
}

View File

@ -345,8 +345,8 @@ if Dvar.cg_unlockall_loot:get() == true then
Engine.SetDvar("ui_enableAllHeroes", 1)
end
LUI.createMenu.BoiiiStatsMenu = function(controller)
local self = CoD.Menu.NewForUIEditor("BoiiiStatsMenu")
LUI.createMenu.T7xStatsMenu = function(controller)
local self = CoD.Menu.NewForUIEditor("T7xStatsMenu")
if PreLoadFunc then
PreLoadFunc(self, controller)
end
@ -355,7 +355,7 @@ LUI.createMenu.BoiiiStatsMenu = function(controller)
self:setLeftRight(true, true, 0, 0)
self:setTopBottom(true, true, 0, 0)
self:playSound("menu_open", controller)
self.buttonModel = Engine.CreateModel(Engine.GetModelForController(controller), "BoiiiStatsMenu.buttonPrompts")
self.buttonModel = Engine.CreateModel(Engine.GetModelForController(controller), "T7xStatsMenu.buttonPrompts")
self.anyChildUsesUpdateState = true
local GameSettingsBackground = CoD.GameSettings_Background.new(self, controller)
@ -410,7 +410,7 @@ LUI.createMenu.BoiiiStatsMenu = function(controller)
element.GameSettingsBackground:close()
element.Options:close()
Engine.UnsubscribeAndFreeModel(Engine.GetModel(Engine.GetModelForController(controller),
"BoiiiStatsMenu.buttonPrompts"))
"T7xStatsMenu.buttonPrompts"))
end)
if PostLoadFunc then

View File

@ -220,7 +220,7 @@ newaction {
dependencies.load()
workspace "boiii"
workspace "t7x"
startproject "client"
location "./build"
objdir "%{wks.location}/obj"
@ -284,7 +284,7 @@ project "client"
kind "WindowedApp"
language "C++"
targetname "boiii"
targetname "t7x"
pchheader "std_include.hpp"
pchsource "src/client/std_include.cpp"

View File

@ -752,7 +752,7 @@ namespace arxan
std::string cmd_line = GetCommandLineA();
if (!strstr(cmd_line.data(), "fs_game"))
{
cmd_line += " +set fs_game \"boiii\"";
cmd_line += " +set fs_game \"t7x\"";
}
return cmd_line;

View File

@ -53,7 +53,7 @@ namespace auth
std::string get_protected_data()
{
std::string input = "momo5502-boiii-auth";
std::string input = "momo5502-t7x-auth";
DATA_BLOB data_in{}, data_out{};
data_in.pbData = reinterpret_cast<uint8_t*>(input.data());
@ -98,7 +98,7 @@ namespace auth
{
static const auto is_first = []
{
static utils::nt::handle mutex = CreateMutexA(nullptr, FALSE, "boiii_mutex");
static utils::nt::handle mutex = CreateMutexA(nullptr, FALSE, "t7x_mutex");
return mutex && GetLastError() != ERROR_ALREADY_EXISTS;
}();

View File

@ -35,7 +35,7 @@ namespace bots
};
std::string buffer;
if (!utils::io::read_file("boiii/bots.txt", &buffer) || buffer.empty())
if (!utils::io::read_file("bots.txt", &buffer) || buffer.empty())
{
return bot_names;
}

View File

@ -21,14 +21,14 @@ namespace branding
const auto* font = reinterpret_cast<uint32_t*(*)()>(0x141CAC8E0_g)();
if (!font) return;
game::R_AddCmdDrawText("BOIII: " VERSION, std::numeric_limits<int>::max(), font, static_cast<float>(x),
game::R_AddCmdDrawText("T7x: " VERSION, std::numeric_limits<int>::max(), font, static_cast<float>(x),
y + static_cast<float>(font[2]) * scale,
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_NORMAL);
}
const char* get_ingame_console_prefix_stub()
{
return "BOIII> ";
return "T7x> ";
}
}
@ -39,7 +39,7 @@ namespace branding
scheduler::loop(draw_branding, scheduler::renderer);
// Change window title prefix
utils::hook::copy_string(0x14303F3D8_g, "BOIII");
utils::hook::copy_string(0x14303F3D8_g, "T7x");
// Change ingame console prefix
utils::hook::call(0x141339970_g, get_ingame_console_prefix_stub);

View File

@ -127,45 +127,23 @@ namespace client_patches
game::fileHandle_t fs_f_open_file_write_to_dir_stub(const char* filename, [[maybe_unused]] const char* dir,
const char* os_base_path)
{
return game::FS_FOpenFileWriteToDir(filename, "boiii_players", os_base_path);
return game::FS_FOpenFileWriteToDir(filename, "t7x_players", os_base_path);
}
game::fileHandle_t fs_f_open_file_read_from_dir_stub(const char* filename, [[maybe_unused]] const char* dir,
const char* os_base_path)
{
return game::FS_FOpenFileReadFromDir(filename, "boiii_players", os_base_path);
return game::FS_FOpenFileReadFromDir(filename, "t7x_players", os_base_path);
}
int i_stricmp_stub(const char* s0, [[maybe_unused]] const char* s1)
{
return game::I_stricmp(s0, "boiii_players");
return game::I_stricmp(s0, "t7x_players");
}
void fs_add_game_directory_stub(const char* path, [[maybe_unused]] const char* dir)
{
utils::hook::invoke<void>(0x1422A2AF0_g, path, "boiii_players");
}
// TODO: Remove me after some time
extern "C" void migrate_if_needed()
{
std::error_code e;
// Folder does not exist. Nothing to migrate
if (!std::filesystem::is_directory("players", e))
{
return;
}
// Folder does exist. Already migrated
if (std::filesystem::is_directory("boiii_players", e))
{
return;
}
utils::io::create_directory("boiii_players");
std::filesystem::copy("players", "boiii_players", std::filesystem::copy_options::recursive, e);
utils::hook::invoke<void>(0x1422A2AF0_g, path, "t7x_players");
}
void patch_players_folder_name()
@ -199,11 +177,6 @@ namespace client_patches
public:
static_assert(offsetof(game::clientActive_t, viewangles) == 0xB8C8);
component()
{
migrate_if_needed(); // TODO: Remove me after some time
}
void post_unpack() override
{
fix_amd_cpu_stuttering();

View File

@ -133,8 +133,8 @@ namespace console
char text[CONSOLE_BUFFER_SIZE]{0};
const auto* class_name = "BOIII WinConsole";
const auto* window_name = game::is_server() ? "BOIII Server" : "BOIII Console";
const auto* class_name = "T7x WinConsole";
const auto* window_name = game::is_server() ? "T7x Server" : "T7x Console";
WNDCLASSA wnd_class{};
wnd_class.style = 0;

View File

@ -104,7 +104,7 @@ namespace dvars
std::string get_config_file_path()
{
return "boiii_players/user/config.cfg";
return "t7x_players/user/config.cfg";
}
bool is_archive_dvar(const game::dvar_t* dvar)

View File

@ -76,7 +76,7 @@ namespace exception
utils::thread::suspend_other_threads();
show_mouse_cursor();
game::show_error(error_str.data(), "BOIII ERROR");
game::show_error(error_str.data(), "T7x ERROR");
TerminateProcess(GetCurrentProcess(), exception_data.code);
}
@ -88,7 +88,7 @@ namespace exception
++recovery_data.recovery_counts;
game::Com_Error(game::ERR_DROP, "Fatal error (0x%08X) at 0x%p (0x%p).\nA minidump has been written.\n\n"
"BOIII has tried to recover your game, but it might not run stable anymore.\n\n"
"T7x has tried to recover your game, but it might not run stable anymore.\n\n"
"Make sure to update your graphics card drivers and install operating system updates!\n"
"Closing or restarting Steam might also help.",
exception_data.code, exception_data.address,
@ -133,8 +133,8 @@ namespace exception
info.append("\r\n");
};
line("BOIII Crash Dump");
line("");
line("T7x Crash Dump");
line(std::string{});
line("Version: "s + VERSION);
line("Timestamp: "s + get_timestamp());
line(utils::string::va("Exception: 0x%08X", exceptioninfo->ExceptionRecord->ExceptionCode));
@ -156,13 +156,13 @@ namespace exception
void write_minidump(const LPEXCEPTION_POINTERS exceptioninfo)
{
const std::string crash_name = utils::string::va("minidumps/boiii-crash-%s.zip",
const std::string crash_name = utils::string::va("minidumps/t7x-crash-%s.zip",
get_timestamp().data());
utils::compression::zip::archive zip_file{};
zip_file.add("crash.dmp", create_minidump(exceptioninfo));
zip_file.add("info.txt", generate_crash_info(exceptioninfo));
zip_file.write(crash_name, "BOIII Crash Dump");
zip_file.write(crash_name, "T7x Crash Dump");
}
bool is_harmless_error(const LPEXCEPTION_POINTERS exceptioninfo)

View File

@ -114,7 +114,7 @@ namespace gamesettings
const utils::nt::library host{};
search_game_settings_folder((game::get_appdata_path() / "data/gamesettings").string());
search_game_settings_folder((host.get_folder() / "boiii/gamesettings").string());
search_game_settings_folder((host.get_folder() / "t7x/gamesettings").string());
}
}

View File

@ -25,7 +25,7 @@ namespace profile_infos
std::optional<profile_info> load_profile_info()
{
std::string data{};
if (!utils::io::read_file("boiii_players/user/profile_info", &data))
if (!utils::io::read_file("t7x_players/user/profile_info", &data))
{
return {};
}
@ -237,7 +237,7 @@ namespace profile_infos
data.append(reinterpret_cast<const char*>(&info.version), sizeof(info.version));
data.append(info.ddl);
utils::io::write_file("boiii_players/user/profile_info", data);
utils::io::write_file("t7x_players/user/profile_info", data);
}
struct component final : generic_component

View File

@ -34,7 +34,7 @@ namespace script
void load_script(std::string& name, const std::string& data, const bool is_custom)
{
const auto appdata_path = (game::get_appdata_path() / "data/").generic_string();
const auto host_path = (utils::nt::library{}.get_folder() / "boiii/").generic_string();
const auto host_path = (utils::nt::library{}.get_folder() / "t7x/").generic_string();
auto i = name.find(appdata_path);
if (i != std::string::npos)
@ -133,12 +133,12 @@ namespace script
const utils::nt::library host{};
const auto data_folder = game::get_appdata_path() / "data";
const auto boiii_folder = host.get_folder() / "boiii";
const auto t7x_folder = host.get_folder() / "t7x";
const auto load = [&data_folder, &boiii_folder](const std::filesystem::path& folder, const bool is_custom)
const auto load = [&data_folder, &t7x_folder](const std::filesystem::path& folder, const bool is_custom)
{
load_scripts_folder((data_folder / folder).string(), is_custom);
load_scripts_folder((boiii_folder / folder).string(), is_custom);
load_scripts_folder((t7x_folder / folder).string(), is_custom);
};
// scripts folder is for overriding stock scripts the game uses

View File

@ -93,7 +93,7 @@ namespace server_list
std::string get_favorite_servers_file_path()
{
return "boiii_players/user/favorite_servers.txt";
return "t7x_players/user/favorite_servers.txt";
}
void write_favorite_servers()

View File

@ -70,7 +70,7 @@ namespace splash
if (image)
{
window = CreateWindowExA(WS_EX_APPWINDOW, "Black Ops III Splash Screen", "BOIII",
window = CreateWindowExA(WS_EX_APPWINDOW, "Black Ops III Splash Screen", "T7x",
WS_POPUP | WS_SYSMENU,
(x_pixels - 320) / 2, (y_pixels - 100) / 2, 320, 100, nullptr,
nullptr,

View File

@ -222,7 +222,7 @@ namespace steam_proxy
void post_unpack() override
{
const auto res = start_mod("\xF0\x9F\x92\x8E" " BOIII"s, steam::SteamUtils()->GetAppID());
const auto res = start_mod("\xF0\x9F\x92\x8E" " T7x"s, steam::SteamUtils()->GetAppID());
evaluate_ownership_state(res);
clean_up_on_error();
}

View File

@ -205,7 +205,7 @@ namespace ui_scripting
lua["print"] = function(reinterpret_cast<game::hks::lua_function>(0x141D30290_g)); // hks::base_print
lua["table"]["unpack"] = lua["unpack"];
lua["luiglobals"] = lua;
lua["Engine"]["IsBOIII"] = true;
lua["Engine"]["is_t7x"] = true;
}
void start()
@ -215,7 +215,7 @@ namespace ui_scripting
const utils::nt::library host{};
const auto folder = game::is_server() ? "lobby_scripts/" : "ui_scripts/";
load_scripts((game::get_appdata_path() / "data" / folder).string());
load_scripts((host.get_folder() / "boiii" / folder).string());
load_scripts((host.get_folder() / "t7x" / folder).string());
}
void try_start()
@ -251,7 +251,7 @@ namespace ui_scripting
doneFirstSnapshot = false;
load_local_script_files((game::get_appdata_path() / "data/ui_scripts/").string());
load_local_script_files((host.get_folder() / "boiii/ui_scripts/").string());
load_local_script_files((host.get_folder() / "t7x/ui_scripts/").string());
return;
}
try_start();

View File

@ -173,7 +173,7 @@ namespace demonware
std::string bdStorage::get_user_file_path(const std::string& name)
{
return "boiii_players/user/" + name;
return "t7x_players/user/" + name;
}
void bdStorage::upload_files(service_server* server, byte_buffer* buffer) const

View File

@ -83,7 +83,7 @@ namespace game
CoTaskMemFree(path);
});
static auto appdata = std::filesystem::path(path) / "boiii";
static auto appdata = std::filesystem::path(path) / "t7x";
return appdata;
}();

View File

@ -12,7 +12,7 @@ namespace launcher
bool run()
{
bool run_game = false;
html_window window("BOIII", 550, 320);
html_window window("T7x", 550, 320);
window.get_html_frame()->register_callback(
"openUrl", [](const std::vector<html_argument>& params) -> CComVariant

View File

@ -10,7 +10,7 @@ namespace tls
{
namespace
{
utils::binary_resource tls_dll_file(TLS_DLL, "boiii-tlsdll.dll");
utils::binary_resource tls_dll_file(TLS_DLL, "t7x-tlsdll.dll");
}
PIMAGE_TLS_DIRECTORY allocate_tls_index()

View File

@ -281,7 +281,7 @@ int main()
if (!utils::io::file_exists(launcher::get_launcher_ui_file().generic_wstring()))
{
throw std::runtime_error("BOIII needs an active internet connection for the first time you launch it.");
throw std::runtime_error("T7x needs an active internet connection for the first time you launch it.");
}
const auto client_binary = "BlackOps3.exe"s;
@ -295,7 +295,7 @@ int main()
if (!has_client && !has_server)
{
throw std::runtime_error(
"Can't find a valid BlackOps3.exe or BlackOps3_UnrankedDedicatedServer.exe. Make sure you put boiii.exe in your Black Ops 3 installation folder.");
"Can't find a valid BlackOps3.exe or BlackOps3_UnrankedDedicatedServer.exe. Make sure you put T7x.exe in your Black Ops 3 installation folder.");
}
if (!is_server)

View File

@ -70,13 +70,13 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "momo5502"
VALUE "FileDescription", "BOIII"
VALUE "CompanyName", "AlterWare"
VALUE "FileDescription", "T7x"
VALUE "FileVersion", VERSION_FILE
VALUE "InternalName", "something"
VALUE "InternalName", "T7x"
VALUE "LegalCopyright", "Copyright (C) 2022 momo5502. All rights reserved."
VALUE "OriginalFilename", "boiii.exe"
VALUE "ProductName", "BOIII"
VALUE "OriginalFilename", "T7x.exe"
VALUE "ProductName", "T7x"
VALUE "ProductVersion", VERSION_PRODUCT
END
END

View File

@ -133,7 +133,7 @@ namespace steam
{
const auto id = this->GetSteamID();
auth_ticket = "BOIII";
auth_ticket = "T7x";
auth_ticket.resize(32);
auth_ticket.append(static_cast<char*>(pUserData), 24); // key
auth_ticket.append(reinterpret_cast<const char*>(&id.bits), sizeof(id.bits)); // user id

View File

@ -12,10 +12,10 @@
#define UPDATE_SERVER "https://master.bo3.eu/"
#define UPDATE_FILE_MAIN UPDATE_SERVER "boiii.json"
#define UPDATE_FOLDER_MAIN UPDATE_SERVER "boiii/"
#define UPDATE_FILE_MAIN UPDATE_SERVER "files.json"
#define UPDATE_FOLDER_MAIN UPDATE_SERVER "t7x/"
#define UPDATE_HOST_BINARY "boiii.exe"
#define UPDATE_HOST_BINARY "t7x.exe"
namespace updater
{

View File

@ -19,7 +19,7 @@ namespace updater
this->downloading_files_.clear();
this->progress_ui_ = {game::is_headless()};
this->progress_ui_.set_title("BOIII Updater");
this->progress_ui_.set_title("T7x Updater");
this->progress_ui_.show(false);
// Is it good to add artificial sleeps?

View File

@ -26,7 +26,7 @@ namespace exception
char pathname[MAX_PATH] = {0};
GetTempPathA(sizeof(pathname), pathname);
GetTempFileNameA(pathname, "boiii-", 0, filename);
GetTempFileNameA(pathname, "t7x-", 0, filename);
return filename;
}

View File

@ -16,8 +16,6 @@ namespace utils::properties
{
namespace
{
extern "C" void migrate_if_needed();
typedef rapidjson::EncodedOutputStream<rapidjson::UTF8<>, rapidjson::FileWriteStream> OutputStream;
typedef rapidjson::EncodedInputStream<rapidjson::UTF8<>, rapidjson::FileReadStream> InputStream;
@ -31,11 +29,9 @@ namespace utils::properties
{
static auto props = []
{
auto path = std::filesystem::path("boiii_players/properties.json");
auto path = std::filesystem::path("t7x_players/properties.json");
const auto legacy_path = get_properties_folder() / "properties.json";
migrate_if_needed();
if (io::file_exists(legacy_path) && !io::file_exists(path))
{
std::error_code e;
@ -129,13 +125,13 @@ namespace utils::properties
CoTaskMemFree(path);
});
static auto appdata = std::filesystem::path(path) / "boiii";
static auto appdata = std::filesystem::path(path) / "t7x";
return appdata;
}
std::unique_lock<named_mutex> lock()
{
static named_mutex mutex{"boiii-properties-lock"};
static named_mutex mutex{"t7x-properties-lock"};
return std::unique_lock{mutex};
}