diff --git a/Docs/articles/raw_content.md b/Docs/articles/raw_content.md index f514528..00335ec 100644 --- a/Docs/articles/raw_content.md +++ b/Docs/articles/raw_content.md @@ -2,7 +2,7 @@ Sometimes, there's a good reason for wanting to load game assets directly rather than using the MonoGame Content Pipeline, which packs files into a binary `xnb` format. Those reasons include, for example, making your game easily moddable or allowing for texture packs. -The **MLEM** package contains a solution for this: `RawContentManager`. +The **MLEM.Data** package contains a solution for this: `RawContentManager`. ## What it does A raw content manager works very similarly to a regular `ContentManager`: You can load different types of assets through the `Load` method, and they will automatically be managed and disposed when the game closes. @@ -31,12 +31,12 @@ By default, the raw content manager supports the following types, as long as the - `SoundEffect` (ogg, wav, mp3) - `Song` (gg, wav, mp3) - Any XML files (xml) -- Any JSON files (json) if `MLEM.Data` is used +- Any JSON files (json) To add more content types that can be loaded by the raw content manager, you simply have to extend either `RawContentReader` or the generic version, `RawContentReader`. For example, this is a content reader that loads a `txt` file as a string: ```cs using System.IO; -using MLEM.Content; +using MLEM.Data.Content; namespace Test { public class StringReader : RawContentReader { diff --git a/MLEM/Content/RawContentManager.cs b/MLEM.Data/Content/RawContentManager.cs similarity index 99% rename from MLEM/Content/RawContentManager.cs rename to MLEM.Data/Content/RawContentManager.cs index 87148a7..5bfe04f 100644 --- a/MLEM/Content/RawContentManager.cs +++ b/MLEM.Data/Content/RawContentManager.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// /// Represents a version of that doesn't load content binary xnb files, but rather as their regular formats. /// diff --git a/MLEM/Content/RawContentReader.cs b/MLEM.Data/Content/RawContentReader.cs similarity index 98% rename from MLEM/Content/RawContentReader.cs rename to MLEM.Data/Content/RawContentReader.cs index cf16e56..43c5f46 100644 --- a/MLEM/Content/RawContentReader.cs +++ b/MLEM.Data/Content/RawContentReader.cs @@ -2,7 +2,7 @@ using System; using System.IO; using Microsoft.Xna.Framework.Content; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// /// Represents a way for any kind of raw content file to be read using a /// diff --git a/MLEM.Data/Json/RawJsonReader.cs b/MLEM.Data/Content/RawJsonReader.cs similarity index 93% rename from MLEM.Data/Json/RawJsonReader.cs rename to MLEM.Data/Content/RawJsonReader.cs index 32e2090..dfe9ced 100644 --- a/MLEM.Data/Json/RawJsonReader.cs +++ b/MLEM.Data/Content/RawJsonReader.cs @@ -1,9 +1,8 @@ using System; using System.IO; -using MLEM.Content; using Newtonsoft.Json; -namespace MLEM.Data.Json { +namespace MLEM.Data.Content { /// public class RawJsonReader : RawContentReader { diff --git a/MLEM/Content/SongReader.cs b/MLEM.Data/Content/SongReader.cs similarity index 94% rename from MLEM/Content/SongReader.cs rename to MLEM.Data/Content/SongReader.cs index a6a8864..e6adb39 100644 --- a/MLEM/Content/SongReader.cs +++ b/MLEM.Data/Content/SongReader.cs @@ -2,7 +2,7 @@ using System; using System.IO; using Microsoft.Xna.Framework.Media; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// public class SongReader : RawContentReader { diff --git a/MLEM/Content/SoundEffectReader.cs b/MLEM.Data/Content/SoundEffectReader.cs similarity index 94% rename from MLEM/Content/SoundEffectReader.cs rename to MLEM.Data/Content/SoundEffectReader.cs index 021e966..a846b96 100644 --- a/MLEM/Content/SoundEffectReader.cs +++ b/MLEM.Data/Content/SoundEffectReader.cs @@ -1,7 +1,7 @@ using System.IO; using Microsoft.Xna.Framework.Audio; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// public class SoundEffectReader : RawContentReader { diff --git a/MLEM/Content/Texture2DReader.cs b/MLEM.Data/Content/Texture2DReader.cs similarity index 95% rename from MLEM/Content/Texture2DReader.cs rename to MLEM.Data/Content/Texture2DReader.cs index 8342cbe..275a019 100644 --- a/MLEM/Content/Texture2DReader.cs +++ b/MLEM.Data/Content/Texture2DReader.cs @@ -1,7 +1,7 @@ using System.IO; using Microsoft.Xna.Framework.Graphics; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// public class Texture2DReader : RawContentReader { diff --git a/MLEM/Content/XmlReader.cs b/MLEM.Data/Content/XmlReader.cs similarity index 95% rename from MLEM/Content/XmlReader.cs rename to MLEM.Data/Content/XmlReader.cs index 85998d0..0a784f5 100644 --- a/MLEM/Content/XmlReader.cs +++ b/MLEM.Data/Content/XmlReader.cs @@ -2,7 +2,7 @@ using System; using System.IO; using System.Xml.Serialization; -namespace MLEM.Content { +namespace MLEM.Data.Content { /// public class XmlReader : RawContentReader { diff --git a/Sandbox/GameImpl.cs b/Sandbox/GameImpl.cs index ca3c3c0..6e1f8e5 100644 --- a/Sandbox/GameImpl.cs +++ b/Sandbox/GameImpl.cs @@ -5,8 +5,8 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MLEM.Cameras; -using MLEM.Content; using MLEM.Data; +using MLEM.Data.Content; using MLEM.Extended.Extensions; using MLEM.Extended.Font; using MLEM.Extended.Tiled;