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

Enable chromakey array on map and textri #1095

Merged
merged 2 commits into from
May 22, 2020
Merged

Enable chromakey array on map and textri #1095

merged 2 commits into from
May 22, 2020

Conversation

ddelemeny
Copy link

Partially fixes #996

@RobLoach
Copy link
Contributor

RobLoach commented May 21, 2020

Looks like the other languages are not yet implemented. Seems like a neat idea, but I'm not quite sure how handy it will be. Most sprite sheets almost always only have one chromakey. Will this have an impact on performance?

@ddelemeny
Copy link
Author

@RobLoach Thanks for your answer. This should have negligible impact on performance as it leverages

  • for map, the fact that drawTile uses a cached LUT (mapping) to handle both palette remapping and multiple chromakey
  • for textri, the same thing implemented here : 2236050#diff-eb4f22e725ac78ffcd0bab3f665147bbR1063. (Prior to this commit, the behavior was to call mapColor on every pixel through the use of setPixel, which was arguably not optimized)

The only difference in perf should come from parameter handling for each language bindings, which should be small compared to actually drawing pixels.

As for the utility of it. I'm looking for consistency in the API, and I believe that if it wasn't that useful, spr wouldn't have it in the first place.

Which languages are not implemented ?

Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

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

ok, thank you
pls update the wiki if not difficult

@nesbox nesbox merged commit eca8ccd into nesbox:master May 22, 2020
@nesbox nesbox added API Issues related to TIC80 API enhancement Improvement of existing feature or adding something new labels May 22, 2020
@nesbox nesbox added this to the 0.80.0 milestone May 22, 2020
@ddelemeny ddelemeny deleted the feature-chromakey-array branch May 22, 2020 13:22
@ddelemeny
Copy link
Author

Thanks, I've updated the wiki accordingly.

@nesbox nesbox removed this from the 0.80.0 milestone Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to TIC80 API enhancement Improvement of existing feature or adding something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array of color keys in map/font/textri?
3 participants