Closed nawarian closed 2 years ago
Hey @nawarian, I abstracted the raylib sample into its own wrapper library to help integration: https://github.com/robloach/raylib-tmx
The other change that was helpful is over at https://github.com/baylej/tmx/pull/58
Thank you for this fix, the raylib example needs to be fixed as well before I merge this PR. I will do it if you don't have the time, or have lost interest.
Hello @baylej ; Please go ahead, it would take me another few weeks to find time for it.
Thanks!
This PR refers to the page Creating a map renderer from scratch. The
draw_tile()
implementation there is faulty and leads to a black screen.Here are my proposed fixes:
DrawTextureRec()
call by derefingimage
as the function requires aTexture2D
variable instead of aTexture2D*
pointerColor
struct works with 4uint
fields (r, g, b, a). Passing opacity directly will result in argba(1,1,1,1)
color (black). AdoptedWHITE
as default and appliedopacity
as its alphaThe above was tested with most recent Raylib's version: 3.7.0