mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
forgot to commit the script
This commit is contained in:
parent
63e0663679
commit
75f7d1ef84
1 changed files with 26 additions and 0 deletions
26
src/System/Utils/GPLPalette.ZC
Executable file
26
src/System/Utils/GPLPalette.ZC
Executable file
|
@ -0,0 +1,26 @@
|
|||
U0 PaletteExportGPL(U8* name="Palette", CBGR24 *pal=NULL) {
|
||||
I64 i;
|
||||
U8 *filename;
|
||||
CDoc *out = DocNew;
|
||||
if (!pal)
|
||||
{
|
||||
pal = MAlloc(sizeof(CBGR24) * COLORS_NUM);
|
||||
GrPaletteGet(pal);
|
||||
}
|
||||
|
||||
filename = ExtDefault(name, "gpl");
|
||||
StrCopy(out->filename.name, filename);
|
||||
Free(filename);
|
||||
|
||||
out->flags |= DOCF_PLAIN_TEXT | DOCF_NO_CURSOR;
|
||||
|
||||
DocPrint(out, "GIMP Palette\nName: %s\nColumns: 16\n", name);
|
||||
|
||||
for(i = 0; i < COLORS_NUM; i++)
|
||||
DocPrint(out, "%d %d %d Zeal%d\n", pal[i].r, pal[i].g, pal[i].b, i);
|
||||
|
||||
Free(pal);
|
||||
|
||||
DocWrite(out);
|
||||
DocDel(out);
|
||||
}
|
Loading…
Reference in a new issue