This file contains hidden or 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
| // register_hook_proc in a glz script works :) | |
| #include "sfall/sfall.h" | |
| #include "sfall/dik.h" | |
| // int arg0 - event type: 1 - pressed, 0 - released | |
| // int arg1 - key DX scancode | |
| // int arg2 - key VK code (very similar to ASCII codes) | |
| // int ret0 - overrides the pressed key (a new key DX scancode or 0 for no override) | |
| procedure on_keypress begin |
This file contains hidden or 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
| <?xml version='1.0'?> | |
| <PapyrusProject xmlns="PapyrusProject.xsd" Flags="TESV_Papyrus_Flags.flg" Game="sse" Output="Scripts"> | |
| <!-- | |
| These variables contain hard-coded paths because the VS Code Papyrus extension does not support environment variables: https://github.com/joelday/papyrus-lang/issues/145 | |
| Please change the values of these variables to point to folders on your PC. | |
| Notes: | |
| - To create the contents of the "Imports" folder yourself, download the listed mods from Nexus or elsewhere and extract them to a folder. | |
| - In a few cases (notably UIExtensions) the authors put .psc files into .bsa, so be sure to also extract .bsa for these mods. |
This file contains hidden or 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
| #include <iostream> | |
| #include <gtest/gtest.h> | |
| #include <gmock/gmock.h> | |
| using ::testing::_; | |
| using ::testing::AtLeast; // #1 | |
| using ::testing::Ge; | |
| using ::testing::NotNull; | |
| using ::testing::StrictMock; |
This file contains hidden or 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
| template <class... Types> | |
| void Log(const std::string text, const Types&... args) { | |
| std::string result = std::format(text, args...); | |
| // logger::info("{}", result); | |
| // RE::ConsoleLog::GetSingleton()->Print(std::format("[SkyrimScripting] {}", result).c_str()); | |
| // std::cout << result << std::endl; | |
| }; |
This file contains hidden or 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
| { | |
| "version": 2, | |
| "cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 }, | |
| "configurePresets": [ | |
| { | |
| "name": "flags", | |
| "hidden": true, | |
| "cacheVariables": { | |
| "CMAKE_CXX_FLAGS": "/permissive- /Zc:preprocessor /EHsc /MP /W4 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS" | |
| } |
{
"workbench.colorCustomizations": {
This file contains hidden or 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
| --- | |
| AccessModifierOffset: -4 | |
| BasedOnStyle: Google | |
| ColumnLimit: 180 | |
| IndentWidth: '4' | |
| NamespaceIndentation: All | |
| TabWidth: '4' | |
| UseTab: Always | |
| IndentPPDirectives: BeforeHash | |
| FixNamespaceComments: false |
This file contains hidden or 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
| { | |
| "Singleton Methods": { | |
| "prefix": "singleton", | |
| "body": [ | |
| "$1() = default;\n~$1() = default;\n$1(const $1&) = delete;\n$1($1&&) = delete;\n$1& operator=(const $1&) = delete;\n$1& operator=($1&&) = delete;\nstatic $1& GetSingleton() {\n static $1 singleton;\n return singleton;\n}" | |
| ], | |
| "description": "Methods for singleton constructor/descructors incl operators" | |
| } | |
| } |
This file contains hidden or 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
| # CMake function which adds a target to check every that header in your project has all required #include's | |
| function(check_header_includes) | |
| set(options) | |
| set(oneValueArgs TARGET INCLUDE_DIR TEMP_DIR) | |
| set(multiValueArgs HEADERS PACKAGES LIBRARY_PATHS LIBRARIES) | |
| cmake_parse_arguments(CHECK_HEADER_INCLUDES "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | |
| if(NOT CMAKE_OBJECT_PATH_MAX OR CMAKE_OBJECT_PATH_MAX LESS 1000) | |
| # Bump up the max object path or CMake can get angry with some generated paths | |
| # https://stackoverflow.com/questions/68351713/maximum-path-lengths-with-cmake |