• Жильцов Дмитрий Андреевич's avatar
    Palettes: the Temple remembers its colors, Terry's are one include away
    · 1e855c9f
    The palettes were a sin of forgetfulness.  #include "::/Misc/PalMonokai"
    painted the Temple, and the first focused window that closed painted it
    back: TaskEnd() calls fp_set_std_palette, which was PaletteSetStd.  A
    Reboot forgot the choice entirely.  Even the CIA keeps better records.
    
    Now Adam keeps gr_palette_user and fp_set_std_palette gives that one back.
    PaletteUserSet(bgr48,name) sets it and writes it in Terry's registry
    under Adam/PaletteUser.  RegInit() runs every Adam/ branch in Adam at
    boot, so the palette is back before the first window is drawn.  A drive
    that is not writable, like the live CD, keeps it until Reboot.
    
    PalConEmu, PalMonokai and PalUbuntu call PaletteUserSet.  The new
    PalStd gives back Terry's 16 colors, the ones God told him, and that
    choice persists too.  USER_PALETTE is gone, nothing read it.
    
    Tested on a virtio-scsi disk from tools/build_hdd.py, three boots:
    Monokai chosen, a focused window killed, still Monokai.  Rebooted, still
    Monokai, PalStd.  Rebooted, Std.  Still 16 colors.  Always 16 colors.
    1e855c9f