Pad all single-digit hexadecimal values with zero (#504)

* Pad all single-digit hexadecimal values with zero

* One more fix
This commit is contained in:
Christian Semmler
2024-01-29 16:17:17 -05:00
committed by GitHub
parent 35def3013a
commit bcdddd4c7e
147 changed files with 311 additions and 311 deletions

View File

@@ -342,7 +342,7 @@ MxResult HelicopterSubclass::FUN_100040a0(Vector4& p_v, float p_f)
{
MxU32 state = m_unk0x30;
if (state == 1) {
p_v.EqualsImpl(m_unk0x0.GetData());
p_v.EqualsImpl(m_unk0x00.GetData());
p_v[3] = acos(p_v[3]) * (1 - p_f) * 2.0;
return p_v.NormalizeQuaternion();
}
@@ -352,7 +352,7 @@ MxResult HelicopterSubclass::FUN_100040a0(Vector4& p_v, float p_f)
return p_v.NormalizeQuaternion();
}
else if (state == 3) {
double d1 = p_v.Dot(&m_unk0x0, &m_unk0x18), d2;
double d1 = p_v.Dot(&m_unk0x00, &m_unk0x18), d2;
if (d1 + 1 > 0.00001) {
if (1 - d1 > 0.00001) {
double d = acos(d1);
@@ -365,18 +365,18 @@ MxResult HelicopterSubclass::FUN_100040a0(Vector4& p_v, float p_f)
d2 = p_f;
}
for (MxS32 i = 0; i < 4; i++) {
p_v[i] = m_unk0x18[i] * d2 + m_unk0x0[i] * d1;
p_v[i] = m_unk0x18[i] * d2 + m_unk0x00[i] * d1;
}
return SUCCESS;
}
p_v[0] = -m_unk0x0[1];
p_v[1] = m_unk0x0[1];
p_v[2] = -m_unk0x0[3];
p_v[3] = m_unk0x0[2];
p_v[0] = -m_unk0x00[1];
p_v[1] = m_unk0x00[1];
p_v[2] = -m_unk0x00[3];
p_v[3] = m_unk0x00[2];
d1 = sin((1 - p_f) * 1.570796326794895);
d2 = sin(p_f * 1.570796326794895);
for (MxS32 i = 0; i < 3; i++) {
p_v[i] = m_unk0x0[i] * d1 + p_v[i] * d2;
p_v[i] = m_unk0x00[i] * d1 + p_v[i] * d2;
}
return SUCCESS;
}

View File

@@ -3,7 +3,7 @@
#include "decomp.h"
DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50); // 1000acd7
DECOMP_SIZE_ASSERT(LegoVehicleBuildState::UnkStruct, 0xc);
DECOMP_SIZE_ASSERT(LegoVehicleBuildState::UnkStruct, 0x0c);
// FUNCTION: LEGO1 0x10017c00
LegoVehicleBuildState::UnkStruct::UnkStruct()

View File

