Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reaction to youtube video, can't seem to comment this over there... #1

Open
MiltonW opened this issue Jan 14, 2024 · 1 comment
Open

Comments

@MiltonW
Copy link

MiltonW commented Jan 14, 2024

The -1 is because you loop from 0. If you want to loop through 3 elements (r,g,b) you could do 'FOR %I=1 TO 3' but then you would need to subtract 1 (times 3) from the memory lookup (e.g. ?(graphics+I%+0 - 3).
The alpha is calculated as a bitwise OR. Lets say r% = 1, and g% = 2, then r% OR g% is 3. It's not the same as r% + g%! If r% is 255 then any OR will be 255. since all its bits are already '1'.
The 'VDU r%, ...' is still in VDU 23,27,1,W%,H%,... It expects the WH4 bytes to follow. 'VDU' is just a synonym for PRINT (or printf if you will). So VDU 23 just sends a 23 to the VDP, and VDU r% sends r% to the VDP.

@lovejoy777
Copy link
Collaborator

lovejoy777 commented Jan 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants