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

colors use more memory than neccessary #21

Open
Brian-ED opened this issue Nov 6, 2023 · 1 comment
Open

colors use more memory than neccessary #21

Brian-ED opened this issue Nov 6, 2023 · 1 comment
Labels
breaking When complete, This issue or pull request will have breaking changes as a consequence enhancement New feature or request

Comments

@Brian-ED
Copy link
Owner

Brian-ED commented Nov 6, 2023

colors are from 0 to 255 but bqn stores arrays as signed ints so it should really be -128 to 127 to save 2x space

@Brian-ED Brian-ED added enhancement New feature or request breaking When complete, This issue or pull request will have breaking changes as a consequence labels Nov 6, 2023
@Brian-ED
Copy link
Owner Author

an issue i've found now is that i can't change the ffi functions themselves to output signed ints when there are colors as output, and i also can't change ffi functions to have color inputs to functions being signed, and reason for this is i can't reasonably implement it long term since every raylib update could add another function that uses color. What would be ideal is if the rayffi parser could automatically find where colors are and make them signed but that doesn't seem possible.

So, only thing to do is alter only the src/image.bqn to use signed ints and just expect the user to use the image.bqn code for loading images instead of using the ffi functions manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking When complete, This issue or pull request will have breaking changes as a consequence enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant