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

Fix draw icon in the simulator #1453

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Fix draw icon in the simulator #1453

merged 1 commit into from
Jul 25, 2023

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Jul 25, 2023

Fixes microsoft/pxt-arcade#5994

The issue is that when drawing started at a negative y position, we were adjusting the start index from the icon so that we were only reading the pixels that actually appear on screen. However, we weren't adjusting the destination index in the image we were drawing to which resulted in everything being shifted up a few pixels.

I also renamed all of the variables to make it easier to read. The only actual change is line 563

@riknoll riknoll requested a review from a team July 25, 2023 17:58
@riknoll riknoll merged commit 373df44 into master Jul 25, 2023
4 checks passed
@riknoll riknoll deleted the draw-icon-fix branch July 25, 2023 19:37
jwunderl pushed a commit that referenced this pull request Aug 1, 2023
jwunderl added a commit that referenced this pull request Aug 9, 2023
…1456)

* Add shader package (#1450)

* Fix draw icon in the simulator (#1453)

* Add hitbox overlaps flag (#1454)

* remove dup merge image in sim/image.ts

---------

Co-authored-by: Richard Knoll <riknoll@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

drawIcon is broken for negative y values in simulator
2 participants