diff --git a/README.md b/README.md index a2f8002..ed549c0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A Dart Tiled library. ## Install from Dart Pub Repository -To include the package as a depencency in your `pubspec.yaml`, run the following (or add it manually): +To include the package as a dependency in your `pubspec.yaml`, run the following (or add it manually): ```sh dart pub add tiled @@ -29,7 +29,7 @@ Load a TMX file into a string by any means, and then pass the string to TileMapP final TiledMap mapTmx = TileMapParser.parseTmx(tmxBody); ``` -If your tmx file includes a external tsx reference, you have to add a CustomParser +If your tmx file includes an external tsx reference, you have to add a CustomParser ```dart class CustomTsxProvider extends TsxProvider { @override diff --git a/packages/tiled/lib/src/chunk.dart b/packages/tiled/lib/src/chunk.dart index 2b2d6b7..d38645d 100644 --- a/packages/tiled/lib/src/chunk.dart +++ b/packages/tiled/lib/src/chunk.dart @@ -3,7 +3,7 @@ import 'package:tiled/tiled.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * x: The x coordinate of the chunk in tiles. /// * y: The y coordinate of the chunk in tiles. @@ -26,10 +26,11 @@ class Chunk { int width; int height; - /// This is not part of the tiled definitions; this is just a convinient + /// This is not part of the tiled definitions; this is just a convenience /// wrapper over the [data] field that simplifies two things: /// - /// * represents the matrix as a matrix (List>) instead of a flat list + /// * represents the matrix as a matrix (`List>`) instead of a flat + /// list /// * wraps the gid integer into the [Gid] class for easy access of properties List> tileData; diff --git a/packages/tiled/lib/src/common/frame.dart b/packages/tiled/lib/src/common/frame.dart index 5c7b2a0..ccce955 100644 --- a/packages/tiled/lib/src/common/frame.dart +++ b/packages/tiled/lib/src/common/frame.dart @@ -3,9 +3,9 @@ import 'package:tiled/src/parser.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// -/// * tileid: The local ID of a tile within the parent . +/// * tileid: The local ID of a tile within the parent ``. /// * duration: How long (in milliseconds) this frame should be displayed /// before advancing to the next frame. class Frame { diff --git a/packages/tiled/lib/src/common/point.dart b/packages/tiled/lib/src/common/point.dart index 60f006f..fe1a333 100644 --- a/packages/tiled/lib/src/common/point.dart +++ b/packages/tiled/lib/src/common/point.dart @@ -3,7 +3,7 @@ import 'package:tiled/src/parser.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// Used to mark an object as a point. /// The existing x and y attributes are used to determine the position of the /// point. diff --git a/packages/tiled/lib/src/common/property.dart b/packages/tiled/lib/src/common/property.dart index bf47770..b802788 100644 --- a/packages/tiled/lib/src/common/property.dart +++ b/packages/tiled/lib/src/common/property.dart @@ -5,7 +5,7 @@ import 'package:xml/xml.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// * name: The name of the property. /// * type: The type of the property. /// Can be string (default), int, float, bool, color, file or object @@ -79,7 +79,7 @@ class Property { return attrString; } else { // In tmx files, multi-line text property values can be stored - // inside the node itself instead of in the 'value' + // inside the `` node itself instead of in the 'value' // attribute return xml.element.innerText; } @@ -195,7 +195,7 @@ class IntProperty extends Property { }) : super(type: PropertyType.int); } -/// [value] is the double-percision floating-point number +/// [value] is the double-precision floating-point number class FloatProperty extends Property { FloatProperty({ required super.name, diff --git a/packages/tiled/lib/src/common/tiled_image.dart b/packages/tiled/lib/src/common/tiled_image.dart index dd7ef88..22f0d7a 100644 --- a/packages/tiled/lib/src/common/tiled_image.dart +++ b/packages/tiled/lib/src/common/tiled_image.dart @@ -4,7 +4,7 @@ import 'package:tiled/src/parser.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * format: Used for embedded images, in combination with a data child /// element. diff --git a/packages/tiled/lib/src/editor_setting/chunk_size.dart b/packages/tiled/lib/src/editor_setting/chunk_size.dart index 0b4bc2e..df1bc81 100644 --- a/packages/tiled/lib/src/editor_setting/chunk_size.dart +++ b/packages/tiled/lib/src/editor_setting/chunk_size.dart @@ -3,7 +3,7 @@ import 'package:tiled/src/parser.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * width: The width of chunks used for infinite maps (default to 16). /// * height: The width of chunks used for infinite maps (default to 16). diff --git a/packages/tiled/lib/src/editor_setting/editor_setting.dart b/packages/tiled/lib/src/editor_setting/editor_setting.dart index bd88af4..26a5ed2 100644 --- a/packages/tiled/lib/src/editor_setting/editor_setting.dart +++ b/packages/tiled/lib/src/editor_setting/editor_setting.dart @@ -3,11 +3,11 @@ import 'package:tiled/tiled.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// This element contains various editor-specific settings, /// which are generally not relevant when reading a map. /// -/// Can contain: , +/// Can contain: ``, `` class EditorSetting { ChunkSize? chunkSize; Export? export; diff --git a/packages/tiled/lib/src/editor_setting/export.dart b/packages/tiled/lib/src/editor_setting/export.dart index 4c10ab9..a00cba6 100644 --- a/packages/tiled/lib/src/editor_setting/export.dart +++ b/packages/tiled/lib/src/editor_setting/export.dart @@ -3,7 +3,7 @@ import 'package:tiled/src/parser.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * target: The last file this map was exported to. /// * format: The short name of the last format this map was exported as. diff --git a/packages/tiled/lib/src/layer.dart b/packages/tiled/lib/src/layer.dart index dd25967..c57804a 100644 --- a/packages/tiled/lib/src/layer.dart +++ b/packages/tiled/lib/src/layer.dart @@ -8,8 +8,8 @@ import 'package:xml/xml.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// All tags shall occur before the first tag so that parsers -/// may rely on having the tilesets before needing to resolve tiles. +/// All `` tags shall occur before the first `` tag so that +/// parsers may rely on having the tilesets before needing to resolve tiles. /// /// * id: Unique ID of the layer. Each layer that added to a map gets a unique /// id. Even if a layer is deleted, no layer ever gets the same ID. @@ -36,7 +36,7 @@ import 'package:xml/xml.dart'; /// * parallaxy: Vertical parallax factor for this layer. /// Defaults to 1. (since 1.5) /// -/// Can contain at most one: , +/// Can contain at most one: ``, `` abstract class Layer { /// Incremental ID - unique across all layers int? id; @@ -377,10 +377,11 @@ class TileLayer extends Layer { /// See [tileData] for a better representation. List? data; - /// This is not part of the tiled definitions; this is just a convinient + /// This is not part of the tiled definitions; this is just a convenience /// wrapper over the [data] field that simplifies two things: /// - /// * represents the matrix as a matrix (List>) instead of a flat list + /// * represents the matrix as a matrix (`List>`) instead of a flat + /// list /// * wraps the gid integer into the [Gid] class for easy access of properties List>? tileData; diff --git a/packages/tiled/lib/src/objects/text.dart b/packages/tiled/lib/src/objects/text.dart index 4745beb..3dc8ddb 100644 --- a/packages/tiled/lib/src/objects/text.dart +++ b/packages/tiled/lib/src/objects/text.dart @@ -3,7 +3,7 @@ import 'package:tiled/tiled.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * fontfamily: The font family used (defaults to "sans-serif") /// * pixelsize: The size of the font in pixels (not using points, because diff --git a/packages/tiled/lib/src/objects/tiled_object.dart b/packages/tiled/lib/src/objects/tiled_object.dart index 0bee7a1..4f7ab95 100644 --- a/packages/tiled/lib/src/objects/tiled_object.dart +++ b/packages/tiled/lib/src/objects/tiled_object.dart @@ -3,7 +3,7 @@ import 'package:tiled/tiled.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -/// +/// `` /// /// * id: Unique ID of the object. Each object that is placed on a map gets a /// unique id. Even if an object was deleted, no object gets the same ID. @@ -41,8 +41,8 @@ import 'package:tiled/tiled.dart'; /// the specified template, properties saved with the object will have higher /// priority, i.e. they will override the template properties. /// -/// Can contain at most one: , (since 0.9), -/// (since 1.1), , , (since 1.0) +/// Can contain at most one: ``, `` (since 0.9), +/// `` (since 1.1), ``, ``, `` (since 1.0) class TiledObject { int id; String name; @@ -109,7 +109,7 @@ class TiledObject { final gid = parser.getIntOrNull('gid'); final name = parser.getString('name', defaults: ''); - // Tiled 1.9 and above versions running in compatibilty mode set to + // Tiled 1.9 and above versions running in compatibility mode set to // "Tiled 1.8" will still write out "Class" property as "type". So try both // before using default value. final type = parser.getString( diff --git a/packages/tiled/lib/src/template.dart b/packages/tiled/lib/src/template.dart index ea7a983..3f85c9b 100644 --- a/packages/tiled/lib/src/template.dart +++ b/packages/tiled/lib/src/template.dart @@ -3,7 +3,7 @@ import 'package:tiled/tiled.dart'; /// Below is Tiled's documentation about how this structure is represented /// on XML files: /// -///