Project

General

Profile

Actions

Bug #930

open

Palette command clears background color to color 63 when color 63 is set.

Added by Brian Flanagan over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Target version:
Start date:
11/09/2022
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

' 256 color screen
Screen Open 0,800,600,256,Lowres
Palette $000000,$FFFFFF,$FF0000,$00FF00,$0000FF
Pen 1 : Paper 0 : Cls 0
Print "this is a test - background color is 0 - black"
Ink 2 : Bar 0,60 To Screen Width,80
Ink 3 : Bar 0,82 To Screen Width,104
Ink 4 : Bar 0, 106 To Screen Width, 128

Wait Key
' Add color 63 (white) to the palette
Palette ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,$FFFF00,$FFFFFF,$00FFFF
Print "this is after white was added in color 63"
Ink 62 : Bar 0, 130 To Screen Width, 150
Ink 63 : Bar 0, 152 To Screen Width, 174
Ink 64 : Bar 0, 176 To Screen Width, 198

Wait Key

Cls 0
Print "Color 0 hasn't altered - just did a Cls 0 again"
Ink 2 : Bar 0,60 To Screen Width,80
Ink 3 : Bar 0,82 To Screen Width,104
Ink 4 : Bar 0, 106 To Screen Width, 128
Ink 62 : Bar 0, 130 To Screen Width, 150
Ink 63 : Bar 0, 152 To Screen Width, 174
Ink 64 : Bar 0, 176 To Screen Width, 198
Wait Key

According to Dave, apparently even if I create a 256 color screen, only 64 colors are defined in the palette.

It sounds like we need to make sure that the size of the palette matches the number of colors defined on the screen.

It's definitely some kind of bug in the Palette command. Other commands can use the palette, but the Palette command itself creates this glitch.

Actions #1

Updated by David Baldwin over 1 year ago

Not what I said, there are 256 colours, but only 62 of them aren't black. Whatever number of colours you have on your screen, only the first 64 are set by AOZ to specific colours, all the rest will be black until you change them.

Actions

Also available in: Atom PDF