mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Order compilation units according to retail, match and align Score class (#1271)
* Initial changes for ordering, Score * Add mxdebug * Match `Score::Paint` * Refactor * Add BETA asserts * BETA match
This commit is contained in:
committed by
GitHub
parent
bb29d289fe
commit
7c41ff4569
@@ -21,8 +21,12 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(Helicopter, 0x230)
|
||||
DECOMP_SIZE_ASSERT(HelicopterState, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(Vector2, 0x08)
|
||||
DECOMP_SIZE_ASSERT(Vector3, 0x08)
|
||||
DECOMP_SIZE_ASSERT(Vector4, 0x08)
|
||||
DECOMP_SIZE_ASSERT(Mx3DPointFloat, 0x14)
|
||||
DECOMP_SIZE_ASSERT(Mx4DPointFloat, 0x18)
|
||||
DECOMP_SIZE_ASSERT(Matrix4, 0x08)
|
||||
DECOMP_SIZE_ASSERT(MxMatrix, 0x48)
|
||||
|
||||
// FUNCTION: LEGO1 0x10001e60
|
||||
|
||||
@@ -624,6 +624,7 @@ MxResult PizzaMissionState::Serialize(LegoFile* p_file)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10039510
|
||||
// FUNCTION: BETA10 0x100eed45
|
||||
PizzaMissionState::Mission* PizzaMissionState::GetMission(MxU8 p_actorId)
|
||||
{
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
|
||||
@@ -165,6 +165,7 @@ MxResult RaceState::Serialize(LegoFile* p_file)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10016280
|
||||
// FUNCTION: BETA10 0x100c7dfd
|
||||
RaceState::Entry* RaceState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0;; i++) {
|
||||
|
||||
@@ -32,12 +32,6 @@ Score::Score()
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100010b0
|
||||
MxBool Score::VTable0x5c()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10001200
|
||||
Score::~Score()
|
||||
{
|
||||
@@ -260,7 +254,8 @@ void Score::Paint()
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
desc.dwSize = sizeof(desc);
|
||||
|
||||
if (cube->m_surface->Lock(NULL, &desc, 0, NULL) == DD_OK) {
|
||||
HRESULT result = cube->m_surface->Lock(NULL, &desc, DDLOCK_SURFACEMEMORYPTR, NULL);
|
||||
if (result == DD_OK) {
|
||||
if (desc.lPitch != desc.dwWidth) {
|
||||
cube->m_surface->Unlock(desc.lpSurface);
|
||||
return;
|
||||
@@ -296,7 +291,7 @@ void Score::Paint()
|
||||
|
||||
// FUNCTION: LEGO1 0x10001d20
|
||||
// FUNCTION: BETA10 0x100f4a52
|
||||
void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score)
|
||||
void Score::FillArea(MxS32 i_activity, MxS32 i_actor, MxS16 score)
|
||||
{
|
||||
MxS32 local3c[] = {0x2b00, 0x5700, 0x8000, 0xab00, 0xd600};
|
||||
MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};
|
||||
@@ -304,6 +299,10 @@ void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score)
|
||||
MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28};
|
||||
MxS32 colors[] = {0x11, 0x0f, 0x08, 0x05};
|
||||
|
||||
assert(i_activity >= 0 && i_activity < 5);
|
||||
assert(i_actor >= 0 && i_actor < 5);
|
||||
assert(score >= 0 && score < 4);
|
||||
|
||||
MxU8* ptr = m_surface + local3c[i_actor] + local50[i_activity];
|
||||
MxS32 color = colors[score];
|
||||
MxS32 size = local28[i_activity];
|
||||
|
||||
Reference in New Issue
Block a user