-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nene rework #2
Merged
Merged
Nene rework #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: André Luiz Alvares <[email protected]>
The major change is that `Nene.Core` really acts more like a "Core", that is, it doesn't depends on any other Nene module (except `Nene.Math` and `Nene.Color`) and only holds the minimum information it needs to work. The removed functions will be moved to others modules in future commits. Signed-off-by: André Luiz Alvares <[email protected]>
`Nene.Main` will get some responsibilities that was part of `Nene.Core` module, especially "load_music" and similar methods. It isn't required by any other modules, but it requires all of them. It also will feature some resource management to make Nene more easier to work with. If `Main` doesn't fit your needs, you can also make your own "Main", since it just a record after all. Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Wrapped functions: * SDL_SetTextureColorMod * SDL_QueryTexture * SDL_RenderCopy (I made a mistake committing, this commit should have come before the previous commit, sorry) Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Also some code cleanup and improved documentation. Signed-off-by: André Luiz Alvares <[email protected]> Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Also add documentation about it. Signed-off-by: André Luiz Alvares <[email protected]>
More functions will be added once I start the refactor of other modules Signed-off-by: André Luiz Alvares <[email protected]> Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Many (if not all) SDL functions returns `0` on success, not on fail Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
WIP: it actually not require everything yet, I'll add the other modules with time. Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
It works! However, it isn't using `TextTexture` yet. Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
* `load` function try to load a font from a filename and return a new `Nene.Font`; * `get` methods does a check to avoid using a `nilptr` data; * `destroy` free the font and it's contents, also sets data to `nilptr`. Signed-off-by: André Luiz Alvares <[email protected]>
Also, the `text` field wasn't been updated, this is fixed now. Signed-off-by: André Luiz Alvares <[email protected]>
Signed-off-by: André Luiz Alvares <[email protected]>
Otherwise SDL wrappers complains about Nene being uninitialized. Signed-off-by: André Luiz Alvares <[email protected]>
get_renderer_info end up unused, but is probably better to not remove it since it's a wrapper.
It's just better to use `Texture.create_texture` in the end
Animation implementation will go to animation.
The shapes image is used on example, but it can also be helpful for prototype development.
Also adds some functions for MixWrapper and docs improvements.
* Both `is_point_intersecting` and `is_rect_intersecting` got merged in `is_intersecting` function * `is_vec` property renamed to `is_vec2`
… example The algorhythm is simple, but it works, I'll add some more details about it later. Also added a new example, it shows: * rect (line and filled) drawing * rect intersection * rect from simple collision
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
work in progress rework of Nene, to make it more organized and modular.