docs: add plugin setup guide
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class __declspec(novtable) AcquireInterface
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RE::RTTI::Scaleform__AcquireInterface };
|
||||
static constexpr auto VTABLE{ RE::VTABLE::Scaleform__AcquireInterface };
|
||||
|
||||
virtual ~AcquireInterface() = default; // 00
|
||||
|
||||
// add
|
||||
virtual bool CanAcquire(); // 01
|
||||
virtual bool TryAcquire(); // 02
|
||||
virtual bool TryAcquireCommit(); // 03
|
||||
virtual bool TryAcquireCancel(); // 04
|
||||
};
|
||||
static_assert(sizeof(AcquireInterface) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class AllocInfo
|
||||
{
|
||||
public:
|
||||
~AllocInfo() noexcept {}
|
||||
|
||||
// members
|
||||
std::uint32_t statID;
|
||||
};
|
||||
static_assert(sizeof(AllocInfo) == 0x4);
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorBaseDH
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorBaseDH<kStat_Default_Mem>>);
|
||||
|
||||
template <std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorBaseGH
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorBaseGH<kStat_Default_Mem>>);
|
||||
|
||||
template <std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorBaseLH
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorBaseLH<kStat_Default_Mem>>);
|
||||
|
||||
template <class T>
|
||||
class ConstructorPOD
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorPOD<void*>>);
|
||||
|
||||
template <class T>
|
||||
class ConstructorMov
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorMov<void*>>);
|
||||
|
||||
template <class T>
|
||||
class ConstructorCPP
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorCPP<void*>>);
|
||||
|
||||
template <class T>
|
||||
class ConstructorPagedPOD :
|
||||
public ConstructorPOD<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorPagedPOD<void*>>);
|
||||
|
||||
template <class T>
|
||||
class ConstructorPagedMov :
|
||||
public ConstructorMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorPagedMov<void*>>);
|
||||
|
||||
template <typename T>
|
||||
class ConstructorPagedMovCC :
|
||||
public ConstructorMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ConstructorPagedMovCC<void*>>);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorGH :
|
||||
public AllocatorBaseGH<SID>,
|
||||
public ConstructorMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorGH<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorLH :
|
||||
public AllocatorBaseLH<SID>,
|
||||
public ConstructorMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorLH<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorDH :
|
||||
public AllocatorBaseDH<SID>,
|
||||
public ConstructorMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorDH<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem>
|
||||
class AllocatorGH_POD :
|
||||
public AllocatorBaseGH<SID>,
|
||||
public ConstructorPOD<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorGH_POD<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, int SID>
|
||||
class AllocatorPagedGH :
|
||||
AllocatorBaseGH<SID>,
|
||||
ConstructorPagedMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorPagedGH<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, int SID>
|
||||
class AllocatorPagedLH :
|
||||
AllocatorBaseLH<SID>,
|
||||
ConstructorPagedMov<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorPagedLH<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <typename T, int SID>
|
||||
class AllocatorPagedCC :
|
||||
AllocatorBaseLH<SID>,
|
||||
ConstructorPagedMovCC<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorPagedCC<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, int SID>
|
||||
class AllocatorPagedGH_POD :
|
||||
AllocatorBaseGH<SID>,
|
||||
ConstructorPagedPOD<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorPagedGH_POD<void*, kStat_Default_Mem>>);
|
||||
|
||||
template <class T, int SID>
|
||||
class AllocatorPagedLH_POD :
|
||||
AllocatorBaseLH<SID>,
|
||||
ConstructorPagedPOD<T>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<AllocatorPagedLH_POD<void*, kStat_Default_Mem>>);
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Allocator.h"
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
|
||||
class ArrayDefaultPolicy
|
||||
{
|
||||
public:
|
||||
~ArrayDefaultPolicy() noexcept {}
|
||||
|
||||
// members
|
||||
std::size_t capacity; // 0
|
||||
};
|
||||
static_assert(sizeof(ArrayDefaultPolicy) == 0x8);
|
||||
|
||||
template <std::int32_t MinCapacity = 0, std::int32_t Granularity = 4, bool NeverShrink = false>
|
||||
class ArrayConstPolicy
|
||||
{
|
||||
public:
|
||||
~ArrayConstPolicy() noexcept {}
|
||||
|
||||
// members
|
||||
std::size_t capacity; // 0
|
||||
};
|
||||
static_assert(sizeof(ArrayConstPolicy<>) == 0x8);
|
||||
|
||||
template <class T, class Allocator, class SizePolicy>
|
||||
class ArrayDataBase
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T* data; // 00
|
||||
std::size_t size; // 08
|
||||
SizePolicy policy; // 10
|
||||
};
|
||||
static_assert(sizeof(ArrayDataBase<void*, void*, ArrayDefaultPolicy>) == 0x18);
|
||||
|
||||
template <class T, class Allocator, class SizePolicy>
|
||||
class ArrayData :
|
||||
public ArrayDataBase<T, Allocator, SizePolicy>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayData<void*, void*, ArrayDefaultPolicy>) == 0x18);
|
||||
|
||||
template <class T, class Allocator, class SizePolicy>
|
||||
class ArrayDataDH :
|
||||
ArrayDataBase<T, Allocator, SizePolicy>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
const MemoryHeap* pHeap;
|
||||
};
|
||||
static_assert(sizeof(ArrayDataDH<void*, void*, ArrayDefaultPolicy>) == 0x20);
|
||||
|
||||
template <class T, class Allocator, class SizePolicy>
|
||||
class ArrayDataCC :
|
||||
public ArrayDataBase<T, Allocator, SizePolicy>
|
||||
{
|
||||
public:
|
||||
T defaultValue;
|
||||
};
|
||||
static_assert(sizeof(ArrayDataCC<void*, void*, ArrayDefaultPolicy>) == 0x20);
|
||||
|
||||
template <class T>
|
||||
class ArrayBase
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T data; // 00
|
||||
};
|
||||
static_assert(sizeof(ArrayBase<void*>) == 0x08);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem, class SizePolicy = ArrayDefaultPolicy>
|
||||
class Array :
|
||||
public ArrayBase<ArrayData<T, AllocatorGH<T, SID>, SizePolicy>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(Array<void*, kStat_Default_Mem, ArrayDefaultPolicy>) == 0x18);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem, class SizePolicy = ArrayDefaultPolicy>
|
||||
class ArrayLH :
|
||||
public ArrayBase<ArrayData<T, AllocatorLH<T, SID>, SizePolicy>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayLH<void*, kStat_Default_Mem, ArrayDefaultPolicy>) == 0x18);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem, class SizePolicy = ArrayDefaultPolicy>
|
||||
class ArrayDH :
|
||||
public ArrayBase<ArrayDataDH<T, AllocatorDH<T, SID>, SizePolicy>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayDH<void*, kStat_Default_Mem, ArrayDefaultPolicy>) == 0x20);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem, class SizePolicy = ArrayDefaultPolicy>
|
||||
class ArrayCC :
|
||||
public ArrayBase<ArrayDataCC<T, AllocatorLH<T, SID>, SizePolicy>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayCC<void*, kStat_Default_Mem, ArrayDefaultPolicy>) == 0x20);
|
||||
|
||||
template <class T, std::int32_t SID = kStat_Default_Mem, class SizePolicy = ArrayDefaultPolicy>
|
||||
class ArrayPOD :
|
||||
public ArrayBase<ArrayData<T, AllocatorGH_POD<T, SID>, SizePolicy>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayPOD<void*, kStat_Default_Mem, ArrayDefaultPolicy>) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Allocator.h"
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class T, std::int32_t PageSh = 0, std::int32_t PtrPoolInc = 0, class Allocator = AllocatorPagedCC<T, 0>>
|
||||
class ArrayPagedBase :
|
||||
public Allocator
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint64_t size; // 08
|
||||
std::uint64_t numPages; // 10
|
||||
std::uint64_t maxPages; // 18
|
||||
T** pages; // 20
|
||||
};
|
||||
static_assert(sizeof(ArrayPagedBase<void*>) == 0x28);
|
||||
|
||||
template <class T, std::int32_t PageSh = 6, std::int32_t PtrPoolInc = 64, std::int32_t SID = kStat_Default_Mem>
|
||||
class ArrayPagedPOD :
|
||||
public ArrayPagedBase<T, PageSh, PtrPoolInc, AllocatorPagedGH_POD<T, SID>>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ArrayPagedPOD<void*>) == 0x28);
|
||||
|
||||
template <class T, std::int32_t PageSh = 0, std::int32_t PtrPoolInc = 0, std::int32_t SID = 0>
|
||||
class ArrayPagedCC :
|
||||
public ArrayPagedBase<T, PageSh, PtrPoolInc, AllocatorPagedCC<T, SID>>
|
||||
{
|
||||
public:
|
||||
T defaultValue; // 28
|
||||
};
|
||||
static_assert(sizeof(ArrayPagedCC<void*>) == 0x30);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class T>
|
||||
class AtomicValueBase
|
||||
{
|
||||
public:
|
||||
// members
|
||||
volatile T value; // 0
|
||||
};
|
||||
static_assert(sizeof(AtomicValueBase<std::int32_t>) == 0x04);
|
||||
|
||||
template <class T>
|
||||
class AtomicInt :
|
||||
public AtomicValueBase<T> // 0
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(AtomicInt<std::int32_t>) == 0x04);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class T>
|
||||
class AutoPtr
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T* object; // 00
|
||||
bool owner; // 08
|
||||
};
|
||||
static_assert(sizeof(AutoPtr<void>) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/AcquireInterface.h"
|
||||
#include "Scaleform/M/Mutex.h"
|
||||
#include "Scaleform/W/WaitCondition.h"
|
||||
#include "Scaleform/W/Waitable.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class __declspec(novtable) Event :
|
||||
public Waitable, // 00
|
||||
public AcquireInterface // 18
|
||||
{
|
||||
public:
|
||||
// members
|
||||
volatile bool state; // 20
|
||||
volatile bool temporary; // 21
|
||||
mutable Mutex stateMutex; // 28
|
||||
WaitCondition stateWaitCondition; // 50
|
||||
};
|
||||
static_assert(sizeof(Event) == 0x58);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class E, class U = std::underlying_type_t<E>>
|
||||
using Flags = REX::TEnumSet<E, U>;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_VM.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class __declspec(novtable) ASVM :
|
||||
public VM // 00
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad2D0[0x3C8 - 0x2D0]; // 2D0
|
||||
};
|
||||
static_assert(sizeof(ASVM) == 0x3C8);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class ClassTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18 - 0x00]; // 00
|
||||
};
|
||||
static_assert(sizeof(ClassTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_Abc_NamespaceInfo.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class ConstPool :
|
||||
public NewOverrideBase<339>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t doubleCount; // 00
|
||||
const std::uint8_t* doubles; // 08
|
||||
std::byte pad10[0xA0 - 0x10]; // 10
|
||||
const NamespaceInfo anyNamespace; // A0
|
||||
};
|
||||
static_assert(sizeof(ConstPool) == 0xB8);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_Abc_ClassTable.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_ConstPool.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_MetadataTable.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_MethodBodyTable.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_MethodTable.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_ScriptTable.h"
|
||||
#include "Scaleform/G/GFx_AS3_Abc_TraitTable.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
#include "Scaleform/S/String.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class __declspec(novtable) alignas(0x10) File :
|
||||
public RefCountImpl, // 00
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
virtual ~File(); // 00
|
||||
|
||||
// members
|
||||
std::uint32_t dataSize; // 010
|
||||
String source; // 018
|
||||
std::uint16_t minorVersion; // 020
|
||||
std::uint16_t majorVersion; // 022
|
||||
ConstPool constPool; // 028
|
||||
MethodTable methods; // 0E0
|
||||
MetadataTable metadata; // 0F8
|
||||
TraitTable traits; // 110
|
||||
ClassTable classes; // 128
|
||||
ScriptTable scripts; // 140
|
||||
MethodBodyTable methodBodies; // 158
|
||||
};
|
||||
static_assert(sizeof(File) == 0x170);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class MbiInd
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::int32_t ind; // 00
|
||||
};
|
||||
static_assert(sizeof(MbiInd) == 0x04);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class MetadataTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18]; // 00
|
||||
};
|
||||
static_assert(sizeof(MetadataTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class MethodBodyTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18]; // 00
|
||||
};
|
||||
static_assert(sizeof(MethodBodyTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class MethodTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18]; // 00
|
||||
};
|
||||
static_assert(sizeof(MethodTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_Abc_NamespaceKind.h"
|
||||
#include "Scaleform/S/StringDataPtr.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class NamespaceInfo
|
||||
{
|
||||
public:
|
||||
// members
|
||||
NamespaceKind kind; // 00
|
||||
StringDataPtr NameURI; // 08
|
||||
};
|
||||
static_assert(sizeof(NamespaceInfo) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
enum class NamespaceKind : std::int32_t
|
||||
{
|
||||
kUndefined = -1,
|
||||
kPublic,
|
||||
kProtected,
|
||||
kStaticProtected,
|
||||
kPrivate,
|
||||
kExplicit,
|
||||
kPackageInternal
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class ScriptTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18]; // 00
|
||||
};
|
||||
static_assert(sizeof(ScriptTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3::Abc
|
||||
{
|
||||
class TraitTable :
|
||||
public NewOverrideBase<338>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::byte pad[0x18]; // 00
|
||||
};
|
||||
static_assert(sizeof(TraitTable) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_Abc_MbiInd.h"
|
||||
#include "Scaleform/G/GFx_AS3_Value.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
|
||||
namespace GFx::AS3
|
||||
{
|
||||
class Traits;
|
||||
class ValueRegisterFile;
|
||||
class VMAbcFile;
|
||||
|
||||
class __declspec(novtable) CallFrame :
|
||||
public NewOverrideBase<330>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
bool discardResult; // 00
|
||||
bool aCopy; // 01
|
||||
std::uint64_t scopeStackBaseInd; // 08
|
||||
const std::uint64_t* cp; // 10
|
||||
ValueRegisterFile* registerValue; // 18
|
||||
MemoryHeap* heap; // 20
|
||||
VMAbcFile* file; // 28
|
||||
Abc::MbiInd mbiIndex; // 30
|
||||
const void* savedScope; // 38 - TODO
|
||||
const Traits* originationTraits; // 40
|
||||
void* scopeStack; // 48 - TODO
|
||||
AS3::Value* prevInitialStackPos; // 50
|
||||
void* defXMLNamespace; // 58 - TODO
|
||||
AS3::Value* prevFirstStackPos; // 60
|
||||
AS3::Value invoker; // 68
|
||||
};
|
||||
static_assert(sizeof(CallFrame) == 0x88);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class __declspec(novtable) FlashUI
|
||||
{
|
||||
public:
|
||||
enum class OutputMessageType : std::int32_t
|
||||
{
|
||||
kMessage,
|
||||
kError,
|
||||
kWarning,
|
||||
kAction
|
||||
};
|
||||
|
||||
enum class StateType : std::int32_t
|
||||
{
|
||||
kError,
|
||||
kBreakpoint,
|
||||
kPreStep,
|
||||
kStep
|
||||
};
|
||||
|
||||
virtual ~FlashUI(); // 00
|
||||
|
||||
// add
|
||||
virtual void Output(OutputMessageType a_type, const char* a_msg) = 0; // 01
|
||||
virtual bool OnOpCode(std::uint64_t a_opCode) = 0; // 02
|
||||
|
||||
// members
|
||||
StateType state; // 08
|
||||
bool needToCheck; // 0C
|
||||
};
|
||||
static_assert(sizeof(FlashUI) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_RefCountBaseGC.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class __declspec(novtable) GASRefCountBase :
|
||||
public RefCountBaseGC<328> // 00
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(GASRefCountBase) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/AutoPtr.h"
|
||||
#include "Scaleform/G/GFx_AS3_FlashUI.h"
|
||||
#include "Scaleform/G/GFx_ASMovieRootBase.h"
|
||||
#include "Scaleform/G/GFx_KeyboardState.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class ASVM;
|
||||
class MemoryContextImpl;
|
||||
|
||||
class __declspec(novtable) MovieRoot :
|
||||
public Scaleform::GFx::ASMovieRootBase, // 00
|
||||
public Scaleform::GFx::AS3::FlashUI, // 28
|
||||
public Scaleform::GFx::KeyboardState::IListener // 38
|
||||
{
|
||||
public:
|
||||
class MemContextPtr :
|
||||
Ptr<MemoryContextImpl>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(MemContextPtr) == 0x08);
|
||||
|
||||
// members
|
||||
MemContextPtr memContext; // 040
|
||||
AutoPtr<ASVM> asVM; // 048
|
||||
std::byte pad058[0x4A8 - 0x58]; // 058 - TODO
|
||||
};
|
||||
static_assert(sizeof(MovieRoot) == 0x4A8);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
template <std::int32_t STAT>
|
||||
class __declspec(novtable) RefCountBaseGC :
|
||||
public NewOverrideBase<STAT> // 00
|
||||
{
|
||||
public:
|
||||
virtual ~RefCountBaseGC(); // 00
|
||||
|
||||
// members
|
||||
union
|
||||
{
|
||||
void* rcc;
|
||||
std::uint64_t rccRaw;
|
||||
}; // 08
|
||||
union
|
||||
{
|
||||
const RefCountBaseGC<STAT>* next;
|
||||
const RefCountBaseGC<STAT>* nextRoot;
|
||||
}; // 10
|
||||
union
|
||||
{
|
||||
const RefCountBaseGC<STAT>* prev;
|
||||
const RefCountBaseGC<STAT>* prevRoot;
|
||||
}; // 18
|
||||
std::uint32_t refCount; // 20
|
||||
};
|
||||
static_assert(sizeof(RefCountBaseGC<328>) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
template <typename T>
|
||||
class SPtr
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T* object; // 00
|
||||
};
|
||||
static_assert(sizeof(SPtr<void>) == 0x08);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_ASStringBuiltinManagerT.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
enum class BuiltinType;
|
||||
|
||||
class StringManager :
|
||||
public ASStringBuiltinManagerT<BuiltinType, 65>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(StringManager) == 0x218);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class TypeInfo
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t flags; // 00
|
||||
std::uint16_t instanceSize; // 04
|
||||
std::uint16_t classMethodNum; // 06
|
||||
std::uint16_t classMemberNum; // 08
|
||||
std::uint16_t instanceMethodNum; // 0A
|
||||
std::uint16_t instanceMemberNum; // 0C
|
||||
const char* name; // 10
|
||||
const char* packageName; // 18
|
||||
const TypeInfo* parent; // 20
|
||||
const TypeInfo** implements; // 28
|
||||
};
|
||||
static_assert(sizeof(TypeInfo) == 0x30);
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/ArrayPaged.h"
|
||||
#include "Scaleform/G/GFx_AS3_CallFrame.h"
|
||||
#include "Scaleform/G/GFx_ASString.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class StringManager;
|
||||
|
||||
class __declspec(novtable) VM :
|
||||
public NewOverrideBase<329>
|
||||
{
|
||||
public:
|
||||
enum ErrorID
|
||||
{
|
||||
eOutOfMemoryError = 0x3E8,
|
||||
eNotImplementedError = 0x3E9,
|
||||
eInvalidPrecisionError = 0x3EA,
|
||||
eInvalidRadixError = 0x3EB,
|
||||
eInvokeOnIncompatibleObjectError = 0x3EC,
|
||||
eArrayIndexNotIntegerError = 0x3ED,
|
||||
eCallOfNonFunctionError = 0x3EE,
|
||||
eConstructOfNonFunctionError = 0x3EF,
|
||||
eAmbiguousBindingError = 0x3F0,
|
||||
eConvertNullToObjectError = 0x3F1,
|
||||
eConvertUndefinedToObjectError = 0x3F2,
|
||||
eIllegalOpcodeError = 0x3F3,
|
||||
eLastInstExceedsCodeSizeError = 0x3F4,
|
||||
eFindVarWithNoScopeError = 0x3F5,
|
||||
eClassNotFoundError = 0x3F6,
|
||||
eIllegalSetDxns = 0x3F7,
|
||||
eDescendentsError = 0x3F8,
|
||||
eScopeStackOverflowError = 0x3F9,
|
||||
eScopeStackUnderflowError = 0x3FA,
|
||||
eGetScopeObjectBoundsError = 0x3FB,
|
||||
eCannotFallOffMethodError = 0x3FC,
|
||||
eInvalidBranchTargetError = 0x3FD,
|
||||
eIllegalVoidError = 0x3FE,
|
||||
eStackOverflowError = 0x3FF,
|
||||
eStackUnderflowError = 0x400,
|
||||
eInvalidRegisterError = 0x401,
|
||||
eSlotExceedsCountError = 0x402,
|
||||
eMethodInfoExceedsCountError = 0x403,
|
||||
eDispIdExceedsCountError = 0x404,
|
||||
eDispIdUndefinedError = 0x405,
|
||||
eStackDepthUnbalancedError = 0x406,
|
||||
eScopeDepthUnbalancedError = 0x407,
|
||||
eCpoolIndexRangeError = 0x408,
|
||||
eCpoolEntryWrongTypeError = 0x409,
|
||||
eCheckTypeFailedError = 0x40A,
|
||||
eIllegalSuperCallError = 0x40B,
|
||||
eCannotAssignToMethodError = 0x40D,
|
||||
eRedefinedError = 0x40E,
|
||||
eCannotVerifyUntilReferencedError = 0x40F,
|
||||
eCantUseInstanceofOnNonObjectError = 0x410,
|
||||
eIsTypeMustBeClassError = 0x411,
|
||||
eInvalidMagicError = 0x412,
|
||||
eInvalidCodeLengthError = 0x413,
|
||||
eInvalidMethodInfoFlagsError = 0x414,
|
||||
eUnsupportedTraitsKindError = 0x415,
|
||||
eMethodInfoOrderError = 0x416,
|
||||
eMissingEntryPointError = 0x417,
|
||||
ePrototypeTypeError = 0x419,
|
||||
eConvertToPrimitiveError = 0x41A,
|
||||
eIllegalEarlyBindingError = 0x41B,
|
||||
eInvalidURIError = 0x41C,
|
||||
eIllegalOverrideError = 0x41D,
|
||||
eIllegalExceptionHandlerError = 0x41E,
|
||||
eWriteSealedError = 0x420,
|
||||
eIllegalSlotError = 0x421,
|
||||
eIllegalOperandTypeError = 0x422,
|
||||
eClassInfoOrderError = 0x423,
|
||||
eClassInfoExceedsCountError = 0x424,
|
||||
eNumberOutOfRangeError = 0x425,
|
||||
eWrongArgumentCountError = 0x427,
|
||||
eCannotCallMethodAsConstructor = 0x428,
|
||||
eUndefinedVarError = 0x429,
|
||||
eFunctionConstructorError = 0x42A,
|
||||
eIllegalNativeMethodBodyError = 0x42B,
|
||||
eCannotMergeTypesError = 0x42C,
|
||||
eReadSealedError = 0x42D,
|
||||
ePropertyNotFoundError = 0x42D,
|
||||
eCallNotFoundError = 0x42E,
|
||||
eAlreadyBoundError = 0x42F,
|
||||
eZeroDispIdError = 0x430,
|
||||
eDuplicateDispIdError = 0x431,
|
||||
eConstWriteError = 0x432,
|
||||
eMathNotFunctionError = 0x433,
|
||||
eMathNotConstructorError = 0x434,
|
||||
eWriteOnlyError = 0x435,
|
||||
eIllegalOpMultinameError = 0x436,
|
||||
eIllegalNativeMethodError = 0x437,
|
||||
eIllegalNamespaceError = 0x438,
|
||||
eReadSealedErrorNs = 0x439,
|
||||
eNoDefaultNamespaceError = 0x43A,
|
||||
eXMLPrefixNotBound = 0x43B,
|
||||
eXMLBadQName = 0x43C,
|
||||
eXMLUnterminatedElementTag = 0x43D,
|
||||
eXMLOnlyWorksWithOneItemLists = 0x43E,
|
||||
eXMLAssignmentToIndexedXMLNotAllowed = 0x43F,
|
||||
eXMLMarkupMustBeWellFormed = 0x440,
|
||||
eXMLAssigmentOneItemLists = 0x441,
|
||||
eXMLMalformedElement = 0x442,
|
||||
eXMLUnterminatedCData = 0x443,
|
||||
eXMLUnterminatedXMLDecl = 0x444,
|
||||
eXMLUnterminatedDocTypeDecl = 0x445,
|
||||
eXMLUnterminatedComment = 0x446,
|
||||
eXMLUnterminatedAttribute = 0x447,
|
||||
eXMLUnterminatedElement = 0x448,
|
||||
eXMLUnterminatedProcessingInstruction = 0x449,
|
||||
eXMLNamespaceWithPrefixAndNoURI = 0x44A,
|
||||
eRegExpFlagsArgumentError = 0x44C,
|
||||
eNoScopeError = 0x44D,
|
||||
eIllegalDefaultValue = 0x44E,
|
||||
eCannotExtendFinalClass = 0x44F,
|
||||
eXMLDuplicateAttribute = 0x450,
|
||||
eCorruptABCError = 0x453,
|
||||
eInvalidBaseClassError = 0x454,
|
||||
eDanglingFunctionError = 0x455,
|
||||
eCannotExtendError = 0x456,
|
||||
eCannotImplementError = 0x457,
|
||||
eCoerceArgumentCountError = 0x458,
|
||||
eInvalidNewActivationError = 0x459,
|
||||
eNoGlobalScopeError = 0x45A,
|
||||
eNotConstructorError = 0x45B,
|
||||
eApplyError = 0x45C,
|
||||
eXMLInvalidName = 0x45D,
|
||||
eXMLIllegalCyclicalLoop = 0x45E,
|
||||
eDeleteTypeError = 0x45F,
|
||||
eDeleteSealedError = 0x460,
|
||||
eDuplicateMethodBodyError = 0x461,
|
||||
eIllegalInterfaceMethodBodyError = 0x462,
|
||||
eFilterError = 0x463,
|
||||
eInvalidHasNextError = 0x464,
|
||||
eOutOfRangeError = 0x465,
|
||||
eVectorFixedError = 0x466,
|
||||
eTypeAppOfNonParamType = 0x467,
|
||||
eWrongTypeArgCountError = 0x468,
|
||||
eFileOpenError = 0x5DC,
|
||||
eFileWriteError = 0x5DD,
|
||||
eScriptTimeoutError = 0x5DE,
|
||||
eScriptTerminatedError = 0x5DF,
|
||||
eEndOfFileError = 0x5E0,
|
||||
eStringIndexOutOfBoundsError = 0x5E1,
|
||||
eInvalidRangeError = 0x5E2,
|
||||
eNullArgumentError = 0x5E3,
|
||||
eInvalidArgumentError = 0x5E4,
|
||||
eShellCompressedDataError = 0x5E5,
|
||||
eArrayFilterNonNullObjectError = 0x5E6,
|
||||
eParamRangeError = 0x7D6,
|
||||
eNullPointerError = 0x7D7,
|
||||
eInvalidEnumError = 0x7D8,
|
||||
eArgumentError = 0x7DF,
|
||||
eAddObjectItselfError = 0x7E8,
|
||||
eMustBeChildError = 0x7E9,
|
||||
eMustBeNonNegative = 0x7EB,
|
||||
eEOFError = 0x7EE,
|
||||
eCompressedDataError = 0x80A,
|
||||
eIllegalOperationError = 0x81D,
|
||||
eProxyGetPropertyError = 0x828,
|
||||
eProxySetPropertyError = 0x829,
|
||||
eProxyCallPropertyError = 0x82A,
|
||||
eProxyHasPropertyError = 0x82B,
|
||||
eProxyDeletePropertyError = 0x82C,
|
||||
eProxyGetDescendantsError = 0x82D,
|
||||
eProxyNextNameIndexError = 0x839,
|
||||
eProxyNextNameError = 0x83A,
|
||||
eProxyNextValueError = 0x83B,
|
||||
eSceneNotFound = 0x83C,
|
||||
eFrameLabelNotFoundInScene = 0x83D,
|
||||
eSWFHasInvalidData = 0x858,
|
||||
};
|
||||
|
||||
class Error
|
||||
{
|
||||
public:
|
||||
// members
|
||||
ErrorID id; // 04
|
||||
ASString message; // 08
|
||||
};
|
||||
static_assert(sizeof(Error) == 0x10);
|
||||
|
||||
virtual ~VM();
|
||||
|
||||
CallFrame* GetCurrCallFrame()
|
||||
{
|
||||
if (callStack.size > 0) {
|
||||
auto idx = callStack.size - 1;
|
||||
return &callStack.pages[idx >> 6][idx & 0x3F];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// members
|
||||
bool initialized; // 008
|
||||
bool inDestructor; // 009
|
||||
bool loadingAbcFile; // 00A
|
||||
StringManager* stringManagerRef; // 010
|
||||
std::byte pad008[0xE8 - 0x18]; // 018 - TODO
|
||||
ArrayPagedCC<CallFrame, 6, 64, 329> callStack; // 0E8
|
||||
std::byte pad198[0x2D0 - 0x198]; // 198 - TODO
|
||||
};
|
||||
static_assert(sizeof(VM) == 0x2D0);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_Abc_File.h"
|
||||
#include "Scaleform/G/GFx_AS3_VMFile.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class __declspec(novtable) VMAbcFile :
|
||||
public VMFile
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Ptr<Abc::File> file; // 98
|
||||
std::byte padA0[0xE8 - 0xA0]; // A0
|
||||
};
|
||||
static_assert(sizeof(VMAbcFile) == 0xE8);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_AS3_GASRefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class VM;
|
||||
|
||||
class __declspec(novtable) VMFile :
|
||||
public GASRefCountBase
|
||||
{
|
||||
public:
|
||||
// members
|
||||
VM* vmRef; // 28
|
||||
std::byte pad30[0x98 - 0x30]; // 30
|
||||
};
|
||||
static_assert(sizeof(VMFile) == 0x98);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx::AS3
|
||||
{
|
||||
class ASStringNode;
|
||||
class Class;
|
||||
class Object;
|
||||
class ThunkInfo;
|
||||
class Traits;
|
||||
class WeakProxy;
|
||||
|
||||
namespace ClassTraits
|
||||
{
|
||||
class Traits;
|
||||
}
|
||||
|
||||
namespace Instances
|
||||
{
|
||||
class Function;
|
||||
class ThunkFunction;
|
||||
|
||||
namespace fl
|
||||
{
|
||||
class Namespace;
|
||||
}
|
||||
}
|
||||
|
||||
namespace InstanceTraits
|
||||
{
|
||||
class Traits;
|
||||
}
|
||||
|
||||
class Value
|
||||
{
|
||||
public:
|
||||
class Extra
|
||||
{
|
||||
public:
|
||||
// members
|
||||
WeakProxy* weakProxy; // 00
|
||||
};
|
||||
static_assert(sizeof(Extra) == 0x08);
|
||||
|
||||
union V1U
|
||||
{
|
||||
bool vbool;
|
||||
std::int32_t vint;
|
||||
std::uint32_t vuint;
|
||||
ASStringNode* vstr;
|
||||
Object* vobj;
|
||||
Class* vclass;
|
||||
Instances::Function* vfunct;
|
||||
const ThunkInfo* vthunk;
|
||||
Instances::ThunkFunction* vthunkfunct;
|
||||
Instances::fl::Namespace* vnamespace;
|
||||
InstanceTraits::Traits* instanceTraits;
|
||||
ClassTraits::Traits* classTraits;
|
||||
};
|
||||
|
||||
union V2U
|
||||
{
|
||||
Object* vobj;
|
||||
const Traits* traits;
|
||||
};
|
||||
|
||||
class VStruct
|
||||
{
|
||||
public:
|
||||
// members
|
||||
V1U _1; // 00
|
||||
V2U _2; // 08
|
||||
};
|
||||
static_assert(sizeof(VStruct) == 0x10);
|
||||
|
||||
union VU
|
||||
{
|
||||
long double number;
|
||||
VStruct VS;
|
||||
};
|
||||
|
||||
// members
|
||||
std::uint32_t flags; // 00
|
||||
Extra bonus; // 08
|
||||
VU value; // 10
|
||||
};
|
||||
static_assert(sizeof(Value) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_ASStringNodeHolder.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASConstString :
|
||||
public ASStringNodeHolder
|
||||
{
|
||||
public:
|
||||
const char* ToCStr() const noexcept
|
||||
{
|
||||
return node->data;
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(ASConstString) == 0x08);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatMovieView.h"
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class MovieDefImpl;
|
||||
class MovieImpl;
|
||||
|
||||
class __declspec(novtable) ASIntervalTimerIntf :
|
||||
public RefCountBase<ASIntervalTimerIntf, kStatMV_ActionScript_Mem> // 00
|
||||
{
|
||||
public:
|
||||
virtual ~ASIntervalTimerIntf() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Start(MovieImpl* a_root) = 0; // 01
|
||||
virtual bool Invoke(MovieImpl* a_root, float a_frameTime) = 0; // 02
|
||||
virtual bool IsActive() const = 0; // 03
|
||||
virtual void Clear() = 0; // 04
|
||||
virtual bool ClearFor(MovieImpl* a_root, MovieDefImpl* a_def) = 0; // 05
|
||||
virtual std::uint64_t GetNextInvokeTime() const = 0; // 06
|
||||
virtual void SetId(std::int32_t a_id) = 0; // 07
|
||||
virtual std::int32_t GetId() const = 0; // 08
|
||||
};
|
||||
static_assert(sizeof(ASIntervalTimerIntf) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Array.h"
|
||||
#include "Scaleform/G/GFx_FocusMovedType.h"
|
||||
#include "Scaleform/G/GFx_Movie.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
#include "Scaleform/R/Render_Point.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
class String;
|
||||
|
||||
namespace Render::Text
|
||||
{
|
||||
class Allocator;
|
||||
}
|
||||
|
||||
namespace GFx
|
||||
{
|
||||
class AccelerometerEvent;
|
||||
class AmpMovieObjectDesc;
|
||||
class AppLifecycleEvent;
|
||||
class ASString;
|
||||
class ASStringManager;
|
||||
class ASSupport;
|
||||
class DisplayObjContainer;
|
||||
class DisplayObject;
|
||||
class EventId;
|
||||
class FunctionHandler;
|
||||
class GeolocationEvent;
|
||||
class InputEventsQueueEntry;
|
||||
class InteractiveObject;
|
||||
class LoadQueueEntry;
|
||||
class LoadStates;
|
||||
class MemoryContext;
|
||||
class MouseState;
|
||||
class MovieDefImpl;
|
||||
class MovieDefRootNode;
|
||||
class MovieImpl;
|
||||
class OrientationEvent;
|
||||
class ProcessFocusKeyInfo;
|
||||
class Value;
|
||||
|
||||
class __declspec(novtable) ASMovieRootBase :
|
||||
public RefCountBase<ASMovieRootBase, 327> // 00
|
||||
{
|
||||
public:
|
||||
// add
|
||||
virtual void SetMovie(MovieImpl* a_movie) { movieImpl = a_movie; } // 01
|
||||
virtual void AdvanceFrame(bool a_nextFrame) = 0; // 02
|
||||
virtual void ChangeMouseCursorType(std::uint32_t a_mouseIdx, std::uint32_t a_newCursorType) = 0; // 03
|
||||
virtual bool CheckAvm() = 0; // 04
|
||||
virtual void ClearDisplayList() = 0; // 05
|
||||
virtual MovieDefRootNode* CreateMovieDefRootNode(MemoryHeap* a_heap, MovieDefImpl* a_defImpl, bool a_importFlag) = 0; // 06
|
||||
virtual void DoActions() = 0; // 07
|
||||
virtual InteractiveObject* FindTarget(const ASString& a_path) const = 0; // 08
|
||||
virtual void ForceCollect() = 0; // 09
|
||||
virtual void ForceEmergencyCollect() = 0; // 0A
|
||||
virtual void SuspendGC(bool a_suspend) = 0; // 0B
|
||||
virtual void ScheduleGC() = 0; // 0C
|
||||
virtual void GenerateMouseEvents(std::uint32_t mouseIndex) = 0; // 0D
|
||||
virtual void GenerateTouchEvents([[maybe_unused]] std::uint32_t a_mouseStateIndex) { return; } // 0E
|
||||
|
||||
virtual void GenerateGestureEvents( // 0F
|
||||
[[maybe_unused]] InteractiveObject* a_topmost,
|
||||
[[maybe_unused]] std::uint32_t a_phase,
|
||||
[[maybe_unused]] const Render::Point<float>& a_pos,
|
||||
[[maybe_unused]] const Render::Point<float>& a_offset,
|
||||
[[maybe_unused]] const Render::Point<float>& a_scale,
|
||||
[[maybe_unused]] float a_rotation,
|
||||
[[maybe_unused]] std::uint32_t a_gestureMask)
|
||||
{}
|
||||
|
||||
virtual DisplayObjContainer* GetRootMovie(DisplayObject* dobj = nullptr) const = 0; // 10
|
||||
virtual bool Init(MovieDefImpl* a_movieDef) = 0; // 11
|
||||
virtual void NotifyMouseEvent(const InputEventsQueueEntry* a_qe, const MouseState& a_ms, std::int32_t a_mi) = 0; // 12
|
||||
virtual void NotifyOnResize() = 0; // 13
|
||||
virtual void NotifyQueueSetFocus(InteractiveObject* a_ch, std::uint32_t a_controllerIdx, FocusMovedType a_fmt) = 0; // 14
|
||||
virtual void NotifyTransferFocus(InteractiveObject* a_curFocused, InteractiveObject* a_newFocus, std::uint32_t a_controllerIdx) = 0; // 15
|
||||
virtual bool NotifyOnFocusChange(InteractiveObject* a_curFocused, InteractiveObject* a_toBeFocused, std::uint32_t a_controllerIdx, FocusMovedType a_fmt, ProcessFocusKeyInfo* a_focusKeyInfo = nullptr) = 0; // 16
|
||||
virtual void NotifyGamePadAnalogEvent([[maybe_unused]] const EventId* a_id) { return; } // 17
|
||||
virtual void NotifyStatusEvent([[maybe_unused]] const EventId* a_id) { return; } // 18
|
||||
virtual void NotifyAccelerometerEvent([[maybe_unused]] const EventId* a_id, [[maybe_unused]] std::int32_t a_evtIDAcc) { return; } // 19
|
||||
virtual void NotifyGeolocationEvent([[maybe_unused]] const EventId* a_id, [[maybe_unused]] std::int32_t a_evtIDGeo) { return; } // 1A
|
||||
virtual void OnMovieFocus(bool a_set) = 0; // 1B
|
||||
virtual void OnNextFrame() = 0; // 1C
|
||||
virtual void OnDeviceOrientationChanged([[maybe_unused]] const OrientationEvent&) { return; } // 1D
|
||||
virtual void OnAppLifecycleEvent([[maybe_unused]] const AppLifecycleEvent&) { return; } // 1E
|
||||
virtual void OnAccelerometerEvent([[maybe_unused]] const AccelerometerEvent&) { return; } // 1F
|
||||
virtual void OnGeolocationEvent([[maybe_unused]] const GeolocationEvent&) { return; } // 20
|
||||
virtual void PrintObjectsReport([[maybe_unused]] std::uint32_t a_flags = 0, [[maybe_unused]] Log* a_log = nullptr, [[maybe_unused]] const char* a_swfName = nullptr) { return; } // 21
|
||||
virtual void GetObjectsTree([[maybe_unused]] Array<Ptr<AmpMovieObjectDesc>>* a_rootObjects, [[maybe_unused]] MemoryHeap* a_heap) { return; } // 22
|
||||
virtual AmpMovieObjectDesc* GetDisplayObjectsTree([[maybe_unused]] MemoryHeap* a_heap) { return nullptr; } // 23
|
||||
virtual void ProcessLoadQueueEntry(LoadQueueEntry* a_entry, LoadStates* a_ls) = 0; // 24
|
||||
virtual void ProcessLoadVarsMT(LoadQueueEntry* a_entry, LoadStates* a_ls, const String& a_data, std::size_t a_fileLen, bool a_succeeded) = 0; // 25
|
||||
|
||||
virtual void ProcessLoadBinaryMT( // 26
|
||||
[[maybe_unused]] LoadQueueEntry* a_entry,
|
||||
[[maybe_unused]] LoadStates* a_ls,
|
||||
[[maybe_unused]] const ArrayPOD<std::byte>& a_data,
|
||||
[[maybe_unused]] std::size_t a_fileLen,
|
||||
[[maybe_unused]] bool a_succeeded)
|
||||
{}
|
||||
|
||||
virtual void RegisterAuxASClasses() = 0; // 27
|
||||
virtual void ResolveStickyVariables(InteractiveObject* a_character) = 0; // 28
|
||||
virtual void SetExternalInterfaceRetVal(const Value&) = 0; // 29
|
||||
virtual void SetMemoryParams(std::uint32_t a_frameBetweenCollections, std::uint32_t a_maxRootCount) = 0; // 2A
|
||||
virtual void Shutdown() = 0; // 2B
|
||||
virtual void CreateString(Value* a_value, const char* a_string) = 0; // 2C
|
||||
virtual void CreateStringW(Value* a_value, const wchar_t* a_string) = 0; // 2D
|
||||
virtual void CreateObject(Value* a_value, const char* a_className = nullptr, const Value* a_args = nullptr, std::uint32_t a_numArgs = 0) = 0; // 2E
|
||||
virtual void CreateArray(Value* a_value) = 0; // 2F
|
||||
virtual void CreateFunction(Value* a_value, FunctionHandler* a_fc, void* a_userData = nullptr) = 0; // 30
|
||||
virtual bool SetVariable(const char* a_pathToVar, const Value& a_value, Movie::SetVarType a_setType = Movie::SetVarType::kSticky) = 0; // 31
|
||||
virtual bool GetVariable(Value* a_val, const char* a_pathToVar) const = 0; // 32
|
||||
virtual bool SetVariableArray(Movie::SetArrayType a_type, const char* a_pathToVar, std::uint32_t a_index, const void* a_data, std::uint32_t a_count, Movie::SetVarType a_setType = Movie::SetVarType::kSticky) = 0; // 33
|
||||
virtual bool SetVariableArraySize(const char* a_pathToVar, std::uint32_t a_count, Movie::SetVarType a_setType = Movie::SetVarType::kSticky) = 0; // 35
|
||||
virtual std::uint32_t GetVariableArraySize(const char* a_pathToVar) = 0; // 34
|
||||
virtual bool GetVariableArray(Movie::SetArrayType a_type, const char* a_pathToVar, std::uint32_t a_index, void* a_data, std::uint32_t a_count) = 0; // 36
|
||||
virtual bool IsAvailable(const char* ppathToVar) const = 0; // 37
|
||||
virtual bool Invoke(const char* a_pathToMethod, Value* a_result, const Value* a_args, std::uint32_t a_numArgs) = 0; // 39
|
||||
virtual bool Invoke(const char* a_pathToMethod, Value* a_result, const char* a_argFmt, ...) = 0; // 38
|
||||
virtual bool InvokeArgs(const char* a_pathToMethod, Value* a_result, const char* a_argFmt, std::va_list a_args) = 0; // 3A
|
||||
virtual MemoryContext* GetMemoryContext() const = 0; // 3B
|
||||
virtual ASStringManager* GetStringManager() const = 0; // 3C
|
||||
virtual Render::Text::Allocator* GetTextAllocator() = 0; // 3D
|
||||
virtual void BroadcastGeolocationStatusEvent(const EventId* a_id) = 0; // 3E
|
||||
|
||||
// members
|
||||
MovieImpl* movieImpl; // 10
|
||||
Ptr<ASSupport> asSupport; // 18
|
||||
std::uint8_t avmVersion; // 20
|
||||
};
|
||||
static_assert(sizeof(ASMovieRootBase) == 0x28);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_ASConstString.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASString :
|
||||
public ASConstString
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ASString) == 0x08);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_ASStringNodeHolder.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASStringManager;
|
||||
|
||||
template <class T, std::int32_t STAT>
|
||||
class ASStringBuiltinManagerT
|
||||
{
|
||||
public:
|
||||
// members
|
||||
ASStringNodeHolder builtins[STAT]; // 00
|
||||
ASStringManager* stringManager; // ??
|
||||
const char** staticStrings; // ??+08
|
||||
};
|
||||
static_assert(sizeof(ASStringBuiltinManagerT<void, 65>) == 0x218);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASStringNode;
|
||||
|
||||
class __declspec(novtable) alignas(0x08) ASStringManager :
|
||||
public RefCountBase<ASStringManager, 324> // 00
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] ASStringNode* CreateStringNode(const char* a_str)
|
||||
{
|
||||
using func_t = decltype(&ASStringManager::CreateStringNode);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::ASStringManager::CreateStringNode };
|
||||
return func(this, a_str);
|
||||
}
|
||||
|
||||
// members
|
||||
std::byte pad10[0xA0 - 0x10]; // 10
|
||||
};
|
||||
static_assert(sizeof(ASStringManager) == 0xA0);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASStringManager;
|
||||
|
||||
class ASStringNode
|
||||
{
|
||||
public:
|
||||
// members
|
||||
const char* data; // 00
|
||||
ASStringManager* manager; // 08
|
||||
union
|
||||
{
|
||||
ASStringNode* lower;
|
||||
ASStringNode* next;
|
||||
}; // 10
|
||||
std::uint32_t refCount; // 18
|
||||
std::uint32_t hashFlags; // 1C
|
||||
std::uint32_t size; // 20
|
||||
};
|
||||
static_assert(sizeof(ASStringNode) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_ASStringNode.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ASStringNodeHolder
|
||||
{
|
||||
public:
|
||||
// members
|
||||
ASStringNode* node; // 00
|
||||
};
|
||||
static_assert(sizeof(ASStringNodeHolder) == 0x08);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/F/Flags.h"
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) ActionControl :
|
||||
public State // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto GFX_STATE_TYPE{ StateType::kActionControl };
|
||||
|
||||
enum class ActionControlFlags : std::uint32_t
|
||||
{
|
||||
kVerbose = 0x01,
|
||||
kErrorSuppress = 0x02,
|
||||
kLogRootFilenames = 0x04,
|
||||
kLogChildFilenames = 0x08,
|
||||
kLogAllFilenames = 0x04 | 0x08,
|
||||
kLongFilenames = 0x10
|
||||
};
|
||||
|
||||
ActionControl(Flags<ActionControlFlags> a_actionFlags = ActionControlFlags::kLogChildFilenames) :
|
||||
State(StateType::kActionControl), actionFlags(a_actionFlags)
|
||||
{}
|
||||
|
||||
// members
|
||||
Flags<ActionControlFlags> actionFlags; // 18
|
||||
};
|
||||
static_assert(sizeof(ActionControl) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/F/Flags.h"
|
||||
#include "Scaleform/G/GFx_FileTypeConstants.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ExporterInfo
|
||||
{
|
||||
public:
|
||||
enum class ExportFlagConstants : std::uint32_t
|
||||
{
|
||||
kGlyphTexturesExported = 1 << 0,
|
||||
kGradientTexturesExported = 1 << 1,
|
||||
kGlyphsStripped = 1 << 4
|
||||
};
|
||||
|
||||
// members
|
||||
Flags<FileTypeConstants::FileFormatType> format; // 00
|
||||
const char* prefix; // 08
|
||||
const char* swfName; // 10
|
||||
std::uint16_t version; // 18
|
||||
Flags<ExportFlagConstants> exportFlags; // 1C
|
||||
};
|
||||
static_assert(sizeof(ExporterInfo) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Movie;
|
||||
class Value;
|
||||
|
||||
class __declspec(novtable) ExternalInterface :
|
||||
public State // 00
|
||||
{
|
||||
public:
|
||||
ExternalInterface() :
|
||||
State(StateType::kExternalInterface)
|
||||
{}
|
||||
|
||||
virtual ~ExternalInterface() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Callback(Movie* a_movieView, const char* a_methodName, const Value* a_args, std::uint32_t a_numArgs) = 0; // 01
|
||||
};
|
||||
static_assert(sizeof(ExternalInterface) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class MovieImpl;
|
||||
|
||||
class __declspec(novtable) ExternalLibPtr
|
||||
{
|
||||
public:
|
||||
ExternalLibPtr(MovieImpl* a_movieRoot) :
|
||||
owner(a_movieRoot)
|
||||
{}
|
||||
|
||||
virtual ~ExternalLibPtr() = default;
|
||||
|
||||
// members
|
||||
MovieImpl* owner;
|
||||
};
|
||||
static_assert(sizeof(ExternalLibPtr) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Event;
|
||||
class Movie;
|
||||
|
||||
class __declspec(novtable) FSCommandHandler :
|
||||
public State // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto GFX_STATE_TYPE{ StateType::kUserEventHandler };
|
||||
|
||||
FSCommandHandler() :
|
||||
State(StateType::kFSCommandHandler)
|
||||
{}
|
||||
|
||||
virtual void HandleEvent(class Movie* pmovie, const class Event& event) = 0;
|
||||
};
|
||||
static_assert(sizeof(FSCommandHandler) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class FileTypeConstants
|
||||
{
|
||||
public:
|
||||
enum class FileFormatType : std::int32_t
|
||||
{
|
||||
kUnopened,
|
||||
kUnknown,
|
||||
|
||||
kSWF,
|
||||
kGFX,
|
||||
|
||||
kJPEG = 10,
|
||||
kPNG = 11,
|
||||
kGIF = 12,
|
||||
kTGA = 13,
|
||||
kDDS = 14,
|
||||
kHDR = 15,
|
||||
kBMP = 16,
|
||||
kDIB = 17,
|
||||
kPFM = 18,
|
||||
kTIFF = 19,
|
||||
|
||||
kWAVE = 20,
|
||||
|
||||
kPVR = 21,
|
||||
kETC = 22,
|
||||
kSIF = 23,
|
||||
kGXT = 24,
|
||||
kGTX = 25,
|
||||
|
||||
kNextAvail,
|
||||
kMultiFormat = 0xFFFF - 1,
|
||||
kOriginal = 0xFFFF
|
||||
};
|
||||
};
|
||||
static_assert(std::is_empty_v<FileTypeConstants>);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Array.h"
|
||||
#include "Scaleform/G/GFx_StatMovieView.h"
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
#include "Scaleform/R/Render_Point.h"
|
||||
#include "Scaleform/R/Render_Rect.h"
|
||||
#include "Scaleform/R/Render_TreeShape.h"
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class CharacterHandle;
|
||||
class InteractiveObject;
|
||||
|
||||
class alignas(0x10) FocusGroupDescr
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
kTabableArray_Initialized = 0x1,
|
||||
kTabableArray_WithFocusEnabled = 0x2
|
||||
};
|
||||
|
||||
// members
|
||||
Ptr<Render::TreeShape> focusRectNode; // 00
|
||||
ArrayDH<Ptr<InteractiveObject>, kStatMV_Other_Mem> tabableArray; // 08
|
||||
mutable void* lastFocused; // 28 - mutable WeakPtr<InteractiveObject>
|
||||
Ptr<CharacterHandle> modalClip; // 30
|
||||
std::uint32_t lastFocusKeyCode; // 38
|
||||
alignas(0x8) Render::Rect<float> lastFocusedRect; // 40
|
||||
bool focusRectShown; // 50
|
||||
std::uint8_t tabableArrayStatus; // 51
|
||||
};
|
||||
static_assert(sizeof(FocusGroupDescr) == 0x60);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum class FocusMovedType
|
||||
{
|
||||
kByMouse = 1,
|
||||
kByKeyboard,
|
||||
kByAS
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Movie;
|
||||
class Value;
|
||||
|
||||
class __declspec(novtable) alignas(0x08) FunctionHandler :
|
||||
public RefCountBase<FunctionHandler, 2> // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RE::RTTI::Scaleform__GFx__FunctionHandler };
|
||||
static constexpr auto VTABLE{ RE::VTABLE::Scaleform__GFx__FunctionHandler };
|
||||
|
||||
class Params
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Value* retVal; // 00
|
||||
Movie* movie; // 08
|
||||
Value* self; // 10
|
||||
Value* argsWithThisRef; // 18
|
||||
Value* args; // 20
|
||||
std::uint32_t argCount; // 28
|
||||
void* userData; // 30
|
||||
};
|
||||
static_assert(sizeof(Params) == 0x38);
|
||||
|
||||
virtual ~FunctionHandler() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Call(const Params& a_params) = 0; // 01
|
||||
};
|
||||
static_assert(sizeof(FunctionHandler) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum HeapId : std::int32_t
|
||||
{
|
||||
kHeapId_Global = kHeapId_Default,
|
||||
kHeapId_MovieDef,
|
||||
kHeapId_MovieView,
|
||||
kHeapId_MovieData,
|
||||
kHeapId_Images,
|
||||
kHeapId_OtherHeaps,
|
||||
kHeapId_HUDHeaps,
|
||||
kHeapId_Video,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class EventId;
|
||||
class InteractiveObject;
|
||||
|
||||
class __declspec(novtable) alignas(0x08) KeyboardState :
|
||||
public RefCountBase<KeyboardState, 2> // 00
|
||||
{
|
||||
public:
|
||||
class __declspec(novtable) IListener
|
||||
{
|
||||
public:
|
||||
virtual ~IListener(); // 00
|
||||
|
||||
// add
|
||||
virtual void OnKeyDown(InteractiveObject* a_movie, const EventId& a_eventID, std::int32_t a_keyMask) = 0; // 01
|
||||
virtual void OnKeyUp(InteractiveObject* a_movie, const EventId& a_eventID, std::int32_t a_keyMask) = 0; // 02
|
||||
virtual void Update(const EventId& a_eventID) = 0; // 03
|
||||
};
|
||||
static_assert(sizeof(IListener) == 0x08);
|
||||
|
||||
// members
|
||||
std::byte pad[0x688 - 0x10]; // 10 - TODO
|
||||
};
|
||||
static_assert(sizeof(KeyboardState) == 0x688);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/F/Flags.h"
|
||||
#include "Scaleform/G/GFx_StateBag.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class LoaderImpl;
|
||||
class MovieDef;
|
||||
class ResourceLib;
|
||||
|
||||
class __declspec(novtable) Loader :
|
||||
public StateBag // 00
|
||||
{
|
||||
public:
|
||||
enum class LoadConstants : std::uint32_t
|
||||
{
|
||||
kAll = 0,
|
||||
kWaitCompletion = 1 << 0,
|
||||
kWaitFrame1 = 1 << 1,
|
||||
kOrdered = 1 << 4,
|
||||
kOnThread = 1 << 6,
|
||||
kKeepBindData = 1 << 7,
|
||||
kImageFiles = 1 << 16,
|
||||
kDisableSWF = 1 << 19,
|
||||
kDisableImports = 1 << 20,
|
||||
kQuietOpen = 1 << 21,
|
||||
|
||||
kDebugHeap = 1 << 28
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(modernize-use-override)
|
||||
virtual ~Loader(); // 00
|
||||
|
||||
// add
|
||||
virtual bool CheckTagLoader(std::int32_t a_tagType) const; // 04
|
||||
|
||||
[[nodiscard]] MovieDef* CreateMovie(const char* a_filename, Flags<LoadConstants> a_loadConstants = LoadConstants::kAll, std::size_t a_memoryArena = 0)
|
||||
{
|
||||
using func_t = decltype(&Loader::CreateMovie);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Loader::CreateMovie };
|
||||
return func(this, a_filename, a_loadConstants, a_memoryArena);
|
||||
}
|
||||
|
||||
// members
|
||||
LoaderImpl* impl; // 08
|
||||
ResourceLib* strongResourceLib; // 10
|
||||
Flags<LoadConstants> defLoadFlags; // 18
|
||||
};
|
||||
static_assert(sizeof(Loader) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
template <class T>
|
||||
class __declspec(novtable) LogBase
|
||||
{
|
||||
public:
|
||||
virtual ~LogBase(); // 00
|
||||
|
||||
// add
|
||||
virtual bool IsVerboseActionErrors(); // 01
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_LogBase.h"
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
#include "Scaleform/L/Log.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class LogState :
|
||||
public State, // 00
|
||||
public LogBase<LogState> // 18
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Scaleform::Ptr<Log> log; // 20
|
||||
};
|
||||
static_assert(sizeof(LogState) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) alignas(0x08) MemoryContext :
|
||||
public RefCountBase<MemoryContext, 2> // 00
|
||||
{
|
||||
public:
|
||||
virtual ~MemoryContext() = default;
|
||||
};
|
||||
static_assert(sizeof(MemoryContext) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/M/MemoryHeap.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class MemoryParams
|
||||
{
|
||||
public:
|
||||
// members
|
||||
MemoryHeap::HeapDesc desc; // 00
|
||||
float heapLimitMultiplier{ 0.25F }; // 40
|
||||
std::uint32_t maxCollectionRoots{ static_cast<std::uint32_t>(-1) }; // 44
|
||||
std::uint32_t framesBetweenCollections{ static_cast<std::uint32_t>(-1) }; // 48
|
||||
std::uint32_t initialDynamicLimit{ static_cast<std::uint32_t>(-1) }; // 4C
|
||||
std::uint32_t runsToUpgradeGen{ static_cast<std::uint32_t>(-1) }; // 50
|
||||
std::uint32_t runsToCollectYoung{ static_cast<std::uint32_t>(-1) }; // 54
|
||||
std::uint32_t runsToCollectOld{ static_cast<std::uint32_t>(-1) }; // 58
|
||||
};
|
||||
static_assert(sizeof(MemoryParams) == 0x60);
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StateBag.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
#include "Scaleform/R/Render_Color.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_DisplayHandle.h"
|
||||
#include "Scaleform/R/Render_Matrix.h"
|
||||
#include "Scaleform/R/Render_Point.h"
|
||||
#include "Scaleform/R/Render_Rect.h"
|
||||
#include "Scaleform/R/Render_TreeRoot.h"
|
||||
#include "Scaleform/T/ThreadId.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
class StatBag;
|
||||
|
||||
namespace Render
|
||||
{
|
||||
enum class EdgeAAMode;
|
||||
}
|
||||
|
||||
namespace GFx
|
||||
{
|
||||
enum class PlayState;
|
||||
|
||||
class ASMovieRootBase;
|
||||
class Event;
|
||||
class FunctionHandler;
|
||||
class Log;
|
||||
class MovieDef;
|
||||
class Value;
|
||||
class Viewport;
|
||||
|
||||
class __declspec(novtable) Movie :
|
||||
public RefCountBase<Movie, 327>, // 00
|
||||
public StateBag // 10
|
||||
{
|
||||
public:
|
||||
enum class SetVarType : std::int32_t
|
||||
{
|
||||
kNormal,
|
||||
kSticky,
|
||||
kPermanent
|
||||
};
|
||||
|
||||
enum class SetArrayType : std::int32_t
|
||||
{
|
||||
kInt,
|
||||
kDouble,
|
||||
kFloat,
|
||||
kString,
|
||||
kStringW,
|
||||
kValue
|
||||
};
|
||||
|
||||
enum class ScaleModeType : std::int32_t
|
||||
{
|
||||
kNoScale,
|
||||
kShowAll,
|
||||
kExactFit,
|
||||
kNoBorder
|
||||
};
|
||||
|
||||
enum class AlignType : std::int32_t
|
||||
{
|
||||
kCenter,
|
||||
kTopCenter,
|
||||
kBottomCenter,
|
||||
kCenterLeft,
|
||||
kCenterRight,
|
||||
kTopLeft,
|
||||
kTopRight,
|
||||
kBottomLeft,
|
||||
kBottomRight
|
||||
};
|
||||
|
||||
enum HE_ReturnValueType
|
||||
{
|
||||
HE_NotHandled = 0,
|
||||
HE_Handled = 1,
|
||||
HE_NoDefaultAction = 2,
|
||||
HE_Completed = (HE_Handled | HE_NoDefaultAction)
|
||||
};
|
||||
|
||||
enum class HitTestType : std::int32_t
|
||||
{
|
||||
kBounds = 0,
|
||||
kShapes = 1,
|
||||
kButtonEvents = 2,
|
||||
kShapesNoInvisible = 3
|
||||
};
|
||||
|
||||
enum class ReportFlags : std::uint32_t
|
||||
{
|
||||
kNone = 0,
|
||||
kShortFileNames = 1 << 0,
|
||||
kNoCircularReferences = 1 << 1,
|
||||
kSuppressOverallStats = 1 << 2,
|
||||
kAddressesForAnonymObjsOnly = 1 << 3,
|
||||
kSuppressMovieDefsStats = 1 << 4,
|
||||
kNoEllipsis = 1 << 5
|
||||
};
|
||||
|
||||
enum class MakeAllVisibleFlags : std::uint32_t
|
||||
{
|
||||
kNone = 0,
|
||||
kDontScaleDown = 1 << 0,
|
||||
kScaleUp50 = 1 << 1,
|
||||
kLeftTopToZero = 1 << 2
|
||||
};
|
||||
|
||||
virtual MovieDef* GetMovieDef() const = 0; // 01
|
||||
virtual std::uint32_t GetCurrentFrame() const = 0; // 02
|
||||
virtual bool HasLooped() const = 0; // 03
|
||||
virtual void GotoFrame(std::uint32_t a_frameNumber) = 0; // 04
|
||||
virtual bool GotoLabeledFrame(const char* a_label, std::int32_t a_offset = 0) = 0; // 05
|
||||
virtual void SetPlayState(PlayState a_state) = 0; // 06
|
||||
virtual PlayState GetPlayState() const = 0; // 07
|
||||
virtual bool IsValid() = 0; // 08
|
||||
virtual void SetVisible(bool a_visible) = 0; // 09
|
||||
virtual bool GetVisible() const = 0; // 0A
|
||||
virtual std::uint64_t GetASTimerMs() const = 0; // 0B
|
||||
virtual void SetViewport(const Viewport& a_viewDesc) = 0; // 0C
|
||||
virtual void GetViewport(Viewport* a_viewDesc) const = 0; // 0D
|
||||
virtual void SetViewScaleMode(ScaleModeType) = 0; // 0E
|
||||
virtual ScaleModeType GetViewScaleMode() const = 0; // 0F
|
||||
virtual void SetViewAlignment(AlignType) = 0; // 10
|
||||
virtual AlignType GetViewAlignment() const = 0; // 11
|
||||
virtual Render::Rect<float> GetVisibleFrameRect() const = 0; // 12
|
||||
virtual Render::Rect<float> GetSafeRect() const = 0; // 13
|
||||
virtual void SetSafeRect(const Render::Rect<float>& a_rect) = 0; // 14
|
||||
virtual void SetEdgeAAMode(Render::EdgeAAMode a_edgeAA) = 0; // 15
|
||||
virtual Render::EdgeAAMode GetEdgeAAMode() const = 0; // 16
|
||||
virtual void Restart(bool a_advance0 = true) = 0; // 17
|
||||
virtual float Advance(float a_deltaT, std::uint32_t a_frameCatchUpCount = 2, bool a_capture = true) = 0; // 18
|
||||
virtual void Capture(bool a_onChangeOnly = true) = 0; // 19
|
||||
virtual const Render::ContextImpl::DisplayHandle<Render::TreeRoot>& GetDisplayHandle() const = 0; // 1A
|
||||
virtual void SetCaptureThread(ThreadId a_captureThreadId) = 0; // 1B
|
||||
virtual void ShutdownRendering(bool a_wait) = 0; // 1C
|
||||
virtual bool IsShutdownRenderingComplete() const = 0; // 1D
|
||||
virtual void SetPause(bool a_pause) = 0; // 1E
|
||||
virtual bool IsPaused() const = 0; // 1F
|
||||
virtual void SetBackgroundColor(Render::Color a_bgColor) = 0; // 20
|
||||
virtual void SetBackgroundAlpha(float a_alpha) = 0; // 21
|
||||
virtual float GetBackgroundAlpha() const = 0; // 22
|
||||
virtual std::uint32_t HandleEvent(const Event& a_event) = 0; // 23
|
||||
virtual void GetMouseState(std::uint32_t a_mouseIndex, float* a_x, float* a_y, std::uint32_t* a_buttons) = 0; // 24
|
||||
virtual void NotifyMouseState(float a_x, float a_y, std::uint32_t a_buttons, std::uint32_t a_mouseIndex = 0) = 0; // 25
|
||||
virtual bool HitTest(float a_x, float a_y, HitTestType a_testCond = HitTestType::kShapes, std::uint32_t a_controllerIdx = 0) = 0; // 26
|
||||
virtual void* GetUserData() const = 0; // 27
|
||||
virtual void SetUserData(void*) = 0; // 28
|
||||
virtual bool IsMovieFocused() const = 0; // 29
|
||||
virtual bool GetDirtyFlag(bool a_doReset = true) = 0; // 2A
|
||||
virtual void SetMouseCursorCount(std::uint32_t a_num) = 0; // 2B
|
||||
virtual std::uint32_t GetMouseCursorCount() const = 0; // 2C
|
||||
virtual void SetControllerCount(std::uint32_t a_num) = 0; // 2D
|
||||
virtual std::uint32_t GetControllerCount() const = 0; // 2E
|
||||
virtual void GetStats(StatBag* a_bag, bool a_reset = true) = 0; // 2F
|
||||
virtual MemoryHeap* GetHeap() const = 0; // 30
|
||||
virtual void ForceCollectGarbage() = 0; // 31
|
||||
virtual void SuspendGC(bool a_suspend) = 0; // 32
|
||||
virtual void ScheduleGC() = 0; // 33
|
||||
virtual void PrintObjectsReport(ReportFlags a_flags = ReportFlags::kNone, Log* a_log = nullptr, const char* a_swfName = nullptr) = 0; // 34
|
||||
virtual Render::Point<float> TranslateToScreen(const Render::Point<float>& a_pt, Render::Matrix2x4<float>* a_userMatrix = nullptr) = 0; // 36
|
||||
virtual Render::Rect<float> TranslateToScreen(const Render::Rect<float>& a_pt, Render::Matrix2x4<float>* a_userMatrix = nullptr) = 0; // 35
|
||||
virtual bool TranslateLocalToScreen(const char* a_pathToCharacter, const Render::Point<float>& a_pt, Render::Point<float>* a_presPt, Render::Matrix2x4<float>* a_userMatrix = nullptr) = 0; // 37
|
||||
virtual bool SetControllerFocusGroup(std::uint32_t a_controllerIdx, std::uint32_t a_focusGroupIndex) = 0; // 38
|
||||
virtual std::uint32_t GetControllerFocusGroup(std::uint32_t a_controllerIdx) const = 0; // 39
|
||||
virtual void ResetInputFocus(std::uint32_t a_controllerIdx) = 0; // 3A
|
||||
virtual bool IsExitRequested() const = 0; // 3B
|
||||
virtual void GetViewMatrix3D(Render::Matrix3x4<float>*) = 0; // 3C
|
||||
virtual void SetViewMatrix3D(const Render::Matrix3x4<float>& a_matrix) = 0; // 3D
|
||||
virtual void GetProjectionMatrix3D(Render::Matrix4x4<float>*) = 0; // 3E
|
||||
virtual void SetProjectionMatrix3D(const Render::Matrix4x4<float>& a_matrix) = 0; // 3F
|
||||
virtual void SetStageAutoOrients(bool a_value = true) = 0; // 40
|
||||
virtual void ForceUpdateImages() = 0; // 41
|
||||
virtual void MakeAreaVisible(const Render::Rect<float>& a_screenRect, const Render::Rect<float>& a_box, MakeAllVisibleFlags a_flags = MakeAllVisibleFlags::kNone) = 0; // 42
|
||||
virtual void RestoreViewport() = 0; // 43
|
||||
|
||||
void CreateArray(Value* a_value);
|
||||
void CreateFunction(Value* a_value, FunctionHandler* a_function, void* a_userData = nullptr);
|
||||
void CreateObject(Value* a_value, const char* a_className = nullptr, const GFx::Value* a_args = nullptr, std::uint32_t a_numArgs = 0);
|
||||
bool GetVariable(Value* a_val, const char* a_pathToVar) const;
|
||||
bool SetVariable(const char* a_pathToVar, const Value& a_value, SetVarType a_setType = SetVarType::kSticky);
|
||||
bool Invoke(const char* a_methodName, Value* a_result, const char* a_argFmt, ...);
|
||||
bool Invoke(const char* a_methodName, Value* a_result, const Value* a_args, std::uint32_t a_numArgs);
|
||||
bool InvokeArgs(const char* a_methodName, Value* a_result, const char* a_argFmt, std::va_list a_args);
|
||||
|
||||
void Release()
|
||||
{
|
||||
using func_t = decltype(&Movie::Release);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Movie::Release };
|
||||
return func(this);
|
||||
}
|
||||
|
||||
// members
|
||||
Ptr<ASMovieRootBase> asMovieRoot; // 18
|
||||
};
|
||||
static_assert(sizeof(Movie) == 0x20);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_FileTypeConstants.h"
|
||||
#include "Scaleform/G/GFx_MemoryParams.h"
|
||||
#include "Scaleform/G/GFx_Resource.h"
|
||||
#include "Scaleform/G/GFx_StateBag.h"
|
||||
#include "Scaleform/R/Render_Point.h"
|
||||
#include "Scaleform/R/Render_Rect.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
|
||||
namespace Render
|
||||
{
|
||||
class ThreadCommandQueue;
|
||||
}
|
||||
|
||||
namespace GFx
|
||||
{
|
||||
class ActionControl;
|
||||
class ExporterInfo;
|
||||
class MemoryContext;
|
||||
class Movie;
|
||||
class ResourceId;
|
||||
|
||||
class __declspec(novtable) MovieDef :
|
||||
public Resource, // 00
|
||||
public StateBag // 18
|
||||
{
|
||||
public:
|
||||
enum class FileAttrFlags : std::uint32_t
|
||||
{
|
||||
kUseNetwork = 1 << 0,
|
||||
kUseActionScript3 = 1 << 3,
|
||||
kHasMetadata = 1 << 4
|
||||
};
|
||||
|
||||
enum class VisitResourceMask : std::uint32_t
|
||||
{
|
||||
kNestedMovies = 1 << 15,
|
||||
|
||||
kFonts = 1 << 0,
|
||||
kBitmaps = 1 << 1,
|
||||
kGradientImages = 1 << 2,
|
||||
kEditTextFields = 1 << 3,
|
||||
kSounds = 1 << 4,
|
||||
kSprite = 1 << 5,
|
||||
|
||||
kAllLocalImages = (kBitmaps | kGradientImages),
|
||||
kAllImages = (kBitmaps | kGradientImages | kNestedMovies)
|
||||
};
|
||||
|
||||
class __declspec(novtable) ImportVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~ImportVisitor() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Visit(MovieDef* a_parentDef, MovieDef* a_importDef, const char* a_importedMovieFilename) = 0; // 01
|
||||
};
|
||||
static_assert(sizeof(ImportVisitor) == 0x8);
|
||||
|
||||
class __declspec(novtable) ResourceVisitor :
|
||||
public FileTypeConstants // 00
|
||||
{
|
||||
public:
|
||||
virtual ~ResourceVisitor() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Visit(MovieDef* a_movieDef, Resource* a_resource, ResourceId a_rid, const char* a_exportName) = 0; // 01
|
||||
};
|
||||
static_assert(sizeof(ResourceVisitor) == 0x8);
|
||||
|
||||
// add
|
||||
virtual std::uint32_t GetVersion() const = 0; // 04
|
||||
virtual std::uint32_t GetLoadingFrame() const = 0; // 05
|
||||
virtual float GetWidth() const = 0; // 06
|
||||
virtual float GetHeight() const = 0; // 07
|
||||
virtual std::uint32_t GetFrameCount() const = 0; // 08
|
||||
virtual float GetFrameRate() const = 0; // 09
|
||||
virtual Render::Rect<float> GetFrameRect() const = 0; // 0A
|
||||
virtual std::uint32_t GetSWFFlags() const = 0; // 0B
|
||||
virtual const char* GetFileURL() const = 0; // 0C
|
||||
virtual void WaitForLoadFinish(bool a_cancel = false) const = 0; // 0D
|
||||
virtual void WaitForFrame(std::uint32_t a_frame) const = 0; // 0E
|
||||
virtual FileAttrFlags GetFileAttributes() const = 0; // 0F
|
||||
virtual std::uint32_t GetMetadata(char* a_buff, std::uint32_t a_buffSize) const = 0; // 10
|
||||
virtual MemoryHeap* GetLoadDataHeap() const = 0; // 11
|
||||
virtual MemoryHeap* GetBindDataHeap() const = 0; // 12
|
||||
virtual MemoryHeap* GetImageHeap() const = 0; // 13
|
||||
virtual Resource* GetMovieDataResource() const = 0; // 14
|
||||
virtual const ExporterInfo* GetExporterInfo() const = 0; // 15
|
||||
virtual MemoryContext* CreateMemoryContext(const char* a_heapName, const MemoryParams& a_memParams, bool a_debugHeap) = 0; // 16
|
||||
virtual Movie* CreateInstance(const MemoryParams& a_memParams, bool a_initFirstFrame, ActionControl* a_actionControl, Render::ThreadCommandQueue* a_queue = nullptr) = 0; // 18
|
||||
virtual Movie* CreateInstance(MemoryContext* a_memContext, bool a_initFirstFrame, ActionControl* a_actionControl, Render::ThreadCommandQueue* a_queue = nullptr) = 0; // 17
|
||||
virtual void VisitImportedMovies(ImportVisitor* a_visitor) = 0; // 19
|
||||
virtual void VisitResources(ResourceVisitor* a_visitor, VisitResourceMask a_visitMask = VisitResourceMask::kAllImages) = 0; // 1A
|
||||
virtual Resource* GetResource(const char* a_exportName) const = 0; // 1B
|
||||
|
||||
[[nodiscard]] Movie* CreateInstance(
|
||||
bool a_initFirstFrame = false,
|
||||
std::size_t a_memoryArena = 0,
|
||||
ActionControl* a_actionControl = nullptr,
|
||||
Render::ThreadCommandQueue* a_queue = nullptr)
|
||||
{
|
||||
MemoryParams memParams;
|
||||
memParams.desc.arena = a_memoryArena;
|
||||
return CreateInstance(memParams, a_initFirstFrame, a_actionControl, a_queue);
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(MovieDef) == 0x20);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Array.h"
|
||||
#include "Scaleform/G/GFx_ASIntervalTimerIntf.h"
|
||||
#include "Scaleform/G/GFx_ASString.h"
|
||||
#include "Scaleform/G/GFx_FocusGroupDescr.h"
|
||||
#include "Scaleform/G/GFx_Movie.h"
|
||||
#include "Scaleform/G/GFx_MultitouchInterface.h"
|
||||
#include "Scaleform/G/GFx_Value.h"
|
||||
#include "Scaleform/G/GFx_Viewport.h"
|
||||
#include "Scaleform/L/List.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
#include "Scaleform/R/Render_Color.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_Context.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_DisplayHandle.h"
|
||||
#include "Scaleform/R/Render_Matrix.h"
|
||||
#include "Scaleform/R/Render_Point.h"
|
||||
#include "Scaleform/R/Render_ScreenToWorld.h"
|
||||
#include "Scaleform/R/Render_TreeRoot.h"
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MemoryHeap;
|
||||
|
||||
namespace Render
|
||||
{
|
||||
class DrawableImageContext;
|
||||
class ThreadCommandQueue;
|
||||
class TreeContainer;
|
||||
class TreeNode;
|
||||
}
|
||||
|
||||
namespace GFx
|
||||
{
|
||||
class AmpStats;
|
||||
class ASMovieRootBase;
|
||||
class DisplayObjContainer;
|
||||
class DisplayObjectBase;
|
||||
|
||||
class DrawingContext;
|
||||
class ExternalInterface;
|
||||
class ExternalLibPtr;
|
||||
class FontManagerStates;
|
||||
class FontResource;
|
||||
class FSCommandHandler;
|
||||
class IMECandidateListStyle;
|
||||
class InteractiveObject;
|
||||
class LoadQueueEntry;
|
||||
class LoadQueueEntryMT;
|
||||
class MovieDef;
|
||||
class MovieDefImpl;
|
||||
class MovieDefRootNode;
|
||||
class StateBagImpl;
|
||||
class UserEventHandler;
|
||||
|
||||
class __declspec(novtable) alignas(0x10) MovieImpl :
|
||||
public Movie // 00
|
||||
{
|
||||
public:
|
||||
using MultitouchInputMode = MultitouchInterface::MultitouchInputMode;
|
||||
using GestureMask = MultitouchInterface::GestureMask;
|
||||
|
||||
class DragState
|
||||
{
|
||||
public:
|
||||
constexpr DragState() = default;
|
||||
|
||||
// members
|
||||
InteractiveObject* character{ nullptr }; // 00
|
||||
InteractiveObject* topmostEntity{ nullptr }; // 08
|
||||
bool lockCenter{ false }; // 10
|
||||
bool bound{ false }; // 11
|
||||
Render::Point<float> boundLT{ 0.0f, 0.0f }; // 14
|
||||
Render::Point<float> boundRB{ 0.0f, 0.0f }; // 1C
|
||||
Render::Point<float> centerDelta{ 0.0f, 0.0f }; // 24
|
||||
std::uint32_t mouseIndex; // 2C
|
||||
};
|
||||
static_assert(sizeof(DragState) == 0x30);
|
||||
|
||||
class FontDesc
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Ptr<MovieDef> movieDef;
|
||||
Ptr<FontResource> font;
|
||||
};
|
||||
static_assert(sizeof(FontDesc) == 0x10);
|
||||
|
||||
class IndirectTransPair
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Ptr<Render::TreeNode> transformParent;
|
||||
Ptr<DisplayObjectBase> obj;
|
||||
Ptr<DisplayObjContainer> originalParent;
|
||||
mutable std::int32_t origParentDepth{ -1 };
|
||||
};
|
||||
static_assert(sizeof(IndirectTransPair) == 0x20);
|
||||
|
||||
class LevelInfo
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::int32_t level;
|
||||
Ptr<InteractiveObject> sprite;
|
||||
};
|
||||
static_assert(sizeof(IndirectTransPair) == 0x20);
|
||||
|
||||
class MDKillListEntry
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint64_t killFrameId;
|
||||
Ptr<MovieDefImpl> movieDef;
|
||||
};
|
||||
static_assert(sizeof(MDKillListEntry) == 0x10);
|
||||
|
||||
class ReturnValueHolder :
|
||||
public NewOverrideBase<kStatMV_ActionScript_Mem>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
char* charBuffer; // 00
|
||||
std::uint32_t charBufferSize; // 08
|
||||
ArrayCC<ASString, kStatMV_ActionScript_Mem> stringArray; // 10
|
||||
std::uint32_t stringArrayPos; // 30
|
||||
};
|
||||
static_assert(sizeof(ReturnValueHolder) == 0x38);
|
||||
|
||||
// members
|
||||
LoadQueueEntry* loadQueueHead; // 0020
|
||||
std::uint32_t lastLoadQueueEntryCount; // 0028
|
||||
Ptr<AmpStats> advanceStats; // 0030
|
||||
Value::ObjectInterface* objectInterface; // 0038
|
||||
MemoryHeap* heap; // 0040
|
||||
Ptr<MovieDefImpl> mainMovieDef; // 0048
|
||||
InteractiveObject* mainMovie; // 0050
|
||||
ArrayLH<LevelInfo, kStatMV_Other_Mem> movieLevels; // 0058
|
||||
List<MovieDefRootNode> rootMovieDefNodes; // 0070
|
||||
Ptr<StateBagImpl> stateBag; // 0080
|
||||
Ptr<Render::TreeRoot> renderRoot; // 0088
|
||||
Render::ContextImpl::DisplayHandle<Render::TreeRoot> displayRoot; // 0090
|
||||
Ptr<Render::TreeContainer> topMostRoot; // 0098
|
||||
Viewport viewport; // 00A0
|
||||
float pixelScale; // 00D4
|
||||
float viewScaleX; // 00D8
|
||||
float viewScaleY; // 00DC
|
||||
float viewOffsetX; // 00E8
|
||||
float viewOffsetY; // 00E4
|
||||
ScaleModeType viewScaleMode; // 00E8
|
||||
AlignType viewAlignment; // 00EC
|
||||
Render::Rect<float> visibleFrameRect; // 00F0
|
||||
Render::Rect<float> safeRect; // 0100
|
||||
Render::Matrix2x4<float> viewportMatrix; // 0110
|
||||
Render::ScreenToWorld screenToWorld; // 0130
|
||||
mutable Ptr<Log> cachedLog; // 0220
|
||||
Ptr<UserEventHandler> userEventHandler; // 0228
|
||||
Ptr<FSCommandHandler> fsCommandHandler; // 0230
|
||||
Ptr<ExternalInterface> externalInterfaceHandler; // 0238
|
||||
Ptr<FontManagerStates> fontManagerStates; // 0240
|
||||
ExternalLibPtr* xmlObjectManager; // 0248
|
||||
std::uint64_t timeElapsed; // 0250
|
||||
float timeRemainder; // 0258
|
||||
float frameTime; // 025C
|
||||
std::uint32_t forceFrameCatchUp; // 0260
|
||||
std::byte pad268[0x1F60]; // 0268 - GFx::InputEventsQueue
|
||||
Render::Color backgroundColor; // 21C8
|
||||
std::byte pad21D0[0x50]; // 21D0 - MouseState[1]
|
||||
std::uint32_t mouseCursorCount; // 2220
|
||||
std::uint32_t controllerCount; // 2224
|
||||
void* userData; // 2228
|
||||
std::byte pad2230[0x688]; // 2230 - KeyboardState[1]
|
||||
ReturnValueHolder* returnValueHolder; // 28B8
|
||||
std::uint32_t instanceNameCount; // 28C0
|
||||
DragState currentDragState; // 28C8
|
||||
std::byte pad28F8[0x8]; // 28F8 - ASStringHash<StickyVarNode*>
|
||||
ArrayLH<Ptr<InteractiveObject>, kStatMV_Other_Mem> topmostLevelCharacters; // 2900
|
||||
std::uint64_t startTickMS; // 2918
|
||||
std::uint64_t pauseTickMS; // 2920
|
||||
ArrayLH<Ptr<ASIntervalTimerIntf>, kStatMV_Other_Mem> intervalTimers; // 2928
|
||||
std::int32_t lastIntervalTimerId; // 2940
|
||||
Ptr<Render::TreeContainer> focusRectContainerNode; // 2948
|
||||
FocusGroupDescr focusGroups[16]; // 2950
|
||||
std::uint32_t focusGroupsCount; // 2F50
|
||||
std::uint8_t focusGroupIndexes[16]; // 2F54
|
||||
bool focusRectChanged; // 2F64
|
||||
InteractiveObject* playListHead; // 2F68
|
||||
InteractiveObject* playListOptHead; // 2F70
|
||||
InteractiveObject* unloadListHead; // 2F78
|
||||
std::uint32_t flags; // 2F80
|
||||
std::uint32_t flags2; // 2F84
|
||||
IMECandidateListStyle* imeCandidateListStyle; // 2F88
|
||||
LoadQueueEntryMT* loadQueueMTHead; // 2F90
|
||||
ArrayLH<FontDesc> registeredFonts; // 2F98
|
||||
List<DrawingContext> drawingContextList; // 2FB0
|
||||
Array<MDKillListEntry, kStatMV_Other_Mem> movieDefKillList; // 2FC0
|
||||
Ptr<ASMovieRootBase> savedASMovieRoot; // 2FD8
|
||||
Render::ContextImpl::Context renderContext; // 2FE0
|
||||
std::int8_t previouslyCaptured; // 30F0
|
||||
Ptr<Render::DrawableImageContext> drawableImageContext; // 30F8
|
||||
Render::ThreadCommandQueue* renderThreadCommandQueue; // 3100
|
||||
Ptr<MultitouchInterface> multitouchHAL; // 3108
|
||||
MultitouchInputMode multitouchMode; // 3110
|
||||
Ptr<InteractiveObject> gestureTopMostChar; // 3118
|
||||
std::int32_t deviceOrientation; // 3120 - OrientationEvent::OrientationType
|
||||
ArrayLH<IndirectTransPair> indirectTransformPairs;
|
||||
};
|
||||
static_assert(sizeof(MovieImpl) == 0x3140);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) MultitouchInterface :
|
||||
public State // 00
|
||||
{
|
||||
public:
|
||||
enum class MultitouchInputMode : std::int32_t
|
||||
{
|
||||
kNone = 0,
|
||||
kTouchPoint = 0x1,
|
||||
kGesture = 0x2,
|
||||
kMixed = (kTouchPoint | kGesture)
|
||||
};
|
||||
|
||||
enum GestureMask : std::int32_t
|
||||
{
|
||||
kMTG_None = 0,
|
||||
kMTG_Pan = 0x1,
|
||||
kMTG_Zoom = 0x2,
|
||||
kMTG_Rotate = 0x4,
|
||||
kMTG_Swipe = 0x8
|
||||
};
|
||||
|
||||
MultitouchInterface() :
|
||||
State(StateType::kMultitouchInterface)
|
||||
{}
|
||||
|
||||
virtual std::uint32_t GetMaxTouchPoints() const = 0;
|
||||
virtual std::uint32_t GetSupportedGesturesMask() const = 0;
|
||||
virtual bool SetMultitouchInputMode(MultitouchInputMode a_inputMode) = 0;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum class PlayState
|
||||
{
|
||||
kPlaying,
|
||||
kStopped
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/Atomic.h"
|
||||
#include "Scaleform/G/GFx_ResourceLibBase.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ResourceKey;
|
||||
class ResourceReport;
|
||||
|
||||
class __declspec(novtable) Resource :
|
||||
public NewOverrideBase<2> // 00
|
||||
{
|
||||
public:
|
||||
virtual ~Resource() = default; // 00
|
||||
|
||||
// add
|
||||
virtual ResourceKey GetKey(); // 01
|
||||
virtual std::uint32_t GetResourceTypeCode() const; // 02
|
||||
virtual ResourceReport* GetResourceReport(); // 03
|
||||
|
||||
void AddRef()
|
||||
{
|
||||
REX::TAtomicRef myRefCount{ refCount.value };
|
||||
++myRefCount;
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
REX::TAtomicRef myRefCount{ refCount.value };
|
||||
if (--myRefCount == 0) {
|
||||
delete lib;
|
||||
lib = nullptr;
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
// members
|
||||
AtomicInt<std::int32_t> refCount; // 08
|
||||
ResourceLibBase* lib; // 10
|
||||
};
|
||||
static_assert(sizeof(Resource) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ResourceId
|
||||
{
|
||||
public:
|
||||
~ResourceId() noexcept {}
|
||||
|
||||
std::uint32_t id; // 00
|
||||
};
|
||||
static_assert(sizeof(ResourceId) == 0x4);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class ResourceKey
|
||||
{
|
||||
public:
|
||||
using KeyHandle = void*;
|
||||
|
||||
enum class KeyType : std::int32_t
|
||||
{
|
||||
kNone,
|
||||
kUnique,
|
||||
kFile,
|
||||
kGradient,
|
||||
kSubImage
|
||||
};
|
||||
|
||||
class __declspec(novtable) KeyInterface
|
||||
{
|
||||
public:
|
||||
virtual ~KeyInterface() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void AddRef(KeyHandle a_data) = 0; // 01
|
||||
virtual void Release(KeyHandle a_data) = 0; // 02
|
||||
virtual KeyType GetKeyType(KeyHandle a_data) const = 0; // 03
|
||||
virtual std::size_t GetHashCode(KeyHandle a_data) const = 0; // 04
|
||||
virtual bool KeyEquals(KeyHandle a_data, const ResourceKey& a_other) = 0; // 05
|
||||
virtual const char* GetFileURL(KeyHandle) const { return nullptr; } // 06
|
||||
};
|
||||
static_assert(sizeof(KeyInterface) == 0x8);
|
||||
|
||||
// members
|
||||
KeyInterface* keyInterface; // 00
|
||||
KeyHandle keyData; // 08
|
||||
};
|
||||
static_assert(sizeof(ResourceKey) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Resource;
|
||||
|
||||
class __declspec(novtable) ResourceLibBase :
|
||||
public RefCountBase<ResourceLibBase, 2> // 00
|
||||
{
|
||||
public:
|
||||
// add
|
||||
virtual void RemoveResourceOnRelease(Resource* a_res) = 0; // 01
|
||||
virtual void PinResource(Resource* a_res) = 0; // 02
|
||||
virtual void UnpinResource(Resource* a_res) = 0; // 03
|
||||
};
|
||||
static_assert(sizeof(ResourceLibBase) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatGroup.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum StatAmp
|
||||
{
|
||||
kStatAmp_Default = kStatGroup_GFxAmp,
|
||||
|
||||
kStatAmp_Mem,
|
||||
kStatAmp_ProfileFrame,
|
||||
kStatAmp_Server,
|
||||
kStatAmp_Message,
|
||||
kStatAmp_Callstack,
|
||||
kStatAmp_InstrBuffer,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatGroup.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum StatFontCache
|
||||
{
|
||||
kStatFC_Default = kStatGroup_GFxFontCache,
|
||||
|
||||
kStatFC_Mem,
|
||||
kStatFC_Batch_Mem,
|
||||
kStatFC_GlyphCache_Mem,
|
||||
kStatFC_Other_Mem
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/S/StatBasicValues.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
enum StatGroup : std::int32_t
|
||||
{
|
||||
kStatGroup_Renderer = 1 << 6,
|
||||
kStatGroup_RenderGen = 2 << 6,
|
||||
kStatGroup_GFxFontCache = 3 << 6,
|
||||
kStatGroup_GFxMovieData = 4 << 6,
|
||||
kStatGroup_GFxMovieView = 5 << 6,
|
||||
kStatGroup_GFxRenderCache = 6 << 6,
|
||||
kStatGroup_GFxPlayer = 7 << 6,
|
||||
kStatGroup_GFxIME = 8 << 6,
|
||||
kStatGroup_GFxAmp = 9 << 6,
|
||||
|
||||
// General Memory
|
||||
kStat_Image_Mem = kStat_Default_Mem + 1,
|
||||
kStat_String_Mem,
|
||||
|
||||
kStat_Debug_Mem,
|
||||
kStat_DebugHUD_Mem,
|
||||
kStat_DebugTracker_Mem,
|
||||
kStat_StatBag_Mem,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatGroup.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum StatIME
|
||||
{
|
||||
kStatIME_Default = kStatGroup_GFxIME,
|
||||
|
||||
kStatIME_Mem
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatGroup.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum StatMovieData
|
||||
{
|
||||
kStatMD_Default = kStatGroup_GFxMovieData,
|
||||
|
||||
kStatMD_Mem,
|
||||
kStatMD_CharDefs_Mem,
|
||||
kStatMD_ShapeData_Mem,
|
||||
kStatMD_Tags_Mem,
|
||||
kStatMD_Fonts_Mem,
|
||||
kStatMD_Images_Mem,
|
||||
kStatMD_ASBinaryData_Mem,
|
||||
kStatMD_Other_Mem,
|
||||
|
||||
kStatMD_Time,
|
||||
kStatMD_Load_Tks,
|
||||
kStatMD_Bind_Tks
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_StatGroup.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
enum StatMovieView : std::int32_t
|
||||
{
|
||||
kStatMV_Default = kStatGroup_GFxMovieView,
|
||||
|
||||
kStatMV_Mem,
|
||||
kStatMV_MovieClip_Mem,
|
||||
kStatMV_ActionScript_Mem,
|
||||
kStatMV_ASString_Mem,
|
||||
kStatMV_Text_Mem,
|
||||
kStatMV_XML_Mem,
|
||||
kStatMV_Other_Mem,
|
||||
kStatMV_VM,
|
||||
kStatMV_VM_VM_Mem,
|
||||
kStatMV_VM_CallFrame_Mem,
|
||||
kStatMV_VM_VTable_Mem,
|
||||
kStatMV_VM_SlotInfo_Mem,
|
||||
kStatMV_VM_SlotInfoHash_Mem,
|
||||
kStatMV_VM_CTraits_Mem,
|
||||
kStatMV_VM_Class_Mem,
|
||||
kStatMV_VM_ITraits_Mem,
|
||||
kStatMV_VM_Instance_Mem,
|
||||
kStatMV_VM_AbcFile_Mem,
|
||||
kStatMV_VM_AbcConstPool_Mem,
|
||||
kStatMV_VM_VMAbcFile_Mem,
|
||||
kStatMV_VM_Tracer_Mem,
|
||||
|
||||
kStatMV_Tks,
|
||||
kStatMV_Advance_Tks,
|
||||
kStatMV_Action_Tks,
|
||||
kStatMV_Seek_Tks,
|
||||
kStatMV_Timeline_Tks,
|
||||
kStatMV_Input_Tks,
|
||||
kStatMV_Mouse_Tks,
|
||||
kStatMV_ScriptCommunication_Tks,
|
||||
kStatMV_GetVariable_Tks,
|
||||
kStatMV_SetVariable_Tks,
|
||||
kStatMV_Invoke_Tks,
|
||||
kStatMV_InvokeAction_Tks,
|
||||
kStatMV_Display_Tks,
|
||||
kStatMV_Tessellate_Tks,
|
||||
kStatMV_GradientGen_Tks,
|
||||
|
||||
kStatMV_Counters,
|
||||
kStatMV_Invoke_Cnt,
|
||||
kStatMV_MCAdvance_Cnt,
|
||||
kStatMV_Tessellate_Cnt
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) State :
|
||||
public RefCountBase<State, 2> // 00
|
||||
{
|
||||
public:
|
||||
enum class StateType : std::int32_t
|
||||
{
|
||||
kNone,
|
||||
|
||||
kTranslator,
|
||||
kLog,
|
||||
kActionControl,
|
||||
kUserEventHandler,
|
||||
kFSCommandHandler,
|
||||
kExternalInterface,
|
||||
kMultitouchInterface,
|
||||
kVirtualKeyboardInterface,
|
||||
|
||||
kFileOpener,
|
||||
kURLBuilder,
|
||||
kImageCreator,
|
||||
kImageFileHandlerRegistry,
|
||||
kParseControl,
|
||||
kProgressHandler,
|
||||
kImportVisitor,
|
||||
kFontPackParams,
|
||||
kFontLib,
|
||||
kFontProvider,
|
||||
kFontMap,
|
||||
kTaskManager,
|
||||
kTextClipboard,
|
||||
kTextKeyMap,
|
||||
kIMEManager,
|
||||
kXMLSupport,
|
||||
kZlibSupport,
|
||||
kFontCompactorParams,
|
||||
kImagePackerParams,
|
||||
kAudio,
|
||||
kVideo,
|
||||
kTestStream,
|
||||
kSharedObject,
|
||||
kLocSupport,
|
||||
|
||||
kAS2Support,
|
||||
kAS3Support
|
||||
};
|
||||
|
||||
State(StateType a_type = StateType::kNone) :
|
||||
sType(a_type)
|
||||
{}
|
||||
|
||||
[[nodiscard]] constexpr StateType GetStateType() const noexcept { return sType; }
|
||||
|
||||
protected:
|
||||
// members
|
||||
StateType sType; // 10
|
||||
};
|
||||
static_assert(sizeof(State) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_FileTypeConstants.h"
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) StateBag :
|
||||
public FileTypeConstants // 00
|
||||
{
|
||||
protected:
|
||||
// add
|
||||
virtual StateBag* GetStateBagImpl() const { return nullptr; } // 00
|
||||
|
||||
public:
|
||||
virtual ~StateBag() = default; // 01
|
||||
|
||||
// NOLINTNEXTLINE(misc-no-recursion)
|
||||
virtual void SetState(State::StateType a_stateType, State* a_state) // 02
|
||||
{
|
||||
assert(a_state ? true : a_state->GetStateType() == a_stateType);
|
||||
const auto bag = GetStateBagImpl();
|
||||
if (bag) {
|
||||
bag->SetState(a_stateType, a_state);
|
||||
}
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(misc-no-recursion)
|
||||
virtual State* GetStateAddRef(State::StateType a_stateType) const // 03
|
||||
{
|
||||
const auto bag = GetStateBagImpl();
|
||||
return bag ? bag->GetStateAddRef(a_stateType) : nullptr;
|
||||
}
|
||||
|
||||
virtual void GetStatesAddRef(State** a_states, const State::StateType* a_stateTypes, std::uint32_t a_count) const // 04
|
||||
{
|
||||
const auto bag = GetStateBagImpl();
|
||||
if (bag) {
|
||||
bag->GetStatesAddRef(a_states, a_stateTypes, a_count);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T* GetStateAddRef() const
|
||||
{
|
||||
return static_cast<T*>(GetStateAddRef(T::GFX_STATE_TYPE));
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(StateBag) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/S/System.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class System :
|
||||
public Scaleform::System // 0
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<System>);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/F/Flags.h"
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class __declspec(novtable) Translator :
|
||||
public State
|
||||
{
|
||||
public:
|
||||
static constexpr auto GFX_STATE_TYPE{ StateType::kTranslator };
|
||||
|
||||
enum class WordWrappingType : std::uint32_t
|
||||
{
|
||||
kDefault = 0,
|
||||
kAsian = 1 << 0,
|
||||
kProhibition = 1 << 1,
|
||||
kNoHangulWrap = 1 << 2,
|
||||
kHyphenation = 1 << 3,
|
||||
kCustom = 0x80
|
||||
};
|
||||
|
||||
Translator() :
|
||||
State(StateType::kTranslator)
|
||||
{}
|
||||
|
||||
explicit Translator(Flags<WordWrappingType> a_wwMode) :
|
||||
State(StateType::kTranslator), wwMode(a_wwMode)
|
||||
{}
|
||||
|
||||
// members
|
||||
Flags<WordWrappingType> wwMode; // 18
|
||||
};
|
||||
static_assert(sizeof(Translator) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_State.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Event;
|
||||
class Movie;
|
||||
|
||||
class __declspec(novtable) UserEventHandler :
|
||||
public State // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto GFX_STATE_TYPE{ StateType::kUserEventHandler };
|
||||
|
||||
UserEventHandler() :
|
||||
State(StateType::kUserEventHandler)
|
||||
{}
|
||||
|
||||
virtual void HandleEvent(class Movie* pmovie, const class Event& event) = 0;
|
||||
};
|
||||
static_assert(sizeof(UserEventHandler) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,907 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/F/Flags.h"
|
||||
#include "Scaleform/N/NewOverrideBase.h"
|
||||
#include "Scaleform/R/Render_EdgeAAMode.h"
|
||||
#include "Scaleform/R/Render_Matrix.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Movie;
|
||||
class MovieImpl;
|
||||
|
||||
class Value
|
||||
{
|
||||
public:
|
||||
enum class ValueType : std::int32_t
|
||||
{
|
||||
kUndefined,
|
||||
kNull,
|
||||
kBoolean,
|
||||
kInt,
|
||||
kUInt,
|
||||
kNumber,
|
||||
kString,
|
||||
|
||||
kStringW,
|
||||
|
||||
kObject,
|
||||
kArray,
|
||||
kDisplayObject,
|
||||
kClosure,
|
||||
|
||||
kOrphanedBit = 1 << 5,
|
||||
kManagedBit = 1 << 6,
|
||||
kConvertBit = 1 << 7,
|
||||
|
||||
kTypeMask = kConvertBit | 0x0F,
|
||||
|
||||
kConvertBoolean = kConvertBit | kBoolean,
|
||||
kConvertInt = kConvertBit | kInt,
|
||||
kConvertUInt = kConvertBit | kUInt,
|
||||
kConvertNumber = kConvertBit | kNumber,
|
||||
kConvertString = kConvertBit | kString,
|
||||
kConvertStringW = kConvertBit | kStringW
|
||||
};
|
||||
|
||||
union ValueUnion
|
||||
{
|
||||
ValueUnion() noexcept :
|
||||
data(nullptr)
|
||||
{}
|
||||
|
||||
ValueUnion(const ValueUnion& a_rhs) noexcept :
|
||||
data(a_rhs.data)
|
||||
{}
|
||||
|
||||
ValueUnion(ValueUnion&& a_rhs) noexcept :
|
||||
data(a_rhs.data)
|
||||
{
|
||||
a_rhs.data = nullptr;
|
||||
}
|
||||
|
||||
explicit ValueUnion(std::int32_t a_rhs) noexcept :
|
||||
int32(a_rhs)
|
||||
{}
|
||||
|
||||
explicit ValueUnion(std::uint32_t a_rhs) noexcept :
|
||||
uint32(a_rhs)
|
||||
{}
|
||||
|
||||
explicit ValueUnion(double a_rhs) noexcept :
|
||||
number(a_rhs)
|
||||
{}
|
||||
|
||||
explicit ValueUnion(bool a_rhs) noexcept :
|
||||
boolean(a_rhs)
|
||||
{}
|
||||
|
||||
explicit ValueUnion(const char* a_rhs) noexcept :
|
||||
string(a_rhs)
|
||||
{}
|
||||
|
||||
explicit ValueUnion(const wchar_t* a_rhs) noexcept :
|
||||
wstring(a_rhs)
|
||||
{}
|
||||
|
||||
ValueUnion& operator=(const ValueUnion& a_rhs) noexcept
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
data = a_rhs.data;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(ValueUnion&& a_rhs) noexcept
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
data = a_rhs.data;
|
||||
a_rhs.data = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(std::int32_t a_rhs) noexcept
|
||||
{
|
||||
int32 = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(std::uint32_t a_rhs) noexcept
|
||||
{
|
||||
uint32 = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(double a_rhs) noexcept
|
||||
{
|
||||
number = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(bool a_rhs) noexcept
|
||||
{
|
||||
boolean = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(const char* a_rhs) noexcept
|
||||
{
|
||||
string = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ValueUnion& operator=(const wchar_t* a_rhs) noexcept
|
||||
{
|
||||
wstring = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::int32_t int32;
|
||||
std::uint32_t uint32;
|
||||
double number;
|
||||
bool boolean;
|
||||
const char* string;
|
||||
const char** mstring;
|
||||
const wchar_t* wstring;
|
||||
void* data;
|
||||
};
|
||||
static_assert(sizeof(ValueUnion) == 0x8);
|
||||
|
||||
class DisplayInfo
|
||||
{
|
||||
public:
|
||||
enum class SetFlags : std::uint16_t
|
||||
{
|
||||
kX = 0x01,
|
||||
kY = 0x02,
|
||||
kRotation = 0x04,
|
||||
kXScale = 0x08,
|
||||
kYScale = 0x10,
|
||||
kAlpha = 0x20,
|
||||
kVisible = 0x40,
|
||||
kZ = 0x80,
|
||||
kXRotation = 0x100,
|
||||
kYRotation = 0x200,
|
||||
kZScale = 0x400,
|
||||
kFOV = 0x800,
|
||||
kProjMatrix3D = 0x1000,
|
||||
kViewMatrix3D = 0x2000,
|
||||
kEdgeAAMode = 0x4000,
|
||||
};
|
||||
|
||||
DisplayInfo() = default;
|
||||
|
||||
double GetX() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kX));
|
||||
return x;
|
||||
}
|
||||
|
||||
double GetY() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kY));
|
||||
return y;
|
||||
}
|
||||
|
||||
double GetZ() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kZ));
|
||||
return z;
|
||||
}
|
||||
|
||||
double GetXScale() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kXScale));
|
||||
return xScale;
|
||||
}
|
||||
|
||||
double GetYScale() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kYScale));
|
||||
return yScale;
|
||||
}
|
||||
|
||||
double GetZScale() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kZScale));
|
||||
return zScale;
|
||||
}
|
||||
|
||||
double GetRotation() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kRotation));
|
||||
return rotation;
|
||||
}
|
||||
|
||||
double GetXRotation() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kXRotation));
|
||||
return xRotation;
|
||||
}
|
||||
|
||||
double GetYRotation() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kYRotation));
|
||||
return yRotation;
|
||||
}
|
||||
|
||||
double GetAlpha() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kAlpha));
|
||||
return alpha;
|
||||
}
|
||||
|
||||
bool GetVisible() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kVisible));
|
||||
return visible;
|
||||
}
|
||||
|
||||
double GetFOV() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kFOV));
|
||||
return fov;
|
||||
}
|
||||
|
||||
const Render::Matrix3x4<float>* GetViewMatrix3D() const
|
||||
{
|
||||
return varsSet.any(SetFlags::kViewMatrix3D) ? &viewMatrix3D : nullptr;
|
||||
}
|
||||
|
||||
const Render::Matrix4x4<float>* GetProjectionMatrix3D() const
|
||||
{
|
||||
return varsSet.any(SetFlags::kProjMatrix3D) ? &projectionMatrix3D : nullptr;
|
||||
}
|
||||
|
||||
Render::EdgeAAMode GetEdgeAAMode() const
|
||||
{
|
||||
assert(varsSet.any(SetFlags::kEdgeAAMode));
|
||||
return edgeAAMode;
|
||||
}
|
||||
|
||||
void SetX(double a_x)
|
||||
{
|
||||
varsSet.set(SetFlags::kX);
|
||||
x = a_x;
|
||||
}
|
||||
|
||||
void SetY(double a_y)
|
||||
{
|
||||
varsSet.set(SetFlags::kY);
|
||||
y = a_y;
|
||||
}
|
||||
|
||||
void SetZ(double a_z)
|
||||
{
|
||||
varsSet.set(SetFlags::kZ);
|
||||
z = a_z;
|
||||
}
|
||||
|
||||
void SetXScale(double a_xScale)
|
||||
{
|
||||
varsSet.set(SetFlags::kXScale);
|
||||
xScale = a_xScale;
|
||||
}
|
||||
|
||||
void SetYScale(double a_yScale)
|
||||
{
|
||||
varsSet.set(SetFlags::kYScale);
|
||||
yScale = a_yScale;
|
||||
}
|
||||
|
||||
void SetZScale(double a_zScale)
|
||||
{
|
||||
varsSet.set(SetFlags::kZScale);
|
||||
zScale = a_zScale;
|
||||
}
|
||||
|
||||
void SetRotation(double a_rotation)
|
||||
{
|
||||
varsSet.set(SetFlags::kRotation);
|
||||
rotation = a_rotation;
|
||||
}
|
||||
|
||||
void SetXRotation(double a_xRotation)
|
||||
{
|
||||
varsSet.set(SetFlags::kXRotation);
|
||||
xRotation = a_xRotation;
|
||||
}
|
||||
|
||||
void SetYRotation(double a_yRotation)
|
||||
{
|
||||
varsSet.set(SetFlags::kYRotation);
|
||||
yRotation = a_yRotation;
|
||||
}
|
||||
|
||||
void SetAlpha(double a_alpha)
|
||||
{
|
||||
varsSet.set(SetFlags::kAlpha);
|
||||
alpha = a_alpha;
|
||||
}
|
||||
|
||||
void SetVisible(bool a_visible)
|
||||
{
|
||||
varsSet.set(SetFlags::kVisible);
|
||||
visible = a_visible;
|
||||
}
|
||||
|
||||
void SetFOV(double a_fov)
|
||||
{
|
||||
varsSet.set(SetFlags::kFOV);
|
||||
fov = a_fov;
|
||||
}
|
||||
|
||||
void SetViewMatrix3D(const Render::Matrix3x4<float>* a_matrix)
|
||||
{
|
||||
if (a_matrix) {
|
||||
varsSet.set(SetFlags::kViewMatrix3D);
|
||||
viewMatrix3D = *a_matrix;
|
||||
} else {
|
||||
varsSet.reset(SetFlags::kViewMatrix3D);
|
||||
}
|
||||
}
|
||||
|
||||
void SetProjectionMatrix3D(const Render::Matrix4x4<float>* a_matrix)
|
||||
{
|
||||
if (a_matrix) {
|
||||
varsSet.set(SetFlags::kProjMatrix3D);
|
||||
projectionMatrix3D = *a_matrix;
|
||||
} else {
|
||||
varsSet.reset(SetFlags::kProjMatrix3D);
|
||||
}
|
||||
}
|
||||
|
||||
void SetEdgeAAMode(Render::EdgeAAMode a_mode)
|
||||
{
|
||||
varsSet.set(SetFlags::kEdgeAAMode);
|
||||
edgeAAMode = a_mode;
|
||||
}
|
||||
|
||||
private:
|
||||
// members
|
||||
double x;
|
||||
double y;
|
||||
double rotation;
|
||||
double xScale;
|
||||
double yScale;
|
||||
double alpha;
|
||||
double z;
|
||||
double xRotation;
|
||||
double yRotation;
|
||||
double zScale;
|
||||
double fov;
|
||||
alignas(16) Render::Matrix3x4<float> viewMatrix3D;
|
||||
Render::Matrix4x4<float> projectionMatrix3D;
|
||||
Render::EdgeAAMode edgeAAMode;
|
||||
Flags<SetFlags> varsSet{};
|
||||
bool visible;
|
||||
};
|
||||
static_assert(sizeof(DisplayInfo) == 0xE0);
|
||||
|
||||
class __declspec(novtable) ObjectInterface :
|
||||
public NewOverrideBase<327>
|
||||
{
|
||||
public:
|
||||
class __declspec(novtable) ObjVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~ObjVisitor() = default; // 00
|
||||
|
||||
// add
|
||||
virtual bool IncludeAS3PublicMembers() const { return false; } // 01
|
||||
virtual void Visit(const char* a_name, const Value& a_val) = 0; // 02
|
||||
};
|
||||
static_assert(sizeof(ObjVisitor) == 0x8);
|
||||
|
||||
class __declspec(novtable) ArrVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~ArrVisitor() = default;
|
||||
|
||||
// add
|
||||
virtual void Visit(std::uint32_t a_idx, const Value& a_val) = 0; // 00
|
||||
};
|
||||
static_assert(sizeof(ArrVisitor) == 0x8);
|
||||
|
||||
virtual ~ObjectInterface() = default; // 00
|
||||
|
||||
void ObjectAddRef(Value* a_val, void* a_obj)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::ObjectAddRef);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::ObjectAddRef };
|
||||
return func(this, a_val, a_obj);
|
||||
}
|
||||
|
||||
void ObjectRelease(Value* a_val, void* a_obj)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::ObjectRelease);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::ObjectRelease };
|
||||
return func(this, a_val, a_obj);
|
||||
}
|
||||
|
||||
bool HasMember(void* a_data, const char* a_name, bool a_isdobj) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::HasMember);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::HasMember };
|
||||
return func(this, a_data, a_name, a_isdobj);
|
||||
}
|
||||
|
||||
std::uint32_t GetArraySize(void* a_data) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::GetArraySize);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::GetArraySize };
|
||||
return func(this, a_data);
|
||||
}
|
||||
|
||||
bool GetMember(void* a_data, const char* a_name, Value* a_val, bool a_isdobj) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::GetMember);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::GetMember };
|
||||
return func(this, a_data, a_name, a_val, a_isdobj);
|
||||
}
|
||||
|
||||
bool GetElement(void* a_data, std::uint32_t a_idx, Value* a_val) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::GetElement);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::GetElement };
|
||||
return func(this, a_data, a_idx, a_val);
|
||||
}
|
||||
|
||||
bool SetElement(void* a_data, std::uint32_t a_idx, const Value& a_val)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::SetElement);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::SetElement };
|
||||
return func(this, a_data, a_idx, a_val);
|
||||
}
|
||||
|
||||
bool SetMember(void* a_data, const char* a_name, const Value& a_value, bool a_isdobj)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::SetMember);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::SetMember };
|
||||
return func(this, a_data, a_name, a_value, a_isdobj);
|
||||
}
|
||||
|
||||
bool Invoke(void* a_data, Value* a_result, const char* a_name, const Value* a_args, std::size_t a_numArgs, bool a_isdobj)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::Invoke);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::Invoke };
|
||||
return func(this, a_data, a_result, a_name, a_args, a_numArgs, a_isdobj);
|
||||
}
|
||||
|
||||
bool PushBack(void* a_data, const Value& a_value)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::PushBack);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::PushBack };
|
||||
return func(this, a_data, a_value);
|
||||
}
|
||||
|
||||
bool RemoveElements(void* a_data, std::uint32_t a_idx, std::int32_t a_count)
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::RemoveElements);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::RemoveElements };
|
||||
return func(this, a_data, a_idx, a_count);
|
||||
}
|
||||
|
||||
void VisitMembers(void* a_data, ObjVisitor* a_visitor, bool a_isDObj) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::VisitMembers);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::VisitMembers };
|
||||
return func(this, a_data, a_visitor, a_isDObj);
|
||||
}
|
||||
|
||||
bool GetDisplayInfo(void* a_data, DisplayInfo* a_info) const
|
||||
{
|
||||
using func_t = decltype(&ObjectInterface::GetDisplayInfo);
|
||||
static REL::Relocation<func_t> func{ ID::GFx::Value::GetDisplayInfo };
|
||||
return func(this, a_data, a_info);
|
||||
}
|
||||
|
||||
// members
|
||||
MovieImpl* movieRoot; // 08
|
||||
};
|
||||
static_assert(sizeof(ObjectInterface) == 0x10);
|
||||
|
||||
using ObjectVisitor = ObjectInterface::ObjVisitor;
|
||||
using ArrayVisitor = ObjectInterface::ArrVisitor;
|
||||
using ObjectVisitFn = std::function<void(const char*, const Value&)>;
|
||||
|
||||
Value() noexcept = default;
|
||||
|
||||
Value(const Value& a_rhs) :
|
||||
_type(a_rhs._type),
|
||||
_value(a_rhs._value),
|
||||
_dataAux(a_rhs._dataAux)
|
||||
{
|
||||
if (a_rhs.IsManagedValue()) {
|
||||
AcquireManagedValue(a_rhs);
|
||||
}
|
||||
}
|
||||
|
||||
Value(Value&& a_rhs) noexcept :
|
||||
_objectInterface(a_rhs._objectInterface),
|
||||
_type(a_rhs._type),
|
||||
_value(std::move(a_rhs._value)),
|
||||
_dataAux(a_rhs._dataAux)
|
||||
{
|
||||
a_rhs._objectInterface = nullptr;
|
||||
a_rhs._type = ValueType::kUndefined;
|
||||
a_rhs._dataAux = 0;
|
||||
}
|
||||
|
||||
Value(std::nullptr_t) noexcept :
|
||||
_type(ValueType::kNull)
|
||||
{}
|
||||
|
||||
Value(std::int32_t a_rhs) noexcept :
|
||||
_type(ValueType::kInt),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(std::uint32_t a_rhs) noexcept :
|
||||
_type(ValueType::kUInt),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(double a_rhs) noexcept :
|
||||
_type(ValueType::kNumber),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(bool a_rhs) noexcept :
|
||||
_type(ValueType::kBoolean),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(const char* a_rhs) noexcept :
|
||||
_type(ValueType::kString),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(std::string_view a_rhs) noexcept :
|
||||
_type(ValueType::kString),
|
||||
_value(a_rhs.data())
|
||||
{}
|
||||
|
||||
Value(const wchar_t* a_rhs) noexcept :
|
||||
_type(ValueType::kStringW),
|
||||
_value(a_rhs)
|
||||
{}
|
||||
|
||||
Value(std::wstring_view a_rhs) noexcept :
|
||||
_type(ValueType::kStringW),
|
||||
_value(a_rhs.data())
|
||||
{}
|
||||
|
||||
~Value()
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kUndefined;
|
||||
}
|
||||
|
||||
Value& operator=(const Value& a_rhs)
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = a_rhs._type;
|
||||
_value = a_rhs._value;
|
||||
_dataAux = a_rhs._dataAux;
|
||||
|
||||
if (a_rhs.IsManagedValue()) {
|
||||
AcquireManagedValue(a_rhs);
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(Value&& a_rhs)
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_objectInterface = a_rhs._objectInterface;
|
||||
a_rhs._objectInterface = nullptr;
|
||||
|
||||
_type = a_rhs._type;
|
||||
a_rhs._type = ValueType::kUndefined;
|
||||
|
||||
_value = std::move(a_rhs._value);
|
||||
|
||||
_dataAux = a_rhs._dataAux;
|
||||
a_rhs._dataAux = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(std::nullptr_t) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kNull;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(std::int32_t a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kInt;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(std::uint32_t a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kUInt;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(double a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kNumber;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(bool a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kBoolean;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(const char* a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kString;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(const wchar_t* a_rhs) noexcept
|
||||
{
|
||||
if (IsManagedValue()) {
|
||||
ReleaseManagedValue();
|
||||
}
|
||||
|
||||
_type = ValueType::kStringW;
|
||||
_value = a_rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]] ValueType GetType() const noexcept { return *(_type & ValueType::kTypeMask); }
|
||||
|
||||
[[nodiscard]] bool IsArray() const noexcept { return GetType() == ValueType::kArray; }
|
||||
[[nodiscard]] bool IsBoolean() const noexcept { return GetType() == ValueType::kBoolean; }
|
||||
[[nodiscard]] bool IsDisplayObject() const noexcept { return GetType() == ValueType::kDisplayObject; }
|
||||
[[nodiscard]] bool IsInt() const noexcept { return GetType() == ValueType::kInt; }
|
||||
[[nodiscard]] bool IsNumber() const noexcept { return GetType() == ValueType::kNumber; }
|
||||
[[nodiscard]] bool IsString() const noexcept { return GetType() == ValueType::kString; }
|
||||
[[nodiscard]] bool IsUndefined() const noexcept { return GetType() == ValueType::kUndefined; }
|
||||
[[nodiscard]] bool IsUInt() const noexcept { return GetType() == ValueType::kUInt; }
|
||||
|
||||
[[nodiscard]] bool IsObject() const noexcept
|
||||
{
|
||||
switch (GetType()) {
|
||||
case ValueType::kObject:
|
||||
case ValueType::kArray:
|
||||
case ValueType::kDisplayObject:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] bool GetBoolean() const
|
||||
{
|
||||
assert(IsBoolean());
|
||||
return _value.boolean;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::int32_t GetInt() const
|
||||
{
|
||||
assert(IsInt());
|
||||
return _value.int32;
|
||||
}
|
||||
|
||||
[[nodiscard]] double GetNumber() const
|
||||
{
|
||||
assert(IsNumber());
|
||||
return _value.number;
|
||||
}
|
||||
|
||||
[[nodiscard]] const char* GetString() const
|
||||
{
|
||||
assert(IsString());
|
||||
return IsManagedValue() ? *_value.mstring : _value.string;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::uint32_t GetUInt() const
|
||||
{
|
||||
assert(IsUInt());
|
||||
return _value.uint32;
|
||||
}
|
||||
|
||||
bool HasMember(std::string_view a_name) const
|
||||
{
|
||||
assert(IsObject());
|
||||
return _objectInterface->HasMember(_value.data, a_name.data(), IsDisplayObject());
|
||||
}
|
||||
|
||||
void VisitMembers(ObjectVisitor* a_visitor) const
|
||||
{
|
||||
assert(IsObject());
|
||||
return _objectInterface->VisitMembers(_value.data, a_visitor, IsDisplayObject());
|
||||
}
|
||||
|
||||
void VisitMembers(ObjectVisitFn&& a_visitor) const
|
||||
{
|
||||
assert(IsObject());
|
||||
|
||||
class MemberVisitor :
|
||||
public ObjectInterface::ObjVisitor
|
||||
{
|
||||
public:
|
||||
MemberVisitor(ObjectVisitFn&& a_fn) :
|
||||
_fn(a_fn) {}
|
||||
|
||||
void Visit(const char* a_name, const Value& a_val) override
|
||||
{
|
||||
if (_fn) {
|
||||
_fn(a_name, a_val);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ObjectVisitFn _fn;
|
||||
};
|
||||
|
||||
MemberVisitor visitor{ std::forward<ObjectVisitFn>(a_visitor) };
|
||||
return _objectInterface->VisitMembers(_value.data, std::addressof(visitor), IsDisplayObject());
|
||||
}
|
||||
|
||||
std::uint32_t GetArraySize() const
|
||||
{
|
||||
assert(IsArray());
|
||||
return _objectInterface->GetArraySize(_value.data);
|
||||
}
|
||||
|
||||
bool GetElement(std::uint32_t a_idx, Value* a_val) const
|
||||
{
|
||||
assert(IsArray());
|
||||
return _objectInterface->GetElement(_value.data, a_idx, a_val);
|
||||
}
|
||||
|
||||
bool SetElement(std::uint32_t a_idx, const Value& a_val)
|
||||
{
|
||||
assert(IsArray());
|
||||
return _objectInterface->SetElement(_value.data, a_idx, a_val);
|
||||
}
|
||||
|
||||
bool GetMember(std::string_view a_name, Value* a_val) const
|
||||
{
|
||||
assert(IsObject());
|
||||
return _objectInterface->GetMember(_value.data, a_name.data(), a_val, IsDisplayObject());
|
||||
}
|
||||
|
||||
bool SetMember(std::string_view a_name, const Value& a_val)
|
||||
{
|
||||
assert(IsObject());
|
||||
return _objectInterface->SetMember(_value.data, a_name.data(), a_val, IsDisplayObject());
|
||||
}
|
||||
|
||||
bool Invoke(const char* a_name, Value* a_result, const Value* a_args, std::size_t a_numArgs)
|
||||
{
|
||||
assert(IsObject());
|
||||
return _objectInterface->Invoke(_value.data, a_result, a_name, a_args, a_numArgs, IsDisplayObject());
|
||||
}
|
||||
|
||||
bool Invoke(const char* a_name, Value* a_result = nullptr)
|
||||
{
|
||||
return Invoke(a_name, a_result, nullptr, 0);
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
inline bool Invoke(const char* a_name, const std::array<Value, N>& a_args)
|
||||
{
|
||||
return Invoke(a_name, nullptr, a_args);
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
inline bool Invoke(const char* a_name, Value* a_result, const std::array<Value, N>& a_args)
|
||||
{
|
||||
return Invoke(a_name, a_result, a_args.data(), a_args.size());
|
||||
}
|
||||
|
||||
bool PushBack(const Value& a_val)
|
||||
{
|
||||
assert(IsArray());
|
||||
return _objectInterface->PushBack(_value.data, a_val);
|
||||
}
|
||||
|
||||
bool RemoveElements(std::uint32_t a_idx, std::int32_t a_count = -1)
|
||||
{
|
||||
assert(IsArray());
|
||||
return _objectInterface->RemoveElements(_value.data, a_idx, a_count);
|
||||
}
|
||||
|
||||
bool RemoveElement(std::uint32_t a_idx)
|
||||
{
|
||||
return RemoveElements(a_idx, 1);
|
||||
}
|
||||
|
||||
bool ClearElements()
|
||||
{
|
||||
return RemoveElements(0);
|
||||
}
|
||||
|
||||
bool GetDisplayInfo(DisplayInfo* a_info) const
|
||||
{
|
||||
assert(IsDisplayObject());
|
||||
return _objectInterface->GetDisplayInfo(_value.data, a_info);
|
||||
}
|
||||
|
||||
[[nodiscard]] Movie* GetMovie() const
|
||||
{
|
||||
assert(_objectInterface && _objectInterface->movieRoot);
|
||||
return reinterpret_cast<Movie*>(_objectInterface->movieRoot);
|
||||
}
|
||||
|
||||
private:
|
||||
void AcquireManagedValue(const Value& a_rhs)
|
||||
{
|
||||
assert(a_rhs._value.data && a_rhs._objectInterface);
|
||||
_objectInterface = a_rhs._objectInterface;
|
||||
_objectInterface->ObjectAddRef(this, _value.data);
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsManagedValue() const noexcept
|
||||
{
|
||||
const auto managed = _type.all(ValueType::kManagedBit);
|
||||
assert(managed ? _objectInterface != nullptr : true);
|
||||
return managed;
|
||||
}
|
||||
|
||||
void ReleaseManagedValue()
|
||||
{
|
||||
assert(_value.data && _objectInterface);
|
||||
_objectInterface->ObjectRelease(this, _value.data);
|
||||
_objectInterface = nullptr;
|
||||
}
|
||||
|
||||
// members
|
||||
ObjectInterface* _objectInterface{ nullptr }; // 00
|
||||
REX::TEnumSet<ValueType, std::int32_t> _type{ ValueType::kUndefined }; // 08
|
||||
ValueUnion _value{}; // 10
|
||||
std::size_t _dataAux{ 0 }; // 18
|
||||
};
|
||||
static_assert(sizeof(Value) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/Render_Viewport.h"
|
||||
|
||||
namespace Scaleform::GFx
|
||||
{
|
||||
class Viewport :
|
||||
public Render::Viewport
|
||||
{
|
||||
public:
|
||||
// members
|
||||
float scale; // 2C
|
||||
float aspectRatio; // 30
|
||||
};
|
||||
static_assert(sizeof(Viewport) == 0x34);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class T>
|
||||
class ListNode
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T* prev; // 00
|
||||
T* next; // 08
|
||||
};
|
||||
//static_assert(sizeof(ListNode<void*>) == 0x10);
|
||||
|
||||
template <class T, class B = T>
|
||||
class List
|
||||
{
|
||||
public:
|
||||
// members
|
||||
ListNode<B> root; // 00
|
||||
};
|
||||
//static_assert(sizeof(List<void*>) == 0x10);
|
||||
|
||||
template <class T, class Accessor>
|
||||
class List2
|
||||
{
|
||||
public:
|
||||
// members
|
||||
T root; // 00
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class Lock
|
||||
{
|
||||
public:
|
||||
// members
|
||||
REX::W32::CRITICAL_SECTION cs; // 00
|
||||
};
|
||||
static_assert(sizeof(Lock) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class LogMessageId;
|
||||
|
||||
class __declspec(novtable) alignas(0x08) Log :
|
||||
public RefCountBase<Log, 2> // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RE::RTTI::Scaleform__Log };
|
||||
static constexpr auto VTABLE{ RE::VTABLE::Scaleform__Log };
|
||||
|
||||
virtual ~Log()
|
||||
{
|
||||
Release();
|
||||
}
|
||||
|
||||
// add
|
||||
virtual void LogMessageVarg(LogMessageId a_messageID, const char* a_fmt, std::va_list a_argList);
|
||||
};
|
||||
static_assert(sizeof(Log) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class LogMessageId
|
||||
{
|
||||
public:
|
||||
LogMessageId(std::int32_t a_id) :
|
||||
id(a_id)
|
||||
{}
|
||||
|
||||
~LogMessageId() noexcept {}
|
||||
|
||||
// members
|
||||
std::int32_t id; // 0
|
||||
};
|
||||
static_assert(sizeof(LogMessageId) == 0x4);
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/M/MemoryHeap.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class Memory
|
||||
{
|
||||
public:
|
||||
static void SetGlobalHeap(MemoryHeap* a_heap)
|
||||
{
|
||||
static REL::Relocation<MemoryHeap**> heap{ ID::Memory::SetGlobalHeap };
|
||||
*heap = a_heap;
|
||||
}
|
||||
|
||||
[[nodiscard]] static MemoryHeap* GetGlobalHeap()
|
||||
{
|
||||
static REL::Relocation<MemoryHeap**> heap{ ID::Memory::GetGlobalHeap };
|
||||
return *heap;
|
||||
}
|
||||
|
||||
static void CreateArena(std::size_t a_arena, SysAllocPaged* a_sysAlloc)
|
||||
{
|
||||
GetGlobalHeap()->CreateArena(a_arena, a_sysAlloc);
|
||||
}
|
||||
|
||||
static void DestroyArena(std::size_t a_arena)
|
||||
{
|
||||
GetGlobalHeap()->DestroyArena(a_arena);
|
||||
}
|
||||
|
||||
[[nodiscard]] static bool ArenaIsEmpty(std::size_t a_arena)
|
||||
{
|
||||
return GetGlobalHeap()->ArenaIsEmpty(a_arena);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* Alloc(std::size_t a_size)
|
||||
{
|
||||
return GetGlobalHeap()->Alloc(a_size);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* Alloc(std::size_t a_size, std::size_t a_align)
|
||||
{
|
||||
return GetGlobalHeap()->Alloc(a_size, a_align);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* Alloc(std::size_t a_size, const AllocInfo& a_info)
|
||||
{
|
||||
return GetGlobalHeap()->Alloc(a_size, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* Alloc(std::size_t a_size, std::size_t a_align, const AllocInfo& a_info)
|
||||
{
|
||||
return GetGlobalHeap()->Alloc(a_size, a_align, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocAutoHeap(const void* a_ptr, std::size_t a_size)
|
||||
{
|
||||
return GetGlobalHeap()->AllocAutoHeap(a_ptr, a_size);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocAutoHeap(const void* a_ptr, std::size_t a_size, std::size_t a_align)
|
||||
{
|
||||
return GetGlobalHeap()->AllocAutoHeap(a_ptr, a_size, a_align);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocAutoHeap(const void* a_ptr, std::size_t a_size, const AllocInfo& a_info)
|
||||
{
|
||||
return GetGlobalHeap()->AllocAutoHeap(a_ptr, a_size, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocAutoHeap(const void* a_ptr, std::size_t a_size, std::size_t a_align, const AllocInfo& a_info)
|
||||
{
|
||||
return GetGlobalHeap()->AllocAutoHeap(a_ptr, a_size, a_align, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocInHeap(MemoryHeap* a_heap, std::size_t a_size)
|
||||
{
|
||||
return a_heap->Alloc(a_size);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocInHeap(MemoryHeap* a_heap, std::size_t a_size, std::size_t a_align)
|
||||
{
|
||||
return a_heap->Alloc(a_size, a_align);
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocInHeap(MemoryHeap* a_heap, std::size_t a_size, const AllocInfo& a_info)
|
||||
{
|
||||
return a_heap->Alloc(a_size, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* AllocInHeap(MemoryHeap* a_heap, std::size_t a_size, std::size_t a_align, const AllocInfo& a_info)
|
||||
{
|
||||
return a_heap->Alloc(a_size, a_align, std::addressof(a_info));
|
||||
}
|
||||
|
||||
[[nodiscard]] static void* Realloc(void* a_ptr, std::size_t a_newSize)
|
||||
{
|
||||
return GetGlobalHeap()->Realloc(a_ptr, a_newSize);
|
||||
}
|
||||
|
||||
static void Free(void* a_ptr)
|
||||
{
|
||||
GetGlobalHeap()->Free(a_ptr);
|
||||
}
|
||||
|
||||
[[nodiscard]] static MemoryHeap* GetHeapByAddress(const void* a_ptr)
|
||||
{
|
||||
return GetGlobalHeap()->GetAllocHeap(a_ptr);
|
||||
}
|
||||
};
|
||||
static_assert(std::is_empty_v<Memory>);
|
||||
|
||||
[[nodiscard]] inline void* malloc(std::size_t a_size)
|
||||
{
|
||||
return Memory::Alloc(a_size);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] T* malloc()
|
||||
{
|
||||
return static_cast<T*>(malloc(sizeof(T)));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline void* aligned_alloc(std::size_t a_alignment, std::size_t a_size)
|
||||
{
|
||||
return Memory::Alloc(a_size, a_alignment);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] T* aligned_alloc()
|
||||
{
|
||||
return static_cast<T*>(aligned_alloc(alignof(T), sizeof(T)));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline void* calloc(std::size_t a_num, std::size_t a_size)
|
||||
{
|
||||
return malloc(a_num * a_size);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] T* calloc(std::size_t a_num)
|
||||
{
|
||||
return static_cast<T*>(calloc(a_num, sizeof(T)));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline void* realloc(void* a_ptr, std::size_t a_newSize)
|
||||
{
|
||||
return Memory::Realloc(a_ptr, a_newSize);
|
||||
}
|
||||
|
||||
inline void free(void* a_ptr)
|
||||
{
|
||||
return Memory::Free(a_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
#define SF_HEAP_REDEFINE_NEW(a_type) \
|
||||
[[nodiscard]] void* operator new(std::size_t a_count) \
|
||||
{ \
|
||||
const auto mem = Scaleform::malloc(a_count); \
|
||||
if (!mem) { \
|
||||
REX::FAIL("out of memory"sv); \
|
||||
} \
|
||||
return mem; \
|
||||
} \
|
||||
\
|
||||
[[nodiscard]] void* operator new[](std::size_t a_count) \
|
||||
{ \
|
||||
const auto mem = Scaleform::malloc(a_count); \
|
||||
if (mem) { \
|
||||
return mem; \
|
||||
} else { \
|
||||
REX::FAIL("out of memory"sv); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
[[nodiscard]] void* operator new(std::size_t a_count, std::align_val_t a_alignment) \
|
||||
{ \
|
||||
const auto mem = Scaleform::aligned_alloc(static_cast<std::size_t>(a_alignment), a_count); \
|
||||
if (mem) { \
|
||||
return mem; \
|
||||
} else { \
|
||||
REX::FAIL("out of memory"sv); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
[[nodiscard]] void* operator new[](std::size_t a_count, std::align_val_t a_alignment) \
|
||||
{ \
|
||||
const auto mem = Scaleform::aligned_alloc(static_cast<std::size_t>(a_alignment), a_count); \
|
||||
if (mem) { \
|
||||
return mem; \
|
||||
} else { \
|
||||
REX::FAIL("out of memory"sv); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
[[nodiscard]] constexpr void* operator new(std::size_t, void* a_ptr) noexcept { return a_ptr; } \
|
||||
[[nodiscard]] constexpr void* operator new[](std::size_t, void* a_ptr) noexcept { return a_ptr; } \
|
||||
[[nodiscard]] constexpr void* operator new(std::size_t, std::align_val_t, void* a_ptr) noexcept { return a_ptr; } \
|
||||
[[nodiscard]] constexpr void* operator new[](std::size_t, std::align_val_t, void* a_ptr) noexcept { return a_ptr; } \
|
||||
\
|
||||
void operator delete(void* a_ptr) { Scaleform::free(a_ptr); } \
|
||||
void operator delete[](void* a_ptr) { Scaleform::free(a_ptr); } \
|
||||
void operator delete(void* a_ptr, std::align_val_t) { Scaleform::free(a_ptr); } \
|
||||
void operator delete[](void* a_ptr, std::align_val_t) { Scaleform::free(a_ptr); } \
|
||||
void operator delete(void* a_ptr, std::size_t) { Scaleform::free(a_ptr); } \
|
||||
void operator delete[](void* a_ptr, std::size_t) { Scaleform::free(a_ptr); } \
|
||||
void operator delete(void* a_ptr, std::size_t, std::align_val_t) { Scaleform::free(a_ptr); } \
|
||||
void operator delete[](void* a_ptr, std::size_t, std::align_val_t) { Scaleform::free(a_ptr); }
|
||||
@@ -0,0 +1,172 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/L/List.h"
|
||||
#include "Scaleform/L/Lock.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class StatBag;
|
||||
class SysAllocPaged;
|
||||
class AllocInfo;
|
||||
|
||||
namespace Heap
|
||||
{
|
||||
class MemVisitor;
|
||||
class SegVisitor;
|
||||
}
|
||||
|
||||
class __declspec(novtable) MemoryHeap :
|
||||
public ListNode<MemoryHeap> // 08
|
||||
{
|
||||
public:
|
||||
using ChildListType = List<MemoryHeap>;
|
||||
|
||||
enum class HeapFlags
|
||||
{
|
||||
kThreadUnsafe = 0x1,
|
||||
kFastTinyBlocks = 0x2,
|
||||
kFixedGranularity = 0x4,
|
||||
kRoot = 0x8,
|
||||
kNoDebugInfo = 0x10,
|
||||
kUserDebug = 0x1000
|
||||
};
|
||||
|
||||
enum class RootHeapParameters
|
||||
{
|
||||
kMinAlign = 0x10,
|
||||
kGranularity = 0x4000,
|
||||
kReserve = 0x4000,
|
||||
kThreshold = 0x40000,
|
||||
kLimit = 0x0
|
||||
};
|
||||
|
||||
class HeapDesc
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t flags{ 0 }; // 00
|
||||
std::size_t minAlign{ 16 }; // 08
|
||||
std::size_t granularity{ 8 * 1024 }; // 10
|
||||
std::size_t reserve{ 8 * 1024 }; // 18
|
||||
std::size_t threshold{ static_cast<std::size_t>(-1) }; // 20
|
||||
std::size_t limit{ 0 }; // 28
|
||||
std::size_t heapID{ 0 }; // 30
|
||||
std::size_t arena{ 0 }; // 38
|
||||
};
|
||||
static_assert(sizeof(HeapDesc) == 0x40);
|
||||
|
||||
class HeapInfo
|
||||
{
|
||||
public:
|
||||
// members
|
||||
HeapDesc desc; // 00
|
||||
MemoryHeap* parent; // 40
|
||||
char* name; // 48
|
||||
};
|
||||
static_assert(sizeof(HeapInfo) == 0x50);
|
||||
|
||||
class __declspec(novtable) HeapVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~HeapVisitor() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Visit(MemoryHeap* a_parentHeap, MemoryHeap* a_childHeap) = 0; // 01
|
||||
};
|
||||
static_assert(sizeof(HeapVisitor) == 0x8);
|
||||
|
||||
class __declspec(novtable) LimitHandler
|
||||
{
|
||||
public:
|
||||
virtual ~LimitHandler() = default; // 00
|
||||
|
||||
// add
|
||||
virtual bool OnExceedLimit(MemoryHeap* a_heap, std::size_t a_overLimit) = 0; // 01
|
||||
virtual void OnFreeSegment(MemoryHeap* a_heap, std::size_t a_freeingSize) = 0; // 02
|
||||
};
|
||||
static_assert(sizeof(LimitHandler) == 0x8);
|
||||
|
||||
class __declspec(novtable) HeapTracer
|
||||
{
|
||||
public:
|
||||
virtual ~HeapTracer() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void OnCreateHeap(const MemoryHeap* a_heap) = 0; // 01
|
||||
virtual void OnDestroyHeap(const MemoryHeap* a_heap) = 0; // 02
|
||||
virtual void OnAlloc(const MemoryHeap* a_heap, std::size_t a_size, std::size_t a_align, std::uint32_t a_sid, const void* a_ptr) = 0; // 03
|
||||
virtual void OnRealloc(const MemoryHeap* a_heap, const void* a_oldPtr, std::size_t a_newSize, const void* a_newPtr) = 0; // 04
|
||||
virtual void OnFree(const MemoryHeap* a_heap, const void* a_ptr) = 0; // 05
|
||||
};
|
||||
static_assert(sizeof(HeapTracer) == 0x8);
|
||||
|
||||
class RootStats
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::size_t sysMemFootprint; // 00
|
||||
std::size_t sysMemUsedSpace; // 08
|
||||
std::size_t pageMapFootprint; // 10
|
||||
std::size_t pageMapUsedSpace; // 18
|
||||
std::size_t bookkeepingFootprint; // 20
|
||||
std::size_t bookkeepingUsedSpace; // 28
|
||||
std::size_t debugInfoFootprint; // 30
|
||||
std::size_t debugInfoUsedSpace; // 38
|
||||
std::size_t userDebugFootprint; // 40
|
||||
std::size_t userDebugUsedSpace; // 48
|
||||
};
|
||||
static_assert(sizeof(RootStats) == 0x50);
|
||||
|
||||
virtual ~MemoryHeap() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void CreateArena(std::size_t a_arena, SysAllocPaged* a_sysAlloc) = 0; // 01
|
||||
virtual void DestroyArena(std::size_t a_arena) = 0; // 02
|
||||
virtual bool ArenaIsEmpty(std::size_t a_arena) = 0; // 03
|
||||
virtual MemoryHeap* CreateHeap(const char* a_name, const HeapDesc& a_desc) = 0; // 04
|
||||
virtual void SetLimitHandler(LimitHandler* a_handler) = 0; // 05
|
||||
virtual void SetLimit(std::size_t a_newLimit) = 0; // 06
|
||||
virtual void AddRef() = 0; // 07
|
||||
virtual void Release() = 0; // 08
|
||||
virtual void* Alloc(std::size_t a_size, const AllocInfo* a_info = nullptr) = 0; // 09
|
||||
virtual void* Alloc(std::size_t a_size, std::size_t a_align, const AllocInfo* a_info = nullptr) = 0; // 0A
|
||||
virtual void* Realloc(void* a_oldPtr, std::size_t a_newSize) = 0; // 0B
|
||||
virtual void Free(void* a_ptr) = 0; // 0C
|
||||
virtual void* AllocAutoHeap(const void* a_thisPtr, std::size_t a_size, const AllocInfo* a_info = nullptr) = 0; // 0D
|
||||
virtual void* AllocAutoHeap(const void* a_thisPtr, std::size_t a_size, std::size_t a_align, const AllocInfo* a_info = nullptr) = 0; // 0E
|
||||
virtual MemoryHeap* GetAllocHeap(const void* a_thisPtr) = 0; // 0F
|
||||
virtual std::size_t GetUsableSize(const void* a_ptr) = 0; // 10
|
||||
virtual void* AllocSysDirect(std::size_t a_size) = 0; // 11
|
||||
virtual void FreeSysDirect(void* a_ptr, std::size_t a_size) = 0; // 12
|
||||
virtual bool GetStats(StatBag* a_bag) = 0; // 13
|
||||
virtual std::size_t GetFootprint() const = 0; // 14
|
||||
virtual std::size_t GetTotalFootprint() const = 0; // 15
|
||||
virtual std::size_t GetUsedSpace() const = 0; // 16
|
||||
virtual std::size_t GetTotalUsedSpace() const = 0; // 17
|
||||
virtual void GetRootStats(RootStats* a_stats) = 0; // 18
|
||||
virtual void VisitMem(Heap::MemVisitor* a_visitor, std::uint32_t a_flags) = 0; // 19
|
||||
virtual void VisitRootSegments(Heap::SegVisitor* a_visitor) = 0; // 1A
|
||||
virtual void VisitHeapSegments(Heap::SegVisitor* a_visitor) const = 0; // 1B
|
||||
virtual void SetTracer(HeapTracer* a_tracer) = 0; // 1C
|
||||
virtual void DestroyItself() = 0; // 1D
|
||||
virtual void UltimateCheck() = 0; // 1E
|
||||
virtual void ReleaseCachedMem() = 0; // 1F
|
||||
virtual bool DumpMemoryLeaks() = 0; // 20
|
||||
virtual void CheckIntegrity() const = 0; // 21
|
||||
virtual void GetUserDebugStats(RootStats* a_stats) const = 0; // 22
|
||||
|
||||
void AssignToCurrentThread() { ownerThreadID = REX::W32::GetCurrentThreadId(); }
|
||||
|
||||
// members
|
||||
std::size_t selfSize; // 18
|
||||
volatile std::uint32_t refCount; // 20
|
||||
std::size_t ownerThreadID; // 28
|
||||
void* autoRelease; // 30
|
||||
HeapInfo info; // 38
|
||||
ChildListType childHeaps; // 88
|
||||
mutable Lock heapLock; // 98
|
||||
bool useLocks; // C0
|
||||
bool trackDebugInfo; // C1
|
||||
};
|
||||
static_assert(sizeof(MemoryHeap) == 0xC8);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/A/AcquireInterface.h"
|
||||
#include "Scaleform/W/Waitable.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class MutexImpl;
|
||||
|
||||
class __declspec(novtable) Mutex :
|
||||
public Waitable, // 00
|
||||
public AcquireInterface // 18
|
||||
{
|
||||
public:
|
||||
// members
|
||||
MutexImpl* impl; // 20
|
||||
};
|
||||
static_assert(sizeof(Mutex) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/M/Memory.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <std::int32_t>
|
||||
class NewOverrideBase
|
||||
{
|
||||
public:
|
||||
SF_HEAP_REDEFINE_NEW(NewOverrideBase)
|
||||
};
|
||||
static_assert(std::is_empty_v<NewOverrideBase<0>>);
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
template <class T>
|
||||
class Ptr
|
||||
{
|
||||
public:
|
||||
using element_type = T;
|
||||
|
||||
// 1
|
||||
constexpr Ptr() noexcept = default;
|
||||
|
||||
// 2
|
||||
constexpr Ptr(std::nullptr_t) noexcept {}
|
||||
|
||||
// 3
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
explicit Ptr(Y* a_rhs) :
|
||||
_ptr(a_rhs)
|
||||
{
|
||||
TryAttach();
|
||||
}
|
||||
|
||||
// 9a
|
||||
Ptr(const Ptr& a_rhs) :
|
||||
_ptr(a_rhs._ptr)
|
||||
{
|
||||
TryAttach();
|
||||
}
|
||||
|
||||
// 9b
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
Ptr(const Ptr<Y>& a_rhs) :
|
||||
_ptr(a_rhs._ptr)
|
||||
{
|
||||
TryAttach();
|
||||
}
|
||||
|
||||
// 10a
|
||||
Ptr(Ptr&& a_rhs) noexcept :
|
||||
_ptr(a_rhs._ptr)
|
||||
{
|
||||
a_rhs._ptr = nullptr;
|
||||
}
|
||||
|
||||
// 10b
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
Ptr(Ptr<Y>&& a_rhs) noexcept :
|
||||
_ptr(a_rhs._ptr)
|
||||
{
|
||||
a_rhs._ptr = nullptr;
|
||||
}
|
||||
|
||||
~Ptr() { TryDetach(); }
|
||||
|
||||
// 1a
|
||||
Ptr& operator=(const Ptr& a_rhs)
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
TryDetach();
|
||||
_ptr = a_rhs._ptr;
|
||||
TryAttach();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// 1b
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
Ptr& operator=(const Ptr<Y>& a_rhs)
|
||||
{
|
||||
TryDetach();
|
||||
_ptr = a_rhs._ptr;
|
||||
TryAttach();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// 2a
|
||||
Ptr& operator=(Ptr&& a_rhs)
|
||||
{
|
||||
if (this != std::addressof(a_rhs)) {
|
||||
TryDetach();
|
||||
_ptr = a_rhs._ptr;
|
||||
a_rhs._ptr = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// 2b
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
Ptr& operator=(Ptr<Y>&& a_rhs)
|
||||
{
|
||||
TryDetach();
|
||||
_ptr = a_rhs._ptr;
|
||||
a_rhs._ptr = nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset() { TryDetach(); }
|
||||
|
||||
template <
|
||||
class Y,
|
||||
std::enable_if_t<
|
||||
std::is_convertible_v<
|
||||
Y*,
|
||||
element_type*>,
|
||||
int> = 0>
|
||||
void reset(Y* a_ptr)
|
||||
{
|
||||
if (_ptr != a_ptr) {
|
||||
TryDetach();
|
||||
_ptr = a_ptr;
|
||||
TryAttach();
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr element_type* get() const noexcept
|
||||
{
|
||||
return _ptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] explicit constexpr operator bool() const noexcept
|
||||
{
|
||||
return static_cast<bool>(_ptr);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr element_type& operator*() const noexcept
|
||||
{
|
||||
assert(static_cast<bool>(*this));
|
||||
return *_ptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr element_type* operator->() const noexcept
|
||||
{
|
||||
assert(static_cast<bool>(*this));
|
||||
return _ptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
template <class>
|
||||
friend class Ptr;
|
||||
|
||||
void TryAttach()
|
||||
{
|
||||
if (_ptr) {
|
||||
_ptr->AddRef();
|
||||
}
|
||||
}
|
||||
|
||||
void TryDetach()
|
||||
{
|
||||
if (_ptr) {
|
||||
_ptr->Release();
|
||||
_ptr = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// members
|
||||
element_type* _ptr{ nullptr }; // 0
|
||||
};
|
||||
static_assert(sizeof(Ptr<void*>) == 0x8);
|
||||
|
||||
template <class T, class... Args>
|
||||
[[nodiscard]] Ptr<T> make_shared(Args&&... a_args)
|
||||
{
|
||||
auto ptr = Ptr<T>{ new T(std::forward<Args>(a_args)...) };
|
||||
if (ptr) {
|
||||
ptr->Release(); // ensure lifetime ends with smart pointer
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
template <class T1, class T2>
|
||||
[[nodiscard]] constexpr bool operator==(const Ptr<T1>& a_lhs, const Ptr<T2>& a_rhs)
|
||||
{
|
||||
return a_lhs.get() == a_rhs.get();
|
||||
}
|
||||
|
||||
template <class T1, class T2>
|
||||
[[nodiscard]] constexpr bool operator!=(const Ptr<T1>& a_lhs, const Ptr<T2>& a_rhs)
|
||||
{
|
||||
return !(a_lhs == a_rhs);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] constexpr bool operator==(const Ptr<T>& a_lhs, std::nullptr_t) noexcept
|
||||
{
|
||||
return !a_lhs;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] constexpr bool operator==(std::nullptr_t, const Ptr<T>& a_rhs) noexcept
|
||||
{
|
||||
return !a_rhs;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] constexpr bool operator!=(const Ptr<T>& a_lhs, std::nullptr_t) noexcept
|
||||
{
|
||||
return static_cast<bool>(a_lhs);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] constexpr bool operator!=(std::nullptr_t, const Ptr<T>& a_rhs) noexcept
|
||||
{
|
||||
return static_cast<bool>(a_rhs);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Ptr(T*) -> Ptr<T>;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/M/Memory.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class RefCountImplCore
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RE::RTTI::Scaleform__RefCountImplCore };
|
||||
static constexpr auto VTABLE{ RE::VTABLE::Scaleform__RefCountImplCore };
|
||||
|
||||
RefCountImplCore() = default;
|
||||
virtual ~RefCountImplCore() = default; // 00
|
||||
|
||||
protected:
|
||||
// members
|
||||
volatile std::int32_t refCount{ 1 }; // 08
|
||||
};
|
||||
static_assert(sizeof(RefCountImplCore) == 0x10);
|
||||
|
||||
class RefCountImpl :
|
||||
public RefCountImplCore // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RE::RTTI::Scaleform__RefCountImpl };
|
||||
static constexpr auto VTABLE{ RE::VTABLE::Scaleform__RefCountImpl };
|
||||
|
||||
virtual ~RefCountImpl() = default; // NOLINT(modernize-use-override) 00
|
||||
|
||||
void AddRef()
|
||||
{
|
||||
REX::TAtomicRef myRefCount{ refCount };
|
||||
++refCount;
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
REX::TAtomicRef myRefCount{ refCount };
|
||||
if (--myRefCount == 0) {
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(RefCountImpl) == 0x10);
|
||||
|
||||
template <class Base, std::int32_t>
|
||||
class RefCountBaseStatImpl :
|
||||
public Base // 00
|
||||
{
|
||||
public:
|
||||
RefCountBaseStatImpl() = default;
|
||||
|
||||
SF_HEAP_REDEFINE_NEW(RefCountBaseStatImpl);
|
||||
};
|
||||
//static_assert(sizeof(RefCountBaseStatImpl<void*, 0>) == 0x10);
|
||||
|
||||
template <class, std::int32_t STAT>
|
||||
class RefCountBase :
|
||||
public RefCountBaseStatImpl<RefCountImpl, STAT> // 00
|
||||
{
|
||||
public:
|
||||
RefCountBase() = default;
|
||||
};
|
||||
//static_assert(sizeof(RefCountBase<void*, 0>) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::Render
|
||||
{
|
||||
class Color
|
||||
{
|
||||
public:
|
||||
class Rgb32
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint8_t blue; // 0
|
||||
std::uint8_t green; // 1
|
||||
std::uint8_t red; // 2
|
||||
std::uint8_t alpha; // 3
|
||||
};
|
||||
static_assert(sizeof(Rgb32) == 0x4);
|
||||
|
||||
// members
|
||||
union
|
||||
{
|
||||
Rgb32 channels;
|
||||
std::uint32_t raw;
|
||||
}; // 0
|
||||
};
|
||||
static_assert(sizeof(Color) == 0x4);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/P/Ptr.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_Entry.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_EntryChange.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_EntryData.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_EntryTable.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_RTHandle.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_RenderNotify.h"
|
||||
#include "Scaleform/T/ThreadId.h"
|
||||
|
||||
namespace Scaleform
|
||||
{
|
||||
class Event;
|
||||
class MemoryHeap;
|
||||
|
||||
namespace Render::ContextImpl
|
||||
{
|
||||
class ContextCaptureNotify;
|
||||
class ContextLock;
|
||||
class Snapshot;
|
||||
|
||||
class Context
|
||||
{
|
||||
public:
|
||||
// members
|
||||
MemoryHeap* heap; // 000
|
||||
ThreadId createThreadID; // 008
|
||||
EntryTable table; // 010
|
||||
Ptr<ContextLock> captureLock; // 070
|
||||
List<ContextCaptureNotify> captureNotifyList; // 078
|
||||
RenderNotify* renderer; // 088
|
||||
bool multiThreadedUse; // 090
|
||||
bool nextCaptureCalledInFrame; // 091
|
||||
volatile bool captureCalled; // 092
|
||||
volatile bool diChangesRequired; // 093
|
||||
volatile bool shutdownRequested; // 094
|
||||
Event* volatile shutdownEvent; // 098
|
||||
RenderNotify::ContextNode renderNode; // 0A0
|
||||
List<RTHandle::HandleData> rtHandleList; // 0B8
|
||||
Snapshot* snapshots[4]; // 0C8
|
||||
std::uint64_t snapshotFrameIDs[4]; // 0E8
|
||||
std::uint64_t finalizedFrameID; // 108
|
||||
};
|
||||
static_assert(sizeof(Context) == 0x110);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/L/List.h"
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class Context;
|
||||
class RenderNotify;
|
||||
|
||||
class __declspec(novtable) ContextCaptureNotify :
|
||||
public ListNode<ContextCaptureNotify> // 00
|
||||
{
|
||||
public:
|
||||
virtual ~ContextCaptureNotify(); // 00
|
||||
|
||||
// add
|
||||
virtual void OnCapture() {} // 01
|
||||
virtual void OnNextCapture([[maybe_unused]] RenderNotify* a_notify) {} // 02
|
||||
virtual void OnShutdown([[maybe_unused]] bool a_waitFlag) {} // 03
|
||||
|
||||
// members
|
||||
Context* ownedContext{ nullptr }; // 18
|
||||
};
|
||||
static_assert(sizeof(ContextCaptureNotify) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::Render
|
||||
{
|
||||
class LinearHeap;
|
||||
|
||||
namespace ContextImpl
|
||||
{
|
||||
class EntryData;
|
||||
|
||||
template <class C, class B>
|
||||
class ContextData_ImplMixin : public B
|
||||
{
|
||||
public:
|
||||
virtual EntryData* ConstructCopy(LinearHeap& heap) const;
|
||||
virtual void CopyTo(void* pdest) const;
|
||||
virtual void Destroy();
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/L/Lock.h"
|
||||
#include "Scaleform/R/RefCountBase.h"
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class Context;
|
||||
|
||||
class __declspec(novtable) ContextLock :
|
||||
public RefCountBase<ContextLock, 69> // 00
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Lock lockObject; // 10
|
||||
Context* context; // 38
|
||||
};
|
||||
static_assert(sizeof(ContextLock) == 0x40);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/Render_ContextImpl_RTHandle.h"
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
template <class C>
|
||||
class DisplayHandle :
|
||||
public RTHandle // 0
|
||||
{
|
||||
public:
|
||||
};
|
||||
//static_assert(sizeof(DisplayHandle<void*>) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/L/List.h"
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class EntryChange;
|
||||
class EntryData;
|
||||
class TreeCacheNode;
|
||||
|
||||
class Entry
|
||||
{
|
||||
public:
|
||||
class PropagateNode :
|
||||
public ListNode<PropagateNode> // 00
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(PropagateNode) == 0x10);
|
||||
|
||||
// members
|
||||
union
|
||||
{
|
||||
Entry* prev;
|
||||
EntryChange* change;
|
||||
}; // 00
|
||||
union
|
||||
{
|
||||
Entry* next;
|
||||
std::size_t refCount;
|
||||
}; // 08
|
||||
EntryData* native; // 10
|
||||
TreeCacheNode* renderer; // 18
|
||||
Entry* parent; // 20
|
||||
PropagateNode node; // 28
|
||||
};
|
||||
static_assert(sizeof(Entry) == 0x38);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class Entry;
|
||||
|
||||
class EntryChange
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Entry* node; // 00
|
||||
union
|
||||
{
|
||||
std::uint32_t changeBits;
|
||||
EntryChange* nextFreeNode;
|
||||
}; // 08
|
||||
};
|
||||
static_assert(sizeof(EntryChange) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::Render
|
||||
{
|
||||
class LinearHeap;
|
||||
|
||||
namespace ContextImpl
|
||||
{
|
||||
class Entry;
|
||||
|
||||
class __declspec(novtable) EntryData
|
||||
{
|
||||
public:
|
||||
enum class EntryType : std::uint16_t
|
||||
{
|
||||
kBase,
|
||||
kRoot,
|
||||
kContainer,
|
||||
kShape,
|
||||
kMesh,
|
||||
kText
|
||||
};
|
||||
|
||||
virtual ~EntryData(); // 00
|
||||
|
||||
// add
|
||||
virtual EntryData* ConstructCopy(LinearHeap& a_heap) const = 0; // 01
|
||||
virtual void CopyTo(void* a_dest) const = 0; // 02
|
||||
virtual void ReleaseNodes() const {} // 03
|
||||
virtual void Destroy() = 0; // 04
|
||||
virtual bool PropagateUp(Entry* a_entry) const; // 05
|
||||
|
||||
// members
|
||||
REX::TEnumSet<EntryType, std::uint16_t> type; // 08
|
||||
std::uint16_t flags; // 0A
|
||||
};
|
||||
static_assert(sizeof(EntryData) == 0x10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class EntryListAccessor
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<EntryListAccessor>);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/R/Render_ContextImpl_Entry.h"
|
||||
#include "Scaleform/R/Render_ContextImpl_EntryPageBase.h"
|
||||
|
||||
namespace Scaleform::Render::ContextImpl
|
||||
{
|
||||
class EntryPage :
|
||||
public EntryPageBase // 000
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Entry entries[72]; // 038
|
||||
};
|
||||
static_assert(sizeof(EntryPage) == 0xFF8);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user