Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,5 @@ FodyWeavers.xsd
### Custom ###
build
src/dll/Version.hpp
out
CMakeSettings.json
2 changes: 1 addition & 1 deletion deps/red4ext.sdk
Submodule red4ext.sdk updated 56 files
+1 −4 .pre-commit-config.yaml
+1 −0 CMakeLists.txt
+1 −1 examples/CMakeLists.txt
+2 −1 include/RED4ext/Api/EMainReason.hpp
+2 −2 include/RED4ext/Api/FileVer.hpp
+1 −3 include/RED4ext/Api/PluginHandle.hpp
+25 −25 include/RED4ext/Api/Runtime.hpp
+21 −16 include/RED4ext/Api/Sdk.hpp
+3 −3 include/RED4ext/Api/SemVer.hpp
+9 −8 include/RED4ext/Api/Version.hpp
+0 −70 include/RED4ext/Api/v0/FileVer.hpp
+0 −44 include/RED4ext/Api/v0/GameState.hpp
+0 −26 include/RED4ext/Api/v0/GameStates.hpp
+0 −49 include/RED4ext/Api/v0/Runtime.hpp
+0 −133 include/RED4ext/Api/v0/SemVer.hpp
+0 −12 include/RED4ext/Api/v0/Version.hpp
+11 −12 include/RED4ext/Api/v1/FileVer-inl.hpp
+66 −0 include/RED4ext/Api/v1/FileVer.hpp
+82 −0 include/RED4ext/Api/v1/GameState.hpp
+27 −0 include/RED4ext/Api/v1/GameStates.hpp
+2 −2 include/RED4ext/Api/v1/Hooking.hpp
+2 −2 include/RED4ext/Api/v1/Logger.hpp
+5 −5 include/RED4ext/Api/v1/PluginInfo.hpp
+49 −0 include/RED4ext/Api/v1/Runtime.hpp
+2 −3 include/RED4ext/Api/v1/Scripts.hpp
+7 −7 include/RED4ext/Api/v1/Sdk.hpp
+22 −20 include/RED4ext/Api/v1/SemVer-inl.hpp
+129 −0 include/RED4ext/Api/v1/SemVer.hpp
+12 −0 include/RED4ext/Api/v1/Version.hpp
+13 −3 include/RED4ext/Dump/Reflection-inl.hpp
+18 −21 include/RED4ext/GameApplication.hpp
+5 −5 include/RED4ext/GameStates.hpp
+8 −4 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/VertexLayoutDesc.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/VertexPacking/EStreamType.hpp
+33 −0 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/VertexPacking/PackingElement.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/VertexPacking/ePackingType.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/VertexPacking/ePackingUsage.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/eIndexBufferChunkType.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/eTextureFormat.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/eTextureGroup.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/GpuWrapApi/eTextureType.hpp
+0 −29 include/RED4ext/Scripting/Natives/Generated/GpuWrapApiVertexPackingPackingElement.hpp
+3 −3 include/RED4ext/Scripting/Natives/Generated/PSODescRenderTargetSetup.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/STextureGroupSetup.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/PhotoModeSystem.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/data/Vehicle_Record.hpp
+3 −2 include/RED4ext/Scripting/Natives/Generated/game/ui/ChangeCameraControlHintVisibilityEvent.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/GameScreenshotCallback.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/rend/IndexBufferChunk.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/rend/RenderTextureBlobTextureInfo.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/rend/VertexBufferChunk.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleCustomization.hpp
+32 −29 include/RED4ext/Scripting/Natives/Generated/world/BenchmarkSummary.hpp
+1 −1 src/Api/v1/FileVer.cpp
+1 −1 src/Api/v1/SemVer.cpp
+9 −9 src/Scripting/Natives.cpp
1 change: 0 additions & 1 deletion src/dll/Addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ void Addresses::LoadAddresses(const std::filesystem::path& aPath)
m_addresses.emplace(static_cast<std::uint32_t>(hash), address);
}
}


