Skip to content

Commit

Permalink
[cleanup]
Browse files Browse the repository at this point in the history
* just ran formatter
  • Loading branch information
mlthelama committed Feb 5, 2023
1 parent c43a28a commit ee67867
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/equip/equip_slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/equip/magic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
12 changes: 7 additions & 5 deletions src/handle/handle/page_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 6 additions & 3 deletions src/handle/setting/setting_execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
namespace handle {
using mcm = config::mcm_setting;

void setting_execute::execute_settings(const std::vector<slot_setting*>& a_slots, bool a_only_equip, bool a_only_instant) {
void setting_execute::execute_settings(const std::vector<slot_setting*>& a_slots,
bool a_only_equip,
bool a_only_instant) {
logger::trace("got {} settings execute"sv, a_slots.size());
std::vector<RE::BGSEquipSlot*> un_equip;
auto player = RE::PlayerCharacter::GetSingleton();
Expand Down Expand Up @@ -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<uint32_t>(slot->type),
static_cast<uint32_t>(slot->action),
Expand Down
4 changes: 3 additions & 1 deletion src/handle/setting/setting_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
namespace handle {
class setting_execute {
public:
static void execute_settings(const std::vector<slot_setting*>& a_slots, bool a_only_equip = false, bool a_only_instant = false);
static void execute_settings(const std::vector<slot_setting*>& 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);

Expand Down
9 changes: 3 additions & 6 deletions src/ui/ui_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit ee67867

Please sign in to comment.