2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
|
|
|
* This program is released under GNU General Public License
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Namespaces
|
|
|
|
|
2016-03-18 12:52:12 +00:00
|
|
|
using System;
|
2009-04-19 18:07:22 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
2016-04-29 13:42:52 +00:00
|
|
|
using CodeImp.DoomBuilder.Compilers;
|
2009-04-19 18:07:22 +00:00
|
|
|
using CodeImp.DoomBuilder.Config;
|
2022-01-04 19:17:12 +00:00
|
|
|
using CodeImp.DoomBuilder.Rendering;
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
using CodeImp.DoomBuilder.ZDoom;
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Data
|
|
|
|
{
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
//mxd
|
|
|
|
public class TextResourceData
|
|
|
|
{
|
|
|
|
private Stream stream;
|
|
|
|
private DataReader source;
|
|
|
|
private DataLocation sourcelocation;
|
|
|
|
private string filename;
|
|
|
|
private int lumpindex;
|
|
|
|
private bool trackable;
|
|
|
|
|
|
|
|
internal Stream Stream { get { return stream; } }
|
|
|
|
internal DataReader Source { get { return source; } }
|
|
|
|
internal DataLocation SourceLocation { get { return sourcelocation; } }
|
|
|
|
internal string Filename { get { return filename; } } // Lump name/Filename
|
|
|
|
internal int LumpIndex { get { return lumpindex; } } // Lump index in a WAD
|
2016-11-24 21:09:24 +00:00
|
|
|
internal bool Trackable { get { return trackable; } } // When false, wont be added to DataManager.TextResources
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
|
|
|
|
|
2016-11-24 21:09:24 +00:00
|
|
|
internal TextResourceData(DataReader source, Stream stream, string filename, bool trackable)
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
{
|
2016-11-24 21:09:24 +00:00
|
|
|
this.source = source;
|
|
|
|
this.sourcelocation = source.Location;
|
|
|
|
this.stream = stream;
|
|
|
|
this.filename = filename;
|
|
|
|
this.trackable = trackable;
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
|
|
|
|
WADReader reader = source as WADReader;
|
|
|
|
if(reader != null)
|
2016-11-24 21:09:24 +00:00
|
|
|
this.lumpindex = reader.WadFile.FindLumpIndex(filename);
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
else
|
2016-11-24 21:09:24 +00:00
|
|
|
this.lumpindex = -1;
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
}
|
|
|
|
|
2016-11-24 21:09:24 +00:00
|
|
|
internal TextResourceData(DataReader source, Stream stream, string filename, int lumpindex, bool trackable)
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
{
|
2016-11-24 21:09:24 +00:00
|
|
|
this.source = source;
|
|
|
|
this.sourcelocation = source.Location;
|
|
|
|
this.stream = stream;
|
|
|
|
this.filename = filename;
|
|
|
|
this.lumpindex = lumpindex;
|
|
|
|
this.trackable = trackable;
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
}
|
|
|
|
|
2016-11-24 21:09:24 +00:00
|
|
|
// Adds an untrackable resource without DataReader
|
|
|
|
internal TextResourceData(Stream stream, DataLocation location, string filename)
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
{
|
2016-11-24 21:09:24 +00:00
|
|
|
this.source = null;
|
|
|
|
this.sourcelocation = location;
|
|
|
|
this.stream = stream;
|
|
|
|
this.filename = filename;
|
|
|
|
this.lumpindex = -1;
|
|
|
|
this.trackable = false;
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-18 12:52:12 +00:00
|
|
|
internal abstract class DataReader : IDisposable
|
2009-04-19 18:07:22 +00:00
|
|
|
{
|
2014-01-08 09:46:57 +00:00
|
|
|
#region ================== Constants
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#region ================== Variables
|
|
|
|
|
|
|
|
protected DataLocation location;
|
2014-02-21 14:42:12 +00:00
|
|
|
protected bool issuspended;
|
|
|
|
protected bool isdisposed;
|
2016-04-29 13:42:52 +00:00
|
|
|
protected bool isreadonly; //mxd
|
2017-02-09 00:39:32 +00:00
|
|
|
protected bool wasreadonly; // [ZZ]
|
2009-04-19 18:07:22 +00:00
|
|
|
protected ResourceTextureSet textureset;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Properties
|
|
|
|
|
|
|
|
public DataLocation Location { get { return location; } }
|
|
|
|
public bool IsDisposed { get { return isdisposed; } }
|
|
|
|
public bool IsSuspended { get { return issuspended; } }
|
2017-02-09 00:39:32 +00:00
|
|
|
public bool IsReadOnly { get { return (issuspended?wasreadonly:isreadonly); } } //mxd, [ZZ]
|
2009-04-19 18:07:22 +00:00
|
|
|
public ResourceTextureSet TextureSet { get { return textureset; } }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Constructor / Disposer
|
|
|
|
|
|
|
|
// Constructor
|
2016-04-29 13:42:52 +00:00
|
|
|
protected DataReader(DataLocation dl, bool asreadonly)
|
2009-04-19 18:07:22 +00:00
|
|
|
{
|
|
|
|
// Keep information
|
|
|
|
location = dl;
|
2016-04-29 13:42:52 +00:00
|
|
|
isreadonly = asreadonly;
|
2010-08-14 10:21:38 +00:00
|
|
|
textureset = new ResourceTextureSet(GetTitle(), dl);
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Disposer
|
|
|
|
public virtual void Dispose()
|
|
|
|
{
|
|
|
|
// Not already disposed?
|
|
|
|
if(!isdisposed)
|
|
|
|
{
|
|
|
|
// Done
|
|
|
|
textureset = null;
|
|
|
|
isdisposed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Management
|
|
|
|
|
|
|
|
// This returns a short name
|
|
|
|
public abstract string GetTitle();
|
|
|
|
|
|
|
|
// This suspends use of this resource
|
|
|
|
public virtual void Suspend()
|
|
|
|
{
|
2017-01-21 01:13:36 +00:00
|
|
|
// [ZZ] validate
|
|
|
|
if (issuspended) throw new Exception("Tried to suspend already suspended resource!");
|
2009-04-19 18:07:22 +00:00
|
|
|
issuspended = true;
|
2017-02-09 00:39:32 +00:00
|
|
|
wasreadonly = isreadonly;
|
2017-01-21 01:13:36 +00:00
|
|
|
isreadonly = true;
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This resumes use of this resource
|
|
|
|
public virtual void Resume()
|
|
|
|
{
|
2017-01-21 01:13:36 +00:00
|
|
|
// [ZZ] validate
|
|
|
|
if (!issuspended) throw new Exception("Tried to resume already resumed resource!");
|
|
|
|
issuspended = false;
|
2017-02-09 00:39:32 +00:00
|
|
|
isreadonly = wasreadonly;
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Palette
|
|
|
|
|
|
|
|
// When implemented, this should find and load a PLAYPAL palette
|
|
|
|
public virtual Playpal LoadPalette() { return null; }
|
2022-01-04 19:17:12 +00:00
|
|
|
|
|
|
|
public virtual ColorMap LoadMainColorMap(Playpal palette) { return null; }
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2009-05-12 09:50:08 +00:00
|
|
|
#region ================== Colormaps
|
|
|
|
|
|
|
|
// When implemented, this loads the colormaps
|
|
|
|
public virtual ICollection<ImageData> LoadColormaps() { return null; }
|
|
|
|
|
|
|
|
// When implemented, this returns the colormap lump
|
|
|
|
public virtual Stream GetColormapData(string pname) { return null; }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#region ================== Textures
|
|
|
|
|
|
|
|
// When implemented, this should read the patch names
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract PatchNames LoadPatchNames();
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// When implemented, this returns the patch lump
|
2016-03-14 21:53:53 +00:00
|
|
|
public abstract Stream GetPatchData(string pname, bool longname, ref string patchlocation);
|
2012-07-23 21:28:23 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// When implemented, this returns the texture lump
|
2016-03-14 21:53:53 +00:00
|
|
|
public abstract Stream GetTextureData(string pname, bool longname, ref string texturelocation);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// When implemented, this loads the textures
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract IEnumerable<ImageData> LoadTextures(PatchNames pnames, Dictionary<string, TexturesParser> cachedparsers);
|
2016-03-04 08:10:56 +00:00
|
|
|
|
|
|
|
//mxd. When implemented, this returns the HiRes texture lump
|
2016-03-14 21:53:53 +00:00
|
|
|
public abstract Stream GetHiResTextureData(string pname, ref string hireslocation);
|
2016-03-04 08:10:56 +00:00
|
|
|
|
|
|
|
//mxd. When implemented, this loads the HiRes textures
|
|
|
|
public abstract IEnumerable<HiResImage> LoadHiResTextures();
|
2010-08-12 19:59:06 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Flats
|
|
|
|
|
|
|
|
// When implemented, this loads the flats
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract IEnumerable<ImageData> LoadFlats(Dictionary<string, TexturesParser> cachedparsers);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// When implemented, this returns the flat lump
|
2016-03-14 21:53:53 +00:00
|
|
|
public abstract Stream GetFlatData(string pname, bool longname, ref string flatlocation);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Sprites
|
2010-08-18 09:07:54 +00:00
|
|
|
|
|
|
|
// When implemented, this loads the sprites
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract IEnumerable<ImageData> LoadSprites(Dictionary<string, TexturesParser> cachedparsers);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// When implemented, this returns the sprite lump
|
2016-03-14 21:53:53 +00:00
|
|
|
public abstract Stream GetSpriteData(string pname, ref string spritelocation);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// When implemented, this checks if the given sprite lump exists
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract bool GetSpriteExists(string pname);
|
2016-04-08 14:02:08 +00:00
|
|
|
|
|
|
|
//mxd. When implemented, returns all sprites, which name starts with given string
|
2016-07-11 22:13:43 +00:00
|
|
|
public abstract HashSet<string> GetSpriteNames();
|
2021-09-05 12:59:31 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#endregion
|
|
|
|
|
2012-07-23 21:28:23 +00:00
|
|
|
#region ================== Decorate, Modeldef, Mapinfo, Gldefs, etc...
|
2009-04-19 18:07:22 +00:00
|
|
|
|
2021-09-05 12:59:31 +00:00
|
|
|
// When implemented, this returns DEHACKED lumps
|
2021-11-28 17:20:46 +00:00
|
|
|
public abstract IEnumerable<TextResourceData> GetDehackedData();
|
2021-09-05 12:59:31 +00:00
|
|
|
|
2016-05-24 22:11:29 +00:00
|
|
|
// When implemented, this returns DECORATE lumps
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
public abstract IEnumerable<TextResourceData> GetDecorateData(string pname);
|
2009-04-19 18:07:22 +00:00
|
|
|
|
2017-01-15 22:00:45 +00:00
|
|
|
// [ZZ] When implemented, this returns ZSCRIPT lumps
|
|
|
|
public abstract IEnumerable<TextResourceData> GetZScriptData(string pname);
|
|
|
|
|
2018-06-09 14:26:03 +00:00
|
|
|
// [ZZ] When implemented, this returns MODELDEF lumps
|
|
|
|
public abstract IEnumerable<TextResourceData> GetModeldefData(string pname);
|
|
|
|
|
2017-01-15 22:00:45 +00:00
|
|
|
//mxd. When implemented, this returns MAPINFO lumps
|
|
|
|
public abstract IEnumerable<TextResourceData> GetMapinfoData();
|
2012-06-01 10:17:47 +00:00
|
|
|
|
2016-05-24 22:11:29 +00:00
|
|
|
//mxd. When implemented, this returns GLDEFS lumps
|
2016-07-14 23:39:48 +00:00
|
|
|
public abstract IEnumerable<TextResourceData> GetGldefsData(string basegame);
|
2012-06-01 10:17:47 +00:00
|
|
|
|
2016-12-12 12:35:18 +00:00
|
|
|
//mxd. When implemented, this returns generic text lump data
|
|
|
|
public abstract IEnumerable<TextResourceData> GetTextLumpData(ScriptType scripttype, bool singular, bool partialtitlematch);
|
2016-11-24 21:09:24 +00:00
|
|
|
|
2015-12-18 10:16:53 +00:00
|
|
|
//mxd. When implemented, this returns the list of voxel model names
|
2016-07-11 22:13:43 +00:00
|
|
|
public abstract HashSet<string> GetVoxelNames();
|
2015-12-18 10:16:53 +00:00
|
|
|
|
|
|
|
//mxd. When implemented, this returns the voxel lump
|
2016-07-11 22:13:43 +00:00
|
|
|
public abstract Stream GetVoxelData(string name, ref string voxellocation);
|
2015-05-28 13:45:01 +00:00
|
|
|
|
2021-12-10 10:10:42 +00:00
|
|
|
// When implemented, this returns the list of IWAD infos
|
|
|
|
public abstract List<IWadInfo> GetIWadInfos();
|
|
|
|
|
2016-04-29 13:42:52 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Load/Save (mxd)
|
|
|
|
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
internal abstract MemoryStream LoadFile(string name);
|
2016-04-29 13:42:52 +00:00
|
|
|
internal abstract MemoryStream LoadFile(string name, int lumpindex);
|
|
|
|
internal abstract bool SaveFile(MemoryStream stream, string name);
|
|
|
|
internal abstract bool SaveFile(MemoryStream stream, string name, int lumpindex);
|
Added, Sector Edit window, UDMF: added UI for sector damage-realted properties.
Added, DECORATE parser: damage types are now parsed.
Added: the editor now reports duplicate textures/flats/patches/sprites/colormaps/voxels in the loaded wads.
Added, all text parsers: added #region/#endregion support.
Added TERRAIN parser.
Added, Script Editor: added special handling for DECORATE special comments.
Added, Sector Edit window, UDMF: Soundsequence value was setup incorrectly when showing the window for multiple sectors with mixed Soundsequence value.
Fixed, Map Options window: "Strictly load patches between P_START and P_END" was not applied when applying the changes.
Fixed, MAPINFO parser: MapInfo should be treated as defined when a map MAPINFO block corresponding to current map is encountered even if it doesn't define any properties recognized by the editor.
Fixed, all text parsers: in some cases error line was calculated incorrectly when reporting an error detected by a text parser.
Cosmetic: changed ' to " in the rest of Error and Warning messages.
Internal: added text resource tracking.
Updated ZDoom_DECORATE.cfg.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-02-22 12:33:19 +00:00
|
|
|
internal abstract bool FileExists(string filename);
|
2016-04-29 13:42:52 +00:00
|
|
|
internal abstract bool FileExists(string filename, int lumpindex);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Compiling (mxd)
|
|
|
|
|
2016-05-12 13:56:25 +00:00
|
|
|
internal abstract bool CompileLump(string lumpname, ScriptConfiguration scriptconfig, List<CompilerError> errors);
|
|
|
|
internal abstract bool CompileLump(string lumpname, int lumpindex, ScriptConfiguration scriptconfig, List<CompilerError> errors);
|
2012-07-23 21:28:23 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|