Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Jul 24, 2024
1 parent 003b26c commit 0801c7a
Show file tree
Hide file tree
Showing 25 changed files with 627 additions and 656 deletions.
2 changes: 1 addition & 1 deletion include/RE/B/BSResourceEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ namespace RE::BSResource
std::uint64_t fileSize; // 10
};
static_assert(sizeof(Info) == 0x18);
}
}
2 changes: 2 additions & 0 deletions include/RE/B/BSStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace RE
kError = 1,
kNotImplemented = 2,
};

enum class SeekMode;

struct StreamBuffer
{
void Reset()
Expand Down
1 change: 0 additions & 1 deletion include/RE/B/BSTimer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#pragma once

namespace RE
Expand Down
2 changes: 1 addition & 1 deletion include/RE/C/CompiledScriptLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace RE
namespace Internal
{
class ReadableStringTable;

}

namespace UnlinkedTypes
{
struct Object; // stub
Expand Down
5 changes: 3 additions & 2 deletions include/RE/G/GameVM.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,26 @@

namespace RE
{

struct InputEnableLayerDestroyedEvent;
struct PositionPlayerEvent;
struct TESFormDeleteEvent;
struct TESFormIDRemapEvent;
struct TESInitScriptEvent;
struct TESResolveNPCTemplatesEvent;
struct TESUniqueIDChangeEvent;

namespace ModelReferenceEffectEvents
{
struct ReferenceEffectFinished;
}

namespace BSScript
{
struct StatsEvent;
class IVMSaveLoadInterface;
class IVMDebugInterface;
}

namespace GameScript
{
struct StatsEvent;
Expand Down Expand Up @@ -215,5 +217,4 @@ namespace RE
std::uint32_t overflowFlags; // 8968
};
static_assert(sizeof(GameVM) == 0x8970);

}
5 changes: 3 additions & 2 deletions include/RE/H/HandleReaderWriter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "RE/I/IHandleReaderWriter.h"
#include "RE/I/IObjectHandlePolicy.h"
#include "RE/T/TESFile.h"
Expand Down Expand Up @@ -62,5 +64,4 @@ namespace RE::GameScript
TESFile* file; //10
};
static_assert(sizeof(DataFileHandleReaderWriter) == 0x18);

}
}
2 changes: 2 additions & 0 deletions include/RE/I/IStore.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#include "RE/B/BSFixedString.h"
#include "RE/B/BSStorage.h"
#include "RE/B/BSTSmartPointer.h"

namespace RE
{
namespace BSScript
Expand Down
1 change: 0 additions & 1 deletion include/RE/I/idTCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ namespace RE
std::uintptr_t socket; // 18
};
static_assert(sizeof(idTCP) == 0x20);

}
1 change: 0 additions & 1 deletion include/RE/M/MemoryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace RE
{

class ScrapHeap;
struct HeapStats;
struct MemoryStats;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/P/PlayerCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace RE
class MenuModeChangeEvent;
class MenuOpenCloseEvent;
class OtherEventEnabledEvent;
struct TESFormDeleteEvent;
class TESHitEvent;
class UserEventEnabledEvent;

Expand All @@ -18,6 +17,7 @@ namespace RE
struct PickRefUpdateEvent;
struct PositionPlayerEvent;
struct TargetHitEvent;
struct TESFormDeleteEvent;

struct QuestStatus
{
Expand Down
2 changes: 1 addition & 1 deletion include/RE/P/Profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ namespace RE
};
static_assert(sizeof(Profiler) == 0x130);
}
}
}
68 changes: 31 additions & 37 deletions include/RE/R/ReadableStringTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,40 @@
#include "RE/B/BSTArray.h"
#include "RE/B/BSTObjectArena.h"

