-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
2,110 additions
and
6 deletions.
There are no files selected for viewing
Submodule MaaDeps
updated
45 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include "MaaPIDef.h" // IWYU pragma: export | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
MAA_PI_API MaaPIData* MaaPIDataCreate(); | ||
MAA_PI_API void MaaPIDataDestroy(MaaPIData* data); | ||
MAA_PI_API MaaBool MaaPIDataLoad(MaaPIData* data, const char* json, const char* path); | ||
|
||
MAA_PI_API MaaPIConfig* MaaPIConfigCreate(); | ||
MAA_PI_API void MaaPIConfigDestroy(MaaPIConfig* cfg); | ||
MAA_PI_API MaaBool MaaPIConfigLoad(MaaPIConfig* cfg, MaaPIData* data, const char* json); | ||
MAA_PI_API MaaBool MaaPIConfigGenDef(MaaPIConfig* cfg, MaaPIData* data); | ||
MAA_PI_API MaaBool MaaPIConfigSave(MaaPIConfig* cfg, MaaStringBuffer* json); | ||
|
||
MAA_PI_API MaaPIRuntime* MaaPIRuntimeCreate(); | ||
MAA_PI_API void MaaPIRuntimeDestroy(MaaPIRuntime* rt); | ||
MAA_PI_API MaaController* MaaPIRuntimeGetController(MaaPIRuntime* rt); | ||
MAA_PI_API MaaResource* MaaPIRuntimeGetResource(MaaPIRuntime* rt); | ||
MAA_PI_API MaaTasker* MaaPIRuntimeGetTasker(MaaPIRuntime* rt); | ||
MAA_PI_API MaaBool MaaPIRuntimeBind(MaaPIRuntime* rt, MaaPIData* data, MaaPIConfig* cfg); | ||
MAA_PI_API MaaBool MaaPIRuntimeSetup(MaaPIRuntime* rt, MaaNotificationCallback cb, void* cb_arg); | ||
|
||
MAA_PI_API MaaPIClient* MaaPIClientCreate(const char* locale, MaaPIClientHandler handler, void* handler_arg); | ||
MAA_PI_API void MaaPIClientDestroy(MaaPIClient* client); | ||
MAA_PI_API MaaBool MaaPIClientPerform(MaaPIClient* client, MaaPIRuntime* rt, MaaPIClientAction action); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include "MaaFramework/MaaDef.h" // IWYU pragma: export | ||
|
||
struct MaaPIData; | ||
struct MaaPIConfig; | ||
struct MaaPIRuntime; | ||
struct MaaPIClient; | ||
|
||
typedef int32_t MaaPIClientAction; | ||
|
||
enum MaaPIClientAction_Enum | ||
{ | ||
MaaPIClientAction_SelectController, | ||
MaaPIClientAction_SelectResource, | ||
MaaPIClientAction_AddTask, | ||
MaaPIClientAction_MoveTask, | ||
MaaPIClientAction_RemoveTask, | ||
MaaPIClientAction_ConfigureTask, | ||
MaaPIClientAction_LaunchTask, | ||
|
||
MaaPIClientAction_Derived_SelectAdb, | ||
MaaPIClientAction_Derived_SelectDesktop, | ||
MaaPIClientAction_Derived_SelectTask, | ||
MaaPIClientAction_Derived_SelectOption, | ||
|
||
MaaPIClientAction_DirectBegin = MaaPIClientAction_SelectController, | ||
MaaPIClientAction_DirectEnd = MaaPIClientAction_LaunchTask, | ||
MaaPIClientAction_DerivedBegin = MaaPIClientAction_Derived_SelectAdb, | ||
MaaPIClientAction_DerivedEnd = MaaPIClientAction_Derived_SelectOption, | ||
}; | ||
|
||
typedef int32_t (*MaaPIClientHandler)( | ||
MaaPIClient* client, | ||
MaaPIClientAction action, | ||
MaaStringListBuffer* choice, | ||
MaaStringListBuffer* details, | ||
void* arg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
config.json | ||
pi_config.json | ||
maa_option.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
add_executable(sample main.cpp) | ||
target_link_libraries(sample MaaFramework MaaToolkit) | ||
|
||
# set(MaaPP_INC_REL ${CMAKE_CURRENT_LIST_DIR}/../../source/binding/cpp/include) | ||
# cmake_path(ABSOLUTE_PATH MaaPP_INC_REL NORMALIZE OUTPUT_VARIABLE MaaPP_INC) | ||
# set(MaaPP_INC_REL ${CMAKE_CURRENT_LIST_DIR}/../../source/binding/cpp/include) cmake_path(ABSOLUTE_PATH MaaPP_INC_REL | ||
# NORMALIZE OUTPUT_VARIABLE MaaPP_INC) | ||
# | ||
# add_executable(sample_cpp20 main_c++20.cpp) | ||
# target_include_directories(sample_cpp20 PRIVATE ${MaaPP_INC}) | ||
# add_executable(sample_cpp20 main_c++20.cpp) target_include_directories(sample_cpp20 PRIVATE ${MaaPP_INC}) | ||
# target_link_libraries(sample_cpp20 MaaFramework MaaToolkit HeaderOnlyLibraries) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
{ | ||
"controller": [ | ||
{ | ||
"name": "安卓端", | ||
"type": "Adb" | ||
}, | ||
{ | ||
"name": "桌面端", | ||
"type": "Desktop", | ||
"desktop": { | ||
"class_regex": ".*", | ||
"window_regex": "Visual Studio" | ||
} | ||
} | ||
], | ||
"resource": [ | ||
{ | ||
"name": "Official", | ||
"paths": ["{PROJECT_DIR}/resource/base"] | ||
}, | ||
{ | ||
"name": "Bilibili", | ||
"paths": ["{PROJECT_DIR}/resource/base", "{PROJECT_DIR}/resource/bilibili"] | ||
} | ||
], | ||
"task": [ | ||
{ | ||
"name": "收取荒原", | ||
"entry": "Wilderness" | ||
}, | ||
{ | ||
"name": "每日心相(意志解析)", | ||
"entry": "Psychube" | ||
}, | ||
{ | ||
"name": "常规作战", | ||
"entry": "Combat", | ||
"option": ["作战关卡", "复现次数", "刷完全部体力"] | ||
}, | ||
{ | ||
"name": "活动:绿湖噩梦 17 艰难(活动已结束)", | ||
"entry": "ANightmareAtGreenLake", | ||
"option": ["复现次数", "刷完全部体力"], | ||
"pp_override": { | ||
"EnterTheShow": { | ||
"next": "ANightmareAtGreenLake" | ||
}, | ||
"TargetStageName": { | ||
"expected": "17" | ||
}, | ||
"StageDifficulty": { | ||
"next": "ActivityStageDifficulty" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "领取奖励", | ||
"entry": "Awards" | ||
} | ||
], | ||
"option": [ | ||
{ | ||
"name": "作战关卡", | ||
"cases": [ | ||
{ | ||
"name": "3-9 厄险(百灵百验鸟)", | ||
"pp_override": { | ||
"EnterTheShow": { | ||
"next": "MainChapter_3" | ||
}, | ||
"TargetStageName": { | ||
"expected": "09" | ||
}, | ||
"StageDifficulty": { | ||
"next": "StageDifficulty_Hard" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "4-20 厄险(双头形骨架)", | ||
"pp_override": { | ||
"EnterTheShow": { | ||
"next": "MainChapter_4" | ||
}, | ||
"TargetStageName": { | ||
"expected": "20" | ||
}, | ||
"StageDifficulty": { | ||
"next": "StageDifficulty_Hard" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "复现次数", | ||
"cases": [ | ||
{ | ||
"name": "x1", | ||
"pp_override": { | ||
"SetReplaysTimes": { | ||
"expected": "1" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "x2", | ||
"pp_override": { | ||
"SetReplaysTimes": { | ||
"expected": "2" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "x3", | ||
"pp_override": { | ||
"SetReplaysTimes": { | ||
"expected": "3" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "x4", | ||
"pp_override": { | ||
"SetReplaysTimes": { | ||
"expected": "4" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "刷完全部体力", | ||
"cases": [ | ||
{ | ||
"name": "Yes", | ||
"pp_override": { | ||
"AllIn": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "No", | ||
"pp_override": { | ||
"AllIn": { | ||
"enabled": false | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#include <ranges> | ||
|
||
#include "RuntimeCache.h" | ||
|
||
#include <ranges> | ||
|
Oops, something went wrong.