mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-01-13 16:16:31 +00:00
Added several more palettes
This commit is contained in:
parent
8e572c4e67
commit
12e69c5ce6
9 changed files with 109 additions and 41 deletions
Binary file not shown.
Binary file not shown.
|
@ -1,13 +0,0 @@
|
|||
Cd(__DIR__);;
|
||||
|
||||
//If these are not present in /Home, it uses the version in the root dir. You
|
||||
//can make your own, modified, version of these files in your /Home directory.
|
||||
#include "~/HomeLocalize"
|
||||
#include "/Zenith/Boot/MakeBoot"
|
||||
#include "/Zenith/Utils/MakeUtils"
|
||||
#include "~/HomeWrappers"
|
||||
MapFileLoad("::/Kernel/Kernel");
|
||||
MapFileLoad("::/Compiler/Compiler");
|
||||
#include "~/HomeKeyPlugIns"
|
||||
#include "~/HomeSys"
|
||||
Cd("..");;
|
BIN
src/Kernel.BIN.C
BIN
src/Kernel.BIN.C
Binary file not shown.
Binary file not shown.
|
@ -223,7 +223,7 @@ public U0 MemBIOSRep()
|
|||
Yield;
|
||||
tmpmr=dev.mem32_head.next;
|
||||
while (tmpmr!=&dev.mem32_head) {
|
||||
"%z:%08X-%08X\n",
|
||||
"%z:%08X-%08X\n",
|
||||
tmpmr->type,"Unused\0RAM\0Device",tmpmr->base,tmpmr->base+tmpmr->size-1;
|
||||
tmpmr=tmpmr->next;
|
||||
}
|
||||
|
@ -261,6 +261,7 @@ public U0 MemBIOSRep()
|
|||
m20++;
|
||||
}
|
||||
}
|
||||
'\n';
|
||||
}
|
||||
|
||||
public U0 MemPageRep()
|
||||
|
|
|
@ -22,7 +22,7 @@ _GR_UPDATE_LINE64::
|
|||
JE @@10
|
||||
MOV U64 [RDI],RAX
|
||||
XLATB
|
||||
ROR RAX,8
|
||||
ROR RAX,8
|
||||
XLATB
|
||||
ROR RAX,8
|
||||
XLATB
|
||||
|
|
|
@ -168,7 +168,7 @@ U0 GrInit2()
|
|||
HashDefineListAdd("ST_SPRITE_ELEM_CODES",SPHT_ELEM_CODE,gr.sprite_hash);
|
||||
gr.screen_zoom=1;
|
||||
|
||||
PaletteSetGruvboxLight;
|
||||
PaletteSetDark;
|
||||
|
||||
gr.to_8_bits =MAlloc(256*sizeof(I64));
|
||||
gr.to_8_colors=MAlloc(256*sizeof(I64));
|
||||
|
|
|
@ -3,37 +3,41 @@ public U8 gr_rainbow_10[10] = {BLACK,BROWN,RED,LTRED,YELLOW,GREEN,BLUE,PURPLE,LT
|
|||
|
||||
DefineListLoad("ST_RAINBOW_10","BLACK\0BROWN\0RED\0LTRED\0YELLOW\0GREEN\0BLUE\0PURPLE\0LTGRAY\0WHITE\0");
|
||||
|
||||
public CBGR48 gr_palette_std[COLORS_NUM]={
|
||||
0x000000000000,0x00000000AAAA,0x0000AAAA0000,0x0000AAAAAAAA,
|
||||
0xAAAA00000000,0xAAAA0000AAAA,0xAAAA55550000,0xAAAAAAAAAAAA,
|
||||
0x555555555555,0x55555555FFFF,0x5555FFFF5555,0x5555FFFFFFFF,
|
||||
0xFFFF55555555,0xFFFF5555FFFF,0xFFFFFFFF5555,0xFFFFFFFFFFFF};
|
||||
|
||||
public CBGR24 gr_palette_gruvbox_light[COLORS_NUM] = {
|
||||
0x3C3836, 0x076678, 0x79740E, 0x427B58, 0x9D0006, 0x8F3F71, 0xB57614, 0x928374,
|
||||
0x7C6F64, 0x458588, 0x98971A, 0x689D6A, 0xCC241D, 0xB16286, 0xD79921, 0xFBF1C7
|
||||
};
|
||||
|
||||
public CBGR24 gr_palette_pastel[COLORS_NUM]={
|
||||
0xE8E8D3, 0x8197BF, 0x19CB00, 0x668799, 0xCF6A4C, 0x8787AF, 0xFAD07A, 0x525252,
|
||||
0x888888, 0xACCAFF, 0x23FD00, 0x80BFAF, 0xFF9D80, 0xC4C4FF, 0xFFEFBF, 0x151515
|
||||
};
|
||||
|
||||
public CBGR24 gr_palette_gray[COLORS_NUM] = {
|
||||
0x000000, 0x111111, 0x222222, 0x333333, 0x444444, 0x555555, 0x666666, 0x777777,
|
||||
0x888888, 0x999999, 0xAAAAAA, 0xBBBBBB, 0xCCCCCC, 0xDDDDDD, 0xEEEEEE, 0xFFFFFF
|
||||
};
|
||||
|
||||
public U0 GrPaletteGet(CBGR24 *bgr24)
|
||||
{//16 colors
|
||||
MemCopy(bgr24, &gr_palette, sizeof(CBGR24) * 16);
|
||||
}
|
||||
|
||||
public U0 GrPaletteSet(CBGR48 *bgr24)
|
||||
public U0 GrPaletteSet(CBGR24 *bgr24)
|
||||
{//16 colors
|
||||
MemCopy(&gr_palette, bgr24, sizeof(CBGR24) * 16);
|
||||
}
|
||||
|
||||
//legacy
|
||||
public CBGR48 gr_palette_std[COLORS_NUM]={
|
||||
0x000000000000,0x00000000AAAA,0x0000AAAA0000,0x0000AAAAAAAA,
|
||||
0xAAAA00000000,0xAAAA0000AAAA,0xAAAA55550000,0xAAAAAAAAAAAA,
|
||||
0x555555555555,0x55555555FFFF,0x5555FFFF5555,0x5555FFFFFFFF,
|
||||
0xFFFF55555555,0xFFFF5555FFFF,0xFFFFFFFF5555,0xFFFFFFFFFFFF};
|
||||
|
||||
public CBGR24 gr32_palette_std[COLORS_NUM]={
|
||||
0x000000, 0x0000AA, 0x00AA00, 0x00AAAA, 0xAA0000, 0xAA00AA, 0xAA5500, 0xAAAAAA,
|
||||
0x555555, 0x5555FF, 0x55FF55, 0x55FFFF, 0xFF5555, 0xFF55FF, 0xFFFF55, 0xFFFFFF
|
||||
};
|
||||
|
||||
public U0 PaletteSetStd(Bool persistent=TRUE)
|
||||
{//Activate std palette.
|
||||
GrPaletteSet(gr32_palette_std);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetStd;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_gray[COLORS_NUM] = {
|
||||
0x000000, 0x111111, 0x222222, 0x333333, 0x444444, 0x555555, 0x666666, 0x777777,
|
||||
0x888888, 0x999999, 0xAAAAAA, 0xBBBBBB, 0xCCCCCC, 0xDDDDDD, 0xEEEEEE, 0xFFFFFF
|
||||
};
|
||||
|
||||
public U0 PaletteSetGray(Bool persistent=TRUE)
|
||||
{//Activate gray palette.
|
||||
GrPaletteSet(gr_palette_gray);
|
||||
|
@ -42,21 +46,97 @@ public U0 PaletteSetGray(Bool persistent=TRUE)
|
|||
fp_set_std_palette = &PaletteSetGray;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_gruvbox_light[COLORS_NUM] = {
|
||||
0x3C3836, 0x076678, 0x79740E, 0x427B58, 0x9D0006, 0x8F3F71, 0xB57614, 0x928374,
|
||||
0x7C6F64, 0x458588, 0x98971A, 0x689D6A, 0xCC241D, 0xB16286, 0xD79921, 0xFBF1C7
|
||||
};
|
||||
|
||||
public U0 PaletteSetGruvboxLight(Bool persistent=TRUE)
|
||||
{//Activate std palette.
|
||||
{//Activate gruvbox light palette.
|
||||
GrPaletteSet(gr_palette_gruvbox_light);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetGruvboxLight;
|
||||
fp_set_std_palette = &PaletteSetGruvboxLight;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_pastel[COLORS_NUM]={
|
||||
0xE8E8D3, 0x8197BF, 0x19CB00, 0x668799, 0xCF6A4C, 0x8787AF, 0xFAD07A, 0x525252,
|
||||
0x888888, 0xACCAFF, 0x23FD00, 0x80BFAF, 0xFF9D80, 0xC4C4FF, 0xFFEFBF, 0x151515
|
||||
};
|
||||
|
||||
public U0 PaletteSetPastel(Bool persistent=TRUE)
|
||||
{//Activate std palette.
|
||||
{//Activate pastel palette.
|
||||
GrPaletteSet(gr_palette_pastel);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetPastel;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_monokai[COLORS_NUM]={
|
||||
0x272822, 0x01549E, 0x74AA04, 0x1A83A6, 0xA70334, 0x89569C, 0xB6B649, 0xCACACA,
|
||||
0x7C7C7C, 0x0373F5, 0x8DD006, 0x58C2E5, 0xF3044B, 0xA87DB8, 0xCCCC81, 0xFFFFFF
|
||||
};
|
||||
|
||||
public U0 PaletteSetMonokai(Bool persistent=TRUE)
|
||||
{//Activate monokai palette.
|
||||
GrPaletteSet(gr_palette_monokai);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetMonokai;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_dark[COLORS_NUM] = {
|
||||
0xFFFFFF, 0x6095C5, 0x6D9E3F, 0x3BA275, 0xD370A3, 0xAC7BDE, 0xB58858, 0x686868,
|
||||
0x404040, 0x98CBFE, 0xA3D572, 0x75DAA5, 0xFFA7DA, 0xE5B0FF, 0xEFBD8B, 0x232323
|
||||
};
|
||||
|
||||
public U0 PaletteSetDark(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_dark);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetDark;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_smooth[COLORS_NUM] = {
|
||||
0xDDDDDD, 0x4E9FB1, 0xA0CF5D, 0x42717B, 0xD23D3D, 0x8542FF, 0xF39D21, 0x404040,
|
||||
0x707070, 0x7DC1CF, 0xB8D68C, 0x6D878D, 0xE84F4F, 0x9B64FB, 0xE1AA5D, 0x151515
|
||||
};
|
||||
|
||||
public U0 PaletteSetSmooth(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_smooth);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetSmooth;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_dorado[COLORS_NUM]= {
|
||||
0xFFFFFF, 0x5879AF, 0x468459, 0x008592, 0xA9635D, 0x9C6594, 0x84763D, 0x4E4E4E,
|
||||
0x777777, 0xB3D1FF, 0x9DDEAF, 0x79E0ED, 0xFFBBB2, 0xFABDF0, 0xE0CE91, 0x292929
|
||||
};
|
||||
|
||||
public U0 PaletteSetDorado(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_dorado);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetDorado;
|
||||
}
|
||||
|
||||
public CBGR24 gr_palette_euphrasia[COLORS_NUM] = {
|
||||
0x1C2027, 0x355C9A, 0x38912B, 0x258F8F, 0xA62A3E, 0x7C4F9F, 0xB27D12, 0x666666,
|
||||
0xC0C0C0, 0x45A3E6, 0x93C724, 0x60C6C8, 0xF04758, 0xC953EF, 0xDDB62B, 0xFFFFFF
|
||||
};
|
||||
|
||||
|
||||
public U0 PaletteSetEuphrasia(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_euphrasia);
|
||||
VGAFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetEuphrasia;
|
||||
}
|
||||
|
||||
|
||||
PaletteSetEuphrasia;
|
Loading…
Reference in a new issue