namespace RE
namespace RE::BSScript::Internal
{
namespace BSScript
enum class StringIndexSize
{
namespace Internal
{
enum class StringIndexSize
{
kSmall,
kLarge
};
kSmall,
kLarge
};

class ReadableStringTable
{
public:
class StringEntry
{
public:
// members
const char* originalData; // 00
BSFixedString convertedString; // 08
};
static_assert(sizeof(StringEntry) == 0x10);
class ReadableStringTable
{
public:
class StringEntry
{
public:
// members
const char* originalData; // 00
BSFixedString convertedString; // 08
};
static_assert(sizeof(StringEntry) == 0x10);

class StringTableScrapPage
{
public:
// members
char buffer[0x1000]; // 0000
char* curr; // 1000
const char* const end; // 1008
};
static_assert(sizeof(StringTableScrapPage) == 0x1010);
class StringTableScrapPage
{
public:
// members
char buffer[0x1000]; // 0000
char* curr; // 1000
const char* const end; // 1008
};
static_assert(sizeof(StringTableScrapPage) == 0x1010);

// members
msvc::unique_ptr<BSTObjectArena<StringTableScrapPage, BSTObjectArenaScrapAlloc, 1>> scrapPages; // 00
msvc::unique_ptr<BSScrapArray<StringEntry>> entries; // 08
stl::enumeration<StringIndexSize, std::int32_t> indexSize; // 10
};
static_assert(sizeof(ReadableStringTable) == 0x18);
}
}
// members
msvc::unique_ptr<BSTObjectArena<StringTableScrapPage, BSTObjectArenaScrapAlloc, 1>> scrapPages; // 00
msvc::unique_ptr<BSScrapArray<StringEntry>> entries; // 08
stl::enumeration<StringIndexSize, std::int32_t> indexSize; // 10
};
static_assert(sizeof(ReadableStringTable) == 0x18);
}
36 changes: 15 additions & 21 deletions include/RE/R/ReadableTypeTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@
#include "RE/B/BSFixedString.h"
#include "RE/B/BSTSmartPointer.h"

namespace RE
namespace RE::BSScript::Internal
{
namespace BSScript
class ReadableTypeTable
{
namespace Internal
public:
struct SaveTypeInfo :
public BSIntrusiveRefCounted // 00
{
class ReadableTypeTable
{
public:
struct SaveTypeInfo :
public BSIntrusiveRefCounted // 00
{
public:
// members
BSFixedString parentType; // 08
BSScrapArray<std::uint32_t> variableIndicies; // 10
};
static_assert(sizeof(SaveTypeInfo) == 0x28);
public:
// members
BSFixedString parentType; // 08
BSScrapArray<std::uint32_t> variableIndicies; // 10
};
static_assert(sizeof(SaveTypeInfo) == 0x28);

// members
/*BSTScrapHashMap<BSFixedString, BSTSmartPointer<SaveTypeInfo>>* */ void* saveTypeInfo; // 00
};
static_assert(sizeof(ReadableTypeTable) == 0x08);
}
}
// members
/*BSTScrapHashMap<BSFixedString, BSTSmartPointer<SaveTypeInfo>>* */ void* saveTypeInfo; // 00
};
static_assert(sizeof(ReadableTypeTable) == 0x08);
}
4 changes: 2 additions & 2 deletions include/RE/R/RemoteDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include "RE/D/DebuggerMessages.h"
#include "RE/I/IRemoteDebugger.h"
#include "RE/I/idTCP.h"

namespace RE::GameScript
{

class RemoteDebugger : BSScript::IRemoteDebugger
{
public:
Expand Down Expand Up @@ -97,4 +97,4 @@ namespace RE::GameScript
BSNonReentrantSpinLock logLock; // D0
};
static_assert(sizeof(RemoteDebugger) == 0xD8);
}
}
53 changes: 25 additions & 28 deletions include/RE/S/SimpleAllocMemoryPagePolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,33 @@
#include "RE/B/BSTTuple.h"
#include "RE/I/IMemoryPagePolicy.h"

