From fb495798a6d0df0f36629ee916ed1ce809bbd975 Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Wed, 10 Nov 2021 03:28:53 -0500 Subject: [PATCH] Update --- src/Home/PaletteEditor/Load.CC | 6 +- src/Home/PaletteEditor/Palettes/Commander.CC | 1 + src/Home/PaletteEditor/Palettes/Marine.CC | 3 +- src/Home/PaletteEditor/Palettes/Temple.CC | 1 + src/Home/PaletteEditor/Palettes/Zsnes.CC | 1 + src/Home/PaletteEditor/Run.CC | 2 +- src/Home/PaletteSelect.CC | 96 ++++++++++++++++++++ 7 files changed, 104 insertions(+), 6 deletions(-) create mode 100755 src/Home/PaletteEditor/Palettes/Commander.CC create mode 100755 src/Home/PaletteEditor/Palettes/Temple.CC create mode 100755 src/Home/PaletteEditor/Palettes/Zsnes.CC create mode 100755 src/Home/PaletteSelect.CC diff --git a/src/Home/PaletteEditor/Load.CC b/src/Home/PaletteEditor/Load.CC index 787b59eb..7abe9b96 100755 --- a/src/Home/PaletteEditor/Load.CC +++ b/src/Home/PaletteEditor/Load.CC @@ -47,7 +47,7 @@ U0 DrawCtrlSlider(CDC *dc,CCtrl *c) GrRect(dc, c->left+SLIDER_BORDER, c->top+SLIDER_BORDER, SLIDER_SPACING*4+2-2*SLIDER_BORDER, - SLIDER_SPACING*2+SLIDER_RANGE-2*SLIDER_BORDER); + SLIDER_SPACING*2+SLIDER_RANGE-2*SLIDER_BORDER); //slider dc->color=BLACK; @@ -58,7 +58,7 @@ U0 DrawCtrlSlider(CDC *dc,CCtrl *c) GrLine(dc, c->left+i*SLIDER_SPACING+i-1, c->top+SLIDER_SPACING, c->left+i*SLIDER_SPACING+i-1, - c->top+SLIDER_SPACING+SLIDER_RANGE-1); +r c->top+SLIDER_SPACING+SLIDER_RANGE-1); } //values @@ -156,7 +156,7 @@ U0 PELoad(Bool prompt) //FileExtRemove(file_path); //StrLastRemove(file_path, "/", file_name); - //StrFirstRemove(file_name+1, StrLen(file_name), without_first_ch); + //StrFirstRemove(file_name+1, StrLen(file_name), without_first_ch); //ToUpper(*upper_case); U8 file = FileRead(file_path); diff --git a/src/Home/PaletteEditor/Palettes/Commander.CC b/src/Home/PaletteEditor/Palettes/Commander.CC new file mode 100755 index 00000000..fae4c458 --- /dev/null +++ b/src/Home/PaletteEditor/Palettes/Commander.CC @@ -0,0 +1 @@ +0xFFFFFF, 0x867ADE, 0x00CC55, 0x5A878B, 0xB80000, 0xCC44CC, 0xDD8855, 0xBBBBBB, 0x777777, 0x0088FF, 0xAAFF66, 0xAAFFEE, 0xFF7777, 0xCA94E8, 0xEEEE77, 0x483AAA \ No newline at end of file diff --git a/src/Home/PaletteEditor/Palettes/Marine.CC b/src/Home/PaletteEditor/Palettes/Marine.CC index 45f1e880..85c52552 100755 --- a/src/Home/PaletteEditor/Palettes/Marine.CC +++ b/src/Home/PaletteEditor/Palettes/Marine.CC @@ -1,2 +1 @@ -0xE2E8EB, 0x5BD2D4, 0x47515D, 0xB46D29, 0xB34F4B, 0xCB711F, 0xFFEF2F, 0x3D272F, 0xA161C, 0xE24594, 0xA1CE97, 0x6DB4BE, 0xFF575B, 0xB1AA9E, 0xD4B475, 0xE2331 - \ No newline at end of file +0xE2E8EB, 0x5BD2D4, 0x496076, 0x307AFF, 0xD86D22, 0xFFD91F, 0xFFEF2F, 0x4F8A97, 0xA161C, 0xE24594, 0xA1CE97, 0x6DB4BE, 0xFF575B, 0xB1AA9E, 0xD53368, 0xE2331 \ No newline at end of file diff --git a/src/Home/PaletteEditor/Palettes/Temple.CC b/src/Home/PaletteEditor/Palettes/Temple.CC new file mode 100755 index 00000000..e17fc192 --- /dev/null +++ b/src/Home/PaletteEditor/Palettes/Temple.CC @@ -0,0 +1 @@ +0x000000, 0x0000AA, 0x00AA00, 0x00AAAA, 0xAA0000, 0xAA00AA, 0xAA5500, 0xAAAAAA, 0x555555, 0x5555FF, 0x55FF55, 0x55FFFF, 0xFF5555, 0xFF55FF, 0xFFFF55, 0xFFFFFF \ No newline at end of file diff --git a/src/Home/PaletteEditor/Palettes/Zsnes.CC b/src/Home/PaletteEditor/Palettes/Zsnes.CC new file mode 100755 index 00000000..134b7d0b --- /dev/null +++ b/src/Home/PaletteEditor/Palettes/Zsnes.CC @@ -0,0 +1 @@ +0xE8E8E9, 0x374B88, 0x6C84FC, 0x297582, 0x63D64E, 0x397AFF, 0xB7822F, 0x25256E, 0x712, 0xFF2A76, 0xA1CE97, 0x6DB4BE, 0x9FA6FF, 0xCA94E8, 0xFFCC00, 0x132C \ No newline at end of file diff --git a/src/Home/PaletteEditor/Run.CC b/src/Home/PaletteEditor/Run.CC index 4342678d..56322154 100755 --- a/src/Home/PaletteEditor/Run.CC +++ b/src/Home/PaletteEditor/Run.CC @@ -1,2 +1,2 @@ -#include "~/PaletteEditor/Load.CC"; +#include "~/PaletteEditor/Load.CC"; PaletteEditor; \ No newline at end of file diff --git a/src/Home/PaletteSelect.CC b/src/Home/PaletteSelect.CC new file mode 100755 index 00000000..31f3c4f9 --- /dev/null +++ b/src/Home/PaletteSelect.CC @@ -0,0 +1,96 @@ + +I64 selected = 1; +I64 dir_length = 5; +U8 files[5];// = 1,2,3,4,5; + +U0 PaletteChange() +{ + DocClear; + + CDirEntry *tmpde1 = NULL, *tmpde2; + U8 *st; + I64 csize = 0xFFFF, c = 0xFFFF, res = 0; + U8 files[0]; + + tmpde1 = FilesFind("~/PaletteEditor/Palettes/*.CC"); + + if (tmpde1) + { + + if(selected > 6) selected = 6; + if(selected < 1) selected = 1; + +// Free(st); + st = MAllocIdent(tmpde1->full_name); + StrLastRemove(st, "/"); + if (!st[2]) + StrCopy(st + 2, "/"); + //Find max columns +// tmpde2 = tmpde1; +// while (tmpde2) +// { +// if (tmpde2->size > csize) +// csize = tmpde2->size; +// if (tmpde2->clus > c) +// c = tmpde2->clus; +// tmpde2 = tmpde2->next; +// } +// csize = Bsr(csize) / 4 + 1; +// c = Bsr(c) / 4 + 1; + while (tmpde1) + { + tmpde2 = tmpde1->next; +// files[res] = tmpde1-name; + res++; +// dir_length++; + FileExtRemove(tmpde1); + if (selected==res) "$$GREEN$$%s\n",tmpde1->name; + else "$$BLACK$$%s\n",tmpde1->name; + + + DirEntryDel(tmpde1); + tmpde1 = tmpde2; + } +// Free(st); + } +// I64 i; +// for(i=0;i