diff --git a/ace_parse_imagepath.dll b/ace_parse_imagepath.dll deleted file mode 100644 index f252410bcd..0000000000 Binary files a/ace_parse_imagepath.dll and /dev/null differ diff --git a/ace_parse_imagepath_x64.dll b/ace_parse_imagepath_x64.dll deleted file mode 100644 index 8d154117c5..0000000000 Binary files a/ace_parse_imagepath_x64.dll and /dev/null differ diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index ff29cfc850..756e8775ab 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -27,8 +27,4 @@ class ACE_Extensions { windows = 1; client = 1; }; - class ace_parse_imagepath { - windows = 1; - client = 1; - }; }; diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 0d02b6a6c1..2b646e8eca 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -91,8 +91,7 @@ for "_index" from 0 to ((count _configPath) - 1) do { _actionCondition = compile _actionCondition; _actionMaxDistance = _actionMaxDistance + 0.1; //increase range slightly - //extension ~4x as fast: - private _iconImage = "ace_parse_imagepath" callExtension _actionDisplayNameDefault; + private _iconImage = ((_actionDisplayNameDefault regexFind ["[\w\-\\\/]+.paa/gi", 0]) param [0, [""]]) select 0; private _actionOffset = [_actionPosition] call _fnc_getMemPointOffset; private _memPointIndex = _memPoints find _actionPosition; diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index d8021ea4b2..727d499d0d 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -141,7 +141,6 @@ add_subdirectory(break_line) add_subdirectory(clipboard) add_subdirectory(advanced_ballistics) #add_subdirectory(medical) # After medical re-write this extension is no longer used -add_subdirectory(parse_imagepath) add_subdirectory(artillerytables) # Test Extension for dynamically loading/unloading built extensions; does not build in release diff --git a/extensions/parse_imagepath/CMakeLists.txt b/extensions/parse_imagepath/CMakeLists.txt deleted file mode 100644 index 251796a95e..0000000000 --- a/extensions/parse_imagepath/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -set(ACE_EXTENSION_NAME "ace_parse_imagepath") - -file(GLOB SOURCES *.h *.hpp *.c *.cpp) -add_library( ${ACE_EXTENSION_NAME} SHARED ${SOURCES} ${GLOBAL_SOURCES}) -target_link_libraries(${ACE_EXTENSION_NAME} ace_common) -set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES PREFIX "") -set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) - -if(CMAKE_COMPILER_IS_GNUCXX) - set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) - set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() - -# Copy and rename DLL to root -if(USE_64BIT_BUILD) - set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) -else() - set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) -endif() -add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} -) diff --git a/extensions/parse_imagepath/ace_parse_imagepath.cpp b/extensions/parse_imagepath/ace_parse_imagepath.cpp deleted file mode 100644 index 98b1cfa50f..0000000000 --- a/extensions/parse_imagepath/ace_parse_imagepath.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ace_parse_imagepath.cpp - * Author: PabstMirror - * Gets raw image path from structured text input. - * - * Takes: - * Structured text that usualy has an image: - * Example: ""; - * - * Returns: - * Just the image path or "" if none - */ - -#include "shared.hpp" - -#include -#include -#include - -extern "C" { - EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); - EXPORT void __stdcall RVExtensionVersion(char *output, int outputSize) { - strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); - } -} - -std::string getImagePathFromStructuredText(const std::string & input) { - std::string returnValue = ""; - std::size_t endIndex = input.find(".paa"); - std::size_t startIndex = endIndex - 1; - if ((endIndex != std::string::npos) && (endIndex > 1)) { - endIndex = endIndex + 4; - while ((startIndex > 0) && (returnValue == "")) { - if ((input[startIndex]) == '\'') { - returnValue = input.substr((startIndex + 1), (endIndex - startIndex - 1)); - }; - startIndex = startIndex - 1; - }; - }; - return returnValue; -} - -void __stdcall RVExtension(char *output, int outputSize, const char *function) { - ZERO_OUTPUT(); - if (!strcmp(function, "version")) { - strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); - } else { - strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize - 1); - } - EXTENSION_RETURN(); -}