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

Adding gif and sprite animation examples. #396

Merged

Conversation

Palessan
Copy link
Contributor

-Added new UpdateTextureUnsafe method to support it.

-Added new UpdateTextureUnsafe method to support it.
@gen2brain
Copy link
Owner

There is no need for a new custom function, just use unsafe.Slice((*color.RGBA)(unsafe.Pointer(uintptr(imScarfyAnim.Data)+uintptr(nextFrameDataOffset))), SIZE).

@gen2brain
Copy link
Owner

Btw. there is already https://github.com/gen2brain/raylib-go/tree/master/examples/textures/rectangle example, looks the same, maybe just it was renamed?

@Palessan
Copy link
Contributor Author

Btw. there is already https://github.com/gen2brain/raylib-go/tree/master/examples/textures/rectangle example, looks the same, maybe just it was renamed?

oh! then i'll remove mine and rename existing one as per original example name in raylib

@Palessan
Copy link
Contributor Author

done

@gen2brain
Copy link
Owner

Is texScarfyAnimSize only width*height, looks like it is missing * 4?

@gen2brain
Copy link
Owner

Yeah, it actually should be like that, divided by 4, or not multiplied.

@gen2brain gen2brain merged commit 62016ee into gen2brain:master Jun 28, 2024
10 checks passed
@gen2brain
Copy link
Owner

Merged, thanks!

@Palessan Palessan deleted the palessan/raylib-go-sprite-gif-animations branch June 29, 2024 08:04
@Palessan
Copy link
Contributor Author

This was my first open source contribution!
Transferring my old pet game from XNA to raylib-go while learning Go : )

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.

2 participants