RobLoach / raylib-aseprite

Load Aseprite files for animated sprites in raylib.
zlib License
77 stars 6 forks source link

Moved struct definitions out of the implementation #22

Closed pbentes closed 5 months ago

pbentes commented 5 months ago

I found that I couldn't use the Aseprite struct as a type for a field in one of my structs without defining the implementation which caused an error because I already had defined the implementation in my main file.

If I just didn't define the implementation I would get the following error:

Field has incomplete type 'Aseprite' (aka 'struct Aseprite')clang(field_incomplete_or_sizeless)
raylib_aseprite.h(41, 16): Forward declaration of 'struct Aseprite'

My solution was to pull the struct definitions out of the implementation block.