From 899c733ec140153f6d005d9997b81ef8109b29e4 Mon Sep 17 00:00:00 2001 From: Sharoy Veduchi <61427449+doodayev@users.noreply.github.com> Date: Mon, 29 May 2023 03:01:03 -0700 Subject: [PATCH] New version of PaletteGodGenerate (#106) This version makes seeding with GodPick optional and even if you want to seed it will only require one press of "Ok". The rest is taken care of by RandI32. --- src/Home/PaletteEditor/PaletteGod.ZC | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Home/PaletteEditor/PaletteGod.ZC b/src/Home/PaletteEditor/PaletteGod.ZC index 1de348d1..02fe7a8e 100755 --- a/src/Home/PaletteEditor/PaletteGod.ZC +++ b/src/Home/PaletteEditor/PaletteGod.ZC @@ -12,4 +12,33 @@ public U0 PaletteGodGenerate() } } -PaletteGodGenerate; \ No newline at end of file +public U0 PaletteGodGenerate2(Bool NeedForSneed=0) +{ + //This one will involve a lot less tapping + //and be a lot more random + + I64 i; + CBGR24 palette; + I64 SNEED; + I32 FEED; + + if(!NeedForSneed) //By default if no args are passed, it assumes the user + { //doesn't want or care for a seed. + goto Generate; + } + else //If a 1 is passed of course, we seed the RNG + { + + SNEED = GodPick; + Seed(SNEED); + } +Generate: + + for (i=0; i < 16; i++) + { + FEED = RandI32; + palette = FEED & 0xFFFFFF; + gr_palette[i] = palette; + LFBFlush; + } +}