Commit Graph

56 Commits

Author SHA1 Message Date
Christopher Whitley 26cfd55ef9 Check for existing layer name (#618)
* Check for existing layer name

Added check for an existing layer by name before adding new layer. If layer name already exists, a descriptive exception is thrown instead of the generic ArgumentException.

* Update TiledMap.cs
2019-07-16 21:18:15 +10:00
Dylan Wilson c1452e81c0 tileset interface 2018-11-25 13:03:39 +10:00
Dylan Wilson 8ab5e384ec added the ability to change the tiles collection at runtime 2018-11-17 22:09:10 +10:00
Dylan Wilson 0a8577f77f small tweaks 2018-11-13 21:58:18 +10:00
Dylan Wilson 8e91b622da added some calculated properties to tilesets 2018-11-07 21:21:24 +10:00
Dylan Wilson c6c540c22a code cleanup 2018-11-05 20:29:23 +10:00
Dylan Wilson e962cec448 A mix between Tiled and GUI stuff (#553)
* mostly restored the tiled importer unit tests

* code cleanup

* code cleanup

* almost got tiled maps serialization independent of the content pipeline

* refactored the tiled map content importer so that tiled maps can be loaded at runtime

* code cleanup

* removed nuspec files

* experimenting with an XML based GUI markup parser

* a few more markup parser features

* finally got a working open file dialog

* experimenting with markup bindings

* attached properties

* working on the gui stuff again

* working on a better textbox

* multiline textboxing

* new text box is really coming along

* removed the content explorer experiment

* restored the old gui demo back to the way it was before (for now)
2018-10-09 22:18:48 +10:00
Dylan Wilson 50bf89faf5 made the monogame pcl a private asset in the nuget packages and fixed a few things in the cake build 2018-07-10 22:12:55 +10:00
stefanrbk 433e458af0 Real Tiled Group Support (#522)
* Change from storing layers by index to Dictionary key

Models are now stored with the `TiledMapLayer` they are part of.

* Allow render calls via TiledMapLayer

* Add TiledMapGroupLayer and model build recursion for groups

* Add rendering support for TiledMapGroupLayer

* Update TiledMapReader to read TiledMapGroupLayers

* Update Features Demo to Include a Map with a Layer Group

* Update TiledMapWriter and TiledMapProcessor to Support Groups

* Update TiledMap to Report Layers Correctly
2018-07-08 21:34:07 +10:00
stefanrbk e84895d0e6 Removed BuildAndLoadAsset for BuildAsset 2018-07-02 14:07:30 -05:00
stefanrbk 044712f6aa Added remaining .TMX format features
Added the remaining features of the .TMX Tiled Map format. Removed the parts of the format which aren't needed for rendering, like `TiledMapTerrainContent`. Terrains and the newer WangSets are only used in constructing a map, not for rendering. Added exception throws for non-implemented parts of the format.
2018-06-09 13:45:02 -05:00
stefanrbk 1cf24d01ae Added Rough Group Layer Support
Added the ability to load files with groups. Rendering system still doesn't understand layer groups yet, so this allows groups to be initially loaded, but the sub layers of the group are extracted to the layer root, things like offsets for the group are applied directly to the sub layers, and the groups themselves are removed.
2018-06-08 14:53:57 -05:00
stefanrbk 119026ea50 Decoupled FirstGlobalIdentifier from Tileset
`FirstGlobalIdentifier` is only used with the map to reference the tileset which contains the tile referenced. It isn't really part of the definition of a `TiledMapTileset` even though the `.TMX` format includes it with the `<tileset>` tag
2018-06-06 14:59:38 -05:00
stefanrbk 0ca4ae70da Importer and Processor
Added importer and processor for `TiledMapTilesetContent`
2018-06-06 11:53:46 -05:00
stefanrbk 561c437023 Extract Writer and Reader for TIlesets
Pulled out the methods for writing and reading the content files for tilesets into their own classes to allow loading tilesets independently from the maps.
2018-06-05 14:51:36 -05:00
stefanrbk 184fba5928 Include tileset textures internally
Changed the reference of tileset textures so the `Texture2DContent` isn't referenced, but built into the file as tilesets don't reference the same texture more than once.
2018-06-05 09:16:55 -05:00
stefanrbk 7ce9911696 TiledMapImageContent.Content
Adds the `Content` field to `TiledMapImageContent` to reference the `Texture2DContent` instead of manually loading the content with the `ContentManager`.
2018-06-04 17:26:03 -05:00
stefanrbk f98776ac8b Texture bug fix (#501)
When I released #480 to fix some texture alignment issues, I failed to check the variable types for the math being done. With my original fix by removing the `+ 0.5f` overdraw, the math changed from `float` division to `int` division. I'm now recasting for `float` division as it should be!

My bad!!
2018-05-28 21:50:13 +10:00
Dylan Wilson 2791d4347a do away with the old nuspec files 2018-05-24 21:36:15 +10:00
Dylan Wilson 3ff145422e merged from develop 2018-05-23 22:51:45 +10:00
Dylan Wilson 2ec6df4db4 added nuget package metadata 2018-05-17 22:25:07 +10:00
Dylan Wilson 2cf9ec7350 partially restored the cake build 2018-05-10 21:33:43 +10:00
Dylan Wilson 0121a2b9c5 dotnet standard 2.0 baby! 2018-05-09 21:58:40 +10:00
stefanrbk 2005c2c161 Fix Texture Alignment (#480) 2018-03-08 12:51:11 +10:00
Dylan Wilson 4126e68fb3 merge commit 2018-02-07 22:20:05 +10:00
Dylan Wilson ad03ad3251 removed most of the compiler warnings about missing XML docs 2018-02-07 22:13:43 +10:00
Jon Seaman 5470a52e05 Added XML docs to NuGet (#460) 2018-02-01 20:14:59 +10:00
Dylan Wilson cb003a24de modifiable tiled layers 2018-01-17 23:33:45 +10:00
Dylan Wilson 2dad917c49 added tileset tile type 2018-01-13 22:53:24 +10:00
Dylan Wilson 4090822e2b added tiled image layers back in 2017-11-27 20:45:41 +10:00
Dylan Wilson 4c5c7bc00b code cleanup 2017-11-22 21:32:26 +10:00
Dylan Wilson cf2a97259f proper disposal of buffers 2017-11-21 21:00:34 +10:00
Dylan Wilson 9d24bb6091 fixed a range of bugs and issues with the new map renderer 2017-11-21 20:57:32 +10:00
Dylan Wilson 107ba06326 almost back to parity 2017-11-21 20:57:32 +10:00
Dylan Wilson d1fded1ec8 one tiny tweak to rule them all 2017-11-21 20:57:32 +10:00
Dylan Wilson bfa713e91d its a bit working and a bit not 2017-11-21 20:57:32 +10:00
Dylan Wilson 17c7d8ccd7 demos are at least compiling again 2017-11-21 20:57:32 +10:00
Dylan Wilson cd8f6ea6df almost finished making tiled maps creatable from code 2017-11-21 20:57:32 +10:00
maaex ab30af68c1 added TiledMap property to TiledMapTileObject (#424) 2017-09-19 21:51:11 +10:00
Dylan Wilson b3a631aff5 Gui dialogs (#410)
* started refactoring for gui windows

* a bit more work on gui windows

* fixed some bugs and broken build stuff

* fixed some bugs in gui controls

* a little code cleanup

* got gui dialogs positioning and experimenting with named styles by type

* apply control styles directly in the constructor of controls

* got everything compiling again

* all gui controls have skinnable constructors

* rework uniform grid desired size calculations

* turns out gui layouts are complicated

* include pdb files in nuget packages

* fixed a bug in find nearest glyph

* custom control styling

* added a range constructor overload that takes one value

* rethinking control desired size behaviour

* made particle emitters more editable at runtime

* moved the auto trigger code to the particle effect instead of the emitters

* tweaks

* changed the particle modifer interface to an abstract base with an optional name

* changed the particle modifer interface to an abstract base with an optional name

* an attempt at creating a gui combo box

* rolled back the nested control experiment

* pretty good (but not perfect) combo boxes

* tweaks

* name property bindings on lists

* removed and cleaned up the hacks from the gui combo box

* minor combo box styling tweaks

* minor bug fix in gui combo box

* experiments with data binding

* fixed a mistake on the texture region service interface

* working on the ability to serialize particles

* finished particle serialization

* more robust range deserialization

* added editor browable attributes

* fixed some broken demos

* made the particle modifiers editable at runtime

* fixed some issues with particle serialization

* fixed some issues with interpolators
2017-07-22 21:22:13 +10:00
Dylan Wilson b6555e8ce5 moving some things around and code cleanup 2017-06-13 21:20:02 +10:00
Jay Jeckel c864aba136 Fix TryGetTile (#380)
Change TiledMapTileLayer to store blank tiles so that TryGetTile returns the correct TiledMapTile instances.
2017-04-26 21:13:11 +10:00
Musbah Sinno 785396d171 Added the ability to get tileset tile objects. (#378) 2017-04-20 20:52:02 +10:00
Dylan Wilson 3559fb086f fixed some merge conflicts 2017-03-12 20:58:23 +10:00
Lucas Girouard-Stranks ef1c20889f Fix iteration memory leaks. (#350) 2017-03-12 20:50:05 +10:00
Dylan Wilson ea518d55da changed the tools versions in the project files to be compatible with xamrain studio 2017-03-10 22:12:14 +10:00
Lucas Girouard-Stranks 3a164d5385 Tiled Fix (#349)
* Tiled fix.

* Remove bat file.
2017-03-05 09:18:11 +10:00
Lucas Girouard-Stranks a4fe5cafad TiledMapRenderer allow custom effect (#345) 2017-02-24 03:51:57 -08:00
Dylan Wilson a75d8deb5a enforce c# 6.0 language version at least until VS2017 comes out of RC 2017-02-09 22:45:52 +10:00
Dylan Wilson a002aef77f big code cleanup 2017-01-31 21:15:21 +10:00