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

Some miscellaneous additions and minor refactoring #6837

Merged
merged 3 commits into from Jul 5, 2022

Conversation

mesilliac
Copy link
Contributor

Added some utility methods to sdl::texture, scalar multiplcation and division for sdl::point, and changed CVideo render target functions to use sdl::texture in stead of SDL_Texture*

get_format() equivalent to get_info().format
get_access() equivalent to get_info().access
get_raw_size() equivalent to point{get_info().w, get_info().h}
draw_size() equivalent to point{w(), h()}
get() equivalent to static_cast<SDL_Texture*>
operator==(const texture&) to explicitly only compare pointers
Also moved += and -= to the header for easier compiler inlining.
Also did some related minor cleanup, and added some debug logging.
@mesilliac mesilliac merged commit 22dc845 into wesnoth:master Jul 5, 2022
@mesilliac mesilliac deleted the misc_internals branch July 5, 2022 05:13
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.

None yet

1 participant