Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Oct 8, 2023
1 parent f99b6c7 commit 6f2db11
Showing 1 changed file with 67 additions and 170 deletions.
237 changes: 67 additions & 170 deletions source/cli/Combat.cpp
Original file line number Diff line number Diff line change
@@ -1,136 +1,84 @@
#include "Combat.h"

MaaBool combat_forward(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_forward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatForward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_backward(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_backward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatBackward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_left(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_left(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatLeft", MaaTaskParam_Empty);
return true;
}

MaaBool combat_right(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_right(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatRight", MaaTaskParam_Empty);
return true;
}

MaaBool combat_left_forward(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_left_forward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatLeftForward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_right_forward(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_right_forward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatRightForward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_left_backward(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_left_backward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatLeftBackward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_right_backward(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_right_backward(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param,
[[maybe_unused]] MaaRectHandle cur_box, [[maybe_unused]] MaaStringView cur_rec_detail,
[[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatRightBackward", MaaTaskParam_Empty);
return true;
}

MaaBool combat_basic_ATK(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_basic_ATK(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatBasicATK", MaaTaskParam_Empty);
return true;
}

MaaBool combat_basic_ATK_charge_base(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_basic_ATK_charge_base(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param,
[[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail,
[[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

std::random_device rd;
std::mt19937 rng(rd());
std::uniform_int_distribution<int32_t> unix(1146, 1228);
Expand All @@ -144,56 +92,37 @@ MaaBool combat_basic_ATK_charge_base(MaaSyncContextHandle sync_context, MaaStrin
return true;
}

MaaBool combat_basic_ATK_charge(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box,
MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_basic_ATK_charge(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param,
[[maybe_unused]] MaaRectHandle cur_box, [[maybe_unused]] MaaStringView cur_rec_detail,
[[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatBasicATKCharge", MaaTaskParam_Empty);
return true;
}

MaaBool combat_evade(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_evade(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatEvade", MaaTaskParam_Empty);
return true;
}

MaaBool combat_ultimate(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_ultimate(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatUltimate", MaaTaskParam_Empty);
return true;
}

MaaBool combat_ultimate_charge_base(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box,
MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_ultimate_charge_base(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param,
[[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail,
[[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

std::random_device rd;
std::mt19937 rng(rd());
std::uniform_int_distribution<int32_t> unix(1145, 1227);
Expand All @@ -207,83 +136,51 @@ MaaBool combat_ultimate_charge_base(MaaSyncContextHandle sync_context, MaaString
return true;
}

MaaBool combat_ultimate_charge(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_ultimate_charge(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param,
[[maybe_unused]] MaaRectHandle cur_box, [[maybe_unused]] MaaStringView cur_rec_detail,
[[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatUltimateCharge", MaaTaskParam_Empty);
return true;
}

MaaBool combat_weapon_skill(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_weapon_skill(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatWeaponSkill", MaaTaskParam_Empty);
return true;
}

MaaBool combat_ELF_skill(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_ELF_skill(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatELFSkill", MaaTaskParam_Empty);
return true;
}

MaaBool combat_extra_skill(MaaSyncContextHandle sync_context, MaaStringView task_name,
MaaStringView custom_action_param, MaaRectHandle cur_box, MaaStringView cur_rec_detail,
MaaTransparentArg arg)
MaaBool combat_extra_skill(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatExtraSkill", MaaTaskParam_Empty);
return true;
}

MaaBool combat_QTE1(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_QTE1(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatQTE1", MaaTaskParam_Empty);
return true;
}

MaaBool combat_QTE2(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg)
MaaBool combat_QTE2(MaaSyncContextHandle sync_context, [[maybe_unused]] MaaStringView task_name,
[[maybe_unused]] MaaStringView custom_action_param, [[maybe_unused]] MaaRectHandle cur_box,
[[maybe_unused]] MaaStringView cur_rec_detail, [[maybe_unused]] MaaTransparentArg arg)
{
task_name; // silence unreferenced warning
custom_action_param; // silence unreferenced warning
cur_box; // silence unreferenced warning
cur_rec_detail; // silence unreferenced warning
arg; // silence unreferenced warning

MaaSyncContextRunTask(sync_context, "CombatQTE2", MaaTaskParam_Empty);
return true;
}

0 comments on commit 6f2db11

Please sign in to comment.