SkyPortal-plugin/Source/SkyPortal/Private/SkyPortalFigure.cpp
2024-09-29 12:20:37 +02:00

34 lines
749 B
C++

#pragma once
#include "SkyPortalFigure.h"
UFigureData::UFigureData()
{
ClearData();
}
int32 UFigureData::GetFigureID()
{
if (ID == 0) {
int16_t OutFigureID = 0;
// The figure ID is stored in Block 1 of Sector 0 (i.e., data[1]), bytes 0 and 1 (16-bit integer, little-endian)
OutFigureID = decryptedData[1][0] | // Least significant byte
(data[1][1] << 8); // Most significant byte, shifted left by 8 bits
ID = OutFigureID;// Return the 16-bit figure ID
return OutFigureID;
}
else { return ID; }
/*
// Variant ID is stored in Block 0, bytes 4 to 5 (16-bit integer, little-endian)
OutVariantID = (DataBlock.blockdata[0][5] << 8) |
DataBlock.blockdata[0][4];
*/
};
void UFigureData::ClearData()
{
}