Files
metin2-client/extension/src/platform/EterLib/GrpTexture.cpp
T
shenleiandClaude Opus 5.5 5bfa13c5cc 2V2-e.1: 3D draw-command channel — recording D3D8 device, StateManager, GrpBase, camera
EterLib/StateManager.cpp and GrpBase.cpp ported verbatim. CGraphicDevice::Create builds a platform
IDirect3DDevice8 that keeps the device state and records every Draw* call as a Render3DDraw
(vertices decoded by FVF, strips/fans expanded, textures, world/view/proj, blend/depth/light state).
The 40250 camera (__UpdateCamera, SetCenterPosition, ...) and the Process order
(__UpdateCamera -> OnCameraUpdate -> OnUIUpdate -> Begin/SetInterfaceRenderState/OnUIRender/End)
are in place; CScreen Begin/End, CPythonGraphic render states and CCullingManager::Process matrix
updates are verbatim. port.login_flow asserts a textured, lit character draw under the RH
perspective with every vertex on screen; offline and live pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 20:15:54 +09:00

65 lines
1.2 KiB
C++

// Platform skeleton for EterLib/GrpTexture.h (40250 EterLib/GrpTexture.cpp), generated by platform_stub.py.
// Every MT_PLATFORM_STUB() body is unimplemented: replace it with the platform implementation.
#include "EterLib/StdAfx.h"
#include "EterLib/GrpTexture.h"
#include "../PlatformStub.h"
#include "UIRenderCommands.h"
auto CGraphicTexture::IsEmpty() const -> bool
{
return m_bEmpty;
}
auto CGraphicTexture::GetWidth() const -> int
{
return m_width;
}
auto CGraphicTexture::GetHeight() const -> int
{
return m_height;
}
auto CGraphicTexture::SetTextureStage(int) const -> void
{
MT_PLATFORM_STUB();
}
auto CGraphicTexture::GetD3DTexture() const -> LPDIRECT3DTEXTURE8
{
return m_lpd3dTexture;
}
// PORT: safe_release(m_lpd3dTexture); the platform textures are memory textures and file-texture handles.
auto CGraphicTexture::DestroyDeviceObjects() -> void
{
if (m_lpd3dTexture)
UIRenderReleaseMemoryTexture(m_lpd3dTexture);
m_lpd3dTexture = NULL;
}
CGraphicTexture::CGraphicTexture()
{
Initialize();
}
CGraphicTexture::~CGraphicTexture()
{
}
auto CGraphicTexture::Destroy() -> void
{
DestroyDeviceObjects();
Initialize();
}
auto CGraphicTexture::Initialize() -> void
{
m_lpd3dTexture = NULL;
m_width = 0;
m_height = 0;
m_bEmpty = true;
}