Decomp adjustments

This commit is contained in:
Christian Semmler 2023-12-06 07:31:07 -05:00
parent 99d214c8df
commit 9ed4422edc
9 changed files with 99 additions and 102 deletions

View File

@ -5,16 +5,16 @@ using namespace TglImpl;
DECOMP_SIZE_ASSERT(Camera, 0x4);
DECOMP_SIZE_ASSERT(CameraImpl, 0x8);
// OFFSET: LEGO1 0x100a2560 TEMPLATE
// SYNTHETIC: LEGO1 0x100a2560
// TglImpl::CameraImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a36f0
// FUNCTION: LEGO1 0x100a36f0
void* CameraImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a3700
// FUNCTION: LEGO1 0x100a3700
Result CameraImpl::SetTransformation(const FloatMatrix4& matrix)
{
D3DRMMATRIX4D helper;
@ -30,4 +30,4 @@ Result CameraImpl::SetTransformation(const FloatMatrix4& matrix)
result2 = ResultVal(m_data->GetPosition(0, &position));
return result;
}
}

View File

@ -4,34 +4,34 @@
using namespace TglImpl;
// OFFSET: LEGO1 0x100a22c0 TEMPLATE
// SYNTHETIC: LEGO1 0x100a22c0
// TglImpl::DeviceImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a2bf0
// FUNCTION: LEGO1 0x100a2bf0
void* DeviceImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a2c00
// FUNCTION: LEGO1 0x100a2c00
unsigned long DeviceImpl::GetWidth()
{
return m_data->GetWidth();
}
// OFFSET: LEGO1 0x100a2c10
// FUNCTION: LEGO1 0x100a2c10
unsigned long DeviceImpl::GetHeight()
{
return m_data->GetHeight();
}
// OFFSET: LEGO1 0x100a2c20
// FUNCTION: LEGO1 0x100a2c20
Result DeviceImpl::SetColorModel(ColorModel)
{
return Success;
}
// OFFSET: LEGO1 0x100a2c30
// FUNCTION: LEGO1 0x100a2c30
Result DeviceImpl::SetShadingModel(ShadingModel model)
{
// Doesn't match well even though we know this is exactly
@ -40,20 +40,20 @@ Result DeviceImpl::SetShadingModel(ShadingModel model)
return ResultVal(m_data->SetQuality(renderQuality));
}
// OFFSET: LEGO1 0x100a2ca0
// FUNCTION: LEGO1 0x100a2ca0
Result DeviceImpl::SetShadeCount(unsigned long shadeCount)
{
return ResultVal(m_data->SetShades(shadeCount));
}
// OFFSET: LEGO1 0x100a2cc0
// FUNCTION: LEGO1 0x100a2cc0
Result DeviceImpl::SetDither(int dither)
{
return ResultVal(m_data->SetDither(dither));
}
// Probably wrong, not sure what's going on in this method.
// OFFSET: LEGO1 0x100a2ce0
// FUNCTION: LEGO1 0x100a2ce0
void DeviceImpl::InitFromD3DDevice(Device*)
{
// Device argument is intentionally unused.
@ -67,7 +67,7 @@ void DeviceImpl::InitFromD3DDevice(Device*)
// Really don't know what's going on here. Seems it will call down to Init
// but the decomp suggests it otherwise looks the same as InitFromD3D but Init
// takes widly different parameters.
// OFFSET: LEGO1 0x100a2d20
// FUNCTION: LEGO1 0x100a2d20
void DeviceImpl::InitFromWindowsDevice(Device*)
{
// Device argument is intentionally unused.
@ -78,7 +78,7 @@ void DeviceImpl::InitFromWindowsDevice(Device*)
}
}
// OFFSET: LEGO1 0x100a2d60
// FUNCTION: LEGO1 0x100a2d60
Result DeviceImpl::Update()
{
return ResultVal(m_data->Update());

View File

@ -2,16 +2,16 @@
using namespace TglImpl;
// OFFSET: LEGO1 0x100a2480 TEMPLATE
// SYNTHETIC: LEGO1 0x100a2480
// TglImpl::GroupImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a31d0
// FUNCTION: LEGO1 0x100a31d0
void* GroupImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a31e0
// FUNCTION: LEGO1 0x100a31e0
Result GroupImpl::SetTransformation(const FloatMatrix4& matrix)
{
D3DRMMATRIX4D helper;
@ -19,7 +19,7 @@ Result GroupImpl::SetTransformation(const FloatMatrix4& matrix)
return ResultVal(m_data->AddTransform(D3DRMCOMBINE_REPLACE, *d3dMatrix));
}
// OFFSET: LEGO1 0x100a3240
// FUNCTION: LEGO1 0x100a3240
Result GroupImpl::SetColor(float r, float g, float b, float a)
{
// The first instruction makes no sense here:
@ -36,14 +36,14 @@ Result GroupImpl::SetColor(float r, float g, float b, float a)
}
}
// OFFSET: LEGO1 0x100a32b0
// FUNCTION: LEGO1 0x100a32b0
Result GroupImpl::SetTexture(const Texture* pTexture)
{
IDirect3DRMTexture* pD3DTexture = pTexture ? static_cast<const TextureImpl*>(pTexture)->ImplementationData() : NULL;
return ResultVal(m_data->SetTexture(pD3DTexture));
}
// OFFSET: LEGO1 0x100a32e0
// FUNCTION: LEGO1 0x100a32e0
Result GroupImpl::GetTexture(Texture*& pTexture)
{
IDirect3DRMTexture* pD3DTexture;
@ -63,12 +63,11 @@ Result GroupImpl::GetTexture(Texture*& pTexture)
return Success;
}
// OFFSET: LEGO1 0x100a33c0
// FUNCTION: LEGO1 0x100a33c0
Result GroupImpl::SetMaterialMode(MaterialMode mode)
{
D3DRMMATERIALMODE d3dMode;
switch (mode)
{
switch (mode) {
case FromParent:
d3dMode = D3DRMMATERIAL_FROMPARENT;
break;
@ -82,41 +81,41 @@ Result GroupImpl::SetMaterialMode(MaterialMode mode)
return ResultVal(m_data->SetMaterialMode(d3dMode));
}
// OFFSET: LEGO1 0x100a3410
// FUNCTION: LEGO1 0x100a3410
Result GroupImpl::Add(const Mesh* pMesh)
{
const MeshImpl* pMeshImpl = static_cast<const MeshImpl*>(pMesh);
return ResultVal(m_data->AddVisual(pMeshImpl->ImplementationData()->groupMesh));
}
// OFFSET: LEGO1 0x100a3430
// FUNCTION: LEGO1 0x100a3430
Result GroupImpl::Add(const Group* pGroup)
{
const GroupImpl* pGroupImpl = static_cast<const GroupImpl*>(pGroup);
return ResultVal(m_data->AddVisual(pGroupImpl->m_data));
}
// OFFSET: LEGO1 0x100a3450
// FUNCTION: LEGO1 0x100a3450
Result GroupImpl::Remove(const Group* pGroup)
{
const GroupImpl* pGroupImpl = static_cast<const GroupImpl*>(pGroup);
return ResultVal(m_data->DeleteVisual(pGroupImpl->m_data));
}
// OFFSET: LEGO1 0x100a3480
// FUNCTION: LEGO1 0x100a3480
Result GroupImpl::Remove(const Mesh* pMesh)
{
const MeshImpl* pMeshImpl = static_cast<const MeshImpl*>(pMesh);
return ResultVal(m_data->DeleteVisual(pMeshImpl->ImplementationData()->groupMesh));
}
// OFFSET: LEGO1 0x100a34b0 STUB
// FUNCTION: LEGO1 0x100a34b0 STUB
Result GroupImpl::RemoveAll()
{
return Error;
}
// OFFSET: LEGO1 0x100a34c0 STUB
// FUNCTION: LEGO1 0x100a34c0 STUB
Result GroupImpl::Unknown()
{
return Error;

View File

@ -5,16 +5,16 @@ using namespace TglImpl;
DECOMP_SIZE_ASSERT(Light, 0x4);
DECOMP_SIZE_ASSERT(LightImpl, 0x8);
// OFFSET: LEGO1 0x100a2640 TEMPLATE
// SYNTHETIC: LEGO1 0x100a2640
// TglImpl::LightImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a3770
// FUNCTION: LEGO1 0x100a3770
void* LightImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a3780
// FUNCTION: LEGO1 0x100a3780
Result LightImpl::SetTransformation(const FloatMatrix4& matrix)
{
D3DRMMATRIX4D helper;
@ -22,7 +22,7 @@ Result LightImpl::SetTransformation(const FloatMatrix4& matrix)
return ResultVal(m_data->AddTransform(D3DRMCOMBINE_REPLACE, *d3dMatrix));
}
// OFFSET: LEGO1 0x100a37e0
// FUNCTION: LEGO1 0x100a37e0
Result LightImpl::SetColor(float r, float g, float b)
{
IDirect3DRMLightArray* lightArray;
@ -30,4 +30,4 @@ Result LightImpl::SetColor(float r, float g, float b)
m_data->GetLights(&lightArray);
lightArray->GetElement(0, &light);
return ResultVal(light->SetColorRGB(r, g, b));
}
}

View File

@ -7,16 +7,16 @@ DECOMP_SIZE_ASSERT(D3DRMVERTEX, 0x24);
DECOMP_SIZE_ASSERT(Mesh, 0x4);
DECOMP_SIZE_ASSERT(MeshImpl, 0x8);
// OFFSET: LEGO1 0x100a3d80 TEMPLATE
// SYNTHETIC: LEGO1 0x100a3d80
// TglImpl::MeshImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a3ed0
// FUNCTION: LEGO1 0x100a3ed0
void* MeshImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a3ee0
// FUNCTION: LEGO1 0x100a3ee0
Result MeshImpl::SetColor(float r, float g, float b, float a)
{
// The first instruction makes no sense here:
@ -33,14 +33,14 @@ Result MeshImpl::SetColor(float r, float g, float b, float a)
}
}
// OFFSET: LEGO1 0x100a3f50
// FUNCTION: LEGO1 0x100a3f50
Result MeshImpl::SetTexture(const Texture* pTexture)
{
IDirect3DRMTexture* texture = pTexture ? static_cast<const TextureImpl*>(pTexture)->ImplementationData() : NULL;
return ResultVal(m_data->groupMesh->SetGroupTexture(m_data->groupIndex, texture));
}
// OFFSET: LEGO1 0x100a3f80
// FUNCTION: LEGO1 0x100a3f80
Result MeshImpl::SetTextureMappingMode(ProjectionType projType)
{
if (projType == Perspective) {
@ -51,7 +51,7 @@ Result MeshImpl::SetTextureMappingMode(ProjectionType projType)
}
}
// OFFSET: LEGO1 0x100a3fc0
// FUNCTION: LEGO1 0x100a3fc0
Result MeshImpl::SetShadingModel(ShadingModel model)
{
D3DRMRENDERQUALITY mode;
@ -75,7 +75,7 @@ Result MeshImpl::SetShadingModel(ShadingModel model)
return ResultVal(m_data->groupMesh->SetGroupQuality(m_data->groupIndex, mode));
}
// OFFSET: LEGO1 0x100a4030
// FUNCTION: LEGO1 0x100a4030
Mesh* MeshImpl::DeepClone(Unk* pUnk)
{
// Create group
@ -120,7 +120,7 @@ Mesh* MeshImpl::DeepClone(Unk* pUnk)
return newMesh;
}
// OFFSET: LEGO1 0x100a4240
// FUNCTION: LEGO1 0x100a4240
Mesh* MeshImpl::ShallowClone(Unk* pUnk)
{
MeshImpl* newGroup = new MeshImpl();
@ -137,7 +137,7 @@ Mesh* MeshImpl::ShallowClone(Unk* pUnk)
return newGroup;
}
// OFFSET: LEGO1 0x100a4330
// FUNCTION: LEGO1 0x100a4330
Result MeshImpl::GetTexture(Texture*& rpTexture)
{
IDirect3DRMTexture* texture;

View File

@ -2,7 +2,7 @@
using namespace TglImpl;
// OFFSET: LEGO1 0x100a15e0
// FUNCTION: LEGO1 0x100a15e0
Renderer* Tgl::CreateRenderer()
{
RendererImpl* renderer = new RendererImpl();
@ -13,10 +13,10 @@ Renderer* Tgl::CreateRenderer()
return renderer;
}
// OFFSET: LEGO1 0x100a16d0 TEMPLATE
// SYNTHETIC: LEGO1 0x100a16d0
// TglImpl::RendererImpl::`scalar deleting destructor'
// GLOBAL OFFSET: LEGO1 0x1010103c
// GLOBAL: LEGO1 0x1010103c
IDirect3DRM* g_pD3DRM = NULL;
// Inlined only
@ -51,7 +51,7 @@ void RendererImpl::Destroy()
}
}
// OFFSET: LEGO1 0x100a1894
// FUNCTION: LEGO1 0x100a1894
Device* RendererImpl::CreateDevice(const DeviceDirect3DCreateData& data)
{
DeviceImpl* device = new DeviceImpl();
@ -63,10 +63,10 @@ Device* RendererImpl::CreateDevice(const DeviceDirect3DCreateData& data)
return device;
}
// GLOBAL OFFSET: LEGO1 0x10101040
// GLOBAL: LEGO1 0x10101040
static int gSetBufferCount = 1;
// OFFSET: LEGO1 0x100a1900
// FUNCTION: LEGO1 0x100a1900
Device* RendererImpl::CreateDevice(const DeviceDirectDrawCreateData& data)
{
DeviceImpl* device = new DeviceImpl();
@ -108,7 +108,7 @@ inline Result RendererCreateView(
return result;
}
// OFFSET: LEGO1 0x100a1a00
// FUNCTION: LEGO1 0x100a1a00
View* RendererImpl::CreateView(
const Device* pDevice,
const Camera* pCamera,
@ -149,7 +149,7 @@ inline Result RendererCreateGroup(IDirect3DRM* pRenderer, IDirect3DRMFrame* pPar
return result;
}
// OFFSET: LEGO1 0x100a1b20
// FUNCTION: LEGO1 0x100a1b20
Group* RendererImpl::CreateGroup(const Group* pParent)
{
GroupImpl* group = new GroupImpl();
@ -162,7 +162,7 @@ Group* RendererImpl::CreateGroup(const Group* pParent)
return group;
}
// OFFSET: LEGO1 0x100a1c30
// FUNCTION: LEGO1 0x100a1c30
Camera* RendererImpl::CreateCamera()
{
CameraImpl* camera = new CameraImpl();
@ -173,7 +173,7 @@ Camera* RendererImpl::CreateCamera()
return camera;
}
// OFFSET: LEGO1 0x100a1cf0
// FUNCTION: LEGO1 0x100a1cf0
Light* RendererImpl::CreateLight(LightType type, float r, float g, float b)
{
LightImpl* newLight = new LightImpl();
@ -225,7 +225,7 @@ Light* RendererImpl::CreateLight(LightType type, float r, float g, float b)
return newLight;
}
// OFFSET: LEGO1 0x100a1e90
// FUNCTION: LEGO1 0x100a1e90
Unk* RendererImpl::CreateUnk()
{
// Note: I'm fairly certain that Unknown is not what Tgl calls a
@ -273,7 +273,7 @@ inline Result RendererCreateTexture(
return result;
}
// OFFSET: LEGO1 0x100a1f50
// FUNCTION: LEGO1 0x100a1f50
Texture* RendererImpl::CreateTexture(
int width,
int height,
@ -302,7 +302,7 @@ Texture* RendererImpl::CreateTexture(
return texture;
}
// OFFSET: LEGO1 0x100a20d0
// FUNCTION: LEGO1 0x100a20d0
Texture* RendererImpl::CreateTexture()
{
TextureImpl* texture = new TextureImpl();
@ -313,20 +313,19 @@ Texture* RendererImpl::CreateTexture()
return texture;
}
// OFFSET: LEGO1 0x100a2270
// FUNCTION: LEGO1 0x100a2270
Result RendererImpl::SetTextureDefaultShadeCount(unsigned long shadeCount)
{
return ResultVal(m_data->SetDefaultTextureShades(shadeCount));
}
// OFFSET: LEGO1 0x100a2290
// FUNCTION: LEGO1 0x100a2290
Result RendererImpl::SetTextureDefaultColorCount(unsigned long colorCount)
{
return ResultVal(m_data->SetDefaultTextureColors(colorCount));
}
// OFFSET: LEGO1 0x100a22b0
// FUNCTION: LEGO1 0x100a22b0
void* RendererImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);

View File

@ -12,7 +12,7 @@ inline TglD3DRMIMAGE* TextureGetImage(IDirect3DRMTexture* pTexture)
// Forward declare to satisfy order check
void TextureDestroyCallback(IDirect3DRMObject* pObject, void* pArg);
// OFFSET: LEGO1 0x100a12a0
// FUNCTION: LEGO1 0x100a12a0
Result TextureImpl::SetImage(IDirect3DRMTexture* pSelf, TglD3DRMIMAGE* pImage)
{
unsigned long appData;
@ -34,7 +34,7 @@ Result TextureImpl::SetImage(IDirect3DRMTexture* pSelf, TglD3DRMIMAGE* pImage)
return result;
}
// OFFSET: LEGO1 0x100a1300
// FUNCTION: LEGO1 0x100a1300
void TextureDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
{
TglD3DRMIMAGE* pImage = reinterpret_cast<TglD3DRMIMAGE*>(pObject->GetAppData());
@ -42,7 +42,7 @@ void TextureDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
pObject->SetAppData(0);
}
// OFFSET: LEGO1 0x100a1330
// FUNCTION: LEGO1 0x100a1330
TglD3DRMIMAGE::TglD3DRMIMAGE(
int width,
int height,
@ -77,7 +77,7 @@ TglD3DRMIMAGE::TglD3DRMIMAGE(
}
}
// OFFSET: LEGO1 0x100a13b0
// FUNCTION: LEGO1 0x100a13b0
void TglD3DRMIMAGE::Destroy()
{
if (m_texelsAllocatedByClient == 0) {
@ -86,20 +86,20 @@ void TglD3DRMIMAGE::Destroy()
delete m_image.palette;
}
// OFFSET: LEGO1 0x100a13e0 STUB
// FUNCTION: LEGO1 0x100a13e0 STUB
Result TglD3DRMIMAGE::CreateBuffer(int width, int height, int depth, void* pBuffer, int useBuffer)
{
return Error;
}
// OFFSET: LEGO1 0x100a1510
// FUNCTION: LEGO1 0x100a1510
void TglD3DRMIMAGE::FillRowsOfTexture(int y, int height, char* pContent)
{
// The purpose is clearly this but I can't get the assembly to line up.
memcpy((char*) m_image.buffer1 + (y * m_image.bytes_per_line), pContent, height * m_image.bytes_per_line);
}
// OFFSET: LEGO1 0x100a1550
// FUNCTION: LEGO1 0x100a1550
Result TglD3DRMIMAGE::InitializePalette(int paletteSize, PaletteEntry* pEntries)
{
// This function is a 100% match if the PaletteEntry class is copied
@ -126,10 +126,10 @@ Result TglD3DRMIMAGE::InitializePalette(int paletteSize, PaletteEntry* pEntries)
return Success;
}
// OFFSET: LEGO1 0x100a2800 TEMPLATE
// SYNTHETIC: LEGO1 0x100a2800
// TglImpl::TextureImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a3c10
// FUNCTION: LEGO1 0x100a3c10
Result TextureImpl::SetTexels(int width, int height, int bitsPerTexel, void* pTexels)
{
TglD3DRMIMAGE* image = TextureGetImage(m_data);
@ -140,20 +140,20 @@ Result TextureImpl::SetTexels(int width, int height, int bitsPerTexel, void* pTe
return result;
}
// OFFSET: LEGO1 0x100a3c60
// FUNCTION: LEGO1 0x100a3c60
void TextureImpl::FillRowsOfTexture(int y, int height, void* pBuffer)
{
TglD3DRMIMAGE* image = TextureGetImage(m_data);
image->FillRowsOfTexture(y, height, (char*) pBuffer);
}
// OFFSET: LEGO1 0x100a3c90
// FUNCTION: LEGO1 0x100a3c90
Result TextureImpl::Changed(int texelsChanged, int paletteChanged)
{
return ResultVal(m_data->Changed(texelsChanged, paletteChanged));
}
// OFFSET: LEGO1 0x100a3d00
// FUNCTION: LEGO1 0x100a3d00
Result TextureImpl::GetBufferAndPalette(
int* width,
int* height,
@ -178,7 +178,7 @@ Result TextureImpl::GetBufferAndPalette(
return Success;
}
// OFFSET: LEGO1 0x100a3d40
// FUNCTION: LEGO1 0x100a3d40
Result TextureImpl::SetPalette(int entryCount, PaletteEntry* pEntries)
{
// Not 100% confident this is supposed to directly be forwarding arguments,
@ -189,8 +189,8 @@ Result TextureImpl::SetPalette(int entryCount, PaletteEntry* pEntries)
return Success;
}
// OFFSET: LEGO1 0x100a3d70
// FUNCTION: LEGO1 0x100a3d70
void* TextureImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
}

View File

@ -5,16 +5,16 @@ using namespace TglImpl;
DECOMP_SIZE_ASSERT(Unk, 0x4);
DECOMP_SIZE_ASSERT(UnkImpl, 0x8);
// OFFSET: LEGO1 0x100a2720 TEMPLATE
// SYNTHETIC: LEGO1 0x100a2720
// TglImpl::UnkImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a3830
// FUNCTION: LEGO1 0x100a3830
void* UnkImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a3840 STUB
// FUNCTION: LEGO1 0x100a3840 STUB
Result UnkImpl::SetMeshData(
unsigned long faceCount,
unsigned long vertexCount,
@ -28,7 +28,7 @@ Result UnkImpl::SetMeshData(
return Error;
}
// OFFSET: LEGO1 0x100a3ae0
// FUNCTION: LEGO1 0x100a3ae0
Result UnkImpl::GetBoundingBox(float min[3], float max[3])
{
D3DRMBOX box;
@ -44,7 +44,7 @@ Result UnkImpl::GetBoundingBox(float min[3], float max[3])
return result;
}
// OFFSET: LEGO1 0x100a3b40
// FUNCTION: LEGO1 0x100a3b40
Unk* UnkImpl::Clone()
{
UnkImpl* mesh = new UnkImpl();

View File

@ -16,7 +16,7 @@ struct ViewportAppData {
DECOMP_SIZE_ASSERT(ViewportAppData, 0x18);
// OFFSET: LEGO1 0x100a10b0
// FUNCTION: LEGO1 0x100a10b0
ViewportAppData::ViewportAppData(IDirect3DRM* pRenderer)
{
pRenderer->CreateFrame(NULL, &m_pLightFrame);
@ -27,7 +27,7 @@ ViewportAppData::ViewportAppData(IDirect3DRM* pRenderer)
m_backgroundColorBlue = 0.0f;
}
// OFFSET: LEGO1 0x100a10e0
// FUNCTION: LEGO1 0x100a10e0
ViewportAppData::~ViewportAppData()
{
IDirect3DRMFrameArray* pChildFrames;
@ -45,7 +45,7 @@ ViewportAppData::~ViewportAppData()
// Forward declare to satisfy order check
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg);
// OFFSET: LEGO1 0x100a1160
// FUNCTION: LEGO1 0x100a1160
Result ViewImpl::ViewportCreateAppData(IDirect3DRM* pDevice, IDirect3DRMViewport* pView, IDirect3DRMFrame* pCamera)
{
ViewportAppData* data = new ViewportAppData(pDevice);
@ -80,7 +80,7 @@ inline Result ViewRestoreFrameAfterRender(
return result;
}
// OFFSET: LEGO1 0x100a1240
// FUNCTION: LEGO1 0x100a1240
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
{
ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pArg);
@ -94,7 +94,7 @@ void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
delete pViewportAppData;
}
// OFFSET: LEGO1 0x100a1290
// FUNCTION: LEGO1 0x100a1290
Result ViewportPickImpl(
IDirect3DRMViewport* pViewport,
int x,
@ -119,16 +119,16 @@ inline IDirect3DRMFrame* ViewportGetLightFrame(IDirect3DRMViewport* pViewport)
return ViewportGetData(pViewport)->m_pLightFrame;
}
// OFFSET: LEGO1 0x100a23a0 TEMPLATE
// SYNTHETIC: LEGO1 0x100a23a0
// TglImpl::ViewImpl::`scalar deleting destructor'
// OFFSET: LEGO1 0x100a2d80
// FUNCTION: LEGO1 0x100a2d80
void* ViewImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a2d90
// FUNCTION: LEGO1 0x100a2d90
Result ViewImpl::Add(const Light* pLight)
{
const LightImpl* light = static_cast<const LightImpl*>(pLight);
@ -136,7 +136,7 @@ Result ViewImpl::Add(const Light* pLight)
return ResultVal(ViewportGetLightFrame(m_data)->AddChild(frame));
}
// OFFSET: LEGO1 0x100a2dc0
// FUNCTION: LEGO1 0x100a2dc0
Result ViewImpl::Remove(const Light* pLight)
{
const LightImpl* light = static_cast<const LightImpl*>(pLight);
@ -144,7 +144,7 @@ Result ViewImpl::Remove(const Light* pLight)
return ResultVal(ViewportGetLightFrame(m_data)->DeleteChild(frame));
}
// OFFSET: LEGO1 0x100a2df0
// FUNCTION: LEGO1 0x100a2df0
Result ViewImpl::SetCamera(const Camera* pCamera)
{
const CameraImpl* camera = static_cast<const CameraImpl*>(pCamera);
@ -165,13 +165,13 @@ Result ViewImpl::SetCamera(const Camera* pCamera)
return ResultVal(m_data->SetCamera(frame));
}
// OFFSET: LEGO1 0x100a2e70
// FUNCTION: LEGO1 0x100a2e70
Result ViewImpl::SetProjection(ProjectionType type)
{
return ResultVal(m_data->SetProjection(Translate(type)));
}
// OFFSET: LEGO1 0x100a2eb0
// FUNCTION: LEGO1 0x100a2eb0
Result ViewImpl::SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees)
{
float field = frontClippingDistance * tan(DegreesToRadians(degrees / 2));
@ -187,7 +187,7 @@ Result ViewImpl::SetFrustrum(float frontClippingDistance, float backClippingDist
return result;
}
// OFFSET: LEGO1 0x100a2f30
// FUNCTION: LEGO1 0x100a2f30
Result ViewImpl::SetBackgroundColor(float r, float g, float b)
{
Result ret = Success;
@ -203,7 +203,7 @@ Result ViewImpl::SetBackgroundColor(float r, float g, float b)
return ret;
}
// OFFSET: LEGO1 0x100a2f80
// FUNCTION: LEGO1 0x100a2f80
Result ViewImpl::GetBackgroundColor(float* r, float* g, float* b)
{
ViewportAppData* data = ViewportGetData(m_data);
@ -213,7 +213,7 @@ Result ViewImpl::GetBackgroundColor(float* r, float* g, float* b)
return Success;
}
// OFFSET: LEGO1 0x100a2fb0
// FUNCTION: LEGO1 0x100a2fb0
Result ViewImpl::Clear()
{
return ResultVal(m_data->Clear());
@ -247,7 +247,7 @@ inline Result ViewPrepareFrameForRender(
return result;
}
// OFFSET: LEGO1 0x100a2fd0
// FUNCTION: LEGO1 0x100a2fd0
Result ViewImpl::Render(const Light* pCamera)
{
ViewportAppData* appdata = ViewportGetData(m_data);
@ -276,13 +276,13 @@ Result ViewImpl::Render(const Light* pCamera)
return ResultVal(m_data->Render(light));
}
// OFFSET: LEGO1 0x100a3080
// FUNCTION: LEGO1 0x100a3080
Result ViewImpl::ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height)
{
return ResultVal(m_data->ForceUpdate(x, y, x + width - 1, y + height - 1));
}
// OFFSET: LEGO1 0x100a30c0
// FUNCTION: LEGO1 0x100a30c0
Result ViewImpl::Pick(
unsigned long x,
unsigned long y,
@ -303,7 +303,7 @@ Result ViewImpl::Pick(
);
}
// OFFSET: LEGO1 0x100a30f0
// FUNCTION: LEGO1 0x100a30f0
Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
{
D3DRMVECTOR4D d3dRMScreen;
@ -325,7 +325,7 @@ Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
return result;
}
// OFFSET: LEGO1 0x100a3160
// FUNCTION: LEGO1 0x100a3160
Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
{
// 100% match minus instruction reordering.
@ -347,4 +347,3 @@ Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
return result;
}