Beta addrs for TglSurface and related (#905)

This commit is contained in:
MS
2024-05-11 12:27:06 -04:00
committed by GitHub
parent f442f1a2f7
commit b3d6319656
5 changed files with 55 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ using namespace Tgl;
// TglSurface
// FUNCTION: LEGO1 0x100abbf0
// FUNCTION: BETA10 0x1017d490
TglSurface::TglSurface()
{
m_pRenderer = 0;
@@ -33,12 +34,14 @@ TglSurface::TglSurface()
}
// FUNCTION: LEGO1 0x100abd60
// FUNCTION: BETA10 0x1017d5a2
TglSurface::~TglSurface()
{
Destroy();
}
// FUNCTION: LEGO1 0x100abde0
// FUNCTION: BETA10 0x1017d647
void TglSurface::Destroy()
{
DestroyView();
@@ -52,6 +55,7 @@ void TglSurface::Destroy()
// ???
// FUNCTION: LEGO1 0x100abe10
// FUNCTION: BETA10 0x1017d6b0
int GetBitsPerPixel(IDirectDrawSurface* pSurface)
{
DDPIXELFORMAT pixelFormat;
@@ -68,6 +72,7 @@ int GetBitsPerPixel(IDirectDrawSurface* pSurface)
}
// FUNCTION: LEGO1 0x100abe50
// FUNCTION: BETA10 0x1017d742
BOOL TglSurface::Create(const CreateStruct& rCreateStruct, Renderer* pRenderer, Group* pScene)
{
DeviceDirect3DCreateData createData = {rCreateStruct.m_direct3d, rCreateStruct.m_d3dDevice};
@@ -97,15 +102,16 @@ BOOL TglSurface::Create(const CreateStruct& rCreateStruct, Renderer* pRenderer,
textureShadeCount = 4;
}
else if (bitsPerPixel == 8) {
shadeCount = 32;
shadeCount = 16;
dither = FALSE;
textureShadeCount = 16;
textureShadeCount = shadeCount;
textureColorCount = 256;
}
else if (bitsPerPixel == 16) {
shadeCount = 32;
dither = FALSE;
textureShadeCount = 32;
textureShadeCount = shadeCount;
textureColorCount = 256;
}
else if (bitsPerPixel >= 24) {
@@ -161,6 +167,7 @@ BOOL TglSurface::Create(const CreateStruct& rCreateStruct, Renderer* pRenderer,
}
// FUNCTION: LEGO1 0x100ac030
// FUNCTION: BETA10 0x1017db86
void TglSurface::DestroyView()
{
delete m_pView;
@@ -168,6 +175,7 @@ void TglSurface::DestroyView()
}
// FUNCTION: LEGO1 0x100ac050
// FUNCTION: BETA10 0x1017dbd0
double TglSurface::Render()
{
MxStopWatch renderTimer;