mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +00:00
Implement/match a few LegoEntity functions (#445)
* Implement/match a few LegoEntity functions * Add annotations
This commit is contained in:
committed by
GitHub
parent
b1fdb780de
commit
6af0c6cb1a
@@ -49,12 +49,13 @@ void LegoPalettePresenter::Destroy()
|
||||
MxResult LegoPalettePresenter::ParsePalette(MxStreamChunk* p_chunk)
|
||||
{
|
||||
MxU8 buffer[40];
|
||||
RGBQUAD palleteData[256];
|
||||
RGBQUAD palette[256];
|
||||
MxResult result = FAILURE;
|
||||
|
||||
LegoMemoryStream stream((char*) p_chunk->GetData());
|
||||
if (stream.Read(buffer, 40) == SUCCESS) {
|
||||
if (stream.Read(palleteData, sizeof(RGBQUAD) * 256) == SUCCESS) {
|
||||
m_palette = new MxPalette(palleteData);
|
||||
if (stream.Read(buffer, sizeof(buffer)) == SUCCESS) {
|
||||
if (stream.Read(palette, sizeof(palette)) == SUCCESS) {
|
||||
m_palette = new MxPalette(palette);
|
||||
if (m_palette) {
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user