Restructured the source code in the Playdate bindings target.

This commit is contained in:
2026-07-25 12:40:14 +02:00
parent 2e7ee12ec1
commit b435a6e8bd
106 changed files with 3754 additions and 3746 deletions
@@ -0,0 +1,23 @@
internal import CPlaydate
extension Sprite {
/// Information about a sprite intersected by a line segment,
/// mirroring `SpriteQueryInfo`.
public struct QueryInfo {
public let sprite: Sprite
/// How far along the segment (0...1) the segment enters the sprite.
public let ti1: Float
/// How far along the segment (0...1) the segment exits the sprite.
public let ti2: Float
public let entryPoint: (x: Float, y: Float)
public let exitPoint: (x: Float, y: Float)
init(_ info: SpriteQueryInfo) {
sprite = Sprite.wrapper(for: info.sprite)
ti1 = info.ti1
ti2 = info.ti2
entryPoint = (info.entryPoint.x, info.entryPoint.y)
exitPoint = (info.exitPoint.x, info.exitPoint.y)
}
}
}