From 362551e2796c36e631582a09220dd29a36f6993a Mon Sep 17 00:00:00 2001 From: jonschz <17198703+jonschz@users.noreply.github.com> Date: Fri, 29 Nov 2024 22:31:37 +0100 Subject: [PATCH] Clean up unused annotations to reduce errors (#1177) Co-authored-by: jonschz --- LEGO1/lego/legoomni/include/buildings.h | 6 +++--- LEGO1/lego/legoomni/src/common/legovariables.cpp | 4 ++-- LEGO1/lego/legoomni/src/race/legoracers.cpp | 2 +- LEGO1/library_msvc.h | 3 --- LEGO1/mxdirectx/mxdirectdraw.cpp | 3 ++- LEGO1/tgl/d3drm/renderer.cpp | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/LEGO1/lego/legoomni/include/buildings.h b/LEGO1/lego/legoomni/include/buildings.h index 57152a2a..469a4936 100644 --- a/LEGO1/lego/legoomni/include/buildings.h +++ b/LEGO1/lego/legoomni/include/buildings.h @@ -11,7 +11,7 @@ class RaceStandsEntity : public BuildingEntity { // FUNCTION: LEGO1 0x1000efa0 const char* ClassName() const override // vtable+0x0c { - // STRING: LEGO1 0x100f0300 + // at LEGO1 0x100f0300, needs no annotation return "RaceStandsEntity"; } @@ -125,7 +125,7 @@ class CaveEntity : public BuildingEntity { // FUNCTION: LEGO1 0x1000f1e0 const char* ClassName() const override // vtable+0x0c { - // STRING: LEGO1 0x100f0300 + // at LEGO1 0x100f0300, needs no annotation return "RaceStandsEntity"; } @@ -147,7 +147,7 @@ class JailEntity : public BuildingEntity { // FUNCTION: LEGO1 0x1000f0c0 const char* ClassName() const override // vtable+0x0c { - // STRING: LEGO1 0x100f0300 + // at LEGO1 0x100f0300, needs no annotation return "RaceStandsEntity"; } diff --git a/LEGO1/lego/legoomni/src/common/legovariables.cpp b/LEGO1/lego/legoomni/src/common/legovariables.cpp index da6b30fd..539983bf 100644 --- a/LEGO1/lego/legoomni/src/common/legovariables.cpp +++ b/LEGO1/lego/legoomni/src/common/legovariables.cpp @@ -56,8 +56,8 @@ const char* g_varTOWSPEED = "towSPEED"; // STRING: LEGO1 0x100f439c const char* g_varTOWFUEL = "towFUEL"; +// the STRING is already declared for GLOBAL 0x101020cc // GLOBAL: LEGO1 0x100f3a40 -// STRING: LEGO1 0x100f3808 const char* g_varVISIBILITY = "VISIBILITY"; // GLOBAL: LEGO1 0x100f3a44 @@ -72,8 +72,8 @@ const char* g_varCURSOR = "CURSOR"; // STRING: LEGO1 0x100f3a1c const char* g_varWHOAMI = "WHO_AM_I"; +// the STRING is already declared at LEGO1 0x100f3fb0 // GLOBAL: LEGO1 0x100f3a50 -// STRING: LEGO1 0x100f3a18 const char* g_delimiter2 = " \t"; // GLOBAL: LEGO1 0x100f3a54 diff --git a/LEGO1/lego/legoomni/src/race/legoracers.cpp b/LEGO1/lego/legoomni/src/race/legoracers.cpp index a313c610..b0214bc1 100644 --- a/LEGO1/lego/legoomni/src/race/legoracers.cpp +++ b/LEGO1/lego/legoomni/src/race/legoracers.cpp @@ -67,8 +67,8 @@ const SkeletonKickPhase LegoRaceCar::g_skeletonKickPhases[] = { {&LegoRaceCar::g_skBMap[3], 0.8, 0.9, LEGORACECAR_KICK2}, }; +// the STRING is already declared at LEGO1 0x101020b8 // GLOBAL: LEGO1 0x100f0b10 -// STRING: LEGO1 0x100f09cc const char* LegoRaceCar::g_strSpeed = "SPEED"; // GLOBAL: LEGO1 0x100f0b18 diff --git a/LEGO1/library_msvc.h b/LEGO1/library_msvc.h index 179f4222..94811d12 100644 --- a/LEGO1/library_msvc.h +++ b/LEGO1/library_msvc.h @@ -281,9 +281,6 @@ // LIBRARY: LEGO1 0x1008fdd0 // __dosmaperr -// LIBRARY: LEGO1 0x1008fe30 -// __unlock_file - // LIBRARY: LEGO1 0x1008fe50 // __errno diff --git a/LEGO1/mxdirectx/mxdirectdraw.cpp b/LEGO1/mxdirectx/mxdirectdraw.cpp index 50d7158b..b6279636 100644 --- a/LEGO1/mxdirectx/mxdirectdraw.cpp +++ b/LEGO1/mxdirectx/mxdirectdraw.cpp @@ -873,8 +873,9 @@ int MxDirectDraw::FlipToGDISurface() // FUNCTION: LEGO1 0x1009e830 void MxDirectDraw::Error(const char* p_message, int p_error) { - // GLOBAL: LEGO1 0x10100c70 + // at LEGO1 0x10100c70, needs no annotation static BOOL g_isInsideError = FALSE; + if (!g_isInsideError) { g_isInsideError = TRUE; Destroy(); diff --git a/LEGO1/tgl/d3drm/renderer.cpp b/LEGO1/tgl/d3drm/renderer.cpp index c310b996..e94f3592 100644 --- a/LEGO1/tgl/d3drm/renderer.cpp +++ b/LEGO1/tgl/d3drm/renderer.cpp @@ -49,7 +49,7 @@ Device* RendererImpl::CreateDevice(const DeviceDirect3DCreateData& data) // FUNCTION: LEGO1 0x100a1900 Device* RendererImpl::CreateDevice(const DeviceDirectDrawCreateData& data) { - // GLOBAL: LEGO1 0x10101040 + // at LEGO1 0x10101040, needs no annotation static int g_SetBufferCount = 1; DeviceImpl* device = new DeviceImpl();