SkyPortal-plugin/Source/SkyPortal/Private/SkyPortalFigure.cpp

31 lines
703 B
C++
Raw Normal View History

#pragma once
#include "SkyPortalFigure.h"
2024-09-26 13:01:42 +00:00
uint32 FigureData::GetFigureID()
{
2024-09-26 13:01:42 +00:00
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)
2024-09-26 23:39:33 +00:00
OutFigureID = decryptedData[1][0] | // Least significant byte
2024-09-26 13:01:42 +00:00
(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];
*/
2024-09-26 13:01:42 +00:00
};
void FigureData::ClearData()
{
}