mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-12-22 05:42:29 -05:00
9e686e2a87
* cmake+ci: run clang-tidy * Remove DESCRIPTION from LEGO1/LegoOmni.mingw.def * Add initial .clang-tidy and fixes * fix file perms * Comment out DESCRIPTION * Remove LegoEntity::~LegoEntity and MxPresenter::~MxPresenter from mingw's LEGO1.def * Looks like clang is allergic to the libs in the directx5 SDK * Update .clang-tidy * Fix typo in .clang-tidy * Attempt to generate an action error * Revert "Attempt to generate an action error" This reverts commit 96c4c65fedbc4102837f4bcbbb9ee83a7d14cba3. * cmake: test with -Wparentheses + optionally with -Werror * ci: -k0 is a Ninja argument * Use -Werror only for msys2 builds * cmake: only emit warnings for specific warnings * cmake: and don't do -Werror/-WX anymore * Fix warnings * Fix mingw warnings --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
72 lines
1.6 KiB
C++
72 lines
1.6 KiB
C++
#include "legounksavedatawriter.h"
|
|
|
|
#include "legogamestate.h"
|
|
#include "roi/legoroi.h"
|
|
|
|
DECOMP_SIZE_ASSERT(LegoSaveDataEntry3, 0x108);
|
|
|
|
// GLOBAL: LEGO1 0x10104f20
|
|
LegoSaveDataEntry3 g_saveData3[66];
|
|
|
|
// FUNCTION: LEGO1 0x10083310
|
|
MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_stream)
|
|
{
|
|
MxResult result = FAILURE;
|
|
|
|
// This should probably be a for loop but I can't figure out how to
|
|
// make it match as a for loop.
|
|
LegoSaveDataEntry3* entry = g_saveData3;
|
|
const LegoSaveDataEntry3* end = &g_saveData3[66];
|
|
|
|
while (TRUE) {
|
|
if (p_stream->Write(&entry->m_savePart1, 4) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart2, 4) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart3, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_currentFrame, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart5, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart6, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart7, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart8, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart9, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (p_stream->Write(&entry->m_savePart10, 1) != SUCCESS) {
|
|
break;
|
|
}
|
|
if (++entry >= end) {
|
|
result = SUCCESS;
|
|
break;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
// STUB: LEGO1 0x10083500
|
|
AutoROI* LegoUnkSaveDataWriter::FUN_10083500(undefined4, undefined4)
|
|
{
|
|
// TODO
|
|
// involves an STL map with a _Nil node at 0x100fc508
|
|
return NULL;
|
|
}
|
|
|
|
// STUB: LEGO1 0x10083db0
|
|
void LegoUnkSaveDataWriter::FUN_10083db0(LegoROI* p_roi)
|
|
{
|
|
// TODO
|
|
}
|