Log In  

It took me a while -- as in, time spent inspecting code and debugging app -- to realize that cls(a) ignores prior pal(a,b) calls, hence filling the screen with a.

Assuming this is not a bug, it would be good to mention this in the docs for that function.

Cheers.

P#141732 2024-02-21 13:48 ( Edited 2024-02-21 13:52)

1

PAL only affects CLS if you include the last param as 1 (display palette):

PAL(0,15)
CLS(0) -- clears as black

while

PAL(0,15,1)
CLS(0) -- clears as tan

My guess is the CLS is not coded as a "draw" operation and so uses the display palette instead of the draw palette.

P#141734 2024-02-21 14:11

Thanks! Just what I needed (that, and a second reading of pal's docs :p ).

P#141736 2024-02-21 14:27
3

also cls clears the draw state, so it makes sense than a palette swap is reset before the screen is filled

P#141740 2024-02-21 15:21

[Please log in to post a comment]