forked from WaterFace/DetachedLightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,76 @@ | ||
#include <RE/Skyrim.h> | ||
#include <SKSE/SKSE.h> | ||
|
||
namespace DetachedLightning { | ||
class BeamProjectileHook { | ||
namespace DetachedLightning | ||
{ | ||
class BeamProjectileHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
static void TagProjectile(RE::Projectile *proj, uint32_t tag); | ||
static uint32_t GetTag(RE::Projectile *proj); | ||
|
||
static void TagProjectile(RE::Projectile* proj, uint32_t tag); | ||
static uint32_t GetTag(RE::Projectile* proj); | ||
private: | ||
static RE::BeamProjectile* m_beamProjectileConstructor(RE::BeamProjectile* proj, void* launchData); | ||
static REL::Relocation<decltype(m_beamProjectileConstructor)>& m_getBeamProjectileConstructor(); | ||
static RE::BeamProjectile *m_beamProjectileConstructor(RE::BeamProjectile *proj, void *launchData); | ||
static REL::Relocation<decltype(m_beamProjectileConstructor)> &m_getBeamProjectileConstructor(); | ||
|
||
static inline REL::Relocation<decltype(m_beamProjectileConstructor)> m_originalBeamProjectileConstructor; | ||
}; | ||
|
||
class TESObjectREFR_SetPositionHook { | ||
class TESObjectREFR_SetPositionHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
private: | ||
static void m_SetPosition(RE::BeamProjectile* proj, RE::NiPoint3* pos); | ||
static REL::Relocation<decltype(m_SetPosition)>& m_getSetPosition(); | ||
static void m_SetPosition(RE::BeamProjectile *proj, RE::NiPoint3 *pos); | ||
static REL::Relocation<decltype(m_SetPosition)> &m_getSetPosition(); | ||
|
||
static inline REL::Relocation<decltype(m_SetPosition)> m_originalSetPosition; | ||
}; | ||
class TESObjectREFR_SetRotationXHook { | ||
class TESObjectREFR_SetRotationXHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
private: | ||
static void m_SetRotationX(RE::BeamProjectile* proj, RE::NiPoint3* pos); | ||
static REL::Relocation<decltype(m_SetRotationX)>& m_getSetRotationX(); | ||
static void m_SetRotationX(RE::BeamProjectile *proj, RE::NiPoint3 *pos); | ||
static REL::Relocation<decltype(m_SetRotationX)> &m_getSetRotationX(); | ||
|
||
static inline REL::Relocation<decltype(m_SetRotationX)> m_originalSetRotationX; | ||
}; | ||
class TESObjectREFR_SetRotationZHook { | ||
class TESObjectREFR_SetRotationZHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
private: | ||
static void m_SetRotationZ(RE::BeamProjectile* proj, RE::NiPoint3* pos); | ||
static REL::Relocation<decltype(m_SetRotationZ)>& m_getSetRotationZ(); | ||
static void m_SetRotationZ(RE::BeamProjectile *proj, RE::NiPoint3 *pos); | ||
static REL::Relocation<decltype(m_SetRotationZ)> &m_getSetRotationZ(); | ||
|
||
static inline REL::Relocation<decltype(m_SetRotationZ)> m_originalSetRotationZ; | ||
}; | ||
|
||
class RefHandle_GetHook { | ||
class RefHandle_GetHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
private: | ||
static bool m_refHandle_Get(uint32_t* handle, RE::Projectile** proj); | ||
static REL::Relocation<decltype(m_refHandle_Get)>& m_getRefHandle_Get(); | ||
static bool m_refHandle_Get(uint32_t *handle, RE::Projectile **proj); | ||
static REL::Relocation<decltype(m_refHandle_Get)> &m_getRefHandle_Get(); | ||
|
||
static inline REL::Relocation<decltype(m_refHandle_Get)> m_originalRefHandle_Get; | ||
}; | ||
|
||
class NodeHook { | ||
class NodeHook | ||
{ | ||
public: | ||
static void Hook(SKSE::Trampoline& trampoline); | ||
static void Hook(SKSE::Trampoline &trampoline); | ||
|
||
private: | ||
static void m_moveNode(float x, float y, float z, RE::Projectile* proj); | ||
static void m_moveNode(float x, float y, float z, RE::Projectile *proj); | ||
}; | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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