turn texture to lean object
This commit is contained in:
1 parent
9c5400dbd4
commit
d56efc38bc
3 files changed
+43
-17
No files matched your search
@@ -66,8 +66,13 @@ opaque getTicks : IO UInt32
|
||||
@[extern "sdl_get_key_state"]
|
||||
opaque getKeyState : UInt32 → IO Bool
|
||||
|
||||
private opaque SDLTexture.nonemptyType : NonemptyType
|
||||
|
||||
def SDLTexture : Type := SDLTexture.nonemptyType.type
|
||||
instance SDLTexture.instNonempty : Nonempty SDLTexture := SDLTexture.nonemptyType.property
|
||||
|
||||
@[extern "sdl_load_texture"]
|
||||
opaque loadTexture : String → IO UInt32
|
||||
opaque loadTexture? : String → IO SDLTexture
|
||||
|
||||
@[extern "sdl_load_font"]
|
||||
opaque loadFont : String → UInt32 → IO Bool
|
||||
@@ -76,7 +81,7 @@ opaque loadFont : String → UInt32 → IO Bool
|
||||
opaque loadTrack : String → IO Bool
|
||||
|
||||
@[extern "sdl_render_texture"]
|
||||
opaque renderTexture (x : Int32) (y : Int32) (w : Int32) (h : Int32) : IO Int32
|
||||
opaque renderTexture (texture : SDLTexture) (x : Int32) (y : Int32) (w : Int32) (h : Int32) : IO Int32
|
||||
|
||||
@[extern "sdl_render_text"]
|
||||
opaque renderText (message : String) (x : Int32) (y : Int32) (red : UInt8) (green : UInt8) (blue : UInt8) (alpha : UInt8) : IO Int32
|
||||
|
||||
Reference in new issue
Block a user