mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Match Act1State::Serialize
This commit is contained in:
parent
9e204334a6
commit
a2c5498c2c
@ -1337,7 +1337,6 @@ MxResult Act1State::Serialize(LegoStorage* p_storage)
|
|||||||
m_racecarPlane.Serialize(p_storage);
|
m_racecarPlane.Serialize(p_storage);
|
||||||
|
|
||||||
if (p_storage->IsWriteMode()) {
|
if (p_storage->IsWriteMode()) {
|
||||||
// TODO: Seems to match better when using strcmp directly instead of IsPresent
|
|
||||||
if (strcmp(m_helicopterPlane.m_name.GetData(), "")) {
|
if (strcmp(m_helicopterPlane.m_name.GetData(), "")) {
|
||||||
if (!m_helicopterWindshield) {
|
if (!m_helicopterWindshield) {
|
||||||
WriteDefaultTexture(p_storage, "chwind.gif");
|
WriteDefaultTexture(p_storage, "chwind.gif");
|
||||||
@ -1414,54 +1413,45 @@ MxResult Act1State::Serialize(LegoStorage* p_storage)
|
|||||||
}
|
}
|
||||||
else if (p_storage->IsReadMode()) {
|
else if (p_storage->IsReadMode()) {
|
||||||
if (strcmp(m_helicopterPlane.m_name.GetData(), "")) {
|
if (strcmp(m_helicopterPlane.m_name.GetData(), "")) {
|
||||||
m_helicopterWindshield = ReadNamedTexture(p_storage);
|
if ((m_helicopterWindshield = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_helicopterWindshield == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_helicopterJetLeft = ReadNamedTexture(p_storage);
|
if ((m_helicopterJetLeft = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_helicopterJetLeft == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_helicopterJetRight = ReadNamedTexture(p_storage);
|
if ((m_helicopterJetRight = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_helicopterJetRight == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(m_jetskiPlane.m_name.GetData(), "")) {
|
if (strcmp(m_jetskiPlane.m_name.GetData(), "")) {
|
||||||
m_jetskiFront = ReadNamedTexture(p_storage);
|
if ((m_jetskiFront = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_jetskiFront == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_jetskiWindshield = ReadNamedTexture(p_storage);
|
if ((m_jetskiWindshield = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_jetskiWindshield == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(m_dunebuggyPlane.m_name.GetData(), "")) {
|
if (strcmp(m_dunebuggyPlane.m_name.GetData(), "")) {
|
||||||
m_dunebuggyFront = ReadNamedTexture(p_storage);
|
if ((m_dunebuggyFront = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_dunebuggyFront == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(m_racecarPlane.m_name.GetData(), "")) {
|
if (strcmp(m_racecarPlane.m_name.GetData(), "")) {
|
||||||
m_racecarFront = ReadNamedTexture(p_storage);
|
if ((m_racecarFront = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_racecarFront == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_racecarBack = ReadNamedTexture(p_storage);
|
if ((m_racecarBack = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_racecarBack == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_racecarTail = ReadNamedTexture(p_storage);
|
if ((m_racecarTail = ReadNamedTexture(p_storage)) == NULL) {
|
||||||
if (m_racecarTail == NULL) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user