Skip to content

Commit

Permalink
Renderer: Update some structures for DMC5/TDB67
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jun 4, 2024
1 parent ea1a083 commit 1d3d01d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions shared/sdk/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,7 @@ RECamera* layer::Scene::get_main_camera_if_possible() const {
static const std::vector<std::wstring> camera_names = {
L"MainCamera",
L"Main Camera",
L"GameCamera", // DMC5
L"ess_DefaultCamera",
L"ess_DefaultCamera_01",
L"WTMainCamera",
Expand Down
7 changes: 2 additions & 5 deletions shared/sdk/Renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Texture : public RenderResource {
#elif TDB_VER == 69
static constexpr inline auto s_d3d12_resource_offset = 0x98;
#else
// TODO? might not be right offset
// TODO? might not be right offset (verified in DMC5)
static constexpr inline auto s_d3d12_resource_offset = 0x98;
#endif
};
Expand Down Expand Up @@ -182,9 +182,6 @@ class TargetState : public RenderResource {

public:
struct Desc {
#if TDB_VER <= 67
void* _unk_pad;
#endif
sdk::intrusive_ptr<RenderTargetView>* rtvs;
sdk::intrusive_ptr<DepthStencilView> dsv;
uint32_t num_rtv;
Expand Down Expand Up @@ -418,7 +415,7 @@ class PrepareOutput : public sdk::renderer::RenderLayer {
#elif TDB_VER >= 69
static constexpr inline auto s_output_state_offset = 0xF8;
#else
static constexpr inline auto s_output_state_offset = 0xF8; // TODO! VERIFY!
static constexpr inline auto s_output_state_offset = 0xE0; // Verified for DMC5
#endif
};

Expand Down
2 changes: 1 addition & 1 deletion shared/sdk/renderer/RenderResource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RenderResource {
int32_t m_ref_count;
uint32_t m_render_frame;

#if defined(SF6) || TDB_VER >= 73
#if defined(SF6) || TDB_VER >= 73 || TDB_VER <= 67
void* _tdb73_padding; // something added here in Dec 1 2023 update
#endif
};
Expand Down

0 comments on commit 1d3d01d

Please sign in to comment.