(Proposal) Adjustments to "decomp" language (#308)

* Adjustments to "decomp" language

* Fix a comment

* Fix accidental clang-formatting

* Fix order

* Fix order

* Remove junk

* Fix OFFSET

* Adjustments based on new suggestions

* Annotate globals

* Globals in ISLE

* More globals

* Merge from parser2 branch

* Allow prepending space for exact marker match

* To eliminate noise, require the 0x prefix on offset for marker match

* fix test from previous

* Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise

* FUNCTION to SYNTHETIC where needed

* Missed marker conversion on SetAtomId

* pylint cleanup, remove unused code

* Fix unexpected function end, add more unit tests

* Be more strict about synthetic name syntax

* Revert "Missed marker conversion on SetAtomId"

This reverts commit d87d665127.

* Revert "FUNCTION to SYNTHETIC where needed"

This reverts commit 8c815418d2.

* Implicit lookup by name for functions

* Fix VTABLE SYNTHETIC and other decomp markers

* Get vtable class name

* Vtable marker should identify struct

* No colon for SIZE comment

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update CONTRIBUTING.md

* Fix destructor/annotation

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: disinvite <disinvite@users.noreply.github.com>
This commit is contained in:
Christian Semmler
2023-12-06 07:10:45 -05:00
committed by GitHub
parent 4f5b70013f
commit 494a556f8e
407 changed files with 3505 additions and 2493 deletions

View File

@@ -3,7 +3,8 @@
#include "mxomni.h"
#include "mxvideomanager.h"
// GLOBAL: LEGO1 0x10102188 0x400
// GLOBAL: LEGO1 0x10102188
// SIZE 0x400
PALETTEENTRY g_defaultPaletteEntries[256] = {
{0u, 0u, 0u, 0u}, {128u, 0u, 0u, 0u}, {0u, 128u, 0u, 0u}, {128u, 128u, 0u, 0u},
{0u, 0u, 128u, 0u}, {128u, 0u, 128u, 0u}, {0u, 128u, 128u, 0u}, {128u, 128u, 128u, 0u},
@@ -71,7 +72,7 @@ PALETTEENTRY g_defaultPaletteEntries[256] = {
{0u, 0u, 255u, 0u}, {255u, 0u, 255u, 0u}, {0u, 255u, 255u, 0u}, {255u, 255u, 255u, 0u}
};
// OFFSET: LEGO1 0x100bee30
// FUNCTION: LEGO1 0x100bee30
MxPalette::MxPalette()
{
this->m_overrideSkyColor = FALSE;
@@ -80,7 +81,7 @@ MxPalette::MxPalette()
this->m_skyColor = this->m_entries[141];
}
// OFFSET: LEGO1 0x100beed0
// FUNCTION: LEGO1 0x100beed0
MxPalette::MxPalette(const RGBQUAD* p_colors)
{
this->m_overrideSkyColor = FALSE;
@@ -97,7 +98,7 @@ MxPalette::MxPalette(const RGBQUAD* p_colors)
this->m_skyColor = this->m_entries[141];
}
// OFFSET: LEGO1 0x100bef90
// FUNCTION: LEGO1 0x100bef90
MxPalette::~MxPalette()
{
if (m_palette) {
@@ -105,7 +106,7 @@ MxPalette::~MxPalette()
}
}
// OFFSET: LEGO1 0x100bf000
// FUNCTION: LEGO1 0x100bf000
LPDIRECTDRAWPALETTE MxPalette::CreateNativePalette()
{
MxS32 i;
@@ -131,7 +132,7 @@ LPDIRECTDRAWPALETTE MxPalette::CreateNativePalette()
return this->m_palette;
}
// OFFSET: LEGO1 0x100bf0b0
// FUNCTION: LEGO1 0x100bf0b0
MxPalette* MxPalette::Clone()
{
MxPalette* result = new MxPalette;
@@ -140,14 +141,14 @@ MxPalette* MxPalette::Clone()
return result;
}
// OFFSET: LEGO1 0x100bf150
// FUNCTION: LEGO1 0x100bf150
MxResult MxPalette::GetEntries(LPPALETTEENTRY p_entries)
{
memcpy(p_entries, this->m_entries, sizeof(this->m_entries));
return SUCCESS;
}
// OFFSET: LEGO1 0x100bf170
// FUNCTION: LEGO1 0x100bf170
MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries)
{
MxS32 i;
@@ -196,7 +197,7 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries)
return status;
}
// OFFSET: LEGO1 0x100bf2d0
// FUNCTION: LEGO1 0x100bf2d0
MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color)
{
MxResult status = 0;
@@ -212,13 +213,13 @@ MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color)
return status;
}
// OFFSET: LEGO1 0x100bf330
// FUNCTION: LEGO1 0x100bf330
void MxPalette::Detach()
{
this->m_palette = NULL;
}
// OFFSET: LEGO1 0x100bf340
// FUNCTION: LEGO1 0x100bf340
MxBool MxPalette::operator==(MxPalette& other)
{
for (MxS32 i = 0; i < 256; i++) {
@@ -232,7 +233,7 @@ MxBool MxPalette::operator==(MxPalette& other)
return TRUE;
}
// OFFSET: LEGO1 0x100bf390
// FUNCTION: LEGO1 0x100bf390
void MxPalette::ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries)
{
HDC hdc;
@@ -249,7 +250,7 @@ void MxPalette::ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries)
ReleaseDC(0, hdc);
}
// OFFSET: LEGO1 0x100bf420
// FUNCTION: LEGO1 0x100bf420
void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
{
HDC hdc;
@@ -266,7 +267,7 @@ void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
ReleaseDC(0, hdc);
}
// OFFSET: LEGO1 0x100bf490
// FUNCTION: LEGO1 0x100bf490
void MxPalette::Reset(MxBool p_ignoreSkyColor)
{
if (this->m_palette != NULL) {