Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Extensions/WinAPI/Ext.rc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Ӣ��(����) resources
// Ӣ��(����) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
Expand Down Expand Up @@ -51,7 +51,7 @@ BEGIN
VALUE "FileDescription", "WinAPI"
VALUE "FileVersion", "0.0.0.3"
VALUE "InternalName", "WinAPI"
VALUE "LegalCopyright", "Copyright 2019~2025 Defisym"
VALUE "LegalCopyright", "Copyright 2019~2026 Defisym & RainbowHype"
VALUE "OriginalFilename", "WinAPI.mfx"
VALUE "ProductVersion", "0.0.0.3"
VALUE "SpecialBuild", "00000001"
Expand Down Expand Up @@ -150,6 +150,7 @@ BEGIN
POPUP "Runtime"
BEGIN
MENUITEM " Running in Editor",IDMN_CONDITION_IRIE
MENUITEM " Running in Sub App",IDMN_CONDITION_IRISA
END
MENUITEM SEPARATOR
POPUP "Object"
Expand Down Expand Up @@ -385,6 +386,8 @@ BEGIN
POPUP "Frame"
BEGIN
MENUITEM "Get Frame Name", IDMN_EXPRESSION_GFN
MENUITEM "Get Number of Frames", IDMN_EXPRESSION_GNOF
MENUITEM "Get Number of Layers", IDMN_EXPRESSION_GNOL
END
MENUITEM SEPARATOR
POPUP "Object"
Expand Down Expand Up @@ -508,7 +511,7 @@ STRINGTABLE
BEGIN
IDST_OBJNAME "WinAPI"
IDST_AUTHOR "Defisym"
IDST_COPYRIGHT "Copyright 2019~2025 Defisym"
IDST_COPYRIGHT "Copyright 2019~2026 Defisym & RainbowHype"
IDST_COMMENT "Functions that use WinAPI, For Personal Use."
IDST_HTTP "https://twitter.com/defisym"
END
Expand Down Expand Up @@ -673,6 +676,8 @@ END
STRINGTABLE
BEGIN
M_EXPRESSION_GFN "FrameName$ ("
M_EXPRESSION_GNOF "NFrames ("
M_EXPRESSION_GNOL "NLayers ("
M_EXPRESSION_GAD "DisAniDir ("
M_EXPRESSION_GAID "DisAniID ("
M_EXPRESSION_GCFC "DisAniFC ("
Expand Down Expand Up @@ -832,6 +837,7 @@ END
STRINGTABLE
BEGIN
M_CONDITION_IRIE "%o Running in Editor"
M_CONDITION_IRISA "%o Running in Sub App"
END

STRINGTABLE
Expand Down Expand Up @@ -877,7 +883,7 @@ BEGIN
IDS_PROP_DISPLAY_CHECK_INFO "Picture Captured in 'Capture Frame Area to Clipboard' will be Automaticly Displayed"
END

#endif // Ӣ��(����) resources
#endif // Ӣ��(����) resources
/////////////////////////////////////////////////////////////////////////////


Expand Down
20 changes: 20 additions & 0 deletions Extensions/WinAPI/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ short conditionsInfos[] =
IDMN_CONDITION_IDHA_S, M_CONDITION_IDHA, CND_CONDITION_IDHA_S, EVFLAGS_ALWAYS | EVFLAGS_NOTABLE, 2,PARAM_OBJECT,PARAM_EXPRESSION,PARA_CONDITION_OBJECT,PARA_CONDITION_DIR,

IDMN_CONDITION_IRIE, M_CONDITION_IRIE, CND_CONDITION_IRIE, EVFLAGS_ALWAYS | EVFLAGS_NOTABLE, 0,
IDMN_CONDITION_IRISA, M_CONDITION_IRISA, CND_CONDITION_IRISA, EVFLAGS_ALWAYS | EVFLAGS_NOTABLE, 0,
IDMN_CONDITION_IAAT, M_CONDITION_IAAT, CND_CONDITION_IAAT, EVFLAGS_ALWAYS | EVFLAGS_NOTABLE, 1, PARAM_OBJECT, PARA_CONDITION_OBJECT,

IDMN_CONDITION_OMC, M_CONDITION_OMC, CND_CONDITION_OMC, 0, 0,
Expand Down Expand Up @@ -152,6 +153,8 @@ short expressionsInfos[] =
IDMN_EXPRESSION_IFS, M_EXPRESSION_IFS, EXP_EXPRESSION_IFS, 0, 0,

IDMN_EXPRESSION_GFN, M_EXPRESSION_GFN, EXP_EXPRESSION_GFN, EXPFLAG_STRING, 0,
IDMN_EXPRESSION_GNOF, M_EXPRESSION_GNOF, EXP_EXPRESSION_GNOF, 0, 0,
IDMN_EXPRESSION_GNOL, M_EXPRESSION_GNOL, EXP_EXPRESSION_GNOL, 0, 0,

IDMN_EXPRESSION_GT, M_EXPRESSION_GT, EXP_EXPRESSION_GT, EXPFLAG_STRING, 0,

