Files
Picross/Sources/SDL/Surface.swift
T
2024-10-24 18:29:07 -04:00

15 lines
291 B
Swift

import CSDL3
import CSDL3_Image
public class Surface {
var handle: UnsafeMutablePointer<SDL_Surface>
public init(from imagePath: String) throws {
handle = try IMG_Load(imagePath).sdlThrow(type: type(of: self))
}
deinit {
SDL_DestroySurface(handle)
}
}