@@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(AnimState, 0x1c);
// FUNCTION: LEGO1 0x10064ff0
AnimState::AnimState()
{
m_unk0xc = 0;
m_unk0x0c = 0;
m_unk0x10 = NULL;
m_unk0x14 = 0;
m_unk0x18 = NULL;

View File

@@ -47,7 +47,7 @@ void GifManager::FUN_10099cc0(GifData* p_data)
for (GifList::iterator it = m_list.begin(); it != m_list.end(); it++) {
#endif
if (*it == p_data) {
// TODO: This is wrong, but what is at +0xc on the iterator?
// TODO: This is wrong, but what is at +0x0c on the iterator?
*it = NULL;
if (p_data->m_texture->Release() == TRUE) {

View File

@@ -67,7 +67,7 @@ LegoGameState::LegoGameState()
SetROIHandlerFunction();
this->m_stateCount = 0;
this->m_unk0xc = 0;
this->m_unk0x0c = 0;
this->m_savePath = NULL;
this->m_unk0x424 = 0;
this->m_prevArea = 0;
@@ -131,7 +131,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
fileStream.Write(&maybeVersion, 4);
fileStream.Write(&m_unk0x24, 2);
fileStream.Write(&m_unk0x10, 2);
fileStream.Write(&m_unk0xc, 1);
fileStream.Write(&m_unk0x0c, 1);
for (MxS32 i = 0; i < sizeof(g_colorSaveData) / sizeof(g_colorSaveData[0]); ++i) {
if (WriteVariable(&fileStream, variableTable, g_colorSaveData[i].m_targetName) == FAILURE)

View File

@@ -8,9 +8,9 @@ AmbulanceMissionState::AmbulanceMissionState()
m_unk0x10 = 0;
m_unk0x12 = 0;
m_unk0x14 = 0;
m_unk0x8 = 0;
m_unk0x08 = 0;
m_unk0x16 = 0;
m_unk0xc = 0;
m_unk0x0c = 0;
m_unk0x18 = 0;
m_color1 = 0;
m_color2 = 0;

View File

@@ -5,8 +5,8 @@ DECOMP_SIZE_ASSERT(HospitalState, 0x18)
// FUNCTION: LEGO1 0x10076370
HospitalState::HospitalState()
{
this->m_unk0xc = 0;
this->m_unk0xe = 0;
this->m_unk0x0c = 0;
this->m_unk0x0e = 0;
this->m_unk0x10 = 0;
this->m_unk0x12 = 0;
this->m_unk0x14 = 0;

View File

@@ -133,7 +133,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
StopBookAnimation();
m_bookAnimationTimer = 0;
if (m_infocenterState->GetUnknown0x74() == 0xc) {
if (m_infocenterState->GetUnknown0x74() == 0x0c) {
StartCredits();
m_infocenterState->SetUnknown0x74(0xd);
}

View File

@@ -303,12 +303,12 @@ void Score::FillArea(MxU32 p_x, MxU32 p_y, MxS16 p_color)
data[0] = 0x11;
data[17] = 0x28;
data[18] = 0x28;
data[1] = 0xf;
data[1] = 0x0f;
MxU32 size = data[p_x + 14];
MxU8* ptr = data[p_x + 4] + data[p_y + 9] + m_surface;
MxS32 count = data[p_y + 19];
data[2] = 0x8;
data[3] = 0x5;
data[2] = 0x08;
data[3] = 0x05;
MxU32 value = data[p_color];
for (; count > 0; count--) {
memset(ptr++, value, size);

View File

@@ -13,7 +13,7 @@ Radio::Radio()
NotificationManager()->Register(this);
ControlManager()->Register(this);
m_unk0xc = TRUE;
m_unk0x0c = TRUE;
CreateRadioState();
}
@@ -33,8 +33,8 @@ MxLong Radio::Notify(MxParam& p_param)
// FUNCTION: LEGO1 0x1002cdc0
void Radio::Initialize(MxBool p_und)
{
if (m_unk0xc != p_und) {
m_unk0xc = p_und;
if (m_unk0x0c != p_und) {
m_unk0x0c = p_und;
CreateRadioState();
}
}

View File

@@ -7,8 +7,8 @@ DECOMP_SIZE_ASSERT(PoliceState, 0x10)
// FUNCTION: LEGO1 0x1005e7c0
PoliceState::PoliceState()
{
m_unk0xc = 0;
m_unk0x8 = (rand() % 2 == 0) ? 501 : 500;
m_unk0x0c = 0;
m_unk0x08 = (rand() % 2 == 0) ? 501 : 500;
}
// FUNCTION: LEGO1 0x1005e990
@@ -19,11 +19,11 @@ MxResult PoliceState::VTable0x1c(LegoFile* p_legoFile)
}
if (p_legoFile->IsReadMode()) {
p_legoFile->Read(&m_unk0x8, sizeof(m_unk0x8));
p_legoFile->Read(&m_unk0x08, sizeof(m_unk0x08));
}
else {
undefined4 unk0x8 = m_unk0x8;
p_legoFile->Write(&unk0x8, sizeof(m_unk0x8));
undefined4 unk0x08 = m_unk0x08;
p_legoFile->Write(&unk0x08, sizeof(m_unk0x08));
}
return SUCCESS;

View File

@@ -202,8 +202,8 @@ void LegoAnimPresenter::EndAction()
// FUNCTION: LEGO1 0x100a0b30
LegoAnimClass::LegoAnimClass()
{
m_unk0x8 = 0;
m_unk0xc = 0;
m_unk0x08 = 0;
m_unk0x0c = 0;
m_unk0x10 = 0;
m_unk0x14 = 0;
}