mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 07:31:36 +00:00
cf3d416967
Textures now load up to 2x faster when "mix textures and flats" flag is set in game configuration. TEXTUREx/TEXTURES: texture will now be created if at least one of it's patches is loaded. Visual mode: fixed a crash when "Slope floor to here" (9500) or "Slope ceiling to here" (9501) things were not inside sector. Fixed: flats were not loaded form wads inside Directory and PK3/PK7 resources. Sector Info Panel, Linedef Info Panel: texture size was shown for unknown textures.
66 lines
1.7 KiB
C#
66 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using SlimDX;
|
|
using SlimDX.Direct3D9;
|
|
using CodeImp.DoomBuilder.GZBuilder.MD3;
|
|
using CodeImp.DoomBuilder.Data;
|
|
using System.IO;
|
|
using System;
|
|
using System.Text;
|
|
using CodeImp.DoomBuilder.Rendering;
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
using CodeImp.DoomBuilder.IO;
|
|
using System.Drawing;
|
|
using System.Drawing.Imaging;
|
|
|
|
namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|
{
|
|
internal sealed class ModelData
|
|
{
|
|
private const float VERTICAL_STRETCH = 1 / 1.2f;
|
|
|
|
private class MD3LoadResult
|
|
{
|
|
public List<string> Skins;
|
|
public List<Mesh> Meshes;
|
|
public string Errors;
|
|
|
|
public MD3LoadResult() {
|
|
Skins = new List<string>();
|
|
Meshes = new List<Mesh>();
|
|
}
|
|
}
|
|
|
|
internal string ClassName;
|
|
internal List<string> ModelNames;
|
|
internal List<string> TextureNames;
|
|
|
|
internal GZModel Model;
|
|
|
|
private ModelLoadState loadstate;
|
|
public ModelLoadState LoadState { get { return loadstate; } internal set { loadstate = value; } }
|
|
|
|
internal Vector3 Scale;
|
|
internal float zOffset;
|
|
|
|
internal float AngleOffset; //in radians
|
|
internal float PitchOffset; //in radians
|
|
internal float RollOffset; //in radians
|
|
|
|
internal ModelData() {
|
|
ModelNames = new List<string>();
|
|
TextureNames = new List<string>();
|
|
}
|
|
|
|
internal void Dispose() {
|
|
if (Model != null) {
|
|
foreach (Mesh mesh in Model.Meshes)
|
|
mesh.Dispose();
|
|
|
|
foreach (Texture t in Model.Textures)
|
|
t.Dispose();
|
|
|
|
loadstate = ModelLoadState.None;
|
|
}
|
|
}
|
|
}
|
|
}
|