spdlog::info("{} game addresses loaded", m_addresses.size());
}
Expand Down
4 changes: 2 additions & 2 deletions src/dll/Addresses.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "Paths.hpp"

#include <cstdint>
#include <filesystem>
#include <unordered_map>

#include "Paths.hpp"

class Addresses
{
public:
Expand Down
9 changes: 4 additions & 5 deletions src/dll/App.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "App.hpp"
#include "Addresses.hpp"
#include "DetourTransaction.hpp"
#include "Image.hpp"
#include "Utils.hpp"
#include "Version.hpp"

#include "DetourTransaction.hpp"
#include "Hooks/AssertionFailed.hpp"
#include "Hooks/CGameApplication.hpp"
#include "Hooks/CollectSaveableSystems.hpp"
Expand All @@ -14,6 +10,9 @@
#include "Hooks/Main_Hooks.hpp"
#include "Hooks/ValidateScripts.hpp"
#include "Hooks/gsmState_SessionActive.hpp"
#include "Image.hpp"
#include "Utils.hpp"
#include "Version.hpp"

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion src/dll/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class App
bool AttachHooks() const;

template<typename T, typename... Args, typename = std::enable_if_t<std::is_base_of_v<ISystem, T>>>
inline void AddSystem(Args&&... args)
void AddSystem(Args&&... args)
{
m_systems.push_back(std::make_unique<T>(std::forward<Args>(args)...));
std::sort(m_systems.begin(), m_systems.end(),
Expand Down
2 changes: 1 addition & 1 deletion src/dll/Config.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "stdafx.hpp"
#include "Config.hpp"

#include "Utils.hpp"

#define DEFAULT_TOML_EXCEPTION_MSG L"An exception occured while parsing the config file:\n\n{}\n\nFile: {}"
Expand Down
3 changes: 3 additions & 0 deletions src/dll/Detail/AddressHashes.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once

#include <cstdint>

namespace Hashes
Expand All @@ -9,6 +10,8 @@ constexpr std::uint32_t CBaseEngine_InitScripts = 2875532677UL;
constexpr std::uint32_t CBaseEngine_LoadScripts = 3570081113UL;

constexpr std::uint32_t CGameApplication_AddState = 4223801011UL;
constexpr std::uint32_t CGameApplication_ChangeState = 2242385233UL;
constexpr std::uint32_t CGameApplication_DoState = 804916828UL;

constexpr std::uint32_t GameInstance_CollectSaveableSystems = 3230163856ul;
constexpr std::uint32_t Global_ExecuteProcess = 2203918127UL;
Expand Down
1 change: 1 addition & 0 deletions src/dll/DetourTransaction.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DetourTransaction.hpp"

#include "Utils.hpp"

DetourTransaction::DetourTransaction(const std::source_location aSource)
Expand Down
4 changes: 2 additions & 2 deletions src/dll/DetourTransaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class DetourTransaction
{
public:
DetourTransaction(const std::source_location aSource = std::source_location::current());
DetourTransaction(std::source_location aSource = std::source_location::current());
~DetourTransaction();

DetourTransaction(DetourTransaction&) = delete;
Expand All @@ -27,7 +27,7 @@ class DetourTransaction
Failed
};

void SetState(const State aState);
void SetState(State aState);
void QueueThreadsForUpdate();

const std::source_location m_source;
Expand Down
1 change: 1 addition & 0 deletions src/dll/DevConsole.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DevConsole.hpp"

#include "Utils.hpp"

DevConsole::DevConsole(const Config::DevConfig& aConfig)
Expand Down
180 changes: 0 additions & 180 deletions src/dll/GameStateHook.hpp

This file was deleted.

4 changes: 1 addition & 3 deletions src/dll/Hooks/AssertionFailed.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include "AssertionFailed.hpp"
#include "Addresses.hpp"
#include "App.hpp"

#include "Detail/AddressHashes.hpp"
#include "Hook.hpp"
#include "stdafx.hpp"

namespace
{
Expand Down
Loading