mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
Match MxBitmap::ImportColorsToPalette
This commit is contained in:
parent
494a556f8e
commit
a7b81539b1
1 changed files with 6 additions and 3 deletions
|
@ -375,15 +375,16 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett
|
||||||
|
|
||||||
if (p_palette) {
|
if (p_palette) {
|
||||||
if (p_palette->GetEntries(entries))
|
if (p_palette->GetEntries(entries))
|
||||||
return ret;
|
goto done;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MxPalette local_pal;
|
MxPalette local_pal;
|
||||||
if (local_pal.GetEntries(entries))
|
if (local_pal.GetEntries(entries))
|
||||||
return ret;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (MxS32 i = 0; i < 256; i++) {
|
MxS32 i;
|
||||||
|
for (i = 0; i < 256; i++) {
|
||||||
p_rgbquad[i].rgbRed = entries[i].peRed;
|
p_rgbquad[i].rgbRed = entries[i].peRed;
|
||||||
p_rgbquad[i].rgbGreen = entries[i].peGreen;
|
p_rgbquad[i].rgbGreen = entries[i].peGreen;
|
||||||
p_rgbquad[i].rgbBlue = entries[i].peBlue;
|
p_rgbquad[i].rgbBlue = entries[i].peBlue;
|
||||||
|
@ -391,5 +392,7 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = SUCCESS;
|
ret = SUCCESS;
|
||||||
|
|
||||||
|
done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue