From b8fb29fa2d2857c8eb6c98af35a4abf0704fdbcb Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Wed, 31 May 2023 01:52:47 +0900 Subject: [PATCH] Fix --- src/Home/PaletteEditor/Load.ZC | 2 +- src/Home/PaletteEditor/PaletteEdit.ZC | 4 +++- src/Home/PaletteEditor/Palettes/Tradition.ZC | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 src/Home/PaletteEditor/Palettes/Tradition.ZC diff --git a/src/Home/PaletteEditor/Load.ZC b/src/Home/PaletteEditor/Load.ZC index 7678cba0..ebe27070 100755 --- a/src/Home/PaletteEditor/Load.ZC +++ b/src/Home/PaletteEditor/Load.ZC @@ -1,5 +1,5 @@ Cd(__DIR__);; #define PALETTES_PATH "~/PaletteEditor/Palettes/" #include "PaletteSelect" -#include "PaletteGod" +#include "PaletteGod" #include "PaletteEdit" \ No newline at end of file diff --git a/src/Home/PaletteEditor/PaletteEdit.ZC b/src/Home/PaletteEditor/PaletteEdit.ZC index 5fda5cc7..b6b5c21c 100755 --- a/src/Home/PaletteEditor/PaletteEdit.ZC +++ b/src/Home/PaletteEditor/PaletteEdit.ZC @@ -357,6 +357,8 @@ public U0 PaletteEditor() " PreviousColor(,,SC_CURSOR_UP);" " NextColor(,,SC_CURSOR_RIGHT);" " NextColor(,,SC_CURSOR_DOWN);" + " RandomColor(,,'r');" + " RandomPalette(,,'R');" "}" "About {" " Info(,CH_CTRLI);" @@ -431,7 +433,7 @@ public U0 PaletteEditor() LFBFlush; break; case 'R': - gr_palette[selected_color] = PaletteGod(FALSE, TRUE); + gr_palette[selected_color] = PaletteGod(FALSE, TRUE); LFBFlush; break; case CH_CTRLI: diff --git a/src/Home/PaletteEditor/Palettes/Tradition.ZC b/src/Home/PaletteEditor/Palettes/Tradition.ZC new file mode 100755 index 00000000..e0ef467b --- /dev/null +++ b/src/Home/PaletteEditor/Palettes/Tradition.ZC @@ -0,0 +1,10 @@ +public CBGR24 gr_palette_tradition[COLORS_NUM] = { +0xE8E8E9, 0x374B88, 0x4FBC2C, 0x29CACE, 0xDD0000, 0x8C33FF, 0x875721, 0x7F7A7C, 0x15171C, 0x2EA1FF, 0x4FFF00, 0xFFBB, 0x690000, 0x6E3FFC, 0xFFCC00, 0xC0F14 +}; +public U0 PaletteSetTradition(Bool persistent=TRUE) +{ + GrPaletteSet(gr_palette_tradition); + LFBFlush; + if (persistent) + fp_set_std_palette = &PaletteSetTradition; +} \ No newline at end of file