Implement/match LegoCarRaceActor::VTable0x1c (#1078)

* Implement/match `LegoCarRaceActor::VTable0x1c`

* Fix formatting

* Fix LegoEdge::CWVertex()

* Fix more CI issues

* Trz to fix lvalue compile issue

* Fix formatting

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2024-08-04 21:13:12 +02:00
committed by GitHub
parent fe1b66938d
commit e09acfcddb
23 changed files with 328 additions and 161 deletions

View File

@@ -1,5 +1,6 @@
#include "legoedge.h"
#include "assert.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(LegoEdge, 0x24)
@@ -51,13 +52,27 @@ LegoEdge* LegoEdge::GetCounterclockwiseEdge(LegoWEEdge& p_face)
}
// FUNCTION: LEGO1 0x1009a510
// FUNCTION: BETA10 0x10182433
Vector3* LegoEdge::CWVertex(LegoWEEdge& p_face)
{
return &p_face == m_faceA ? m_pointB : m_pointA;
if (m_faceA == &p_face) {
return m_pointB;
}
else {
assert(m_faceB == &p_face);
return m_pointA;
}
}
// FUNCTION: LEGO1 0x1009a530
// FUNCTION: BETA10 0x10182498
Vector3* LegoEdge::CCWVertex(LegoWEEdge& p_face)
{
return &p_face == m_faceB ? m_pointB : m_pointA;
if (m_faceB == &p_face) {
return m_pointB;
}
else {
assert(m_faceA == &p_face);
return m_pointA;
}
}