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
namespace Papyrus | |
{ | |
#define BIND(a_method, ...) a_vm.BindNativeMethod(obj, #a_method##sv, a_method __VA_OPT__(, ) __VA_ARGS__) | |
using RE::BSScript::structure_wrapper; | |
namespace Actor | |
{ | |
std::optional<structure_wrapper<"Actor", "WornItem">> GetWornItem(const RE::Actor& a_self, RE::BIPED_OBJECT a_slotIndex, bool a_firstPerson) | |
{ | |
if (a_slotIndex >= RE::BIPED_OBJECT::kTotal) { |
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 <algorithm> | |
#include <array> | |
#include <cassert> | |
#include <cstddef> | |
#include <cstdlib> | |
#include <cstring> | |
#include <filesystem> | |
#include <fstream> | |
#include <iostream> | |
#include <span> |
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
auto task = SKSE::GetTaskInterface(); | |
task->AddUITask([]() { | |
enum | |
{ | |
QUEST_UPDATE, | |
SKILL_LEVEL_UPDATE, | |
PLAYER_LEVEL_UPDATE, | |
SHOUT_UPDATE | |
}; |
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 <cassert> | |
#include <cstdint> | |
#include <functional> | |
#include <memory> | |
#include <type_traits> | |
#include <utility> | |
namespace stl | |
{ | |
template <class T> |
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
void DumpRTTI() | |
{ | |
std::vector<std::pair<std::string, std::uint64_t>> results; | |
REL::VTable typeInfo(".?AVtype_info@@"); | |
auto baseAddr = REL::Module::BaseAddr(); | |
auto data = REL::Module::GetSection(REL::Module::ID::kData); | |
auto beg = data.BasePtr<std::uintptr_t>(); | |
auto end = reinterpret_cast<std::uintptr_t*>(data.BaseAddr() + data.Size()); | |
for (auto iter = beg; iter < end; ++iter) { |
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 "version.h" | |
void SaveCallback(SKSE::SerializationInterface* a_intfc) | |
{ | |
SInt32 num = 42; | |
std::vector<SInt32> arr; | |
for (std::size_t i = 0; i < 10; ++i) { | |
arr.push_back(i); | |
} |
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 "common/IDebugLog.h" // IDebugLog | |
#include "skse64_common/skse_version.h" // RUNTIME_VERSION | |
#include "skse64/PluginAPI.h" // PluginHandle, SKSESerializationInterface, SKSEInterface, PluginInfo | |
#include <ShlObj.h> // CSIDL_MYDOCUMENTS | |
#include <vector> // vector | |
#include "version.h" // VERSION_VERSTRING, VERSION_MAJOR |
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 "version.h" | |
void MyCallback() | |
{ | |
_MESSAGE("This task was implemented with a free function!"); | |
} | |
extern "C" DLLEXPORT bool APIENTRY SKSEPlugin_Query(const SKSE::QueryInterface* a_skse, SKSE::PluginInfo* a_info) |
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 "common/IDebugLog.h" // IDebugLog | |
#include "skse64_common/skse_version.h" // RUNTIME_VERSION | |
#include "skse64/gamethreads.h" // TaskDelegate | |
#include "skse64/PluginAPI.h" // SKSETaskInterface, SKSEInterface, PluginInfo | |
#include <ShlObj.h> // CSIDL_MYDOCUMENTS | |
#include "version.h" // VERSION_VERSTRING, VERSION_MAJOR | |
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
ScriptName MyClass | |
String Function HelloWorld() Global Native | |
Int Function Sum(Int a_num1, Int a_num2) Global Native |
NewerOlder