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

Add Support for optional paramter for an image handle to CLS #401

Merged
merged 6 commits into from
Oct 22, 2023
Merged

Conversation

SteveMcNeill
Copy link
Member

Without having to redo a whole crap ton of old code to take the new parameter, this seems like the easiest way to implement the addition of a new parameter to CLS for an optional image handle.

Tested with the simple code below, which runs and works as expected, with no issues:

$Color:32
Screen _NewImage(640, 480, 32)
foo = _NewImage(480, 320, 32)

_Dest foo
Cls , Red
_Dest 0
Cls , Blue

'at this point, both screens should be colored and our Dest is the 640x480 screen
Cls , Green, foo
Sleep
_PutImage (0, 0), foo 'If the CLS worked, we should put a green screen on the blue one, instead of a red one.

Copy link
Contributor

@mkilgore mkilgore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always, automated tests would be good :P Your example could pretty easily be turned into an automated image test like these PAINT ones I made.

@SteveMcNeill SteveMcNeill added the enhancement New feature or request label Oct 21, 2023
@SteveMcNeill SteveMcNeill merged commit e82f53c into QB64-Phoenix-Edition:main Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants