get format from sdl_surface

This commit is contained in:
Greg Shuflin committed 2025-12-24 02:40:26 -08:00
1 parent 15bde2fad8
commit e21b84039b
2 files changed
+13

No files matched your search

+8
View File
@@ -109,6 +109,14 @@ instance SDLTexture.instNonempty : Nonempty SDLTexture := SDLTexture.nonemptyTyp
private opaque SDLSurface.nonemptyType : NonemptyType
def SDLSurface : Type := SDLSurface.nonemptyType.type
instance SDLSurface.instNonempty : Nonempty SDLSurface := SDLSurface.nonemptyType.property
namespace SDLSurface
@[extern "sdl_Surface_get_format"]
opaque format : @& SDLSurface -> UInt32
end SDLSurface
@[extern "sdl_image_load"]
-- @& means "by reference"
opaque loadImage : (path : @& System.FilePath) → SDLIO SDLSurface