mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Check all inline destructors
This commit is contained in:
parent
495070a2f4
commit
fef91382e6
@ -5,14 +5,8 @@ using namespace TglImpl;
|
||||
DECOMP_SIZE_ASSERT(Camera, 0x4);
|
||||
DECOMP_SIZE_ASSERT(CameraImpl, 0x8);
|
||||
|
||||
// Inlined only
|
||||
CameraImpl::~CameraImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a2560 TEMPLATE
|
||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a36f0
|
||||
void* CameraImpl::ImplementationDataPtr()
|
||||
|
||||
@ -4,14 +4,8 @@
|
||||
|
||||
using namespace TglImpl;
|
||||
|
||||
// Inlined only
|
||||
DeviceImpl::~DeviceImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a22c0 TEMPLATE
|
||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a2bf0
|
||||
void* DeviceImpl::ImplementationDataPtr()
|
||||
|
||||
@ -2,14 +2,8 @@
|
||||
|
||||
using namespace TglImpl;
|
||||
|
||||
// Inlined only
|
||||
GroupImpl::~GroupImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a2480 TEMPLATE
|
||||
// TglImpl::GroupImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a31d0
|
||||
void* GroupImpl::ImplementationDataPtr()
|
||||
|
||||
@ -89,7 +89,13 @@ class RendererImpl : public Renderer {
|
||||
class DeviceImpl : public Device {
|
||||
public:
|
||||
DeviceImpl() : m_data(0) {}
|
||||
~DeviceImpl();
|
||||
~DeviceImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -120,7 +126,13 @@ class DeviceImpl : public Device {
|
||||
class ViewImpl : public View {
|
||||
public:
|
||||
ViewImpl() : m_data(0) {}
|
||||
~ViewImpl();
|
||||
~ViewImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -166,7 +178,13 @@ class ViewImpl : public View {
|
||||
class CameraImpl : public Camera {
|
||||
public:
|
||||
CameraImpl() : m_data(0) {}
|
||||
~CameraImpl();
|
||||
~CameraImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -185,7 +203,13 @@ class CameraImpl : public Camera {
|
||||
class LightImpl : public Light {
|
||||
public:
|
||||
LightImpl() : m_data(0) {}
|
||||
~LightImpl();
|
||||
~LightImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -245,7 +269,13 @@ class MeshImpl : public Mesh {
|
||||
class GroupImpl : public Group {
|
||||
public:
|
||||
GroupImpl() : m_data(0) {}
|
||||
~GroupImpl();
|
||||
~GroupImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -278,7 +308,13 @@ class GroupImpl : public Group {
|
||||
class UnkImpl : public Unk {
|
||||
public:
|
||||
UnkImpl() : m_data(0) {}
|
||||
~UnkImpl();
|
||||
~UnkImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
@ -332,7 +368,13 @@ class TglD3DRMIMAGE {
|
||||
class TextureImpl : public Texture {
|
||||
public:
|
||||
TextureImpl() : m_data(0) {}
|
||||
~TextureImpl();
|
||||
~TextureImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void* ImplementationDataPtr();
|
||||
|
||||
|
||||
@ -5,14 +5,8 @@ using namespace TglImpl;
|
||||
DECOMP_SIZE_ASSERT(Light, 0x4);
|
||||
DECOMP_SIZE_ASSERT(LightImpl, 0x8);
|
||||
|
||||
// Inlined only
|
||||
LightImpl::~LightImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a2640 TEMPLATE
|
||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a3770
|
||||
void* LightImpl::ImplementationDataPtr()
|
||||
|
||||
@ -13,6 +13,9 @@ Renderer* Tgl::CreateRenderer()
|
||||
return renderer;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100a16d0 TEMPLATE
|
||||
// TglImpl::RendererImpl::`scalar deleting destructor'
|
||||
|
||||
// GLOBAL OFFSET: LEGO1 0x1010103c
|
||||
IDirect3DRM* g_pD3DRM = NULL;
|
||||
|
||||
@ -31,12 +34,19 @@ Result RendererImpl::Create()
|
||||
return (m_data != NULL) ? Success : Error;
|
||||
}
|
||||
|
||||
inline void RendererDestroy(IDirect3DRM* pRenderer)
|
||||
{
|
||||
int refCount = pRenderer->Release();
|
||||
if (refCount <= 0) {
|
||||
g_pD3DRM = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Inlined only
|
||||
void RendererImpl::Destroy()
|
||||
{
|
||||
if (m_data) {
|
||||
if (m_data->Release() == 0)
|
||||
g_pD3DRM = NULL;
|
||||
RendererDestroy(m_data);
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,14 +126,8 @@ Result TglD3DRMIMAGE::InitializePalette(int paletteSize, PaletteEntry* pEntries)
|
||||
return Success;
|
||||
}
|
||||
|
||||
// Inlined only
|
||||
TextureImpl::~TextureImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a2800 TEMPLATE
|
||||
// TglImpl::TextureImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a3c10
|
||||
Result TextureImpl::SetTexels(int width, int height, int bitsPerTexel, void* pTexels)
|
||||
|
||||
@ -5,14 +5,8 @@ using namespace TglImpl;
|
||||
DECOMP_SIZE_ASSERT(Unk, 0x4);
|
||||
DECOMP_SIZE_ASSERT(UnkImpl, 0x8);
|
||||
|
||||
// Inlined only
|
||||
UnkImpl::~UnkImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a2720 TEMPLATE
|
||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a3830
|
||||
void* UnkImpl::ImplementationDataPtr()
|
||||
|
||||
@ -119,14 +119,8 @@ inline IDirect3DRMFrame* ViewportGetLightFrame(IDirect3DRMViewport* pViewport)
|
||||
return ViewportGetData(pViewport)->m_pLightFrame;
|
||||
}
|
||||
|
||||
// Inlined only
|
||||
ViewImpl::~ViewImpl()
|
||||
{
|
||||
if (m_data) {
|
||||
m_data->Release();
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
// OFFSET: LEGO1 0x100a23a0 TEMPLATE
|
||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||
|
||||
// OFFSET: LEGO1 0x100a2d80
|
||||
void* ViewImpl::ImplementationDataPtr()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user