Skip to content

Commit

Permalink
Version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ersh1 committed Feb 11, 2024
1 parent a8e8c03 commit 6f4e486
Show file tree
Hide file tree
Showing 47 changed files with 2,411 additions and 494 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/clang_format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run clang-format Linter

on:
push:
branches:
- main
pull_request_target:
branches:
- main
workflow_dispatch:

jobs:
format:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3
with:
# check out HEAD on the branch
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# make sure the parent commit is grabbed as well, because
# that's what will get formatted (i.e. the most recent commit)
fetch-depth: 2
# format the latest commit
- uses: DoozyX/[email protected]
with:
source: "."
exclude: "extern include"
extensions: "h,cpp,c"
clangFormatVersion: 16
inplace: True # commit the changes (if there are any)
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: 🎨 apply clang-format changes"
branch: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22)

project(
OpenAnimationReplacer
VERSION 2.0.2
VERSION 2.1.0
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
43 changes: 43 additions & 0 deletions cmake/ports/rapidjson/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thorsten-klein/rapidjson
REF e38f585dc7a174a6664860986dcaaed959957cf0
SHA512 64d9912802dc7664568334f0950bcf414096090504f13faa99209707efe2c5933c0db18ea731416685263c83f75de496be12de288d3cf2adcdeff64b064ce783
FILE_DISAMBIGUATOR 2
HEAD_REF master
)

# Use RapidJSON's own build process, skipping examples and tests
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DRAPIDJSON_BUILD_DOC=OFF
-DRAPIDJSON_BUILD_EXAMPLES=OFF
-DRAPIDJSON_BUILD_TESTS=OFF
)
vcpkg_cmake_install()

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/RapidJSON)
endif()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
endif()

file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/RapidJSONConfig.cmake" _contents)
string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}")
string(REPLACE "set( RapidJSON_SOURCE_DIR \"${SOURCE_PATH}\")" "" _contents "${_contents}")
string(REPLACE "set( RapidJSON_DIR \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\")" "" _contents "${_contents}")
string(REPLACE "\${RapidJSON_CMAKE_DIR}/../../../include" "\${RapidJSON_CMAKE_DIR}/../../include" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n")

file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
17 changes: 17 additions & 0 deletions cmake/ports/rapidjson/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "rapidjson",
"version-date": "2023-07-17",
"description": "A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/>",
"homepage": "http://rapidjson.org/",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion cmake/version.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BEGIN
VALUE "FileDescription", "@PROJECT_NAME@"
VALUE "FileVersion", "@[email protected]"
VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", "MIT License"
VALUE "LegalCopyright", "GPLv3"
VALUE "ProductName", "@PROJECT_NAME@"
VALUE "ProductVersion", "@[email protected]"
END
Expand Down
6 changes: 6 additions & 0 deletions src/API/OpenAnimationReplacer-ConditionTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ namespace Conditions
[[nodiscard]] RE::BSString GetDefaultDescription() const override { return DEFAULT_DESCRIPTION; }

[[nodiscard]] virtual ConditionSet* GetConditions() const = 0;
[[nodiscard]] virtual bool EvaluateAll(RE::TESObjectREFR* a_refr, RE::hkbClipGenerator* a_clipGenerator) const = 0;
[[nodiscard]] virtual bool EvaluateAny(RE::TESObjectREFR* a_refr, RE::hkbClipGenerator* a_clipGenerator) const = 0;
virtual RE::BSVisit::BSVisitControl ForEachCondition(const std::function<RE::BSVisit::BSVisitControl(std::unique_ptr<ICondition>&)>& a_func) const = 0;

[[nodiscard]] virtual bool GetShouldDrawEvaluateResultForChildConditions() const = 0;
virtual void SetShouldDrawEvaluateResultForChildConditions(bool a_bShouldDraw) = 0;
};

class IFormConditionComponent : public IConditionComponent
Expand Down
Loading

0 comments on commit 6f4e486

Please sign in to comment.