namespace RE
namespace RE::BSScript
{
namespace BSScript
{
class MemoryPage; // stub
class MemoryPage; // stub

class SimpleAllocMemoryPagePolicy :
public IMemoryPagePolicy
{
public:
SF_RTTI_VTABLE(BSScript__SimpleAllocMemoryPagePolicy);
class SimpleAllocMemoryPagePolicy :
public IMemoryPagePolicy
{
public:
SF_RTTI_VTABLE(BSScript__SimpleAllocMemoryPagePolicy);

// override (IMemoryPagePolicy)
std::uint32_t MaximumPageSize() const override { return maxPageSize; } // 01
std::uint32_t MaximumStackDepth() const override { return maxStackDepth; } // 02
AllocationStatus AllocatePage(std::uint32_t a_sizeInBytes, NewPageStrategy a_strategy, BSTAutoPointer<MemoryPage>& a_newPage) override; // 03
AllocationStatus GetLargestAvailablePage(BSTAutoPointer<MemoryPage>& a_newPage) override; // 04
void DisposePage(BSTAutoPointer<MemoryPage>& a_oldPage) override; // 05
// override (IMemoryPagePolicy)
std::uint32_t MaximumPageSize() const override { return maxPageSize; } // 01
std::uint32_t MaximumStackDepth() const override { return maxStackDepth; } // 02
AllocationStatus AllocatePage(std::uint32_t a_sizeInBytes, NewPageStrategy a_strategy, BSTAutoPointer<MemoryPage>& a_newPage) override; // 03
AllocationStatus GetLargestAvailablePage(BSTAutoPointer<MemoryPage>& a_newPage) override; // 04
void DisposePage(BSTAutoPointer<MemoryPage>& a_oldPage) override; // 05

// members
const std::uint32_t minPageSize{ 0x40 }; // 08
const std::uint32_t maxPageSize{ 0x2000 }; // 0C
const std::uint32_t maxAllocatedMemory{ 0x100000 }; // 10
const std::uint32_t maxStackDepth{ 500 }; // 14
bool ignoreMemoryLimit{ false }; // 18
bool outOfMemory{ false }; // 19
BSSpinLock dataLock; // 1C
std::uint32_t currentMemorySize{ 0 }; // 24
std::uint32_t maxAdditionalAllocations{ 0 }; // 28
};
static_assert(sizeof(SimpleAllocMemoryPagePolicy) == 0x30);
}
// members
const std::uint32_t minPageSize{ 0x40 }; // 08
const std::uint32_t maxPageSize{ 0x2000 }; // 0C
const std::uint32_t maxAllocatedMemory{ 0x100000 }; // 10
const std::uint32_t maxStackDepth{ 500 }; // 14
bool ignoreMemoryLimit{ false }; // 18
bool outOfMemory{ false }; // 19
BSSpinLock dataLock; // 1C
std::uint32_t currentMemorySize{ 0 }; // 24
std::uint32_t maxAdditionalAllocations{ 0 }; // 28
};
static_assert(sizeof(SimpleAllocMemoryPagePolicy) == 0x30);
}
45 changes: 21 additions & 24 deletions include/RE/S/Store.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,30 @@
#include "RE/B/BSTSmartPointer.h"
#include "RE/I/IStore.h"
#include "RE/S/Stream.h"
namespace RE

namespace RE::GameScript
{
namespace GameScript
class Store : public BSScript::IStore
{
public:
SF_RTTI_VTABLE(GameScript__Store);

class Store : public BSScript::IStore
{
public:
SF_RTTI_VTABLE(GameScript__Store);

virtual ~Store() override; // 00
virtual ~Store() override; // 00

// override (BSScript::IStore)
virtual bool Open(const char* a_fileName) override; // 06
virtual bool Close() override; // 07
virtual const BSFixedString& StoreName() const override; // 08
virtual bool GetIsOpen() const override; // 09
virtual bool GetIsGood() const override; // 0A
virtual bool GetIsEOS() const override; // 0B
// override (BSScript::IStore)
virtual bool Open(const char* a_fileName) override; // 06
virtual bool Close() override; // 07
virtual const BSFixedString& StoreName() const override; // 08
virtual bool GetIsOpen() const override; // 09
virtual bool GetIsGood() const override; // 0A
virtual bool GetIsEOS() const override; // 0B

// members
size_t streamPos; // 20
BSTSmartPointer<BSResource::Stream> stream; // 28
BSFixedString relPath; // 30
bool hasOpenFile; // 38
bool fileIsGood; // 39
};
static_assert(sizeof(Store) == 0x40);
}
// members
size_t streamPos; // 20
BSTSmartPointer<BSResource::Stream> stream; // 28
BSFixedString relPath; // 30
bool hasOpenFile; // 38
bool fileIsGood; // 39
};
static_assert(sizeof(Store) == 0x40);
}
2 changes: 1 addition & 1 deletion include/RE/S/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ namespace RE
};
static_assert(sizeof(Stream) == 0x10);
}
}
}
Loading

0 comments on commit 0801c7a

Please sign in to comment.