This commit is contained in:
y4my4my4m 2023-05-31 02:21:09 +09:00
parent 18e545dfe8
commit 2f7381847a
2 changed files with 7 additions and 8 deletions

View file

@ -171,7 +171,6 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
GrRect(dc, 6, (size2 * 2) + 65 + 16 * i, 80, 18); GrRect(dc, 6, (size2 * 2) + 65 + 16 * i, 80, 18);
if (i == selected_color) if (i == selected_color)
dc->color = 15; dc->color = 15;
else else
@ -421,7 +420,7 @@ public U0 PaletteEditor()
if (selected_color == 15) if (selected_color == 15)
selected_color = -1; selected_color = -1;
SelectColor(selected_color + 1, c); SelectColor(selected_color + 1, c);
break; break;
} }
break; break;
case CH_CTRLO: case CH_CTRLO:
@ -429,7 +428,7 @@ public U0 PaletteEditor()
current_palette = PaletteSelect; current_palette = PaletteSelect;
break; break;
case 'r': case 'r':
gr_palette[selected_color] = ColorGod(FALSE, TRUE); gr_palette[selected_color] = ColorGod(TRUE);
LFBFlush; LFBFlush;
break; break;
case 'R': case 'R':

View file

@ -1,9 +1,7 @@
CBGR24 ColorGod(Bool seedUse=TRUE, Bool instant=TRUE) CBGR24 ColorGod(Bool instant=TRUE)
{ {
// Generate a random color, seed-based or not // Generate a random color, seed-based or not
if (seedUse) if (instant)
Seed(GodPick);
if (instant || seedUse)
return RandI32 & 0xFFFFFF; return RandI32 & 0xFFFFFF;
else else
return GodPick & 0xFFFFFF; return GodPick & 0xFFFFFF;
@ -13,8 +11,10 @@ public U0 PaletteGod(Bool seedUse=TRUE, Bool instant=TRUE)
{ {
// Generate a random palette, seed-based or not // Generate a random palette, seed-based or not
I64 i; I64 i;
if (seedUse)
Seed(GodPick);
for (i=0; i < 16; i++) for (i=0; i < 16; i++)
gr_palette[i] = ColorGod(seedUse, instant); gr_palette[i] = ColorGod(instant);
LFBFlush; LFBFlush;
} }