-
Notifications
You must be signed in to change notification settings - Fork 32
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
1 parent
d4e7645
commit 274d2b8
Showing
15 changed files
with
213 additions
and
9 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "sfse/GameChargen.h" |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "sfse/GameUI.h" | ||
#include "sfse/GameSingleton.h" | ||
#include "sfse_common/Relocation.h" | ||
#include "sfse_common/Utilities.h" | ||
|
||
namespace TESNPCData | ||
{ | ||
class ChargenDataModel : public IDataModel, public BSTSingletonSDM<ChargenDataModel> | ||
{ | ||
public: | ||
virtual ~ChargenDataModel(); | ||
|
||
static ChargenDataModel* GetSingleton() | ||
{ | ||
RelocPtr<ChargenDataModel*> singleton(0x58F7EF8); | ||
return *singleton; | ||
} | ||
|
||
// Contains main UI data model wrappers, decode these later | ||
// This function will pull data from the TESNPC into this wrapper | ||
DEFINE_MEMBER_FN_2(Update, void, 0x01890E98, TESNPC*, void* unk2); // Unk2 looks like somekind of restore point, is usually CharGenMenu+0x2D0 | ||
}; | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
template <class T> | ||
class BSTSingletonImplicit | ||
{ | ||
public: | ||
using value_type = T; | ||
}; | ||
|
||
template <class T> | ||
class BSTSingletonExplicit | ||
{ | ||
public: | ||
using value_type = T; | ||
}; | ||
|
||
template <class T> | ||
struct BSTSingletonSDMOpStaticBuffer | ||
{ | ||
public: | ||
using value_type = T; | ||
}; | ||
|
||
template <class Traits> | ||
struct BSTSingletonSDMBase : | ||
public Traits, | ||
public BSTSingletonSDMOpStaticBuffer<typename Traits::value_type> | ||
{ | ||
public: | ||
}; | ||
|
||
template <class T, class Buffer> | ||
struct BSTSDMTraits | ||
{ | ||
public: | ||
using value_type = T; | ||
}; | ||
|
||
template <class T, template <class> class Buffer = BSTSingletonSDMOpStaticBuffer> | ||
struct BSTSingletonSDM : | ||
public BSTSingletonSDMBase<BSTSDMTraits<T, Buffer<T>>> | ||
{ | ||
public: | ||
using value_type = T; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "sfse/GameUI.h" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
class IDataModel | ||
{ | ||
public: | ||
virtual ~IDataModel(); | ||
|
||
virtual void Unk_01(); | ||
virtual void Unk_02(); | ||
virtual void Unk_03(); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "Hooks_Scaleform.h" | ||
#include "sfse_common/Relocation.h" | ||
#include "sfse_common/Types.h" | ||
#include "sfse_common/Log.h" | ||
#include "sfse_common/SafeWrite.h" | ||
|
||
#include <stdarg.h> | ||
#ifdef _DEBUG | ||
#include <windows.h> | ||
#endif | ||
|
||
// Scaleform::Log vtable | ||
RelocAddr <uintptr_t> kHook_Scaleform_Log_Offset(0x04077C48 + 0x08); | ||
|
||
void Scaleform_LogMessageVarg(void*/*Scaleform::GFx::Log::State* */ logger, u32 messageType, const char* fmt, va_list args) | ||
{ | ||
DebugLog::log(DebugLog::kLevel_Message, fmt, args); | ||
#ifdef _DEBUG | ||
char szBuff[1024]; | ||
vsnprintf_s(szBuff, sizeof(szBuff), fmt, args); | ||
strcat_s(szBuff, "\n"); | ||
OutputDebugString(szBuff); | ||
#endif | ||
} | ||
|
||
void Hooks_Scaleform_Apply() | ||
{ | ||
safeWrite64(kHook_Scaleform_Log_Offset, (uintptr_t)Scaleform_LogMessageVarg); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void Hooks_Scaleform_Apply(); |
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