Project

General

Profile

Bug #495

Set Transparent only applies to colour zero regardless of index used.

Added by David Baldwin over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
09/15/2020
Due date:
% Done:

0%

Estimated time:
2:00 h
Affected version:

Description

I was under the impression that set transparent could be used to set any palette colour to transparent, however, regardless of the index stated, only colour 0 becomes transparent (and any other palette colour with value $000000)

What's interesting though, is that if you try to set colour 0 to another colour, for example Colour 0,$ff0000, the corresponding palette colour (which is colour number 4 in the standard 32 colour palette, becomes transparent in addition to original colour 0. If this is done, Stop Transparent no longer works.

Example:-

// Run once then de-comment line 6 and run again

#manifest:"aoz"
screen open 0,1280,720,32,0
screen open 1,1280,720,32,0
//screen to front 1
for f=0 to 9
Ink f
Bar f*128,0,128,720
Next f
Screen 0
ink 20
Set font 0,128
Text 0,300,"HELLO WORLD"
Screen 1
set transparent 0
Print "Press a key to STOP TRANSPARENT"
wait key

Stop Transparent
Print "Press a key to SET TRANSPARENT 5"
wait key

Set Transparent 5
Print "Press a key to finish"
wait Key

#1

Updated by David Baldwin over 3 years ago

Ignore code above, there's a line missing, this is correct:-

// Run once then de-comment line 6 and run again

#manifest:"aoz"
screen open 0,1280,720,32,0
screen open 1,1280,720,32,0
//colour 0,$ff0000
screen to front 1
for f=0 to 9
Ink f
Bar f*128,0,128,720
Next f
Screen 0
ink 20
Set font 0,128
Text 0,300,"HELLO WORLD"
Screen 1
set transparent 0
Print "Press a key to STOP TRANSPARENT"
wait key

Stop Transparent
Print "Press a key to SET TRANSPARENT 5"
wait key

Set Transparent 5
Print "Press a key to finish"
wait Key

#2

Updated by Brian Flanagan over 3 years ago

  • Estimated time set to 2:00 h
#3

Updated by Francois Lionet over 3 years ago

  • Status changed from New to Resolved

Fixed!

#4

Updated by David Baldwin over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF