Port 2V0-f window input and UI render command bridge

This commit is contained in:
shen
2026-09-22 20:34:45 -07:00
parent 9c30f06083
commit 5590714b16
22 changed files with 693 additions and 182 deletions
@@ -4,16 +4,17 @@
#include "EterLib/GrpExpandedImageInstance.h"
#include "../PlatformStub.h"
#include "EterBase/CRC32.h"
auto CGraphicExpandedImageInstance::Type() -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
static DWORD type = GetCRC32("CGraphicExpandedImageInstance", sizeof("CGraphicExpandedImageInstance") - 1);
return type;
}
CGraphicExpandedImageInstance::CGraphicExpandedImageInstance()
{
MT_PLATFORM_STUB();
Initialize();
}
CGraphicExpandedImageInstance::~CGraphicExpandedImageInstance()
@@ -23,63 +24,69 @@ CGraphicExpandedImageInstance::~CGraphicExpandedImageInstance()
auto CGraphicExpandedImageInstance::Destroy() -> void
{
MT_PLATFORM_STUB();
CGraphicImageInstance::Destroy();
Initialize();
}
auto CGraphicExpandedImageInstance::SetDepth(float) -> void
auto CGraphicExpandedImageInstance::SetDepth(float depth) -> void
{
MT_PLATFORM_STUB();
m_fDepth = depth;
}
auto CGraphicExpandedImageInstance::SetOrigin() -> void
{
MT_PLATFORM_STUB();
m_v2Origin = D3DXVECTOR2(GetWidth() * 0.5f, GetHeight() * 0.5f);
}
auto CGraphicExpandedImageInstance::SetOrigin(float, float) -> void
auto CGraphicExpandedImageInstance::SetOrigin(float x, float y) -> void
{
MT_PLATFORM_STUB();
m_v2Origin = D3DXVECTOR2(x, y);
}
auto CGraphicExpandedImageInstance::SetRotation(float) -> void
auto CGraphicExpandedImageInstance::SetRotation(float rotation) -> void
{
MT_PLATFORM_STUB();
m_fRotation = rotation;
}
auto CGraphicExpandedImageInstance::SetScale(float, float) -> void
auto CGraphicExpandedImageInstance::SetScale(float x, float y) -> void
{
MT_PLATFORM_STUB();
m_v2Scale = D3DXVECTOR2(x, y);
}
auto CGraphicExpandedImageInstance::SetRenderingRect(float, float, float, float) -> void
auto CGraphicExpandedImageInstance::SetRenderingRect(float left, float top, float right, float bottom) -> void
{
MT_PLATFORM_STUB();
m_RenderingRect = {static_cast<LONG>(left), static_cast<LONG>(top),
static_cast<LONG>(right), static_cast<LONG>(bottom)};
}
auto CGraphicExpandedImageInstance::SetRenderingMode(int) -> void
auto CGraphicExpandedImageInstance::SetRenderingMode(int mode) -> void
{
MT_PLATFORM_STUB();
m_iRenderingMode = mode;
}
auto CGraphicExpandedImageInstance::Initialize() -> void
{
MT_PLATFORM_STUB();
m_fDepth = 0;
m_v2Origin = D3DXVECTOR2(0, 0);
m_v2Scale = D3DXVECTOR2(1, 1);
m_fRotation = 0;
m_RenderingRect = {0, 0, 0, 0};
m_iRenderingMode = RENDERING_MODE_NORMAL;
}
auto CGraphicExpandedImageInstance::OnRender() -> void
{
MT_PLATFORM_STUB();
CGraphicImageInstance::OnRender();
}
auto CGraphicExpandedImageInstance::OnSetImagePointer() -> void
{
MT_PLATFORM_STUB();
if (!IsEmpty()) SetOrigin();
}
auto CGraphicExpandedImageInstance::OnIsType(DWORD) -> BOOL
auto CGraphicExpandedImageInstance::OnIsType(DWORD type) -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
return type == Type() || CGraphicImageInstance::OnIsType(type);
}
auto CGraphicExpandedImageInstance::CreateSystem(UINT) -> void
@@ -94,13 +101,14 @@ auto CGraphicExpandedImageInstance::DestroySystem() -> void
auto CGraphicExpandedImageInstance::New() -> CGraphicExpandedImageInstance *
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<CGraphicExpandedImageInstance *>();
return new CGraphicExpandedImageInstance();
}
auto CGraphicExpandedImageInstance::Delete(CGraphicExpandedImageInstance *) -> void
auto CGraphicExpandedImageInstance::Delete(CGraphicExpandedImageInstance *instance) -> void
{
MT_PLATFORM_STUB();
if (!instance) return;
instance->Destroy();
delete instance;
}
decltype(CGraphicExpandedImageInstance::ms_kPool) CGraphicExpandedImageInstance::ms_kPool{};