Fix warnings triggered by isle-portable (#1304)

* Replace computed constant with more readable computed constants

* LegoAnim::GetActorUnknown0x04 returns a number, not a pointer

* Add macro for creating RGB555 colors

* Texture pixel data is passed through as const data

* Compare palette index against 0 instead of NULL pointer

* warning: deleting 'void*' is undefined [-Wdelete-incomplete] warning

Some DirectX sdk's declars D3DRMIMAGE::buffer1 and D3DRMIMAGE::buffer2
as a void pointer.

* Don't use floats

* Fix wrong op

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Anonymous Maarten
2024-12-29 22:45:00 +01:00
committed by GitHub
parent 795d6e144d
commit c77b5869f5
7 changed files with 19 additions and 17 deletions

View File

@@ -81,7 +81,7 @@ TglD3DRMIMAGE::TglD3DRMIMAGE(
void TglD3DRMIMAGE::Destroy()
{
if (m_texelsAllocatedByClient == 0) {
delete m_image.buffer1;
delete[] ((char*) m_image.buffer1);
}
delete m_image.palette;
}
@@ -111,7 +111,7 @@ Result TglD3DRMIMAGE::CreateBuffer(int width, int height, int depth, void* pBuff
m_image.bytes_per_line = width;
if (!m_texelsAllocatedByClient) {
delete[] m_image.buffer1;
delete[] ((char*) m_image.buffer1);
m_image.buffer1 = NULL;
}