mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
api: move Vertex struct
This commit is contained in:
parent
0db4b0cee6
commit
076d165154
3 changed files with 19 additions and 17 deletions
|
|
@ -19,12 +19,3 @@
|
|||
GuestToHostFunction<returnType>(*(be<uint32_t>*)(g_memory.Translate(*(be<uint32_t>*)(this) + (4 * virtualIndex))), __VA_ARGS__)
|
||||
|
||||
struct swa_null_ctor {};
|
||||
|
||||
struct Vertex
|
||||
{
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
be<float> Z;
|
||||
be<float> U;
|
||||
be<float> V;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,15 +11,24 @@ namespace SWA::Sequence::Utility
|
|||
class CRender : public Hedgehog::Mirage::CRenderable
|
||||
{
|
||||
public:
|
||||
struct SVertexData
|
||||
{
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
be<float> Z;
|
||||
be<float> U;
|
||||
be<float> V;
|
||||
};
|
||||
|
||||
be<uint32_t> m_ScreenWidth;
|
||||
be<uint32_t> m_ScreenHeight;
|
||||
be<float> m_MovieWidth;
|
||||
be<float> m_MovieHeight;
|
||||
SWA_INSERT_PADDING(0x74);
|
||||
Vertex m_TopLeft;
|
||||
Vertex m_TopRight;
|
||||
Vertex m_BottomRight;
|
||||
Vertex m_BottomLeft;
|
||||
SVertexData m_TopLeft;
|
||||
SVertexData m_TopRight;
|
||||
SVertexData m_BottomRight;
|
||||
SVertexData m_BottomLeft;
|
||||
bool m_MaintainAspectRatio;
|
||||
SWA_INSERT_PADDING(0x18);
|
||||
be<float> m_TimeElapsed;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include <api/SWA.h>
|
||||
#include <ui/game_window.h>
|
||||
|
||||
using SVertexData = SWA::Sequence::Utility::CPlayMovieWrapper::CRender::SVertexData;
|
||||
|
||||
// Update movie player aspect ratio.
|
||||
PPC_FUNC_IMPL(__imp__sub_82AE30D8);
|
||||
PPC_FUNC(sub_82AE30D8)
|
||||
|
|
@ -11,10 +13,10 @@ PPC_FUNC(sub_82AE30D8)
|
|||
auto movieAspectRatio = movieWidth / movieHeight;
|
||||
auto windowAspectRatio = (float)GameWindow::s_width / (float)GameWindow::s_height;
|
||||
|
||||
auto pTopLeft = (Vertex*)g_memory.Translate(ctx.r4.u32 + 0x6C);
|
||||
auto pTopRight = (Vertex*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(Vertex));
|
||||
auto pBottomRight = (Vertex*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(Vertex) * 2);
|
||||
auto pBottomLeft = (Vertex*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(Vertex) * 3);
|
||||
auto pTopLeft = (SVertexData*)g_memory.Translate(ctx.r4.u32 + 0x6C);
|
||||
auto pTopRight = (SVertexData*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(SVertexData));
|
||||
auto pBottomRight = (SVertexData*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(SVertexData) * 2);
|
||||
auto pBottomLeft = (SVertexData*)g_memory.Translate(ctx.r4.u32 + 0x6C + sizeof(SVertexData) * 3);
|
||||
|
||||
auto a = -1.00078f;
|
||||
auto b = 1.00139f;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue