From ee678675ea4dcb7fefcfd17e352ccf87018e9e93 Mon Sep 17 00:00:00 2001 From: mlthelama <47679057+mlthelama@users.noreply.github.com> Date: Sun, 5 Feb 2023 01:41:20 +0100 Subject: [PATCH] [cleanup] * just ran formatter --- src/equip/equip_slot.h | 2 +- src/equip/magic.cpp | 2 +- src/handle/handle/page_handle.cpp | 12 +++++++----- src/handle/setting/setting_execute.cpp | 9 ++++++--- src/handle/setting/setting_execute.h | 4 +++- src/ui/ui_renderer.cpp | 9 +++------ 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/equip/equip_slot.h b/src/equip/equip_slot.h index 62d0852..475f4cc 100644 --- a/src/equip/equip_slot.h +++ b/src/equip/equip_slot.h @@ -18,7 +18,7 @@ namespace equip { static void un_equip_object_ft_dummy_dagger(RE::BGSEquipSlot*& a_slot, RE::PlayerCharacter*& a_player, RE::ActorEquipManager*& a_actor_equip_manager); - + //not used // 0 - Left hand, 1 - Right hand, 2 Other static void un_equip_spell(RE::BSScript::IVirtualMachine* a_vm, diff --git a/src/equip/magic.cpp b/src/equip/magic.cpp index 25ee6e6..4f4b33e 100644 --- a/src/equip/magic.cpp +++ b/src/equip/magic.cpp @@ -80,7 +80,7 @@ namespace equip { //normally in elden just top uses instant for spells equip::equip_slot::un_equip_shout_slot(a_player); } - + //might cost nothing if nothing has been equipped into tha hands after start, so it seems auto cost = spell->CalculateMagickaCost(a_player); logger::trace("spell cost for {} is {}"sv, spell->GetName(), fmt::format(FMT_STRING("{:.2f}"), cost)); diff --git a/src/handle/handle/page_handle.cpp b/src/handle/handle/page_handle.cpp index f8b1199..5c05c68 100644 --- a/src/handle/handle/page_handle.cpp +++ b/src/handle/handle/page_handle.cpp @@ -102,7 +102,11 @@ namespace handle { if (mcm::get_elden_demon_souls() && a_position == position_setting::position_type::bottom || a_position == position_setting::position_type::top) { page->item_name = true; - get_offset_values(a_position, mcm::get_slot_item_name_offset_x(), mcm::get_slot_item_name_offset_y(), offset_x, offset_y); + get_offset_values(a_position, + mcm::get_slot_item_name_offset_x(), + mcm::get_slot_item_name_offset_y(), + offset_x, + offset_y); draw->offset_name_text_x = offset_x; draw->offset_name_text_y = offset_y; } else { @@ -287,13 +291,11 @@ namespace handle { return -1; } - void page_handle::get_offset_values( - const position_setting::position_type a_position, + void page_handle::get_offset_values(const position_setting::position_type a_position, const float a_setting_x, const float a_setting_y, float& offset_x, - float& offset_y - ) { + float& offset_y) { offset_x = 0.f; offset_y = 0.f; switch (a_position) { diff --git a/src/handle/setting/setting_execute.cpp b/src/handle/setting/setting_execute.cpp index 36a51e4..4f9a127 100644 --- a/src/handle/setting/setting_execute.cpp +++ b/src/handle/setting/setting_execute.cpp @@ -12,7 +12,9 @@ namespace handle { using mcm = config::mcm_setting; - void setting_execute::execute_settings(const std::vector& a_slots, bool a_only_equip, bool a_only_instant) { + void setting_execute::execute_settings(const std::vector& a_slots, + bool a_only_equip, + bool a_only_instant) { logger::trace("got {} settings execute"sv, a_slots.size()); std::vector un_equip; auto player = RE::PlayerCharacter::GetSingleton(); @@ -42,10 +44,11 @@ namespace handle { } if (mcm::get_elden_demon_souls() && a_only_instant && slot->action != slot_setting::acton_type::instant) { - logger::trace("form {} does not need any work, skipping"sv, slot->form ? util::string_util::int_to_hex(slot->form->GetFormID()) : "null"); + logger::trace("form {} does not need any work, skipping"sv, + slot->form ? util::string_util::int_to_hex(slot->form->GetFormID()) : "null"); continue; } - + logger::trace("executing setting for type {}, action {}, form {}, left {} ..."sv, static_cast(slot->type), static_cast(slot->action), diff --git a/src/handle/setting/setting_execute.h b/src/handle/setting/setting_execute.h index 72888e1..ad86f9a 100644 --- a/src/handle/setting/setting_execute.h +++ b/src/handle/setting/setting_execute.h @@ -5,7 +5,9 @@ namespace handle { class setting_execute { public: - static void execute_settings(const std::vector& a_slots, bool a_only_equip = false, bool a_only_instant = false); + static void execute_settings(const std::vector& a_slots, + bool a_only_equip = false, + bool a_only_instant = false); static position_setting* get_position_setting_for_key(uint32_t a_key); static void execute_ammo(const RE::TESForm* a_form); diff --git a/src/ui/ui_renderer.cpp b/src/ui/ui_renderer.cpp index 59e68ef..5e7dc62 100644 --- a/src/ui/ui_renderer.cpp +++ b/src/ui/ui_renderer.cpp @@ -226,8 +226,7 @@ namespace ui { ->AddImageQuad(a_texture, pos[0], pos[1], pos[2], pos[3], uvs[0], uvs[1], uvs[2], uvs[3], a_color); } - void ui_renderer::draw_hud( - const float a_x, + void ui_renderer::draw_hud(const float a_x, const float a_y, const float a_scale_x, const float a_scale_y, @@ -242,16 +241,14 @@ namespace ui { draw_element(texture, center, size, angle, color); } - void ui_renderer::draw_slot( - const float a_screen_x, + void ui_renderer::draw_slot(const float a_screen_x, const float a_screen_y, const float a_scale_x, const float a_scale_y, const float a_offset_x, const float a_offset_y, const uint32_t a_modify, - const uint32_t a_alpha - ) { + const uint32_t a_alpha) { constexpr auto angle = 0.f; const auto center = ImVec2(a_screen_x + a_offset_x, a_screen_y + a_offset_y);