Expand Down Expand Up @@ -401,6 +404,12 @@ long WINAPI DLLExport IsRunningInEditor(LPRDATA rdPtr, long param1, long param2)
#endif // RUN_ONLY
}

long WINAPI DLLExport IsRunningInSubApp(LPRDATA rdPtr, long param1, long param2) {
const auto bSub = rdPtr->rHo.hoAdRunHeader->rhApp->m_pParentApp != nullptr;

return bSub;
}

long WINAPI DLLExport IsActiveAtTop(LPRDATA rdPtr, long param1, long param2) {
bool negated = IsNegated(rdPtr);

Expand Down Expand Up @@ -1578,6 +1587,14 @@ long WINAPI DLLExport GetFrameName(LPRDATA rdPtr, long param1) {
return (long)rdPtr->rhPtr->rhFrame->m_name;
}

long WINAPI DLLExport GetNumberOfFrames(LPRDATA rdPtr, long param1) {
return rdPtr->rhPtr->m_hdr.gaNbFrames;
}

long WINAPI DLLExport GetNumberOfLayers(LPRDATA rdPtr, long param1) {
return rdPtr->rhPtr->rhFrame->m_nLayers;
}

//获取当前时间
long WINAPI DLLExport GetCurTime(LPRDATA rdPtr, long param1) {
LPSYSTEMTIME lpSystemTime = new SYSTEMTIME;
Expand Down Expand Up @@ -1998,6 +2015,7 @@ long (WINAPI* ConditionJumps[])(LPRDATA rdPtr, long param1, long param2) =
IsObjectHasAnimationInDirection_Scope,

IsRunningInEditor,
IsRunningInSubApp,

IsActiveAtTop,

Expand Down Expand Up @@ -2117,6 +2135,8 @@ long (WINAPI* ExpressionJumps[])(LPRDATA rdPtr, long param) =
ReturnFullScreen,

GetFrameName,
GetNumberOfFrames,
GetNumberOfLayers,

GetCurTime,
GetPlayTime,
Expand Down
8 changes: 6 additions & 2 deletions Extensions/WinAPI/Main.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
#define CND_CONDITION_RMCX 17
#define CND_CONDITION_OCB 18
#define CND_CONDITION_OCF 19
#define CND_CONDITION_IRISA 20

#define CND_LAST 20
#define CND_LAST 21

// ---------------------------
// DEFINITION OF ACTIONS CODES
Expand Down Expand Up @@ -166,7 +167,10 @@
#define EXP_EXPRESSION_GCFC 40
#define EXP_EXPRESSION_GADFC 41

#define EXP_LAST 42
#define EXP_EXPRESSION_GNOF 42
#define EXP_EXPRESSION_GNOL 43

#define EXP_LAST 44

// ---------------------
// OBJECT DATA STRUCTURE
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ See [this ReadMe](Extensions/ReadMe.md) for more details about using the followi
| SDL_Mixer | Defisym | ![Windows](https://img.shields.io/badge/Windows-supported-blue?logo=windows) | [![Release](https://img.shields.io/github/v/release/defisym/OpenFusionExamples?include_prereleases&filter=SDL_Mixer_*)](https://github.com/defisym/OpenFusionExamples/releases?q=SDL_Mixer&expanded=true) | Y | Audio player based on SDL Mixer X, with unlimited channel & encrypt support |
| SteamworksAPI | Defisym | ![Windows](https://img.shields.io/badge/Windows-supported-blue?logo=windows) | [![Release](https://img.shields.io/github/v/release/defisym/OpenFusionExamples?include_prereleases&filter=SteamworksAPI_*)](https://github.com/defisym/OpenFusionExamples/releases?q=SteamworksAPI&expanded=true) | N | alternative steamworks API object with modern feature, compatible (possibly) with current steamworks object |
| String Splitter | Defisym | ![Windows](https://img.shields.io/badge/Windows-supported-blue?logo=windows) | [![Release](https://img.shields.io/github/v/release/defisym/OpenFusionExamples?include_prereleases&filter=StringSplitter_*)](https://github.com/defisym/OpenFusionExamples/releases?q=StringSplitter&expanded=true) | N | This object is a string splitter base on C++ regex. |
| WinAPI | Defisym | ![Windows](https://img.shields.io/badge/Windows-supported-blue?logo=windows) | [![Release](https://img.shields.io/github/v/release/defisym/OpenFusionExamples?include_prereleases&filter=WinAPI_*)](https://github.com/defisym/OpenFusionExamples/releases?q=WinAPI&expanded=true) | N | a bunch of small functions. |
| WinAPI | Defisym & RainbowHype | ![Windows](https://img.shields.io/badge/Windows-supported-blue?logo=windows) | [![Release](https://img.shields.io/github/v/release/defisym/OpenFusionExamples?include_prereleases&filter=WinAPI_*)](https://github.com/defisym/OpenFusionExamples/releases?q=WinAPI&expanded=true) | N | a bunch of small functions. |

- *Note: CEM means "Clickteam Extension Manager*
- *Note: You can download file directly in repo for latest or not released extensions, but may unstable, contains unexpected bugs, or with breaking changes*
Expand Down