diff --git a/Sources/PlaydateKit/Core/Sprite.swift b/Sources/PlaydateKit/Core/Sprite.swift index d2afca82..caf525b4 100644 --- a/Sources/PlaydateKit/Core/Sprite.swift +++ b/Sources/PlaydateKit/Core/Sprite.swift @@ -8,7 +8,7 @@ public import CPlaydate public enum Sprite { // MARK: Open - open class Sprite { + open class Sprite: Equatable { // MARK: Lifecycle /// Allocates and returns a new Sprite. @@ -184,6 +184,10 @@ public enum Sprite { return UnsafeBufferPointer(start: sprites, count: Int(length)) } + public static func == (lhs: Sprite, rhs: Sprite) -> Bool { + lhs.pointer == rhs.pointer + } + /// Allocates and returns a copy of the sprite. public func copy() -> Sprite { Sprite(pointer: sprite.copy.unsafelyUnwrapped(pointer).unsafelyUnwrapped)