diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b8fe7d..11e4faf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ Change Log - add `SKTilesetData.setTexture(_:forFrame:)` - add `SKTilesetData.setDuration(interval:forFrame:)` - add `SKTileObject.tileData` property -- add `SKTiledSceneCamera.clampZoomValue` +- add `SKTiledSceneCamera.clampZoomValue` - add `SKTiledSceneCamera.zoomClamping` property - remove `SKTile.pauseAnimation` @@ -29,8 +29,6 @@ Change Log - invert layer y-offsets properly - add `DemoController` to manage scenes in iOS/macOS demo targets - - - add `SKTilemap.getLayer(atPath:)` - add `SKTilemapDelegate.didAddNavigationGraph(_:)` - add `SKTilemap.newTileLayer(named:group:)` @@ -73,8 +71,6 @@ Change Log - update API for new layer & object types, more consistent naming, etc. - improved grid drawing quality - debug functions moved to `SKTiled+Debug.swift` - - - add `SKObjectGroup.textObjects` - add `SKTilemap.textObjects` - add `SKTilemap.showGrid` diff --git a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json index a3bcfe89..3d8de5c5 100644 --- a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -144,6 +144,11 @@ "filename" : "Icon-83.5@2x.png", "scale" : "2x" }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + }, { "size" : "16x16", "idiom" : "mac", diff --git a/README.md b/README.md index 88f5a92f..722886f2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ > SKTiled is a Swift framework for using [Tiled][tiled-url] assets with Apple's SpriteKit. +[![Xcode Version][xcode9-image]][xcode-downloads-url] [![Swift Version][swift-image]][swift-url] [![Build Status][travis-image]][travis-url] [![License][license-image]][license-url] @@ -13,10 +14,11 @@ **SKTiled** is a framework for using [Tiled][tiled-url] assets with [Apple's SpriteKit][spritekit-url], built from the ground up with Swift. This project began life as an exercise to learn Apple's new programming language for a game project, but I've decided to release it as open source with the hopes that others will find it useful. **SKTiled** is up-to-date and supports **Tiled's** major features, including all map & object types. -Current release is Swift 3.2/macOS 10.11/iOS 10+. For Swift 4, see the [**swift4**][swift4-url] branch. +![Demo Image][demo-iphone-img] -![Demo Image][demo-image] +- for Xcode 8, see the [**xcode8**][branch-xcode8-url] branch +- for Swift 4, see the [**swift4**][branch-swift4-url] branch Check out the [Official Documentation](https://mfessenden.github.io/SKTiled). @@ -45,7 +47,7 @@ Check out the [Official Documentation](https://mfessenden.github.io/SKTiled). - iOS 9+ - macOS 10.12+ -- Xcode 9+ +- Xcode 9/Swift 3.2 ## Installation @@ -277,10 +279,17 @@ let allWalkable = tilemap.getTilesWithProperty("walkable", true") [carthage-image]:https://img.shields.io/badge/Carthage-compatible-4BC51D.svg [carthage-url]:https://github.com/Carthage/Carthage [pod-image]:https://img.shields.io/cocoapods/v/SKTiled.svg +[xcode8-image]:https://img.shields.io/badge/Xcode-8-orange.svg +[xcode9-image]:https://img.shields.io/badge/Xcode-9-orange.svg +[xcode-downloads-url]:https://developer.apple.com/download/more/ [pod-url]:https://cocoapods.org/pods/SKTiled -[swift4-url]:https://github.com/mfessenden/SKTiled/tree/swift4 +[branch-master-url]:https://github.com/mfessenden/SKTiled +[branch-xcode8-url]:https://github.com/mfessenden/SKTiled/tree/xcode8 +[branch-swift4-url]:https://github.com/mfessenden/SKTiled/tree/swift4 [header-image]:https://mfessenden.github.io/SKTiled/images/Header-@1x.png -[demo-image]:https://mfessenden.github.io/SKTiled/images/images/demo-macos-iso.png +[demo-mac-image]:https://mfessenden.github.io/SKTiled/images/demo-macos-iso.png +[demo-iphone-img]:https://mfessenden.github.io/SKTiled/images/demo-iphone.png + diff --git a/Resources/roguelike-16x16.tmx b/Resources/roguelike-16x16.tmx index 52e71c92..a15f49e0 100644 --- a/Resources/roguelike-16x16.tmx +++ b/Resources/roguelike-16x16.tmx @@ -78,7 +78,7 @@ - + eJztl1EKwzAMQ/u1+x+zu8XYR8EIyZbdZmXQgNm6JPaLbJfs/dq292OP/ZF9x90MHc7VvPtFjMeotM7Os4PFtVPObEw5kVdxdnLncFY+j7kdOJimqzjxk+1VbEzDbt5j/Gp0euPQTrGv4nR8IUfkQS58dmI4+XbPq3hZDSvfSp8up/NblZuM80wfqVqZ5Kjqoyq2wxmf8bszkFPFOMPJ9p3lrGqmm6cVnJk/Jwbmw/E34XR9O5xXMjLOlf2+krOKG+fUWrbGZcV4qt8dTvVcxewyxj7K1rh1EH1m94cpZ6ZTp1YnNe9oz/R0dY1rcP3kDsbiqvtUZZXu8exdNuaverdPcs841cg0ZHnBPWc5mX+Xk+nKcvhrTswr07bbj925DmfmD+9ILB8uJ5tXnOw/T+ccEy0zDa40VbtdTqXlxId7d2PzXdbJ/euIUe1FXd36VJyTPCAnY0C/VT1crafL2amDX3Gutofz4byL8wMKo/+y diff --git a/SKTiled.xcodeproj/project.pbxproj b/SKTiled.xcodeproj/project.pbxproj index af556ffc..d442b8c4 100644 --- a/SKTiled.xcodeproj/project.pbxproj +++ b/SKTiled.xcodeproj/project.pbxproj @@ -1366,7 +1366,6 @@ ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-lz"; SDKROOT = iphoneos; - SWIFT_INCLUDE_PATHS = zlib; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -1411,7 +1410,6 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-lz"; SDKROOT = iphoneos; - SWIFT_INCLUDE_PATHS = zlib; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Sources/SKTileLayer.swift b/Sources/SKTileLayer.swift index bff70c2e..73ba9a97 100644 --- a/Sources/SKTileLayer.swift +++ b/Sources/SKTileLayer.swift @@ -2351,11 +2351,13 @@ extension SKTiledLayerObject { /** Returns a tile coordinate for a given vector_int2 coordinate. - - parameter vec2: `int2` vector int2. + - parameter vec2: `int2` vector int2 coordinate. + - parameter offsetX: `CGFloat` x-offset value. + - parameter offsetY: `CGFloat` y-offset value. - returns: `CGPoint` position in layer. */ - public func pointForCoordinate(vec2: int2) -> CGPoint { - return self.pointForCoordinate(coord: vec2.cgPoint) + public func pointForCoordinate(vec2: int2, offsetX: CGFloat=0, offsetY: CGFloat=0) -> CGPoint { + return self.pointForCoordinate(coord: vec2.cgPoint, offsetX: offsetX, offsetY: offsetY) } /** diff --git a/Sources/SKTilemap.swift b/Sources/SKTilemap.swift index 096e7225..075381e6 100644 --- a/Sources/SKTilemap.swift +++ b/Sources/SKTilemap.swift @@ -719,7 +719,7 @@ public class SKTilemap: SKNode, SKTiledObject { /** Returns a tile coordinate for a given vector_int2 coordinate. - - parameter vec2: `int2` vector int2. + - parameter vec2: `int2` vector int2 coordinate. - returns: `CGPoint` position in layer. */ public func pointForCoordinate(vec2: int2) -> CGPoint { diff --git a/zlib/include.h b/zlib/include.h new file mode 100644 index 00000000..4470a1fd --- /dev/null +++ b/zlib/include.h @@ -0,0 +1 @@ +#include diff --git a/zlib/module.modulemap b/zlib/module.modulemap new file mode 100644 index 00000000..d7e3f91d --- /dev/null +++ b/zlib/module.modulemap @@ -0,0 +1,5 @@ +module zlib [system] { + header "include.h" + link "z" + export * +}